Clean up game_ui.c and rework compiler flags + fix the warnings they caused. (#556)

* warns prelim

* Update Makefile

* catch a rain straggler

* wowie

* m

* game_ui.c moment

* Update game_ui.c

* patch

* format
This commit is contained in:
Fazana
2025-05-06 14:54:20 +01:00
committed by GitHub
parent 764705b67c
commit 934ef08ad8
31 changed files with 609 additions and 443 deletions
+4 -8
View File
@@ -193,22 +193,18 @@ CFLAGS := -G 0 -non_shared -verbose -Xcpluscomm -nostdinc -Wab,-r4300_mul
CFLAGS += $(C_DEFINES)
CFLAGS += $(INCLUDE_CFLAGS)
CHECK_WARNINGS := -Wall -Wextra -Werror-implicit-function-declaration -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-braces \
-Wno-main -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-switch -Wno-pointer-sign
CHECK_WARNINGS := -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-parameter -Wno-switch -Werror-implicit-function-declaration
ifeq ($(DETECTED_OS), macos)
CHECK_WARNINGS += -Wno-constant-conversion -Wno-for-loop-analysis
# Disable GCC complaining about fakematches necessary to match if building a matching ROM. Example: "var2 = (0, var1)"
ifeq ($(NON_MATCHING),0)
CHECK_WARNINGS += -Wno-unused-value -Wno-deprecated-non-prototype -Wno-array-bounds -Wno-self-assign -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable
CHECK_WARNINGS += -Wno-pointer-to-int-cast -Wno-constant-conversion -Wno-int-to-pointer-cast
endif
else
CHECK_WARNINGS += -Wno-builtin-declaration-mismatch
# Disable GCC complaining about fakematches necessary to match if building a matching ROM. Example: "var2 = (0, var1)"
ifeq ($(NON_MATCHING),0)
CHECK_WARNINGS += -Wno-unused-value -Wno-array-bounds -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable
CHECK_WARNINGS += -Wno-unused-variable -Wno-unused-value -Wno-unused-but-set-variable
endif
endif
CC_CHECK := $(GCC) -fsyntax-only -fno-builtin -funsigned-char $(C_STANDARD) -DAVOID_UB -D_LANGUAGE_C -DNON_MATCHING -DNON_EQUIVALENT $(CHECK_WARNINGS) $(INCLUDE_CFLAGS) $(C_DEFINES) $(GCC_COLOR)
CC_CHECK := $(GCC) -fsyntax-only -fno-builtin -funsigned-char $(C_STANDARD) -DAVOID_UB -DCC_CHECK -D_LANGUAGE_C -DNON_MATCHING -DNON_EQUIVALENT $(CHECK_WARNINGS) $(INCLUDE_CFLAGS) $(C_DEFINES) $(GCC_COLOR)
# Only add -m32 for x86_64 machines.
ifneq ($(filter x86_64%,$(UNAME_M)),)
+1 -1
View File
@@ -887,7 +887,7 @@ typedef struct LevelObjectEntry_Unknown127 {
typedef struct LevelObjectEntry_Hud {
LevelObjectEntryCommon common;
s32 unk8;
s32 offsetY;
} LevelObjectEntry_Hud;
typedef struct LevelObjectEntry {
+2 -2
View File
@@ -47,7 +47,7 @@
#endif
// Use built-in pseudocode where possible in NON_MATCHING builds
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(CC_CHECK)
#define abs(x) __builtin_abs(x)
#define fabsf(x) __builtin_fabsf(x)
#define sqrtf(f) __builtin_sqrtf(f)
@@ -75,7 +75,7 @@
#define INCONSISTENT
// Used to make a u32 colour value look clearer. Transforms 0xFF0000FF to 255, 0, 0, 255
#define COLOUR_RGBA32(r, g, b, a) (((r << 24) | (g << 16) | (b << 8) | a))
#define COLOUR_RGBA32(r, g, b, a) ((u32)((r << 24) | (g << 16) | (b << 8) | a))
// A few systems in the game use an array as a cache table. This gives you the asset ID
#define ASSETCACHE_ID(x) ((x << 1) + 0)
+8
View File
@@ -2,6 +2,14 @@
#include "PRinternal/osint.h"
#include "osint_debug.h"
/************ .rodata ************/
const char D_800E8E70[] = "\nAssertion failed: '%s' in file %s, line %d\n";
const char D_800E8EA0[] = "\nAssertion failed: '%s' in file %s, line %d\n";
/*********************************/
void __assertBreak(void);
void __assert(const char* exp, const char* filename, int line) {
+3 -3
View File
@@ -74,7 +74,7 @@ void music_jingle_voicelimit_set(u8 voiceLimit);
void music_fade(s32 time);
void music_volume_reset(void);
void sound_update_queue(u8 updateRate);
void sound_play_delayed(u16 soundId, SoundHandle *soundMask, f32 delayTime);
void sound_play_delayed(u16 soundId, SoundHandle *handlePtr, f32 delayTime);
void sound_clear_delayed(void);
u16 music_channel_get_mask(void);
void music_dynamic_set(u16 channelMask);
@@ -106,7 +106,7 @@ void music_jingle_pan_set(ALPan pan);
void music_jingle_play(u8 seqID);
u32 music_jingle_playing(void);
u16 sound_distance(u16 soundId);
void sound_play_spatial(u16 soundID, f32 x, f32 y, f32 z, SoundHandle *soundMask);
void sound_play_spatial(u16 soundID, f32 x, f32 y, f32 z, SoundHandle *handlePtr);
void func_80001F14(u16 soundID, SoundHandle *handlePtr);
u16 sound_count(void);
u8 music_sequence_count(void);
@@ -118,7 +118,7 @@ void music_sequence_stop(ALCSPlayer *seqPlayer);
void sound_reverb_set(u8 setting);
void alSeqFileNew(ALSeqFile *file, u8 *base);
void func_80063A90(ALCSPlayer *seqp, u8 channel);
void sound_volume_set_relative(u16 soundID, SoundHandle soundState, u8 volume);
void sound_volume_set_relative(u16 soundID, SoundHandle soundHandle, u8 volume);
void music_sequence_init(ALCSPlayer *seqp, void *sequence, u8 *seqID, ALCSeq *seq);
void sound_play(u16 soundID, SoundHandle* handlePtr);
void sound_play(u16 soundID, SoundHandle* handlePtr);
+11 -11
View File
@@ -58,26 +58,26 @@ typedef struct ReverbLine {
void audspat_jingle_on(void);
void audspat_point_stop(AudioPoint *);
void audspat_jingle_off(void);
void audspat_point_create(u16 soundBite, f32 x, f32 y, f32 z, u8 arg4, u8 arg5, u8 volume, u16 distance, u8 arg8, u8 pitch,
u8 argA, AudioPoint **handlePtr);
void audspat_point_create(u16 soundBite, f32 x, f32 y, f32 z, u8 flags, u8 minVolume, u8 volume, u16 range, u8 fastFalloff, u8 pitch,
u8 priority, AudioPoint **handlePtr);
void audspat_play_sound_at_position(u16 soundId, f32 x, f32 y, f32 z, u8 flags, AudioPoint **handlePtr);
void audspat_point_stop_by_index(s32 arg0);
void audspat_point_stop_by_index(s32 index);
s32 audspat_calculate_spatial_pan(f32, f32, s32);
void audspat_play_sound_direct(u16 soundId, f32 x, f32 y, f32 z, u8 arg4, u8 arg5, f32 pitch, AudioPoint **handlePtr);
void audspat_line_add_vertex(u8 arg0, u16 soundId, f32 x, f32 y, f32 z, u8 arg5, u8 arg6, u8 arg7, u8 arg8, u16 arg9,
u8 argA, u8 lineID, u8 argC);
s32 audspat_line_validate(u8 arg0);
void audspat_play_sound_direct(u16 soundBite, f32 x, f32 y, f32 z, u8 flags, u8 volume, f32 pitch, AudioPoint **handlePtr);
void audspat_line_add_vertex(u8 type, u16 soundBite, f32 x, f32 y, f32 z, u8 arg5, u8 arg6, u8 arg7, u8 priority, u16 arg9,
u8 argA, u8 lineID, u8 vertexIndex);
s32 audspat_line_validate(u8 lineID);
void audspat_debug_render_line(Gfx **dList, Vertex **verts, Triangle **tris, f32 coords[6], u8 red, u8 green, u8 blue);
void func_80006BFC(Object *obj, ObjectSegment *segment, Object *obj2, s32 updateRate);
void audspat_point_set_position(AudioPoint *arg0, f32 x, f32 y, f32 z);
s32 audspat_reverb_validate(u8 arg0);
void audspat_point_set_position(AudioPoint *audioPoint, f32 x, f32 y, f32 z);
s32 audspat_reverb_validate(u8 reverbLineID);
void audspat_init(void);
void audspat_reverb_add_vertex(f32, f32, f32, u8, u8, u8);
void audspat_calculate_echo(SoundHandle soundState, f32 x, f32 y, f32 z);
void audspat_calculate_echo(SoundHandle soundHandle, f32 x, f32 y, f32 z);
s32 audspat_distance_to_segment(f32 inX, f32 inY, f32 inZ, f32 coords[6], f32 *outX, f32 *outY, f32 *outZ);
void audspat_reset(void);
void audspat_update_all(Object **arg0, s32 numRacers, s32 updateRate); // Non Matching
void audspat_update_all(Object **objList, s32 numObjects, s32 updateRate); // Non Matching
void func_80006FC8(Object **objs, s32 numRacers, ObjectSegment *segment, u8 arg3, s32 updateRate); // Non Matching
u8 audspat_reverb_get_strength_at_point(ReverbLine *, f32, f32, f32);
+10 -10
View File
@@ -117,23 +117,23 @@ extern void alEvtqPostEvent(ALEventQueue *evtq, ALEvent *evt, ALMicroTime delta)
void sndp_set_global_volume(u32 volume);
s32 sndp_get_global_volume(void);
void sndp_set_active_sound_limit(s32 numChannels);
void sndp_set_active_sound_limit(s32 numSounds);
void sndp_init_player(audioMgrConfig *c);
ALMicroTime sndp_voice_handler(void *node);
void sndp_end(ALSoundState *state);
u16 sndp_get_state_counts(u16 *numFree, u16 *numAllocated);
void sndp_set_priority(ALSoundState *sndp, u8 priority);
ALSoundState *sndp_play(ALBank *bnk, s16 sndIndx, SoundHandle *soundMask);
ALSoundState *sndp_play(ALBank *bnk, s16 sndIndx, SoundHandle *handlePtr);
void sndp_stop_all_looped(void);
void sndp_set_param(SoundHandle soundMask, s16 type, u32 volume);
u16 sndp_get_group_volume(u8 channel);
void sndp_set_group_volume(u8 channel, u16 volume);
void sndp_apply_pitch_slide(ALSoundState *voiceState);
void sndp_stop_with_flags(u8 event);
void sndp_stop(SoundHandle soundMask);
ALSoundState *sndp_allocate(UNUSED ALBank *arg0, ALSound *arg1);
void sndp_set_param(SoundHandle soundMask, s16 type, u32 paramValue);
u16 sndp_get_group_volume(u8 groupID);
void sndp_set_group_volume(u8 groupID, u16 volume);
void sndp_apply_pitch_slide(ALSoundState *soundState);
void sndp_stop_with_flags(u8 flags);
void sndp_stop(SoundHandle state);
ALSoundState *sndp_allocate(UNUSED ALBank *arg0, ALSound *sound);
void sndp_deallocate(ALSoundState *);
ALSoundState *sndp_play_with_priority(ALBank *bnk, s16 sndIndx, u8 priority, SoundHandle *soundMask);
ALSoundState *sndp_play_with_priority(ALBank *bank, s16 sndIndx, u8 priority, SoundHandle *handlePtr);
void sndp_handle_event(SoundPlayer *sndp, ALSndpEvent *event);
#endif
+1 -1
View File
@@ -130,6 +130,6 @@ void copy_viewports_to_stack(void);
void apply_head_turning_matrix(Gfx **dList, MatrixS **mtx, Object_68 *objGfx, s16 headAngle);
void apply_object_shear_matrix(Gfx **dList, MatrixS **mtx, Object *arg2, Object *arg3, f32 shear);
void camera_init(void);
void viewport_main(Gfx **dList, MatrixS **mats);
void viewport_main(Gfx **dlist, MatrixS **mats);
#endif
+27 -15
View File
@@ -39,13 +39,17 @@ Gfx dTransitionFadeSettings[] = {
};
Vec2s gTransitionBarnHorizontalCoords[14] = {
{ -480, 120 }, { -320, 120 }, { -160, 120 }, { 0, 120 }, { 160, 120 }, { 320, 120 }, { 480, 120 },
{ -480, -120 }, { -320, -120 }, { -160, -120 }, { 0, -120 }, { 160, -120 }, { 320, -120 }, { 480, -120 },
{ { { -480, 120 } } }, { { { -320, 120 } } }, { { { -160, 120 } } }, { { { 0, 120 } } },
{ { { 160, 120 } } }, { { { 320, 120 } } }, { { { 480, 120 } } }, { { { -480, -120 } } },
{ { { -320, -120 } } }, { { { -160, -120 } } }, { { { 0, -120 } } }, { { { 160, -120 } } },
{ { { 320, -120 } } }, { { { 480, -120 } } },
};
Vec2s gTransitionBarnVerticalCoords[14] = {
{ -160, 360 }, { -160, 240 }, { -160, 120 }, { -160, 0 }, { -160, -120 }, { -160, -240 }, { -160, -240 },
{ 160, 360 }, { 160, 240 }, { 160, 120 }, { 160, 0 }, { 160, -120 }, { 160, -240 }, { 160, -240 },
{ { { -160, 360 } } }, { { { -160, 240 } } }, { { { -160, 120 } } }, { { { -160, 0 } } },
{ { { -160, -120 } } }, { { { -160, -240 } } }, { { { -160, -240 } } }, { { { 160, 360 } } },
{ { { 160, 240 } } }, { { { 160, 120 } } }, { { { 160, 0 } } }, { { { 160, -120 } } },
{ { { 160, -240 } } }, { { { 160, -240 } } },
};
TriangleList D_800E32A0[12] = {
@@ -65,8 +69,9 @@ u8 gTransitionBarnDoorAlpha[12] = {
};
Vec2s gTransitionBarnDiagCoords[12] = {
{ -800, 120 }, { -480, 120 }, { -160, 120 }, { 160, 120 }, { 480, 120 }, { 800, 120 },
{ -800, -120 }, { -480, -120 }, { -160, -120 }, { 160, -120 }, { 480, -120 }, { 800, -120 },
{ { { -800, 120 } } }, { { { -480, 120 } } }, { { { -160, 120 } } }, { { { 160, 120 } } },
{ { { 480, 120 } } }, { { { 800, 120 } } }, { { { -800, -120 } } }, { { { -480, -120 } } },
{ { { -160, -120 } } }, { { { 160, -120 } } }, { { { 480, -120 } } }, { { { 800, -120 } } },
};
TriangleList D_800E330C[12] = {
@@ -86,15 +91,22 @@ u8 gTransitionBarnDoorDiagAlpha[12] = {
};
Vec2s gTransitionWaveCoords[63] = {
{ -160, 160 }, { -144, 160 }, { -128, 160 }, { -112, 160 }, { -96, 160 }, { -80, 160 }, { -64, 160 },
{ -48, 160 }, { -32, 160 }, { -16, 160 }, { 0, 160 }, { 16, 160 }, { 32, 160 }, { 48, 160 },
{ 64, 160 }, { 80, 160 }, { 96, 160 }, { 112, 160 }, { 128, 160 }, { 144, 160 }, { 160, 160 },
{ -160, -200 }, { -144, -160 }, { -128, -140 }, { -112, -130 }, { -96, -140 }, { -80, -200 }, { -64, -240 },
{ -48, -260 }, { -32, -270 }, { -16, -260 }, { 0, -220 }, { 16, -210 }, { 32, -200 }, { 48, -210 },
{ 64, -220 }, { 80, -260 }, { 96, -270 }, { 112, -260 }, { 128, -220 }, { 144, -160 }, { 160, -140 },
{ -160, -280 }, { -144, -280 }, { -128, -280 }, { -112, -280 }, { -96, -280 }, { -80, -280 }, { -64, -280 },
{ -48, -280 }, { -32, -280 }, { -16, -280 }, { 0, -280 }, { 16, -280 }, { 32, -280 }, { 48, -280 },
{ 64, -280 }, { 80, -280 }, { 96, -280 }, { 112, -280 }, { 128, -280 }, { 144, -280 }, { 160, -280 }
{ { { -160, 160 } } }, { { { -144, 160 } } }, { { { -128, 160 } } }, { { { -112, 160 } } },
{ { { -96, 160 } } }, { { { -80, 160 } } }, { { { -64, 160 } } }, { { { -48, 160 } } },
{ { { -32, 160 } } }, { { { -16, 160 } } }, { { { 0, 160 } } }, { { { 16, 160 } } },
{ { { 32, 160 } } }, { { { 48, 160 } } }, { { { 64, 160 } } }, { { { 80, 160 } } },
{ { { 96, 160 } } }, { { { 112, 160 } } }, { { { 128, 160 } } }, { { { 144, 160 } } },
{ { { 160, 160 } } }, { { { -160, -200 } } }, { { { -144, -160 } } }, { { { -128, -140 } } },
{ { { -112, -130 } } }, { { { -96, -140 } } }, { { { -80, -200 } } }, { { { -64, -240 } } },
{ { { -48, -260 } } }, { { { -32, -270 } } }, { { { -16, -260 } } }, { { { 0, -220 } } },
{ { { 16, -210 } } }, { { { 32, -200 } } }, { { { 48, -210 } } }, { { { 64, -220 } } },
{ { { 80, -260 } } }, { { { 96, -270 } } }, { { { 112, -260 } } }, { { { 128, -220 } } },
{ { { 144, -160 } } }, { { { 160, -140 } } }, { { { -160, -280 } } }, { { { -144, -280 } } },
{ { { -128, -280 } } }, { { { -112, -280 } } }, { { { -96, -280 } } }, { { { -80, -280 } } },
{ { { -64, -280 } } }, { { { -48, -280 } } }, { { { -32, -280 } } }, { { { -16, -280 } } },
{ { { 0, -280 } } }, { { { 16, -280 } } }, { { { 32, -280 } } }, { { { 48, -280 } } },
{ { { 64, -280 } } }, { { { 80, -280 } } }, { { { 96, -280 } } }, { { { 112, -280 } } },
{ { { 128, -280 } } }, { { { 144, -280 } } }, { { { 160, -280 } } }
};
u8 D_800E3440[92] = {
+280 -217
View File
File diff suppressed because it is too large Load Diff
+13 -2
View File
@@ -15,6 +15,19 @@
#define HUD_EGG_TOTAL 3
typedef struct HudPresets2P {
s16 assetID;
s16 x;
s16 y;
} HudPresets2P;
typedef struct HudPresets4P {
s16 assetID;
s16 xLeft;
s16 y;
s16 xRight;
} HudPresets4P;
typedef enum RaceFinishStages {
HUD_RACEFINISH_MUTE,
HUD_RACEFINISH_TEXT_IN,
@@ -54,8 +67,6 @@ typedef enum WrongWayDirection {
WRONGWAY_IN = 1
} WrongWayDirection;
enum CourseIndicatorArrows {
INDICATOR_NONE,
INDICATOR_LEFT,
+2 -2
View File
@@ -54,11 +54,11 @@ void setup_lights(s32 count) {
free_lights();
gMaxLights = count;
buffer = (ObjectLight **) mempool_alloc_safe(
buffer = (u8 *) mempool_alloc_safe(
gMaxLights * (sizeof(s32 *) + sizeof(ObjectLight) + sizeof(unk800DC960) + sizeof(Vec3f)), COLOUR_TAG_MAGENTA);
temp = gMaxLights;
gActiveLights = buffer;
gActiveLights = (ObjectLight **) buffer;
buffer += temp * sizeof(ObjectLight *);
D_800DC954 = (ObjectLight *) buffer;
D_800DC960 = (unk800DC960 *) ((u32) D_800DC954 + temp * sizeof(ObjectLight));
+1
View File
@@ -3,6 +3,7 @@
#include "types.h"
#define STACK_EPC 0x1000
#define STACK_IDLE 0x100
#define STACK_SCHED 0x2000
#define STACK_AUD 0x3010
+12 -19
View File
@@ -12,13 +12,6 @@
#include "PR/os_internal_thread.h"
#include "PRinternal/rmonint.h"
/************ .rodata ************/
UNUSED const char D_800E8E70[] = "\nAssertion failed: '%s' in file %s, line %d\n";
UNUSED const char D_800E8EA0[] = "\nAssertion failed: '%s' in file %s, line %d\n";
/*********************************/
/************ .data ************/
s32 sLockupStatus = -1;
@@ -27,12 +20,12 @@ s32 sLockupDelay = 0;
/*******************************/
u64 gEPCStack[0x200];
u64 gEPCStack[STACKSIZE(STACK_EPC)];
OSThread gEPCThread;
OSMesgQueue D_80129790;
OSMesg D_801297A8[8];
OSMesg D_801297C8[8];
OSMesgQueue D_801297E8;
OSMesgQueue gEPCMesgQueue;
OSMesg gEPCMesgBuf[8];
OSMesg gEPCPIBuf[8];
OSMesgQueue gEPCPIQueue;
/**
* Start the exception program counter thread.
@@ -41,7 +34,7 @@ OSMesgQueue D_801297E8;
void thread0_create(void) {
s32 i;
osCreateThread(&gEPCThread, 0, thread0_Main, 0, &gEPCStack[0x200], OS_PRIORITY_MAX);
osCreateThread(&gEPCThread, 0, thread0_Main, 0, &gEPCStack[STACKSIZE(STACK_EPC)], OS_PRIORITY_MAX);
osStartThread(&gEPCThread);
for (i = 0; i < 3; i++) {
gObjectStackTrace[i] = -1;
@@ -56,13 +49,13 @@ void thread0_Main(UNUSED void *unused) {
s32 sp34;
s32 s0 = 0;
osCreateMesgQueue(&D_80129790, D_801297A8, ARRAY_COUNT(D_801297A8));
osSetEventMesg(OS_EVENT_FAULT, &D_80129790, (OSMesg) RMON_MESG_FAULT);
osSetEventMesg(OS_EVENT_CPU_BREAK, &D_80129790, (OSMesg) RMON_MESG_CPU_BREAK);
osCreatePiManager(150, &D_801297E8, D_801297C8, ARRAY_COUNT(D_801297C8));
osCreateMesgQueue(&gEPCMesgQueue, gEPCMesgBuf, ARRAY_COUNT(gEPCMesgBuf));
osSetEventMesg(OS_EVENT_FAULT, &gEPCMesgQueue, (OSMesg) RMON_MESG_FAULT);
osSetEventMesg(OS_EVENT_CPU_BREAK, &gEPCMesgQueue, (OSMesg) RMON_MESG_CPU_BREAK);
osCreatePiManager(150, &gEPCPIQueue, gEPCPIBuf, ARRAY_COUNT(gEPCPIBuf));
while (1) {
osRecvMesg(&D_80129790, (OSMesg) &sp34, OS_MESG_BLOCK);
osRecvMesg(&gEPCMesgQueue, (OSMesg) &sp34, OS_MESG_BLOCK);
#if VERSION < VERSION_80
if (!(get_filtered_cheats() & CHEAT_EPC_LOCK_UP_DISPLAY)) {
continue;
@@ -192,7 +185,7 @@ void dump_memory_to_cpak(s32 epc, s32 size, u32 colourTag) {
}
}
i = sizeof(sp40) + sizeof(sp240) + sizeof(sp440); // fakematch?
write_controller_pak_file(0, -1, "CORE", "", sp40, i);
write_controller_pak_file(0, -1, "CORE", "", sp40, sizeof(sp40) + sizeof(sp240) + sizeof(sp440));
while (1) {} // Infinite loop; waiting for the player to reset the console?
}
}
+3 -3
View File
@@ -137,13 +137,13 @@ s32 *gLevelModelTable;
UNUSED f32 gPrevCameraX; // Set but never read
UNUSED f32 gPrevCameraY; // Set but never read
UNUSED f32 gPrevCameraZ; // Set but never read
Triangle *gShadowHeapTris[2 * 2]; // Triangle Data for shadows
Triangle *gShadowHeapTris[2 + 2]; // Triangle Data for shadows
Triangle *gCurrShadowTris;
UNUSED s32 D_8011D334;
Vertex *gShadowHeapVerts[2 * 2]; // Vertex Data for shadows
Vertex *gShadowHeapVerts[2 + 2]; // Vertex Data for shadows
Vertex *gCurrShadowVerts;
UNUSED s32 D_8011D34C;
ShadowHeapProperties *gShadowHeapData[2 * 2]; // General data for shadows. Texture and geometry size.
ShadowHeapProperties *gShadowHeapData[2 + 2]; // General data for shadows. Texture and geometry size.
ShadowHeapProperties *gCurrShadowHeapData;
s32 gShadowTail; // Position in the heap the shadow data ends at.
s32 gNewShadowTriCount; // xOffset?
+69 -65
View File
@@ -16,13 +16,13 @@ Vec2s *D_800E3044 = NULL; // holds some sort of index?
TexCoords *D_800E3048 = NULL;
f32 *D_800E304C[9] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
Vertex *gWaveVertices[4][1] = { NULL, NULL };
Triangle *gWaveTriangles[4][1] = { NULL, NULL, NULL, NULL };
Vertex *gWaveVertices[4][1] = { { NULL }, { NULL } };
Triangle *gWaveTriangles[4][1] = { { NULL }, { NULL }, { NULL }, { NULL } };
Triangle D_800E3090[4] = {
{ { BACKFACE_DRAW, 0, 2, 1 }, 0, 0, 0, 0, 0, 0 },
{ { BACKFACE_DRAW, 1, 2, 3 }, 0, 0, 0, 0, 0, 0 },
{ { BACKFACE_DRAW, 0, 2, 1 }, 0, 0, 0, 0, 0, 0 },
{ { BACKFACE_DRAW, 1, 2, 3 }, 0, 0, 0, 0, 0, 0 },
{ { { BACKFACE_DRAW, 0, 2, 1 } }, { { { 0, 0 } } }, { { { 0, 0 } } }, { { { 0, 0 } } } },
{ { { BACKFACE_DRAW, 1, 2, 3 } }, { { { 0, 0 } } }, { { { 0, 0 } } }, { { { 0, 0 } } } },
{ { { BACKFACE_DRAW, 0, 2, 1 } }, { { { 0, 0 } } }, { { { 0, 0 } } }, { { { 0, 0 } } } },
{ { { BACKFACE_DRAW, 1, 2, 3 } }, { { { 0, 0 } } }, { { { 0, 0 } } }, { { { 0, 0 } } } },
};
TextureHeader *gWaveTextureHeader = NULL;
@@ -67,12 +67,12 @@ const char D_800E9260[] = "\nError :: can not add another wave swell, reached li
Gfx *gWaveDL;
MatrixS *D_80129FC4;
unk80129FC8 D_80129FC8; // holds lots of control information used in this file
s32 D_8012A018; // either 1 or 0, toggled in func_800B9C18, used to index vertices and triangles
s32 gWaveVertexFlip; // either 1 or 0, toggled in func_800B9C18, used to index vertices and triangles
f32 D_8012A01C; // is set to lowest value of D_800E3040
f32 D_8012A020; // is set to highest value of D_800E3040
UNUSED s32 D_8012A024;
Vertex D_8012A028[2][4]; // stores values of gWaveVertices to be used in func_800BA8E4
s32 D_8012A078; // controls whether 2 or 4 items are used in gWaveVertices / gWaveTriangles
s32 gWavePlayerCount; // controls whether 2 or 4 items are used in gWaveVertices / gWaveTriangles
TriangleBatchInfo *gWaveBatch;
TextureHeader *gWaveTexture;
s32 D_8012A084; // u value for D_800E3048
@@ -158,7 +158,7 @@ void wave_init(void) {
}
temp = (D_80129FC8.unk0 + 1);
allocSize = (temp * 250 * (D_80129FC8.unk0 + 1));
if (D_8012A078 != 2) {
if (gWavePlayerCount != 2) {
gWaveVertices[0][0] = (Vertex *) mempool_alloc_safe(allocSize << 1, COLOUR_TAG_CYAN);
gWaveVertices[1][0] = (Vertex *) (((u32) gWaveVertices[0][0]) + allocSize);
} else {
@@ -168,7 +168,7 @@ void wave_init(void) {
gWaveVertices[3][0] = (Vertex *) (((u32) gWaveVertices[2][0]) + allocSize);
}
allocSize = (D_80129FC8.unk0 * 32) * D_80129FC8.unk0;
if (D_8012A078 != 2) {
if (gWavePlayerCount != 2) {
gWaveTriangles[0][0] = mempool_alloc_safe(allocSize << 1, COLOUR_TAG_CYAN);
gWaveTriangles[1][0] = (Triangle *) (((u32) gWaveTriangles[0][0]) + allocSize);
} else {
@@ -181,7 +181,7 @@ void wave_init(void) {
}
void func_800B8134(LevelHeader *header) {
if (D_8012A078 != 2) {
if (gWavePlayerCount != 2) {
D_80129FC8.unk0 = header->unk56;
} else {
D_80129FC8.unk0 = 4;
@@ -194,7 +194,7 @@ void func_800B8134(LevelHeader *header) {
D_80129FC8.unk18 = header->unk5E / 256.0f;
D_80129FC8.unk1C = header->unk5D << 8;
D_80129FC8.unk20 = header->unk60 & ~1;
if (D_8012A078 != 2) {
if (gWavePlayerCount != 2) {
D_80129FC8.unk24 = header->unk6E;
} else {
D_80129FC8.unk24 = 3;
@@ -211,7 +211,7 @@ void func_800B8134(LevelHeader *header) {
D_80129FC8.darkVertexColours = header->darkVertexColours;
}
void func_800B82B4(LevelModel *model, LevelHeader *header, s32 arg2) {
void func_800B82B4(LevelModel *model, LevelHeader *header, s32 playerCount) {
s32 k;
s32 var_fp;
s32 j_2;
@@ -229,7 +229,7 @@ void func_800B82B4(LevelModel *model, LevelHeader *header, s32 arg2) {
s32 var_a1;
s32 var_t2;
D_8012A078 = arg2;
gWavePlayerCount = playerCount;
func_800B8134(header);
wave_init();
func_800BBDDC(model, header);
@@ -278,16 +278,16 @@ void func_800B82B4(LevelModel *model, LevelHeader *header, s32 arg2) {
var_s5 = 0;
i_2 = 0;
load_rng_seed();
if (arg2 != 2) {
arg2 = 2;
if (playerCount != 2) {
playerCount = 2;
} else {
arg2 = 4;
playerCount = 4;
}
for (var_s3 = 0; var_s3 < 25; var_s3++) {
if (0 <= D_80129FC8.unk0) {
do {
for (j_2 = 0; D_80129FC8.unk0 >= j_2; j_2++) {
for (k = 0; k < arg2; k++) {
for (k = 0; k < playerCount; k++) {
gWaveVertices[0][k][var_s5].x = (j_2 * D_8012A0B8) + 0.5;
gWaveVertices[0][k][var_s5].z = (i_2 * D_8012A0BC) + 0.5;
// this is only 0 for hot top volcano
@@ -313,7 +313,7 @@ void func_800B82B4(LevelModel *model, LevelHeader *header, s32 arg2) {
var_s5 = 0;
for (i_2 = 0; i_2 < D_80129FC8.unk0; i_2++) {
for (j_2 = 0; j_2 < D_80129FC8.unk0; j_2++) {
for (k = 0; k < arg2; k++) {
for (k = 0; k < playerCount; k++) {
gWaveTriangles[0][k][var_s5].flags = BACKFACE_DRAW;
gWaveTriangles[0][k][var_s5].vi0 = j_2;
gWaveTriangles[0][k][var_s5].vi1 = (j_2 + D_80129FC8.unk0) + 1;
@@ -377,7 +377,7 @@ void func_800B82B4(LevelModel *model, LevelHeader *header, s32 arg2) {
D_800E3188 = 0;
gWavePowerDivisor = 0;
gWaveGeneratorObj = NULL;
D_8012A018 = 0;
gWaveVertexFlip = 0;
}
void func_800B8B8C(void) {
@@ -580,7 +580,7 @@ void func_800B92F4(s32 arg0, s32 arg1) {
}
sp84 = D_8012A5E8[k].unk6;
vertices = &gWaveVertices[D_8012A018 + arg1][0][sp90 * sp98];
vertices = &gWaveVertices[gWaveVertexFlip + arg1][0][sp90 * sp98];
sp98 = D_800E30E4[sp98];
vertexIdx = 0;
for (i = 0; i <= D_80129FC8.unk0; i++) {
@@ -679,7 +679,7 @@ void func_800B97A8(s32 arg0, s32 arg1) {
}
var_a0 = D_8012A5E8[k].unk6;
vertices = &gWaveVertices[D_8012A018 + arg1][0][spA0 * spA8];
vertices = &gWaveVertices[gWaveVertexFlip + arg1][0][spA0 * spA8];
spA8 = D_800E30E4[spA8];
for (i = 0, vertexIdx = 0; i <= D_80129FC8.unk0; i++) {
var_s1 = D_8012A5E8[k].unk4;
@@ -737,7 +737,7 @@ void func_800B9C18(s32 arg0) {
s32 j_2;
s32 i_2;
D_8012A018 = 1 - D_8012A018;
gWaveVertexFlip = 1 - gWaveVertexFlip;
for (i_2 = 0, j_2 = 0; i_2 < D_80129FC8.unk4; i_2++) {
for (k_2 = 0; k_2 < D_80129FC8.unk4; k_2++) {
D_800E3044[j_2].s[0] += arg0;
@@ -775,7 +775,7 @@ void func_800B9C18(s32 arg0) {
var_a2 += D_8012A090;
}
if (D_8012A078 != 2) {
if (gWavePlayerCount != 2) {
var_t2 = 1;
} else {
var_t2 = 2;
@@ -787,18 +787,18 @@ void func_800B9C18(s32 arg0) {
for (i = 0; i < D_80129FC8.unk0; i++) {
for (j = 0; j < D_80129FC8.unk0; j++) {
for (k = 0; k < var_t2; k++) {
gWaveTriangles[D_8012A018][k << 1][var_s0].uv0.u = D_800E3048[var_t5].u;
gWaveTriangles[D_8012A018][k << 1][var_s0].uv0.v = D_800E3048[var_t5 + 1].v;
gWaveTriangles[D_8012A018][k << 1][var_s0].uv1.u = D_800E3048[var_ra].u;
gWaveTriangles[D_8012A018][k << 1][var_s0].uv1.v = D_800E3048[var_ra].v;
gWaveTriangles[D_8012A018][k << 1][var_s0].uv2.u = D_800E3048[var_t5 + 1].u;
gWaveTriangles[D_8012A018][k << 1][var_s0].uv2.v = D_800E3048[var_t5 + 1].v;
gWaveTriangles[D_8012A018][k << 1][var_s0 + 1].uv0.u = D_800E3048[var_t5 + 1].u;
gWaveTriangles[D_8012A018][k << 1][var_s0 + 1].uv0.v = D_800E3048[var_t5 + 1].v;
gWaveTriangles[D_8012A018][k << 1][var_s0 + 1].uv1.u = D_800E3048[var_ra].u;
gWaveTriangles[D_8012A018][k << 1][var_s0 + 1].uv1.v = D_800E3048[var_ra + 1].v;
gWaveTriangles[D_8012A018][k << 1][var_s0 + 1].uv2.u = D_800E3048[var_ra + 1].u;
gWaveTriangles[D_8012A018][k << 1][var_s0 + 1].uv2.v = D_800E3048[var_ra + 1].v;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0].uv0.u = D_800E3048[var_t5].u;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0].uv0.v = D_800E3048[var_t5 + 1].v;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0].uv1.u = D_800E3048[var_ra].u;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0].uv1.v = D_800E3048[var_ra].v;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0].uv2.u = D_800E3048[var_t5 + 1].u;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0].uv2.v = D_800E3048[var_t5 + 1].v;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0 + 1].uv0.u = D_800E3048[var_t5 + 1].u;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0 + 1].uv0.v = D_800E3048[var_t5 + 1].v;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0 + 1].uv1.u = D_800E3048[var_ra].u;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0 + 1].uv1.v = D_800E3048[var_ra + 1].v;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0 + 1].uv2.u = D_800E3048[var_ra + 1].u;
gWaveTriangles[gWaveVertexFlip][k << 1][var_s0 + 1].uv2.v = D_800E3048[var_ra + 1].v;
}
var_t5++;
var_ra++;
@@ -808,18 +808,18 @@ void func_800B9C18(s32 arg0) {
var_ra++;
}
D_800E3090[2 * D_8012A018].uv0.u = D_800E3048[0].u;
D_800E3090[2 * D_8012A018].uv0.v = D_800E3048[0].v;
D_800E3090[2 * D_8012A018].uv1.u = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].u;
D_800E3090[2 * D_8012A018].uv1.v = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].v;
D_800E3090[2 * D_8012A018].uv2.u = D_800E3048[D_80129FC8.unk0].u;
D_800E3090[2 * D_8012A018].uv2.v = D_800E3048[D_80129FC8.unk0].v;
D_800E3090[2 * D_8012A018 + 1].uv0.u = D_800E3048[D_80129FC8.unk0].u;
D_800E3090[2 * D_8012A018 + 1].uv0.v = D_800E3048[D_80129FC8.unk0].v;
D_800E3090[2 * D_8012A018 + 1].uv1.u = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].u;
D_800E3090[2 * D_8012A018 + 1].uv1.v = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].v;
D_800E3090[2 * D_8012A018 + 1].uv2.u = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1) + D_80129FC8.unk0].u;
D_800E3090[2 * D_8012A018 + 1].uv2.v = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1) + D_80129FC8.unk0].v;
D_800E3090[2 * gWaveVertexFlip].uv0.u = D_800E3048[0].u;
D_800E3090[2 * gWaveVertexFlip].uv0.v = D_800E3048[0].v;
D_800E3090[2 * gWaveVertexFlip].uv1.u = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].u;
D_800E3090[2 * gWaveVertexFlip].uv1.v = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].v;
D_800E3090[2 * gWaveVertexFlip].uv2.u = D_800E3048[D_80129FC8.unk0].u;
D_800E3090[2 * gWaveVertexFlip].uv2.v = D_800E3048[D_80129FC8.unk0].v;
D_800E3090[2 * gWaveVertexFlip + 1].uv0.u = D_800E3048[D_80129FC8.unk0].u;
D_800E3090[2 * gWaveVertexFlip + 1].uv0.v = D_800E3048[D_80129FC8.unk0].v;
D_800E3090[2 * gWaveVertexFlip + 1].uv1.u = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].u;
D_800E3090[2 * gWaveVertexFlip + 1].uv1.v = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1)].v;
D_800E3090[2 * gWaveVertexFlip + 1].uv2.u = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1) + D_80129FC8.unk0].u;
D_800E3090[2 * gWaveVertexFlip + 1].uv2.v = D_800E3048[D_80129FC8.unk0 * (D_80129FC8.unk0 + 1) + D_80129FC8.unk0].v;
if (D_800E3188 > 0) {
func_800BFE98(arg0);
@@ -880,7 +880,11 @@ void func_800BA288(s32 arg0, s32 arg1) {
}
}
void func_800BA4B8(TextureHeader *tex, s32 rtile) {
/**
* Loads a texture into texture memory.
* Can offset the texture address in bytes, since waves use multi-texturing.
*/
void wave_load_material(TextureHeader *tex, s32 rtile) {
s32 txmask;
s32 tmem;
u32 texWidth;
@@ -907,7 +911,7 @@ void func_800BA4B8(TextureHeader *tex, s32 rtile) {
}
// difference is G_IM_SIZ_32b vs G_IM_SIZ_16b
if ((tex->format & 0xF) == TEX_FORMAT_RGBA32) {
if (TEX_FORMAT(tex->format) == TEX_FORMAT_RGBA32) {
gDPLoadMultiBlock(gWaveDL++, OS_PHYSICAL_TO_K0(tex + 1), tmem, rtile, G_IM_FMT_RGBA, G_IM_SIZ_32b, texWidth,
texWidth, 0, 0, 0, txmask, txmask, 0, 0);
} else {
@@ -916,7 +920,7 @@ void func_800BA4B8(TextureHeader *tex, s32 rtile) {
}
}
void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 viewportID) {
s32 sp11C;
Vertex *vtx;
Triangle *tri;
@@ -932,10 +936,10 @@ void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
TextureHeader *tex1;
TextureHeader *tex2;
if ((arg2 != 1) || (D_8012A078 != 2)) {
arg2 = 0;
if (viewportID != 1 || gWavePlayerCount != 2) {
viewportID = 0;
} else {
arg2 = 2;
viewportID = 2;
}
if (D_800E30DC > 0) {
@@ -948,10 +952,10 @@ void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
gSPClearGeometryMode(gWaveDL++, G_FOG);
tex1 = set_animated_texture_header(gWaveTextureHeader, D_8012A09C << 8);
tex2 = set_animated_texture_header(gWaveTexture, gWaveBatch->unk7 << 14);
func_800BA4B8(tex1, 1);
func_800BA4B8(tex2, 0);
wave_load_material(tex1, 1);
wave_load_material(tex2, 0);
gDPSetCombineMode(gWaveDL++, DKR_CC_UNK14, DKR_CC_UNK15);
if ((tex1->format & 0xF) == TEX_FORMAT_RGBA32 && get_viewport_count() <= 0) {
if (TEX_FORMAT(tex1->format) == TEX_FORMAT_RGBA32 && get_viewport_count() <= VIEWPORTS_COUNT_1_PLAYER) {
gDPSetOtherMode(gWaveDL++, DKR_OMH_2CYC_BILERP, DKR_OML_COMMON | G_RM_AA_ZB_XLU_INTER2);
} else {
gDPSetOtherMode(gWaveDL++, DKR_OMH_2CYC_BILERP, DKR_OML_COMMON | G_RM_AA_ZB_OPA_SURF2);
@@ -984,9 +988,9 @@ void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
spE4.rotation.x = spE4.rotation.y = spE4.rotation.z = 0;
for (; i < D_800E30DC; i++) {
if (D_80129FC8.darkVertexColours) {
func_800B92F4(D_8012A1E8[i], arg2);
func_800B92F4(D_8012A1E8[i], viewportID);
} else {
func_800B97A8(D_8012A1E8[i], arg2);
func_800B97A8(D_8012A1E8[i], viewportID);
}
spE0 = &D_800E30D8[D_8012A1E8[i]];
spE4.x_position = spE0->unk4;
@@ -1003,8 +1007,8 @@ void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
numVerts = D_80129FC8.unk0 + 1;
var_t0 = ((sp104 & 0xFF) - 1) * numVerts * numVerts;
for (j = 0; j < D_80129FC8.unk0; j++) {
vtx = &gWaveVertices[D_8012A018 + arg2][0][var_t0];
tri = &gWaveTriangles[D_8012A018 + arg2][0][j * (D_80129FC8.unk0 << 1)];
vtx = &gWaveVertices[gWaveVertexFlip + viewportID][0][var_t0];
tri = &gWaveTriangles[gWaveVertexFlip + viewportID][0][j * (D_80129FC8.unk0 << 1)];
gSPVertexDKR(gWaveDL++, OS_K0_TO_PHYSICAL(vtx), numVerts << 1, 0);
gSPPolygon(gWaveDL++, OS_K0_TO_PHYSICAL(tri), numTris, TRIN_ENABLE_TEXTURE);
@@ -1012,8 +1016,8 @@ void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
var_t0 += D_80129FC8.unk0 + 1;
}
} else {
gSPVertexDKR(gWaveDL++, OS_K0_TO_PHYSICAL(&D_8012A028[D_8012A018]), 4, 0);
gSPPolygon(gWaveDL++, OS_K0_TO_PHYSICAL(&D_800E3090[D_8012A018 << 1]), 2,
gSPVertexDKR(gWaveDL++, OS_K0_TO_PHYSICAL(&D_8012A028[gWaveVertexFlip]), 4, 0);
gSPPolygon(gWaveDL++, OS_K0_TO_PHYSICAL(&D_800E3090[gWaveVertexFlip << 1]), 2,
TRIN_ENABLE_TEXTURE);
}
apply_matrix_from_stack(&gWaveDL);
@@ -1028,8 +1032,8 @@ void func_800BA8E4(Gfx **dList, MatrixS **mtx, s32 arg2) {
numVerts = D_80129FC8.unk0 + 1;
var_t0 = ((sp104 & 0xFF) - 1) * numVerts * numVerts;
for (j = 0; j < D_80129FC8.unk0; j++) {
vtx = &gWaveVertices[D_8012A018 + arg2][0][var_t0];
tri = &gWaveTriangles[D_8012A018 + arg2][0][j * (D_80129FC8.unk0 << 1)];
vtx = &gWaveVertices[gWaveVertexFlip + viewportID][0][var_t0];
tri = &gWaveTriangles[gWaveVertexFlip + viewportID][0][j * (D_80129FC8.unk0 << 1)];
gSPVertexDKR(gWaveDL++, OS_K0_TO_PHYSICAL(vtx), numVerts << 1, 0);
gSPPolygon(gWaveDL++, OS_K0_TO_PHYSICAL(tri), numTris, TRIN_ENABLE_TEXTURE);
+1 -1
View File
@@ -143,7 +143,7 @@ void func_800BA288(s32 arg0, s32 arg1);
void func_800BF9F8(unk800BF9F8 *arg0, f32 arg1, f32 arg2);
unk800E3190 *func_800BF634(Object *obj, f32 xPos, f32 zPos, f32 arg3, s32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 arg8);
void wave_init(void);
void func_800BA4B8(TextureHeader *tex, s32 rtile);
void wave_load_material(TextureHeader *tex, s32 rtile);
Object_64 *func_800BE654(s32, f32, f32);
void func_800BBF78(LevelModel *model); // Non Matching
+9 -6
View File
@@ -71,10 +71,10 @@ Object *gLensFlare = NULL;
s32 gLensFlareOff = TRUE;
s32 gLensFlareOverrideObjs = 0;
Vec2f gRainQuad[4] = {
{ -200.0f, 200.0f },
{ 200.0f, 200.0f },
{ 200.0f, -200.0f },
{ -200.0f, -200.0f },
{ { { -200.0f, 200.0f } } },
{ { { 200.0f, 200.0f } } },
{ { { 200.0f, -200.0f } } },
{ { { -200.0f, -200.0f } } },
};
Vertex gRainVertices[16] = {
@@ -895,7 +895,7 @@ void rain_update(s32 updateRate) {
if (gLightningFrequency > 255) {
set_ortho_matrix_view(&gCurrWeatherDisplayList, &gCurrWeatherMatrix);
for (i = 0; i < 2; i++) {
render_rain_overlay(&gRainGfx[i], updateRate);
rain_render(&gRainGfx[i], updateRate);
}
gDPSetPrimColor(gCurrWeatherDisplayList++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(gCurrWeatherDisplayList++, 255, 255, 255, 0);
@@ -1072,7 +1072,10 @@ void rain_sound(UNUSED s32 updateRate) {
}
}
void render_rain_overlay(RainGfxData *rainGfx, s32 time) {
/**
* Set the intended UV coordinates for the current rain plane, then render it onscreen.
*/
void rain_render(RainGfxData *rainGfx, s32 time) {
s32 u0;
s32 v0;
s32 vertical;
+1 -1
View File
@@ -110,7 +110,7 @@ void rain_update(s32 updateRate);
void rain_sound(s32 updateRate);
void rain_render_splashes(s32 updateRate);
void rain_lightning(s32 updateRate);
void render_rain_overlay(RainGfxData*, s32);
void rain_render(RainGfxData*, s32);
void weather_update(Gfx **currDisplayList, MatrixS **currHudMat, Vertex **currHudVerts, Triangle **currHudTris, s32 updateRate);
void snow_render(void);
void weather_free(void);
+2 -1
View File
@@ -357,7 +357,8 @@ segments:
- [0xEAEA0, .rodata, weather]
- [0xEAEF0, .rodata, particles]
- [0xEB2B0, .rodata, printf]
- [0xEB520, .rodata, thread0_epc]
- [0xEB520, .rodata, ../libultra/src/debug/assert]
- [0xEB580, .rodata, thread0_epc]
- [0xEB810, .rodata, waves]
- [0xEB980, .rodata, fade_transition]
- [0xEB9E0, .rodata, game_text]

Some files were not shown because too many files have changed in this diff Show More