diff --git a/Makefile b/Makefile index 0bbec5c28..6ed10bbc7 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ COURSE_FILES := $(foreach dir,$(COURSE_DIRS),$(wildcard $(dir)/*.inc.c)) # Object files O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \ $(foreach file,$(COURSE_FILES),$(BUILD_DIR)/$(file:.c=.o)) \ - $(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) + $(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) \ # Automatic dependency files DEP_FILES := $(O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d @@ -171,7 +171,7 @@ GRUCODE_CFLAGS = -DF3DEX_GBI -DF3D_OLD -D_LANGUAGE_C CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wempty-body -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) ASFLAGS = -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) --defsym F3DEX_GBI=1 -CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -woff 838 -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) +CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -woff 838,649 -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) OBJCOPYFLAGS = --pad-to=0xC00000 --gap-fill=0xFF LDFLAGS = -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/$(TARGET).map --no-check-sections @@ -212,7 +212,7 @@ default: all MAKEFILE_SPLIT = Makefile.split include $(MAKEFILE_SPLIT) -all: $(BUILD_DIR)/$(TARGET).z64 $(COURSE_MODEL_TARGETS) +all: $(BUILD_DIR)/$(TARGET).z64 ifeq ($(COMPARE),1) @$(SHA1SUM) -c $(TARGET).sha1 endif @@ -322,7 +322,7 @@ $(BUILD_DIR)/src/common_textures.inc.o: src/common_textures.inc.c $(TEXTURE_FILE COURSE_MODEL_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/model.inc.mio0.o) COURSE_PACKED_DL := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl.inc.bin) -COURSE_PACKED_DL_O := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl.inc.bin) +# COURSE_PACKED_DL_O := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl.inc.bin) @@ -330,7 +330,7 @@ COURSE_PACKED_DL_O := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl $(COURSE_PACKED_DL): $(LD) -t -e 0 -Ttext=07000000 -Map $(@D)/packed.inc.elf.map -o $(@D)/packed.inc.elf $(@D)/packed.inc.o --no-check-sections # Generate header for packed displaylists - # $(DLSYMGEN) +# $(DLSYMGEN) $(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/packed.inc.elf $(@D)/packed.inc.bin $(DLPACKER) $(@D)/packed.inc.bin $(@D)/packed_dl.inc.bin @@ -338,7 +338,7 @@ $(COURSE_PACKED_DL): $(COURSE_MODEL_TARGETS) : $(BUILD_DIR)/%/model.inc.mio0.o : %/model.inc.c $(COURSE_PACKED_DL) $(LD) -t -e 0 -Ttext=0F000000 -Map $(@D)/model.inc.elf.map -o $(@D)/model.inc.elf $(@D)/model.inc.o --no-check-sections # Generate model vertice count header - #$(MODELSYMGEN) +# $(MODELSYMGEN) $(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/model.inc.elf $(@D)/model.inc.bin $(MIO0TOOL) -c $(@D)/model.inc.bin $(@D)/model.inc.mio0 printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$(@D)/model.inc.mio0\"\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_packed\n\n.incbin \"$(@D)/packed_dl.inc.bin\"\n\n.balign 0x10\n" > $(@D)/model.inc.mio0.s @@ -346,7 +346,6 @@ $(COURSE_MODEL_TARGETS) : $(BUILD_DIR)/%/model.inc.mio0.o : %/model.inc.c $(COUR #################### Compile course vertex to mio0 ##################### #################### Compile course displaylists to mio0 ##################### -COURSE_DL_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.mio0.o) COURSE_TEXTURE_FILES := $(foreach dir,textures/courses,$(subst .png, , $(wildcard $(dir)/*))) COURSE_TLUT := $(foreach dir,textures/courses/tlut,$(subst .png, , $(wildcard $(dir)/*))) @@ -354,6 +353,9 @@ COURSE_TLUT2 := $(foreach dir,textures/courses/tlut2,$(subst .png, , $(wildcard COURSE_TLUT3 := $(foreach dir,textures/courses/tlut3,$(subst .png, , $(wildcard $(dir)/*))) #RAINBOW_ROAD_TEXTURE_FILES := $(foreach dir,textures/courses/rainbow_road,$(subst .png, , $(wildcard $(dir)/*))) +COURSE_DATA_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.mio0.o) +COURSE_DATA_TARGETS_O := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.o) + $(COURSE_TEXTURE_FILES): $(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 @@ -367,7 +369,12 @@ $(COURSE_TLUT3): $(N64GRAPHICS) -Z $(BUILD_DIR)/$@.inc.c -g $@.png -s u8 -c rgba16 -f ci8 -p textures/courses/$(basename $(notdir $@)).png # tluts -$(COURSE_DL_TARGETS): $(BUILD_DIR)/%/course_data.inc.mio0.o : %/course_data.inc.c $(BUILD_DIR)/%/course_data.inc.o $(COURSE_TEXTURE_FILES) $(COURSE_TLUT) $(COURSE_TLUT2) $(COURSE_TLUT3) +$(COURSE_DATA_TARGETS_O): $(BUILD_DIR)/%/course_data.inc.o : %/course_data.inc.c $(COURSE_TEXTURE_FILES) $(COURSE_TLUT) $(COURSE_TLUT2) $(COURSE_TLUT3) + @$(CC_CHECK) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $< + $(CC) -c $(CFLAGS) -o $@ $< + $(PYTHON) tools/set_o32abi_bit.py $@ + +$(COURSE_DATA_TARGETS): $(BUILD_DIR)/%/course_data.inc.mio0.o: $(BUILD_DIR)/%/course_data.inc.o # todo: Clean this up if possible. Not really worth the time though. $(LD) -t -e 0 -Ttext=06000000 -Map $(@D)/course_data.inc.elf.map -o $(@D)/course_data.inc.elf $(@D)/course_data.inc.o --no-check-sections $(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/course_data.inc.elf $(@D)/course_data.inc.bin @@ -447,7 +454,7 @@ $(BUILD_DIR)/src/common_textures.inc.mio0.o: $(BUILD_DIR)/src/common_textures.in $(AS) $(ASFLAGS) -o $(BUILD_DIR)/src/common_textures.inc.mio0.o $(BUILD_DIR)/src/common_textures.inc.mio0.s -$(BUILD_DIR)/$(TARGET).elf: $(COURSE_DL_TARGETS) $(O_FILES) $(COURSE_MIO0_OBJ_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/src/startup_logo.inc.mio0.o $(BUILD_DIR)/src/trophy_model.inc.mio0.o $(BUILD_DIR)/src/common_textures.inc.mio0.o $(COURSE_MODEL_TARGETS) undefined_syms.txt +$(BUILD_DIR)/$(TARGET).elf: $(COURSE_DATA_TARGETS) $(O_FILES) $(COURSE_MIO0_OBJ_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/src/startup_logo.inc.mio0.o $(BUILD_DIR)/src/trophy_model.inc.mio0.o $(BUILD_DIR)/src/common_textures.inc.mio0.o $(COURSE_MODEL_TARGETS) undefined_syms.txt $(LD) $(LDFLAGS) -o $@ $(BUILD_DIR)/$(TARGET).z64: $(BUILD_DIR)/$(TARGET).elf diff --git a/courses/special_cup/rainbow_road/course_data.inc.c b/courses/special_cup/rainbow_road/course_data.inc.c index fac6c881c..4aece6688 100644 --- a/courses/special_cup/rainbow_road/course_data.inc.c +++ b/courses/special_cup/rainbow_road/course_data.inc.c @@ -3579,4 +3579,4 @@ struct CourseAddrUnkStruct d_course_rainbow_road_addr[] = { { 0x06001678, 0x06001738 }, { 0x060017D0, 0x060018D0 }, { 0x06001878, 0x06001948 }, -}; \ No newline at end of file +}; diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index 7f12f7d1d..323a52720 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -14,6 +14,8 @@ #include "variables.h" #include #include "vehicles.h" +#include "hud_renderer.h" +#include "code_80057C60.h" s16 func_80005FD0(Vec3f arg0, Vec3f arg1) { s16 temp_ret; @@ -1813,7 +1815,7 @@ s32 func_80008E58(s32 payerId, s32 pathIndex) { f32 posZ; Player *player; s32 trackSegment; - s32 stackPadding; + UNUSED s32 stackPadding; player = &gPlayers[payerId]; posX = player->pos[0]; @@ -1882,8 +1884,7 @@ void func_800090F0(s32 playerId, Player *player) { f32 posX; f32 posY; f32 posZ; - f32 stackPadding; - f32 stackPadding2; + UNUSED f32 pad[2]; posX = player->pos[0]; posY = player->pos[1]; @@ -2103,8 +2104,6 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000929C.s") void func_800097E0(void) { s32 i; - s32 j; - s32 unk = 0; func_8000EF20(); D_8016337C++; @@ -3029,7 +3028,7 @@ block_40: GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000B140.s") #endif -s32 func_8000B7E4(s32 arg0, u16 wayPointIndex) { +s32 func_8000B7E4(UNUSED s32 arg0, u16 wayPointIndex) { s16 thing = D_801645E0[wayPointIndex]; if (thing > 0) { return 1; @@ -3079,7 +3078,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000B874.s") #endif void func_8000B95C(s32 playerId, u16 wayPointIndex, s32 pathIndex) { - f32 stackPadding[3]; + UNUSED Vec3f pad; D_80163068[playerId] = 0.0f; if ((s32) D_800DCA4C[gCurrentCourseId] >= 0) { if ((gPlayers[playerId].unk_000 & 0x8000) != 0) { @@ -3434,7 +3433,7 @@ s16 func_8000C9DC(f32 posX, f32 posY, f32 posZ, s16 wayPointIndex, s32 pathIndex GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000C9DC.s") #endif -void func_8000CBA4(f32 unusedPosX, f32 posY, f32 unusedPosZ, s16 *wayPointIndex) { +void func_8000CBA4(UNUSED f32 posX, f32 posY, UNUSED f32 posZ, s16 *wayPointIndex) { s16 var_v0; var_v0 = *wayPointIndex; @@ -3444,7 +3443,7 @@ void func_8000CBA4(f32 unusedPosX, f32 posY, f32 unusedPosZ, s16 *wayPointIndex) *wayPointIndex = var_v0; } -void func_8000CBF8(f32 unusedPosX, f32 unusedPosY, f32 posZ, s16 *wayPointIndex, s32 pathIndex) { +void func_8000CBF8(UNUSED f32 posX, UNUSED f32 posY, f32 posZ, s16 *wayPointIndex, s32 pathIndex) { s16 temp; temp = *wayPointIndex; if (temp == 0) { @@ -3631,7 +3630,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000D100.s") #endif s16 func_8000D24C(f32 posX, f32 posY, f32 posZ, s32 *pathIndex) { - s32 stackPadding; + UNUSED s32 pad; UnkActorInner sp24; func_802ADDC8(&sp24, 10.0f, posX, posY, posZ); @@ -4685,8 +4684,8 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000F124.s") #endif // Delete track waypoints -void func_8000F2BC(struct TrackWayPoint *arg0, s32 arg1) { - bzero(arg0, arg1 << 3); +void func_8000F2BC(struct TrackWayPoint *arg0, size_t size) { + bzero((void *) arg0, size << 3); } #ifdef MIPS_TO_C @@ -5394,7 +5393,6 @@ void func_80010218(s32 pathIndex) { struct TrackWayPoint *nextWayPoint; struct TrackWayPoint *var_s1; struct TrackWayPoint *var_s2; - u16 wayPointCount; if (((s32) D_800DCA4C[gCurrentCourseId]) >= 0) { wayPointWidth = D_800DCA4C[gCurrentCourseId]; @@ -5429,7 +5427,7 @@ void func_80010218(s32 pathIndex) { f32 func_80010480(s32 pathIndex, u16 wayPointIndex) { f32 temp_f10_2; f32 temp_f8; - f32 stackPadding; + UNUSED f32 stackPadding; struct TrackWayPoint *pathWaypoints; f32 x1; f32 z1; @@ -5615,13 +5613,13 @@ loop_4: GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80010E6C.s") #endif -f32 func_80010F40(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { +f32 func_80010F40(f32 arg0, f32 arg1, f32 arg2, UNUSED s32 arg3) { arg1 = func_802AE1C0(arg0, 2000.0f, arg2); func_802ADDC8(&D_80162E70, 1.0f, arg0, arg1, arg2); return arg1; } -f32 func_80010FA0(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { +f32 func_80010FA0(f32 arg0, f32 arg1, f32 arg2, UNUSED s32 arg3) { arg1 = func_802AE1C0(arg0, (f32) ((f64) arg1 + 30.0), arg2); func_802ADDC8(&D_80162E70, 10.0f, arg0, arg1, arg2); return arg1; @@ -6307,7 +6305,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80012190.s") void func_80012220(VehicleStuff *vehicle) { f32 origXPos; - f32 stackPadding; + UNUSED f32 stackPadding; f32 origZPos; origXPos = vehicle->position[0]; @@ -6329,9 +6327,7 @@ void func_80012220(VehicleStuff *vehicle) { void func_800122D8(void) { s16 trainCarYRot; - f32 stackPadding0; - f32 stackPadding1; - f32 stackPadding2; + UNUSED Vec3f pad; TrainCarStuff *tempLocomotive; TrainCarStuff *tempTender; TrainCarStuff *tempPassengerCar; @@ -6542,7 +6538,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800127E0.s") void func_80012A48(TrainCarStuff *trainCar, s16 arg1) { struct TrainCar *trainCarActor; - trainCarActor = &gActorList[trainCar->actorIndex]; + trainCarActor = (struct TrainCar *) &gActorList[trainCar->actorIndex]; trainCarActor->pos[0] = trainCar->position[0]; trainCarActor->pos[1] = trainCar->position[1]; trainCarActor->pos[2] = trainCar->position[2]; @@ -7822,7 +7818,7 @@ UNUSED void func_8001530C(void) { } -void func_80015314(s32 playerId, s32 arg1, s32 cameraId) { +void func_80015314(s32 playerId, UNUSED s32 arg1, s32 cameraId) { Camera *temp_a0; Player *temp_a1; @@ -7836,9 +7832,8 @@ void func_80015314(s32 playerId, s32 arg1, s32 cameraId) { func_80015390(temp_a0, temp_a1, 0); } -void func_80015390(Camera *camera, Player *player, s32 arg2) { - s32 stackPadding0[3]; - s32 stackPadding1[3]; +void func_80015390(Camera *camera, UNUSED Player *player, UNUSED s32 arg2) { + UNUSED s32 pad[6]; f32 temp_f12; f32 sp90; f32 temp_f14; @@ -7846,11 +7841,9 @@ void func_80015390(Camera *camera, Player *player, s32 arg2) { f32 sp84; f32 sp80; f32 sp7C; - s32 stackPadding2[3]; + UNUSED Vec3f pad2; Vec3f sp64; - s32 stackPadding3[3]; - s32 stackPadding4[3]; - s32 stackPadding5[3]; + UNUSED s32 pad3[9]; s16 var_a2; /* @@ -10184,7 +10177,7 @@ void func_80019FB4(s32 arg0) { GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80019FB4.s") #endif -void func_8001A0A4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { +void func_8001A0A4(UNUSED s16 *arg0, UNUSED Camera *arg1, UNUSED Player *arg2, UNUSED s32 arg3, s32 arg4) { func_80019FB4(arg4); func_80019C50(arg4); } @@ -10639,7 +10632,7 @@ void func_8001AB74(s32 arg0, s16 *arg1, s32 arg2) { GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001AB74.s") #endif -void func_8001ABE0(s32 arg0, s32 arg1) { +void func_8001ABE0(UNUSED s32 arg0, UNUSED s32 arg1) { } diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h index 401ac8d41..663e7b6b8 100644 --- a/src/code_80005FD0.h +++ b/src/code_80005FD0.h @@ -28,8 +28,12 @@ struct unk_41F8 { /* Function Prototypes */ +void func_8001C14C(void); void func_800070F4(void); void func_80019DF4(void); +void func_80019C50(s32); +void func_80019FB4(s32); +void func_80019D2C(Camera*, Player*, s32); void func_80019E58(void); s16 func_80005FD0(Vec3f, Vec3f); s32 func_80006018(f32, f32, f32, f32, f32, f32, f32, f32); @@ -73,7 +77,7 @@ void func_8000EEDC(); void func_8000EF20(); void func_8000F0E0(); void func_8000F124(); -void func_8000F2BC(struct TrackWayPoint*, s32); +void func_8000F2BC(struct TrackWayPoint*, size_t); void func_80010218(s32); f32 func_80010480(s32, u16); void func_800107C4(s32); @@ -115,7 +119,7 @@ void func_80015390(Camera*, Player*, s32); void func_8001968C(); void func_8001C05C(); void func_80019DE4(); -void func_8001A0A4(s32, s32, s32, s32, s32); +void func_8001A0A4(s16*, Camera*, Player*, s32, s32); void func_8001A0DC(s16*, Camera*, Player*, s8, s32); s32 func_8001A310(s32, s32); void func_8001ABE0(s32, s32); diff --git a/src/code_80280650.c b/src/code_80280650.c index 200fb2f1d..692d78193 100644 --- a/src/code_80280650.c +++ b/src/code_80280650.c @@ -3,11 +3,17 @@ #include #include #include "main.h" +#include "memory.h" #include "variables.h" #include "common_textures.h" #include "code_8001F980.h" #include "hud_renderer.h" #include "code_80280650.h" +#include "camera_junk.h" +#include "code_80027D00.h" +#include "code_80057C60.h" +#include "code_80005FD0.h" +#include "code_80281C40.h" void func_80280650(void) { @@ -26,9 +32,7 @@ void func_80280658(struct UnkStruct_80280658 *arg0) { } struct UnkStruct_80280658 *func_802806C8(void) { - //struct UnkStruct_80280658 *sp1C; - //s32 temp_v0; - s32 pad[2]; + UNUSED s32 pad[2]; struct UnkStruct_80280658 *phi_a0 = D_802874F8; s32 i; @@ -49,7 +53,7 @@ struct UnkStruct_80280658 *func_802806C8(void) { struct UnkStruct_80280658 *func_80280734(struct UnkStruct_80280658 *arg0) { struct UnkStruct_80280658 *temp_v0 = func_802806C8(); - temp_v0->unk28 = arg0; + temp_v0->unk28 = (struct UnkStruct_80280658_2 *) arg0; func_80280658(temp_v0); return temp_v0; } @@ -147,7 +151,7 @@ void func_8028093C(struct UnkStruct_80280658 *arg0) { arg0->unk10 += func_80280850(0.2f); arg0->unk18 += func_80280850(0.2f); } else if (arg0->unk2C == 4) { - temp_v0 = func_80280734(&D_80284E7C); + temp_v0 = func_80280734((struct UnkStruct_80280658 *)&D_80284E7C); temp_v0->unk10 = arg0->unk10; temp_v0->unk14 = arg0->unk14; temp_v0->unk18 = arg0->unk18; @@ -266,27 +270,26 @@ block_12: GLOBAL_ASM("asm/non_matchings/code_80280650/func_80280D1C.s") #endif -void func_80280FA0(s32 arg0) { +void func_80280FA0(UNUSED s32 arg0) { } -void func_80280FA8(s32 arg0) { +void func_80280FA8(UNUSED s32 arg0) { } void func_80280FB0(void) { D_802874E0 = 0; - - D_802874F8 = get_next_available_memory_addr(0x3B60); + D_802874F8 = (struct UnkStruct_80280658 *) get_next_available_memory_addr(0x3B60); bzero(D_802874F8, 0x3B60); - func_80280734((struct UnkStruct80280658 *)&D_80284E88); + func_80280734((struct UnkStruct_80280658 *)&D_80284E88); } void func_80280FFC(void) { D_802874F4 = 1; } -void func_8028100C(s32 arg0, s32 arg1, s32 arg2) { +void func_8028100C(UNUSED s32 arg0, UNUSED s32 arg1, UNUSED s32 arg2) { } diff --git a/src/code_80280650.h b/src/code_80280650.h index ac429226f..1a68c478c 100644 --- a/src/code_80280650.h +++ b/src/code_80280650.h @@ -93,8 +93,8 @@ void ending_sequence_loop(); extern struct UnkStruct_80280658 *D_802874F8; extern struct UnkStruct_80280658 *D_80284E7C; +extern struct UnkStruct_80280658 *D_80284E88; -extern s32 D_80284E88; extern s32 D_802874E0; extern s8 D_802874F4; extern Gfx *D_802874D4; diff --git a/src/hud_renderer.h b/src/hud_renderer.h index f3e601758..562b35d18 100644 --- a/src/hud_renderer.h +++ b/src/hud_renderer.h @@ -3,6 +3,7 @@ #include "common_structs.h" +void func_80057114(s32); void func_800431B0(Vec3f, Vec3s, f32, Vtx*); void func_80043220(Vec3f, Vec3s, f32, Gfx*); void func_80043328(Vec3f, Vec3s, f32, Gfx*); diff --git a/src/memory.c b/src/memory.c index 89d52499e..62b811215 100644 --- a/src/memory.c +++ b/src/memory.c @@ -29,7 +29,7 @@ s32 D_802B8CE4 = 0; // pad * @param size of memory to allocate. * @return Address of free memory */ -u32 *get_next_available_memory_addr(u32 size) { +void *get_next_available_memory_addr(u32 size) { u32 *freeSpace = (u32 *)gNextFreeMemoryAddress; size = ALIGN16(size); gNextFreeMemoryAddress += size; diff --git a/src/memory.h b/src/memory.h index 51eb15ede..06aacf8f4 100644 --- a/src/memory.h +++ b/src/memory.h @@ -42,7 +42,7 @@ struct AllocOnlyPool { extern f32 vtxStretchY; -u32 *get_next_available_memory_addr(u32); +void *get_next_available_memory_addr(u32); uintptr_t set_segment_base_addr(s32, void*); void *get_segment_base_addr(s32); void *segmented_to_virtual(const void *);