Add ExperimentFlags
This commit is contained in:
@@ -9,6 +9,18 @@ namespace yaze {
|
||||
namespace app {
|
||||
namespace core {
|
||||
|
||||
class ExperimentFlags {
|
||||
private:
|
||||
struct Flags {
|
||||
bool kDrawOverworldSprites = false;
|
||||
};
|
||||
Flags flags_;
|
||||
|
||||
public:
|
||||
auto flags() const { return flags_; }
|
||||
Flags *mutable_flags() { return &flags_; }
|
||||
};
|
||||
|
||||
uint32_t SnesToPc(uint32_t addr);
|
||||
uint32_t PcToSnes(uint32_t addr);
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ void MasterEditor::DrawFileMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Options")) {
|
||||
ImGui::MenuItem("Backup ROM", "", &backup_rom_);
|
||||
ImGui::Checkbox("Enable Overworld Sprites",
|
||||
&mutable_flags()->kDrawOverworldSprites);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <imgui_memory_editor.h>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "app/core/common.h"
|
||||
#include "app/core/constants.h"
|
||||
#include "app/core/emulator.h"
|
||||
#include "app/core/pipeline.h"
|
||||
@@ -30,13 +31,11 @@ namespace yaze {
|
||||
namespace app {
|
||||
namespace editor {
|
||||
|
||||
class MasterEditor : public SharedROM {
|
||||
class MasterEditor : public SharedROM, public core::ExperimentFlags {
|
||||
public:
|
||||
void SetupScreen(std::shared_ptr<SDL_Renderer> renderer);
|
||||
void UpdateScreen();
|
||||
void Shutdown() {
|
||||
overworld_editor_.Shutdown();
|
||||
}
|
||||
void Shutdown() { overworld_editor_.Shutdown(); }
|
||||
|
||||
private:
|
||||
void DrawFileDialog();
|
||||
@@ -49,7 +48,7 @@ class MasterEditor : public SharedROM {
|
||||
void DrawEditMenu();
|
||||
void DrawViewMenu();
|
||||
void DrawHelpMenu();
|
||||
|
||||
|
||||
bool about_ = false;
|
||||
bool rom_info_ = false;
|
||||
bool backup_rom_ = true;
|
||||
|
||||
Reference in New Issue
Block a user