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