latest code update

- app icon
- starting with map view
- code cleanup

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2026-02-14 09:43:19 +01:00
parent b7bee804ca
commit 6e29dde558
20 changed files with 639 additions and 170 deletions

View File

@@ -32,6 +32,7 @@ public:
int getCartridgeRef() const { return m_cartridgeRef; }
cartridge::Cartridge* getCartridge() const { return m_cartridge.get(); }
bool isCartridgeLoaded() const { return m_cartridge != nullptr; }
std::string getCartridgePath() const { return m_cartridgePath; }
private:
bool initLuaState();

View File

@@ -3,6 +3,7 @@
#include <wx/wx.h>
#include <wx/listbox.h>
#include <wx/notebook.h>
#include "ui/map_sim_frame.h"
class cGameScreen : public wxFrame
{
@@ -24,6 +25,7 @@ private:
void OnInventorySelected(wxCommandEvent& event);
void OnCharacterSelected(wxCommandEvent& event);
void OnItemSelected(wxCommandEvent& event);
void OnMapSim(wxCommandEvent& event);
void populateZones();
void populateTasks();

View File

@@ -0,0 +1,25 @@
#pragma once
#include <wx/frame.h>
#include <wx/webview.h>
#include <vector>
#include <utility>
struct SimPoint {
double lat;
double lon;
};
class MapSimFrame : public wxFrame {
public:
MapSimFrame(wxWindow* parent, double centerLat = 53.3, double centerLon = 10.39, const std::vector<std::pair<double, double>>& zoneCoords = {});
void AddSimPoint(double lat, double lon);
void StartSimulation();
private:
wxWebView* m_webView;
std::vector<SimPoint> m_route;
std::vector<std::pair<double, double>> m_zoneCoords;
void OnWebViewEvent(wxWebViewEvent& event);
void OnPlay(wxCommandEvent& event);
void SendPositionToEngine(double lat, double lon);
wxDECLARE_EVENT_TABLE();
};

View File

@@ -3,6 +3,7 @@
#include <wx/wx.h>
#include <wx/statbmp.h>
#include <wx/html/htmlwin.h>
#include "ui/map_sim_frame.h"
class cGameScreen;