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 // 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 // Enable custom object panels (Custom Objects, Minecart Editor)
48
49 // Use NFD (Native File Dialog) instead of bespoke file dialog
50 // implementation.
51#if defined(YAZE_ENABLE_NFD) && YAZE_ENABLE_NFD
52 bool kUseNativeFileDialog = true;
53#else
55#endif
56
57 // Overworld flags
58 struct Overworld {
59 // Load and render overworld sprites to the screen. Unstable.
61
62 // Save overworld map edits to the Rom.
63 bool kSaveOverworldMaps = true;
64
65 // Save overworld entrances to the Rom.
67
68 // Save overworld exits to the Rom.
70
71 // Save overworld items to the Rom.
73
74 // Save overworld properties to the Rom.
76
77 // Enable custom overworld features for vanilla ROMs or override
78 // detection. If ZSCustomOverworld ASM is already applied, features are
79 // auto-enabled.
81
82 // Apply ZSCustomOverworld ASM patches when upgrading ROM versions.
84
85 // Enable experimental special-world tail expansion (maps 0xA0-0xBF).
86 // When disabled, the editor/runtime will ignore those maps and fall back
87 // to blanks for safety.
90 };
91
92 static Flags& get() {
93 static Flags instance;
94 return instance;
95 }
96
97 std::string Serialize() const {
98 std::string result;
99 // REMOVED: kLogInstructions (deprecated)
100 result +=
101 "kSaveAllPalettes: " + std::to_string(get().kSaveAllPalettes) + "\n";
102 result += "kSaveGfxGroups: " + std::to_string(get().kSaveGfxGroups) + "\n";
103 result +=
104 "kSaveWithChangeQueue: " + std::to_string(get().kSaveWithChangeQueue) +
105 "\n";
106 result +=
107 "kSaveDungeonMaps: " + std::to_string(get().kSaveDungeonMaps) + "\n";
108 result += "kLogToConsole: " + std::to_string(get().kLogToConsole) + "\n";
109 result += "kDrawOverworldSprites: " +
110 std::to_string(get().overworld.kDrawOverworldSprites) + "\n";
111 result += "kSaveOverworldMaps: " +
112 std::to_string(get().overworld.kSaveOverworldMaps) + "\n";
113 result += "kSaveOverworldEntrances: " +
114 std::to_string(get().overworld.kSaveOverworldEntrances) + "\n";
115 result += "kSaveOverworldExits: " +
116 std::to_string(get().overworld.kSaveOverworldExits) + "\n";
117 result += "kSaveOverworldItems: " +
118 std::to_string(get().overworld.kSaveOverworldItems) + "\n";
119 result += "kSaveOverworldProperties: " +
120 std::to_string(get().overworld.kSaveOverworldProperties) + "\n";
121 result += "kLoadCustomOverworld: " +
122 std::to_string(get().overworld.kLoadCustomOverworld) + "\n";
123 result += "kApplyZSCustomOverworldASM: " +
124 std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n";
125 result += "kEnableSpecialWorldExpansion: " +
126 std::to_string(get().overworld.kEnableSpecialWorldExpansion) +
127 "\n";
128 result +=
129 "kUseNativeFileDialog: " + std::to_string(get().kUseNativeFileDialog) +
130 "\n";
131 result += "kEnableTieredGfxArchitecture: " +
132 std::to_string(get().kEnableTieredGfxArchitecture) + "\n";
133 result += "kEnableCustomObjects: " +
134 std::to_string(get().kEnableCustomObjects) + "\n";
135 return result;
136 }
137};
138
139} // namespace core
140} // namespace yaze
141
142#endif // YAZE_CORE_FEATURES_H
A class to manage experimental feature flags.
Definition features.h:13
std::string Serialize() const
Definition features.h:97
static Flags & get()
Definition features.h:92
struct yaze::core::FeatureFlags::Flags::Overworld overworld