Skip to content

Commit

Permalink
Document reminder of scrcmd_system_flags.c and associated script comm…
Browse files Browse the repository at this point in the history
…and usages
  • Loading branch information
lhearachel committed Nov 4, 2024
1 parent 5aa97bc commit 604bab4
Show file tree
Hide file tree
Showing 38 changed files with 141 additions and 155 deletions.
22 changes: 11 additions & 11 deletions asm/macros/scrcmd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1840,38 +1840,38 @@
.short \arg0
.endm

.macro ScrCmd_157 arg0
.macro CheckPokedexAcquired destVarID
.short 343
.short \arg0
.short \destVarID
.endm

.macro ScrCmd_158
.macro GivePokedex
.short 344
.endm

.macro ScrCmd_159 arg0
.macro CheckRunningShoesAcquired destVarID
.short 345
.short \arg0
.short \destVarID
.endm

.macro ScrCmd_15A
.macro GiveRunningShoes
.short 346
.endm

.macro CheckBadge badgeID, destVarID
.macro CheckBadgeAcquired badgeID, destVarID
.short 347
.short \badgeID
.short \destVarID
.endm

.macro ScrCmd_15C arg0
.macro GiveBadge badgeID
.short 348
.short \arg0
.short \badgeID
.endm

.macro ScrCmd_15D arg0
.macro CountBadgesAcquired destVarID
.short 349
.short \arg0
.short \destVarID
.endm

.macro CheckBagAcquired destVarID
Expand Down
20 changes: 10 additions & 10 deletions include/unk_0204E3CC.h → include/scrcmd_system_flags.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#ifndef POKEPLATINUM_UNK_0204E3CC_H
#define POKEPLATINUM_UNK_0204E3CC_H
#ifndef POKEPLATINUM_SCRCMD_SYSTEM_FLAGS_H
#define POKEPLATINUM_SCRCMD_SYSTEM_FLAGS_H

#include "field_script_context.h"

BOOL ScrCmd_157(ScriptContext *param0);
BOOL ScrCmd_158(ScriptContext *param0);
BOOL ScrCmd_159(ScriptContext *param0);
BOOL ScrCmd_15A(ScriptContext *param0);
BOOL ScrCmd_CheckBadge(ScriptContext *ctx);
BOOL ScrCmd_15C(ScriptContext *param0);
BOOL ScrCmd_15D(ScriptContext *param0);
BOOL ScrCmd_CheckPokedexAcquired(ScriptContext *ctx);
BOOL ScrCmd_GivePokedex(ScriptContext *ctx);
BOOL ScrCmd_CheckRunningShoesAcquired(ScriptContext *ctx);
BOOL ScrCmd_GiveRunningShoes(ScriptContext *ctx);
BOOL ScrCmd_CheckBadgeAcquired(ScriptContext *ctx);
BOOL ScrCmd_GiveBadge(ScriptContext *ctx);
BOOL ScrCmd_CountBadgesAcquired(ScriptContext *ctx);
BOOL ScrCmd_CheckBagAcquired(ScriptContext *ctx);
BOOL ScrCmd_GiveBag(ScriptContext *ctx);
BOOL ScrCmd_CheckHasPartner(ScriptContext *ctx);
Expand All @@ -24,4 +24,4 @@ BOOL ScrCmd_Strength(ScriptContext *ctx);
BOOL ScrCmd_Flash(ScriptContext *ctx);
BOOL ScrCmd_Defog(ScriptContext *ctx);

#endif // POKEPLATINUM_UNK_0204E3CC_H
#endif // POKEPLATINUM_SCRCMD_SYSTEM_FLAGS_H
2 changes: 1 addition & 1 deletion include/unk_0202631C.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ BOOL sub_020274D0(const PokedexData *param0, u16 param1, u32 param2);
void sub_02027508(PokedexData *param0);
BOOL sub_02027514(const PokedexData *param0);
BOOL Pokedex_IsObtained(const PokedexData *pokedex);
void sub_02027540(PokedexData *param0);
void Pokedex_FlagObtained(PokedexData *param0);
PokedexData *SaveData_Pokedex(SaveData *saveData);
u32 sub_0202756C(const PokedexData *param0, int param1, int param2);
u32 sub_020276C8(const PokedexData *param0, int param1);
Expand Down
2 changes: 1 addition & 1 deletion platinum.us/main.lsf
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Static main
Object main.nef.p/src_unk_0204CFFC.c.o
Object main.nef.p/src_unk_0204E240.c.o
Object main.nef.p/src_unk_0204E378.c.o
Object main.nef.p/src_unk_0204E3CC.c.o
Object main.nef.p/src_scrcmd_system_flags.c.o
Object main.nef.p/src_unk_0204E75C.c.o
Object main.nef.p/src_unk_0204E974.c.o
Object main.nef.p/src_unk_0204EDA4.c.o
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_acuity_lakefront.s
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _003C:
End

_004E:
CheckBadge BADGE_ID_ICICLE, 0x4000
CheckBadgeAcquired BADGE_ID_ICICLE, 0x4000
CallIfEq 0x4000, 1, _0079
GoToIfUnset 186, _002A
GoToIfSet 186, _003C
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_canalave_city.s
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ _054D:
LockAll
FacePlayer
GoToIfSet 168, _0586
CheckBadge BADGE_ID_MINE, 0x800C
CheckBadgeAcquired BADGE_ID_MINE, 0x800C
GoToIfEq 0x800C, 1, _0591
GoTo _057B
End
Expand Down
8 changes: 4 additions & 4 deletions res/field/scripts/scripts_canalave_city_gym.s
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _0016:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_MINE, 0x800C
CheckBadgeAcquired BADGE_ID_MINE, 0x800C
GoToIfEq 0x800C, 1, _0107
ScrCmd_1CD 9, 35, 0, 0, 0
Message 0
Expand All @@ -29,7 +29,7 @@ _0016:
Message 2
PlaySound SEQ_BADGE
WaitSound
ScrCmd_15C 5
GiveBadge BADGE_ID_MINE
ScrCmd_260 23
SetTrainerFlag 232
SetTrainerFlag 0x100
Expand Down Expand Up @@ -88,7 +88,7 @@ _0126:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_MINE, 0x800C
CheckBadgeAcquired BADGE_ID_MINE, 0x800C
GoToIfEq 0x800C, 1, _014C
Message 6
WaitABXPadPress
Expand All @@ -107,7 +107,7 @@ _014C:
_015A:
PlayFanfare SEQ_SE_CONFIRM
LockAll
CheckBadge BADGE_ID_MINE, 0x800C
CheckBadgeAcquired BADGE_ID_MINE, 0x800C
GoToIfEq 0x800C, 1, _0184
BufferRivalName 0
BufferRivalName 1
Expand Down
8 changes: 4 additions & 4 deletions res/field/scripts/scripts_eterna_city_gym.s
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _0022:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_FOREST, 0x800C
CheckBadgeAcquired BADGE_ID_FOREST, 0x800C
GoToIfEq 0x800C, 1, _0048
Message 13
WaitABXPadPress
Expand All @@ -38,7 +38,7 @@ _0048:
_0056:
PlayFanfare SEQ_SE_CONFIRM
LockAll
CheckBadge BADGE_ID_FOREST, 0x800C
CheckBadgeAcquired BADGE_ID_FOREST, 0x800C
GoToIfEq 0x800C, 1, _0080
BufferRivalName 0
BufferRivalName 1
Expand All @@ -62,7 +62,7 @@ _0094:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_FOREST, 0x800C
CheckBadgeAcquired BADGE_ID_FOREST, 0x800C
GoToIfEq 0x800C, 1, _0161
ScrCmd_1CD 9, 67, 0, 0, 0
Message 0
Expand All @@ -75,7 +75,7 @@ _0094:
Message 2
PlaySound SEQ_BADGE
WaitSound
ScrCmd_15C 1
GiveBadge BADGE_ID_FOREST
ScrCmd_260 23
SetTrainerFlag 0x103
SetTrainerFlag 0x104
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_hearthome_city.s
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ _03AC:

_03F4:
GoToIfSet 0x14B, _0442
ScrCmd_15D 0x800C
CountBadgesAcquired 0x800C
GoToIfLt 0x800C, 8, _0442
Message 34
SetVar 0x8004, 47
Expand Down
4 changes: 2 additions & 2 deletions res/field/scripts/scripts_hearthome_city_dp_gym_leader_room.s
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ _0086:
GoTo _0096

_0096:
CheckBadge BADGE_ID_RELIC, 0x800C
CheckBadgeAcquired BADGE_ID_RELIC, 0x800C
GoToIfEq 0x800C, 1, _0173
ScrCmd_1CD 9, 100, 0, 0, 0
Message 0
Expand All @@ -53,7 +53,7 @@ _0096:
Message 2
PlaySound SEQ_BADGE
WaitSound
ScrCmd_15C 4
GiveBadge BADGE_ID_RELIC
ScrCmd_260 23
SetTrainerFlag 0x10A
SetTrainerFlag 0x118
Expand Down
4 changes: 2 additions & 2 deletions res/field/scripts/scripts_hearthome_city_gym_entrance_room.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _000E:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_RELIC, 0x800C
CheckBadgeAcquired BADGE_ID_RELIC, 0x800C
GoToIfEq 0x800C, 1, _006A
Message 1
ScrCmd_03E 0x800C
Expand Down Expand Up @@ -44,7 +44,7 @@ _006A:
_0078:
PlayFanfare SEQ_SE_CONFIRM
LockAll
CheckBadge BADGE_ID_RELIC, 0x800C
CheckBadgeAcquired BADGE_ID_RELIC, 0x800C
GoToIfEq 0x800C, 1, _00A2
BufferRivalName 0
BufferRivalName 1
Expand Down
4 changes: 2 additions & 2 deletions res/field/scripts/scripts_hearthome_city_gym_leader_room.s
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ _00AB:
GoTo _00BB

_00BB:
CheckBadge BADGE_ID_RELIC, 0x800C
CheckBadgeAcquired BADGE_ID_RELIC, 0x800C
GoToIfEq 0x800C, 1, _01A0
ScrCmd_1CD 9, 91, 0, 0, 0
Message 0
Expand All @@ -68,7 +68,7 @@ _00BB:
Message 2
PlaySound SEQ_BADGE
WaitSound
ScrCmd_15C 4
GiveBadge BADGE_ID_RELIC
ScrCmd_260 23
SetTrainerFlag 0x10A
SetTrainerFlag 0x118
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_iron_island.s
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ _00FC:
SetVar 0x8004, 0x1A7
SetVar 0x8005, 1
CallCommonScript 0x7FC
CheckBadge BADGE_ID_MINE, 0x800C
CheckBadgeAcquired BADGE_ID_MINE, 0x800C
GoToIfEq 0x800C, 0, _0140
GoTo _0135
End
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_jubilife_city.s
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ _058C:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_COAL, 0x800C
CheckBadgeAcquired BADGE_ID_COAL, 0x800C
GoToIfEq 0x800C, 1, _05B2
Message 29
WaitABXPadPress
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_oreburgh_city.s
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ _0090:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_COAL, 0x800C
CheckBadgeAcquired BADGE_ID_COAL, 0x800C
GoToIfEq 0x800C, 1, _00C1
GoToIfSet 122, _00CC
Message 8
Expand Down
8 changes: 4 additions & 4 deletions res/field/scripts/scripts_oreburgh_city_gym.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _000E:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_COAL, 0x800C
CheckBadgeAcquired BADGE_ID_COAL, 0x800C
GoToIfEq 0x800C, 1, _0103
ScrCmd_1CD 9, 47, 0, 0, 0
Message 0
Expand All @@ -26,7 +26,7 @@ _000E:
WaitSound
SetTrainerFlag 244
SetTrainerFlag 245
ScrCmd_15C 0
GiveBadge BADGE_ID_COAL
ScrCmd_260 23
SetTrainerFlag 244
SetTrainerFlag 245
Expand Down Expand Up @@ -82,7 +82,7 @@ _011F:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_COAL, 0x800C
CheckBadgeAcquired BADGE_ID_COAL, 0x800C
GoToIfEq 0x800C, 1, _0145
Message 6
WaitABXPadPress
Expand All @@ -101,7 +101,7 @@ _0145:
_0153:
PlayFanfare SEQ_SE_CONFIRM
LockAll
CheckBadge BADGE_ID_COAL, 0x800C
CheckBadgeAcquired BADGE_ID_COAL, 0x800C
GoToIfEq 0x800C, 1, _017D
BufferRivalName 0
BufferRivalName 1
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_oreburgh_gate_1f.s
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _0014:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_COAL, 0x800C
CheckBadgeAcquired BADGE_ID_COAL, 0x800C
GoToIfEq 0x800C, 0, _003A
Message 2
WaitABXPadPress
Expand Down
2 changes: 1 addition & 1 deletion res/field/scripts/scripts_pastoria_city.s
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ _00FE:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_FEN, 0x800C
CheckBadgeAcquired BADGE_ID_FEN, 0x800C
GoToIfEq 0x800C, 1, _0124
Message 33
WaitABXPadPress
Expand Down
8 changes: 4 additions & 4 deletions res/field/scripts/scripts_pastoria_city_gym.s
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ _0076:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_FEN, 0x800C
CheckBadgeAcquired BADGE_ID_FEN, 0x800C
GoToIfEq 0x800C, 1, _0155
ScrCmd_1CD 9, 122, 0, 0, 0
Message 0
Expand All @@ -56,7 +56,7 @@ _0076:
Message 2
PlaySound SEQ_BADGE
WaitSound
ScrCmd_15C 3
GiveBadge BADGE_ID_FEN
ScrCmd_260 23
SetTrainerFlag 0x125
SetTrainerFlag 0x153
Expand Down Expand Up @@ -110,7 +110,7 @@ _0171:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
CheckBadge BADGE_ID_FEN, 0x800C
CheckBadgeAcquired BADGE_ID_FEN, 0x800C
GoToIfEq 0x800C, 1, _0197
Message 6
WaitABXPadPress
Expand All @@ -129,7 +129,7 @@ _0197:
_01A5:
PlayFanfare SEQ_SE_CONFIRM
LockAll
CheckBadge BADGE_ID_FEN, 0x800C
CheckBadgeAcquired BADGE_ID_FEN, 0x800C
GoToIfEq 0x800C, 1, _01CF
BufferRivalName 0
BufferRivalName 1
Expand Down
Loading

0 comments on commit 604bab4

Please sign in to comment.