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
18 // impact 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 // Dungeon save controls (granular safety)
35 struct Dungeon {
36 bool kSaveObjects = true;
37 bool kSaveSprites = true;
38 bool kSaveRoomHeaders = true;
39 bool kSaveTorches = true;
40 bool kSavePits = true;
41 bool kSaveBlocks = true;
42 bool kSaveCollision = true;
43 // Oracle of Secrets: save the water fill zone table (reserved region).
44 // Independent of collision map saving; only writes if water fill data is
45 // dirty.
47 bool kSaveChests = true;
48 bool kSavePotItems = true;
49 bool kSaveEntrances = true;
50 bool kSavePalettes = true;
51
52 // UI/UX
53 // When enabled, the dungeon editor uses a single stable "Workbench"
54 // window instead of spawning a panel per open room.
55 bool kUseWorkbench = true;
57
58 // Save graphics sheet to the Rom.
59 bool kSaveGraphicsSheet = false;
60
61 // Save message text to the Rom.
62 bool kSaveMessages = true;
63
64 // Log to the console.
65 bool kLogToConsole = false;
66
67 // Enable performance monitoring and timing.
69
70 // Enable the new tiered graphics architecture.
72
73 // Enable custom object panels (Custom Objects, Minecart Editor)
75
76 // Use NFD (Native File Dialog) instead of bespoke file dialog
77 // implementation.
78#if defined(YAZE_ENABLE_NFD) && YAZE_ENABLE_NFD
79 bool kUseNativeFileDialog = true;
80#else
82#endif
83
84 // Overworld flags
85 struct Overworld {
86 // Load and render overworld sprites to the screen. Unstable.
88
89 // Save overworld map edits to the Rom.
90 bool kSaveOverworldMaps = true;
91
92 // Save overworld entrances to the Rom.
94
95 // Save overworld exits to the Rom.
97
98 // Save overworld items to the Rom.
100
101 // Save overworld properties to the Rom.
103
104 // Enable custom overworld features for vanilla ROMs or override
105 // detection. If ZSCustomOverworld ASM is already applied, features are
106 // auto-enabled.
108
109 // Apply ZSCustomOverworld ASM patches when upgrading ROM versions.
111
112 // Enable experimental special-world tail expansion (maps 0xA0-0xBF).
113 // When disabled, the editor/runtime will ignore those maps and fall back
114 // to blanks for safety.
117 };
118
119 static Flags& get() {
120 static Flags instance;
121 return instance;
122 }
123
124 std::string Serialize() const {
125 std::string result;
126 // REMOVED: kLogInstructions (deprecated)
127 result +=
128 "kSaveAllPalettes: " + std::to_string(get().kSaveAllPalettes) + "\n";
129 result += "kSaveGfxGroups: " + std::to_string(get().kSaveGfxGroups) + "\n";
130 result +=
131 "kSaveWithChangeQueue: " + std::to_string(get().kSaveWithChangeQueue) +
132 "\n";
133 result +=
134 "kSaveDungeonMaps: " + std::to_string(get().kSaveDungeonMaps) + "\n";
135 result +=
136 "kSaveDungeonObjects: " + std::to_string(get().dungeon.kSaveObjects) +
137 "\n";
138 result +=
139 "kSaveDungeonSprites: " + std::to_string(get().dungeon.kSaveSprites) +
140 "\n";
141 result += "kSaveDungeonRoomHeaders: " +
142 std::to_string(get().dungeon.kSaveRoomHeaders) + "\n";
143 result +=
144 "kSaveDungeonTorches: " + std::to_string(get().dungeon.kSaveTorches) +
145 "\n";
146 result +=
147 "kSaveDungeonPits: " + std::to_string(get().dungeon.kSavePits) + "\n";
148 result +=
149 "kSaveDungeonBlocks: " + std::to_string(get().dungeon.kSaveBlocks) +
150 "\n";
151 result += "kSaveDungeonCollision: " +
152 std::to_string(get().dungeon.kSaveCollision) + "\n";
153 result += "kSaveDungeonWaterFillZones: " +
154 std::to_string(get().dungeon.kSaveWaterFillZones) + "\n";
155 result +=
156 "kSaveDungeonChests: " + std::to_string(get().dungeon.kSaveChests) +
157 "\n";
158 result +=
159 "kSaveDungeonPotItems: " + std::to_string(get().dungeon.kSavePotItems) +
160 "\n";
161 result += "kSaveDungeonEntrances: " +
162 std::to_string(get().dungeon.kSaveEntrances) + "\n";
163 result +=
164 "kSaveDungeonPalettes: " + std::to_string(get().dungeon.kSavePalettes) +
165 "\n";
166 result +=
167 "kDungeonUseWorkbench: " + std::to_string(get().dungeon.kUseWorkbench) +
168 "\n";
169 result += "kSaveMessages: " + std::to_string(get().kSaveMessages) + "\n";
170 result += "kLogToConsole: " + std::to_string(get().kLogToConsole) + "\n";
171 result += "kDrawOverworldSprites: " +
172 std::to_string(get().overworld.kDrawOverworldSprites) + "\n";
173 result += "kSaveOverworldMaps: " +
174 std::to_string(get().overworld.kSaveOverworldMaps) + "\n";
175 result += "kSaveOverworldEntrances: " +
176 std::to_string(get().overworld.kSaveOverworldEntrances) + "\n";
177 result += "kSaveOverworldExits: " +
178 std::to_string(get().overworld.kSaveOverworldExits) + "\n";
179 result += "kSaveOverworldItems: " +
180 std::to_string(get().overworld.kSaveOverworldItems) + "\n";
181 result += "kSaveOverworldProperties: " +
182 std::to_string(get().overworld.kSaveOverworldProperties) + "\n";
183 result += "kLoadCustomOverworld: " +
184 std::to_string(get().overworld.kLoadCustomOverworld) + "\n";
185 result += "kApplyZSCustomOverworldASM: " +
186 std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n";
187 result += "kEnableSpecialWorldExpansion: " +
188 std::to_string(get().overworld.kEnableSpecialWorldExpansion) +
189 "\n";
190 result +=
191 "kUseNativeFileDialog: " + std::to_string(get().kUseNativeFileDialog) +
192 "\n";
193 result += "kEnableTieredGfxArchitecture: " +
194 std::to_string(get().kEnableTieredGfxArchitecture) + "\n";
195 result +=
196 "kEnableCustomObjects: " + std::to_string(get().kEnableCustomObjects) +
197 "\n";
198 return result;
199 }
200};
201
202} // namespace core
203} // namespace yaze
204
205#endif // YAZE_CORE_FEATURES_H
A class to manage experimental feature flags.
Definition features.h:13
std::string Serialize() const
Definition features.h:124
static Flags & get()
Definition features.h:119
struct yaze::core::FeatureFlags::Flags::Dungeon dungeon
struct yaze::core::FeatureFlags::Flags::Overworld overworld