-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathoptions.hpp
363 lines (308 loc) · 8.94 KB
/
options.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
#pragma once
#include <vector>
#include <set>
#include <logic/GameItem.hpp>
#include <customizer/model.hpp>
constexpr uint16_t MAXIMUM_STARTING_HC = 9;
constexpr uint16_t MAXIMUM_STARTING_HP = 44;
constexpr uint16_t MAXIMUM_STARTING_JOY_PENDANTS = 40;
constexpr uint16_t MAXIMUM_STARTING_SKULL_NECKLACES = 23;
constexpr uint16_t MAXIMUM_STARTING_BOKO_BABA_SEEDS = 10;
constexpr uint16_t MAXIMUM_STARTING_GOLDEN_FEATHERS = 20;
constexpr uint16_t MAXIMUM_STARTING_KNIGHTS_CRESTS = 10;
constexpr uint16_t MAXIMUM_STARTING_RED_CHU_JELLYS = 15;
constexpr uint16_t MAXIMUM_STARTING_GREEN_CHU_JELLYS = 15;
constexpr uint16_t MAXIMUM_STARTING_BLUE_CHU_JELLYS = 15;
constexpr uint8_t MAXIMUM_NUM_DUNGEONS = 6;
constexpr float MAXIMUM_DAMAGE_MULTIPLIER = 80.0f;
constexpr uint8_t MAXIMUM_PATH_HINT_COUNT = 7;
constexpr uint8_t MAXIMUM_BARREN_HINT_COUNT = 7;
constexpr uint8_t MAXIMUM_ITEM_HINT_COUNT = 7;
constexpr uint8_t MAXIMUM_LOCATION_HINT_COUNT = 7;
enum struct PigColor : uint8_t {
Black = 0,
Pink,
Spotted,
Random,
INVALID
};
enum struct PlacementOption {
Vanilla = 0,
OwnDungeon,
AnyDungeon,
Overworld,
Keysanity,
INVALID
};
enum struct ProgressionDungeons {
Disabled = 0,
Standard,
RaceMode,
INVALID
};
enum struct ShuffleCaveEntrances {
Disabled = 0,
Caves,
CavesFairies,
INVALID
};
enum struct TargetTypePreference {
Hold = 0,
Switch,
INVALID,
};
enum struct CameraPreference {
Standard = 0,
ReverseLeftRight,
INVALID,
};
enum struct FirstPersonCameraPreference {
Standard = 0,
ReverseUpDown,
INVALID,
};
enum struct GyroscopePreference {
Off = 0,
On,
INVALID,
};
enum struct UIDisplayPreference {
On = 0,
Off,
INVALID,
};
// internal for now, here so Crain can do what he wants with it
enum struct GameVersion {
HD = 0,
SD,
INVALID
};
enum struct Option {
INVALID = 0,
// Internal
GameVersion,
// Progression
ProgressDungeons,
ProgressGreatFairies,
ProgressPuzzleCaves,
ProgressCombatCaves,
ProgressShortSidequests,
ProgressLongSidequests,
ProgressSpoilsTrading,
ProgressMinigames,
ProgressFreeGifts,
ProgressMail,
ProgressPlatformsRafts,
ProgressSubmarines,
ProgressEyeReefs,
ProgressOctosGunboats,
ProgressTriforceCharts,
ProgressTreasureCharts,
ProgressExpPurchases,
ProgressMisc,
ProgressTingleChests,
ProgressBattlesquid,
ProgressSavageLabyrinth,
ProgressIslandPuzzles,
ProgressDungeonSecrets,
ProgressObscure,
// Additional Randomization Options
RemoveSwords,
NumRequiredDungeons,
RandomCharts,
CTMC,
// Dungeon Randomization Options
DungeonSmallKeys,
DungeonBigKeys,
DungeonMapsAndCompasses,
// Convenince Tweaks
InvertCompass,
InstantText,
QuietSwiftSail,
FixRNG,
Performance,
RevealSeaChart,
SkipRefights,
AddShortcutWarps,
RemoveMusic,
// Starting Gear
StartingGear,
StartingHP,
StartingHC,
StartingJoyPendants,
StartingSkullNecklaces,
StartingBokoBabaSeeds,
StartingGoldenFeathers,
StartingKnightsCrests,
StartingRedChuJellys,
StartingGreenChuJellys,
StartingBlueChuJellys,
// Excluded Locations
ExcludedLocations,
// Advanced Options
NoSpoilerLog,
StartWithRandomItem,
RandomItemSlideItem,
ClassicMode,
Plandomizer,
PlandomizerFile,
// Hints
HoHoHints,
KorlHints,
ClearerHints,
UseAlwaysHints,
HintImportance,
PathHints,
BarrenHints,
ItemHints,
LocationHints,
// Entrance Randomizer
RandomizeDungeonEntrances,
RandomizeBossEntrances,
RandomizeMinibossEntrances,
RandomizeCaveEntrances,
RandomizeDoorEntrances,
RandomizeMiscEntrances,
MixDungeons,
MixBosses,
MixMinibosses,
MixCaves,
MixDoors,
MixMisc,
DecoupleEntrances,
RandomStartIsland,
// Cosmetics
PigColor,
DamageMultiplier,
// In game preference
TargetType,
Camera,
FirstPersonCamera,
Gyroscope,
UIDisplay,
COUNT
};
class Settings {
public:
GameVersion game_version;
ProgressionDungeons progression_dungeons;
bool progression_great_fairies;
bool progression_puzzle_secret_caves;
bool progression_combat_secret_caves;
bool progression_short_sidequests;
bool progression_long_sidequests;
bool progression_spoils_trading;
bool progression_minigames;
bool progression_free_gifts;
bool progression_mail;
bool progression_platforms_rafts;
bool progression_submarines;
bool progression_eye_reef_chests;
bool progression_big_octos_gunboats;
bool progression_triforce_charts;
bool progression_treasure_charts;
bool progression_expensive_purchases;
bool progression_misc;
bool progression_tingle_chests;
bool progression_battlesquid;
bool progression_savage_labyrinth;
bool progression_island_puzzles;
bool progression_dungeon_secrets;
bool progression_obscure;
PlacementOption dungeon_small_keys;
PlacementOption dungeon_big_keys;
PlacementOption dungeon_maps_compasses;
bool randomize_charts;
bool randomize_starting_island;
bool randomize_dungeon_entrances;
bool randomize_boss_entrances;
bool randomize_miniboss_entrances;
ShuffleCaveEntrances randomize_cave_entrances;
bool randomize_door_entrances;
bool randomize_misc_entrances;
bool mix_dungeons;
bool mix_bosses;
bool mix_minibosses;
bool mix_caves;
bool mix_doors;
bool mix_misc;
bool decouple_entrances;
bool ho_ho_hints;
bool korl_hints;
bool clearer_hints;
bool use_always_hints;
bool hint_importance;
uint8_t path_hints;
uint8_t barren_hints;
uint8_t item_hints;
uint8_t location_hints;
bool instant_text_boxes;
bool quiet_swift_sail;
bool fix_rng;
bool performance;
bool reveal_full_sea_chart;
bool add_shortcut_warps_between_dungeons;
bool do_not_generate_spoiler_log;
bool remove_swords;
bool skip_rematch_bosses;
bool invert_sea_compass_x_axis;
uint8_t num_required_dungeons;
float damage_multiplier;
bool chest_type_matches_contents;
PigColor pig_color;
std::vector<GameItem> starting_gear;
std::set<std::string> excluded_locations;
uint16_t starting_pohs;
uint16_t starting_hcs;
uint16_t starting_joy_pendants;
uint16_t starting_skull_necklaces;
uint16_t starting_boko_baba_seeds;
uint16_t starting_golden_feathers;
uint16_t starting_knights_crests;
uint16_t starting_red_chu_jellys;
uint16_t starting_green_chu_jellys;
uint16_t starting_blue_chu_jellys;
bool remove_music;
bool start_with_random_item;
bool random_item_slide_item;
bool classic_mode;
bool plandomizer;
fspath plandomizerFile;
TargetTypePreference target_type;
CameraPreference camera;
FirstPersonCameraPreference first_person_camera;
GyroscopePreference gyroscope;
UIDisplayPreference ui_display;
CustomModel selectedModel;
Settings();
void resetDefaultSettings();
void resetDefaultPreferences(const bool& paths = false);
uint8_t getSetting(const Option& option) const;
void setSetting(const Option& option, const size_t& value);
int evaluateOption(const std::string& optionStr) const;
};
GameVersion nameToGameVersion(const std::string& name);
std::string GameVersionToName(const GameVersion& version);
PigColor nameToPigColor(const std::string& name);
std::string PigColorToName(const PigColor& color);
PlacementOption nameToPlacementOption(const std::string& name);
std::string PlacementOptionToName(const PlacementOption& option);
ProgressionDungeons nameToProgressionDungeons(const std::string& name);
std::string ProgressionDungeonsToName(const ProgressionDungeons& option);
ShuffleCaveEntrances nameToShuffleCaveEntrances(const std::string& name);
std::string ShuffleCaveEntrancesToName(const ShuffleCaveEntrances& option);
TargetTypePreference nameToTargetTypePreference(const std::string& name);
std::string TargetTypePreferenceToName(const TargetTypePreference& preference);
CameraPreference nameToCameraPreference(const std::string& name);
std::string CameraPreferenceToName(const CameraPreference& preference);
FirstPersonCameraPreference nameToFirstPersonCameraPreference(const std::string& name);
std::string FirstPersonCameraPreferenceToName(const FirstPersonCameraPreference& preference);
GyroscopePreference nameToGyroscopePreference(const std::string& name);
std::string GyroscopePreferenceToName(const GyroscopePreference& preference);
UIDisplayPreference nameToUIDisplayPreference(const std::string& name);
std::string UIDisplayPreferenceToName(const UIDisplayPreference& preference);
int nameToSettingInt(const std::string& name);
Option nameToSetting(const std::string& name);
std::string settingToName(const Option& setting);
std::set<std::string> getDefaultExcludedLocations();
const std::set<std::string>& getAllLocationsNames();