diff --git a/.gitignore b/.gitignore index 505b924..b3360f3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ ctx.c.m2c .vscode/* !.vscode/c_cpp_properties.json +tools/vtxdis diff --git a/src/1AB70.c b/src/1AB70.c index d97b7d0..54ebe52 100644 --- a/src/1AB70.c +++ b/src/1AB70.c @@ -79,11 +79,48 @@ unk_func_8001A024* func_8001A024(unk_D_86002F58_004_000_010* arg0, s16 arg1, s16 return temp_v0; } -#pragma GLOBAL_ASM("asm/us/nonmatchings/1AB70/func_8001A1D0.s") +void func_8001A1D0(unk_func_8001A024* arg0, unk_D_86002F58_004_000_010* arg1, unk_D_80068BB0* arg2) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/1AB70/func_8001A250.s") + arg0->unk_04 = arg1; + arg0->unk_14 = arg2; -#pragma GLOBAL_ASM("asm/us/nonmatchings/1AB70/func_8001A258.s") + for (i = 0; i < arg0->unk_01; ++i) { + func_80006414(arg0->unk_08[i].unk_0C, arg2); + } +} + +void func_8001A250(unk_func_8001A024* arg0, unk_D_8006FF00* arg1) { + arg0->unk_18 = arg1; +} + +void func_8001A258(unk_func_8001A024* arg0) { + // s32 var_s0; + s32 i; + u16 w; + u16 h; + unk_func_8001A024_008* tempImg_p; + unk_D_80068BB0* tempDepth_p; + + if (arg0->unk_00 & 1) { + func_80019CA8(arg0->unk_04); + func_8001BCF0(arg0->unk_10); + } + + arg0->unk_00 = 0; + arg0->unk_02 = 0; + arg0->unk_03 = -1; + + for (i = 0; i < arg0->unk_01; ++i) { + tempImg_p = &arg0->unk_08[i]; + tempDepth_p = tempImg_p->unk_0C; + w = tempDepth_p->width; + h = tempDepth_p->height; + tempImg_p->unk_00 = 0; + arg0->unk_08[i].unk_14.raw = 0; + bzero(arg0->unk_08[i].unk_0C->img_p, w * h * 2); + } +} #ifdef NON_MATCHING void func_8001A324(unk_func_8001A024* arg0, s32 arg1, s32 arg2, u16 arg3) { diff --git a/src/1AB70.h b/src/1AB70.h index 03024be..45912e3 100644 --- a/src/1AB70.h +++ b/src/1AB70.h @@ -77,6 +77,7 @@ typedef struct unk_D_84B25A28 { unk_func_8001A024* func_8001A024(unk_D_86002F58_004_000_010*, s16, s16, s16); void func_8001A1D0(unk_func_8001A024*, unk_D_86002F58_004_000_010*, unk_D_80068BB0*); void func_8001A250(unk_func_8001A024*, unk_D_8006FF00*); +void func_8001A258(unk_func_8001A024*); void func_8001A324(unk_func_8001A024*, s32, s32, u16); void func_8001A46C(unk_func_8001A024*, s32, unk_func_80026268_arg0*, s32); void func_8001AA18(unk_func_8001A024*, s32, unk_D_84B25A28*); diff --git a/src/22630.c b/src/22630.c index f25fe0d..519a203 100644 --- a/src/22630.c +++ b/src/22630.c @@ -23,7 +23,7 @@ void func_80021A68(u8* arg0, s32 arg1) { void func_80021A78(u8* arg0, s32 arg1) { arg0[0] = (arg1 >> 0x10) & 0xFF; arg0[1] = (arg1 >> 8) & 0xFF; - arg0[2] = (arg1)&0xFF; + arg0[2] = (arg1) & 0xFF; } char* func_80021A90(char* arg0, char* arg1) { diff --git a/src/fragments/30/fragment30.c b/src/fragments/30/fragment30.c index 7eaf735..247428a 100644 --- a/src/fragments/30/fragment30.c +++ b/src/fragments/30/fragment30.c @@ -1,3 +1,9 @@ -#include "global.h" +#include "src/29BA0.h" -#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/30/fragment30/func_88A00020.s") +#include "fragment30.h" + +// unused wrapper to load the pokelab? +s32 func_88A00020(UNUSED s32 arg0, UNUSED s32 arg1) { + FRAGMENT_LOAD_AND_CALL2(fragment22, 1, 0); + return 0x25; +} diff --git a/src/fragments/30/fragment30.h b/src/fragments/30/fragment30.h new file mode 100644 index 0000000..4c227ce --- /dev/null +++ b/src/fragments/30/fragment30.h @@ -0,0 +1,6 @@ +#ifndef _FRAGMENT30_H_ +#define _FRAGMENT30_H_ + +s32 func_88A00020(UNUSED s32 arg0, UNUSED s32 arg1); + +#endif // _FRAGMENT31_H_ \ No newline at end of file diff --git a/tools/vtxdis b/tools/vtxdis deleted file mode 100755 index 838b6cd..0000000 Binary files a/tools/vtxdis and /dev/null differ