Document multiple map scripts commands (#469)
Some checks are pending
build / build (push) Waiting to run

* CheckPartyHasFatefulEncounterRegigigas

* SetPartyGiratinaForm

* WaitCry

* GetUnownFormsSeenCount

* CheckPartyCombeeGenderCount

* GetHour

* Review changes
This commit is contained in:
Eduardo Quezada 2025-04-12 15:30:17 -04:00 committed by GitHub
parent b7470fb1a6
commit 4dc33aeff4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
77 changed files with 203 additions and 216 deletions

View File

@ -19,8 +19,8 @@
#include "generated/sdat.h"
#include "generated/signpost_commands.h"
#include "generated/signpost_types.h"
#include "generated/species.h"
#include "generated/trainers.h"
#include "constants/forms.h"
#include "constants/honey_tree.h"
#include "constants/items.h"
#include "constants/map_object.h"
@ -515,7 +515,7 @@
.short \unused
.endm
.macro ScrCmd_04D
.macro WaitCry
.short 77
.endm
@ -3410,9 +3410,9 @@
.short \form
.endm
.macro ScrCmd_264 arg0
.macro CheckPartyCombeeGenderCount destVar
.short 612
.short \arg0
.short \destVar
.endm
.macro HidePoketch
@ -3428,9 +3428,9 @@
.short \arg0
.endm
.macro ScrCmd_268 arg0
.macro GetHour destVar
.short 616
.short \arg0
.short \destVar
.endm
.macro ScrCmd_269 arg0, arg1, arg2, arg3, arg4
@ -3595,9 +3595,9 @@
.short \arg1
.endm
.macro ScrCmd_284 arg0
.macro GetUnownFormsSeenCount destVar
.short 644
.short \arg0
.short \destVar
.endm
.macro ScrCmd_285 arg0, arg1
@ -4502,9 +4502,9 @@
.short \width
.endm
.macro ScrCmd_328 arg0
.macro SetPartyGiratinaForm form
.short 808
.short \arg0
.short \form
.endm
.macro ScrCmd_329 arg0, arg1, arg2, arg3
@ -4520,9 +4520,9 @@
.short \arg0
.endm
.macro ScrCmd_32B arg0
.macro CheckPartyHasFatefulEncounterRegigigas destVar
.short 811
.short \arg0
.short \destVar
.endm
.macro ScrCmd_32C arg0, arg1, arg2, arg3

View File

@ -16,8 +16,8 @@ BOOL ScrCmd_058(ScriptContext *param0);
BOOL ScrCmd_PlayFanfare(ScriptContext *ctx);
BOOL ScrCmd_04A(ScriptContext *param0);
BOOL ScrCmd_WaitFanfare(ScriptContext *ctx);
BOOL ScrCmd_PlayCry(ScriptContext *param0);
BOOL ScrCmd_04D(ScriptContext *param0);
BOOL ScrCmd_PlayCry(ScriptContext *ctx);
BOOL ScrCmd_WaitCry(ScriptContext *ctx);
BOOL ScrCmd_PlaySound(ScriptContext *ctx);
BOOL ScrCmd_WaitSound(ScriptContext *ctx);
BOOL ScrCmd_059(ScriptContext *param0);

View File

@ -391,7 +391,7 @@ _0524:
_054D:
PlayCry 0x409A
Message 22
ScrCmd_04D
WaitCry
ScrCmd_27C 1, 0x8004
IncrementGameRecord RECORD_UNK_051
CallCommonScript 0x7E0
@ -418,7 +418,7 @@ _0595:
_05BE:
PlayCry 0x409A
Message 22
ScrCmd_04D
WaitCry
ScrCmd_27C 2, 0x8004
IncrementGameRecord RECORD_UNK_051
CallCommonScript 0x7DF
@ -493,7 +493,7 @@ _0704:
End
_070F:
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -650,7 +650,7 @@ _08EB:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_DRIFLOON
Message 29
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -693,7 +693,7 @@ _0943:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 33
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -716,7 +716,7 @@ _0975:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 35
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -695,7 +695,7 @@ _09D1:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 62
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -1255,7 +1255,7 @@ _13AF:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 81
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -45,7 +45,7 @@ _0057:
LockAll
FacePlayer
Message 1
ScrCmd_268 0x800C
GetHour 0x800C
GoToIfLt 0x800C, 4, _0113
GoToIfLt 0x800C, 10, _0093
GoToIfLt 0x800C, 20, _00D3

View File

@ -35,7 +35,7 @@ _0045:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_HAPPINY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -39,7 +39,7 @@ _005D:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -29,7 +29,7 @@ _003A:
Message 8
CloseMessage
PlayFanfare SEQ_SE_PL_SYUWA
ScrCmd_328 0
SetPartyGiratinaForm GIRATINA_FORM_ALTERED
FadeScreen 6, 1, 0, 0
WaitFadeScreen
Warp MAP_HEADER_SPEAR_PILLAR_DISTORTED, 0, 31, 33, 1

View File

@ -32,7 +32,7 @@ _004B:
PlayCry SPECIES_MESPRIT
Message 1
CloseMessage
ScrCmd_04D
WaitCry
ScrCmd_311 129
ApplyMovement LOCALID_PLAYER, _0090
ApplyMovement 129, _00D8

View File

@ -59,7 +59,7 @@ _0093:
PlayCry SPECIES_MESPRIT
Message 0
CloseMessage
ScrCmd_04D
WaitCry
ApplyMovement 131, _0130
WaitMovement
ScrCmd_312 131
@ -71,7 +71,7 @@ _00B4:
PlayCry SPECIES_UXIE
Message 1
CloseMessage
ScrCmd_04D
WaitCry
ApplyMovement 132, _0130
WaitMovement
ScrCmd_312 132
@ -83,7 +83,7 @@ _00D5:
PlayCry SPECIES_AZELF
Message 2
CloseMessage
ScrCmd_04D
WaitCry
ApplyMovement 133, _0130
WaitMovement
ScrCmd_312 133

View File

@ -65,7 +65,7 @@ _00C4:
LockAll
PlayCry SPECIES_GIRATINA
Message 2
ScrCmd_04D
WaitCry
CloseMessage
SetFlag FLAG_UNK_0x008E
StartGiratinaOriginBattle SPECIES_GIRATINA, 47
@ -155,7 +155,7 @@ _021D:
LockAll
PlayCry SPECIES_GIRATINA
Message 0
ScrCmd_04D
WaitCry
WaitABPadPress
CloseMessage
ReleaseAll

View File

@ -26,7 +26,7 @@ _002E:
Message 1
CloseMessage
PlayFanfare SEQ_SE_PL_SYUWA
ScrCmd_328 0
SetPartyGiratinaForm GIRATINA_FORM_ALTERED
FadeScreen 6, 1, 0, 0
WaitFadeScreen
Warp MAP_HEADER_TURNBACK_CAVE_GIRATINA_ROOM, 0, 11, 15, 1

View File

@ -50,7 +50,7 @@ _005E:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_BUNEARY
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -36,7 +36,7 @@ _0038:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_TORCHIC
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -67,7 +67,7 @@ _00A9:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 5
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -37,7 +37,7 @@ _0056:
Call _00E9
Call _0104
PlayCry SPECIES_ARCEUS
ScrCmd_04D
WaitCry
Call _016F
PlayCry SPECIES_ARCEUS
Message 0

View File

@ -127,7 +127,7 @@ _011C:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 22
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -594,13 +594,13 @@ _0820:
ApplyMovement 31, _0884
WaitMovement
PlayCry SPECIES_BUNEARY
ScrCmd_04D
WaitCry
ApplyMovement 32, _0894
WaitMovement
Message 0
Message 1
PlayCry SPECIES_BUNEARY
ScrCmd_04D
WaitCry
RemoveObject 31
Message 2
CloseMessage

View File

@ -100,7 +100,7 @@ _00BC:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 8
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -124,7 +124,7 @@ _0155:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PSYDUCK
Message 11
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -137,7 +137,7 @@ _0174:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_BUNEARY
Message 12
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -150,7 +150,7 @@ _0193:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 13
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -46,7 +46,7 @@ _004B:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_SHROOMISH
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -44,7 +44,7 @@ _006E:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -46,7 +46,7 @@ _0057:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -29,7 +29,7 @@ _003D:
GoToIfEq 0x406A, 0x122, _00ED
GoToIfEq 0x406A, 0x118, _00F8
GoToIfUnset FLAG_GAME_COMPLETED, _010F
ScrCmd_32B 0x800C
CheckPartyHasFatefulEncounterRegigigas 0x800C
GoToIfEq 0x800C, 0, _011A
GoToIfEq 0x406A, 0x10E, _00AE
GoToIfLt 0x406A, 0x104, _011A
@ -43,7 +43,7 @@ _003D:
_00AE:
PlayCry SPECIES_REGICE
Message 2
ScrCmd_04D
WaitCry
CloseMessage
StartLegendaryBattle SPECIES_REGICE, 30
CheckWonBattle 0x800C

View File

@ -9,7 +9,7 @@
ScriptEntryEnd
_0012:
ScrCmd_32B 0x4004
CheckPartyHasFatefulEncounterRegigigas 0x4004
GoToIfEq 0x4004, 0, _0061
GoToIfEq 0x4004, 1, _006B
End
@ -17,7 +17,7 @@ _0012:
_0032:
InitPersistedMapFeaturesForPlatformLift
CallIfNe 0x4069, 0x122, _0079
ScrCmd_32B 0x4004
CheckPartyHasFatefulEncounterRegigigas 0x4004
GoToIfEq 0x4004, 0, _0061
GoToIfEq 0x4004, 1, _006B
End

View File

@ -29,7 +29,7 @@ _003D:
GoToIfEq 0x4069, 0x122, _00ED
GoToIfEq 0x4069, 0x118, _00F8
GoToIfUnset FLAG_GAME_COMPLETED, _010F
ScrCmd_32B 0x800C
CheckPartyHasFatefulEncounterRegigigas 0x800C
GoToIfEq 0x800C, 0, _011A
GoToIfEq 0x4069, 0x10E, _00AE
GoToIfLt 0x4069, 0x104, _011A
@ -43,7 +43,7 @@ _003D:
_00AE:
PlayCry SPECIES_REGISTEEL
Message 2
ScrCmd_04D
WaitCry
CloseMessage
StartLegendaryBattle SPECIES_REGISTEEL, 30
CheckWonBattle 0x800C

View File

@ -26,7 +26,7 @@ _0025:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 1
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -39,7 +39,7 @@ _0044:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -35,7 +35,7 @@ _0034:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -25,7 +25,7 @@ _0021:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 1
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -46,7 +46,7 @@ _004B:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MAGIKARP, 11
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -82,7 +82,7 @@ _006F:
Message 4
PlayCry SPECIES_MESPRIT
Message 5
ScrCmd_04D
WaitCry
CloseMessage
ApplyMovement 5, _02C0
ApplyMovement LOCALID_PLAYER, _0388

View File

@ -9,7 +9,7 @@
_000E:
CallIfNe 0x406A, 0x122, _003B
ScrCmd_32B 0x4001
CheckPartyHasFatefulEncounterRegigigas 0x4001
GoToIfEq 0x4001, 0, _0063
GoToIfEq 0x4001, 1, _006D
End
@ -19,7 +19,7 @@ _003B:
Return
_0043:
ScrCmd_32B 0x4001
CheckPartyHasFatefulEncounterRegigigas 0x4001
GoToIfEq 0x4001, 0, _0063
GoToIfEq 0x4001, 1, _006D
End

View File

@ -20,7 +20,7 @@ _0006:
Message 2
CloseMessage
PlayCry SPECIES_ROTOM
ScrCmd_04D
WaitCry
SetFlag FLAG_UNK_0x0AB0
StartWildBattle SPECIES_ROTOM, 20
CheckWonBattle 0x800C

View File

@ -589,7 +589,7 @@ _0703:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MACHOP
Message 24
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -612,7 +612,7 @@ _0735:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MACHOP
Message 25
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -625,7 +625,7 @@ _0754:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MACHOP
Message 26
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -65,7 +65,7 @@ _0097:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PSYDUCK
Message 4
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -44,7 +44,7 @@ _006E:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PSYDUCK
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -35,7 +35,7 @@ _0034:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -162,7 +162,7 @@ _00FC:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MACHOP
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -175,7 +175,7 @@ _011B:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MACHOP
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -188,7 +188,7 @@ _013A:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_MACHOP
Message 4
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -176,7 +176,7 @@ _01E5:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 36
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -1145,7 +1145,7 @@ _0C22:
ApplyMovement 28, _0C64
WaitMovement
PlayCry SPECIES_CROAGUNK
ScrCmd_04D
WaitCry
WaitTime 30, 0x800C
ApplyMovement 28, _0C70
WaitMovement

View File

@ -29,7 +29,7 @@ _001D:
End
_004A:
ScrCmd_264 0x800C
CheckPartyCombeeGenderCount 0x800C
GoToIfEq 0x800C, 0, _009C
GoToIfEq 0x800C, 1, _00A7
Message 4

View File

@ -25,7 +25,7 @@ _0021:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PSYDUCK
Message 1
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -197,7 +197,7 @@ _031F:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 12
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -13,7 +13,7 @@
ScriptEntryEnd
_001E:
ScrCmd_268 0x4000
GetHour 0x4000
GoToIfEq 0x4000, 0, _004F
GoToIfEq 0x4000, 1, _004F
GoToIfLe 0x4000, 5, _005B

View File

@ -36,7 +36,7 @@ _0038:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -49,7 +49,7 @@ _0057:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -210,7 +210,7 @@ _02BA:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_SKITTY
Message 18
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -223,7 +223,7 @@ _02D9:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PSYDUCK
Message 19
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -29,7 +29,7 @@
_0058:
SetFlag FLAG_UNK_0x09EE
ScrCmd_268 0x4000
GetHour 0x4000
GoToIfLt 0x4000, 9, _0087
GoToIfGe 0x4000, 23, _0087
GoToIfUnset FLAG_UNK_0x0AAB, _00B3

View File

@ -29,7 +29,7 @@ _003D:
GoToIfEq 0x406B, 0x122, _00ED
GoToIfEq 0x406B, 0x118, _00F8
GoToIfUnset FLAG_GAME_COMPLETED, _010F
ScrCmd_32B 0x800C
CheckPartyHasFatefulEncounterRegigigas 0x800C
GoToIfEq 0x800C, 0, _011A
GoToIfEq 0x406B, 0x10E, _00AE
GoToIfLt 0x406B, 0x104, _011A
@ -43,7 +43,7 @@ _003D:
_00AE:
PlayCry SPECIES_REGIROCK
Message 2
ScrCmd_04D
WaitCry
CloseMessage
StartLegendaryBattle SPECIES_REGIROCK, 30
CheckWonBattle 0x800C

View File

@ -1,6 +1,5 @@
#include "macros/scrcmd.inc"
#include "generated/distribution_events.h"
#include "constants/forms.h"
#include "constants/moves.h"
#include "res/text/bank/rotoms_room.h"

View File

@ -35,7 +35,7 @@ _0034:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -83,7 +83,7 @@ _014D:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_SPIRITOMB
Message 9
ScrCmd_04D
WaitCry
CloseMessage
StartWildBattle SPECIES_SPIRITOMB, 25
CheckWonBattle 0x800C

View File

@ -61,7 +61,7 @@ _00CA:
Message 2
CloseMessage
PlayCry SPECIES_PSYDUCK
ScrCmd_04D
WaitCry
ApplyMovement 27, _024C
ApplyMovement 28, _024C
ApplyMovement 26, _024C

View File

@ -9,7 +9,7 @@
ScriptEntryEnd
_0012:
ScrCmd_284 0x4000
GetUnownFormsSeenCount 0x4000
GoToIfGe 0x4000, 26, _003F
GoToIfGe 0x4000, 10, _0051
GoToIfLt 0x4000, 10, _0063
@ -31,7 +31,7 @@ _0063:
End
_0075:
ScrCmd_284 0x4000
GetUnownFormsSeenCount 0x4000
GoToIfGe 0x4000, 26, _003F
GoToIfGe 0x4000, 10, _0051
GoToIfLt 0x4000, 10, _0063

View File

@ -28,7 +28,7 @@ _0068:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
ScrCmd_284 0x4000
GetUnownFormsSeenCount 0x4000
GoToIfGe 0x4000, 26, _008C
Message 1
WaitABXPadPress

View File

@ -44,7 +44,7 @@ _006E:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 1
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -56,7 +56,7 @@ _008B:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -68,7 +68,7 @@ _00A8:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -23,7 +23,7 @@ _0024:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 0
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -36,7 +36,7 @@ _0043:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 1
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -49,7 +49,7 @@ _0062:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -62,7 +62,7 @@ _0081:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 3
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -75,7 +75,7 @@ _00A0:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PIKACHU
Message 4
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -194,7 +194,7 @@ _02B8:
ApplyMovement 16, _0440
WaitMovement
PlayCry SPECIES_SHAYMIN
ScrCmd_04D
WaitCry
CallIfEq 0x4057, 2, _02AE
ApplyMovement 3, _038C
ApplyMovement 16, _03B0
@ -205,7 +205,7 @@ _02B8:
SetFlag FLAG_UNK_0x025C
RemoveObject 16
PlayCry SPECIES_SHAYMIN
ScrCmd_04D
WaitCry
ApplyMovement 3, _03C0
WaitMovement
Return

View File

@ -10,7 +10,7 @@
_0012:
CallIfNe 0x406B, 0x122, _003F
ScrCmd_32B 0x4001
CheckPartyHasFatefulEncounterRegigigas 0x4001
GoToIfEq 0x4001, 0, _0067
GoToIfEq 0x4001, 1, _0071
End
@ -20,7 +20,7 @@ _003F:
Return
_0047:
ScrCmd_32B 0x4001
CheckPartyHasFatefulEncounterRegigigas 0x4001
GoToIfEq 0x4001, 0, _0067
GoToIfEq 0x4001, 1, _0071
End

View File

@ -15,7 +15,7 @@ _0010:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
ScrCmd_284 0x800C
GetUnownFormsSeenCount 0x800C
GoToIfGe 0x800C, 26, _0034
Message 0
WaitABXPadPress

View File

@ -15,7 +15,7 @@ _0010:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
ScrCmd_284 0x800C
GetUnownFormsSeenCount 0x800C
GoToIfGe 0x800C, 10, _0034
Message 0
WaitABXPadPress

View File

@ -18,7 +18,7 @@ _001B:
_0021:
LockAll
ScrCmd_328 0
SetPartyGiratinaForm GIRATINA_FORM_ALTERED
ScrCmd_2B5 0x10A, 0x2FA, 0x2CA
Message 0
CloseMessage

View File

@ -42,7 +42,7 @@ _0048:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PSYDUCK
Message 4
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -46,7 +46,7 @@ _0081:
Message 2
CloseMessage
PlayCry SPECIES_REGIGIGAS
ScrCmd_04D
WaitCry
SetFlag FLAG_UNK_0x008E
StartLegendaryBattle SPECIES_REGIGIGAS, 1
ClearFlag FLAG_UNK_0x008E

View File

@ -39,7 +39,7 @@ _0077:
GoToIfEq 0x800C, MENU_NO, _0101
PlayCry SPECIES_DIALGA
Message 1
ScrCmd_04D
WaitCry
CloseMessage
StartLegendaryBattle SPECIES_DIALGA, 70
CheckWonBattle 0x800C

View File

@ -68,7 +68,7 @@ _00FD:
WaitFadeScreen
ScrCmd_320
ReturnToField
ScrCmd_328 1
SetPartyGiratinaForm GIRATINA_FORM_ORIGIN
Warp MAP_HEADER_DISTORTION_WORLD_1F, 0, 55, 40, 1
FadeScreen 6, 1, 1, 0
WaitFadeScreen

View File

@ -39,7 +39,7 @@ _0077:
GoToIfEq 0x800C, MENU_NO, _0101
PlayCry SPECIES_PALKIA
Message 1
ScrCmd_04D
WaitCry
CloseMessage
StartLegendaryBattle SPECIES_PALKIA, 70
CheckWonBattle 0x800C

View File

@ -196,7 +196,7 @@ _019C:
Message 2
Message 3
PlayCry SPECIES_CROAGUNK
ScrCmd_04D
WaitCry
CloseMessage
ClearFlag FLAG_UNK_0x0232
AddObject 0

View File

@ -168,7 +168,7 @@ _0198:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_CLEFAIRY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll
@ -181,7 +181,7 @@ _01B7:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_BUNEARY
Message 5
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -112,7 +112,7 @@ _0149:
Message 3
CloseMessage
PlayFanfare SEQ_SE_PL_SYUWA
ScrCmd_328 1
SetPartyGiratinaForm GIRATINA_FORM_ORIGIN
FadeScreen 6, 1, 0, 0
WaitFadeScreen
Warp MAP_HEADER_DISTORTION_WORLD_TURNBACK_CAVE_ROOM, 0, 116, 75, 1

View File

@ -41,7 +41,7 @@ _0054:
Message 2
ScrCmd_28E 0x800C
PlayCry SPECIES_CHATOT
ScrCmd_04D
WaitCry
GoTo _00B2
End

View File

@ -158,7 +158,7 @@ _01DE:
_025F:
PlayCry 0x8001
Message 17
ScrCmd_04D
WaitCry
GoTo _029F
_0270:
@ -166,7 +166,7 @@ _0270:
Message 36
WaitABXPadPress
CloseMessage
ScrCmd_04D
WaitCry
HideMoney
ReleaseAll
End
@ -294,7 +294,7 @@ _03FE:
PlayCry 0x8002
BufferPlayerName 1
Message 30
ScrCmd_04D
WaitCry
GetDaycareState 0x800C
GoToIfEq 0x800C, DAYCARE_ONE_MON, _0444
GoTo _0292

View File

@ -141,7 +141,7 @@ _01BF:
PlayCry SPECIES_DRIFLOON
Message 8
CloseMessage
ScrCmd_04D
WaitCry
SetFlag FLAG_UNK_0x008E
StartLegendaryBattle SPECIES_DRIFLOON, 15
ClearFlag FLAG_UNK_0x008E

View File

@ -1,6 +1,5 @@
#include "macros/scrcmd.inc"
#include "res/text/bank/veilstone_city.h"
#include "constants/forms.h"
.data
@ -1440,7 +1439,7 @@ VeilstoneCity_DeoxysMeteoriteSpeed:
PlayCry SPECIES_DEOXYS
Message VeilstoneCity_Text_MeteoriteSpeed
WaitABXPadPress
ScrCmd_04D
WaitCry
CloseMessage
ReleaseAll
End
@ -1454,7 +1453,7 @@ VeilstoneCity_DeoxysMeteoriteDefense:
PlayCry SPECIES_DEOXYS
Message VeilstoneCity_Text_MeteoriteDefense
WaitABXPadPress
ScrCmd_04D
WaitCry
CloseMessage
ReleaseAll
End
@ -1468,7 +1467,7 @@ VeilstoneCity_DeoxysMeteoriteAttack:
PlayCry SPECIES_DEOXYS
Message VeilstoneCity_Text_MeteoriteAttack
WaitABXPadPress
ScrCmd_04D
WaitCry
CloseMessage
ReleaseAll
End
@ -1482,7 +1481,7 @@ VeilstoneCity_DeoxysMeteoriteNormal:
PlayCry SPECIES_DEOXYS
Message VeilstoneCity_Text_MeteoriteNormal
WaitABXPadPress
ScrCmd_04D
WaitCry
CloseMessage
ReleaseAll
End

View File

@ -35,7 +35,7 @@ _0034:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_BUNEARY
Message 2
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -92,7 +92,7 @@ _0114:
WaitFanfare SEQ_SE_CONFIRM
PlayCry SPECIES_PACHIRISU
Message 10
ScrCmd_04D
WaitCry
WaitABXPadPress
CloseMessage
ReleaseAll

View File

@ -639,11 +639,11 @@ static BOOL ScrCmd_25F(ScriptContext *ctx);
static BOOL ScrCmd_260(ScriptContext *ctx);
static BOOL ScrCmd_CheckPartyHasSpecies2(ScriptContext *ctx);
static BOOL ScrCmd_ChangeDeoxysForm(ScriptContext *ctx);
static BOOL ScrCmd_264(ScriptContext *ctx);
static BOOL ScrCmd_CheckPartyCombeeGenderCount(ScriptContext *ctx);
static BOOL ScrCmd_HidePoketch(ScriptContext *ctx);
static BOOL ScrCmd_ShowPoketch(ScriptContext *ctx);
static BOOL ScrCmd_267(ScriptContext *ctx);
static BOOL ScrCmd_268(ScriptContext *ctx);
static BOOL ScrCmd_GetHour(ScriptContext *ctx);
static BOOL ScrCmd_269(ScriptContext *ctx);
static BOOL ScrCmd_26A(ScriptContext *ctx);
static BOOL ScrCmd_26B(ScriptContext *ctx);
@ -660,7 +660,7 @@ static BOOL ScrCmd_27D(ScriptContext *ctx);
static BOOL ScrCmd_CheckIsDepartmentStoreRegular(ScriptContext *ctx);
static BOOL ScrCmd_27F(ScriptContext *ctx);
static BOOL ScrCmd_282(ScriptContext *ctx);
static BOOL ScrCmd_284(ScriptContext *ctx);
static BOOL ScrCmd_GetUnownFormsSeenCount(ScriptContext *ctx);
static BOOL ScrCmd_285(ScriptContext *ctx);
static BOOL ScrCmd_GetUndergroundItemsGivenAway(ScriptContext *ctx);
static BOOL ScrCmd_GetUndergroundFossilsUnearthed(ScriptContext *ctx);
@ -737,8 +737,8 @@ static BOOL ScrCmd_320(ScriptContext *ctx);
static BOOL ScrCmd_321(ScriptContext *ctx);
static BOOL ScrCmd_322(ScriptContext *ctx);
static BOOL ScrCmd_323(ScriptContext *ctx);
static BOOL ScrCmd_328(ScriptContext *ctx);
static BOOL ScrCmd_32B(ScriptContext *ctx);
static BOOL ScrCmd_SetPartyGiratinaForm(ScriptContext *ctx);
static BOOL ScrCmd_CheckPartyHasFatefulEncounterRegigigas(ScriptContext *ctx);
static BOOL sub_02040F0C(ScriptContext *ctx);
static void sub_02040F28(FieldSystem *fieldSystem, SysTask *param1, MapObjectAnimCmd *param2);
static void sub_02040F5C(SysTask *param0, void *param1);
@ -842,7 +842,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_04A,
ScrCmd_WaitFanfare,
ScrCmd_PlayCry,
ScrCmd_04D,
ScrCmd_WaitCry,
ScrCmd_PlaySound,
ScrCmd_WaitSound,
ScrCmd_PlayMusic,
@ -1377,11 +1377,11 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_261,
ScrCmd_CheckPartyHasSpecies2,
ScrCmd_ChangeDeoxysForm,
ScrCmd_264,
ScrCmd_CheckPartyCombeeGenderCount,
ScrCmd_HidePoketch,
ScrCmd_ShowPoketch,
ScrCmd_267,
ScrCmd_268,
ScrCmd_GetHour,
ScrCmd_269,
ScrCmd_26A,
ScrCmd_26B,
@ -1409,7 +1409,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_281,
ScrCmd_282,
ScrCmd_283,
ScrCmd_284,
ScrCmd_GetUnownFormsSeenCount,
ScrCmd_285,
ScrCmd_GetUndergroundItemsGivenAway,
ScrCmd_GetUndergroundFossilsUnearthed,
@ -1573,10 +1573,10 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_325,
ScrCmd_326,
ScrCmd_ShowListMenuSetWidth,
ScrCmd_328,
ScrCmd_SetPartyGiratinaForm,
ScrCmd_329,
ScrCmd_32A,
ScrCmd_32B,
ScrCmd_CheckPartyHasFatefulEncounterRegigigas,
ScrCmd_32C,
ScrCmd_32D,
ScrCmd_32E,
@ -6823,43 +6823,43 @@ static BOOL ScrCmd_ChangeDeoxysForm(ScriptContext *ctx)
return TRUE;
}
static BOOL ScrCmd_264(ScriptContext *ctx)
static BOOL ScrCmd_CheckPartyCombeeGenderCount(ScriptContext *ctx)
{
Pokemon *v0;
int v1, v2, v3, v4, v5, v6;
u16 *v7 = ScriptContext_GetVarPointer(ctx);
Party *v8 = SaveData_GetParty(ctx->fieldSystem->saveData);
int v9 = Party_GetCurrentCount(v8);
Pokemon *mon;
int i, species, hasMale, hasFemale, isEgg, gender;
u16 *destVar = ScriptContext_GetVarPointer(ctx);
Party *party = SaveData_GetParty(ctx->fieldSystem->saveData);
int partyCount = Party_GetCurrentCount(party);
v3 = 0;
v4 = 0;
hasMale = 0;
hasFemale = 0;
for (v1 = 0; v1 < v9; v1++) {
v0 = Party_GetPokemonBySlotIndex(v8, v1);
v2 = Pokemon_GetValue(v0, MON_DATA_SPECIES, NULL);
v6 = Pokemon_GetValue(v0, MON_DATA_GENDER, NULL);
v5 = Pokemon_GetValue(v0, MON_DATA_IS_EGG, NULL);
for (i = 0; i < partyCount; i++) {
mon = Party_GetPokemonBySlotIndex(party, i);
species = Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL);
gender = Pokemon_GetValue(mon, MON_DATA_GENDER, NULL);
isEgg = Pokemon_GetValue(mon, MON_DATA_IS_EGG, NULL);
if ((v2 == SPECIES_COMBEE) && (v5 == 0)) {
if (v6 == 0) {
v3 = 1;
if (species == SPECIES_COMBEE && isEgg == FALSE) {
if (gender == GENDER_MALE) {
hasMale = TRUE;
}
if (v6 == 1) {
v4 = 1;
if (gender == GENDER_FEMALE) {
hasFemale = TRUE;
}
}
}
if ((v3 == 1) && (v4 == 1)) {
*v7 = 2;
} else if ((v3 == 0) && (v4 == 0)) {
*v7 = 0;
if (hasMale == TRUE && hasFemale == TRUE) {
*destVar = 2;
} else if ((hasMale == FALSE) && (hasFemale == FALSE)) {
*destVar = 0;
} else {
*v7 = 1;
*destVar = 1;
}
return 1;
return TRUE;
}
static BOOL ScrCmd_HidePoketch(ScriptContext *ctx)
@ -6884,12 +6884,12 @@ static BOOL ScrCmd_267(ScriptContext *ctx)
return 1;
}
static BOOL ScrCmd_268(ScriptContext *ctx)
static BOOL ScrCmd_GetHour(ScriptContext *ctx)
{
u16 *v0 = ScriptContext_GetVarPointer(ctx);
u16 *destVar = ScriptContext_GetVarPointer(ctx);
*v0 = FieldSystem_GetHour(ctx->fieldSystem);
return 0;
*destVar = FieldSystem_GetHour(ctx->fieldSystem);
return FALSE;
}
static BOOL ScrCmd_269(ScriptContext *ctx)
@ -7142,13 +7142,13 @@ static BOOL ScrCmd_282(ScriptContext *ctx)
return 0;
}
static BOOL ScrCmd_284(ScriptContext *ctx)
static BOOL ScrCmd_GetUnownFormsSeenCount(ScriptContext *ctx)
{
const Pokedex *v0 = SaveData_GetPokedex(ctx->fieldSystem->saveData);
u16 *v1 = ScriptContext_GetVarPointer(ctx);
const Pokedex *pokedex = SaveData_GetPokedex(ctx->fieldSystem->saveData);
u16 *destVar = ScriptContext_GetVarPointer(ctx);
*v1 = Pokedex_NumFormsSeen_Unown(v0);
return 0;
*destVar = Pokedex_NumFormsSeen_Unown(pokedex);
return FALSE;
}
static BOOL ScrCmd_285(ScriptContext *ctx)
@ -8191,57 +8191,53 @@ static BOOL ScrCmd_323(ScriptContext *ctx)
return 0;
}
static BOOL ScrCmd_328(ScriptContext *ctx)
static BOOL ScrCmd_SetPartyGiratinaForm(ScriptContext *ctx)
{
FieldSystem *fieldSystem = ctx->fieldSystem;
Party *v1;
u16 v2 = ScriptContext_GetVar(ctx);
u16 form = ScriptContext_GetVar(ctx);
Party *party = SaveData_GetParty(ctx->fieldSystem->saveData);
v1 = SaveData_GetParty(ctx->fieldSystem->saveData);
Party_SetGiratinaForm(v1, v2);
{
int v3, v4;
Pokemon *v5;
Party_SetGiratinaForm(party, form);
v4 = Party_GetCurrentCount(v1);
int partyCount = Party_GetCurrentCount(party);
for (v3 = 0; v3 < v4; v3++) {
v5 = Party_GetPokemonBySlotIndex(v1, v3);
for (int i = 0; i < partyCount; i++) {
Pokemon *mon = Party_GetPokemonBySlotIndex(party, i);
if ((Pokemon_GetValue(v5, MON_DATA_IS_EGG, NULL) == 0) && (Pokemon_GetValue(v5, MON_DATA_SPECIES, NULL) == SPECIES_GIRATINA)) {
Pokedex_Capture(SaveData_GetPokedex(fieldSystem->saveData), v5);
}
if (Pokemon_GetValue(mon, MON_DATA_IS_EGG, NULL) == FALSE
&& Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL) == SPECIES_GIRATINA) {
Pokedex_Capture(SaveData_GetPokedex(fieldSystem->saveData), mon);
}
}
return 0;
return FALSE;
}
static BOOL ScrCmd_32B(ScriptContext *ctx)
static BOOL ScrCmd_CheckPartyHasFatefulEncounterRegigigas(ScriptContext *ctx)
{
u32 v0, v1;
int v2, v3;
Pokemon *v4;
u16 *v5 = ScriptContext_GetVarPointer(ctx);
u32 species, fatefulEncounter;
int partyCount, i;
Pokemon *mon;
u16 *destVar = ScriptContext_GetVarPointer(ctx);
*v5 = 0;
v2 = Party_GetCurrentCount(SaveData_GetParty(ctx->fieldSystem->saveData));
*destVar = FALSE;
partyCount = Party_GetCurrentCount(SaveData_GetParty(ctx->fieldSystem->saveData));
for (v3 = 0; v3 < v2; v3++) {
v4 = Party_GetPokemonBySlotIndex(SaveData_GetParty(ctx->fieldSystem->saveData), v3);
for (i = 0; i < partyCount; i++) {
mon = Party_GetPokemonBySlotIndex(SaveData_GetParty(ctx->fieldSystem->saveData), i);
if (Pokemon_GetValue(v4, MON_DATA_IS_EGG, NULL) == 0) {
v0 = Pokemon_GetValue(v4, MON_DATA_SPECIES, NULL);
if (Pokemon_GetValue(mon, MON_DATA_IS_EGG, NULL) == FALSE) {
species = Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL);
if (v0 == SPECIES_REGIGIGAS) {
v1 = Pokemon_GetValue(v4, MON_DATA_FATEFUL_ENCOUNTER, NULL);
if (species == SPECIES_REGIGIGAS) {
fatefulEncounter = Pokemon_GetValue(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL);
if (v1 == 1) {
*v5 = 1;
return 0;
if (fatefulEncounter == TRUE) {
*destVar = TRUE;
return FALSE;
}
}
}
}
return 0;
return FALSE;
}

View File

@ -35,7 +35,6 @@ static void Sound_Impl_ResetBGM(void);
void Sound_StopAll(void);
static void Sound_Impl_SetPokemonCryVolume(u16 param0, enum SoundHandleType param1, int param2);
void Sound_StopPokemonCries(int param0);
BOOL Sound_IsPokemonCryPlaying(void);
void Sound_SetPokemonCryDuration(int param0, int heapID);
static void Sound_Impl_CryDurationTask(SysTask *param0, void *param1);
void Sound_Impl_DestroyCryDurationTask(void);

View File

@ -14,7 +14,7 @@
static BOOL ScriptContext_IsSoundFadeFinished(ScriptContext *ctx);
static BOOL ScriptContext_IsFanfareFinished(ScriptContext *ctx);
static BOOL sub_020484B0(ScriptContext *param0);
static BOOL ScrCmd_IsPokemonCryPlaying(ScriptContext *param0);
static BOOL ScriptContext_IsSoundFinished(ScriptContext *ctx);
BOOL ScrCmd_053(ScriptContext *param0);
BOOL ScrCmd_FadeOutMusic(ScriptContext *ctx);
@ -24,8 +24,6 @@ BOOL ScrCmd_056(ScriptContext *param0);
BOOL ScrCmd_057(ScriptContext *param0);
BOOL ScrCmd_058(ScriptContext *param0);
BOOL ScrCmd_04A(ScriptContext *param0);
BOOL ScrCmd_PlayCry(ScriptContext *ctx);
BOOL ScrCmd_04D(ScriptContext *param0);
BOOL ScrCmd_059(ScriptContext *param0);
BOOL ScrCmd_05A(ScriptContext *param0);
BOOL ScrCmd_05B(ScriptContext *param0);
@ -153,19 +151,15 @@ BOOL ScrCmd_PlayCry(ScriptContext *ctx)
return FALSE;
}
BOOL ScrCmd_04D(ScriptContext *param0)
BOOL ScrCmd_WaitCry(ScriptContext *ctx)
{
ScriptContext_Pause(param0, sub_020484B0);
return 1;
ScriptContext_Pause(ctx, ScrCmd_IsPokemonCryPlaying);
return TRUE;
}
static BOOL sub_020484B0(ScriptContext *param0)
static BOOL ScrCmd_IsPokemonCryPlaying(ScriptContext *ctx)
{
if (Sound_IsPokemonCryPlaying() == 0) {
return 1;
}
return 0;
return Sound_IsPokemonCryPlaying() == FALSE;
}
BOOL ScrCmd_PlaySound(ScriptContext *ctx)