Files
pokeplatinum/res/field/scripts/scripts_global_terminal_2f.s
Eduardo Quezada 6ef937a8eb Define and use Var constants (#474)
* 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
2025-04-20 17:38:03 -07:00

217 lines
3.3 KiB
ArmAsm

#include "macros/scrcmd.inc"
#include "res/text/bank/global_terminal_2f.h"
.data
ScriptEntry _0107
ScriptEntry _003A
ScriptEntry _004D
ScriptEntry _0060
ScriptEntry _0073
ScriptEntry _0086
ScriptEntry _0099
ScriptEntry _00AC
ScriptEntry _00BF
ScriptEntry _00D2
ScriptEntry _00E5
ScriptEntry _00F6
ScriptEntry _0109
ScriptEntry _0193
ScriptEntryEnd
_003A:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 0
WaitABXPadPress
CloseMessage
ReleaseAll
End
_004D:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 1
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0060:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 2
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0073:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 3
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0086:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 4
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0099:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 5
WaitABXPadPress
CloseMessage
ReleaseAll
End
_00AC:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 6
WaitABXPadPress
CloseMessage
ReleaseAll
End
_00BF:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 7
WaitABXPadPress
CloseMessage
ReleaseAll
End
_00D2:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 8
WaitABXPadPress
CloseMessage
ReleaseAll
End
_00E5:
PlayFanfare SEQ_SE_CONFIRM
LockAll
Message 9
WaitABXPadPress
CloseMessage
ReleaseAll
End
_00F6:
PlayFanfare SEQ_SE_CONFIRM
LockAll
Message 10
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0107:
End
_0109:
PlayFanfare SEQ_SE_CONFIRM
LockAll
SetVar VAR_0x8005, 6
GoTo _011D
End
_011D:
Message 13
InitLocalTextMenu 31, 11, 0, VAR_RESULT
SetMenuXOriginToRight
AddMenuEntryImm 15, 0
AddMenuEntryImm 16, 1
AddMenuEntryImm 17, 2
ShowMenu
SetVar VAR_0x8008, VAR_RESULT
GoToIfEq VAR_0x8008, 0, _0167
GoToIfEq VAR_0x8008, 1, _0188
GoTo _0161
End
_0161:
CloseMessage
ReleaseAll
End
_0167:
CallCommonScript 0x7D6
SetVar VAR_RESULT, VAR_MAP_LOCAL_0
GoToIfEq VAR_RESULT, 0, _0161
CloseMessage
CallCommonScript 0x802
ReleaseAll
End
_0188:
Message 14
GoTo _011D
End
_0193:
PlayFanfare SEQ_SE_CONFIRM
LockAll
SetVar VAR_0x8005, 5
GoTo _01A7
End
_01A7:
Message 11
InitLocalTextMenu 31, 11, 0, VAR_RESULT
SetMenuXOriginToRight
AddMenuEntryImm 15, 0
AddMenuEntryImm 16, 1
AddMenuEntryImm 17, 2
ShowMenu
SetVar VAR_0x8008, VAR_RESULT
GoToIfEq VAR_0x8008, 0, _01F1
GoToIfEq VAR_0x8008, 1, _0212
GoTo _01EB
End
_01EB:
CloseMessage
ReleaseAll
End
_01F1:
CallCommonScript 0x7D6
SetVar VAR_RESULT, VAR_MAP_LOCAL_0
GoToIfEq VAR_RESULT, 0, _01EB
CloseMessage
CallCommonScript 0x802
ReleaseAll
End
_0212:
Message 12
GoTo _01A7
.byte 2
.byte 0
.byte 0
.byte 0
.byte 0