From f903fdd6f6d72e4dd51bb0a8eba424eff190e1c5 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Fri, 17 Sep 2021 10:44:49 -0400 Subject: [PATCH] waves.h --- src/unknown_0255E0.c | 1 + src/waves.c | 50 +++++++------------------------------------- src/waves.h | 14 +++++++++++++ 3 files changed, 22 insertions(+), 43 deletions(-) diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 5187f279..359128a3 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -14,6 +14,7 @@ #include "memory.h" #include "unknown_043920.h" #include "camera.h" +#include "waves.h" /************ .data ************/ diff --git a/src/waves.c b/src/waves.c index 088e9ac2..af348422 100644 --- a/src/waves.c +++ b/src/waves.c @@ -5,6 +5,8 @@ #include "types.h" #include "macros.h" #include "libultra_internal.h" +#include "memory.h" +#include "textures_sprites.h" /************ .data ************/ @@ -15,7 +17,7 @@ s32 *D_800E304C = NULL; // Could be an array of pointers? s32 D_800E3050[8] = { - 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, }; s32 *D_800E3070[2] = { NULL, NULL }; @@ -33,41 +35,12 @@ unk800E3090 D_800E3090[4] = { { 0x4000, 0x0201, 0, 0, 0, 0, 0, 0, }, { 0x4001, 0x0203, 0, 0, 0, 0, 0, 0, }, { 0x4000, 0x0201, 0, 0, 0, 0, 0, 0, }, - { 0x4001, 0x0203, 0, 0, 0, 0, 0, 0, } + { 0x4001, 0x0203, 0, 0, 0, 0, 0, 0, }, }; -s32 *D_800E30D0 = NULL; +TextureHeader *D_800E30D0 = NULL; s32 *D_800E30D4 = NULL; - -typedef struct{ - u8 unk00; - u8 pad01[0x05]; - u8 unk06; - u8 unk07; - u32 unk08; -} unk800DC918_04_0C; //copied from unknown_0255E0.c - -typedef struct{ - u8 pad00[0x0C]; - unk800DC918_04_0C *unk0C; - u8 pad0C[0x10]; - s16 unk20; - u8 pad22[0x09]; - s8 unk2B; - u8 pad2C[0x14]; - u8 unk40; - u8 pad41[0x3]; -} unk800DC918_04; //copied from unknown_0255E0.c - -typedef struct{ - unk800DC918_04 * unk00; - u8 pad04[0x8]; - u32 unk0C; - u8 pad10[0xC]; -}unk800E30D8; - - -unk800E30D8 *D_800E30D8 = NULL; +LevelModel_Alternate *D_800E30D8 = NULL; s32 D_800E30DC = 0; s32 D_800E30E0 = 0; s32 D_800E30E4 = 0; @@ -173,12 +146,6 @@ s32 D_8012A728[2]; /*****************************/ -u8 *allocate_from_main_pool_safe(s32 arg0, s32 arg1); -void free_from_memory_pool(s32 *arg0); -void free_texture(s32 *arg0); -void func_800C5494(s32 arg0); -void func_800C5620(s32 arg0); - void func_800B7D20(void) { if (D_800E3040 != NULL) { free_from_memory_pool(D_800E3040); @@ -247,7 +214,7 @@ void func_800B8B8C(void) { GLOBAL_ASM("asm/non_matchings/waves/func_800B8C04.s") -s32 func_800B9228(unk800DC918_04 * arg0){ +s32 func_800B9228(LevelModelSegment *arg0) { s32 v0 = 0; s32 result = 0; while(v0 < D_8012A0E0 && arg0 != D_800E30D8[v0].unk00){ @@ -268,9 +235,6 @@ GLOBAL_ASM("asm/non_matchings/waves/func_800BA4B8.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BA8E4.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BB2F4.s") -void func_800BBE08(void); -void func_800BBF78(s32 arg0); - void func_800BBDDC(s32 arg0) { func_800BBE08(); func_800BBF78(arg0); diff --git a/src/waves.h b/src/waves.h index 2c8060a0..f01cb40f 100644 --- a/src/waves.h +++ b/src/waves.h @@ -4,7 +4,21 @@ #include "types.h" #include "structs.h" +typedef struct{ + LevelModelSegment *unk00; + u8 pad04[0x8]; + u32 unk0C; + u8 pad10[0xC]; +} LevelModel_Alternate; + +void func_800B7D20(void); +void func_800B8B8C(void); +s32 func_800B9228(LevelModelSegment *arg0); +void func_800BBDDC(s32 arg0); + Object_64 *func_800BE654(s16, f32, f32); // Non Matching f32 func_800BEEB4(Object_64 *); // Non Matching +void func_800BBE08(void); // Non Matching +void func_800BBF78(s32 arg0); // Non Matching #endif