yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
controller.h
Go to the documentation of this file.
1#ifndef YAZE_APP_CORE_CONTROLLER_H
2#define YAZE_APP_CORE_CONTROLLER_H
3
4#include <SDL.h>
5
6#include <memory>
7
8#include "absl/status/status.h"
11
12int main(int argc, char **argv);
13
14namespace yaze {
15namespace core {
16
24 public:
25 bool IsActive() const { return active_; }
26 absl::Status OnEntry(std::string filename = "");
27 void Initialize(std::string filename = "");
28 void OnInput();
29 absl::Status OnLoad();
30 void DoRender() const;
31 void OnExit();
32
33 absl::Status CreateWindow();
34 absl::Status CreateRenderer();
35 absl::Status CreateGuiContext();
36 absl::Status LoadConfigFiles();
37
38 auto window() -> SDL_Window * { return window_.get(); }
39 void set_active(bool active) { active_ = active; }
40 auto active() const { return active_; }
41
42 private:
43 friend int ::main(int argc, char **argv);
44
45 bool active_ = false;
47 std::shared_ptr<SDL_Window> window_;
49};
50
51} // namespace core
52} // namespace yaze
53
54#endif // YAZE_APP_CORE_CONTROLLER_H
Main controller for the application.
Definition controller.h:23
absl::Status OnLoad()
absl::Status CreateWindow()
auto window() -> SDL_Window *
Definition controller.h:38
auto active() const
Definition controller.h:40
bool IsActive() const
Definition controller.h:25
core::PlatformBackend< Sdl2Backend > backend_
Definition controller.h:48
void Initialize(std::string filename="")
Definition controller.cc:58
absl::Status CreateGuiContext()
void set_active(bool active)
Definition controller.h:39
absl::Status OnEntry(std::string filename="")
Definition controller.cc:44
editor::EditorManager editor_manager_
Definition controller.h:46
std::shared_ptr< SDL_Window > window_
Definition controller.h:47
absl::Status CreateRenderer()
absl::Status LoadConfigFiles()
The EditorManager controls the main editor window and manages the various editor classes.
int main(int argc, char **argv)
Definition emu.cc:20
Main namespace for the application.
Definition controller.cc:18