pass rom filename into controller

This commit is contained in:
scawful
2024-08-10 20:49:34 -04:00
parent 38b097db3a
commit 25e07fd573
2 changed files with 2 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ class Controller : public ExperimentFlags {
absl::Status LoadFontFamilies() const; absl::Status LoadFontFamilies() const;
absl::Status LoadAudioDevice(); absl::Status LoadAudioDevice();
void SetupScreen() { editor_manager_.SetupScreen(); } void SetupScreen(std::string filename = "") { editor_manager_.SetupScreen(filename); }
auto editor_manager() -> editor::EditorManager & { return editor_manager_; } auto editor_manager() -> editor::EditorManager & { return editor_manager_; }
auto renderer() -> SDL_Renderer * { auto renderer() -> SDL_Renderer * {
return Renderer::GetInstance().renderer(); return Renderer::GetInstance().renderer();

View File

@@ -91,11 +91,10 @@
ImGui_ImplSDL2_InitForSDLRenderer(_controller->window(), _controller->renderer()); ImGui_ImplSDL2_InitForSDLRenderer(_controller->window(), _controller->renderer());
ImGui_ImplSDLRenderer2_Init(_controller->renderer()); ImGui_ImplSDLRenderer2_Init(_controller->renderer());
_controller->editor_manager().overworld_editor().InitializeZeml();
if (!_controller->LoadFontFamilies().ok()) { if (!_controller->LoadFontFamilies().ok()) {
abort(); abort();
} }
_controller->SetupScreen(); _controller->SetupScreen(rom_filename);
_hoverGestureRecognizer = [[UIHoverGestureRecognizer alloc] initWithTarget:self action:@selector(hoverGesture:)]; _hoverGestureRecognizer = [[UIHoverGestureRecognizer alloc] initWithTarget:self action:@selector(hoverGesture:)];
[self.view addGestureRecognizer:_hoverGestureRecognizer]; [self.view addGestureRecognizer:_hoverGestureRecognizer];