yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
features.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_FEATURES_H
2#define YAZE_CORE_FEATURES_H
3
4#include <string>
5
6namespace yaze {
7namespace core {
8
14 public:
15 struct Flags {
16 // REMOVED: kLogInstructions - DisassemblyViewer is now always enabled
17 // It uses sparse address-map recording (Mesen-style) with zero performance impact
18 // Recording can be disabled per-viewer via UI if needed
19
20 // Flag to enable the saving of all palettes to the Rom.
21 bool kSaveAllPalettes = false;
22
23 // Flag to enable the saving of gfx groups to the rom.
24 bool kSaveGfxGroups = false;
25
26 // Flag to enable the change queue, which could have any anonymous
27 // save routine for the Rom. In practice, just the overworld tilemap
28 // and tile32 save.
30
31 // Save dungeon map edits to the Rom.
32 bool kSaveDungeonMaps = false;
33
34 // Save graphics sheet to the Rom.
35 bool kSaveGraphicsSheet = false;
36
37 // Log to the console.
38 bool kLogToConsole = false;
39
40 // Enable performance monitoring and timing.
42
43 // Enable the new tiered graphics architecture.
45
46 // Use NFD (Native File Dialog) instead of bespoke file dialog implementation.
47#if defined(YAZE_ENABLE_NFD) && YAZE_ENABLE_NFD
48 bool kUseNativeFileDialog = true;
49#else
51#endif
52
53 // Overworld flags
54 struct Overworld {
55 // Load and render overworld sprites to the screen. Unstable.
57
58 // Save overworld map edits to the Rom.
59 bool kSaveOverworldMaps = true;
60
61 // Save overworld entrances to the Rom.
63
64 // Save overworld exits to the Rom.
66
67 // Save overworld items to the Rom.
69
70 // Save overworld properties to the Rom.
72
73 // Enable custom overworld features for vanilla ROMs or override detection.
74 // If ZSCustomOverworld ASM is already applied, features are auto-enabled.
76
77 // Apply ZSCustomOverworld ASM patches when upgrading ROM versions.
80 };
81
82 static Flags &get() {
83 static Flags instance;
84 return instance;
85 }
86
87 std::string Serialize() const {
88 std::string result;
89 // REMOVED: kLogInstructions (deprecated)
90 result +=
91 "kSaveAllPalettes: " + std::to_string(get().kSaveAllPalettes) + "\n";
92 result += "kSaveGfxGroups: " + std::to_string(get().kSaveGfxGroups) + "\n";
93 result +=
94 "kSaveWithChangeQueue: " + std::to_string(get().kSaveWithChangeQueue) +
95 "\n";
96 result +=
97 "kSaveDungeonMaps: " + std::to_string(get().kSaveDungeonMaps) + "\n";
98 result += "kLogToConsole: " + std::to_string(get().kLogToConsole) + "\n";
99 result += "kDrawOverworldSprites: " +
100 std::to_string(get().overworld.kDrawOverworldSprites) + "\n";
101 result += "kSaveOverworldMaps: " +
102 std::to_string(get().overworld.kSaveOverworldMaps) + "\n";
103 result += "kSaveOverworldEntrances: " +
104 std::to_string(get().overworld.kSaveOverworldEntrances) + "\n";
105 result += "kSaveOverworldExits: " +
106 std::to_string(get().overworld.kSaveOverworldExits) + "\n";
107 result += "kSaveOverworldItems: " +
108 std::to_string(get().overworld.kSaveOverworldItems) + "\n";
109 result += "kSaveOverworldProperties: " +
110 std::to_string(get().overworld.kSaveOverworldProperties) + "\n";
111 result += "kLoadCustomOverworld: " +
112 std::to_string(get().overworld.kLoadCustomOverworld) + "\n";
113 result += "kApplyZSCustomOverworldASM: " +
114 std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n";
115 result += "kUseNativeFileDialog: " +
116 std::to_string(get().kUseNativeFileDialog) + "\n";
117 result += "kEnableTieredGfxArchitecture: " +
118 std::to_string(get().kEnableTieredGfxArchitecture) + "\n";
119 return result;
120 }
121};
122
123} // namespace core
124} // namespace yaze
125
126#endif // YAZE_CORE_FEATURES_H
127
A class to manage experimental feature flags.
Definition features.h:13
std::string Serialize() const
Definition features.h:87
static Flags & get()
Definition features.h:82
Main namespace for the application.
Definition controller.cc:20
struct yaze::core::FeatureFlags::Flags::Overworld overworld