src/platform/qt/ObjView.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_ObjView.h"
11
12#include <mgba/core/tile-cache.h>
13
14namespace QGBA {
15
16class CoreController;
17
18class ObjView : public AssetView {
19Q_OBJECT
20
21public:
22 ObjView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
23
24public slots:
25 void exportObj();
26 void copyObj();
27
28private slots:
29 void selectObj(int);
30 void translateIndex(int);
31
32private:
33#ifdef M_CORE_GBA
34 void updateTilesGBA(bool force) override;
35#endif
36#ifdef M_CORE_GB
37 void updateTilesGB(bool force) override;
38#endif
39
40 Ui::ObjView m_ui;
41
42 std::shared_ptr<CoreController> m_controller;
43 mTileCacheEntry m_tileStatus[1024 * 32] = {}; // TODO: Correct size
44 int m_objId = 0;
45 ObjInfo m_objInfo = {};
46
47 int m_tileOffset;
48 int m_boundary;
49};
50
51}