Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/code_800029B0.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ s32 D_800DC5AC = 0;
u16 D_800DC5B0 = 1;
u16 D_800DC5B4 = 0;
u16 D_800DC5B8 = 0;
u16 D_800DC5BC = 0;
u16 bFog = 0;
u16 gIsInQuitToMenuTransition = 0;
u16 gQuitToMenuTransitionCounter = 0;
u16 D_800DC5C8 = 0;
Expand Down Expand Up @@ -153,9 +153,9 @@ UNUSED u8 D_80162578[sizeof(struct Actor)];

s16 gDebugPathCount;
s16 sIsController1Unplugged;
s32 D_801625EC;
s32 D_801625F0;
s32 D_801625F4;
s32 gFogRed;
s32 gFogBlue;
s32 gFogGreen;
s32 D_801625F8;
f32 D_801625FC;

Expand Down Expand Up @@ -299,7 +299,7 @@ void func_80003040(void) {
Vec3f velocity = { 0, 0, 0 };
Vec3s rotation = { 0, 0, 0 };

D_800DC5BC = 0;
bFog = 0;
D_800DC5C8 = 0;
gNumActors = 0;
gIsMirrorMode = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/code_800029B0.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern s32 D_800DC5AC;
extern u16 D_800DC5B0;
extern u16 D_800DC5B4;
extern u16 D_800DC5B8;
extern u16 D_800DC5BC;
extern u16 bFog;
extern u16 gIsInQuitToMenuTransition;
extern u16 gQuitToMenuTransitionCounter;
extern u16 D_800DC5C8;
Expand Down Expand Up @@ -137,9 +137,9 @@ extern u16 gNumPermanentActors;
extern UNUSED u8 D_80162578[];
extern s16 gDebugPathCount;
extern s16 sIsController1Unplugged;
extern s32 D_801625EC;
extern s32 D_801625F0;
extern s32 D_801625F4;
extern s32 gFogRed;
extern s32 gFogBlue;
extern s32 gFogGreen;
extern s32 D_801625F8;
extern f32 D_801625FC;

Expand Down
2 changes: 1 addition & 1 deletion src/ending/code_80280000.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void load_credits(void) {
D_8015F5A0 = 0;
D_8015F58C = 0;
gCollisionMeshCount = 0;
D_800DC5BC = 0;
bFog = 0;
D_800DC5C8 = 0;
gCollisionMesh = (CollisionTriangle*) gNextFreeMemoryAddress;
camera->pos[0] = 1400.0f;
Expand Down
2 changes: 1 addition & 1 deletion src/ending/code_80281780.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void load_ceremony_cutscene(void) {
D_8015F5A0 = 0;
D_8015F58C = 0;
gCollisionMeshCount = (u16) 0;
D_800DC5BC = (u16) 0;
bFog = (u16) 0;
D_800DC5C8 = (u16) 0;
gCollisionMesh = (CollisionTriangle*) gNextFreeMemoryAddress;
//! @bug these segmented addresses need to be symbols for mobility
Expand Down
8 changes: 4 additions & 4 deletions src/racing/actors.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,16 @@ void func_80297340(Camera* arg0) {
}

if (temp < arg0->pos[2]) {
if (D_800DC5BC != 0) {
if (bFog != 0) {

gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gDPSetFogColor(gDisplayListHead++, gFogRed, gFogGreen, gFogBlue, 0xFF);
gSPDisplayList(gDisplayListHead++, &D_0D001C20);
} else {
gSPDisplayList(gDisplayListHead++, &D_0D001B90);
}
} else if (D_800DC5BC != 0) {
} else if (bFog != 0) {

gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gDPSetFogColor(gDisplayListHead++, gFogRed, gFogGreen, gFogBlue, 0xFF);
gSPDisplayList(gDisplayListHead++, &D_0D001C88);
} else {
gSPDisplayList(gDisplayListHead++, &D_0D001BD8);
Expand Down
48 changes: 24 additions & 24 deletions src/racing/render_courses.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "courses/all_course_packed.h"
#include "courses/all_course_offsets.h"

s16 D_802B87B0 = 995;
s16 D_802B87B4 = 1000;
s16 gFogMin = 995;
s16 gFogMax = 1000;
UNUSED s32 D_802B87B8 = 0;
s32 D_802B87BC = 0;
UNUSED s32 D_802B87C0 = 0;
Expand Down Expand Up @@ -648,8 +648,8 @@ void render_choco_mountain(struct UnkStruct_800DC5EC* arg0) {
gSPDisplayList(gDisplayListHead++, ((uintptr_t) 0x07004608));
}
gDPSetCycleType(gDisplayListHead++, G_CYC_2CYCLE);
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
gDPSetFogColor(gDisplayListHead++, gFogRed, gFogGreen, gFogBlue, 0xFF);
gSPFogPosition(gDisplayListHead++, gFogMin, gFogMax);

gDPPipeSync(gDisplayListHead++);
gSPSetGeometryMode(gDisplayListHead++, G_FOG);
Expand Down Expand Up @@ -724,7 +724,7 @@ void render_banshee_boardwalk(struct UnkStruct_800DC5EC* arg0) {
// d_course_banshee_boardwalk_packed_dl_7228
gSPDisplayList(gDisplayListHead++, ((uintptr_t) 0x07007228));

gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
gSPFogPosition(gDisplayListHead++, gFogMin, gFogMax);

gDPPipeSync(gDisplayListHead++);

Expand Down Expand Up @@ -957,7 +957,7 @@ void render_moo_moo_farm(struct UnkStruct_800DC5EC* arg0) {
gSPDisplayList(gDisplayListHead++, ((uintptr_t) 0x07004DF8));
// d_course_moo_moo_farm_packed_dl_5640
gSPDisplayList(gDisplayListHead++, ((uintptr_t) 0x07005640));
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
gSPFogPosition(gDisplayListHead++, gFogMin, gFogMax);

render_course_segments((uintptr_t) moo_moo_farm_dls, arg0);

Expand Down Expand Up @@ -1016,9 +1016,9 @@ void render_toads_turnpike(struct UnkStruct_800DC5EC* arg0) {
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gDPSetFogColor(gDisplayListHead++, gFogRed, gFogGreen, gFogBlue, 0xFF);
gDPSetCycleType(gDisplayListHead++, G_CYC_2CYCLE);
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
gSPFogPosition(gDisplayListHead++, gFogMin, gFogMax);
gSPSetGeometryMode(gDisplayListHead++, G_FOG);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_PASS2);
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2);
Expand Down Expand Up @@ -1465,7 +1465,7 @@ void course_generate_collision_mesh(void) {
D_8015F58C = 0;
gCollisionMeshCount = 0;
gCollisionMesh = (CollisionTriangle*) gNextFreeMemoryAddress;
D_800DC5BC = 0;
bFog = 0;
D_800DC5C8 = 0;
#if !ENABLE_CUSTOM_COURSE_ENGINE
switch (gCurrentCourseId) {
Expand All @@ -1484,12 +1484,12 @@ void course_generate_collision_mesh(void) {
D_8015F8E4 = gCourseMinY - 10.0f;
break;
case COURSE_CHOCO_MOUNTAIN:
D_800DC5BC = 1;
D_801625EC = 255;
D_801625F4 = 255;
D_801625F0 = 255;
D_802B87B0 = 0x3E3;
D_802B87B4 = 0x3E8;
bFog = 1;
gFogRed = 255;
gFogGreen = 255;
gFogBlue = 255;
gFogMin = 0x3E3;
gFogMax = 0x3E8;
D_802B87D4 = 0x71C;
D_802B87D0 = 0xE38;

Expand Down Expand Up @@ -1522,10 +1522,10 @@ void course_generate_collision_mesh(void) {
D_8015F8E4 = -50.0f;
break;
case COURSE_BANSHEE_BOARDWALK:
D_800DC5BC = 1;
D_801625EC = 0;
D_801625F4 = 0;
D_801625F0 = 0;
bFog = 1;
gFogRed = 0;
gFogGreen = 0;
gFogBlue = 0;
parse_course_displaylists((uintptr_t) d_course_banshee_boardwalk_track_sections);
func_80295C6C();
// d_course_banshee_boardwalk_packed_dl_878
Expand Down Expand Up @@ -1571,11 +1571,11 @@ void course_generate_collision_mesh(void) {
D_8015F8E4 = gCourseMinY - 10.0f;
break;
case COURSE_TOADS_TURNPIKE:
D_801625EC = 43;
D_801625F4 = 13;
D_801625F0 = 4;
D_802B87B0 = 993;
D_802B87B4 = 1000;
gFogRed = 43;
gFogGreen = 13;
gFogBlue = 4;
gFogMin = 993;
gFogMax = 1000;
parse_course_displaylists((uintptr_t) d_course_toads_turnpike_addr);
func_80295C6C();
D_8015F8E4 = gCourseMinY - 10.0f;
Expand Down
32 changes: 16 additions & 16 deletions src/racing/skybox_and_splitscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,37 +371,37 @@ struct Skybox sBottomSkyBoxColors[] = {
void course_set_skybox_colours(Vtx* skybox) {
s32 i;

if (D_800DC5BC != 0) {
if (bFog != 0) {

if (D_801625EC < 0) {
D_801625EC = 0;
if (gFogRed < 0) {
gFogRed = 0;
}

if (D_801625F4 < 0) {
D_801625F4 = 0;
if (gFogGreen < 0) {
gFogGreen = 0;
}

if (D_801625F0 < 0) {
D_801625F0 = 0;
if (gFogBlue < 0) {
gFogBlue = 0;
}

if (D_801625EC > 255) {
D_801625EC = 255;
if (gFogRed > 255) {
gFogRed = 255;
}

if (D_801625F4 > 255) {
D_801625F4 = 255;
if (gFogGreen > 255) {
gFogGreen = 255;
}

if (D_801625F0 > 255) {
D_801625F0 = 255;
if (gFogBlue > 255) {
gFogBlue = 255;
}

for (i = 0; i < 8; i++) {

skybox[i].v.cn[0] = (s16) D_801625EC;
skybox[i].v.cn[1] = (s16) D_801625F4;
skybox[i].v.cn[2] = (s16) D_801625F0;
skybox[i].v.cn[0] = (s16) gFogRed;
skybox[i].v.cn[1] = (s16) gFogGreen;
skybox[i].v.cn[2] = (s16) gFogBlue;
}
return;
}
Expand Down
Loading