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