mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-09-30 05:18:36 -05:00
Document scrcmd_strings (#704)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "generated/sdat.h"
|
||||
#include "generated/signpost_commands.h"
|
||||
#include "generated/signpost_types.h"
|
||||
#include "generated/string_padding_mode.h"
|
||||
#include "generated/trainer_score_events.h"
|
||||
#include "generated/trainers.h"
|
||||
#include "constants/boat_cutscene.h"
|
||||
@@ -1301,9 +1302,9 @@
|
||||
.short \trainerClass
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_0D9 arg0
|
||||
.macro BufferTrainerClassFromAppearance templateArg
|
||||
.short 217
|
||||
.byte \arg0
|
||||
.byte \templateArg
|
||||
.endm
|
||||
|
||||
.macro BufferSpeciesNameFromVar templateArg, var, unused1, unused2
|
||||
@@ -1352,10 +1353,10 @@
|
||||
.short \item
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_0E2 arg0, arg1
|
||||
.macro BufferMapName templateArg, mapID
|
||||
.short 226
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \mapID
|
||||
.endm
|
||||
|
||||
.macro GetSwarmMapAndSpecies arg0, arg1
|
||||
@@ -2123,17 +2124,17 @@
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_17B arg0, arg1, arg2
|
||||
.macro BufferBerryName templateArg, item, unused=VAR_0x8001
|
||||
.short 379
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.short \arg2
|
||||
.byte \templateArg
|
||||
.short \item
|
||||
.short \unused
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_17C arg0, arg1
|
||||
.macro BufferNatureName templateArg, nature
|
||||
.short 380
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \nature
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_17D arg0
|
||||
@@ -2570,11 +2571,11 @@
|
||||
.short \moveSlot
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_1CB arg0, arg1, arg2
|
||||
.macro BufferPartyMoveName templateArg, partySlot, moveSlot
|
||||
.short 459
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.short \arg2
|
||||
.byte \templateArg
|
||||
.short \partySlot
|
||||
.short \moveSlot
|
||||
.endm
|
||||
|
||||
.macro GiveJournal
|
||||
@@ -3151,10 +3152,10 @@
|
||||
.short \ribbonID
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_232 arg0, arg1
|
||||
.macro BufferRibbonName templateArg, ribbonID
|
||||
.short 562
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \ribbonID
|
||||
.endm
|
||||
|
||||
.macro GetPartyMonEVTotal destVar, partySlot
|
||||
@@ -3598,9 +3599,9 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_272 arg0
|
||||
.macro BufferTabletName templateArg
|
||||
.short 626
|
||||
.byte \arg0
|
||||
.byte \templateArg
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_273 arg0, arg1
|
||||
@@ -3673,12 +3674,12 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_280 arg0, arg1, arg2, arg3
|
||||
.macro BufferVarPaddingDigits templateArg, varID, paddingMode, maxDigits
|
||||
.short 640
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \arg2
|
||||
.byte \arg3
|
||||
.byte \templateArg
|
||||
.short \varID
|
||||
.byte \paddingMode
|
||||
.byte \maxDigits
|
||||
.endm
|
||||
|
||||
.macro GetPartyMonContestStat slot, contestType, destVar
|
||||
@@ -3970,10 +3971,10 @@
|
||||
.short 690
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_2B3 arg0, arg1
|
||||
.macro BufferBallSealName templateArg, ballSeal
|
||||
.short 691
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \ballSeal
|
||||
.endm
|
||||
|
||||
/* this is unused, but the underlying function is called from LockAll */
|
||||
@@ -4307,10 +4308,10 @@
|
||||
.short \arg3
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_2EF arg0, arg1
|
||||
.macro BufferStatName templateArg, stat
|
||||
.short 751
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \stat
|
||||
.endm
|
||||
|
||||
.macro InitPersistedMapFeaturesForVilla
|
||||
@@ -4327,10 +4328,10 @@
|
||||
.short 754
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_2F3 arg0, arg1
|
||||
.macro BufferTrainerName templateArg, trainerID
|
||||
.short 755
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \trainerID
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_2F4 arg0, arg1, arg2, arg3
|
||||
@@ -4341,7 +4342,7 @@
|
||||
.short \arg3
|
||||
.endm
|
||||
|
||||
.macro BufferNumberPaddingDigits templateArg, value, paddingMode, maxDigits
|
||||
.macro BufferValuePaddingDigits templateArg, value, paddingMode, maxDigits
|
||||
.short 757
|
||||
.byte \templateArg
|
||||
.long \value
|
||||
@@ -4384,10 +4385,10 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_2FD arg0, arg1
|
||||
.macro BufferTypeName templateArg, type
|
||||
.short 765
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \type
|
||||
.endm
|
||||
|
||||
.macro GetItemQuantity item, destVar
|
||||
@@ -4746,10 +4747,10 @@
|
||||
SetMenuYOriginSide TRUE
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_33C arg0, arg1
|
||||
.macro BufferItemNameWithArticle templateArg, item
|
||||
.short 828
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \item
|
||||
.endm
|
||||
|
||||
.macro BufferItemNamePlural templateArg, item
|
||||
@@ -4758,30 +4759,30 @@
|
||||
.short \item
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_33E arg0, arg1
|
||||
.macro BufferUndergroundGoodsNameWithArticle templateArg, goods
|
||||
.short 830
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \goods
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_33F arg0, arg1
|
||||
.macro BufferUndergroundTrapNameWithArticle templateArg, trap
|
||||
.short 831
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \trap
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_340 arg0, arg1
|
||||
.macro BufferUndergroundItemNameWithArticle templateArg, item
|
||||
.short 832
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \item
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_341 arg0, arg1, arg2, arg3
|
||||
.macro BufferSpeciesNameWithArticle templateArg, species
|
||||
.short 833
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.short \arg2
|
||||
.byte \arg3
|
||||
.byte \templateArg
|
||||
.short \species
|
||||
.short 0
|
||||
.byte 0
|
||||
.endm
|
||||
|
||||
.macro BufferPlayerCounterpartStarterSpeciesNameWithArticle templateArg
|
||||
@@ -4789,27 +4790,27 @@
|
||||
.byte \templateArg
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_343 arg0, arg1
|
||||
.macro BufferAccessoryNameWithArticle templateArg, accessory
|
||||
.short 835
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \accessory
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_344 arg0, arg1
|
||||
.macro BufferTrainerClassNameWithArticle templateArg, trainerClass
|
||||
.short 836
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \trainerClass
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_345 arg0, arg1
|
||||
.macro BufferBallSealNamePlural templateArg, ballSeal
|
||||
.short 837
|
||||
.byte \arg0
|
||||
.short \arg1
|
||||
.byte \templateArg
|
||||
.short \ballSeal
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_346 arg0
|
||||
.macro CapitalizeFirstLetter templateArg
|
||||
.short 838
|
||||
.byte \arg0
|
||||
.byte \templateArg
|
||||
.endm
|
||||
|
||||
.macro BufferFloorNumber templateArg, floor
|
||||
|
||||
53
include/scrcmd_strings.h
Normal file
53
include/scrcmd_strings.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef POKEPLATINUM_SCRCMD_STRINGS_H
|
||||
#define POKEPLATINUM_SCRCMD_STRINGS_H
|
||||
|
||||
#include "field_script_context.h"
|
||||
|
||||
BOOL ScrCmd_BufferStatName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPlayerName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferRivalName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferCounterpartName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPartyMonSpecies(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTypeName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferItemName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPocketName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTMHMMoveName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferMoveName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferNumber(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferVarPaddingDigits(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferValuePaddingDigits(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPartyMonNickname(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferMonNicknameFromPC(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPoketchAppName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTrainerClassName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTrainerClassFromAppearance(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferSpeciesNameFromVar(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPlayerStarterSpeciesName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferRivalStarterSpeciesName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPlayerCounterpartStarterSpeciesName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferUndergroundGoodsName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferUndergroundTrapName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferUndergroundItemName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferMapName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferBerryName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferNatureName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferAccessoryName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTabletName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPartyMoveName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferRibbonName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferBallSealName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTrainerName(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferItemNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferItemNamePlural(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferUndergroundGoodsNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferUndergroundTrapNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferUndergroundItemNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferSpeciesNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferPlayerCounterpartStarterSpeciesNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferAccessoryNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferTrainerClassNameWithArticle(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferBallSealNamePlural(ScriptContext *ctx);
|
||||
BOOL ScrCmd_CapitalizeFirstLetter(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BufferFloorNumber(ScriptContext *ctx);
|
||||
|
||||
#endif // POKEPLATINUM_SCRCMD_STRINGS_H
|
||||
@@ -105,7 +105,7 @@ void StringTemplate_SetDEGreeting(StringTemplate *template, u32 idx, u32 greetin
|
||||
void StringTemplate_SetESGreeting(StringTemplate *template, u32 idx, u32 greeting);
|
||||
void StringTemplate_SetFurniture(StringTemplate *template, u32 idx, u32 furniture);
|
||||
void StringTemplate_SetMonthName(StringTemplate *template, u32 idx, u32 month);
|
||||
void StringTemplate_SetDepartmentStoreFloor(StringTemplate *template, u32 idx, u32 floor);
|
||||
void StringTemplate_SetFloorNumber(StringTemplate *template, u32 idx, u32 floor);
|
||||
void StringTemplate_CapitalizeArgAtIndex(StringTemplate *template, u32 idx);
|
||||
void StringTemplate_Format(const StringTemplate *template, Strbuf *dst, const Strbuf *fmtString);
|
||||
void StringTemplate_ClearArgs(StringTemplate *template);
|
||||
|
||||
@@ -186,7 +186,7 @@ Static main
|
||||
Object main.nef.p/src_scrcmd.c.o
|
||||
Object main.nef.p/src_scrcmd_shop.c.o
|
||||
Object main.nef.p/src_unk_02046C7C.c.o
|
||||
Object main.nef.p/src_unk_020474B8.c.o
|
||||
Object main.nef.p/src_scrcmd_strings.c.o
|
||||
Object main.nef.p/src_scrcmd_jubilife_lottery.c.o
|
||||
Object main.nef.p/src_scrcmd_sound.c.o
|
||||
Object main.nef.p/src_scrcmd_trainer.c.o
|
||||
|
||||
@@ -100,7 +100,7 @@ BattleParkExchangeServiceCorner_Unused8:
|
||||
BattleParkExchangeServiceCorner_Unused9:
|
||||
ScrCmd_29B VAR_MAP_LOCAL_0, VAR_0x8008, VAR_0x8000, VAR_0x8001
|
||||
BufferItemName 0, VAR_0x8000
|
||||
ScrCmd_280 1, VAR_0x8001, 1, 3
|
||||
BufferVarPaddingDigits 1, VAR_0x8001, PADDING_MODE_SPACES, 3
|
||||
AddListMenuEntry 231, VAR_0x8008
|
||||
AddVar VAR_0x8008, 1
|
||||
GoToIfLt VAR_0x8008, VAR_MAP_LOCAL_1, BattleParkExchangeServiceCorner_Unused9
|
||||
|
||||
@@ -631,7 +631,7 @@ _0A5A:
|
||||
GoToIfNe VAR_RESULT, 0, _0784
|
||||
ScrCmd_1E3 VAR_0x8004, VAR_0x8005
|
||||
BufferNumber 0, VAR_0x8004
|
||||
ScrCmd_280 1, VAR_0x8005, 2, 3
|
||||
BufferVarPaddingDigits 1, VAR_0x8005, PADDING_MODE_ZEROES, 3
|
||||
Message 52
|
||||
WaitABPress
|
||||
GoTo _0789
|
||||
|
||||
@@ -156,10 +156,10 @@ _0275:
|
||||
GoToIfEq VAR_UNK_0x40DF, 2, _02D2
|
||||
SetVar VAR_MAP_LOCAL_9, 0
|
||||
ScrCmd_1DE VAR_MAP_LOCAL_9, 0, VAR_0x8004, VAR_0x8005
|
||||
ScrCmd_341 0, VAR_0x8004, 0, 0
|
||||
BufferSpeciesNameWithArticle 0, VAR_0x8004
|
||||
BufferMoveName 1, VAR_0x8005
|
||||
ScrCmd_1DE VAR_MAP_LOCAL_9, 1, VAR_0x8004, VAR_0x8005
|
||||
ScrCmd_341 2, VAR_0x8004, 0, 0
|
||||
BufferSpeciesNameWithArticle 2, VAR_0x8004
|
||||
BufferMoveName 3, VAR_0x8005
|
||||
Message 6
|
||||
ShowYesNoMenu VAR_RESULT
|
||||
|
||||
@@ -50,7 +50,7 @@ _0054:
|
||||
FadeScreenIn
|
||||
WaitFadeScreen
|
||||
GoToIfEq VAR_0x8001, MOVE_NOT_SELECTED, _0049
|
||||
ScrCmd_1CB 0, VAR_0x8002, VAR_0x8001
|
||||
BufferPartyMoveName 0, VAR_0x8002, VAR_0x8001
|
||||
Message 7
|
||||
ShowYesNoMenu VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, MENU_YES, _0105
|
||||
|
||||
@@ -679,7 +679,7 @@ _0910:
|
||||
_091D:
|
||||
PlaySound SEQ_FANFA4
|
||||
SendGoodToPC VAR_0x8004, VAR_0x8005, VAR_RESULT
|
||||
ScrCmd_33E 0, VAR_0x8004
|
||||
BufferUndergroundGoodsNameWithArticle 0, VAR_0x8004
|
||||
Message pl_msg_00000213_00108
|
||||
BufferUndergroundGoodsName 0, VAR_0x8004
|
||||
WaitSound
|
||||
|
||||
@@ -69,7 +69,7 @@ _00B6:
|
||||
SetFlag FLAG_UNK_0x0AA9
|
||||
Message 4
|
||||
GetJubilifeLotteryTrainerID VAR_0x8000
|
||||
ScrCmd_280 0, VAR_0x8000, 2, 5
|
||||
BufferVarPaddingDigits 0, VAR_0x8000, PADDING_MODE_ZEROES, 5
|
||||
Message 5
|
||||
CheckForJubilifeLotteryWinner VAR_0x8001, VAR_0x8002, VAR_0x8003, VAR_0x8000
|
||||
GoToIfEq VAR_0x8002, 0, _00F5
|
||||
|
||||
@@ -38,7 +38,7 @@ _0044:
|
||||
CallIfEq VAR_RESULT, SPECIES_CHIMCHAR, _00BC
|
||||
CallIfEq VAR_RESULT, SPECIES_PIPLUP, _00C4
|
||||
SetVar VAR_UNK_0x410A, VAR_0x8004
|
||||
ScrCmd_343 0, VAR_0x8004
|
||||
BufferAccessoryNameWithArticle 0, VAR_0x8004
|
||||
Message 1
|
||||
SetVar VAR_0x8005, 1
|
||||
CallCommonScript 0x7DF
|
||||
|
||||
@@ -45,7 +45,7 @@ _0050:
|
||||
GoTo _0078
|
||||
|
||||
_006C:
|
||||
ScrCmd_0D9 0
|
||||
BufferTrainerClassFromAppearance 0
|
||||
Message 7
|
||||
GoTo _0078
|
||||
|
||||
@@ -64,8 +64,8 @@ _0078:
|
||||
GoToIfEq VAR_0x8008, 4, _00E9
|
||||
GoToIfEq VAR_0x8008, -2, _00E9
|
||||
ScrCmd_155 VAR_0x8004, VAR_0x8005
|
||||
ScrCmd_344 0, VAR_0x8005
|
||||
ScrCmd_346 0
|
||||
BufferTrainerClassNameWithArticle 0, VAR_0x8005
|
||||
CapitalizeFirstLetter 0
|
||||
Message 4
|
||||
ShowYesNoMenu VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, MENU_YES, _00F4
|
||||
@@ -79,7 +79,7 @@ _00E9:
|
||||
End
|
||||
|
||||
_00F4:
|
||||
ScrCmd_344 0, VAR_0x8005
|
||||
BufferTrainerClassNameWithArticle 0, VAR_0x8005
|
||||
Message 5
|
||||
SetFlag FLAG_UNK_0x0070
|
||||
ScrCmd_29C VAR_0x8004, VAR_0x8005
|
||||
|
||||
@@ -10,7 +10,7 @@ _000A:
|
||||
PlayFanfare SEQ_SE_CONFIRM
|
||||
LockAll
|
||||
FacePlayer
|
||||
ScrCmd_33C 4, 93
|
||||
BufferItemNameWithArticle 4, ITEM_HEART_SCALE
|
||||
GoToIfUnset FLAG_UNK_0x00E9, _003D
|
||||
CheckItem ITEM_HEART_SCALE, 1, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _005F
|
||||
|
||||
@@ -205,14 +205,14 @@ _0396:
|
||||
_03A1:
|
||||
SetVar VAR_0x8007, TRAINER_RICH_BOY_LIAM
|
||||
SetVar VAR_OBJ_GFX_ID_0, 62
|
||||
ScrCmd_2F3 2, VAR_0x8007
|
||||
BufferTrainerName 2, VAR_0x8007
|
||||
Message 8
|
||||
Return
|
||||
|
||||
_03B7:
|
||||
SetVar VAR_0x8007, TRAINER_LADY_CELESTE
|
||||
SetVar VAR_OBJ_GFX_ID_0, 63
|
||||
ScrCmd_2F3 2, VAR_0x8007
|
||||
BufferTrainerName 2, VAR_0x8007
|
||||
Message 9
|
||||
Return
|
||||
|
||||
|
||||
@@ -143,8 +143,8 @@ _01C7:
|
||||
LockAll
|
||||
FacePlayer
|
||||
SetVar VAR_0x8004, 0x1BE
|
||||
ScrCmd_33C 0, VAR_0x8004
|
||||
ScrCmd_346 0
|
||||
BufferItemNameWithArticle 0, VAR_0x8004
|
||||
CapitalizeFirstLetter 0
|
||||
GoToIfSet FLAG_UNK_0x00A2, _020B
|
||||
Message 10
|
||||
ShowYesNoMenu VAR_RESULT
|
||||
|
||||
@@ -58,7 +58,7 @@ _00B8:
|
||||
End
|
||||
|
||||
_00D6:
|
||||
ScrCmd_272 1
|
||||
BufferTabletName 1
|
||||
Message 8
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
@@ -89,7 +89,7 @@ _0124:
|
||||
WaitFadeScreen
|
||||
GoToIfEq VAR_RESULT, 1, _0222
|
||||
BufferPlayerName 0
|
||||
ScrCmd_272 1
|
||||
BufferTabletName 1
|
||||
Message 3
|
||||
ShowYesNoMenu VAR_RESULT
|
||||
CloseMessage
|
||||
|
||||
@@ -70,7 +70,7 @@ _009A:
|
||||
_00C4:
|
||||
BufferPlayerName 0
|
||||
GetSwarmMapAndSpecies VAR_MAP_LOCAL_1, VAR_MAP_LOCAL_0
|
||||
ScrCmd_0E2 1, VAR_MAP_LOCAL_1
|
||||
BufferMapName 1, VAR_MAP_LOCAL_1
|
||||
BufferSpeciesNameFromVar 2, VAR_MAP_LOCAL_0, 0, 1
|
||||
GetPlayerGender VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, GENDER_MALE, _00FA
|
||||
|
||||
@@ -44,11 +44,11 @@ _00B3:
|
||||
SetVar VAR_MAP_LOCAL_0, VAR_0x8006
|
||||
SetFlag FLAG_UNK_0x0001
|
||||
GoToIfEq VAR_0x8000, 1, _00DB
|
||||
ScrCmd_345 0, VAR_0x8007
|
||||
BufferBallSealNamePlural 0, VAR_0x8007
|
||||
GoTo _00E0
|
||||
|
||||
_00DB:
|
||||
ScrCmd_2B3 0, VAR_0x8007
|
||||
BufferBallSealName 0, VAR_0x8007
|
||||
_00E0:
|
||||
Message 4
|
||||
WaitABXPadPress
|
||||
|
||||
@@ -12,7 +12,7 @@ _000A:
|
||||
FacePlayer
|
||||
GetFirstNonEggInParty VAR_RESULT
|
||||
ScrCmd_212 VAR_0x8004, VAR_RESULT
|
||||
ScrCmd_17C 0, VAR_0x8004
|
||||
BufferNatureName 0, VAR_0x8004
|
||||
Message 0
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
|
||||
@@ -125,7 +125,7 @@ _019E:
|
||||
Message 21
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_SMILE
|
||||
ScrCmd_232 3, 65
|
||||
BufferRibbonName 3, RIBBON_SMILE
|
||||
GoTo _010E
|
||||
|
||||
_01F2:
|
||||
@@ -143,7 +143,7 @@ _01F2:
|
||||
Message 3
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_ALERT
|
||||
ScrCmd_232 3, 59
|
||||
BufferRibbonName 3, RIBBON_ALERT
|
||||
GoTo _010E
|
||||
|
||||
_0246:
|
||||
@@ -161,7 +161,7 @@ _0246:
|
||||
Message 11
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_SHOCK
|
||||
ScrCmd_232 3, 60
|
||||
BufferRibbonName 3, RIBBON_SHOCK
|
||||
GoTo _010E
|
||||
|
||||
_029A:
|
||||
@@ -179,7 +179,7 @@ _029A:
|
||||
Message 13
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_DOWNCAST
|
||||
ScrCmd_232 3, 61
|
||||
BufferRibbonName 3, RIBBON_DOWNCAST
|
||||
GoTo _010E
|
||||
|
||||
_02EE:
|
||||
@@ -197,7 +197,7 @@ _02EE:
|
||||
Message 15
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_CARELESS
|
||||
ScrCmd_232 3, 62
|
||||
BufferRibbonName 3, RIBBON_CARELESS
|
||||
GoTo _010E
|
||||
|
||||
_0342:
|
||||
@@ -215,7 +215,7 @@ _0342:
|
||||
Message 17
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_RELAX
|
||||
ScrCmd_232 3, 63
|
||||
BufferRibbonName 3, RIBBON_RELAX
|
||||
GoTo _010E
|
||||
|
||||
_0396:
|
||||
@@ -233,7 +233,7 @@ _0396:
|
||||
Message 19
|
||||
SetFlag FLAG_UNK_0x0AA4
|
||||
SetPartyMonRibbon VAR_0x8002, RIBBON_SNOOZE
|
||||
ScrCmd_232 3, 64
|
||||
BufferRibbonName 3, RIBBON_SNOOZE
|
||||
GoTo _010E
|
||||
|
||||
_03EA:
|
||||
|
||||
@@ -2398,7 +2398,7 @@ _205E:
|
||||
|
||||
_207D:
|
||||
BufferPlayerName 0
|
||||
ScrCmd_33C 1, VAR_0x8004
|
||||
BufferItemNameWithArticle 1, VAR_0x8004
|
||||
BufferTMHMMoveName 2, VAR_0x8004
|
||||
Message 6
|
||||
GoTo _1F33
|
||||
@@ -2406,7 +2406,7 @@ _207D:
|
||||
|
||||
_2095:
|
||||
BufferPlayerName 0
|
||||
ScrCmd_33C 1, VAR_0x8004
|
||||
BufferItemNameWithArticle 1, VAR_0x8004
|
||||
Message 3
|
||||
GoTo _1F33
|
||||
End
|
||||
|
||||
@@ -387,7 +387,7 @@ _060D:
|
||||
|
||||
_0624:
|
||||
BufferPlayerName 0
|
||||
ScrCmd_33C 1, VAR_0x8004
|
||||
BufferItemNameWithArticle 1, VAR_0x8004
|
||||
BufferTMHMMoveName 2, VAR_0x8004
|
||||
Message 6
|
||||
GoTo _04E2
|
||||
@@ -395,7 +395,7 @@ _0624:
|
||||
|
||||
_063C:
|
||||
BufferPlayerName 0
|
||||
ScrCmd_33C 1, VAR_0x8004
|
||||
BufferItemNameWithArticle 1, VAR_0x8004
|
||||
Message 3
|
||||
GoTo _04E2
|
||||
End
|
||||
|
||||
@@ -28,14 +28,14 @@ _0012:
|
||||
_0082:
|
||||
Call _0158
|
||||
GoToIfEq VAR_RESULT, 0, _00A6
|
||||
ScrCmd_33C 0, VAR_0x8000
|
||||
ScrCmd_346 0
|
||||
BufferItemNameWithArticle 0, VAR_0x8000
|
||||
CapitalizeFirstLetter 0
|
||||
Message 13
|
||||
GoTo _01F2
|
||||
|
||||
_00A6:
|
||||
ScrCmd_33C 0, VAR_0x8000
|
||||
ScrCmd_346 0
|
||||
BufferItemNameWithArticle 0, VAR_0x8000
|
||||
CapitalizeFirstLetter 0
|
||||
Message 31
|
||||
WaitABXPadPress
|
||||
GoTo _053A
|
||||
@@ -43,12 +43,12 @@ _00A6:
|
||||
_00B9:
|
||||
Call _0158
|
||||
GoToIfEq VAR_RESULT, 0, _00DC
|
||||
ScrCmd_17B 0, VAR_0x8000, VAR_0x8001
|
||||
BufferBerryName 0, VAR_0x8000
|
||||
Message 14
|
||||
GoTo _01F2
|
||||
|
||||
_00DC:
|
||||
ScrCmd_17B 0, VAR_0x8000, VAR_0x8001
|
||||
BufferBerryName 0, VAR_0x8000
|
||||
Message 32
|
||||
WaitABXPadPress
|
||||
GoTo _053A
|
||||
@@ -56,12 +56,12 @@ _00DC:
|
||||
_00EE:
|
||||
Call _0158
|
||||
GoToIfEq VAR_RESULT, 0, _0111
|
||||
ScrCmd_17B 0, VAR_0x8000, VAR_0x8001
|
||||
BufferBerryName 0, VAR_0x8000
|
||||
Message 15
|
||||
GoTo _01F2
|
||||
|
||||
_0111:
|
||||
ScrCmd_17B 0, VAR_0x8000, VAR_0x8001
|
||||
BufferBerryName 0, VAR_0x8000
|
||||
Message 33
|
||||
WaitABXPadPress
|
||||
GoTo _053A
|
||||
@@ -69,12 +69,12 @@ _0111:
|
||||
_0123:
|
||||
Call _0158
|
||||
GoToIfEq VAR_RESULT, 0, _0146
|
||||
ScrCmd_17B 0, VAR_0x8000, VAR_0x8001
|
||||
BufferBerryName 0, VAR_0x8000
|
||||
Message 16
|
||||
GoTo _01F2
|
||||
|
||||
_0146:
|
||||
ScrCmd_17B 0, VAR_0x8000, VAR_0x8001
|
||||
BufferBerryName 0, VAR_0x8000
|
||||
Message 34
|
||||
WaitABXPadPress
|
||||
GoTo _053A
|
||||
@@ -121,7 +121,7 @@ _01F2:
|
||||
_021B:
|
||||
BufferNumber 1, VAR_0x8001
|
||||
GoToIfGt VAR_0x8001, 1, _023B
|
||||
ScrCmd_33C 0, VAR_0x8000
|
||||
BufferItemNameWithArticle 0, VAR_0x8000
|
||||
Message 35
|
||||
GoTo _0243
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ _0119:
|
||||
_0135:
|
||||
GetGameCornerPrizeData VAR_0x8008, VAR_0x8000, VAR_0x8001
|
||||
BufferItemName 0, VAR_0x8000
|
||||
ScrCmd_280 1, VAR_0x8001, 1, 5
|
||||
BufferVarPaddingDigits 1, VAR_0x8001, PADDING_MODE_SPACES, 5
|
||||
AddListMenuEntry 168, VAR_0x8008
|
||||
AddVar VAR_0x8008, 1
|
||||
GoToIfLt VAR_0x8008, VAR_MAP_LOCAL_1, _0135
|
||||
@@ -128,7 +128,7 @@ _01CB:
|
||||
GoToIfEq VAR_0x8004, -1, _0245
|
||||
CheckPartyMonHasMove VAR_RESULT, MOVE_HIDDEN_POWER, VAR_0x8000
|
||||
GoToIfEq VAR_RESULT, 0, _0266
|
||||
ScrCmd_2FD 0, VAR_0x8004
|
||||
BufferTypeName 0, VAR_0x8004
|
||||
Message 11
|
||||
GoTo _0276
|
||||
End
|
||||
@@ -149,7 +149,7 @@ _025B:
|
||||
End
|
||||
|
||||
_0266:
|
||||
ScrCmd_2FD 0, VAR_0x8004
|
||||
BufferTypeName 0, VAR_0x8004
|
||||
Message 10
|
||||
GoTo _0276
|
||||
End
|
||||
|
||||
@@ -90,7 +90,7 @@ _00A9:
|
||||
CallIfEq VAR_RESULT, SPECIES_CHIMCHAR, _0121
|
||||
CallIfEq VAR_RESULT, SPECIES_PIPLUP, _0129
|
||||
SetVar VAR_UNK_0x4107, VAR_0x8004
|
||||
ScrCmd_343 0, VAR_0x8004
|
||||
BufferAccessoryNameWithArticle 0, VAR_0x8004
|
||||
Message 3
|
||||
SetVar VAR_0x8005, 1
|
||||
CallCommonScript 0x7DF
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "macros/scrcmd.inc"
|
||||
#include "res/text/bank/villa.h"
|
||||
#include "generated/string_padding_mode.h"
|
||||
|
||||
|
||||
ScriptEntry _00B2
|
||||
@@ -1685,74 +1684,74 @@ Villa_DoesntHaveAllFurniture:
|
||||
Return
|
||||
|
||||
_19E4:
|
||||
BufferNumberPaddingDigits 0, 0, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 0, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_TABLE, _1D15
|
||||
CallIfSet FLAG_VILLA_FURNITURE_TABLE, _1D1F
|
||||
Return
|
||||
|
||||
_1A05:
|
||||
BufferNumberPaddingDigits 0, 120000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 120000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_BIG_SOFA, _1D29
|
||||
CallIfSet FLAG_VILLA_FURNITURE_BIG_SOFA, _1D33
|
||||
Return
|
||||
|
||||
_1A26:
|
||||
BufferNumberPaddingDigits 0, 90000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 90000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_SMALL_SOFA, _1D3D
|
||||
CallIfSet FLAG_VILLA_FURNITURE_SMALL_SOFA, _1D47
|
||||
Return
|
||||
|
||||
_1A47:
|
||||
BufferNumberPaddingDigits 0, 187000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 187000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_BED, _1D51
|
||||
CallIfSet FLAG_VILLA_FURNITURE_BED, _1D5B
|
||||
Return
|
||||
|
||||
_1A68:
|
||||
BufferNumberPaddingDigits 0, 58000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 58000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_NIGHT_TABLE, _1D65
|
||||
CallIfSet FLAG_VILLA_FURNITURE_NIGHT_TABLE, _1D6F
|
||||
Return
|
||||
|
||||
_1A89:
|
||||
BufferNumberPaddingDigits 0, 220000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 220000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_TV, _1D79
|
||||
CallIfSet FLAG_VILLA_FURNITURE_TV, _1D83
|
||||
Return
|
||||
|
||||
_1AAA:
|
||||
BufferNumberPaddingDigits 0, 160000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 160000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_AUDIO_SYSTEM, _1D8D
|
||||
CallIfSet FLAG_VILLA_FURNITURE_AUDIO_SYSTEM, _1D97
|
||||
Return
|
||||
|
||||
_1ACB:
|
||||
BufferNumberPaddingDigits 0, 150000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 150000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_BOOKSHELF, _1DA1
|
||||
CallIfSet FLAG_VILLA_FURNITURE_BOOKSHELF, _1DAB
|
||||
Return
|
||||
|
||||
_1AEC:
|
||||
BufferNumberPaddingDigits 0, 127000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 127000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_RACK, _1DB5
|
||||
CallIfSet FLAG_VILLA_FURNITURE_RACK, _1DBF
|
||||
Return
|
||||
|
||||
_1B0D:
|
||||
BufferNumberPaddingDigits 0, 120000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 120000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_HOUSEPLANT, _1DC9
|
||||
CallIfSet FLAG_VILLA_FURNITURE_HOUSEPLANT, _1DD3
|
||||
Return
|
||||
|
||||
_1B2E:
|
||||
BufferNumberPaddingDigits 0, 168000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 168000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_PC_DESK, _1DDD
|
||||
CallIfSet FLAG_VILLA_FURNITURE_PC_DESK, _1DE7
|
||||
Return
|
||||
|
||||
_1B4F:
|
||||
GoToIfUnset FLAG_VILLA_FURNITURE_RACK, _1D13
|
||||
BufferNumberPaddingDigits 0, 25300, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 25300, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_MUSIC_BOX, _1DF1
|
||||
CallIfSet FLAG_VILLA_FURNITURE_MUSIC_BOX, _1DFB
|
||||
Return
|
||||
@@ -1760,7 +1759,7 @@ _1B4F:
|
||||
_1B7B:
|
||||
ScrCmd_30F 13, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 150000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 150000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_POKEMON_BUST, _1E05
|
||||
CallIfSet FLAG_VILLA_FURNITURE_POKEMON_BUST, _1E0F
|
||||
Return
|
||||
@@ -1768,7 +1767,7 @@ _1B7B:
|
||||
_1BAF:
|
||||
ScrCmd_30F 14, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 150000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 150000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_POKEMON_BUST_SILVER, _1E19
|
||||
CallIfSet FLAG_VILLA_FURNITURE_POKEMON_BUST_SILVER, _1E23
|
||||
Return
|
||||
@@ -1776,7 +1775,7 @@ _1BAF:
|
||||
_1BE3:
|
||||
ScrCmd_30F 15, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 146700, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 146700, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_PIANO, _1E2D
|
||||
CallIfSet FLAG_VILLA_FURNITURE_PIANO, _1E37
|
||||
Return
|
||||
@@ -1784,7 +1783,7 @@ _1BE3:
|
||||
_1C17:
|
||||
ScrCmd_30F 16, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 208000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 208000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_GUEST_SET, _1E41
|
||||
CallIfSet FLAG_VILLA_FURNITURE_GUEST_SET, _1E4B
|
||||
Return
|
||||
@@ -1792,7 +1791,7 @@ _1C17:
|
||||
_1C4B:
|
||||
ScrCmd_30F 17, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 52000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 52000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_WALL_CLOCK, _1E55
|
||||
CallIfSet FLAG_VILLA_FURNITURE_WALL_CLOCK, _1E5F
|
||||
Return
|
||||
@@ -1800,14 +1799,14 @@ _1C4B:
|
||||
_1C7F:
|
||||
ScrCmd_30F 18, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 140000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 140000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_MASTERPIECE, _1E69
|
||||
CallIfSet FLAG_VILLA_FURNITURE_MASTERPIECE, _1E73
|
||||
Return
|
||||
|
||||
_1CB3:
|
||||
GoToIfUnset FLAG_VILLA_FURNITURE_GUEST_SET, _1D13
|
||||
BufferNumberPaddingDigits 0, 108000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 108000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_TEA_SET, _1E7D
|
||||
CallIfSet FLAG_VILLA_FURNITURE_TEA_SET, _1E87
|
||||
Return
|
||||
@@ -1815,7 +1814,7 @@ _1CB3:
|
||||
_1CDF:
|
||||
ScrCmd_30F 20, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _1D13
|
||||
BufferNumberPaddingDigits 0, 120000, PADDING_MODE_SPACES, 6
|
||||
BufferValuePaddingDigits 0, 120000, PADDING_MODE_SPACES, 6
|
||||
CallIfUnset FLAG_VILLA_FURNITURE_CHANDELIER, _1E91
|
||||
CallIfSet FLAG_VILLA_FURNITURE_CHANDELIER, _1E9B
|
||||
Return
|
||||
|
||||
@@ -174,7 +174,7 @@ pokeplatinum_c = files(
|
||||
'scrcmd.c',
|
||||
'scrcmd_shop.c',
|
||||
'unk_02046C7C.c',
|
||||
'unk_020474B8.c',
|
||||
'scrcmd_strings.c',
|
||||
'scrcmd_jubilife_lottery.c',
|
||||
'scrcmd_sound.c',
|
||||
'scrcmd_trainer.c',
|
||||
|
||||
46
src/scrcmd.c
46
src/scrcmd.c
@@ -156,6 +156,7 @@
|
||||
#include "scrcmd_mystery_gift.h"
|
||||
#include "scrcmd_shop.h"
|
||||
#include "scrcmd_sound.h"
|
||||
#include "scrcmd_strings.h"
|
||||
#include "scrcmd_system_flags.h"
|
||||
#include "scrcmd_underground_inventory.h"
|
||||
#include "screen_fade.h"
|
||||
@@ -187,7 +188,6 @@
|
||||
#include "unk_020393C8.h"
|
||||
#include "unk_0203D1B8.h"
|
||||
#include "unk_02046C7C.h"
|
||||
#include "unk_020474B8.h"
|
||||
#include "unk_02048614.h"
|
||||
#include "unk_02048BD0.h"
|
||||
#include "unk_02048DD8.h"
|
||||
@@ -988,7 +988,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_BufferPartyMonNickname,
|
||||
ScrCmd_BufferPoketchAppName,
|
||||
ScrCmd_BufferTrainerClassName,
|
||||
ScrCmd_0D9,
|
||||
ScrCmd_BufferTrainerClassFromAppearance,
|
||||
ScrCmd_BufferSpeciesNameFromVar,
|
||||
ScrCmd_BufferPlayerStarterSpeciesName,
|
||||
ScrCmd_BufferRivalStarterSpeciesName,
|
||||
@@ -997,7 +997,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_BufferUndergroundGoodsName,
|
||||
ScrCmd_BufferUndergroundTrapName,
|
||||
ScrCmd_BufferUndergroundItemName,
|
||||
ScrCmd_0E2,
|
||||
ScrCmd_BufferMapName,
|
||||
ScrCmd_GetSwarmMapAndSpecies,
|
||||
ScrCmd_GetTrainerID,
|
||||
ScrCmd_StartTrainerBattle,
|
||||
@@ -1150,8 +1150,8 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_178,
|
||||
ScrCmd_179,
|
||||
ScrCmd_17A,
|
||||
ScrCmd_17B,
|
||||
ScrCmd_17C,
|
||||
ScrCmd_BufferBerryName,
|
||||
ScrCmd_BufferNatureName,
|
||||
ScrCmd_17D,
|
||||
ScrCmd_17E,
|
||||
ScrCmd_17F,
|
||||
@@ -1230,7 +1230,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_GetPartyMonMoveCount,
|
||||
ScrCmd_1C9,
|
||||
ScrCmd_1CA,
|
||||
ScrCmd_1CB,
|
||||
ScrCmd_BufferPartyMoveName,
|
||||
ScrCmd_GiveJournal,
|
||||
ScrCmd_CreateJournalEvent,
|
||||
ScrCmd_Unused_1CE,
|
||||
@@ -1333,7 +1333,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_22F,
|
||||
ScrCmd_GetPartyMonRibbon,
|
||||
ScrCmd_SetPartyMonRibbon,
|
||||
ScrCmd_232,
|
||||
ScrCmd_BufferRibbonName,
|
||||
ScrCmd_GetPartyMonEVTotal,
|
||||
ScrCmd_GetDayOfWeek,
|
||||
ScrCmd_235,
|
||||
@@ -1397,7 +1397,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_ClearSpiritombCounter,
|
||||
ScrCmd_SetHiddenLocation,
|
||||
ScrCmd_271,
|
||||
ScrCmd_272,
|
||||
ScrCmd_BufferTabletName,
|
||||
ScrCmd_273,
|
||||
ScrCmd_HasCoinsFromValue,
|
||||
ScrCmd_CheckBonusRoundStreak,
|
||||
@@ -1411,7 +1411,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_27D,
|
||||
ScrCmd_CheckIsDepartmentStoreRegular,
|
||||
ScrCmd_27F,
|
||||
ScrCmd_280,
|
||||
ScrCmd_BufferVarPaddingDigits,
|
||||
ScrCmd_GetPartyMonContestStat,
|
||||
ScrCmd_CheckIsTodayPlayerBirthday,
|
||||
ScrCmd_SetInitialVolumeForSequence,
|
||||
@@ -1462,7 +1462,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_2B0,
|
||||
ScrCmd_2B1,
|
||||
ScrCmd_2B2,
|
||||
ScrCmd_2B3,
|
||||
ScrCmd_BufferBallSealName,
|
||||
ScrCmd_LockLastTalked,
|
||||
ScrCmd_2B5,
|
||||
ScrCmd_2B6,
|
||||
@@ -1522,13 +1522,13 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_ShowShardsCost,
|
||||
ScrCmd_CloseShardCostWindow,
|
||||
ScrCmd_JudgeStats,
|
||||
ScrCmd_2EF,
|
||||
ScrCmd_BufferStatName,
|
||||
ScrCmd_InitPersistedMapFeaturesForVilla,
|
||||
ScrCmd_2F1,
|
||||
ScrCmd_InitPersistedMapFeaturesForDistortionWorld,
|
||||
ScrCmd_2F3,
|
||||
ScrCmd_BufferTrainerName,
|
||||
ScrCmd_2F4,
|
||||
ScrCmd_BufferNumberPaddingDigits,
|
||||
ScrCmd_BufferValuePaddingDigits,
|
||||
ScrCmd_2F6,
|
||||
ScrCmd_2F7,
|
||||
ScrCmd_SetScene22,
|
||||
@@ -1536,7 +1536,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_GetCurrentBGM,
|
||||
ScrCmd_2FB,
|
||||
ScrCmd_2FC,
|
||||
ScrCmd_2FD,
|
||||
ScrCmd_BufferTypeName,
|
||||
ScrCmd_GetItemQuantity,
|
||||
ScrCmd_2FF,
|
||||
ScrCmd_300,
|
||||
@@ -1599,17 +1599,17 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
||||
ScrCmd_339,
|
||||
ScrCmd_SetMenuXOriginSide,
|
||||
ScrCmd_SetMenuYOriginSide,
|
||||
ScrCmd_33C,
|
||||
ScrCmd_BufferItemNameWithArticle,
|
||||
ScrCmd_BufferItemNamePlural,
|
||||
ScrCmd_33E,
|
||||
ScrCmd_33F,
|
||||
ScrCmd_340,
|
||||
ScrCmd_341,
|
||||
ScrCmd_BufferUndergroundGoodsNameWithArticle,
|
||||
ScrCmd_BufferUndergroundTrapNameWithArticle,
|
||||
ScrCmd_BufferUndergroundItemNameWithArticle,
|
||||
ScrCmd_BufferSpeciesNameWithArticle,
|
||||
ScrCmd_BufferPlayerCounterpartStarterSpeciesNameWithArticle,
|
||||
ScrCmd_343,
|
||||
ScrCmd_344,
|
||||
ScrCmd_345,
|
||||
ScrCmd_346,
|
||||
ScrCmd_BufferAccessoryNameWithArticle,
|
||||
ScrCmd_BufferTrainerClassNameWithArticle,
|
||||
ScrCmd_BufferBallSealNamePlural,
|
||||
ScrCmd_CapitalizeFirstLetter,
|
||||
ScrCmd_BufferFloorNumber,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "unk_020474B8.h"
|
||||
#include "scrcmd_strings.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <nitro/code16.h>
|
||||
@@ -33,17 +33,17 @@
|
||||
#include "unk_0205DFC4.h"
|
||||
#include "vars_flags.h"
|
||||
|
||||
static Strbuf *GetSpeciesNameStrbuf(u16 param0, u32 param1);
|
||||
static Strbuf *GetSpeciesNameStrbuf(u16 speciesId, u32 heapID);
|
||||
|
||||
BOOL ScrCmd_2EF(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferStatName(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u8 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u8 stat = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetPokemonStatName(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetPokemonStatName(*strTemplate, templateArg, stat);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferPlayerName(ScriptContext *ctx)
|
||||
@@ -88,15 +88,15 @@ BOOL ScrCmd_BufferPartyMonSpecies(ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_2FD(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferTypeName(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 type = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetPokemonTypeName(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetPokemonTypeName(*strTemplate, templateArg, type);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferItemName(ScriptContext *ctx)
|
||||
@@ -155,24 +155,24 @@ BOOL ScrCmd_BufferNumber(ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_280(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferVarPaddingDigits(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
u8 v4 = ScriptContext_ReadByte(param0);
|
||||
u8 v5 = ScriptContext_ReadByte(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 value = ScriptContext_GetVar(ctx);
|
||||
u8 paddingMode = ScriptContext_ReadByte(ctx);
|
||||
u8 maxDigits = ScriptContext_ReadByte(ctx);
|
||||
|
||||
if (v4 == 0) {
|
||||
v5 = GetNumberDigitCount(v3);
|
||||
if (paddingMode == PADDING_MODE_NONE) {
|
||||
maxDigits = GetNumberDigitCount(value);
|
||||
}
|
||||
|
||||
StringTemplate_SetNumber(*v1, v2, v3, v5, v4, 1);
|
||||
return 0;
|
||||
StringTemplate_SetNumber(*strTemplate, templateArg, value, maxDigits, paddingMode, CHARSET_MODE_EN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferNumberPaddingDigits(ScriptContext *ctx)
|
||||
BOOL ScrCmd_BufferValuePaddingDigits(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
@@ -185,7 +185,7 @@ BOOL ScrCmd_BufferNumberPaddingDigits(ScriptContext *ctx)
|
||||
maxDigits = GetNumberDigitCount(value);
|
||||
}
|
||||
|
||||
StringTemplate_SetNumber(*strTemplate, templateArg, value, maxDigits, paddingMode, 1);
|
||||
StringTemplate_SetNumber(*strTemplate, templateArg, value, maxDigits, paddingMode, CHARSET_MODE_EN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -240,18 +240,17 @@ BOOL ScrCmd_BufferTrainerClassName(ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_0D9(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferTrainerClassFromAppearance(ScriptContext *ctx)
|
||||
{
|
||||
int v0;
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
TrainerInfo *v2 = SaveData_GetTrainerInfo(FieldSystem_GetSaveData(param0->fieldSystem));
|
||||
StringTemplate **v3 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v4 = ScriptContext_ReadByte(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(FieldSystem_GetSaveData(ctx->fieldSystem));
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
|
||||
v0 = sub_0205CA14(TrainerInfo_Gender(v2), TrainerInfo_Appearance(v2), 2);
|
||||
StringTemplate_SetTrainerClassNameWithArticle(*v3, v4, v0);
|
||||
int trainerClass = sub_0205CA14(TrainerInfo_Gender(trainerInfo), TrainerInfo_Appearance(trainerInfo), 2);
|
||||
StringTemplate_SetTrainerClassNameWithArticle(*strTemplate, templateArg, trainerClass);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferSpeciesNameFromVar(ScriptContext *ctx)
|
||||
@@ -260,14 +259,14 @@ BOOL ScrCmd_BufferSpeciesNameFromVar(ScriptContext *ctx)
|
||||
StringTemplate **template = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 bufferId = ScriptContext_ReadByte(ctx);
|
||||
u16 species = ScriptContext_GetVar(ctx);
|
||||
u16 v4 = ScriptContext_ReadHalfWord(ctx);
|
||||
u8 v5 = ScriptContext_ReadByte(ctx);
|
||||
u16 unused1 = ScriptContext_ReadHalfWord(ctx);
|
||||
u8 unused2 = ScriptContext_ReadByte(ctx);
|
||||
Strbuf *buffer = GetSpeciesNameStrbuf(species, HEAP_ID_FIELD1);
|
||||
|
||||
StringTemplate_SetStrbuf(*template, bufferId, buffer, v4, v5, GAME_LANGUAGE);
|
||||
StringTemplate_SetStrbuf(*template, bufferId, buffer, unused1, unused2, 2);
|
||||
Strbuf_Free(buffer);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static Strbuf *GetSpeciesNameStrbuf(u16 speciesId, u32 heapID)
|
||||
@@ -351,42 +350,42 @@ BOOL ScrCmd_BufferUndergroundItemName(ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_0E2(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferMapName(ScriptContext *ctx)
|
||||
{
|
||||
Strbuf *v0 = Strbuf_Init(22, HEAP_ID_FIELD1);
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(param0->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
Strbuf *mapName = Strbuf_Init(22, HEAP_ID_FIELD1);
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 mapHeaderID = ScriptContext_GetVar(ctx);
|
||||
|
||||
MapHeader_LoadName(v3, 4, v0);
|
||||
StringTemplate_SetStrbuf(*v1, v2, v0, 0, 1, GAME_LANGUAGE);
|
||||
Strbuf_Free(v0);
|
||||
MapHeader_LoadName(mapHeaderID, HEAP_ID_FIELD1, mapName);
|
||||
StringTemplate_SetStrbuf(*strTemplate, templateArg, mapName, 0, 1, 2);
|
||||
Strbuf_Free(mapName);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_17B(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferBerryName(ScriptContext *ctx)
|
||||
{
|
||||
StringTemplate **v0 = FieldSystem_GetScriptMemberPtr(param0->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v1 = ScriptContext_ReadByte(param0);
|
||||
u16 v2 = ScriptContext_GetVar(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
Strbuf *v4 = BerryData_AllocAndGetName(v2 - 149, 32);
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 item = ScriptContext_GetVar(ctx);
|
||||
u16 unused = ScriptContext_GetVar(ctx);
|
||||
Strbuf *berryName = BerryData_AllocAndGetName(item - FIRST_BERRY_IDX, HEAP_ID_FIELD3);
|
||||
|
||||
StringTemplate_SetStrbuf(*v0, v1, v4, 0, (v3 < 2 ? 1 : 0), GAME_LANGUAGE);
|
||||
Strbuf_Free(v4);
|
||||
StringTemplate_SetStrbuf(*strTemplate, templateArg, berryName, 0, (unused < 2 ? 1 : 0), 2);
|
||||
Strbuf_Free(berryName);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_17C(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferNatureName(ScriptContext *ctx)
|
||||
{
|
||||
StringTemplate **v0 = FieldSystem_GetScriptMemberPtr(param0->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v1 = ScriptContext_ReadByte(param0);
|
||||
u16 v2 = ScriptContext_GetVar(param0);
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 nature = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetNatureName(*v0, v1, v2);
|
||||
return 0;
|
||||
StringTemplate_SetNatureName(*strTemplate, templateArg, nature);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferAccessoryName(ScriptContext *ctx)
|
||||
@@ -400,84 +399,81 @@ BOOL ScrCmd_BufferAccessoryName(ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_272(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferTabletName(ScriptContext *ctx)
|
||||
{
|
||||
Strbuf *v0;
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v2 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v3 = ScriptContext_ReadByte(param0);
|
||||
Strbuf *tabletName;
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
|
||||
v0 = Strbuf_Init(10 + 1, HEAP_ID_FIELD2);
|
||||
tabletName = Strbuf_Init(11, HEAP_ID_FIELD2);
|
||||
|
||||
Strbuf_CopyChars(v0, MiscSaveBlock_TabletName(SaveData_MiscSaveBlock(param0->fieldSystem->saveData)));
|
||||
StringTemplate_SetStrbuf(*v2, v3, v0, 0, 0, gGameLanguage);
|
||||
Strbuf_Free(v0);
|
||||
Strbuf_CopyChars(tabletName, MiscSaveBlock_TabletName(SaveData_MiscSaveBlock(ctx->fieldSystem->saveData)));
|
||||
StringTemplate_SetStrbuf(*strTemplate, templateArg, tabletName, 0, 0, gGameLanguage);
|
||||
Strbuf_Free(tabletName);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_1CB(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferPartyMoveName(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
Pokemon *v1;
|
||||
StringTemplate **v2 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v3 = ScriptContext_ReadByte(param0);
|
||||
u16 v4 = ScriptContext_GetVar(param0);
|
||||
u16 v5 = ScriptContext_GetVar(param0);
|
||||
u16 v6;
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 partySlot = ScriptContext_GetVar(ctx);
|
||||
u16 moveSlot = ScriptContext_GetVar(ctx);
|
||||
Pokemon *mon = Party_GetPokemonBySlotIndex(SaveData_GetParty(fieldSystem->saveData), partySlot);
|
||||
u16 move = Pokemon_GetValue(mon, MON_DATA_MOVE1 + moveSlot, NULL);
|
||||
|
||||
v1 = Party_GetPokemonBySlotIndex(SaveData_GetParty(fieldSystem->saveData), v4);
|
||||
v6 = Pokemon_GetValue(v1, MON_DATA_MOVE1 + v5, NULL);
|
||||
|
||||
StringTemplate_SetMoveName(*v2, v3, v6);
|
||||
return 0;
|
||||
StringTemplate_SetMoveName(*strTemplate, templateArg, move);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_232(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferRibbonName(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
u16 v4 = Ribbon_GetData(v3, RIBBON_DATA_NAME_ID);
|
||||
StringTemplate_SetRibbonName(*v1, v2, v4);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 ribbon = ScriptContext_GetVar(ctx);
|
||||
u16 ribbonNameID = Ribbon_GetData(ribbon, RIBBON_DATA_NAME_ID);
|
||||
StringTemplate_SetRibbonName(*strTemplate, templateArg, ribbonNameID);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_2B3(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferBallSealName(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 ballSeal = ScriptContext_GetVar(ctx);
|
||||
|
||||
v3 -= 1;
|
||||
StringTemplate_SetBallSealName(*v1, v2, v3);
|
||||
ballSeal -= 1;
|
||||
StringTemplate_SetBallSealName(*strTemplate, templateArg, ballSeal);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_2F3(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferTrainerName(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 trainerID = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetTrainerName(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetTrainerName(*strTemplate, templateArg, trainerID);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_33C(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferItemNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 item = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetItemNameWithArticle(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetItemNameWithArticle(*strTemplate, templateArg, item);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferItemNamePlural(ScriptContext *ctx)
|
||||
@@ -491,50 +487,50 @@ BOOL ScrCmd_BufferItemNamePlural(ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_33E(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferUndergroundGoodsNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 goods = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetUndergroundGoodsNameWithArticle(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetUndergroundGoodsNameWithArticle(*strTemplate, templateArg, goods);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_33F(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferUndergroundTrapNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 trap = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetUndergroundTrapNameWithArticle(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetUndergroundTrapNameWithArticle(*strTemplate, templateArg, trap);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_340(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferUndergroundItemNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 item = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetUndergroundItemNameWithArticle(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetUndergroundItemNameWithArticle(*strTemplate, templateArg, item);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_341(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferSpeciesNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
u16 v4 = ScriptContext_ReadHalfWord(param0);
|
||||
u8 v5 = ScriptContext_ReadByte(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 species = ScriptContext_GetVar(ctx);
|
||||
u16 unused1 = ScriptContext_ReadHalfWord(ctx);
|
||||
u8 unused2 = ScriptContext_ReadByte(ctx);
|
||||
|
||||
StringTemplate_SetSpeciesNameWithArticleByID(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetSpeciesNameWithArticleByID(*strTemplate, templateArg, species);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferPlayerCounterpartStarterSpeciesNameWithArticle(ScriptContext *ctx)
|
||||
@@ -547,58 +543,58 @@ BOOL ScrCmd_BufferPlayerCounterpartStarterSpeciesNameWithArticle(ScriptContext *
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_343(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferAccessoryNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 accessory = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetContestAccessoryNameWithArticle(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetContestAccessoryNameWithArticle(*strTemplate, templateArg, accessory);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_344(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferTrainerClassNameWithArticle(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 trainerClass = ScriptContext_GetVar(ctx);
|
||||
|
||||
StringTemplate_SetTrainerClassNameWithArticle(*v1, v2, v3);
|
||||
return 0;
|
||||
StringTemplate_SetTrainerClassNameWithArticle(*strTemplate, templateArg, trainerClass);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_345(ScriptContext *param0)
|
||||
BOOL ScrCmd_BufferBallSealNamePlural(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
u16 v3 = ScriptContext_GetVar(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u16 ballSeal = ScriptContext_GetVar(ctx);
|
||||
|
||||
v3 -= 1;
|
||||
StringTemplate_SetBallSealNamePlural(*v1, v2, v3);
|
||||
ballSeal -= 1;
|
||||
StringTemplate_SetBallSealNamePlural(*strTemplate, templateArg, ballSeal);
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_346(ScriptContext *param0)
|
||||
BOOL ScrCmd_CapitalizeFirstLetter(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = param0->fieldSystem;
|
||||
StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 v2 = ScriptContext_ReadByte(param0);
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
|
||||
StringTemplate_CapitalizeArgAtIndex(*v1, v2);
|
||||
return 0;
|
||||
StringTemplate_CapitalizeArgAtIndex(*strTemplate, templateArg);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BufferFloorNumber(ScriptContext *ctx)
|
||||
{
|
||||
FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
StringTemplate **stringTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
StringTemplate **strTemplate = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE);
|
||||
u8 templateArg = ScriptContext_ReadByte(ctx);
|
||||
u8 floor = ScriptContext_ReadByte(ctx);
|
||||
|
||||
StringTemplate_SetDepartmentStoreFloor(*stringTemplate, templateArg, floor);
|
||||
StringTemplate_SetFloorNumber(*strTemplate, templateArg, floor);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -609,7 +609,7 @@ void StringTemplate_CapitalizeArgAtIndex(StringTemplate *template, u32 idx)
|
||||
Strbuf_UpperChar(template->args[idx].strbuf, 0);
|
||||
}
|
||||
|
||||
void StringTemplate_SetDepartmentStoreFloor(StringTemplate *template, u32 idx, u32 floor)
|
||||
void StringTemplate_SetFloorNumber(StringTemplate *template, u32 idx, u32 floor)
|
||||
{
|
||||
MessageLoader *loader = InitMessageLoader(TEXT_BANK_MENU_ENTRIES, template->heapID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user