mirror of
https://github.com/pret/pokediamond.git
synced 2026-09-30 12:26:48 -05:00
ScrCmd_GetSelectedPartySlot
This commit is contained in:
@@ -14,43 +14,6 @@ UNK_021C5A0C: ; 0x021C5A0C
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start ScrCmd_Unk0193
|
||||
ScrCmd_Unk0193: ; 0x0203B968
|
||||
push {r3-r5, lr}
|
||||
add r4, r0, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl GetVarPointer
|
||||
add r4, #0x80
|
||||
add r5, r0, #0x0
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x13
|
||||
bl FieldSysGetAttrAddr
|
||||
add r4, r0, #0x0
|
||||
ldr r0, [r4, #0x0]
|
||||
cmp r0, #0x0
|
||||
bne _0203B994
|
||||
bl GF_AssertFail
|
||||
_0203B994:
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FUN_02037A40
|
||||
strh r0, [r5, #0x0]
|
||||
ldrh r0, [r5, #0x0]
|
||||
cmp r0, #0x7
|
||||
bne _0203B9A6
|
||||
mov r0, #0xff
|
||||
strh r0, [r5, #0x0]
|
||||
_0203B9A6:
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FreeToHeap
|
||||
mov r0, #0x0
|
||||
str r0, [r4, #0x0]
|
||||
pop {r3-r5, pc}
|
||||
.balign 4
|
||||
|
||||
thumb_func_start ScrCmd_Unk0194
|
||||
ScrCmd_Unk0194: ; 0x0203B9B4
|
||||
push {r4-r7, lr}
|
||||
|
||||
@@ -552,7 +552,7 @@ gScriptCmdTable: ; 0x020F355C
|
||||
.word ScrCmd_WaitButtonABTime
|
||||
.word ScrCmd_ChoosePokemonMenu
|
||||
.word ScrCmd_ChoosePokemonMenu2
|
||||
.word ScrCmd_Unk0193
|
||||
.word ScrCmd_GetSelectedPartySlot
|
||||
.word ScrCmd_Unk0194
|
||||
.word ScrCmd_Unk0195
|
||||
.word ScrCmd_Unk0196
|
||||
|
||||
@@ -2814,7 +2814,7 @@
|
||||
.extern ScrCmd_ChoosePokemonMenu
|
||||
.extern ScrCmd_OpenTradeScreen
|
||||
.extern ScrCmd_ChoosePokemonMenu2
|
||||
.extern ScrCmd_Unk0193
|
||||
.extern ScrCmd_GetSelectedPartySlot
|
||||
.extern ScrCmd_Unk0194
|
||||
.extern ScrCmd_Unk0195
|
||||
.extern ScrCmd_Unk0196
|
||||
|
||||
@@ -95,6 +95,7 @@ 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 u32 FUN_02037B44(struct TaskManager *taskManager, u32 param1);
|
||||
extern u16 FUN_02037A40(u32 *param0);
|
||||
|
||||
extern u8 UNK_021C5A0C[4];
|
||||
|
||||
@@ -1795,3 +1796,18 @@ THUMB_FUNC BOOL ScrCmd_ChoosePokemonMenu2(struct ScriptContext *ctx) { //0192
|
||||
*unk = FUN_02037B44(ctx->fieldSystem->taskManager, 0x20);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetSelectedPartySlot(struct ScriptContext *ctx) { //0193
|
||||
u16 *variable = ScriptGetVarPointer(ctx);
|
||||
u32 **unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
|
||||
|
||||
GF_ASSERT(*unk);
|
||||
*variable = FUN_02037A40(*unk);
|
||||
|
||||
if (*variable == 7) {
|
||||
*variable = 0xFF;
|
||||
}
|
||||
FreeToHeap(*unk);
|
||||
*unk = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ BOOL ScrCmd_GetPokemonForme(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_ChoosePokemonMenu(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_OpenTradeScreen(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_ChoosePokemonMenu2(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_GetSelectedPartySlot(struct ScriptContext *ctx);
|
||||
|
||||
// scrcmd_mart.c
|
||||
BOOL ScrCmd_NormalMart(struct ScriptContext * ctx);
|
||||
|
||||
Reference in New Issue
Block a user