all repos — mgba @ 038d21debd6885a7ae74fd2bf24869eafa50d6da

mGBA Game Boy Advance Emulator

src/platform/qt/AssetTile.h (view raw)

 1/* Copyright (c) 2013-2016 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#pragma once
 7
 8#include "ui_AssetTile.h"
 9
10#include <memory>
11
12#include <mgba/core/cache-set.h>
13
14namespace QGBA {
15
16class CoreController;
17
18class AssetTile : public AssetInfo {
19Q_OBJECT
20
21public:
22	AssetTile(QWidget* parent = nullptr);
23	void setController(std::shared_ptr<CoreController>);
24	QImage activeTile() const { return m_activeTile; }
25
26public slots:
27	void setPalette(int);
28	void setBoundary(int boundary, int set0, int set1);
29	void selectIndex(int);
30	void setFlip(bool h, bool v);
31	void selectColor(int);
32
33protected:
34	int customLocation(const QString& id = {}) override;
35
36private:
37	Ui::AssetTile m_ui;
38
39	mCacheSet* m_cacheSet;
40	mTileCache* m_tileCaches[2];
41	int m_paletteId = 0;
42	int m_index = 0;
43
44	int m_addressWidth;
45	int m_addressBase;
46	int m_boundary;
47	int m_boundaryBase;
48	bool m_flipH = false;
49	bool m_flipV = false;
50
51	QMap<QString, QLabel*> m_customProperties;
52	QImage m_activeTile;
53};
54
55}