diff --git a/Makefile b/Makefile index 62f6603b..03dba07a 100755 --- a/Makefile +++ b/Makefile @@ -211,7 +211,7 @@ ifeq ($(shell getconf LONG_BIT), 64) # Ensure that gcc treats the code as 32-bit CC_CHECK_CFLAGS += -m32 endif -CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(INCLUDE_CFLAGS) $(DEF_INC_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB -D_LANGUAGE_C -DNDEBUG +CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(INCLUDE_CFLAGS) $(DEF_INC_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB -D_LANGUAGE_C -DNDEBUG -Werror-implicit-function-declaration #Warnings to ignore CC_CHECK_CFLAGS += -Wno-builtin-declaration-mismatch -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast diff --git a/lib/src/mips1/al/csplayer.c b/lib/src/mips1/al/csplayer.c index a285c817..f6b9468b 100644 --- a/lib/src/mips1/al/csplayer.c +++ b/lib/src/mips1/al/csplayer.c @@ -24,6 +24,7 @@ void alCSeqNextEvent(ALCSeq *seq, ALEvent *event); void __CSPHandleMIDIMsg(ALCSPlayer_Custom *seqp, ALEvent *event); ALMicroTime __CSPVoiceHandler(void *node); void __CSPHandleNextSeqEvent(ALCSPlayer *seqp); +void func_80065A80(ALSynth *arg0, PVoice *arg1, s16 arg2); /* * Sequence Player public functions diff --git a/src/camera.c b/src/camera.c index bed16b02..664aaa70 100644 --- a/src/camera.c +++ b/src/camera.c @@ -550,7 +550,7 @@ void set_viewport_properties(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_X_CUSTOM; } if (posY != VIEWPORT_AUTO) { -// !@bug Viewport Y writes to the X value. Luckily, all cases this function is called use VIEWPORT_AUTO, +//!@bug Viewport Y writes to the X value. Luckily, all cases this function is called use VIEWPORT_AUTO, // so this bug doesn't happen in practice. gScreenViewports[viewPortIndex].posX = posY; gScreenViewports[viewPortIndex].flags |= VIEWPORT_Y_CUSTOM; diff --git a/src/gzip.c b/src/gzip.c index cc636423..efc3eed9 100644 --- a/src/gzip.c +++ b/src/gzip.c @@ -3,6 +3,7 @@ #include "gzip.h" #include "asset_loading.h" +#include "PR/os_libc.h" /************ .data ************/ diff --git a/src/memory.h b/src/memory.h index 29e2c280..8f21e877 100644 --- a/src/memory.h +++ b/src/memory.h @@ -103,5 +103,6 @@ void free_memory_pool_slot(s32 poolIndex, s32 slotIndex); // Non Matching void *allocate_at_address_in_main_pool(s32 size, u8 *address, u32 colorTag); // Non Matching void free_slot_containing_address(u8 *address); // Non Matching s32 get_memory_colour_tag_count(s32 arg0); // Non Matching +s32 allocate_memory_pool_slot(s32 memoryPoolIndex, s32 slotIndex, s32 size, s32 slotIsTaken, s32 newSlotIsTaken, u32 colorTag); #endif diff --git a/src/menu.c b/src/menu.c index 4d5c6dc1..d12d53cd 100644 --- a/src/menu.c +++ b/src/menu.c @@ -29,6 +29,7 @@ #include "racer.h" #include "unknown_078050.h" #include "unknown_0255E0.h" +#include "lib/src/mips1/al/alSynStartVoiceParams.h" /** * @file Contains all the code used for every menu in the game. @@ -634,7 +635,7 @@ CharacterSelectData gCharacterSelectBytesComplete[] = { /*Timber*/ { { BANJO, NONE }, { NONE, NONE }, { PIPSY, TICTOC_9, TIPTUP, CONKER }, { NONE, NONE, NONE, NONE }, 0x0004 }, /*Drumstick*/ { { NONE, NONE }, { TICTOC_9, NONE }, { DIDDY, KRUNCH, NONE, NONE }, { BUMPER, BANJO, NONE, NONE }, 0x0006 }, /*T.T*/ { { DRUMSTICK, NONE }, { TIPTUP, NONE }, { TIPTUP, CONKER, NONE, NONE }, { PIPSY, TIMBER, NONE, NONE }, 0x0008 } -// !@bug T.T's down input selects Tiptup. It should be set to NONE. +//!@bug T.T's down input selects Tiptup. It should be set to NONE. }; s32 D_800DFFCC = 0; // Likely unused. @@ -2852,8 +2853,6 @@ void menu_audio_options_init(void) { GLOBAL_ASM("asm/non_matchings/menu/func_80084854.s") -extern void func_8000488C(s32 *soundMask); // Temporary until the proper signature is found. - #ifdef NON_EQUIVALENT // Almost matching, should be functionally equivalent @@ -8433,7 +8432,8 @@ void render_track_selection_viewport_border(ObjectModel *objMdl) { numTris = objMdl->batches[i + 1].facesOffset - triOffset; verts = &objMdl->vertices[vertOffset]; tris = &objMdl->triangles[triOffset]; - if (objMdl->batches[i].textureIndex == -1) { // !@bug Never true, since textureIndex is unsigned. This should've been either `== (u8)-1` or `== 0xFF`. + //!@bug Never true, since textureIndex is unsigned. This should've been either `== (u8)-1` or `== 0xFF`. + if (objMdl->batches[i].textureIndex == -1) { tex = NULL; texEnabled = FALSE; var_a3 = 0; diff --git a/src/menu.h b/src/menu.h index 7091cc9c..6e147216 100644 --- a/src/menu.h +++ b/src/menu.h @@ -934,6 +934,10 @@ s32 func_80095728(Gfx **gfx, MatrixS **mtx, Vertex **vtx, s32 updateRate); s32 func_8008F618(Gfx **dlist, MatrixS **mat); void func_80093D40(UNUSED s32 updateRate); void func_80080BC8(Gfx **); +void func_8009963C(void); +void func_80081C04(s32 num, s32 x, s32 y, u8 r, u8 g, u8 b, u8 a, u8 font, u8 alignment); +void func_80080E90(Gfx **dList, s32 x, s32 y, u8 BGr, u8 BGg, u8 BGb, u8 BGa, u8 r, u8 g, u8 b, u8 a); +void func_80084854(void); typedef enum MenuTextures { /* 0x00 */ TEXTURE_UNK_00, diff --git a/src/objects.h b/src/objects.h index 7197b7ca..76cfd55d 100644 --- a/src/objects.h +++ b/src/objects.h @@ -497,5 +497,8 @@ void func_80012F94(Object *); void render_3d_model(Object *); void func_800101AC(Object *, s32); Object *func_8001BDD4(Object *obj, s32 *cameraID); +void func_800135B8(Object *); +void func_8000CC7C(Vehicle, u32, s32); +void func_8000B020(s32, s32); #endif diff --git a/src/racer.c b/src/racer.c index 7033dbe0..e7c12f9d 100644 --- a/src/racer.c +++ b/src/racer.c @@ -28,6 +28,8 @@ #include "unknown_005740.h" #include "game_ui.h" #include "object_models.h" +#include "unknown_003260.h" + #define MAX_NUMBER_OF_GHOST_NODES 360 @@ -214,8 +216,6 @@ struct TempStruct8 **D_8011D5B0; s32 D_8011D5B4; s16 D_8011D5B8; -extern void func_8000488C(u8 *soundMask); - /******************************/ GLOBAL_ASM("asm/non_matchings/racer/func_80042D20.s") diff --git a/src/textures_sprites.h b/src/textures_sprites.h index 7a914e6d..eeb4411f 100644 --- a/src/textures_sprites.h +++ b/src/textures_sprites.h @@ -158,5 +158,6 @@ MemoryPoolSlot *func_8007C12C(s32 arg0, s32 arg1); // Non Matching void func_8007AC70(void); // Non Matching void func_8007BF34(Gfx **dlist, s32 arg1); // Non Matching void func_8007BA5C(Gfx **dlist, TextureHeader *arg1, u32 flags, s32 arg3); // Non Matching +void build_tex_display_list(TextureHeader *tex, u8 *addr); #endif diff --git a/src/unknown_003260.h b/src/unknown_003260.h index cd774a9f..85254abb 100644 --- a/src/unknown_003260.h +++ b/src/unknown_003260.h @@ -118,8 +118,7 @@ void alSndPNew(audioMgrConfig *c); void func_80004604(u8 *arg0, u8 arg1); u8 func_8000461C(u8 *arg0); void func_80004638(ALBank *bnk, s16 sndIndx, s32 arg2); -//Causes issues with its type -//void func_8000488C(u8 *soundMask); +void func_8000488C(); void func_800049D8(void); void func_800049F8(s32 soundMask, s16 type, u32 volume); u16 func_80004A3C(u8 arg0); @@ -133,5 +132,6 @@ void func_80004668(ALBank *bnk, s16 sndIndx, u8, s32); void audioNewThread(ALSynConfig *c, OSPri p, OSSched *arg2); void func_800048D8(s32); void func_80002C00(s32, OSMesg mesg); +void _handleEvent(unk800DC6BC *snd, ALSndpEvent *event); #endif diff --git a/src/unknown_0255E0.h b/src/unknown_0255E0.h index 8dadb702..0e4774fe 100644 --- a/src/unknown_0255E0.h +++ b/src/unknown_0255E0.h @@ -147,5 +147,9 @@ void func_8002DE30(Object*); void func_8002E234(Object*, s32); void func_80030DE0(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); s32 func_8002BAB0(s16, f32, f32, f32*); +void func_800249F0(u32 arg0, u32 arg1, s32 arg2, Vehicle vehicle, u32 arg4, u32 arg5, u32 arg6); +void func_800B82B4(LevelModel *, LevelHeader *, s32); +void func_8000C8F8(u32, u32); +void func_80025510(s32); #endif diff --git a/src/weather.h b/src/weather.h index 1a75154d..ef0a28c7 100644 --- a/src/weather.h +++ b/src/weather.h @@ -107,5 +107,6 @@ void f32_matrix_dot(Matrix *arg0, Matrix *arg1, Matrix *arg2); void func_800AC21C(void); void func_800AC8A8(Object *); void func_800ACA20(Gfx**, MatrixS**, Vertex**, ObjectSegment*); +void func_800AB4A8(s16 weatherType, s16 weatherEnable, s16 velX, s16 velY, s16 velZ, u8 intensity, u8 opacity); #endif