ScrCmd_OpenTradeScreen

This commit is contained in:
Akashi Akira 2023-05-15 03:48:34 +01:00
parent 231a8d1b05
commit ea1555e41f
No known key found for this signature in database
GPG Key ID: D27E50C050AE0CE1
5 changed files with 12 additions and 27 deletions

View File

@ -14,29 +14,6 @@ UNK_021C5A0C: ; 0x021C5A0C
.text
thumb_func_start ScrCmd_Unk02A5
ScrCmd_Unk02A5: ; 0x0203B914
push {r3-r5, lr}
add r5, r0, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FieldSysGetAttrAddr
add r1, r5, #0x0
add r1, #0x80
add r4, r0, #0x0
ldr r1, [r1, #0x0]
mov r0, #0x20
bl FUN_02037A1C
str r0, [r4, #0x0]
ldr r1, _0203B940 ; =FUN_0203BC04
add r0, r5, #0x0
bl SetupNativeScript
mov r0, #0x1
pop {r3-r5, pc}
nop
_0203B940: .word FUN_0203BC04
thumb_func_start ScrCmd_Unk0192
ScrCmd_Unk0192: ; 0x0203B944
push {r3-r5, lr}

View File

@ -826,7 +826,7 @@ gScriptCmdTable: ; 0x020F355C
.word ScrCmd_Unk02A2
.word ScrCmd_Unk02A3
.word ScrCmd_Unk02A4
.word ScrCmd_Unk02A5
.word ScrCmd_OpenTradeScreen
.word ScrCmd_GetPrizeItemIdAndCost
.word ScrCmd_Unk02A7
.word ScrCmd_TakeCoinsAddress

View File

@ -2812,7 +2812,7 @@
.extern ScrCmd_GiveSeals
.extern ScrCmd_GetPokemonForme
.extern ScrCmd_Unk0191
.extern ScrCmd_Unk02A5
.extern ScrCmd_OpenTradeScreen
.extern ScrCmd_Unk0192
.extern ScrCmd_Unk0193
.extern ScrCmd_Unk0194

View File

@ -93,6 +93,7 @@ extern u16 FUN_02029E0C(struct SealCase *sealCase);
extern u16 FUN_02029E2C(struct SealCase *sealCase, u16 sealId);
extern void FUN_02029D44(struct SealCase *sealCase, u16 sealId, s16 amount);
extern u32 FUN_020379F8(u32 param0, struct FieldSystem *fieldSystem);
extern u32 FUN_02037A1C(u32 param0, struct FieldSystem *fieldSystem);
extern u8 UNK_021C5A0C[4];
@ -1774,10 +1775,16 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonForme(struct ScriptContext *ctx) //0095
return FALSE;
}
THUMB_FUNC BOOL ScrCmd_Unk0191(struct ScriptContext *ctx) //0191
{
THUMB_FUNC BOOL ScrCmd_Unk0191(struct ScriptContext *ctx) { //0191 - TODO: similar to below?
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
*unk = FUN_020379F8(0x20, ctx->fieldSystem);
SetupNativeScript(ctx, FUN_0203BC04);
return TRUE;
}
THUMB_FUNC BOOL ScrCmd_OpenTradeScreen(struct ScriptContext *ctx) {
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
*unk = FUN_02037A1C(0x20, ctx->fieldSystem);
SetupNativeScript(ctx, FUN_0203BC04);
return TRUE;
}

View File

@ -149,6 +149,7 @@ BOOL ScrCmd_GetSealCountFromId(struct ScriptContext *ctx);
BOOL ScrCmd_GiveSeals(struct ScriptContext *ctx);
BOOL ScrCmd_GetPokemonForme(struct ScriptContext *ctx);
BOOL ScrCmd_Unk0191(struct ScriptContext *ctx);
BOOL ScrCmd_OpenTradeScreen(struct ScriptContext *ctx);
// scrcmd_mart.c
BOOL ScrCmd_NormalMart(struct ScriptContext * ctx);