yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::Controller Class Reference

Main controller for the application. More...

#include <controller.h>

Collaboration diagram for yaze::Controller:

Public Member Functions

bool IsActive () const
 
absl::Status OnEntry (std::string filename="")
 
void OnInput ()
 
absl::Status OnLoad ()
 
void DoRender () const
 
void OnExit ()
 
void SetStartupEditor (const std::string &editor_name, const std::string &cards)
 
auto window () -> SDL_Window *
 
void set_active (bool active)
 
auto active () const
 
auto overworld () -> yaze::zelda3::Overworld *
 
auto GetCurrentRom () -> Rom *
 
auto renderer () -> gfx::IRenderer *
 
editor::EditorManagereditor_manager ()
 
platform::IWindowBackendwindow_backend ()
 
absl::Status LoadRomForTesting (const std::string &rom_path)
 

Private Member Functions

friend int::main (int argc, char **argv)
 

Private Attributes

bool active_ = false
 
std::unique_ptr< platform::IWindowBackendwindow_backend_
 
editor::EditorManager editor_manager_
 
std::unique_ptr< gfx::IRendererrenderer_
 

Detailed Description

Main controller for the application.

This class is responsible for managing the main window and the main editor. It is the main entry point for the application.

Definition at line 26 of file controller.h.

Member Function Documentation

◆ IsActive()

bool yaze::Controller::IsActive ( ) const
inline

Definition at line 28 of file controller.h.

References active_.

◆ OnEntry()

◆ OnInput()

◆ OnLoad()

◆ DoRender()

void yaze::Controller::DoRender ( ) const

◆ OnExit()

void yaze::Controller::OnExit ( )

Definition at line 195 of file controller.cc.

References renderer_, and window_backend_.

◆ SetStartupEditor()

void yaze::Controller::SetStartupEditor ( const std::string & editor_name,
const std::string & cards )

Definition at line 59 of file controller.cc.

References editor_manager_, and yaze::editor::EditorManager::OpenEditorAndPanelsFromFlags().

Here is the call graph for this function:

◆ window()

auto yaze::Controller::window ( ) -> SDL_Window*
inline

Definition at line 39 of file controller.h.

References window_backend_.

◆ set_active()

void yaze::Controller::set_active ( bool active)
inline

Definition at line 42 of file controller.h.

References active(), and active_.

Here is the call graph for this function:

◆ active()

auto yaze::Controller::active ( ) const
inline

Definition at line 43 of file controller.h.

References active_.

Referenced by set_active().

◆ overworld()

auto yaze::Controller::overworld ( ) -> yaze::zelda3::Overworld*
inline

Definition at line 44 of file controller.h.

References editor_manager_, and yaze::editor::EditorManager::overworld().

Here is the call graph for this function:

◆ GetCurrentRom()

auto yaze::Controller::GetCurrentRom ( ) -> Rom*
inline

Definition at line 47 of file controller.h.

References editor_manager_, and yaze::editor::EditorManager::GetCurrentRom().

Here is the call graph for this function:

◆ renderer()

auto yaze::Controller::renderer ( ) -> gfx::IRenderer*
inline

Definition at line 48 of file controller.h.

References renderer_.

◆ editor_manager()

editor::EditorManager * yaze::Controller::editor_manager ( )
inline

Definition at line 51 of file controller.h.

References editor_manager_.

Referenced by yaze::app::GetGlobalEditorManager(), and yaze::app::GetGlobalEmulator().

◆ window_backend()

platform::IWindowBackend * yaze::Controller::window_backend ( )
inline

Definition at line 54 of file controller.h.

References window_backend_.

◆ LoadRomForTesting()

absl::Status yaze::Controller::LoadRomForTesting ( const std::string & rom_path)

Definition at line 204 of file controller.cc.

References editor_manager_, and yaze::editor::EditorManager::OpenRomOrProject().

Here is the call graph for this function:

◆ int::main()

yaze::Controller::int::main ( int argc,
char ** argv )
private

Member Data Documentation

◆ active_

bool yaze::Controller::active_ = false
private

Definition at line 69 of file controller.h.

Referenced by active(), IsActive(), OnEntry(), OnInput(), OnLoad(), and set_active().

◆ window_backend_

std::unique_ptr<platform::IWindowBackend> yaze::Controller::window_backend_
private

Definition at line 70 of file controller.h.

Referenced by DoRender(), OnEntry(), OnExit(), OnInput(), OnLoad(), window(), and window_backend().

◆ editor_manager_

editor::EditorManager yaze::Controller::editor_manager_
private

◆ renderer_

std::unique_ptr<gfx::IRenderer> yaze::Controller::renderer_
private

Definition at line 72 of file controller.h.

Referenced by DoRender(), OnEntry(), OnExit(), and renderer().


The documentation for this class was generated from the following files: