all repos — mgba @ 6e9507f0822f76bba63f29fba6a78d1f14f34b9f

mGBA Game Boy Advance Emulator

src/platform/qt/MapView.h (view raw)

 1/* Copyright (c) 2013-2017 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_MapView.h"
11
12#include <mgba/core/map-cache.h>
13
14namespace QGBA {
15
16class CoreController;
17
18class MapView : public AssetView {
19Q_OBJECT
20
21public:
22	MapView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
23
24private slots:
25	void selectMap(int);
26
27private:
28#ifdef M_CORE_GBA
29	void updateTilesGBA(bool force) override;
30#endif
31#ifdef M_CORE_GB
32	void updateTilesGB(bool force) override;
33#endif
34
35	Ui::MapView m_ui;
36
37	std::shared_ptr<CoreController> m_controller;
38	mMapCacheEntry m_mapStatus[1024 * 1024] = {}; // TODO: Correct size
39	int m_map = 0;
40};
41
42}