mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
Start to decompile WRP
This commit is contained in:
parent
25aaa95009
commit
3dd3606213
@ -0,0 +1 @@
|
||||
DestroyEntity = 0x8018B600;
|
@ -175,12 +175,75 @@ typedef struct
|
||||
s32 unk24;
|
||||
} Unkstruct5;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_long tag;
|
||||
s8 unk4, unk5, unk6, unk7;
|
||||
s16 unk8, unkA;
|
||||
s16 unkC, unkE;
|
||||
s16 unk10;
|
||||
s16 unk12;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
s16 unk1E;
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
s8 unk24;
|
||||
s8 unk25;
|
||||
s8 unk26;
|
||||
s8 unk27;
|
||||
s8 unk28;
|
||||
s8 unk29;
|
||||
s8 unk2A;
|
||||
s8 unk2B;
|
||||
s16 unk2C;
|
||||
s16 unk2E;
|
||||
s16 unk30;
|
||||
s16 unk32;
|
||||
} Unkstruct6; // This is most likely POLY_GT4
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_long tag;
|
||||
s8 unk4, unk5, unk6, unk7;
|
||||
s16 unk8, unkA;
|
||||
s16 unkC, unkE;
|
||||
s16 unk10;
|
||||
s8 unk12;
|
||||
s8 unk13;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
s8 unk1E;
|
||||
s8 unk1F;
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
s8 unk24;
|
||||
s8 unk25;
|
||||
s8 unk26;
|
||||
s8 unk27;
|
||||
s8 unk28;
|
||||
s8 unk29;
|
||||
s8 unk2A;
|
||||
s8 unk2B;
|
||||
s16 unk2C;
|
||||
s16 unk2E;
|
||||
s16 unk30;
|
||||
s16 unk32;
|
||||
} Unkstruct7;
|
||||
|
||||
// main
|
||||
extern void (*D_8003C7DC)(s32);
|
||||
extern Unkstruct5* D_8003C704;
|
||||
extern u16 D_8003C708;
|
||||
extern s32 D_8003C734;
|
||||
extern void (*D_8003C744)(s32, s32);
|
||||
extern void (*D_8003C848)(s32, s32);
|
||||
extern RoomHeader* D_8003C784;
|
||||
extern void (*D_8003C7B4)(s32);
|
||||
extern Unkstruct5* D_8003C808;
|
||||
@ -217,6 +280,8 @@ extern s32 D_800730C4;
|
||||
extern s32 g_CurrentRoomWidth;
|
||||
extern s32 g_CurrentRoomHeight;
|
||||
extern Entity D_800733D8[];
|
||||
extern s16 D_800733DA;
|
||||
extern s16 D_800733DE;
|
||||
extern s16 D_80073404;
|
||||
extern s16 D_80073406;
|
||||
extern s8 D_80073510;
|
||||
@ -228,6 +293,7 @@ extern void* D_8007EFD8;
|
||||
extern POLY_GT4 D_80086FEC[];
|
||||
extern s32 playerX;
|
||||
extern s32 playerY;
|
||||
extern u32 D_800978B8;
|
||||
extern s32 D_800973FC;
|
||||
extern Unkstruct1 D_80097490;
|
||||
extern u16 D_80097494;
|
||||
|
@ -1,67 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "dra.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_long tag;
|
||||
s8 unk4, unk5, unk6, unk7;
|
||||
s16 unk8, unkA;
|
||||
s16 unkC, unkE;
|
||||
s16 unk10;
|
||||
s8 unk12;
|
||||
s8 unk13;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
s8 unk1E;
|
||||
s8 unk1F;
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
s8 unk24;
|
||||
s8 unk25;
|
||||
s8 unk26;
|
||||
s8 unk27;
|
||||
s8 unk28;
|
||||
s8 unk29;
|
||||
s8 unk2A;
|
||||
s8 unk2B;
|
||||
s16 unk2C;
|
||||
s16 unk2E;
|
||||
s16 unk30;
|
||||
s16 unk32;
|
||||
} Unkstruct_mad_3;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_long tag;
|
||||
s8 unk4, unk5, unk6, unk7;
|
||||
s16 unk8, unkA;
|
||||
s16 unkC, unkE;
|
||||
s16 unk10;
|
||||
s16 unk12;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
s16 unk1E;
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
s8 unk24;
|
||||
s8 unk25;
|
||||
s8 unk26;
|
||||
s8 unk27;
|
||||
s8 unk28;
|
||||
s8 unk29;
|
||||
s8 unk2A;
|
||||
s8 unk2B;
|
||||
s16 unk2C;
|
||||
s16 unk2E;
|
||||
s16 unk30;
|
||||
s16 unk32;
|
||||
} Unkstruct_mad_4;
|
||||
|
||||
#ifndef FIX_MAD
|
||||
extern void (*D_8003C6B0)(s32);
|
||||
@ -80,9 +19,6 @@ extern s32 D_80096ED8[];
|
||||
extern s32 D_800973B4;
|
||||
extern POLY_GT4 D_800973B8[];
|
||||
#else
|
||||
extern s16 D_80072E8A;
|
||||
extern s16 D_80072E8E;
|
||||
extern u32 D_80097364;
|
||||
extern Entity D_80075D88[];
|
||||
extern s32 D_80096ED8[];
|
||||
extern s32 D_800973B4;
|
||||
@ -91,11 +27,11 @@ extern POLY_GT4 D_800973B8[];
|
||||
#define D_8003C6B0 D_8003C7B4
|
||||
#define D_8003C6D8 D_8003C7DC
|
||||
#define D_8006C26C D_8006C3B8
|
||||
#define D_80072E8A D_80072E8A // TODO
|
||||
#define D_80072E8E D_80072E8E // TODO
|
||||
#define D_80072E8A D_800733DA
|
||||
#define D_80072E8E D_800733DE
|
||||
#define D_8007D308 D_8007D858
|
||||
#define D_80096EB8 D_80097408
|
||||
#define D_80097364 D_80097364 // TODO
|
||||
#define D_80097364 D_800978B8
|
||||
#define D_80072B3E D_8007308E
|
||||
#define D_80072B42 D_80073092
|
||||
#define D_80075D88 D_80075D88 // TODO
|
||||
@ -130,7 +66,7 @@ void SpawnExplosionEntity(u16, Entity *);
|
||||
void DestroyEntity(Entity*);
|
||||
s32 AnimateEntity(u8 *arg0, Entity *entity);
|
||||
Entity* AllocEntity(Entity* arg0, Entity* arg1);
|
||||
s32 func_80192914(s16 arg0, s16 arg1);
|
||||
u8 func_80192914(s16 arg0, s16 arg1);
|
||||
void InitializeEntity(u16 *arg0);
|
||||
void ReplaceCandleWithDrop(Entity *);
|
||||
void EntityCandleDrop(Entity*);
|
||||
@ -577,15 +513,13 @@ s32 func_8019203C(void) {
|
||||
return value;
|
||||
}
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", func_80192078);
|
||||
#else
|
||||
// It was matching with GCC 2.7.x
|
||||
s32 func_80192078(void) {
|
||||
s32 value = D_8006C26C->posY.Data.high - D_80072E8E;
|
||||
return value < 0 ? -value : value;
|
||||
if (value < 0) {
|
||||
value = -value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", func_801920AC);
|
||||
@ -656,20 +590,20 @@ void func_801928A8(s32 arg0, s16 arg1) {
|
||||
D_8006C26C->accelerationY = func_80192860((arg0 - 0x40) & 0xFF, arg1);
|
||||
}
|
||||
|
||||
s32 func_80192914(s16 x, s16 y) {
|
||||
return ((func_800190AC(y, x) >> 4) + 0x40) & 0xFF;
|
||||
u8 func_80192914(s16 x, s16 y) {
|
||||
return ((func_800190AC(y, x) >> 4) + 0x40);
|
||||
}
|
||||
|
||||
s32 func_8019294C(Entity* a, Entity* b) {
|
||||
u8 func_8019294C(Entity* a, Entity* b) {
|
||||
s32 diffX = (u16)b->posX.Data.high - (u16)a->posX.Data.high;
|
||||
s32 diffY = (u16)b->posY.Data.high - (u16)a->posY.Data.high;
|
||||
return func_80192914(diffX, diffY) & 0xFF;
|
||||
return func_80192914(diffX, diffY);
|
||||
}
|
||||
|
||||
u32 func_80192994(s32 x, s32 y) {
|
||||
u8 func_80192994(s32 x, s32 y) {
|
||||
s32 diffX = x - (u16)D_8006C26C->posX.Data.high;
|
||||
s32 diffY = y - (u16)D_8006C26C->posY.Data.high;
|
||||
return func_80192914(diffX, diffY) & 0xFF;
|
||||
return func_80192914(diffX, diffY);
|
||||
}
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
@ -690,14 +624,14 @@ u8 func_801929DC(s32 arg0, s32 arg1, s32 arg2) {
|
||||
|
||||
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", func_80192A34);
|
||||
|
||||
s32 func_80192AC0(s16 x, s16 y) {
|
||||
return func_800190AC(y, x) & 0xFFFF;
|
||||
u16 func_80192AC0(s16 x, s16 y) {
|
||||
return func_800190AC(y, x);
|
||||
}
|
||||
|
||||
s32 func_80192AF0(Entity* a, Entity* b) {
|
||||
u16 func_80192AF0(Entity* a, Entity* b) {
|
||||
s32 diffX = b->posX.Data.high - a->posX.Data.high;
|
||||
s32 diffY = b->posY.Data.high - a->posY.Data.high;
|
||||
return func_800190AC(diffY, diffX) & 0xFFFF;
|
||||
return func_800190AC(diffY, diffX);
|
||||
}
|
||||
|
||||
u16 func_80192B28(s32 x, s32 y) {
|
||||
@ -970,44 +904,44 @@ INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", func_80199508);
|
||||
|
||||
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", func_80199584);
|
||||
|
||||
void func_8019960C(Unkstruct_mad_3* arg0) {
|
||||
void func_8019960C(Unkstruct7* arg0) {
|
||||
arg0->unk13 = 0;
|
||||
arg0->unk1F = 0;
|
||||
arg0->unk2B = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk14 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk16 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unkA = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk8 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unkE = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unkC = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk12 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk10 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk18 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk1A = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk1C = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk1E = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk24 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk25 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk28 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk2A = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk20 = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk22 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk14 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk16 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unkA = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk8 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unkE = 0;
|
||||
((Unkstruct6*)arg0->tag)->unkC = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk12 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk10 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk18 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk1A = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk1C = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk1E = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk24 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk25 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk28 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk2A = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk20 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk22 = 0;
|
||||
}
|
||||
|
||||
void func_801996EC(Unkstruct_mad_3* arg0) {
|
||||
void func_801996EC(Unkstruct7* arg0) {
|
||||
func_8019960C(arg0);
|
||||
arg0->unk2B = 8;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk2B = 1;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk7 = 2;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk32 = 0xA;
|
||||
((Unkstruct6*)arg0->tag)->unk2B = 1;
|
||||
((Unkstruct6*)arg0->tag)->unk7 = 2;
|
||||
((Unkstruct6*)arg0->tag)->unk32 = 0xA;
|
||||
}
|
||||
|
||||
void func_80199740(Unkstruct_mad_4* arg0) {
|
||||
void func_80199740(Unkstruct6* arg0) {
|
||||
arg0->unk2B = 0;
|
||||
arg0->unk32 = 8;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk2B = 0;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk7 = 4;
|
||||
((Unkstruct_mad_4*)arg0->tag)->unk32 = 8;
|
||||
((Unkstruct6*)arg0->tag)->unk2B = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk7 = 4;
|
||||
((Unkstruct6*)arg0->tag)->unk32 = 8;
|
||||
}
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
|
@ -1,4 +1,9 @@
|
||||
#include "common.h"
|
||||
#include "dra.h"
|
||||
|
||||
extern s16 D_80180A94[];
|
||||
extern ObjectInit *D_80193AB0;
|
||||
extern ObjectInit *D_80193AB4;
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80186FD0);
|
||||
|
||||
@ -10,7 +15,10 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_801873A0);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80187F1C);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_801881E8);
|
||||
u32 func_801881E8(void) {
|
||||
D_800978B8 = (D_800978B8 * 0x01010101) + 1;
|
||||
return D_800978B8 >> 0x18;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80188218);
|
||||
|
||||
@ -26,17 +34,53 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80189E9C);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80189FB4);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A0CC);
|
||||
void func_8018A0CC(s32 arg0) {
|
||||
s32 a1 = 0xFFFE;
|
||||
arg0 = (s16)arg0;
|
||||
loop_1:
|
||||
if (D_80193AB0->posX == a1 || D_80193AB0->posX < arg0) {
|
||||
D_80193AB0++;
|
||||
goto loop_1;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A118);
|
||||
void func_8018A118(s32 arg0) {
|
||||
s32 a2, a3;
|
||||
a3 = 0xFFFF;
|
||||
arg0 = (s16)arg0;
|
||||
a2 = 0xFFFE;
|
||||
loop_1:
|
||||
if (D_80193AB0->posX == a3 || (arg0 < D_80193AB0->posX) && (D_80193AB0->posX != a2)) {
|
||||
D_80193AB0--;
|
||||
goto loop_1;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A170);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A26C);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A380);
|
||||
void func_8018A380(s32 arg0) {
|
||||
s32 a1 = 0xFFFE;
|
||||
arg0 = (s16)arg0;
|
||||
loop_1:
|
||||
if (D_80193AB4->posY == a1 || D_80193AB4->posY < arg0) {
|
||||
D_80193AB4++;
|
||||
goto loop_1;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A3CC);
|
||||
void func_8018A3CC(s32 arg0) {
|
||||
while (true)
|
||||
{
|
||||
if (D_80193AB4->posY == 0xFFFF)
|
||||
D_80193AB4--;
|
||||
else if ((s16)arg0 >= D_80193AB4->posY || D_80193AB4->posY == 0xFFFE)
|
||||
break;
|
||||
else
|
||||
D_80193AB4--;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A424);
|
||||
|
||||
@ -54,7 +98,19 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A950);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A9C8);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B600);
|
||||
void DestroyEntity(Entity* item) {
|
||||
int i, length;
|
||||
u32* ptr;
|
||||
|
||||
if (item->unk34 & 0x800000) {
|
||||
D_8003C7B4(item->unk64);
|
||||
}
|
||||
|
||||
ptr = item;
|
||||
length = sizeof(Entity) / sizeof(s32);
|
||||
for (i = 0; i < length; i++)
|
||||
*ptr++ = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B66C);
|
||||
|
||||
@ -64,15 +120,34 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B730);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B7E8);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B900);
|
||||
s16 func_8018B900(void) {
|
||||
s16 value = D_8006C3B8->posX.Data.high - D_800733DA;
|
||||
if (value < 0) {
|
||||
value = -value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B93C);
|
||||
s32 func_8018B93C(void) {
|
||||
s32 value = D_8006C3B8->posY.Data.high - D_800733DE;
|
||||
if (value < 0) {
|
||||
value = -value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B970);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B9B4);
|
||||
void func_8018B9B4(void) {
|
||||
D_8006C3B8->posX.value = D_8006C3B8->posX.value + D_8006C3B8->accelerationX;
|
||||
D_8006C3B8->posY.value = D_8006C3B8->posY.value + D_8006C3B8->accelerationY;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018B9E4);
|
||||
void func_8018B9E4(void) {
|
||||
if (D_8006C3B8->accelerationY <= 0x5FFFF) {
|
||||
D_8006C3B8->accelerationY = D_8006C3B8->accelerationY + 0x4000;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BA10);
|
||||
|
||||
@ -80,39 +155,109 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BC88);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BE70);
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BED0);
|
||||
#else
|
||||
s32 func_8018BED0(s32 arg0, s16 arg1) {
|
||||
return D_80180A94[arg0 & 0xFF] * arg1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BEFC);
|
||||
#else
|
||||
s16 func_8018BEFC(s32 arg0) {
|
||||
return D_80180A94[arg0 & 0xFF];
|
||||
}
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BF18);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BF84);
|
||||
u8 func_8018BF84(s16 x, s16 y) {
|
||||
return ((func_800190AC(y, x) >> 4) + 0x40);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018BFBC);
|
||||
u8 func_8018BFBC(Entity* a, Entity* b) {
|
||||
s32 diffX = (u16)b->posX.Data.high - (u16)a->posX.Data.high;
|
||||
s32 diffY = (u16)b->posY.Data.high - (u16)a->posY.Data.high;
|
||||
return func_8018BF84(diffX, diffY);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C004);
|
||||
u8 func_8018C004(s32 x, s32 y) {
|
||||
s32 diffX = x - (u16)D_8006C3B8->posX.Data.high;
|
||||
s32 diffY = y - (u16)D_8006C3B8->posY.Data.high;
|
||||
return func_8018BF84(diffX, diffY);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C04C);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C0A4);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C130);
|
||||
u16 func_8018C130(s16 x, s16 y) {
|
||||
return func_800190AC(y, x);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C160);
|
||||
u16 func_8018C160(Entity* a, Entity* b) {
|
||||
s32 diffX = b->posX.Data.high - a->posX.Data.high;
|
||||
s32 diffY = b->posY.Data.high - a->posY.Data.high;
|
||||
return func_800190AC(diffY, diffX);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C198);
|
||||
u16 func_8018C198(s32 x, s32 y) {
|
||||
s16 diffX = x - (u16)D_8006C3B8->posX.Data.high;
|
||||
s16 diffY = y - (u16)D_8006C3B8->posY.Data.high;
|
||||
return func_800190AC(diffY, diffX);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C1E0);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C240);
|
||||
void func_8018C240(s32 arg0) {
|
||||
D_8006C3B8->unk2C = (s16) (arg0 & 0xFF);
|
||||
D_8006C3B8->unk2E = 0;
|
||||
D_8006C3B8->animationFrameIndex = 0;
|
||||
D_8006C3B8->animationFrameDuration = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C260);
|
||||
void func_8018C260(s32 arg0) {
|
||||
D_8006C3B8->unk2E = (s16) (arg0 & 0xFF);
|
||||
D_8006C3B8->animationFrameIndex = 0;
|
||||
D_8006C3B8->animationFrameDuration = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C27C);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C310);
|
||||
void func_8018C310(u16 *arg0) {
|
||||
u16 temp_v1;
|
||||
Unkstruct5 *temp_v0;
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C40C);
|
||||
D_8006C3B8->animationSet = *arg0++;
|
||||
D_8006C3B8->animationFrame = *arg0++;
|
||||
D_8006C3B8->unk5A = *arg0++;
|
||||
D_8006C3B8->palette = *arg0++;
|
||||
temp_v1 = *arg0++;
|
||||
D_8006C3B8->unk3A = temp_v1;
|
||||
temp_v0 = temp_v1 * sizeof(Unkstruct5) + (u32)D_8003C808;
|
||||
D_8006C3B8->unk3E = temp_v0->unk4;
|
||||
D_8006C3B8->unk40 = temp_v0->unk6;
|
||||
D_8006C3B8->unk42 = temp_v0->unk8;
|
||||
D_8006C3B8->unk3C = temp_v0->unkC;
|
||||
D_8006C3B8->hitboxWidth = temp_v0->hitboxWidth;
|
||||
D_8006C3B8->hitboxHeight = temp_v0->hitboxHeight;
|
||||
D_8006C3B8->unk34 = temp_v0->unk24;
|
||||
D_8006C3B8->unk10 = 0;
|
||||
D_8006C3B8->unk12 = 0;
|
||||
D_8006C3B8->unk2E = 0;
|
||||
D_8006C3B8->unk2C++;
|
||||
if (D_8006C3B8->zPriority == 0) {
|
||||
D_8006C3B8->zPriority = D_80097408 - 0xC;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8018C40C(Entity* arg0) {
|
||||
if (arg0->unk2C == 0) {
|
||||
arg0->unk2C++;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018C434);
|
||||
|
||||
@ -134,9 +279,15 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018CDEC);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018CF04);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018CFA8);
|
||||
void func_8018CFA8(void) {
|
||||
D_8003C7DC(0x67A);
|
||||
D_8003C848(5, 0x8000);
|
||||
DestroyEntity(D_8006C3B8);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018CFF8);
|
||||
void func_8018CFF8(void) {
|
||||
DestroyEntity(D_8006C3B8);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018D020);
|
||||
|
||||
@ -212,10 +363,44 @@ INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_801937D8);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80193854);
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_801938DC);
|
||||
void func_801938DC(Unkstruct7* arg0) {
|
||||
arg0->unk13 = 0;
|
||||
arg0->unk1F = 0;
|
||||
arg0->unk2B = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk14 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk16 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unkA = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk8 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unkE = 0;
|
||||
((Unkstruct6*)arg0->tag)->unkC = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk12 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk10 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk18 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk1A = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk1C = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk1E = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk24 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk25 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk28 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk2A = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk20 = 0;
|
||||
((Unkstruct6*)arg0->tag)->unk22 = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_801939BC);
|
||||
void func_801939BC(Unkstruct7* arg0) {
|
||||
func_801938DC(arg0);
|
||||
arg0->unk2B = 8;
|
||||
((Unkstruct6*)arg0->tag)->unk2B = 1;
|
||||
((Unkstruct6*)arg0->tag)->unk7 = 2;
|
||||
((Unkstruct6*)arg0->tag)->unk32 = 0xA;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80193A10);
|
||||
void func_80193A10(Unkstruct6* arg0) {
|
||||
arg0->unk2B = 0;
|
||||
arg0->unk32 = 8;
|
||||
((Unkstruct6*)arg0->tag)->unk2B = 0;
|
||||
((POLY_GT4*)arg0->tag)->code = 4;
|
||||
((POLY_GT4*)arg0->tag)->pad3 = 8;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80193A3C);
|
||||
|
Loading…
Reference in New Issue
Block a user