pokeplatinum/res/field/scripts/scripts_hall_of_origin.s
Rachel 1b03304755 Address PR feedback:
- `resultVar` -> `destVarID`
- Clean up member names for `HiddenLocation` and `DistributionEvent`
- `Set/Clear` -> `Enable/Disable` for HiddenLocation script macros
- `ScrCmd_SetOrClearHiddenLocation` -> `ScrCmd_SetHiddenLocation`
- `SYSTEM_VARS_BLOCK_SIZE` -> `NUM_SYSTEM_VARS`
- Identify `scripts_unk_0412` -> `scripts_init_new_game`
- Add `SCRIPT_ID_OFFSET_INIT_NEW_GAME` constant definition
- Add `SCRIPT_ID` functional macro
- Use `SCRIPT_ID(INIT_NEW_GAME, 0)` in `FieldSystem_InitNewGameState`
- Promote `LCRNG_MULTIPLIER` in `math.c` from private to public
- Use private `LCRNG_INCREMENT` in `system_vars.c` for lottery sync
2025-02-16 12:26:47 -08:00

141 lines
2.1 KiB
ArmAsm

#include "macros/scrcmd.inc"
#include "generated/distribution_events.h"
#include "res/text/bank/hall_of_origin.h"
.data
ScriptEntry _003B
ScriptEntry _0056
ScriptEntry _0012
ScriptEntry _0056
ScriptEntryEnd
_0012:
CheckDistributionEvent DISTRIBUTION_EVENT_ARCEUS, 0x4000
GoToIfEq 0x4000, FALSE, _0035
GoToIfSet 0x11E, _0035
ClearFlag 0x24E
End
_0035:
SetFlag 0x24E
End
_003B:
GoToIfSet 142, _0048
End
_0048:
SetFlag 0x24E
RemoveObject 0
ClearFlag 142
End
_0056:
LockAll
SetVar 0x4118, 0
Call _00E9
Call _0104
ScrCmd_04C 0x1ED, 0
ScrCmd_04D
Call _016F
ScrCmd_04C 0x1ED, 0
Message 0
CloseMessage
SetFlag 142
StartLegendaryBattle SPECIES_ARCEUS, 80
ClearFlag 142
CheckWonBattle 0x800C
GoToIfEq 0x800C, 0, _00DF
CheckDidNotCapture 0x800C
GoToIfEq 0x800C, 1, _00D0
CallIfEq 0x4056, 0, _00C8
SetFlag 0x11E
ReleaseAll
End
_00C8:
SetVar 0x4056, 1
Return
_00D0:
Message 1
WaitABXPadPress
CloseMessage
ClearFlag 0x24E
ReleaseAll
End
_00DF:
ClearFlag 0x24E
BlackOutFromBattle
ReleaseAll
End
_00E9:
ApplyMovement 0xFF, _00F8
WaitMovement
Return
.balign 4, 0
_00F8:
MoveAction_075
MoveAction_065
EndMovement
_0104:
GetPlayerMapPos 0x8004, 0x8005
SetVar 0x8008, 0x8004
GoToIfEq 0x8008, 30, _0139
GoToIfEq 0x8008, 31, _014B
GoToIfEq 0x8008, 32, _015D
_0137:
Return
_0139:
ApplyMovement 0xFF, _017C
WaitMovement
GoTo _0137
End
_014B:
ApplyMovement 0xFF, _018C
WaitMovement
GoTo _0137
End
_015D:
ApplyMovement 0xFF, _0194
WaitMovement
GoTo _0137
End
_016F:
ApplyMovement 0xFF, _01A4
WaitMovement
Return
.balign 4, 0
_017C:
MoveAction_012 4
MoveAction_015
MoveAction_000
EndMovement
.balign 4, 0
_018C:
MoveAction_012 4
EndMovement
.balign 4, 0
_0194:
MoveAction_012 4
MoveAction_014
MoveAction_000
EndMovement
.balign 4, 0
_01A4:
MoveAction_012 2
EndMovement