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 sprite placement data to the Rom.
103
104 // Save overworld properties to the Rom.
106
107 // Enable custom overworld features for vanilla ROMs or override
108 // detection. If ZSCustomOverworld ASM is already applied, features are
109 // auto-enabled.
111
112 // Apply ZSCustomOverworld ASM patches when upgrading ROM versions.
114
115 // Enable experimental special-world tail expansion (maps 0xA0-0xBF).
116 // When disabled, the editor/runtime will ignore those maps and fall back
117 // to blanks for safety.
120 };
121
122 static Flags& get() {
123 static Flags instance;
124 return instance;
125 }
126
127 std::string Serialize() const {
128 std::string result;
129 // REMOVED: kLogInstructions (deprecated)
130 result +=
131 "kSaveAllPalettes: " + std::to_string(get().kSaveAllPalettes) + "\n";
132 result += "kSaveGfxGroups: " + std::to_string(get().kSaveGfxGroups) + "\n";
133 result +=
134 "kSaveWithChangeQueue: " + std::to_string(get().kSaveWithChangeQueue) +
135 "\n";
136 result +=
137 "kSaveDungeonMaps: " + std::to_string(get().kSaveDungeonMaps) + "\n";
138 result +=
139 "kSaveDungeonObjects: " + std::to_string(get().dungeon.kSaveObjects) +
140 "\n";
141 result +=
142 "kSaveDungeonSprites: " + std::to_string(get().dungeon.kSaveSprites) +
143 "\n";
144 result += "kSaveDungeonRoomHeaders: " +
145 std::to_string(get().dungeon.kSaveRoomHeaders) + "\n";
146 result +=
147 "kSaveDungeonTorches: " + std::to_string(get().dungeon.kSaveTorches) +
148 "\n";
149 result +=
150 "kSaveDungeonPits: " + std::to_string(get().dungeon.kSavePits) + "\n";
151 result +=
152 "kSaveDungeonBlocks: " + std::to_string(get().dungeon.kSaveBlocks) +
153 "\n";
154 result += "kSaveDungeonCollision: " +
155 std::to_string(get().dungeon.kSaveCollision) + "\n";
156 result += "kSaveDungeonWaterFillZones: " +
157 std::to_string(get().dungeon.kSaveWaterFillZones) + "\n";
158 result +=
159 "kSaveDungeonChests: " + std::to_string(get().dungeon.kSaveChests) +
160 "\n";
161 result +=
162 "kSaveDungeonPotItems: " + std::to_string(get().dungeon.kSavePotItems) +
163 "\n";
164 result += "kSaveDungeonEntrances: " +
165 std::to_string(get().dungeon.kSaveEntrances) + "\n";
166 result +=
167 "kSaveDungeonPalettes: " + std::to_string(get().dungeon.kSavePalettes) +
168 "\n";
169 result +=
170 "kDungeonUseWorkbench: " + std::to_string(get().dungeon.kUseWorkbench) +
171 "\n";
172 result += "kSaveMessages: " + std::to_string(get().kSaveMessages) + "\n";
173 result += "kLogToConsole: " + std::to_string(get().kLogToConsole) + "\n";
174 result += "kDrawOverworldSprites: " +
175 std::to_string(get().overworld.kDrawOverworldSprites) + "\n";
176 result += "kSaveOverworldMaps: " +
177 std::to_string(get().overworld.kSaveOverworldMaps) + "\n";
178 result += "kSaveOverworldEntrances: " +
179 std::to_string(get().overworld.kSaveOverworldEntrances) + "\n";
180 result += "kSaveOverworldExits: " +
181 std::to_string(get().overworld.kSaveOverworldExits) + "\n";
182 result += "kSaveOverworldItems: " +
183 std::to_string(get().overworld.kSaveOverworldItems) + "\n";
184 result += "kSaveOverworldSprites: " +
185 std::to_string(get().overworld.kSaveOverworldSprites) + "\n";
186 result += "kSaveOverworldProperties: " +
187 std::to_string(get().overworld.kSaveOverworldProperties) + "\n";
188 result += "kLoadCustomOverworld: " +
189 std::to_string(get().overworld.kLoadCustomOverworld) + "\n";
190 result += "kApplyZSCustomOverworldASM: " +
191 std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n";
192 result += "kEnableSpecialWorldExpansion: " +
193 std::to_string(get().overworld.kEnableSpecialWorldExpansion) +
194 "\n";
195 result +=
196 "kUseNativeFileDialog: " + std::to_string(get().kUseNativeFileDialog) +
197 "\n";
198 result += "kEnableTieredGfxArchitecture: " +
199 std::to_string(get().kEnableTieredGfxArchitecture) + "\n";
200 result +=
201 "kEnableCustomObjects: " + std::to_string(get().kEnableCustomObjects) +
202 "\n";
203 return result;
204 }
205};
206
207} // namespace core
208} // namespace yaze
209
210#endif // YAZE_CORE_FEATURES_H
A class to manage experimental feature flags.
Definition features.h:13
std::string Serialize() const
Definition features.h:127
static Flags & get()
Definition features.h:122
struct yaze::core::FeatureFlags::Flags::Dungeon dungeon
struct yaze::core::FeatureFlags::Flags::Overworld overworld