mirror of
https://github.com/pmret/papermario.git
synced 2024-11-23 05:39:44 +00:00
Fix variable names related to fleeing battles being logically inverted (#1219)
Some checks failed
Docs / doxygen (push) Has been cancelled
Some checks failed
Docs / doxygen (push) Has been cancelled
This commit is contained in:
parent
c356a0e330
commit
81875cffb3
@ -3606,7 +3606,7 @@ enum BattleStatusFlags2 {
|
|||||||
BS_FLAGS2_PARTNER_TURN_USED = 0x00000004, // set after partner has used their action for this turn
|
BS_FLAGS2_PARTNER_TURN_USED = 0x00000004, // set after partner has used their action for this turn
|
||||||
BS_FLAGS2_OVERRIDE_INACTIVE_PLAYER = 0x00000008, // override inactive player animations and effects
|
BS_FLAGS2_OVERRIDE_INACTIVE_PLAYER = 0x00000008, // override inactive player animations and effects
|
||||||
BS_FLAGS2_OVERRIDE_INACTIVE_PARTNER = 0x00000010, // override inactive partner animations and effects
|
BS_FLAGS2_OVERRIDE_INACTIVE_PARTNER = 0x00000010, // override inactive partner animations and effects
|
||||||
BS_FLAGS2_CANT_FLEE = 0x00000020,
|
BS_FLAGS2_CAN_FLEE = 0x00000020,
|
||||||
BS_FLAGS2_PEACH_BATTLE = 0x00000040,
|
BS_FLAGS2_PEACH_BATTLE = 0x00000040,
|
||||||
BS_FLAGS2_STORED_TURBO_CHARGE_TURN = 0x00000100, // prevents turbo charge turns from decrementing on begin player turn
|
BS_FLAGS2_STORED_TURBO_CHARGE_TURN = 0x00000100, // prevents turbo charge turns from decrementing on begin player turn
|
||||||
BS_FLAGS2_DOING_JUMP_TUTORIAL = 0x00000200,
|
BS_FLAGS2_DOING_JUMP_TUTORIAL = 0x00000200,
|
||||||
|
@ -390,7 +390,7 @@ typedef struct EncounterStatus {
|
|||||||
/* 0x00D */ char unk_0D;
|
/* 0x00D */ char unk_0D;
|
||||||
/* 0x00E */ s16 coinsEarned; /* valid after battle */
|
/* 0x00E */ s16 coinsEarned; /* valid after battle */
|
||||||
/* 0x010 */ s8 instigatorValue;
|
/* 0x010 */ s8 instigatorValue;
|
||||||
/* 0x011 */ s8 allowFleeing;
|
/* 0x011 */ s8 forbidFleeing;
|
||||||
/* 0x012 */ s8 scriptedBattle; ///< battle started by StartBattle but not by encounter
|
/* 0x012 */ s8 scriptedBattle; ///< battle started by StartBattle but not by encounter
|
||||||
/* 0x013 */ s8 dropWhackaBump;
|
/* 0x013 */ s8 dropWhackaBump;
|
||||||
/* 0x014 */ s32 songID;
|
/* 0x014 */ s32 songID;
|
||||||
|
@ -273,9 +273,9 @@ void btl_state_update_normal_start(void) {
|
|||||||
battleStatus->jumpCharge = 0;
|
battleStatus->jumpCharge = 0;
|
||||||
battleStatus->unk_98 = 0;
|
battleStatus->unk_98 = 0;
|
||||||
battleStatus->hpDrainCount = 0;
|
battleStatus->hpDrainCount = 0;
|
||||||
gBattleStatus.flags2 |= BS_FLAGS2_CANT_FLEE;
|
gBattleStatus.flags2 |= BS_FLAGS2_CAN_FLEE;
|
||||||
if (currentEncounter->allowFleeing) {
|
if (currentEncounter->forbidFleeing) {
|
||||||
gBattleStatus.flags2 &= ~BS_FLAGS2_CANT_FLEE;
|
gBattleStatus.flags2 &= ~BS_FLAGS2_CAN_FLEE;
|
||||||
}
|
}
|
||||||
battleStatus->endBattleFadeOutRate = 10;
|
battleStatus->endBattleFadeOutRate = 10;
|
||||||
battleStatus->waitForState = BATTLE_STATE_0;
|
battleStatus->waitForState = BATTLE_STATE_0;
|
||||||
|
@ -3735,7 +3735,7 @@ void btl_state_update_player_menu(void) {
|
|||||||
D_802AD690[entryIdx] = 1;
|
D_802AD690[entryIdx] = 1;
|
||||||
D_802AD658[entryIdx] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_RUN_AWAY];
|
D_802AD658[entryIdx] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_RUN_AWAY];
|
||||||
D_802AD6C0[entryIdx] = MSG_Menus_Action_RunAway;
|
D_802AD6C0[entryIdx] = MSG_Menus_Action_RunAway;
|
||||||
if (!(gBattleStatus.flags2 & BS_FLAGS2_CANT_FLEE)) {
|
if (!(gBattleStatus.flags2 & BS_FLAGS2_CAN_FLEE)) {
|
||||||
D_802AD640[entryIdx] = battle_menu_FleeHudScripts.disabled;
|
D_802AD640[entryIdx] = battle_menu_FleeHudScripts.disabled;
|
||||||
D_802AD690[entryIdx] = 0;
|
D_802AD690[entryIdx] = 0;
|
||||||
D_802AD6A8[entryIdx] = 1;
|
D_802AD6A8[entryIdx] = 1;
|
||||||
|
@ -522,7 +522,7 @@ void update_encounters_neutral(void) {
|
|||||||
currentEncounter->songID = -1;
|
currentEncounter->songID = -1;
|
||||||
currentEncounter->unk_18 = -1;
|
currentEncounter->unk_18 = -1;
|
||||||
currentEncounter->hitType = 0;
|
currentEncounter->hitType = 0;
|
||||||
currentEncounter->allowFleeing = FALSE;
|
currentEncounter->forbidFleeing = FALSE;
|
||||||
currentEncounter->dropWhackaBump = FALSE;
|
currentEncounter->dropWhackaBump = FALSE;
|
||||||
currentEncounter->flags &= ~ENCOUNTER_FLAG_THUMBS_UP;
|
currentEncounter->flags &= ~ENCOUNTER_FLAG_THUMBS_UP;
|
||||||
currentEncounter->flags &= ~ENCOUNTER_FLAG_CANT_SKIP_WIN_DELAY;
|
currentEncounter->flags &= ~ENCOUNTER_FLAG_CANT_SKIP_WIN_DELAY;
|
||||||
|
@ -206,7 +206,7 @@ void start_battle(Evt* script, s32 songID) {
|
|||||||
currentEncounter->curEnemy = enemy;
|
currentEncounter->curEnemy = enemy;
|
||||||
currentEncounter->curEncounter = currentEncounter->encounterList[enemy->encounterIndex];
|
currentEncounter->curEncounter = currentEncounter->encounterList[enemy->encounterIndex];
|
||||||
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
|
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
|
||||||
currentEncounter->allowFleeing = FALSE;
|
currentEncounter->forbidFleeing = FALSE;
|
||||||
currentEncounter->songID = songID;
|
currentEncounter->songID = songID;
|
||||||
currentEncounter->unk_18 = -1;
|
currentEncounter->unk_18 = -1;
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ API_CALLABLE(StartBossBattle) {
|
|||||||
currentEncounter->curEnemy = enemy;
|
currentEncounter->curEnemy = enemy;
|
||||||
currentEncounter->curEncounter = currentEncounter->encounterList[enemy->encounterIndex];
|
currentEncounter->curEncounter = currentEncounter->encounterList[enemy->encounterIndex];
|
||||||
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
|
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
|
||||||
currentEncounter->allowFleeing = TRUE;
|
currentEncounter->forbidFleeing = TRUE;
|
||||||
currentEncounter->songID = songID;
|
currentEncounter->songID = songID;
|
||||||
currentEncounter->unk_18 = -1;
|
currentEncounter->unk_18 = -1;
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ API_CALLABLE(SetBattleMusic) {
|
|||||||
Bytecode songID = evt_get_variable(script, *args++);
|
Bytecode songID = evt_get_variable(script, *args++);
|
||||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||||
|
|
||||||
currentEncounter->allowFleeing = TRUE;
|
currentEncounter->forbidFleeing = TRUE;
|
||||||
currentEncounter->songID = songID;
|
currentEncounter->songID = songID;
|
||||||
currentEncounter->unk_18 = -1;
|
currentEncounter->unk_18 = -1;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
Loading…
Reference in New Issue
Block a user