mirror of
https://github.com/pret/pokediamond.git
synced 2026-08-08 11:44:58 -05:00
Decompile scrcmd_4 -> scrcmd_names
This commit is contained in:
parent
98a3dd5714
commit
cbe18ecb3e
|
|
@ -155,7 +155,7 @@ Static arm9
|
|||
Object scrcmd_asm.o
|
||||
Object scrcmd_2.o
|
||||
Object scrcmd_3.o
|
||||
Object scrcmd_4.o
|
||||
Object scrcmd_names.o
|
||||
Object scrcmd_5.o
|
||||
Object scrcmd_6.o
|
||||
Object scrcmd_7.o
|
||||
|
|
|
|||
1313
arm9/asm/scrcmd_4.s
1313
arm9/asm/scrcmd_4.s
File diff suppressed because it is too large
Load Diff
|
|
@ -354,28 +354,28 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203CB20
|
||||
.word FUN_0203CB48
|
||||
.word FUN_0203CB60
|
||||
.word FUN_020406CC
|
||||
.word FUN_02040700
|
||||
.word FUN_02040724
|
||||
.word FUN_02040748
|
||||
.word FUN_02040790
|
||||
.word FUN_020407C8
|
||||
.word FUN_02040800
|
||||
.word FUN_0204083C
|
||||
.word FUN_02040874
|
||||
.word FUN_0204091C
|
||||
.word FUN_020409C0
|
||||
.word FUN_020409F8
|
||||
.word FUN_02040A30
|
||||
.word FUN_02040A7C
|
||||
.word FUN_02040B0C
|
||||
.word FUN_02040B5C
|
||||
.word FUN_02040BAC
|
||||
.word ScrCmd_GetPlayerName
|
||||
.word ScrCmd_GetRivalName
|
||||
.word ScrCmd_GetFriendName
|
||||
.word ScrCmd_Unk00D0
|
||||
.word ScrCmd_GetItemName
|
||||
.word ScrCmd_GetPocketName
|
||||
.word ScrCmd_GetTMHMMoveName
|
||||
.word ScrCmd_GetMoveName
|
||||
.word ScrCmd_Unk00D5
|
||||
.word ScrCmd_Unk00D6
|
||||
.word ScrCmd_GetPoketchAppName
|
||||
.word ScrCmd_GetTrainerClassName
|
||||
.word ScrCmd_Unk00D9
|
||||
.word ScrCmd_Unk00DA
|
||||
.word ScrCmd_Unk00DB
|
||||
.word ScrCmd_Unk00DC
|
||||
.word ScrCmd_Unk00DD
|
||||
.word FUN_0203CBBC
|
||||
.word FUN_02040BFC
|
||||
.word FUN_02040C34
|
||||
.word FUN_02040C6C
|
||||
.word FUN_02040CA4
|
||||
.word ScrCmd_GetDecorationName
|
||||
.word ScrCmd_GetUndergroundTrapName
|
||||
.word ScrCmd_GetUndergroundItemName
|
||||
.word ScrCmd_Unk00E2
|
||||
.word FUN_0203CB70
|
||||
.word FUN_0204185C
|
||||
.word FUN_0204188C
|
||||
|
|
@ -528,8 +528,8 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203C460
|
||||
.word FUN_0203C4B0
|
||||
.word FUN_0203D958
|
||||
.word FUN_02040D04
|
||||
.word FUN_02040D7C
|
||||
.word ScrCmd_Unk017B
|
||||
.word ScrCmd_GetNatureName
|
||||
.word ScrCmd_Unk017D
|
||||
.word ScrCmd_Unk017E
|
||||
.word ScrCmd_Unk017F
|
||||
|
|
@ -608,7 +608,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_02044D8C
|
||||
.word FUN_02044E34
|
||||
.word FUN_02044E78
|
||||
.word FUN_02040E4C
|
||||
.word ScrCmd_GetPokemonMoveName
|
||||
.word FUN_0203E138
|
||||
.word FUN_0203E168
|
||||
.word FUN_0203E254
|
||||
|
|
@ -711,7 +711,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0204505C
|
||||
.word FUN_02045104
|
||||
.word FUN_02045170
|
||||
.word FUN_02040EB4
|
||||
.word ScrCmd_Unk0232
|
||||
.word FUN_0203E9CC
|
||||
.word FUN_0203EA68
|
||||
.word FUN_02041E40
|
||||
|
|
@ -742,7 +742,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_02041194
|
||||
.word FUN_020411C4
|
||||
.word FUN_02041340
|
||||
.word FUN_02040964
|
||||
.word ScrCmd_Unk0251
|
||||
.word ScrCmd_pcfreespace
|
||||
.word ScrCmd_Unk0253
|
||||
.word ScrCmd_Unk0254
|
||||
|
|
@ -758,7 +758,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203EE58
|
||||
.word FUN_0203EE68
|
||||
.word FUN_0203EE78
|
||||
.word FUN_02040DB4
|
||||
.word ScrCmd_GetFashionName
|
||||
.word FUN_0203EE98
|
||||
.word FUN_0203EED8
|
||||
.word FUN_0203EF58
|
||||
|
|
@ -775,7 +775,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203F254
|
||||
.word FUN_0203F26C
|
||||
.word FUN_0203C58C
|
||||
.word FUN_02040DEC
|
||||
.word ScrCmd_Unk0272
|
||||
.word FUN_0203F2AC
|
||||
.word ScrCmd_HasEnoughCoinsImmediate
|
||||
.word FUN_0203F2E4
|
||||
|
|
@ -789,7 +789,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203F3AC
|
||||
.word FUN_0203F44C
|
||||
.word FUN_0203F418
|
||||
.word FUN_020408BC
|
||||
.word ScrCmd_Unk0280
|
||||
.word FUN_02044A0C
|
||||
.word FUN_0203F484
|
||||
.word FUN_02041674
|
||||
|
|
@ -840,7 +840,7 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203FB94
|
||||
.word FUN_0203FBA0
|
||||
.word FUN_0203FBAC
|
||||
.word FUN_02040EF8
|
||||
.word ScrCmd_GetSealName
|
||||
.word FUN_0203B2E0
|
||||
.word FUN_0203FBBC
|
||||
.word FUN_0203FC1C
|
||||
|
|
@ -857,17 +857,17 @@ gScriptCmdTable: ; 0x020F355C
|
|||
.word FUN_0203FC80
|
||||
.word FUN_0203FCB0
|
||||
.word FUN_0203FCDC
|
||||
.word FUN_02040F34
|
||||
.word FUN_02040F6C
|
||||
.word FUN_02040FA4
|
||||
.word FUN_02040FDC
|
||||
.word FUN_02041014
|
||||
.word FUN_0204104C
|
||||
.word FUN_02041094
|
||||
.word FUN_020410C8
|
||||
.word FUN_02041100
|
||||
.word FUN_02041138
|
||||
.word FUN_02041174
|
||||
.word ScrCmd_GetItemNameWithIndefArticle
|
||||
.word ScrCmd_GetItemNamePlural
|
||||
.word ScrCmd_GetDecorationNameWithArticle
|
||||
.word ScrCmd_GetUndergroundTrapNameWithArticle
|
||||
.word ScrCmd_GetUndergroundItemNameWithArticle
|
||||
.word ScrCmd_Unk02C9
|
||||
.word ScrCmd_Unk02CA
|
||||
.word ScrCmd_GetFashionNameWithArticle
|
||||
.word ScrCmd_Unk02CC
|
||||
.word ScrCmd_GetSealNamePlural
|
||||
.word ScrCmd_CapitalizeFirstChar
|
||||
.word ScrCmd_Unk02CF
|
||||
.word ScrCmd_Unk02D0
|
||||
|
||||
|
|
|
|||
|
|
@ -3152,47 +3152,47 @@
|
|||
.extern FUN_0204064C
|
||||
.extern FUN_02040660
|
||||
.extern FUN_020406C0
|
||||
.extern FUN_020406CC
|
||||
.extern FUN_02040700
|
||||
.extern FUN_02040724
|
||||
.extern FUN_02040748
|
||||
.extern FUN_02040790
|
||||
.extern FUN_020407C8
|
||||
.extern FUN_02040800
|
||||
.extern FUN_0204083C
|
||||
.extern FUN_02040874
|
||||
.extern FUN_020408BC
|
||||
.extern FUN_0204091C
|
||||
.extern FUN_02040964
|
||||
.extern FUN_020409C0
|
||||
.extern FUN_020409F8
|
||||
.extern FUN_02040A30
|
||||
.extern FUN_02040A7C
|
||||
.extern FUN_02040B0C
|
||||
.extern FUN_02040B5C
|
||||
.extern FUN_02040BAC
|
||||
.extern FUN_02040BFC
|
||||
.extern FUN_02040C34
|
||||
.extern FUN_02040C6C
|
||||
.extern FUN_02040CA4
|
||||
.extern FUN_02040D04
|
||||
.extern FUN_02040D7C
|
||||
.extern FUN_02040DB4
|
||||
.extern FUN_02040DEC
|
||||
.extern FUN_02040E4C
|
||||
.extern FUN_02040EB4
|
||||
.extern FUN_02040EF8
|
||||
.extern FUN_02040F34
|
||||
.extern FUN_02040F6C
|
||||
.extern FUN_02040FA4
|
||||
.extern FUN_02040FDC
|
||||
.extern FUN_02041014
|
||||
.extern FUN_0204104C
|
||||
.extern FUN_02041094
|
||||
.extern FUN_020410C8
|
||||
.extern FUN_02041100
|
||||
.extern FUN_02041138
|
||||
.extern FUN_02041174
|
||||
.extern ScrCmd_GetPlayerName
|
||||
.extern ScrCmd_GetRivalName
|
||||
.extern ScrCmd_GetFriendName
|
||||
.extern ScrCmd_Unk00D0
|
||||
.extern ScrCmd_GetItemName
|
||||
.extern ScrCmd_GetPocketName
|
||||
.extern ScrCmd_GetTMHMMoveName
|
||||
.extern ScrCmd_GetMoveName
|
||||
.extern ScrCmd_Unk00D5
|
||||
.extern ScrCmd_Unk0280
|
||||
.extern ScrCmd_Unk00D6
|
||||
.extern ScrCmd_Unk0251
|
||||
.extern ScrCmd_GetPoketchAppName
|
||||
.extern ScrCmd_GetTrainerClassName
|
||||
.extern ScrCmd_Unk00D9
|
||||
.extern ScrCmd_Unk00DA
|
||||
.extern ScrCmd_Unk00DB
|
||||
.extern ScrCmd_Unk00DC
|
||||
.extern ScrCmd_Unk00DD
|
||||
.extern ScrCmd_GetDecorationName
|
||||
.extern ScrCmd_GetUndergroundTrapName
|
||||
.extern ScrCmd_GetUndergroundItemName
|
||||
.extern ScrCmd_Unk00E2
|
||||
.extern ScrCmd_Unk017B
|
||||
.extern ScrCmd_GetNatureName
|
||||
.extern ScrCmd_GetFashionName
|
||||
.extern ScrCmd_Unk0272
|
||||
.extern ScrCmd_GetPokemonMoveName
|
||||
.extern ScrCmd_Unk0232
|
||||
.extern ScrCmd_GetSealName
|
||||
.extern ScrCmd_GetItemNameWithIndefArticle
|
||||
.extern ScrCmd_GetItemNamePlural
|
||||
.extern ScrCmd_GetDecorationNameWithArticle
|
||||
.extern ScrCmd_GetUndergroundTrapNameWithArticle
|
||||
.extern ScrCmd_GetUndergroundItemNameWithArticle
|
||||
.extern ScrCmd_Unk02C9
|
||||
.extern ScrCmd_Unk02CA
|
||||
.extern ScrCmd_GetFashionNameWithArticle
|
||||
.extern ScrCmd_Unk02CC
|
||||
.extern ScrCmd_GetSealNamePlural
|
||||
.extern ScrCmd_CapitalizeFirstChar
|
||||
.extern FUN_02041194
|
||||
.extern FUN_020411C4
|
||||
.extern FUN_02041340
|
||||
|
|
|
|||
540
arm9/src/scrcmd_names.c
Normal file
540
arm9/src/scrcmd_names.c
Normal file
|
|
@ -0,0 +1,540 @@
|
|||
#include "scrcmd.h"
|
||||
#include "event_data.h"
|
||||
#include "itemtool.h"
|
||||
#include "nutdata.h"
|
||||
#include "party.h"
|
||||
#include "player_data.h"
|
||||
#include "script_buffers.h"
|
||||
#include "unk_02024E64.h"
|
||||
#include "unk_02064E4C.h"
|
||||
#include "unk_0207FC5C.h"
|
||||
|
||||
extern void* FUN_02039438(struct UnkSavStruct80* sav_ptr, int idx);
|
||||
|
||||
extern u32 FUN_020536D0(u32 gender, u32 avatar, u32 a2);
|
||||
extern u32 FUN_0205F388(struct ScriptState* state);
|
||||
extern u32 FUN_0205F398(struct ScriptState* state);
|
||||
extern struct PCStorage* GetStoragePCPointer(struct SaveBlock2* sav2);
|
||||
extern u32 FUN_0205F3C0(struct ScriptState* state);
|
||||
extern u32 FUN_02054C14(u32 number);
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(sav_ptr);
|
||||
struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
|
||||
|
||||
BufferPlayersName(*mgr, idx, player);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
|
||||
BufferRivalsName(*mgr, idx, sav_ptr->saveBlock2);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
|
||||
BufferFriendsName(*mgr, idx, sav_ptr->saveBlock2);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00D0(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(sav_ptr->saveBlock2);
|
||||
struct Pokemon* mon = GetPartyMonByIndex(party, mon_idx);
|
||||
|
||||
BufferBoxMonSpeciesName(*mgr, idx, &mon->box);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetItemName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferItemName(*mgr, idx, item);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 pocket = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferPocketName(*mgr, idx, pocket);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 tmhm = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u16 move = TMHMGetMove(tmhm);
|
||||
|
||||
BufferMoveName(*mgr, idx, move);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 move = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferMoveName(*mgr, idx, move);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u32 digits = FUN_02054C14(unk);
|
||||
|
||||
BufferIntegerAsString(*mgr, idx, unk, digits, 1, TRUE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0280(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u8 unk2 = ScriptReadByte(ctx);
|
||||
u8 digits = ScriptReadByte(ctx);
|
||||
if (unk2 == 0)
|
||||
{
|
||||
digits = (u8)FUN_02054C14(unk);
|
||||
}
|
||||
|
||||
BufferIntegerAsString(*mgr, idx, unk, digits, unk2, TRUE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00D6(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(sav_ptr->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
|
||||
BufferBoxMonNickname(*mgr, idx, &pokemon->box);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0251(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct PCStorage* pc = GetStoragePCPointer(sav_ptr->saveBlock2);
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 box_mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
s32 box_no = box_mon_idx / 30;
|
||||
s32 slot_no = box_mon_idx % 30;
|
||||
struct BoxPokemon* box_mon = PCStorage_GetMonByIndexPair(pc, box_no, slot_no);
|
||||
|
||||
BufferBoxMonNickname(*mgr, idx, box_mon);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 app = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferPoketchAppName(*mgr, idx, app);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 trainer_class = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferTrainerClassName(*mgr, idx, trainer_class);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(sav_ptr);
|
||||
struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u32 gender = PlayerProfile_GetTrainerGender(player);
|
||||
u32 avatar = PlayerProfile_GetAvatar(player);
|
||||
u32 trainer_class = FUN_020536D0(gender, avatar, 2);
|
||||
|
||||
BufferTrainerClassNameWithArticle(*mgr, idx, trainer_class);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 msg_no = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u16 unk1 = ScriptReadHalfword(ctx);
|
||||
u8 unk2 = ScriptReadByte(ctx);
|
||||
struct String* str = FUN_02040AE4(msg_no, 4);
|
||||
|
||||
BufferString(*mgr, idx, str, unk1, unk2, 2);
|
||||
String_dtor(str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC struct String* FUN_02040AE4(u32 msg_no, u32 heap_id)
|
||||
{
|
||||
struct MsgData* msg_data = NewMsgDataFromNarc(1, NARC_MSGDATA_MSG, 362, heap_id);
|
||||
struct String* ret = NewString_ReadMsgData(msg_data, msg_no);
|
||||
DestroyMsgData(msg_data);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00DB(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
|
||||
u32 msg_no = FUN_0205F388(state);
|
||||
struct String* str = FUN_02040AE4(msg_no, 4);
|
||||
|
||||
BufferString(*mgr, idx, str, 0, 1, 2);
|
||||
String_dtor(str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00DC(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
|
||||
u32 msg_no = FUN_0205F398(state);
|
||||
struct String* str = FUN_02040AE4(msg_no, 4);
|
||||
|
||||
BufferString(*mgr, idx, str, 0, 1, 2);
|
||||
String_dtor(str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00DD(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
|
||||
u32 msg_no = FUN_0205F3C0(state);
|
||||
struct String* str = FUN_02040AE4(msg_no, 4);
|
||||
|
||||
BufferString(*mgr, idx, str, 0, 1, 2);
|
||||
String_dtor(str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 decoration = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferDecorationName(*mgr, idx, decoration);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_trap = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferUndergroundTrapName(*mgr, idx, underground_trap);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferUndergroundItemName(*mgr, idx, underground_item);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00E2(struct ScriptContext* ctx)
|
||||
{
|
||||
struct String* str = String_ctor(22, 4);
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 map_no = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
FUN_02064E60(map_no, 4, str);
|
||||
BufferString(*mgr, idx, str, 0, 1, 2);
|
||||
String_dtor(str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk017B(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 berry = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
struct String* nut_name = GetNutName((u16)(berry - FIRST_BERRY_IDX), 32);
|
||||
|
||||
BufferString(*mgr, idx, nut_name, 0, unk < 2, 2);
|
||||
String_dtor(nut_name);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 nature = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferNatureName(*mgr, idx, nature);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 fashion = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferFashionName(*mgr, idx, fashion);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0272(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct String* str = String_ctor(11, 11);
|
||||
struct UnkStruct_02024E64* unk = FUN_02024EB4(ctx->unk80->saveBlock2);
|
||||
u16* unk_buffer = FUN_02024F0C(unk);
|
||||
|
||||
CopyU16ArrayToString(str, unk_buffer);
|
||||
BufferString(*mgr, idx, str, 0, 0, gGameLanguage);
|
||||
String_dtor(str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct UnkSavStruct80* sav_ptr = ctx->unk80;
|
||||
struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u16 mon_move_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(sav_ptr->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
u16 move = (u16)GetMonData(pokemon, MON_DATA_MOVE1 + mon_move_idx, NULL);
|
||||
|
||||
BufferMoveName(*mgr, idx, move);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0232(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u8 unk = (u8)VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u16 ribbon = (u16)FUN_0207FC5C(unk, 3);
|
||||
|
||||
BufferRibbonNameOrDesc(*mgr, idx, ribbon);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetSealName(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 seal = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferSealName(*mgr, idx, (u16)(seal - 1));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferItemNameWithIndefArticle(*mgr, idx, item);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferItemNamePlural(*mgr, idx, item);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 decoration = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferDecorationNameWithArticle(*mgr, idx, decoration);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_trap = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferUndergroundTrapNameWithArticle(*mgr, idx, underground_trap);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferUndergroundItemNameWithArticle(*mgr, idx, underground_item);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 species = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
u16 unused1 = ScriptReadHalfword(ctx);
|
||||
u8 unused2 = ScriptReadByte(ctx);
|
||||
|
||||
BufferSpeciesNameWithArticle(*mgr, idx, species);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
|
||||
u32 species = FUN_0205F3C0(state);
|
||||
|
||||
BufferSpeciesNameWithArticle(*mgr, idx, species);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 fashion = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferFashionNameWithArticle(*mgr, idx, fashion);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 trainer_class = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferTrainerClassNameWithArticle(*mgr, idx, trainer_class);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 seal = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
|
||||
|
||||
BufferSealNamePlural(*mgr, idx, (u16)(seal - 1));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx)
|
||||
{
|
||||
struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
|
||||
ScrStrBufs_UpperFirstChar(*mgr, idx);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -106,6 +106,50 @@ BOOL ScrCmd_Unk0048(struct ScriptContext *ctx);
|
|||
BOOL ScrCmd_Unk02CF(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_Unk02D0(struct ScriptContext *ctx);
|
||||
|
||||
//scrcmd_4.c
|
||||
BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00D0(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetItemName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk0280(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00D6(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk0251(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx);
|
||||
struct String* FUN_02040AE4(u32 msg_no, u32 heap_id);
|
||||
BOOL ScrCmd_Unk00DB(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00DC(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00DD(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk00E2(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk017B(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk0272(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk0232(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetSealName(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx);
|
||||
|
||||
//scrcmd_11.c
|
||||
BOOL ScrCmd_Unk017D(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk017E(struct ScriptContext* ctx);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user