fix battle area number normalization and add more structs/enums

This commit is contained in:
Martin Michelsen
2024-01-30 21:10:50 -08:00
parent 340fbb8ca5
commit 4830f5a41e
12 changed files with 72 additions and 29 deletions
+6 -2
View File
@@ -577,6 +577,11 @@ struct BattleRules {
FORBID_ALL = 1,
CLEAR_AND_ALLOW = 2,
};
enum class RespawnMode : uint8_t {
ALLOW = 0,
FORBID = 1,
LIMIT_LIVES = 2,
};
// Set by quest opcode F812, but values are remapped.
// F812 00 => FORBID_ALL
@@ -608,8 +613,7 @@ struct BattleRules {
// F818 00 => 01
// F818 01 => 00
// F818 02 => 02
// TODO: Define an enum class for this field.
/* 06 */ uint8_t respawn_mode = 0;
/* 06 */ RespawnMode respawn_mode = RespawnMode::ALLOW;
// Set by quest opcode F819.
/* 07 */ uint8_t replace_char = 0;
// Set by quest opcode F81A, but value is inverted.