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