From 33b87a26f2c07bedf90cf1ce067e0a5636a20cff Mon Sep 17 00:00:00 2001 From: Robin Avery Date: Sun, 13 Oct 2024 05:45:14 -0400 Subject: [PATCH] Fix errors --- src/melee/gr/grmaterial.c | 10 +++++----- src/melee/it/items/it_2E6A.c | 22 +++++++--------------- src/melee/it/items/it_2E6A.h | 4 ++-- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/melee/gr/grmaterial.c b/src/melee/gr/grmaterial.c index a457718efc..ddd066523a 100644 --- a/src/melee/gr/grmaterial.c +++ b/src/melee/gr/grmaterial.c @@ -151,14 +151,14 @@ void grMaterial_801C8CDC(Item_GObj* gobj) Item_8026A8EC(gobj); } -void grMaterial_801C8CFC(int arg0, int arg1, int arg2, int arg3, int arg4, - int arg5, int arg6) +void grMaterial_801C8CFC(int arg0, int arg1, Ground* arg2, HSD_JObj* arg3, + int arg4, HSD_GObjEvent arg5, int arg6) { - it_802E6AEC(arg2, arg0, arg1, arg3, 0, 0, arg4, arg5, arg6); + it_802E6AEC(arg2, arg0, arg1, arg3, NULL, 0, arg4, arg5, arg6); } -void grMaterial_801C8D44(int arg0, int arg1, int arg2, int arg3, int arg4, - int arg5, int arg6, int arg7) +void grMaterial_801C8D44(int arg0, int arg1, Ground* arg2, Vec3* arg3, + int arg4, int arg5, HSD_GObjEvent arg6, int arg7) { it_802E6AEC(arg2, arg0, arg1, 0, arg3, arg4, arg5, arg6, arg7); } diff --git a/src/melee/it/items/it_2E6A.c b/src/melee/it/items/it_2E6A.c index 90bf605ed1..29d288156b 100644 --- a/src/melee/it/items/it_2E6A.c +++ b/src/melee/it/items/it_2E6A.c @@ -78,20 +78,12 @@ ItemStateTable it_803F8C8C[] = { { 18, NULL, it_802E6D60, NULL }, { 19, NULL, it_802E6D60, NULL }, }; -// static s8 it_803F8DCC[0x10] = "%s:%d: oioi...\n"; -// static u8 it_803F8DDC[9] = "ityaku.c"; -// static s8 it_804D56B8[7] = "jobj.h"; -// static s8 it_804D56C0[5] = "jobj"; static Vec3 it_803B8730 = { 1.0f, 1.0f, 1.0f }; -HSD_GObj* it_802E6AEC(Ground* arg0, int arg1, int arg2, HSD_JObj* arg3, - Vec3 pos, int arg5, int arg6, HSD_GObjEvent arg7, - int arg8) +Item_GObj* it_802E6AEC(Ground* arg0, int arg1, int arg2, HSD_JObj* arg3, + Vec3* pos, int arg5, int arg6, HSD_GObjEvent arg7, + int arg8) { - // bool it_802E6AEC(Ground* arg0, int arg1, int arg2, HSD_JObj* arg3, Vec3 - // pos, int arg5, int arg6, HSD_GObjEvent arg7, int arg8) { bool - // it_802E6AEC(int arg0, int arg1, int arg2, HSD_JObj* arg3, Vec3 pos, int - // arg5, int arg6, int arg7, int arg8) { SpawnItem spawn; Vec3 sp30; HSD_JObj* item_jobj; @@ -103,8 +95,8 @@ HSD_GObj* it_802E6AEC(Ground* arg0, int arg1, int arg2, HSD_JObj* arg3, if (arg3) { lb_8000B1CC(arg3, 0, &spawn.prev_pos); } else { - if (&pos != NULL) { - spawn.prev_pos = pos; + if (pos != NULL) { + spawn.prev_pos = *pos; } else { return NULL; } @@ -136,7 +128,7 @@ HSD_GObj* it_802E6AEC(Ground* arg0, int arg1, int arg2, HSD_JObj* arg3, item->xDD4_itemVar.it_2E6A_1.x4 = arg3; } else if (&pos != 0) { item->xDD4_itemVar.it_2E6A_2.x2 = 2; - item->xDD4_itemVar.it_2E6A_2.x4 = pos; + item->xDD4_itemVar.it_2E6A_2.x4 = *pos; } item->xDD4_itemVar.it_2E6A_1.x0 = arg1; @@ -153,7 +145,7 @@ HSD_GObj* it_802E6AEC(Ground* arg0, int arg1, int arg2, HSD_JObj* arg3, item->touched = it_802E7054; item->x378_itemColl.x34_flags.b1234 = 5; } - return (HSD_GObj*) item_gobj; + return item_gobj; } // void it_802E6D60(Item_GObj* item_gobj) { diff --git a/src/melee/it/items/it_2E6A.h b/src/melee/it/items/it_2E6A.h index 9fc5d76586..a80b207cc0 100644 --- a/src/melee/it/items/it_2E6A.h +++ b/src/melee/it/items/it_2E6A.h @@ -9,8 +9,8 @@ #include "it/items/types.h" -/* 2E6AEC */ HSD_GObj* it_802E6AEC(Ground*, int, int, HSD_JObj*, Vec3, int, - int, HSD_GObjEvent, int); +/* 2E6AEC */ Item_GObj* it_802E6AEC(Ground*, int, int, HSD_JObj*, Vec3*, int, + int, HSD_GObjEvent, int); /* 2E6F7C */ bool it_802E6F7C(Item_GObj*); /* 2E6FC0 */ bool it_802E6FC0(Item_GObj*); /* 2E709C */ void it_802E709C(Item_GObj*, HSD_GObj*);