all repos — mgba @ 9b0393d50ffcd27c487740098c3c0bb72b16529f

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