Decompile radarSetYIndicatorsEnabled

This commit is contained in:
Ryan Dwyer 2021-01-03 00:05:30 +10:00
parent 54431b05a4
commit 6819bdb801
2 changed files with 10 additions and 12 deletions

View File

@ -84,7 +84,7 @@ struct mppreset g_MpPresets[NUM_MPPRESETS] = {
};
u32 var80087cbc = 0x00000000;
u32 var80087cc0 = 0x00000001;
bool g_RadarYIndicatorsEnabled = true;
// 2dce4
u32 g_TeamColours[] = {

View File

@ -23,14 +23,12 @@
#include "lib/lib_4a360.h"
#include "types.h"
extern u32 var80087cc0;
extern bool g_RadarYIndicatorsEnabled;
GLOBAL_ASM(
glabel func0f18e5a0
/* f18e5a0: 3c018008 */ lui $at,%hi(var80087cc0)
/* f18e5a4: 03e00008 */ jr $ra
/* f18e5a8: ac247cc0 */ sw $a0,%lo(var80087cc0)($at)
);
void radarSetYIndicatorsEnabled(bool enable)
{
g_RadarYIndicatorsEnabled = enable;
}
Gfx *func0f18e5ac(Gfx *gdl, struct textureconfig *tconfig, s32 arg2, s32 arg3, s32 arg4)
{
@ -139,7 +137,7 @@ Gfx *radarDrawDot(Gfx *gdl, struct prop *prop, struct coord *dist, u32 colour1,
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
gdl = func0f153838(gdl);
} else if (var80087cc0 && dist->y > 250) {
} else if (g_RadarYIndicatorsEnabled && dist->y > 250) {
// Up triangle
gdl = gfxSetPrimColour(gdl, (0xff >> shiftamount) + colour1);
gDPFillRectangleScaled(gdl++, x - 3, y - 1, x + 2, y + 2);
@ -150,7 +148,7 @@ Gfx *radarDrawDot(Gfx *gdl, struct prop *prop, struct coord *dist, u32 colour1,
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
gdl = func0f153838(gdl);
} else if (var80087cc0 && dist->y < -250) {
} else if (g_RadarYIndicatorsEnabled && dist->y < -250) {
// Down triangle
gdl = gfxSetPrimColour(gdl, (0xff >> shiftamount) + colour1);
gDPFillRectangleScaled(gdl++, x - 3, y - 2, x + 2, y + 1);
@ -185,7 +183,7 @@ Gfx *radarDrawDot(Gfx *gdl, struct prop *prop, struct coord *dist, u32 colour1,
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
gdl = func0f153838(gdl);
} else if (var80087cc0 && dist->y > 250) {
} else if (g_RadarYIndicatorsEnabled && dist->y > 250) {
// Up triangle
gdl = gfxSetPrimColour(gdl, (0xff >> shiftamount) + colour2);
gDPFillRectangleScaled(gdl++, x - 3, y - 1, x + 2, y + 2);
@ -196,7 +194,7 @@ Gfx *radarDrawDot(Gfx *gdl, struct prop *prop, struct coord *dist, u32 colour1,
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
gdl = func0f153838(gdl);
} else if (var80087cc0 && dist->y < -250) {
} else if (g_RadarYIndicatorsEnabled && dist->y < -250) {
// Down triangle
gdl = gfxSetPrimColour(gdl, (0xff >> shiftamount) + colour2);
gDPFillRectangleScaled(gdl++, x - 3, y - 2, x + 2, y + 1);