all repos — mgba @ 580aec949cb5221b1cdc02b3f04f11537a09c181

mGBA Game Boy Advance Emulator

src/platform/qt/TileView.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 "AssetView.h"
 9
10#include "ui_TileView.h"
11
12#include <mgba/core/tile-cache.h>
13
14namespace QGBA {
15
16class CoreController;
17
18class TileView : public AssetView {
19Q_OBJECT
20
21public:
22	TileView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
23
24public slots:
25	void updatePalette(int);
26	void exportTiles();
27	void exportTile();
28	void copyTiles();
29	void copyTile();
30
31private:
32#ifdef M_CORE_GBA
33	void updateTilesGBA(bool force) override;
34#endif
35#ifdef M_CORE_GB
36	void updateTilesGB(bool force) override;
37#endif
38
39	Ui::TileView m_ui;
40
41	std::shared_ptr<CoreController> m_controller;
42	mTileCacheEntry m_tileStatus[3072 * 32] = {}; // TODO: Correct size
43	int m_paletteId = 0;
44};
45
46}