give batter script command names

This commit is contained in:
DizzyEggg 2017-12-17 20:38:01 +01:00
parent 7517f6a030
commit 54dccc8512
4 changed files with 15 additions and 13 deletions

View File

@ -663,11 +663,13 @@
.byte 0x5d
.endm
.macro gotobattleendscript
@ Goes to address after the trainerbattle command (called by the battle functions, see battle_setup.c)
.macro gotopostbattlescript
.byte 0x5e
.endm
.macro gototrainerscript
@ Goes to address specified in the trainerbattle command (called by the battle functions, see battle_setup.c)
.macro gotobeatenscript
.byte 0x5f
.endm

View File

@ -861,7 +861,7 @@ EventScript_271362:: @ 8271362
goto EventScript_ShowTrainerIntroMsg
EventScript_271389:: @ 8271389
gotobattleendscript
gotopostbattlescript
EventScript_TryDoDoubleTrainerBattle:: @ 827138A
lock
@ -885,14 +885,14 @@ EventScript_NotEnoughMonsForDoubleBattle:: @ 82713BA
end
EventScript_2713C1:: @ 82713C1
gotobattleendscript
gotopostbattlescript
EventScript_2713C2:: @ 82713C2
applymovement VAR_LAST_TALKED, Movement_27143A
waitmovement 0
special SetUpTrainerEncounterMusic
trainerbattlebegin
gotobattleendscript
gotopostbattlescript
EventScript_2713D1:: @ 82713D1
call EventScript_27142F
@ -910,7 +910,7 @@ EventScript_2713D1:: @ 82713D1
end
EventScript_2713F7:: @ 82713F7
gotobattleendscript
gotopostbattlescript
EventScript_TryDoDoubleRematchBattle:: @ 82713F8
specialvar VAR_RESULT, IsTrainerReadyForRematch
@ -930,7 +930,7 @@ EventScript_TryDoDoubleRematchBattle:: @ 82713F8
end
EventScript_271427:: @ 8271427
gotobattleendscript
gotopostbattlescript
EventScript_NotEnoughMonsForDoubleRematchBattle:: @ 8271428
special ShowTrainerCantBattleSpeech
@ -972,7 +972,7 @@ EventScript_DoTrainerBattle:: @ 8271454
goto_eq EventScript_271491
EventScript_271491:: @ 8271491
gototrainerscript
gotobeatenscript
releaseall
end
@ -4094,7 +4094,7 @@ EventScript_TryGetTrainerScript:: @ 82742E6
end
EventScript_GotoTrainerScript:: @ 82742F6
gototrainerscript
gotobeatenscript
releaseall
end

View File

@ -94,8 +94,8 @@ gScriptCmdTable:: @ 81DB67C
.4byte ScrCmd_turnobject
.4byte ScrCmd_trainerbattle
.4byte ScrCmd_dotrainerbattle
.4byte ScrCmd_gotobattleendscript
.4byte ScrCmd_gototrainerscript
.4byte ScrCmd_gotopostbattlescript
.4byte ScrCmd_gotobeatenscript
.4byte ScrCmd_checktrainerflag
.4byte ScrCmd_settrainerflag
.4byte ScrCmd_cleartrainerflag

View File

@ -1979,13 +1979,13 @@ bool8 ScrCmd_dotrainerbattle(struct ScriptContext *ctx)
return TRUE;
}
bool8 ScrCmd_gotobattleendscript(struct ScriptContext *ctx)
bool8 ScrCmd_gotopostbattlescript(struct ScriptContext *ctx)
{
ctx->scriptPtr = BattleSetup_GetScriptAddrAfterBattle();
return FALSE;
}
bool8 ScrCmd_gototrainerscript(struct ScriptContext *ctx)
bool8 ScrCmd_gotobeatenscript(struct ScriptContext *ctx)
{
ctx->scriptPtr = BattleSetup_GetTrainerPostBattleScript();
return FALSE;