all repos — mgba @ 82a0088e1ec4a1fe13f9eff96c9c72d22995013e

mGBA Game Boy Advance Emulator

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#ifndef QGBA_OBJ_VIEW
 7#define QGBA_OBJ_VIEW
 8
 9#include "AssetView.h"
10#include "GameController.h"
11
12#include "ui_ObjView.h"
13
14extern "C" {
15#include "core/tile-cache.h"
16}
17
18namespace QGBA {
19
20class ObjView : public AssetView {
21Q_OBJECT
22
23public:
24	ObjView(GameController* controller, QWidget* parent = nullptr);
25
26private slots:
27	void selectObj(int);
28	void translateIndex(int);
29
30private:
31#ifdef M_CORE_GBA
32	void updateTilesGBA(bool force) override;
33#endif
34#ifdef M_CORE_GB
35	void updateTilesGB(bool force) override;
36#endif
37
38	Ui::ObjView m_ui;
39
40	GameController* m_controller;
41	mTileCacheEntry m_tileStatus[1024 * 32]; // TODO: Correct size
42	int m_objId;
43	struct ObjInfo {
44		unsigned tile;
45		unsigned width;
46		unsigned height;
47		unsigned stride;
48
49		bool operator!=(const ObjInfo&);
50	} m_objInfo;
51
52	int m_tileOffset;
53};
54
55}
56
57#endif