diff --git a/story-editor/src/app/app_controller.h b/story-editor/src/app/app_controller.h index a0be395..1344de8 100644 --- a/story-editor/src/app/app_controller.h +++ b/story-editor/src/app/app_controller.h @@ -99,7 +99,7 @@ public: void LoadParams(); // Méthodes pour interagir avec la VM et le débogueur - chip32_ctx_t* GetChip32Context() { return &m_machine.ctx; } + uint8_t* GetRam(uint32_t &size) { size = m_machine.ram.size(); return m_machine.ram.data(); } DebugContext* GetDebugContext() { return &m_dbg; } void ProcessStory(); @@ -145,8 +145,6 @@ private: AudioPlayer m_player; // Gère la lecture audio ThreadSafeQueue m_eventQueue; // File d'événements de la VM WebServer m_webServer; // Serveur web intégré - - std::string WrapModuleWithMain(const std::string& moduleCode); }; #endif // APP_CONTROLLER_H diff --git a/story-editor/src/main_window.cpp b/story-editor/src/main_window.cpp index 77b0011..700901b 100644 --- a/story-editor/src/main_window.cpp +++ b/story-editor/src/main_window.cpp @@ -583,7 +583,9 @@ bool MainWindow::Loop() m_cpuWindow.Draw(); static MemoryEditor mem_edit_1; - mem_edit_1.DrawWindow("RAM view", m_appController.GetChip32Context()->ram.mem, m_appController.GetChip32Context()->ram.size); + static uint32_t ram_size = 0; + static uint8_t *ram = m_appController.GetRam(ram_size); + mem_edit_1.DrawWindow("RAM view", ram, ram_size); auto selectedNode = nodeEditorFocused ? m_nodeEditorWindow.GetSelectedNode() : m_moduleEditorWindow.GetSelectedNode(); m_propertiesWindow.SetSelectedNode(selectedNode);