From 292f8b4421e3cd3271573394f0db39deab16ce47 Mon Sep 17 00:00:00 2001 From: Robin Avery Date: Wed, 14 Feb 2024 16:27:17 -0500 Subject: [PATCH] Match 33.59% of `mpisland` (3.52 KB) (#1224) Co-authored-by: davidgfb <20667923+davidgfb@users.noreply.github.com> Co-authored-by: roeming <25447777+roeming@users.noreply.github.com> Co-authored-by: ssbmcortex <10965625+ssbmcortex@users.noreply.github.com> Co-authored-by: VetriTheRetri <74500716+VetriTheRetri@users.noreply.github.com> --- config/GALE01/scratches.txt | 32 ++-- src/Runtime/platform.h | 3 + src/melee/lb/lb_00B0.h | 1 + src/melee/mp/forward.h | 9 + src/melee/mp/mpcoll.c | 4 +- src/melee/mp/mpisland.c | 334 ++++++++++++++++++++++++++++++++++++ src/melee/mp/mpisland.h | 14 +- src/melee/mp/mplib.h | 9 +- src/melee/mp/types.h | 78 +++++++++ 9 files changed, 455 insertions(+), 29 deletions(-) create mode 100644 src/melee/mp/types.h diff --git a/config/GALE01/scratches.txt b/config/GALE01/scratches.txt index ee363908cb..1f735c3d4c 100644 --- a/config/GALE01/scratches.txt +++ b/config/GALE01/scratches.txt @@ -579,22 +579,22 @@ mpColl_800477E0 = OK:0x800477E0; // author:Walnut356 id:QRCuA updated:2024-01-16 func_8004D164 = OK:0x8004D164; // id:LavJZ updated:2023-03-30T19:44:57.012007Z created:2023-03-30T19:44:55.234045Z func_8004E97C = OK:0x8004E97C; // author:ribbanya id:HMlVj updated:2022-06-29T04:10:52.731148Z created:2022-06-29T00:50:26.92094Z func_80054ED8 = OK:0x80054ED8; // author:r-burns id:IcKS4 updated:2022-04-09T23:52:58.528765Z created:2022-04-09T21:43:36.99401Z -func_8005A6F8 = 100%:0x8005A6F8; // author:ssbmcortex id:GBQEN updated:2022-11-26T04:29:18.672914Z created:2022-11-26T03:58:14.523128Z -func_8005A728 = 54.4%:0x8005A728; // author:VetriTheRetri id:SvV3B parent:3Jxhp updated:2022-12-18T19:03:25.171744Z created:2022-12-17T21:20:35.686389Z -func_8005A728 = 52.94%:0x8005A728; // author:davidgfb id:I4F5w parent:SvV3B updated:2022-12-18T12:38:06.9951Z created:2022-12-18T12:37:52.894306Z -func_8005A728 = 36.44%:0x8005A728; // author:ssbmcortex id:3Jxhp updated:2022-12-18T18:55:40.203438Z created:2022-11-26T04:30:50.923974Z -func_8005AB54 = 100%:0x8005AB54; // author:roeming id:noL8z parent:0AL74 updated:2023-01-27T20:21:35.863508Z created:2023-01-15T22:23:19.063657Z -func_8005AB54 = 97.19%:0x8005AB54; // author:ssbmcortex id:wsXMc parent:GXI8p updated:2023-01-13T17:07:27.822002Z created:2022-12-05T23:01:55.160823Z -func_8005AB54 = 97.19%:0x8005AB54; // author:roeming id:0AL74 parent:ZXnBm updated:2023-01-26T15:21:55.333069Z created:2023-01-15T22:06:38.295247Z -func_8005AB54 = 93.19%:0x8005AB54; // id:qS2u7 parent:noL8z updated:2023-01-26T22:36:11.844549Z created:2023-01-26T22:08:22.027649Z -func_8005AB54 = 90%:0x8005AB54; // author:ssbmcortex id:ZXnBm parent:wsXMc updated:2023-01-15T13:09:53.449065Z created:2023-01-15T12:49:55.340312Z -func_8005AB54 = 46.46%:0x8005AB54; // author:ssbmcortex id:SQYfv updated:2022-12-05T23:01:49.110357Z created:2022-11-28T14:19:26.009405Z -func_8005AB54 = 46.46%:0x8005AB54; // author:ssbmcortex id:GXI8p parent:SQYfv updated:2022-12-05T23:01:53.072156Z created:2022-12-05T23:01:52.930934Z -func_8005AC14 = 100%:0x8005AC14; // author:ssbmcortex id:8ofPQ updated:2023-01-27T23:02:50.05282Z created:2023-01-27T22:02:28.652536Z -func_8005AC8C = 100%:0x8005AC8C; // id:p5dgh parent:52CHk updated:2023-01-30T21:06:33.671596Z created:2023-01-30T20:55:19.506976Z -func_8005AC8C = 81.96%:0x8005AC8C; // author:ssbmcortex id:52CHk updated:2023-01-30T20:52:03.63059Z created:2023-01-27T23:03:08.172048Z -func_8005ACE8 = 99.35%:0x8005ACE8; // id:QxHkk parent:cXB25 updated:2023-02-09T12:08:50.849266Z created:2023-02-09T12:07:51.04481Z -func_8005ACE8 = 85.26%:0x8005ACE8; // author:ssbmcortex id:cXB25 updated:2023-02-09T05:00:09.210693Z created:2023-02-01T17:13:16.864626Z +func_8005A6F8 = OK:0x8005A6F8; // author:ssbmcortex id:GBQEN updated:2022-11-26T04:29:18.672914Z created:2022-11-26T03:58:14.523128Z +func_8005A728 = OK:0x8005A728; // author:davidgfb id:I4F5w parent:SvV3B updated:2022-12-18T12:38:06.9951Z created:2022-12-18T12:37:52.894306Z +func_8005A728 = OK:0x8005A728; // author:ssbmcortex id:3Jxhp updated:2022-12-18T18:55:40.203438Z created:2022-11-26T04:30:50.923974Z +func_8005A728 = OK:0x8005A728; // author:VetriTheRetri id:SvV3B parent:3Jxhp updated:2022-12-18T19:03:25.171744Z created:2022-12-17T21:20:35.686389Z +func_8005AB54 = OK:0x8005AB54; // author:ssbmcortex id:SQYfv updated:2022-12-05T23:01:49.110357Z created:2022-11-28T14:19:26.009405Z +func_8005AB54 = OK:0x8005AB54; // author:ssbmcortex id:GXI8p parent:SQYfv updated:2022-12-05T23:01:53.072156Z created:2022-12-05T23:01:52.930934Z +func_8005AB54 = OK:0x8005AB54; // author:ssbmcortex id:wsXMc parent:GXI8p updated:2023-01-13T17:07:27.822002Z created:2022-12-05T23:01:55.160823Z +func_8005AB54 = OK:0x8005AB54; // author:ssbmcortex id:ZXnBm parent:wsXMc updated:2023-01-15T13:09:53.449065Z created:2023-01-15T12:49:55.340312Z +func_8005AB54 = OK:0x8005AB54; // author:roeming id:0AL74 parent:ZXnBm updated:2023-01-26T15:21:55.333069Z created:2023-01-15T22:06:38.295247Z +func_8005AB54 = OK:0x8005AB54; // id:qS2u7 parent:noL8z updated:2023-01-26T22:36:11.844549Z created:2023-01-26T22:08:22.027649Z +func_8005AB54 = OK:0x8005AB54; // author:roeming id:noL8z parent:0AL74 updated:2023-01-27T20:21:35.863508Z created:2023-01-15T22:23:19.063657Z +func_8005AC14 = OK:0x8005AC14; // author:ssbmcortex id:8ofPQ updated:2023-01-27T23:02:50.05282Z created:2023-01-27T22:02:28.652536Z +func_8005AC8C = OK:0x8005AC8C; // author:ssbmcortex id:52CHk updated:2023-01-30T20:52:03.63059Z created:2023-01-27T23:03:08.172048Z +func_8005AC8C = OK:0x8005AC8C; // id:p5dgh parent:52CHk updated:2023-01-30T21:06:33.671596Z created:2023-01-30T20:55:19.506976Z +func_8005ACE8 = OK:0x8005ACE8; // author:ssbmcortex id:cXB25 updated:2023-02-09T05:00:09.210693Z created:2023-02-01T17:13:16.864626Z +func_8005ACE8 = OK:0x8005ACE8; // id:QxHkk parent:cXB25 updated:2023-02-09T12:08:50.849266Z created:2023-02-09T12:07:51.04481Z efLib_8005CC2C = 100%:0x8005CC2C; // author:RevoSucks id:5etom updated:2023-12-17T22:09:48.448833Z created:2023-12-17T22:02:34.883806Z func_8005FCD8 = 66.77%:0x8005FCD8; // author:ribbanya id:C3oLq parent:mPRxu updated:2022-12-06T04:44:16.194032Z created:2022-12-06T04:35:16.653878Z Fighter_800679B0 = 100%:0x800679B0; // author:RevoSucks id:vHQNe updated:2022-12-24T23:49:02.60415Z created:2022-12-24T23:47:30.524476Z diff --git a/src/Runtime/platform.h b/src/Runtime/platform.h index e525d0647e..52101dcd44 100644 --- a/src/Runtime/platform.h +++ b/src/Runtime/platform.h @@ -28,6 +28,9 @@ typedef unsigned long u32; /// An unsigned 64-bit integer typedef unsigned long long u64; +/// An unsigned short integer of platform-dependent size +typedef unsigned short ushort; + /// An unsigned integer of platform-dependent size typedef unsigned int uint; diff --git a/src/melee/lb/lb_00B0.h b/src/melee/lb/lb_00B0.h index 433f61b177..d435174117 100644 --- a/src/melee/lb/lb_00B0.h +++ b/src/melee/lb/lb_00B0.h @@ -5,6 +5,7 @@ #include "sc/forward.h" #include +#include #include #include #include diff --git a/src/melee/mp/forward.h b/src/melee/mp/forward.h index c52f974e5f..1bc6687a58 100644 --- a/src/melee/mp/forward.h +++ b/src/melee/mp/forward.h @@ -4,6 +4,15 @@ #include #include "ft/forward.h" +typedef struct mp_UnkStruct0 mp_UnkStruct0; +typedef struct mp_UnkStruct1 mp_UnkStruct1; +typedef struct mp_UnkStruct2 mp_UnkStruct2; +typedef struct mp_UnkStruct3 mp_UnkStruct3; +typedef struct mp_UnkStruct4 mp_UnkStruct4; +typedef struct mp_UnkStruct5 mp_UnkStruct5; +typedef struct mp_UnkStruct6 mp_UnkStruct6; +typedef struct mpisland mpisland; + typedef void (*mpLib_Callback)(s32, s32, CollData*, s32, s32, f32); typedef bool (*mpColl_Callback)(CollData*, u32); diff --git a/src/melee/mp/mpcoll.c b/src/melee/mp/mpcoll.c index 46ba0e216d..6a9b24ac60 100644 --- a/src/melee/mp/mpcoll.c +++ b/src/melee/mp/mpcoll.c @@ -1042,8 +1042,8 @@ void mpColl_80043C6C(CollData* arg0, s32 arg1, s32 arg2) temp_f2); sp8 = 0; if (mpLib_8004F008(&arg0->x140, 0, 0, 0, arg0->x3C, arg0->x48, - arg0->x4C, 0, temp_f1_3, temp_f2, sp20, sp24, - 0.0f) != 0) + arg0->x4C, 0, temp_f1_3, temp_f2, sp20, sp24, 0.0f, + /* TODO */ 0) != 0) { sp20 = arg0->x140.x; if (arg2 != 0) { diff --git a/src/melee/mp/mpisland.c b/src/melee/mp/mpisland.c index 8b13789179..1a6eeaec17 100644 --- a/src/melee/mp/mpisland.c +++ b/src/melee/mp/mpisland.c @@ -1 +1,335 @@ +#include "mpisland.h" // IWYU pragma: keep +#include "mplib.h" +#include "types.h" + +#include "lb/lb_00B0.h" + +#include + +mp_UnkStruct0 mpIsland_80458E88; + +void mpIsland_8005A6F8(void) +{ + mpIsland_80458E88.next = NULL; + mpIsland_80458E88.x4 = 0; + mpIsland_80458E88.x8 = 0; + mpIsland_80458E88.xC = 0; + mpIsland_80458E88.x18 = 0; + mpIsland_80458E88.x1C = 0; + mpIsland_80458E88.x10 = 0; + mpIsland_80458E88.x14 = 0; + mpIsland_80458E88.x20 = 0; +} + +void mpIsland_8005A728(void) +{ + short* v0; // r27 + mp_UnkStruct2* v1; // r28 + int v2; // r3 + // unk *test; + int v3; // r29 + unsigned char* result; // r3 + int v5; // r21 + int* v6; // r19 + int v7; // r20 + float v8; // fp31 + int v9; // r18 + void* v10; // r3 + void* v11; // r25 + int v12; // r0 + int v13; // r5 + int v14; // r3 + int* v15; // r6 + int v16; // r5 + int v17; // r3 + int v18; // ctr + mpisland* v19; // r24 + int v20; // r26 + int v21; // r27 + float v22; // fp31 + int* v22_2; + int* v23; // r19 + int* v24_2; + mpisland* v24; // r3 + mpisland* v25; // r25 + int v26; // r4 + int v27; // r0 + int v28; // r6 + int* v29; // r5 + int v30; // r4 + int v31; // r3 + int v32; // ctr + unsigned char v33[1524]; // [sp+18h] [-648h] BYREF + + v0 = (short*) mpLib_8004D164(); + v1 = mpLib_8004D174(); + v2 = mpLib_8004D16C(); + v23 = &mpIsland_80458E88.x4; + v24_2 = &mpIsland_80458E88.x8; + v22_2 = &mpIsland_80458E88.xC; + mpIsland_8005A6F8(); + + lb_8000C160(v33, 0x600u); + v5 = v0[9]; + v6 = 0; + if (v0[9]) { + v7 = v0[8]; + v8 = 0.0f; + v9 = v7; + while (v5) { + v10 = HSD_MemAlloc(0x2C); + v11 = v10; + if (!v10) { + __assert(__FILE__, 62, "mpisp"); + } + if (v6) { + v6 = v10; + } else { + mpIsland_80458E88.next = v10; + } + v6 = (int*) v10; + v12 = v7; + v13 = v7 == 0; + v14 = 0; + while (v7 != v13) { + v33[v12] = 1; + v15 = (int*) (v1 + 8 * v12); + v16 = v15[1]; + if ((v16 & 0x10000) == 0 || (v16 & 0x40000) != 0) { + v14 = 1; + } + v13 = *(short*) (*v15 + 6); + if (v13 == -1 || + (*(unsigned short*) (*(int*) (v1 + 8 * v13) + 0xC) & 1) == + 0) + { + break; + } + v12 = *(short*) (*v15 + 6); + } + if (v14) { + v17 = 2; + } else { + v17 = 0; + } + /// @todo Rewrite as a struct ptr + // *(int*) (v11 + 0x20) = v17; + // *(int*) v11 = 0; + // *(short*) (v11 + 0x24) = v7; + // *(short*) (v11 + 0x26) = v12; + // *(short*) (v11 + 4) = **(short**) (v1 + v9); + // *(short*) (v11 + 6) = *(short*) (*(short*) (v1 + 8 * v12) + 2); + // *(float*) (v11 + 8) = + // *(float*) (v2 + 0x18 * *(unsigned short*) (v11 + 4) + 8); + // *(float*) (v11 + 0xC) = + // *(float*) (v2 + 0x18 * *(unsigned short*) (v11 + 4) + 0xC); + // *(float*) (v11 + 0x10) = v8; + // *(float*) (v11 + 0x14) = + // *(float*) (v2 + 0x18 * *(unsigned short*) (v11 + 6) + 8); + // *(float*) (v11 + 0x18) = + // *(float*) (v2 + 0x18 * *(unsigned short*) (v11 + 6) + 0xC); + // *(float*) (v11 + 0x1C) = v8; + // --v5; + // *(short*) (v11 + 0x28) = mpLib_80056B6C(v7++); + // v7--; + + v18 = v5; + result = &v33[v7]; + v9 += 8; + if (v7) { + do { + if (!*result) { + break; + } + ++result; + ++v7; + v9 += 8; + --v5; + v7--; + } while (v18); + } + } + } + + *v24_2 = (int) v6; + v19 = 0; + v20 = v0[0xB]; + if (v0[0xB]) { + v21 = v0[0xA]; + // v22 = MEMORY[0xFFFF9648]; + *v23 = 8 * v21; + while (v20) { + v24 = (mpisland*) HSD_MemAlloc(0x2C); + v25 = v24; + if (!v24) { + __assert("mpisland.c", 0x3E, "mpisp"); + } + if (v19) { + v19->x0[0] = (int) v24; + } else { + *v22_2 = (int) v24; + } + v26 = v21 == 0; + v19 = v24; + v27 = v21; + v28 = 0; + while (v21 != v26) { + v33[v27] = 1; + v29 = (int*) (v1 + 8 * v27); + v30 = v29[1]; + if ((v30 & 0x10000) == 0 || (v30 & 0x40000) != 0) { + v28 = 1; + } + v26 = *(short*) (*v29 + 4); + if (v26 == -1 || + (*(short*) (*(int*) (v1 + 8 * v26) + 0xC) & 2) == 0) + { + break; + } + v27 = *(short*) (*v29 + 4); + } + if (v28) { + v31 = 2; + } else { + v31 = 0; + } + v25->x0[2] = v31; + v25->x0[0] = 0; + v25->x20[0] = v21; + v25->x20[0] = v27; + // v25->unk[1] = *(short*) (*(int*) (v1 + v23) + 2); + v25->x0[1] = **(short**) (v1 + 8 * v27); + v25->x0[2] = *(int*) (v2 + 0x18 * v25->x0[1] + 8); + v25->x0[3] = *(int*) (v2 + 0x18 * v25->x0[1] + 0xC); + v25->x0[4] = 0.0F; + v25->x0[5] = *(float*) (v2 + 0x18 * v25->x0[1] + 8); + v25->x0[6] = *(float*) (v2 + 0x18 * v25->x0[1] + 0xC); + v25->x0[7] = 0.0F; + --v20; + v25->x20[2] = mpLib_80056B6C(v21++); + v32 = v20; + result = &v33[v21]; + v23 += 8; + v20--; + if (v20) { + for (v32 = 0; v32 < 0; v32++) { + if (!*result) { + break; + } + ++result; + ++v21; + v23 += 8; + --v20; + --v32; + } + } + } + } + v22_2 = v24_2; +} + +mp_UnkStruct0* mpIsland_8005AB54(int arg0) +{ + if (mpLib_80054ED8(arg0)) { + mp_UnkStruct2* v2 = mpLib_8004D174(); + bool done; + mp_UnkStruct0* cur; + + for (cur = mpIsland_80458E88.next; cur; cur = cur->next) { + int j, j_next; + for (j = cur->x24; j != -1; j = j_next) { + if (j == arg0) { + return cur; + } + + if (j == cur->x26) { + break; + } + + done = true; + j_next = v2[j].x0->x6; + + if (j_next != -1 && (v2[j_next].x4 & 1)) { + done = false; + } + + if (done) { + break; + } + } + } + } + return NULL; +} + +mp_UnkStruct0* mpIsland_8005AC14(Vec3* arg0, float arg1) +{ + int i; + if (mpLib_8004F008(NULL, &i, 0, 0, -1, -1, -1, 0, arg0->x, arg0->y, + arg0->x, arg0->y + arg1, 0, 0)) + { + return mpIsland_8005AB54(i); + } + return NULL; +} + +bool mpIsland_8005AC8C(mp_UnkStruct4* arg0) +{ + int temp_cr0_eq; + temp_cr0_eq = mpLib_8004D17C() + 8 + 0x34 * arg0->x28; + temp_cr0_eq = *(int*) temp_cr0_eq; + temp_cr0_eq &= 0x700; + if (temp_cr0_eq != 0) { + return true; + } + if (temp_cr0_eq != 0) { + return true; + } + return false; +} + +void mpIsland_8005ACE8(mp_UnkStruct5* arg0, Vec3* arg1, Vec3* arg2) +{ + /* r0 */ int v14; + /* r31 */ int v7; + /* r0 */ int v13; + /* r27 */ mp_UnkStruct6* v6; + /* r23 */ int i; + /* r30 */ u16* v10; + /* r29 */ int v9; + /* r28 */ int v11; + /* r27 */ int v12; + /* r3 */ u16* v8; + + v6 = (mp_UnkStruct6*) (mpLib_8004D17C() + 0x34 * arg0->x28); + v7 = *v6->x4; + v8 = (u16*) mpLib_8004D174(); + v9 = v6->x4[1]; + v10 = &v8[4 * v7]; + v11 = 1; + v12 = 1; + if (arg1 != NULL) { + v14 = arg0->xC; + *(int*) &arg1->x = arg0->x8; + *(int*) &arg1->y = v14; + *(int*) &arg1->z = arg0->x10; + } else { + v11 = 0; + } + if (arg2 != NULL) { + v14 = arg0->x18; + *(int*) &arg2->x = arg0->x14; + *(int*) &arg2->y = v14; + *(int*) &arg2->z = arg0->x1C; + } else { + v12 = 0; + } + for (i = 0; i < v9 && v11 && v12; ++i, v10 += 4, ++v7) { + if (v11 && **(u16**) v10 == arg0->x4) { + mpLib_80054158(v7, (Vec3*) arg1); + } else if (v12 && *(u16*) (*(int*) v10 + 2) == arg0->x6) { + mpLib_80053FF4(v7, (Vec3*) arg2); + }; + } +} diff --git a/src/melee/mp/mpisland.h b/src/melee/mp/mpisland.h index e8b4508c67..acf8ce4aae 100644 --- a/src/melee/mp/mpisland.h +++ b/src/melee/mp/mpisland.h @@ -1,16 +1,14 @@ #ifndef GALE01_05A6F8 #define GALE01_05A6F8 -#include -#include "ftCommon/forward.h" +#include "mp/forward.h" #include -/* 05AC14 */ /* static */ UNK_RET mpIsland_8005AC14(UNK_PARAMS); -/* 05AB54 */ /* static */ UNK_RET mpIsland_8005AB54(UNK_PARAMS); -/* 05AC8C */ /* static */ UNK_RET mpIsland_8005AC8C(UNK_PARAMS); -/* 05ACE8 */ /* static */ UNK_RET mpIsland_8005ACE8(UNK_PARAMS); - -extern UNK_T mpIsland_80458E88; +/* 05AC14 */ mp_UnkStruct0* mpIsland_8005AC14(Vec3*, float); +/* 05AB54 */ mp_UnkStruct0* mpIsland_8005AB54(int); +/* 05AC8C */ bool mpIsland_8005AC8C(mp_UnkStruct4* arg0); +/* 05ACE8 */ void mpIsland_8005ACE8(mp_UnkStruct5*, Vec3*, Vec3*); +/* 458E88 */ extern mp_UnkStruct0 mpIsland_80458E88; #endif diff --git a/src/melee/mp/mplib.h b/src/melee/mp/mplib.h index d35086a9b4..e1d22dfaf7 100644 --- a/src/melee/mp/mplib.h +++ b/src/melee/mp/mplib.h @@ -11,15 +11,15 @@ #include #include -/* 04D17C */ void mpLib_8004D17C(void); +/* 04D17C */ int mpLib_8004D17C(void); /* 04D288 */ void mpLib_8004D288(UNK_T); /* 04DB78 */ s32 mpLib_8004DB78(s32 gr_idx); /* 04DC04 */ s32 mpLib_8004DC04(s32 gr_idx); /* 04DD90 */ bool mpLib_8004DD90(int idx, float*, float*, UNK_T, Vec3* normal); /* 04E090 */ enum_t mpLib_8004E090(int idx, Vec3*, float*, u32*, Vec3* normal); /* 04E398 */ bool mpLib_8004E398(int, float*, int, int, int, float); -/* 04F008 */ bool mpLib_8004F008(Vec3*, int, int, int, int, int, int, int, - float, float, float, float, float); +/* 04F008 */ bool mpLib_8004F008(Vec3*, int*, int, int, int, int, int, int, + float, float, float, float, int, float); /* 04F8A4 */ UNK_RET mpLib_8004F8A4(UNK_PARAMS); /* 0501CC */ bool mpLib_800501CC(float surface_normal_y, float surface_normal_x, float right_x, @@ -69,5 +69,8 @@ /* 0588D0 */ void mpLib_800588D0(float left, float bottom, float right, float top); /* 058AA0 */ void mpLib_80058AA0(void); +/* 04D164 */ int mpLib_8004D164(void); +/* 04D16C */ int mpLib_8004D16C(void); +/* 04D174 */ mp_UnkStruct2* mpLib_8004D174(void); #endif diff --git a/src/melee/mp/types.h b/src/melee/mp/types.h new file mode 100644 index 0000000000..16a9d1e8bf --- /dev/null +++ b/src/melee/mp/types.h @@ -0,0 +1,78 @@ +#ifndef MELEE_MP_TYPES_H +#define MELEE_MP_TYPES_H + +#include "mp/forward.h" // IWYU pragma: export + +#include + +struct mp_UnkStruct0 { + /* +0 */ mp_UnkStruct0* next; + /* +4 */ int x4; + /* +8 */ int x8; + /* +C */ int xC; + /* +10 */ int x10; + /* +14 */ int x14; + /* +18 */ int x18; + /* +1C */ int x1C; + /* +20 */ int x20; + /* +24 */ short x24; + /* +26 */ short x26; + /* +28 */ short x28; +}; + +struct mp_UnkStruct1 { + /* +0 */ int x0; + /* +4 */ short x4; + /* +6 */ short x6; +}; + +struct mp_UnkStruct2 { + /* +0 */ mp_UnkStruct1* x0; + /* +4 */ int x4; +}; + +struct mpisland { + /* +0 */ int x0[8]; + /* +20 */ int x20[8]; +}; + +struct mp_UnkStruct3 { + int x0; + int x4; + int xC; +}; + +struct mp_UnkStruct4 { + /* +0 */ u8 x0[0x28]; + /* +28 */ short x28; + /* +2A */ short x2A; + /* +2C */ mp_UnkStruct3* ptr; +}; + +struct mp_UnkStruct5 { + /* +0 */ u8 x0[0x4]; + /* +4 */ ushort x4; + /* +6 */ ushort x6; + /* +8 */ int x8; + /* +C */ int xC; + /* +10 */ int x10; + /* +14 */ int x14; + /* +18 */ int x18; + /* +1C */ int x1C; + /* +20 */ u8 x20[0x28 - 0x20]; + /* +28 */ short x28; + /* +2A */ short x2A; + /* +2C */ ushort x2C; + /* +30 */ int x30; + /* +34 */ int x34; + /* +38 */ int x38; + /* +3C */ int x3C; +}; + +struct mp_UnkStruct6 { + /* +0 */ short x0; + /* +2 */ short x2; + /* +4 */ short* x4; +}; + +#endif