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_APP_CORE_FEATURES_H
2#define YAZE_APP_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 // Use NFD (Native File Dialog) instead of bespoke file dialog implementation.
44#if defined(YAZE_ENABLE_NFD) && YAZE_ENABLE_NFD
45 bool kUseNativeFileDialog = true;
46#else
48#endif
49
50 // Overworld flags
51 struct Overworld {
52 // Load and render overworld sprites to the screen. Unstable.
54
55 // Save overworld map edits to the Rom.
56 bool kSaveOverworldMaps = true;
57
58 // Save overworld entrances to the Rom.
60
61 // Save overworld exits to the Rom.
63
64 // Save overworld items to the Rom.
66
67 // Save overworld properties to the Rom.
69
70 // Enable custom overworld features for vanilla ROMs or override detection.
71 // If ZSCustomOverworld ASM is already applied, features are auto-enabled.
73
74 // Apply ZSCustomOverworld ASM patches when upgrading ROM versions.
77 };
78
79 static Flags &get() {
80 static Flags instance;
81 return instance;
82 }
83
84 std::string Serialize() const {
85 std::string result;
86 // REMOVED: kLogInstructions (deprecated)
87 result +=
88 "kSaveAllPalettes: " + std::to_string(get().kSaveAllPalettes) + "\n";
89 result += "kSaveGfxGroups: " + std::to_string(get().kSaveGfxGroups) + "\n";
90 result +=
91 "kSaveWithChangeQueue: " + std::to_string(get().kSaveWithChangeQueue) +
92 "\n";
93 result +=
94 "kSaveDungeonMaps: " + std::to_string(get().kSaveDungeonMaps) + "\n";
95 result += "kLogToConsole: " + std::to_string(get().kLogToConsole) + "\n";
96 result += "kDrawOverworldSprites: " +
97 std::to_string(get().overworld.kDrawOverworldSprites) + "\n";
98 result += "kSaveOverworldMaps: " +
99 std::to_string(get().overworld.kSaveOverworldMaps) + "\n";
100 result += "kSaveOverworldEntrances: " +
101 std::to_string(get().overworld.kSaveOverworldEntrances) + "\n";
102 result += "kSaveOverworldExits: " +
103 std::to_string(get().overworld.kSaveOverworldExits) + "\n";
104 result += "kSaveOverworldItems: " +
105 std::to_string(get().overworld.kSaveOverworldItems) + "\n";
106 result += "kSaveOverworldProperties: " +
107 std::to_string(get().overworld.kSaveOverworldProperties) + "\n";
108 result += "kLoadCustomOverworld: " +
109 std::to_string(get().overworld.kLoadCustomOverworld) + "\n";
110 result += "kApplyZSCustomOverworldASM: " +
111 std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n";
112 result += "kUseNativeFileDialog: " +
113 std::to_string(get().kUseNativeFileDialog) + "\n";
114 return result;
115 }
116};
117
118} // namespace core
119} // namespace yaze
120
121#endif // YAZE_APP_CORE_FEATURES_H
A class to manage experimental feature flags.
Definition features.h:13
std::string Serialize() const
Definition features.h:84
static Flags & get()
Definition features.h:79
Main namespace for the application.
struct yaze::core::FeatureFlags::Flags::Overworld overworld