mirror of
https://github.com/pret/pokediamond.git
synced 2026-09-30 20:36:48 -05:00
@@ -180,7 +180,7 @@ Static arm9
|
||||
Object scrcmd_flags.o
|
||||
Object scrcmd_items.o
|
||||
Object scrcmd_underground.o
|
||||
Object scrcmd_24.o
|
||||
Object scrcmd_move_relearner.o
|
||||
Object scrcmd_25.o
|
||||
Object unk_02046030.o
|
||||
Object event_data.o
|
||||
|
||||
@@ -546,12 +546,12 @@ gScriptCmdTable: ; 0x020F355C
|
||||
.word ScrCmd_Unk018A
|
||||
.word ScrCmd_Unk018B
|
||||
.word ScrCmd_Unk018C
|
||||
.word ScrCmd_ShowSaveClock
|
||||
.word ScrCmd_HideSaveClock
|
||||
.word ScrCmd_ShowWaitingIcon
|
||||
.word ScrCmd_HideWaitingIcon
|
||||
.word ScrCmd_Unk018F
|
||||
.word ScrCmd_WaitButtonABTime
|
||||
.word ScrCmd_ChoosePokemonMenu
|
||||
.word ScrCmd_ChoosePokemonMenu2
|
||||
.word ScrCmd_UnionChoosePokemonMenu
|
||||
.word ScrCmd_GetSelectedPartySlot
|
||||
.word ScrCmd_Unk0194
|
||||
.word ScrCmd_Unk0195
|
||||
|
||||
@@ -421,7 +421,7 @@ FUN_020487E4: ; 0x020487E4
|
||||
add r0, r4, #0x0
|
||||
ldr r1, _02048834 ; =0x000003E2
|
||||
add r0, #0x1c
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
str r0, [r4, #0x30]
|
||||
pop {r4-r6, pc}
|
||||
.balign 4
|
||||
|
||||
@@ -486,7 +486,7 @@ _0208984C:
|
||||
add r0, r4, #0x0
|
||||
ldr r1, _02089898 ; =0x000001E2
|
||||
add r0, #0x1c
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
str r0, [r4, #0x34]
|
||||
mov r0, #0x5
|
||||
str r0, [r4, #0x4]
|
||||
|
||||
@@ -701,7 +701,7 @@
|
||||
.extern FUN_0200D300
|
||||
.extern DrawFrameAndWindow3
|
||||
.extern ClearFrameAndWindow3
|
||||
.extern FUN_0200D858
|
||||
.extern WaitingIcon_new
|
||||
.extern FUN_0200DBFC
|
||||
.extern FUN_0200DC24
|
||||
.extern FUN_0200DC4C
|
||||
@@ -2771,8 +2771,8 @@
|
||||
.extern ScrCmd_Unk003B
|
||||
.extern ScrCmd_Menu
|
||||
.extern ScrCmd_YesNoMenu
|
||||
.extern ScrCmd_ShowSaveClock
|
||||
.extern ScrCmd_HideSaveClock
|
||||
.extern ScrCmd_ShowWaitingIcon
|
||||
.extern ScrCmd_HideWaitingIcon
|
||||
.extern ScrCmd_Unk0040
|
||||
.extern ScrCmd_Unk0041
|
||||
.extern ScrCmd_Unk0042
|
||||
@@ -2813,7 +2813,7 @@
|
||||
.extern ScrCmd_GetPokemonForme
|
||||
.extern ScrCmd_ChoosePokemonMenu
|
||||
.extern ScrCmd_OpenTradeScreen
|
||||
.extern ScrCmd_ChoosePokemonMenu2
|
||||
.extern ScrCmd_UnionChoosePokemonMenu
|
||||
.extern ScrCmd_GetSelectedPartySlot
|
||||
.extern ScrCmd_Unk0194
|
||||
.extern ScrCmd_Unk0195
|
||||
|
||||
@@ -234,7 +234,7 @@ _0222F30E:
|
||||
bl FUN_02003210
|
||||
ldr r0, [r5, #8]
|
||||
mov r1, #1
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _0222F4E0 ; =0x00001024
|
||||
str r0, [r5, r1]
|
||||
bl FUN_02033E74
|
||||
@@ -65184,7 +65184,7 @@ MOD11_0224EBF4: ; 0x0224EBF4
|
||||
mov r1, #0
|
||||
bl MOD11_0222FF6C
|
||||
mov r1, #1
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
add r1, r0, #0
|
||||
add r0, r5, #0
|
||||
bl MOD11_022312C8
|
||||
|
||||
@@ -1676,7 +1676,7 @@ _02212BA2:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02212BE4 ; =0x000001E2
|
||||
add r0, r5, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r5, r1]
|
||||
@@ -1855,7 +1855,7 @@ _02212CEC:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02212D50 ; =0x000001E2
|
||||
add r0, r5, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r5, r1]
|
||||
@@ -1921,7 +1921,7 @@ _02212D74:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02212DD4 ; =0x000001E2
|
||||
add r0, r5, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r5, r1]
|
||||
@@ -2531,7 +2531,7 @@ _02213226:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02213278 ; =0x000001E2
|
||||
add r0, r6, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r6, r1]
|
||||
@@ -6031,7 +6031,7 @@ _02214D76:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02214E24 ; =0x000001E2
|
||||
add r0, r4, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r4, r1]
|
||||
@@ -7922,7 +7922,7 @@ _02215CB8:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02215D1C ; =0x000001E2
|
||||
add r0, r5, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r5, r1]
|
||||
@@ -8092,7 +8092,7 @@ _02215DCA:
|
||||
lsl r0, r0, #2
|
||||
ldr r1, _02215E70 ; =0x000001E2
|
||||
add r0, r5, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
mov r1, #6
|
||||
lsl r1, r1, #6
|
||||
str r0, [r5, r1]
|
||||
|
||||
@@ -6503,7 +6503,7 @@ MOD71_02230B88: ; 0x02230B88
|
||||
ldr r0, _02230B9C ; =0x000005A8
|
||||
ldr r1, _02230BA0 ; =0x000001D9
|
||||
add r0, r4, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _02230BA4 ; =0x000036A8
|
||||
str r0, [r4, r1]
|
||||
pop {r4, pc}
|
||||
|
||||
@@ -2464,7 +2464,7 @@ MOD80_0222E8BC: ; 0x0222E8BC
|
||||
ldr r0, _0222E8D0 ; =0x00000E98
|
||||
mov r1, #1
|
||||
add r0, r4, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _0222E8D4 ; =0x00000FD8
|
||||
str r0, [r4, r1]
|
||||
pop {r4, pc}
|
||||
|
||||
@@ -4322,7 +4322,7 @@ MOD82_0222F700: ; 0x0222F700
|
||||
lsl r0, r0, #6
|
||||
add r0, r4, r0
|
||||
mov r1, #1
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _0222F720 ; =0x00000EB4
|
||||
str r0, [r4, r1]
|
||||
_0222F71C:
|
||||
|
||||
@@ -3618,7 +3618,7 @@ _0222F2C4:
|
||||
add r0, r4, #0
|
||||
add r0, #0x28
|
||||
mov r1, #0xa
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _0222F5E4 ; =0x000034D8
|
||||
str r0, [r4, r1]
|
||||
mov r0, #3
|
||||
@@ -3859,7 +3859,7 @@ _0222F4AA:
|
||||
add r0, r4, #0
|
||||
add r0, #0x28
|
||||
mov r1, #0xa
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _0222F5E4 ; =0x000034D8
|
||||
str r0, [r4, r1]
|
||||
add r0, r4, #0
|
||||
@@ -4573,7 +4573,7 @@ MOD83_0222FA0C: ; 0x0222FA0C
|
||||
add r0, r4, #0
|
||||
add r0, #0x18
|
||||
mov r1, #1
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _0222FA40 ; =0x00002994
|
||||
str r0, [r4, r1]
|
||||
pop {r4, pc}
|
||||
@@ -8417,7 +8417,7 @@ MOD83_02231930: ; 0x02231930
|
||||
ldr r0, _022319C0 ; =0x00002B70
|
||||
mov r1, #0x13
|
||||
add r0, r4, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _022319C4 ; =0x00003CF0
|
||||
str r0, [r4, r1]
|
||||
mov r1, #0xad
|
||||
@@ -10190,7 +10190,7 @@ _0223270E:
|
||||
ldr r0, _02232780 ; =0x00002B70
|
||||
mov r1, #0x13
|
||||
add r0, r5, r0
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _02232784 ; =0x00003CF0
|
||||
str r0, [r5, r1]
|
||||
_02232746:
|
||||
@@ -18845,7 +18845,7 @@ _02236A10:
|
||||
ldr r1, _02236B5C ; =0x00000498
|
||||
add r0, r4, r1
|
||||
sub r1, #0xc6
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _02236B60 ; =0x0000E898
|
||||
str r0, [r4, r1]
|
||||
mov r0, #0xa
|
||||
@@ -19162,7 +19162,7 @@ _02236CAE:
|
||||
ldr r1, _02236DA8 ; =0x00000498
|
||||
add r0, r4, r1
|
||||
sub r1, #0xc6
|
||||
bl FUN_0200D858
|
||||
bl WaitingIcon_new
|
||||
ldr r1, _02236DBC ; =0x0000E898
|
||||
str r0, [r4, r1]
|
||||
mov r0, #0x15
|
||||
|
||||
@@ -596,176 +596,98 @@ THUMB_FUNC void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL copy
|
||||
}
|
||||
}
|
||||
|
||||
THUMB_FUNC struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1)
|
||||
{
|
||||
THUMB_FUNC WaitingIcon *WaitingIcon_new(struct Window *window, u32 param1) {
|
||||
u32 heap_id = BgConfig_GetHeapId(window->bgConfig);
|
||||
void *charptr = BgGetCharPtr(GetWindowBgId(window));
|
||||
|
||||
struct UnkStruct_0200CABC_1 *ptr = AllocFromHeap(heap_id, sizeof(struct UnkStruct_0200CABC_1));
|
||||
memcpy(ptr->unk004[8], charptr + (param1 + 18) * 32, 0x80);
|
||||
WaitingIcon *waitingIcon = AllocFromHeap(heap_id, sizeof(WaitingIcon));
|
||||
memcpy(waitingIcon->unk004[8], charptr + (param1 + 18) * 32, 0x80);
|
||||
void *ptr2 = AllocFromHeap(heap_id, 0x80);
|
||||
memcpy(ptr2, charptr + (param1 + 10) * 32, 0x20);
|
||||
memcpy(ptr2 + 0x20, charptr + (param1 + 11) * 32, 0x20);
|
||||
memcpy(ptr2 + 0x40, charptr + (param1 + 10) * 32, 0x20);
|
||||
memcpy(ptr2 + 0x60, charptr + (param1 + 11) * 32, 0x20);
|
||||
|
||||
for (u8 i = 0; i < 8; i++)
|
||||
{
|
||||
memcpy(ptr->unk004[i], ptr2, 0x80);
|
||||
for (u8 i = 0; i < 8; i++) {
|
||||
memcpy(waitingIcon->unk004[i], ptr2, 0x80);
|
||||
}
|
||||
FreeToHeap(ptr2);
|
||||
|
||||
NNSG2dCharacterData *pCharData;
|
||||
void *r5 = GfGfxLoader_GetCharData(
|
||||
NARC_GRAPHIC_WINFRAME, NARC_winframe_narc_0023_NCGR, FALSE, &pCharData, heap_id);
|
||||
BlitRect4Bit(
|
||||
pCharData->pRawData, 0, 0, 0x10, 0x80, ptr->unk004[0], 0x10, 0x80, 0, 0, 0x10, 0x80);
|
||||
void *r5 = GfGfxLoader_GetCharData(NARC_GRAPHIC_WINFRAME, NARC_winframe_narc_0023_NCGR, FALSE, &pCharData, heap_id);
|
||||
BlitRect4Bit(pCharData->pRawData, 0, 0, 0x10, 0x80, waitingIcon->unk004[0], 0x10, 0x80, 0, 0, 0x10, 0x80);
|
||||
FreeToHeap(r5);
|
||||
|
||||
ptr->unk000 = window;
|
||||
ptr->fillValue = (u16)param1;
|
||||
ptr->unk486 = 0;
|
||||
ptr->unk487 = 0;
|
||||
ptr->unk488 = 0;
|
||||
waitingIcon->window = window;
|
||||
waitingIcon->fillValue = (u16)param1;
|
||||
waitingIcon->unk486 = 0;
|
||||
waitingIcon->unk487 = 0;
|
||||
waitingIcon->unk488 = 0;
|
||||
|
||||
FUN_0200CA60(FUN_0200DB7C, ptr, 0);
|
||||
FUN_0200D980(ptr, 1);
|
||||
FUN_0200CA60(FUN_0200DB7C, waitingIcon, 0);
|
||||
FUN_0200D980(waitingIcon, 1);
|
||||
|
||||
return ptr;
|
||||
return waitingIcon;
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1)
|
||||
{
|
||||
u8 bg_id = GetWindowBgId(param0->unk000);
|
||||
u8 x = GetWindowX(param0->unk000);
|
||||
u8 y = GetWindowY(param0->unk000);
|
||||
u8 width = GetWindowWidth(param0->unk000);
|
||||
THUMB_FUNC void FUN_0200D980(WaitingIcon *waitingIcon, u32 param1) {
|
||||
u8 bg_id = GetWindowBgId(waitingIcon->window);
|
||||
u8 x = GetWindowX(waitingIcon->window);
|
||||
u8 y = GetWindowY(waitingIcon->window);
|
||||
u8 width = GetWindowWidth(waitingIcon->window);
|
||||
|
||||
if (param1 == 2)
|
||||
{
|
||||
BG_LoadCharTilesData(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u32 *)param0->unk004[8],
|
||||
0x80,
|
||||
(u32)(param0->fillValue + 18));
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 10),
|
||||
(u8)(x + width + 1),
|
||||
(u8)(y + 2),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 11),
|
||||
(u8)(x + width + 2),
|
||||
(u8)(y + 2),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 10),
|
||||
(u8)(x + width + 1),
|
||||
(u8)(y + 3),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 11),
|
||||
(u8)(x + width + 2),
|
||||
(u8)(y + 3),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
BgCommitTilemapBufferToVram(param0->unk000->bgConfig, bg_id);
|
||||
if (param1 == 2) {
|
||||
BG_LoadCharTilesData(waitingIcon->window->bgConfig, bg_id, (u32 *)waitingIcon->unk004[8], 0x80, (u32)(waitingIcon->fillValue + 18));
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 10), (u8)(x + width + 1), (u8)(y + 2), 1, 1, 0x10);
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 11), (u8)(x + width + 2), (u8)(y + 2), 1, 1, 0x10);
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 10), (u8)(x + width + 1), (u8)(y + 3), 1, 1, 0x10);
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 11), (u8)(x + width + 2), (u8)(y + 3), 1, 1, 0x10);
|
||||
BgCommitTilemapBufferToVram(waitingIcon->window->bgConfig, bg_id);
|
||||
return;
|
||||
}
|
||||
|
||||
BG_LoadCharTilesData(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u32 *)param0->unk004[param0->unk487],
|
||||
0x80,
|
||||
(u32)(param0->fillValue + 18));
|
||||
if (param1 != 0)
|
||||
{
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 18),
|
||||
(u8)(x + width + 1),
|
||||
(u8)(y + 2),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 19),
|
||||
(u8)(x + width + 2),
|
||||
(u8)(y + 2),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 20),
|
||||
(u8)(x + width + 1),
|
||||
(u8)(y + 3),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
FillBgTilemapRect(param0->unk000->bgConfig,
|
||||
bg_id,
|
||||
(u16)(param0->fillValue + 21),
|
||||
(u8)(x + width + 2),
|
||||
(u8)(y + 3),
|
||||
1,
|
||||
1,
|
||||
0x10);
|
||||
BgCommitTilemapBufferToVram(param0->unk000->bgConfig, bg_id);
|
||||
BG_LoadCharTilesData(waitingIcon->window->bgConfig, bg_id, (u32 *)waitingIcon->unk004[waitingIcon->unk487], 0x80, (u32)(waitingIcon->fillValue + 18));
|
||||
if (param1 != 0) {
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 18), (u8)(x + width + 1), (u8)(y + 2), 1, 1, 0x10);
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 19), (u8)(x + width + 2), (u8)(y + 2), 1, 1, 0x10);
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 20), (u8)(x + width + 1), (u8)(y + 3), 1, 1, 0x10);
|
||||
FillBgTilemapRect(waitingIcon->window->bgConfig, bg_id, (u16)(waitingIcon->fillValue + 21), (u8)(x + width + 2), (u8)(y + 3), 1, 1, 0x10);
|
||||
BgCommitTilemapBufferToVram(waitingIcon->window->bgConfig, bg_id);
|
||||
}
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_0200DB7C(u32 param0, void *param1)
|
||||
{
|
||||
struct UnkStruct_0200CABC_1 *r1 = (struct UnkStruct_0200CABC_1 *)param1;
|
||||
THUMB_FUNC void FUN_0200DB7C(u32 param0, void *param1) {
|
||||
WaitingIcon *waitingIcon = (WaitingIcon *)param1; //todo: see if this matches using a param
|
||||
|
||||
if (r1->unk488 != 0)
|
||||
{
|
||||
if (r1->unk488 == 1)
|
||||
{
|
||||
FUN_0200D980(r1, 2);
|
||||
if (waitingIcon->unk488 != 0) {
|
||||
if (waitingIcon->unk488 == 1) {
|
||||
FUN_0200D980(waitingIcon, 2);
|
||||
}
|
||||
FUN_0200CAB4((s32)param0);
|
||||
return;
|
||||
}
|
||||
|
||||
r1->unk486++;
|
||||
if (r1->unk486 == 16)
|
||||
{
|
||||
r1->unk486 = 0;
|
||||
r1->unk487 = (r1->unk487 + 1) & 7;
|
||||
FUN_0200D980(r1, 0);
|
||||
waitingIcon->unk486++;
|
||||
if (waitingIcon->unk486 == 16) {
|
||||
waitingIcon->unk486 = 0;
|
||||
waitingIcon->unk487 = (waitingIcon->unk487 + 1) & 7;
|
||||
FUN_0200D980(waitingIcon, 0);
|
||||
}
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_0200DBE8(u32 param0, void *param1)
|
||||
{
|
||||
THUMB_FUNC void FUN_0200DBE8(u32 param0, void *param1) {
|
||||
FreeToHeap(param1);
|
||||
FUN_0200CAB4((s32)param0);
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_0200DBFC(struct UnkStruct_0200CABC_1 *param0)
|
||||
{
|
||||
FUN_0200CA98(FUN_0200DBE8, param0, 0);
|
||||
param0->unk488 = 1;
|
||||
THUMB_FUNC void FUN_0200DBFC(WaitingIcon *waitingIcon) {
|
||||
FUN_0200CA98(FUN_0200DBE8, waitingIcon, 0);
|
||||
waitingIcon->unk488 = 1;
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_0200DC24(struct UnkStruct_0200CABC_1 *param0)
|
||||
{
|
||||
FUN_0200CA98(FUN_0200DBE8, param0, 0);
|
||||
param0->unk488 = 2;
|
||||
THUMB_FUNC void FUN_0200DC24(WaitingIcon *waitingIcon) {
|
||||
FUN_0200CA98(FUN_0200DBE8, waitingIcon, 0);
|
||||
waitingIcon->unk488 = 2;
|
||||
}
|
||||
|
||||
THUMB_FUNC u8 *FUN_0200DC4C(struct BgConfig *bg_config,
|
||||
|
||||
@@ -42,12 +42,12 @@ extern BOOL MOD05_021E8148(u32 param0);
|
||||
extern void MOD05_021E8144(u32 param0);
|
||||
extern u32 Std_CreateYesNoMenu(struct BgConfig *param0, u8 **param1, u32 param2, u32 param3, u32 param4);
|
||||
extern u32 FUN_020021AC(u32 param0, u32 param1);
|
||||
extern u32 MOD05_021E1BF8(struct FieldSystem *fieldSystem, u8 param1, u8 param2, u8 param3, u8 param4, u16 *param5, u32 param6, struct Window *window, struct MsgData *msgData);
|
||||
extern u32 MOD05_021E1BF8(struct FieldSystem *fieldSystem, u8 param1, u8 param2, u8 param3, u8 param4, u16 *param5, MessageFormat *messageFormat, struct Window *window, struct MsgData *msgData);
|
||||
extern void MOD05_021E1C4C(u32 param0, u32 param1, u32 param2);
|
||||
extern void MOD05_021E1C54(u32 param0);
|
||||
extern u32 FUN_02052714(u32 param0);
|
||||
extern void MOD05_021E1ECC(u32 param0);
|
||||
extern u32 MOD05_021E1F34(struct FieldSystem *fieldSystem, u8 param1, u8 param2, u8 param3, u8 param4, u16 *param5, u32 param6, struct Window *window, struct MsgData *msgData);
|
||||
extern u32 MOD05_021E1F34(struct FieldSystem *fieldSystem, u8 param1, u8 param2, u8 param3, u8 param4, u16 *param5, MessageFormat *messageFormat, struct Window *window, struct MsgData *msgData);
|
||||
extern void MOD05_021E1F58(u32 param0, u8 param1, u8 param2, u8 param3);
|
||||
extern void MOD05_021E1F60(u32 param0);
|
||||
extern void MOD05_021E26CC(u32 param0, u8 param1);
|
||||
@@ -92,10 +92,10 @@ extern void FUN_02058EB0(LocalMapObject *event, u32 param1);
|
||||
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 u32 FUN_02037B44(struct TaskManager *taskManager, u32 param1);
|
||||
extern u16 FUN_02037A40(u32 *param0);
|
||||
extern PartyMenuAppData *FUN_020379F8(u32 param0, struct FieldSystem *fieldSystem);
|
||||
extern PartyMenuAppData *FUN_02037A1C(u32 param0, struct FieldSystem *fieldSystem);
|
||||
extern PartyMenuAppData *FUN_02037B44(struct TaskManager *taskManager, u32 param1);
|
||||
extern u16 FUN_02037A40(PartyMenuAppData *partyMenu);
|
||||
|
||||
extern u8 UNK_021C5A0C[4];
|
||||
|
||||
@@ -915,9 +915,9 @@ THUMB_FUNC static BOOL FUN_0203A6C8(struct ScriptContext* ctx)
|
||||
THUMB_FUNC BOOL ScrCmd_CreateMessageBox(struct ScriptContext* ctx) //003C
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
struct String **unk1 = FieldSysGetAttrAddr(fieldSystem, 0x11);
|
||||
struct String **unk2 = FieldSysGetAttrAddr(fieldSystem, 0x10);
|
||||
MessageFormat **unk3 = FieldSysGetAttrAddr(fieldSystem, 0x0f);
|
||||
struct String **stringBuffer1 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1);
|
||||
struct String **stringBuffer0 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 typ, msg;
|
||||
u16 wk, map;
|
||||
|
||||
@@ -934,9 +934,9 @@ THUMB_FUNC BOOL ScrCmd_CreateMessageBox(struct ScriptContext* ctx) //003C
|
||||
MOD05_021E8128(fieldSystem->unk60, typ, map);
|
||||
MOD05_021E8130(fieldSystem->unk60, 1);
|
||||
MOD05_021E8158(fieldSystem);
|
||||
ReadMsgDataIntoString(ctx->msgData, msg, *unk1);
|
||||
StringExpandPlaceholders(*unk3, *unk2, *unk1);
|
||||
AddTextPrinterParameterized(MOD05_021E8140(fieldSystem->unk60), 1, *unk2, 0, 0, 0, NULL);
|
||||
ReadMsgDataIntoString(ctx->msgData, msg, *stringBuffer1);
|
||||
StringExpandPlaceholders(*messageFormat, *stringBuffer0, *stringBuffer1);
|
||||
AddTextPrinterParameterized(MOD05_021E8140(fieldSystem->unk60), 1, *stringBuffer0, 0, 0, 0, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -986,17 +986,17 @@ THUMB_FUNC BOOL ScrCmd_Unk003A(struct ScriptContext *ctx) //003A - todo: CreateM
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
u8 *printerNumber = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER);
|
||||
struct String **unk2 = FieldSysGetAttrAddr(fieldSystem, 17);
|
||||
struct String **unk3 = FieldSysGetAttrAddr(fieldSystem, 16);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
struct String **stringBuffer1 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1);
|
||||
struct String **stringBuffer0 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
|
||||
u8 msg = ScriptReadByte(ctx);
|
||||
u16 wk = ScriptReadHalfword(ctx);
|
||||
|
||||
ReadMsgDataIntoString(ctx->msgData, msg, *unk2);
|
||||
StringExpandPlaceholders(*messageFormat, *unk3, *unk2);
|
||||
ReadMsgDataIntoString(ctx->msgData, msg, *stringBuffer1);
|
||||
StringExpandPlaceholders(*messageFormat, *stringBuffer0, *stringBuffer1);
|
||||
|
||||
*printerNumber = (u8)FUN_02054658(MOD05_021E8140(fieldSystem->unk60), *unk3, Sav2_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveBlock2), 1);
|
||||
*printerNumber = (u8)FUN_02054658(MOD05_021E8140(fieldSystem->unk60), *stringBuffer0, Sav2_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveBlock2), 1);
|
||||
ctx->data[0] = wk;
|
||||
SetupNativeScript(ctx, FUN_0203A94C);
|
||||
return TRUE;
|
||||
@@ -1148,19 +1148,17 @@ THUMB_FUNC static BOOL FUN_0203AB00(struct ScriptContext *ctx)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_ShowSaveClock(struct ScriptContext *ctx) //018D
|
||||
{
|
||||
THUMB_FUNC BOOL ScrCmd_ShowWaitingIcon(struct ScriptContext *ctx) { //018D
|
||||
struct Window *window = (struct Window *)FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW);
|
||||
struct UnkStruct_0200CABC_1 **unk2 = (struct UnkStruct_0200CABC_1 **)FieldSysGetAttrAddr(ctx->fieldSystem, 18);
|
||||
*unk2 = FUN_0200D858(window, 994);
|
||||
WaitingIcon **waitingIcon = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WAITING_ICON);
|
||||
*waitingIcon = WaitingIcon_new(window, 994);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_HideSaveClock(struct ScriptContext *ctx) //018E
|
||||
THUMB_FUNC BOOL ScrCmd_HideWaitingIcon(struct ScriptContext *ctx) //018E
|
||||
{
|
||||
struct UnkStruct_0200CABC_1 **unk = (struct UnkStruct_0200CABC_1 **)FieldSysGetAttrAddr(ctx->fieldSystem, 18);
|
||||
FUN_0200DBFC(*unk);
|
||||
WaitingIcon **waitingIcon = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WAITING_ICON);
|
||||
FUN_0200DBFC(*waitingIcon);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1168,7 +1166,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0040(struct ScriptContext *ctx) //0040
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
u32 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MENU_WINDOW);
|
||||
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 unk3 = ScriptReadByte(ctx);
|
||||
u8 unk4 = ScriptReadByte(ctx);
|
||||
u8 unk5 = ScriptReadByte(ctx);
|
||||
@@ -1176,7 +1174,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0040(struct ScriptContext *ctx) //0040
|
||||
u16 unk7 = ScriptReadHalfword(ctx);
|
||||
u16 *ptr = GetVarPointer(fieldSystem, unk7);
|
||||
struct Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW);
|
||||
*unk = MOD05_021E1BF8(fieldSystem, unk3, unk4, unk5, unk6, ptr, *unk2, window, NULL);
|
||||
*unk = MOD05_021E1BF8(fieldSystem, unk3, unk4, unk5, unk6, ptr, *messageFormat, window, NULL);
|
||||
ctx->data[0] = unk7;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1185,7 +1183,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0041(struct ScriptContext *ctx) //0041
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
u32 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MENU_WINDOW);
|
||||
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 unk3 = ScriptReadByte(ctx);
|
||||
u8 unk4 = ScriptReadByte(ctx);
|
||||
u8 unk5 = ScriptReadByte(ctx);
|
||||
@@ -1193,7 +1191,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0041(struct ScriptContext *ctx) //0041
|
||||
u16 unk7 = ScriptReadHalfword(ctx);
|
||||
u16 *ptr = GetVarPointer(fieldSystem, unk7);
|
||||
struct Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW);
|
||||
*unk = MOD05_021E1BF8(fieldSystem, unk3, unk4, unk5, unk6, ptr, *unk2, window, ctx->msgData);
|
||||
*unk = MOD05_021E1BF8(fieldSystem, unk3, unk4, unk5, unk6, ptr, *messageFormat, window, ctx->msgData);
|
||||
ctx->data[0] = unk7;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1275,7 +1273,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0044(struct ScriptContext *ctx) //0044
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
u32 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MENU_WINDOW);
|
||||
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 unk3 = ScriptReadByte(ctx);
|
||||
u8 unk4 = ScriptReadByte(ctx);
|
||||
u8 unk5 = ScriptReadByte(ctx);
|
||||
@@ -1284,7 +1282,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0044(struct ScriptContext *ctx) //0044
|
||||
u16 halfWord = ScriptReadHalfword(ctx);
|
||||
u16 *varPtr = GetVarPointer(fieldSystem, halfWord);
|
||||
struct Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW);
|
||||
*unk = MOD05_021E1F34(fieldSystem, unk3, unk4, unk5, unk6, varPtr, *unk2, window, NULL);
|
||||
*unk = MOD05_021E1F34(fieldSystem, unk3, unk4, unk5, unk6, varPtr, *messageFormat, window, NULL);
|
||||
ctx->data[0] = halfWord;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1293,7 +1291,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0045(struct ScriptContext *ctx) //0045
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
u32 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MENU_WINDOW);
|
||||
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 unk3 = ScriptReadByte(ctx);
|
||||
u8 unk4 = ScriptReadByte(ctx);
|
||||
u8 unk5 = ScriptReadByte(ctx);
|
||||
@@ -1302,7 +1300,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0045(struct ScriptContext *ctx) //0045
|
||||
u16 halfWord = ScriptReadHalfword(ctx);
|
||||
u16 *varPtr = GetVarPointer(fieldSystem, halfWord);
|
||||
struct Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW);
|
||||
*unk = MOD05_021E1F34(fieldSystem, unk3, unk4, unk5, unk6, varPtr, *unk2, window, ctx->msgData);
|
||||
*unk = MOD05_021E1F34(fieldSystem, unk3, unk4, unk5, unk6, varPtr, *messageFormat, window, ctx->msgData);
|
||||
ctx->data[0] = halfWord;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1777,37 +1775,37 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonForme(struct ScriptContext *ctx) //0095
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_ChoosePokemonMenu(struct ScriptContext *ctx) { //0191 - TODO: similar to below?
|
||||
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
|
||||
*unk = FUN_020379F8(0x20, ctx->fieldSystem);
|
||||
THUMB_FUNC BOOL ScrCmd_ChoosePokemonMenu(struct ScriptContext *ctx) { //0191
|
||||
PartyMenuAppData **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
*partyMenu = FUN_020379F8(0x20, ctx->fieldSystem);
|
||||
SetupNativeScript(ctx, FUN_0203BC04);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_OpenTradeScreen(struct ScriptContext *ctx) { //02A5
|
||||
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
|
||||
*unk = FUN_02037A1C(0x20, ctx->fieldSystem);
|
||||
PartyMenuAppData **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
*partyMenu = FUN_02037A1C(0x20, ctx->fieldSystem);
|
||||
SetupNativeScript(ctx, FUN_0203BC04);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_ChoosePokemonMenu2(struct ScriptContext *ctx) { //0192
|
||||
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
|
||||
*unk = FUN_02037B44(ctx->fieldSystem->taskManager, 0x20);
|
||||
THUMB_FUNC BOOL ScrCmd_UnionChoosePokemonMenu(struct ScriptContext *ctx) { //0192
|
||||
PartyMenuAppData **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
*partyMenu = 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);
|
||||
PartyMenuAppData **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
|
||||
GF_ASSERT(*unk);
|
||||
*variable = FUN_02037A40(*unk);
|
||||
GF_ASSERT(*partyMenu);
|
||||
*variable = FUN_02037A40(*partyMenu);
|
||||
|
||||
if (*variable == 7) {
|
||||
*variable = 0xFF;
|
||||
}
|
||||
FreeToHeap(*unk);
|
||||
*unk = NULL;
|
||||
FreeToHeap(*partyMenu);
|
||||
*partyMenu = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
#include "scrcmd.h"
|
||||
#include "heap.h"
|
||||
#include "party.h"
|
||||
#include "unk_020377F0.h"
|
||||
#include "unk_02088DD8.h"
|
||||
|
||||
extern void* FieldSysGetAttrAddr(struct FieldSystem*, int idx);
|
||||
|
||||
extern struct UnkStruct_02037CF0* FUN_02037CF0(u32 heap_id, struct FieldSystem*, u8);
|
||||
extern u8 FUN_02037D5C(struct UnkStruct_02037CF0*);
|
||||
extern void FUN_02038864(struct FieldSystem*, struct UnkStruct_02088DD8*);
|
||||
extern BOOL FUN_0203BC04(struct ScriptContext* ctx);
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01C6(struct ScriptContext* ctx) //01C6 - todo: MoveInfo?
|
||||
{
|
||||
u16 unk = ScriptGetVar(ctx);
|
||||
struct UnkStruct_02037CF0** unk_ret_ptr = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
|
||||
*unk_ret_ptr = FUN_02037CF0(32, ctx->fieldSystem, (u8)unk);
|
||||
|
||||
SetupNativeScript(ctx, FUN_0203BC04);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01C7(struct ScriptContext* ctx) //01C7 - todo: StoreMove?
|
||||
{
|
||||
struct UnkStruct_02037CF0** unk_ptr;
|
||||
u16* ret_ptr;
|
||||
|
||||
ret_ptr = ScriptGetVarPointer(ctx);
|
||||
unk_ptr = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
|
||||
GF_ASSERT(*unk_ptr != NULL);
|
||||
|
||||
*ret_ptr = FUN_02037D5C(*unk_ptr);
|
||||
if (*ret_ptr == 4)
|
||||
{
|
||||
*ret_ptr = 0xFF;
|
||||
}
|
||||
|
||||
FreeToHeap(*unk_ptr);
|
||||
*unk_ptr = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk021E(struct ScriptContext* ctx) //021E
|
||||
{
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk021F(struct ScriptContext* ctx) //021F
|
||||
{
|
||||
u16* ret_ptr = ScriptGetVarPointer(ctx);
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(ctx->fieldSystem->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
void* unk_ptr = GetEligibleLevelUpMoves(pokemon, 32);
|
||||
|
||||
*ret_ptr = (u16)FUN_02088EF8(unk_ptr);
|
||||
FreeToHeap(unk_ptr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_02045E74(struct ScriptContext* ctx, u8 a1, struct Pokemon* pokemon, void* a3)
|
||||
{
|
||||
struct UnkStruct_02088DD8** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
|
||||
struct UnkStruct_02088DD8* unk2 = FUN_02088DD8(32);
|
||||
*unk = unk2;
|
||||
|
||||
unk2->pokemon = pokemon;
|
||||
|
||||
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(ctx->fieldSystem);
|
||||
unk2->player = Sav2_PlayerData_GetProfileAddr(sav2);
|
||||
|
||||
unk2->options = Sav2_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveBlock2);
|
||||
unk2->unkC = a3;
|
||||
unk2->unk15 = a1;
|
||||
FUN_02038864(ctx->fieldSystem, unk2);
|
||||
|
||||
SetupNativeScript(ctx, FUN_0203BC04);
|
||||
FreeToHeap(a3);
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0220(struct ScriptContext* ctx) //0220
|
||||
{
|
||||
#pragma unused(ctx)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0221(struct ScriptContext* ctx) //0221 - todo: RememberMove?
|
||||
{
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(ctx->fieldSystem->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
void* unk_ptr = GetEligibleLevelUpMoves(pokemon, 32);
|
||||
|
||||
FUN_02045E74(ctx, 1, pokemon, unk_ptr);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0224(struct ScriptContext* ctx) //0224 - todo: TeachMove?
|
||||
{
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
u16 unk2 = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(ctx->fieldSystem->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
|
||||
u16* unk_array = AllocFromHeap(32, 2 * sizeof(u16));
|
||||
unk_array[0] = unk2;
|
||||
unk_array[1] = 0xFFFF;
|
||||
|
||||
FUN_02045E74(ctx, 0, pokemon, unk_array);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0222(struct ScriptContext* ctx) //0222 - todo: DummyMoveCmd?
|
||||
{
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0223(struct ScriptContext* ctx) //0223 - todo: RememberMoveResponse?
|
||||
{
|
||||
struct UnkStruct_02037CF0** unk;
|
||||
struct UnkStruct_02037CF0* unk_sub;
|
||||
u16* ret_ptr;
|
||||
|
||||
ret_ptr = ScriptGetVarPointer(ctx);
|
||||
unk = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
|
||||
unk_sub = *unk;
|
||||
|
||||
GF_ASSERT(unk_sub != NULL);
|
||||
|
||||
if (unk_sub->unk16 == 0)
|
||||
{
|
||||
*ret_ptr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ret_ptr = 0xFF;
|
||||
}
|
||||
|
||||
FUN_02088DF0(unk_sub);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0225(struct ScriptContext* ctx) //0225 - todo: TeachMoveResponse?
|
||||
{
|
||||
struct UnkStruct_02037CF0** unk;
|
||||
struct UnkStruct_02037CF0* unk_sub;
|
||||
u16* ret_ptr;
|
||||
|
||||
ret_ptr = ScriptGetVarPointer(ctx);
|
||||
unk = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
|
||||
unk_sub = *unk;
|
||||
|
||||
GF_ASSERT(unk_sub != NULL);
|
||||
|
||||
if (unk_sub->unk16 == 0)
|
||||
{
|
||||
*ret_ptr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ret_ptr = 0xFF;
|
||||
}
|
||||
|
||||
FUN_02088DF0(unk_sub);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -20,7 +20,7 @@ extern u32 MOD05_021ED644(struct DayCare* daycare);
|
||||
THUMB_FUNC BOOL ScrCmd_GetDaycarePokemonNames(struct ScriptContext* ctx) //016D
|
||||
{
|
||||
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
struct DayCare* daycare = Sav2_DayCare_get(sav2);
|
||||
|
||||
MOD05_021ED4E0(daycare, *messageFormat);
|
||||
@@ -64,7 +64,7 @@ THUMB_FUNC BOOL ScrCmd_GiveDaycareEgg(struct ScriptContext* ctx) //01A9
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01A4(struct ScriptContext* ctx) //01A4
|
||||
{
|
||||
struct FieldSystem* fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
struct SaveBlock2* sav2 = fieldSystem->saveBlock2;
|
||||
u16* ret_ptr = ScriptGetVarPointer(ctx);
|
||||
u16 idx = ScriptGetVar(ctx);
|
||||
@@ -79,7 +79,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01A4(struct ScriptContext* ctx) //01A4
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01AA(struct ScriptContext* ctx) //01AA
|
||||
{
|
||||
struct FieldSystem* fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
struct SaveBlock2* sav2 = fieldSystem->saveBlock2;
|
||||
u16* ret_ptr = ScriptGetVarPointer(ctx);
|
||||
u16 idx = ScriptGetVar(ctx);
|
||||
@@ -93,7 +93,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01AA(struct ScriptContext* ctx) //01AA
|
||||
THUMB_FUNC BOOL ScrCmd_GetDaycareLevel(struct ScriptContext* ctx) //01AE
|
||||
{
|
||||
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u16* ret_ptr = ScriptGetVarPointer(ctx);
|
||||
u16 idx = ScriptGetVar(ctx);
|
||||
struct DayCare* daycare = SavArray_get(sav2, 8);
|
||||
@@ -106,7 +106,7 @@ THUMB_FUNC BOOL ScrCmd_GetDaycareLevel(struct ScriptContext* ctx) //01AE
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01AF(struct ScriptContext* ctx) //01AF
|
||||
{
|
||||
struct FieldSystem* fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u16 unused = ScriptReadHalfword(ctx);
|
||||
u16 idx = ScriptGetVar(ctx);
|
||||
u16* ret_ptr = ScriptGetVarPointer(ctx);
|
||||
@@ -133,7 +133,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01B0(struct ScriptContext* ctx) //01B0
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01BC(struct ScriptContext* ctx) //01BC
|
||||
{
|
||||
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u16 idx1 = ScriptGetVar(ctx);
|
||||
u16 idx2 = ScriptGetVar(ctx);
|
||||
u16 idx3 = ScriptGetVar(ctx);
|
||||
|
||||
155
arm9/src/scrcmd_move_relearner.c
Normal file
155
arm9/src/scrcmd_move_relearner.c
Normal file
@@ -0,0 +1,155 @@
|
||||
#include "scrcmd.h"
|
||||
#include "heap.h"
|
||||
#include "party.h"
|
||||
#include "unk_020377F0.h"
|
||||
#include "unk_02088DD8.h"
|
||||
|
||||
extern void* FieldSysGetAttrAddr(struct FieldSystem*, int idx);
|
||||
|
||||
extern struct UnkStruct_02037CF0* FUN_02037CF0(u32 heap_id, struct FieldSystem*, u8);
|
||||
extern u8 FUN_02037D5C(struct UnkStruct_02037CF0*);
|
||||
extern void FUN_02038864(struct FieldSystem*, MoveRelearner *moveRelearner);
|
||||
extern BOOL FUN_0203BC04(struct ScriptContext* ctx);
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01C6(struct ScriptContext* ctx) { //01C6 - todo: MoveInfo?
|
||||
u16 unk = ScriptGetVar(ctx);
|
||||
struct UnkStruct_02037CF0 **runningAppData = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
*runningAppData = FUN_02037CF0(32, ctx->fieldSystem, (u8)unk);
|
||||
|
||||
SetupNativeScript(ctx, FUN_0203BC04);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk01C7(struct ScriptContext* ctx) { //01C7 - todo: StoreMove?
|
||||
u16 *ret_ptr = ScriptGetVarPointer(ctx);
|
||||
struct UnkStruct_02037CF0 **runningAppData = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
GF_ASSERT(*runningAppData != NULL);
|
||||
|
||||
*ret_ptr = FUN_02037D5C(*runningAppData);
|
||||
if (*ret_ptr == 4)
|
||||
{
|
||||
*ret_ptr = 0xFF;
|
||||
}
|
||||
|
||||
FreeToHeap(*runningAppData);
|
||||
*runningAppData = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk021E(struct ScriptContext* ctx) //021E
|
||||
{
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk021F(struct ScriptContext* ctx) { //021F
|
||||
u16* ret_ptr = ScriptGetVarPointer(ctx);
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(ctx->fieldSystem->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
u16 *eligibleMoves = GetEligibleLevelUpMoves(pokemon, 32);
|
||||
|
||||
*ret_ptr = (u16)FUN_02088EF8(eligibleMoves);
|
||||
FreeToHeap(eligibleMoves);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_02045E74(struct ScriptContext* ctx, u8 a1, struct Pokemon* pokemon, u16 *eligibleMoves) {
|
||||
MoveRelearner **moveRelearnerPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
MoveRelearner *moveRelearner = FUN_02088DD8(32);
|
||||
*moveRelearnerPtr = moveRelearner;
|
||||
|
||||
moveRelearner->pokemon = pokemon;
|
||||
|
||||
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(ctx->fieldSystem);
|
||||
moveRelearner->player = Sav2_PlayerData_GetProfileAddr(sav2);
|
||||
|
||||
moveRelearner->options = Sav2_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveBlock2);
|
||||
moveRelearner->eligibleMoves = eligibleMoves;
|
||||
moveRelearner->unk15 = a1;
|
||||
FUN_02038864(ctx->fieldSystem, moveRelearner);
|
||||
|
||||
SetupNativeScript(ctx, FUN_0203BC04);
|
||||
FreeToHeap(eligibleMoves);
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0220(struct ScriptContext* ctx) //0220
|
||||
{
|
||||
#pragma unused(ctx)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0221(struct ScriptContext* ctx) //0221 - todo: RememberMove?
|
||||
{
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(ctx->fieldSystem->saveBlock2);
|
||||
struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
u16 *eligibleMoves = GetEligibleLevelUpMoves(pokemon, 32);
|
||||
|
||||
FUN_02045E74(ctx, 1, pokemon, eligibleMoves);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0224(struct ScriptContext* ctx) //0224 - todo: TeachMove?
|
||||
{
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
u16 move = ScriptGetVar(ctx);
|
||||
struct PlayerParty *party = SavArray_PlayerParty_get(ctx->fieldSystem->saveBlock2);
|
||||
struct Pokemon *pokemon = GetPartyMonByIndex(party, mon_idx);
|
||||
|
||||
u16 *eligibleMoves = AllocFromHeap(32, 2 * sizeof(u16));
|
||||
eligibleMoves[0] = move;
|
||||
eligibleMoves[1] = 0xFFFF;
|
||||
|
||||
FUN_02045E74(ctx, 0, pokemon, eligibleMoves);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0222(struct ScriptContext* ctx) //0222 - todo: DummyMoveCmd?
|
||||
{
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0223(struct ScriptContext* ctx) //0223 - todo: RememberMoveResponse? - destroys the MoveRelearner - find better name
|
||||
{
|
||||
u16 *ret_ptr = ScriptGetVarPointer(ctx);
|
||||
MoveRelearner **moveRelearnerPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
MoveRelearner *moveRelearner = *moveRelearnerPtr;
|
||||
|
||||
GF_ASSERT(moveRelearner != NULL);
|
||||
|
||||
if (moveRelearner->unk16 == 0)
|
||||
{
|
||||
*ret_ptr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ret_ptr = 0xFF;
|
||||
}
|
||||
|
||||
FUN_02088DF0(moveRelearner);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0225(struct ScriptContext* ctx) //0225 - todo: TeachMoveResponse? - destroys the MoveRelearner - find better name
|
||||
{
|
||||
u16 *ret_ptr = ScriptGetVarPointer(ctx);
|
||||
MoveRelearner **moveRelearnerPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
MoveRelearner *moveRelearner = *moveRelearnerPtr;
|
||||
|
||||
GF_ASSERT(moveRelearner != NULL);
|
||||
|
||||
if (moveRelearner->unk16 == 0)
|
||||
{
|
||||
*ret_ptr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ret_ptr = 0xFF;
|
||||
}
|
||||
|
||||
FUN_02088DF0(moveRelearner);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ extern u32 FUN_02054C14(u32 number);
|
||||
THUMB_FUNC BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx) //00CD - todo: BufferPlayerName? TextPlayerName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(fieldSystem);
|
||||
struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
|
||||
@@ -35,7 +35,7 @@ THUMB_FUNC BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx) //00CD - todo: B
|
||||
THUMB_FUNC BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx) //00CE - todo: BufferRivalName? TextRivalName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
|
||||
BufferRivalsName(*messageFormat, idx, fieldSystem->saveBlock2);
|
||||
@@ -46,7 +46,7 @@ THUMB_FUNC BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx) //00CE - todo: Bu
|
||||
THUMB_FUNC BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx) //00CF - todo: BufferFriendName? TextFriendName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
|
||||
BufferFriendsName(*messageFormat, idx, fieldSystem->saveBlock2);
|
||||
@@ -57,7 +57,7 @@ THUMB_FUNC BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx) //00CF - todo: B
|
||||
THUMB_FUNC BOOL ScrCmd_GetPokemonName(struct ScriptContext* ctx) //00D0 - todo: BufferPartyPokemonName? TextPartyPokemonName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(fieldSystem->saveBlock2);
|
||||
@@ -71,7 +71,7 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonName(struct ScriptContext* ctx) //00D0 - todo:
|
||||
THUMB_FUNC BOOL ScrCmd_GetItemName(struct ScriptContext* ctx) //00D1 - todo: BufferItemName? TextItemName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 item = ScriptGetVar(ctx);
|
||||
|
||||
@@ -83,7 +83,7 @@ THUMB_FUNC BOOL ScrCmd_GetItemName(struct ScriptContext* ctx) //00D1 - todo: Buf
|
||||
THUMB_FUNC BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx) //00D2 - todo: BufferPocketName? TextPocketName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 pocket = ScriptGetVar(ctx);
|
||||
|
||||
@@ -95,7 +95,7 @@ THUMB_FUNC BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx) //00D2 - todo: B
|
||||
THUMB_FUNC BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx) //00D3 - todo: BufferTMHMName? BufferMachineName? TextTMHMName? TextMachineName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 tmhm = ScriptGetVar(ctx);
|
||||
u16 move = TMHMGetMove(tmhm);
|
||||
@@ -108,7 +108,7 @@ THUMB_FUNC BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx) //00D3 - todo:
|
||||
THUMB_FUNC BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx) //00D4 - todo: BufferMoveName? TextMoveName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 move = ScriptGetVar(ctx);
|
||||
|
||||
@@ -119,7 +119,7 @@ THUMB_FUNC BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx) //00D4 - todo: Buf
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx) //00D5 - todo: BufferNumber? TextNumber?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 unk = ScriptGetVar(ctx);
|
||||
u32 digits = FUN_02054C14(unk);
|
||||
@@ -131,7 +131,7 @@ THUMB_FUNC BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx) //00D5 - todo: BufferN
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk0280(struct ScriptContext* ctx) //0280 - todo: BufferNumberSpecial? need more info
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 unk = ScriptGetVar(ctx);
|
||||
u8 unk2 = ScriptReadByte(ctx);
|
||||
@@ -149,7 +149,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0280(struct ScriptContext* ctx) //0280 - todo: BufferN
|
||||
THUMB_FUNC BOOL ScrCmd_GetPokemonNickname(struct ScriptContext* ctx) //00D6 - todo: BufferPartyPokemonNickname? TextPartyPokemonNickname?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
struct PlayerParty* party = SavArray_PlayerParty_get(fieldSystem->saveBlock2);
|
||||
@@ -164,7 +164,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0251(struct ScriptContext* ctx) //0251 - todo: BufferB
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
struct PCStorage* pc = GetStoragePCPointer(fieldSystem->saveBlock2);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 box_mon_idx = ScriptGetVar(ctx);
|
||||
s32 box_no = box_mon_idx / 30;
|
||||
@@ -178,7 +178,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0251(struct ScriptContext* ctx) //0251 - todo: BufferB
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx) //00D7 - todo: BufferPoketchAppName? TextPoketchAppName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 app = ScriptGetVar(ctx);
|
||||
|
||||
@@ -189,7 +189,7 @@ THUMB_FUNC BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx) //00D7 - tod
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx) //00D8 - todo: BufferTrainerClassName? TextTrainerClassName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 trainer_class = ScriptGetVar(ctx);
|
||||
|
||||
@@ -203,7 +203,7 @@ THUMB_FUNC BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx) //00D9 - todo: BufferP
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(fieldSystem);
|
||||
struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u32 gender = PlayerProfile_GetTrainerGender(player);
|
||||
u32 avatar = PlayerProfile_GetAvatar(player);
|
||||
@@ -216,7 +216,7 @@ THUMB_FUNC BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx) //00D9 - todo: BufferP
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx) //00DA - todo: BufferPokemonSpeciesName? TextPokemonSpeciesName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 msg_no = ScriptGetVar(ctx);
|
||||
u16 unk1 = ScriptReadHalfword(ctx);
|
||||
@@ -240,7 +240,7 @@ THUMB_FUNC struct String* FUN_02040AE4(u32 msg_no, u32 heap_id) //todo: GetPokem
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetPlayerStarterName(struct ScriptContext* ctx) //00DB - todo: BufferPlayerStarterSpecies?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
|
||||
u32 msg_no = FUN_0205F388(state);
|
||||
@@ -254,7 +254,7 @@ THUMB_FUNC BOOL ScrCmd_GetPlayerStarterName(struct ScriptContext* ctx) //00DB -
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetRivalStarterName(struct ScriptContext* ctx) //00DC - todo: BufferRivalStarterSpecies?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
|
||||
u32 msg_no = FUN_0205F398(state);
|
||||
@@ -268,7 +268,7 @@ THUMB_FUNC BOOL ScrCmd_GetRivalStarterName(struct ScriptContext* ctx) //00DC - t
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetCounterpartStarterName(struct ScriptContext* ctx) //00DD - todo: BufferFriendStarterSpecies?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
|
||||
u32 msg_no = FUN_0205F3C0(state);
|
||||
@@ -282,7 +282,7 @@ THUMB_FUNC BOOL ScrCmd_GetCounterpartStarterName(struct ScriptContext* ctx) //00
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx) //00DF - todo: BufferDecorationName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 decoration = ScriptGetVar(ctx);
|
||||
|
||||
@@ -293,7 +293,7 @@ THUMB_FUNC BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx) //00DF - tod
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx) //00E0 - todo: BufferUndergroundTrapName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_trap = ScriptGetVar(ctx);
|
||||
|
||||
@@ -304,7 +304,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx) //00E0
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx) //00E1 - todo: BufferUndergroundItemName? BufferTreasureName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_item = ScriptGetVar(ctx);
|
||||
|
||||
@@ -316,7 +316,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx) //00E1
|
||||
THUMB_FUNC BOOL ScrCmd_GetMapName(struct ScriptContext* ctx) //00E2 - todo: BufferMapName?
|
||||
{
|
||||
struct String* str = String_ctor(22, 4);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 map_no = ScriptGetVar(ctx);
|
||||
|
||||
@@ -329,7 +329,7 @@ THUMB_FUNC BOOL ScrCmd_GetMapName(struct ScriptContext* ctx) //00E2 - todo: Buff
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetBerryName(struct ScriptContext* ctx) //017B - todo: BufferBerryName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 berry = ScriptGetVar(ctx);
|
||||
u16 unk = ScriptGetVar(ctx);
|
||||
@@ -343,7 +343,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryName(struct ScriptContext* ctx) //017B - todo: Bu
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx) //017C - todo: BufferNatureName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 nature = ScriptGetVar(ctx);
|
||||
|
||||
@@ -354,7 +354,7 @@ THUMB_FUNC BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx) //017C - todo: B
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx) //0261 - todo: BufferAccessoryName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 fashion = ScriptGetVar(ctx);
|
||||
|
||||
@@ -365,7 +365,7 @@ THUMB_FUNC BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx) //0261 - todo:
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetWhiteRockInscription(struct ScriptContext* ctx) //0272 - todo: BufferWhiteRockInscription?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct String* str = String_ctor(11, 11);
|
||||
struct UnkStruct_02024E64* unk = FUN_02024EB4(ctx->fieldSystem->saveBlock2);
|
||||
@@ -381,7 +381,7 @@ THUMB_FUNC BOOL ScrCmd_GetWhiteRockInscription(struct ScriptContext* ctx) //0272
|
||||
THUMB_FUNC BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx) //01CB - todo: BufferPartyPokemonMoveName?
|
||||
{
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 mon_idx = ScriptGetVar(ctx);
|
||||
u16 mon_move_idx = ScriptGetVar(ctx);
|
||||
@@ -396,7 +396,7 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx) //01CB - to
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetRibbonName(struct ScriptContext* ctx) //0232 - todo: BufferRibbonName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u8 unk = (u8)ScriptGetVar(ctx);
|
||||
u16 ribbon = (u16)FUN_0207FC5C(unk, 3);
|
||||
@@ -408,7 +408,7 @@ THUMB_FUNC BOOL ScrCmd_GetRibbonName(struct ScriptContext* ctx) //0232 - todo: B
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetSealName(struct ScriptContext* ctx) //02B3 - todo: BufferSealName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 seal = ScriptGetVar(ctx);
|
||||
|
||||
@@ -419,7 +419,7 @@ THUMB_FUNC BOOL ScrCmd_GetSealName(struct ScriptContext* ctx) //02B3 - todo: Buf
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx) //02C4 - todo: BufferIndefItemName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 item = ScriptGetVar(ctx);
|
||||
|
||||
@@ -430,7 +430,7 @@ THUMB_FUNC BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx) //
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx) //02C5 - todo: BufferPluralItemName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 item = ScriptGetVar(ctx);
|
||||
|
||||
@@ -441,7 +441,7 @@ THUMB_FUNC BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx) //02C5 - tod
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx) //02C6 - todo: BufferIndefDecorationName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 decoration = ScriptGetVar(ctx);
|
||||
|
||||
@@ -452,7 +452,7 @@ THUMB_FUNC BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx) /
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* ctx) //02C7 - todo: BufferIndefTrapName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_trap = ScriptGetVar(ctx);
|
||||
|
||||
@@ -463,7 +463,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* c
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* ctx) //02C8 - todo: BufferIndefUndergroundItemName? BufferIndefTreasureName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 underground_item = ScriptGetVar(ctx);
|
||||
|
||||
@@ -474,7 +474,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* c
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx) //02C9 - todo: BufferIndefSpeciesName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
u16 unused1 = ScriptReadHalfword(ctx);
|
||||
@@ -487,7 +487,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx) //02C9 - todo: BufferI
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx) //02CA - todo: BufferIndefFriendStarterSpecies?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
|
||||
u32 species = FUN_0205F3C0(state);
|
||||
@@ -499,7 +499,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx) //02CA - todo: BufferI
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx) //02CB - todo: BufferIndefAccessoryName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 fashion = ScriptGetVar(ctx);
|
||||
|
||||
@@ -510,7 +510,7 @@ THUMB_FUNC BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx) //02
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx) //02CC - todo: BufferIndefTrainerClassName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 trainer_class = ScriptGetVar(ctx);
|
||||
|
||||
@@ -521,7 +521,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx) //02CC - todo: BufferI
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx) //02CD - todo: BufferPluralSealName?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
u16 seal = ScriptGetVar(ctx);
|
||||
|
||||
@@ -532,7 +532,7 @@ THUMB_FUNC BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx) //02CD - tod
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx) //02CE - todo CapitalizeText?
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
u8 idx = ScriptReadByte(ctx);
|
||||
|
||||
MessageFormat_UpperFirstChar(*messageFormat, idx);
|
||||
|
||||
@@ -11,7 +11,7 @@ extern BOOL FUN_020612F8(struct FieldSystem*);
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_UnionGroup(struct ScriptContext* ctx) //021D
|
||||
{
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
|
||||
MessageFormat **messageFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT);
|
||||
struct UnkSaveStruct_020286F8* unk_sav_ptr = FUN_0202881C(ctx->fieldSystem->saveBlock2);
|
||||
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
extern void LoadWotbl_HandleAlternateForme(int species, int forme, u16 * wotbl);
|
||||
|
||||
THUMB_FUNC struct UnkStruct_02088DD8* FUN_02088DD8(u32 heap_id) {
|
||||
struct UnkStruct_02088DD8 *returnPointer = AllocFromHeap(heap_id, sizeof(struct UnkStruct_02088DD8));
|
||||
__builtin__clear(returnPointer, sizeof(struct UnkStruct_02088DD8));
|
||||
THUMB_FUNC MoveRelearner *FUN_02088DD8(u32 heap_id) {
|
||||
MoveRelearner *returnPointer = AllocFromHeap(heap_id, sizeof(MoveRelearner));
|
||||
__builtin__clear(returnPointer, sizeof(MoveRelearner));
|
||||
return returnPointer;
|
||||
}
|
||||
|
||||
THUMB_FUNC void FUN_02088DF0(struct UnkStruct_02037CF0 *r0) {
|
||||
FreeToHeap(r0);
|
||||
THUMB_FUNC void FUN_02088DF0(MoveRelearner *moveRelearner) {
|
||||
FreeToHeap(moveRelearner);
|
||||
}
|
||||
|
||||
#define WOTBL_END 0xFFFF
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
#include "pokemon.h"
|
||||
#include "unk_02008DEC.h"
|
||||
|
||||
struct UnkStruct_0200CABC_1
|
||||
{
|
||||
struct Window *unk000;
|
||||
typedef struct WaitingIcon {
|
||||
struct Window *window;
|
||||
u8 unk004[9][0x80];
|
||||
u16 fillValue;
|
||||
u8 unk486;
|
||||
u8 unk487 : 7;
|
||||
u8 unk488 : 2;
|
||||
};
|
||||
} WaitingIcon;
|
||||
|
||||
struct UnkStruct_0200CABC_2
|
||||
{
|
||||
@@ -82,8 +81,7 @@ void BlitRect4Bit(u8 *srcPixels,
|
||||
u16 width,
|
||||
u16 height);
|
||||
void FUN_0200D18C(struct Window *window, u16 fill_value);
|
||||
void FUN_0200D274(
|
||||
struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id);
|
||||
void FUN_0200D274(struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id); //todo: LoadUserFrameGfx1?
|
||||
void FUN_0200D300(struct BgConfig *bg_config,
|
||||
u8 bg_id,
|
||||
u16 numtiles,
|
||||
@@ -91,8 +89,7 @@ void FUN_0200D300(struct BgConfig *bg_config,
|
||||
u8 param4,
|
||||
u16 param5,
|
||||
u32 heap_id);
|
||||
void FUN_0200D378(
|
||||
struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id);
|
||||
void FUN_0200D378(struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); //todo: LoadUserFrameGfx2?
|
||||
void DrawFrame3(struct BgConfig *bgConfig,
|
||||
u8 bgId,
|
||||
u8 x,
|
||||
@@ -102,24 +99,15 @@ void DrawFrame3(struct BgConfig *bgConfig,
|
||||
u8 paletteNum,
|
||||
u16 fillValue);
|
||||
void DrawWindowCorner(struct Window *window, u16 fillValue, u8 paletteNum);
|
||||
void DrawFrameAndWindow3(
|
||||
struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4);
|
||||
void DrawFrameAndWindow3(struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4);
|
||||
void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL copy_to_vram);
|
||||
struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1);
|
||||
void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1);
|
||||
WaitingIcon *WaitingIcon_new(struct Window *window, u32 param1); //todo param1 -> u16 tileNum?
|
||||
void FUN_0200D980(WaitingIcon *waitingIcon, u32 param1);
|
||||
void FUN_0200DB7C(u32 param0, void *param1);
|
||||
void FUN_0200DBE8(u32 param0, void *param1);
|
||||
void FUN_0200DBFC(struct UnkStruct_0200CABC_1 *param0);
|
||||
void FUN_0200DC24(struct UnkStruct_0200CABC_1 *param0);
|
||||
u8 *FUN_0200DC4C(struct BgConfig *bg_config,
|
||||
u8 bg_id,
|
||||
u8 param2,
|
||||
u8 param3,
|
||||
u8 param4,
|
||||
u16 param5,
|
||||
u16 param6,
|
||||
u8 param7,
|
||||
s32 param8);
|
||||
void FUN_0200DBFC(WaitingIcon *waitingIcon);
|
||||
void FUN_0200DC24(WaitingIcon *waitingIcon);
|
||||
u8 *FUN_0200DC4C(struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u8 param4, u16 param5, u16 param6, u8 param7, s32 param8);
|
||||
u8 *FUN_0200DCA4(struct BgConfig *bg_config,
|
||||
u8 bg_id,
|
||||
u8 param2,
|
||||
@@ -129,8 +117,7 @@ u8 *FUN_0200DCA4(struct BgConfig *bg_config,
|
||||
struct Pokemon *param6,
|
||||
s32 param7);
|
||||
void FUN_0200DCF8(u32 param0, void *param1);
|
||||
struct UnkStruct_0200CABC_2 *FUN_0200DD70(
|
||||
struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u32 param4);
|
||||
struct UnkStruct_0200CABC_2 *FUN_0200DD70(struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u32 param4);
|
||||
void FUN_0200DDAC(struct UnkStruct_0200CABC_2 *param0, u32 param1);
|
||||
void FUN_0200DDD8(struct UnkStruct_0200CABC_2 *param0);
|
||||
void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2);
|
||||
|
||||
@@ -108,8 +108,8 @@ BOOL ScrCmd_Unk003A(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk003B(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_Menu(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_YesNoMenu(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_ShowSaveClock(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_HideSaveClock(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_ShowWaitingIcon(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_HideWaitingIcon(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_Unk0040(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_Unk0041(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_Unk0042(struct ScriptContext *ctx);
|
||||
@@ -150,7 +150,7 @@ BOOL ScrCmd_GiveSeals(struct ScriptContext *ctx);
|
||||
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_UnionChoosePokemonMenu(struct ScriptContext *ctx);
|
||||
BOOL ScrCmd_GetSelectedPartySlot(struct ScriptContext *ctx);
|
||||
|
||||
// scrcmd_mart.c
|
||||
@@ -402,7 +402,7 @@ BOOL ScrCmd_Unk01C6(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk01C7(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk021E(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk021F(struct ScriptContext* ctx);
|
||||
void FUN_02045E74(struct ScriptContext* ctx, u8 a1, struct Pokemon* pokemon, void* a3);
|
||||
void FUN_02045E74(struct ScriptContext* ctx, u8 a1, struct Pokemon* pokemon, u16 *eligibleMoves);
|
||||
BOOL ScrCmd_Unk0220(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk0221(struct ScriptContext* ctx);
|
||||
BOOL ScrCmd_Unk0224(struct ScriptContext* ctx);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "camera.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "msgdata.h"
|
||||
#include "render_window.h"
|
||||
#include "save_block_2.h"
|
||||
#include "task.h"
|
||||
|
||||
@@ -14,7 +15,6 @@ struct ScriptContext;
|
||||
typedef u8 (*ScrCmdFunc)(struct ScriptContext *);
|
||||
typedef u8 Script[];
|
||||
|
||||
|
||||
struct UnkStruct_020464D4
|
||||
{
|
||||
u16 unk0[4];
|
||||
@@ -31,6 +31,8 @@ typedef struct LocalMapObject { //todo move to local_map_object.c
|
||||
u8 padding[0x12C]; //todo verify size
|
||||
} LocalMapObject;
|
||||
|
||||
typedef struct PartyMenuAppData PartyMenuAppData; //todo move to own file
|
||||
|
||||
struct FieldSystem //todo move to field_system.c
|
||||
{
|
||||
u32 *unk00;
|
||||
@@ -88,7 +90,11 @@ typedef enum ScriptEnvField {
|
||||
SCRIPTENV_UNKNOWN_12,
|
||||
SCRIPTENV_SCRIPT_CONTEXT_0,
|
||||
SCRIPTENV_SCRIPT_CONTEXT_1, //diamond does not appear to have SCRIPT_CONTEXT_2 like HG
|
||||
SCRIPTENV_
|
||||
SCRIPTENV_MESSAGE_FORMAT,
|
||||
SCRIPTENV_STRING_BUFFER_0,
|
||||
SCRIPTENV_STRING_BUFFER_1,
|
||||
SCRIPTENV_WAITING_ICON,
|
||||
SCRIPTENV_RUNNING_APP_DATA,
|
||||
} ScriptEnvField;
|
||||
|
||||
#define ScriptReadByte(ctx) (*(ctx->scriptPtr++))
|
||||
|
||||
@@ -7,19 +7,20 @@ struct Options;
|
||||
struct PlayerData;
|
||||
struct Pokemon;
|
||||
|
||||
struct UnkStruct_02088DD8
|
||||
typedef struct MoveRelearner
|
||||
{
|
||||
struct Pokemon* pokemon;
|
||||
struct PlayerData* player;
|
||||
struct Options* options;
|
||||
void* unkC;
|
||||
u16 *eligibleMoves;
|
||||
u8 padding[0x5];
|
||||
u8 unk15;
|
||||
u8 padding2[0x2];
|
||||
};
|
||||
u8 unk16;
|
||||
u8 padding2[1];
|
||||
} MoveRelearner;
|
||||
|
||||
struct UnkStruct_02088DD8* FUN_02088DD8(u32 heap_id);
|
||||
void FUN_02088DF0(struct UnkStruct_02037CF0 *r0);
|
||||
MoveRelearner *FUN_02088DD8(u32 heap_id);
|
||||
void FUN_02088DF0(MoveRelearner *moveRelearner);
|
||||
u16* GetEligibleLevelUpMoves(struct Pokemon* pokemon, u32 heap_id);
|
||||
BOOL FUN_02088EF8(u16 *r0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user