mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-08-15 13:54:02 -05:00
* Missing uses of defined vars * Vars 0x4000 to 0x402F with Var macros * Vars 0x4000 to 0x402F with other macros ^ Conflicts: ^ res/field/scripts/scripts_amity_square.s ^ res/field/scripts/scripts_veilstone_city_southwest_house.s * Other vars * Special Flags * Unk vars * NUM_VARS * `SPECIAL_VARS_START` -> `SCRIPT_LOCAL_VARS_START` * `VAR_0x800C` -> `VAR_RESULT` * `VAR_0x800D` -> `VAR_LAST_TALKED` * Format * VAR_MAP_LOCAL * VAR_OBJ_GFX_ID * STORY_VARS
89 lines
1.5 KiB
ArmAsm
89 lines
1.5 KiB
ArmAsm
#include "macros/scrcmd.inc"
|
|
#include "res/text/bank/mystery_gift_deliveryman.h"
|
|
|
|
.data
|
|
|
|
ScriptEntry _000A
|
|
ScriptEntry _0035
|
|
ScriptEntryEnd
|
|
|
|
_000A:
|
|
LoadMysteryGift
|
|
CheckAvailableMysteryGift VAR_UNK_0x40ED
|
|
GoToIfEq VAR_UNK_0x40ED, 0, _002B
|
|
ClearFlag FLAG_UNK_0x020A
|
|
UnloadMysteryGift
|
|
End
|
|
|
|
_002B:
|
|
SetFlag FLAG_UNK_0x020A
|
|
UnloadMysteryGift
|
|
End
|
|
|
|
_0035:
|
|
LoadMysteryGift
|
|
PlayFanfare SEQ_SE_CONFIRM
|
|
LockAll
|
|
FacePlayer
|
|
CheckAvailableMysteryGift VAR_RESULT
|
|
GoToIfEq VAR_RESULT, 0, _00EE
|
|
GetTimeOfDay VAR_RESULT
|
|
SetVar VAR_0x8008, VAR_RESULT
|
|
GoToIfEq VAR_0x8008, 0, _007E
|
|
GoToIfEq VAR_0x8008, 1, _008A
|
|
GoTo _0096
|
|
|
|
_007E:
|
|
BufferPlayerName 0
|
|
Message 0
|
|
GoTo _00A2
|
|
|
|
_008A:
|
|
BufferPlayerName 0
|
|
Message 1
|
|
GoTo _00A2
|
|
|
|
_0096:
|
|
BufferPlayerName 0
|
|
Message 2
|
|
GoTo _00A2
|
|
|
|
_00A2:
|
|
CheckCanReceiveMysteryGift VAR_RESULT
|
|
GoToIfEq VAR_RESULT, 0, _00D8
|
|
PlaySound SEQ_FANFA4
|
|
PrepareMysteryGiftReceivedMsg VAR_0x8005, VAR_0x8006
|
|
ScrCmd_1FB VAR_0x8005, VAR_0x8006
|
|
WaitSound
|
|
Message 18
|
|
WaitABXPadPress
|
|
GiveMysteryGift
|
|
GoTo _0103
|
|
|
|
_00D8:
|
|
PrepareMysterGiftCantReceiveMsg VAR_0x8005, VAR_0x8006
|
|
ScrCmd_1FB VAR_0x8005, VAR_0x8006
|
|
WaitABXPadPress
|
|
GoTo _00F9
|
|
|
|
_00EE:
|
|
Message 3
|
|
WaitABXPadPress
|
|
GoTo _00F9
|
|
|
|
_00F9:
|
|
CloseMessage
|
|
ReleaseAll
|
|
UnloadMysteryGift
|
|
End
|
|
|
|
_0103:
|
|
CloseMessage
|
|
ReleaseAll
|
|
UnloadMysteryGift2
|
|
End
|
|
|
|
.byte 0
|
|
.byte 0
|
|
.byte 0
|