yaze 0.3.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"
9#include "app/core/window.h"
12
13int main(int argc, char** argv);
14
15namespace yaze {
16namespace core {
17
25 public:
26 bool IsActive() const { return active_; }
27 absl::Status OnEntry(std::string filename = "");
28 void OnInput();
29 absl::Status OnLoad();
30 void DoRender() const;
31 void OnExit();
32
33 // Set startup editor and cards from command-line flags
34 void SetStartupEditor(const std::string& editor_name, const std::string& cards);
35
36 auto window() -> SDL_Window* { return window_.window_.get(); }
37 void set_active(bool active) { active_ = active; }
38 auto active() const { return active_; }
43 auto renderer() -> gfx::IRenderer* { return renderer_.get(); }
44
45 private:
46 friend int ::main(int argc, char** argv);
47
48 bool active_ = false;
51 std::unique_ptr<gfx::IRenderer> renderer_;
52};
53
54} // namespace core
55} // namespace yaze
56
57#endif // YAZE_APP_CORE_CONTROLLER_H
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
Main controller for the application.
Definition controller.h:24
absl::Status OnLoad()
Definition controller.cc:57
core::Window window_
Definition controller.h:49
auto window() -> SDL_Window *
Definition controller.h:36
auto renderer() -> gfx::IRenderer *
Definition controller.h:43
auto active() const
Definition controller.h:38
bool IsActive() const
Definition controller.h:26
std::unique_ptr< gfx::IRenderer > renderer_
Definition controller.h:51
auto GetCurrentRom() -> Rom *
Definition controller.h:42
auto overworld() -> yaze::zelda3::Overworld *
Definition controller.h:39
void set_active(bool active)
Definition controller.h:37
absl::Status OnEntry(std::string filename="")
Definition controller.cc:23
editor::EditorManager editor_manager_
Definition controller.h:50
void SetStartupEditor(const std::string &editor_name, const std::string &cards)
Definition controller.cc:44
The EditorManager controls the main editor window and manages the various editor classes.
auto overworld() -> yaze::zelda3::Overworld *
Defines an abstract interface for all rendering operations.
Definition irenderer.h:35
Represents the full Overworld data, light and dark world.
Definition overworld.h:135
Main namespace for the application.
std::shared_ptr< SDL_Window > window_
Definition window.h:18