From 3bb15371362e7fe9e97ce20c692ed2d1ade96eb7 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Thu, 17 Feb 2022 21:13:18 -0500 Subject: [PATCH] Added an XYStruct --- src/particles.c | 34 +++++++++++++++++----------------- src/particles.h | 4 ++++ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/particles.c b/src/particles.c index 70f166ed..5c04947c 100644 --- a/src/particles.c +++ b/src/particles.c @@ -121,17 +121,17 @@ s32 D_800E2E5C = 0; Sprite **D_800E2E60 = NULL; s32 D_800E2E64 = 0; -s16 D_800E2E68[6] = { - 0, 8, - 7, -4, - -7, -4, +XYStruct D_800E2E68[3] = { + { 0, 8 }, + { 7, -4 }, + { -7, -4 }, }; -s16 D_800E2E74[8] = { - -6, 6, - 6, 6, - 6, -6, - -6, -6, +XYStruct D_800E2E74[4] = { + { -6, 6 }, + { 6, 6 }, + { 6, -6 }, + { -6, -6 }, }; s32 D_800E2E84[16] = { @@ -299,16 +299,16 @@ void func_800AEE14(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2) { s16 i; Vertex *temp; Triangle *tri; - s16 *temp2; + XYStruct *temp2; arg0->unk4 = 3; arg0->unk8 = *arg1; temp = *arg1; temp2 = &D_800E2E68[0]; for (i = 0; i < 3; i++) { - temp->x = temp2[0]; - temp->y = temp2[1]; - temp2 += 2; + temp->x = temp2->x; + temp->y = temp2->y; + temp2 += 1; temp->z = 0; temp->r = 255; temp->g = 255; @@ -332,16 +332,16 @@ void func_800AEEB8(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2) { s16 i; Vertex *temp; Triangle *tri; - s16 *temp2; + XYStruct *temp2; arg0->unk4 = 4; arg0->unk8 = *arg1; temp = *arg1; temp2 = &D_800E2E74[0]; for (i = 0; i < 4; i++) { - temp->x = temp2[0]; - temp->y = temp2[1]; - temp2 += 2; + temp->x = temp2->x; + temp->y = temp2->y; + temp2 += 1; temp->z = 0; temp->r = 255; temp->g = 255; diff --git a/src/particles.h b/src/particles.h index 93bf4f82..4c8179ba 100644 --- a/src/particles.h +++ b/src/particles.h @@ -109,6 +109,10 @@ typedef struct unk800B2260 { unk800B2260_C **unkC; } unk800B2260; +typedef struct XYStruct { + s16 x, y; +} XYStruct; + void func_800AE270(void); void func_800AE2A0(void); void func_800AE2D8(void);