mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-09 21:41:28 -04:00
Remove mainOverrideVariable
This commit is contained in:
+6
-13
@@ -1114,12 +1114,12 @@ u8 var800719a0[][3] = { {0, 1, 2}, {3, 4, 5}, {6, 7, 8} };
|
||||
|
||||
Gfx *amRenderSlot(Gfx *gdl, char *text, s16 x, s16 y, s32 mode, s32 flags)
|
||||
{
|
||||
static u32 obcol = 0xff00004f; // outer border
|
||||
static u32 ibcol = VERSION >= VERSION_NTSC_1_0 ? 0x3f00008f : 0x3f00006f; // inner background
|
||||
static u32 defcol = 0xff4f00ff; // text
|
||||
static u32 favcol = 0xffff7fff; // unused
|
||||
static u32 pickcol = 0xff4f00ff; // unused
|
||||
static u32 pickcol2 = 0xff4f00ff; // unused
|
||||
u32 obcol = 0xff00004f; // outer border
|
||||
u32 ibcol = VERSION >= VERSION_NTSC_1_0 ? 0x3f00008f : 0x3f00006f; // inner background
|
||||
u32 defcol = 0xff4f00ff; // text
|
||||
u32 favcol = 0xffff7fff; // unused
|
||||
u32 pickcol = 0xff4f00ff; // unused
|
||||
u32 pickcol2 = 0xff4f00ff; // unused
|
||||
|
||||
u32 colour;
|
||||
s32 paddingtop;
|
||||
@@ -1142,13 +1142,6 @@ Gfx *amRenderSlot(Gfx *gdl, char *text, s16 x, s16 y, s32 mode, s32 flags)
|
||||
return gdl;
|
||||
}
|
||||
|
||||
mainOverrideVariable("obcol", &obcol);
|
||||
mainOverrideVariable("ibcol", &ibcol);
|
||||
mainOverrideVariable("defcol", &defcol);
|
||||
mainOverrideVariable("favcol", &favcol);
|
||||
mainOverrideVariable("pickcol", &pickcol);
|
||||
mainOverrideVariable("pickcol2", &pickcol2);
|
||||
|
||||
// Render background colour
|
||||
colour = (u32)(g_AmMenus[g_AmIndex].alphafrac * (ibcol & 0xff)) | (ibcol & 0xffffff00);
|
||||
|
||||
|
||||
@@ -7905,8 +7905,6 @@ void bgTickPortalsXray(void)
|
||||
s32 i;
|
||||
struct var800a4640 *thing;
|
||||
|
||||
static u32 edist = 400;
|
||||
|
||||
currentPlayerCalculateScreenProperties();
|
||||
|
||||
if (var800a4640.unk000);
|
||||
@@ -7936,8 +7934,6 @@ void bgTickPortalsXray(void)
|
||||
player->eraserpos.f[1] = eraserpos.f[1];
|
||||
player->eraserpos.f[2] = eraserpos.f[2];
|
||||
|
||||
mainOverrideVariable("edist", &edist);
|
||||
|
||||
stage = stageGetCurrent();
|
||||
|
||||
player->eraserpropdist = stage->eraserpropdist;
|
||||
|
||||
@@ -31,8 +31,6 @@ u8 g_EyespyPrevHit = EYESPYHIT_NONE;
|
||||
u8 var80070ecc = 0;
|
||||
f32 g_EyespyMaxHeight = 160;
|
||||
f32 g_EyespyMinHeight = 80;
|
||||
u32 g_EyespyFallAccel = 100;
|
||||
u32 g_EyespyMaxFallSpeed = 3000;
|
||||
|
||||
/**
|
||||
* Determines the eyespy's ground Y value by doing a collision check for a
|
||||
@@ -453,11 +451,8 @@ void eyespyUpdateVertical(void)
|
||||
}
|
||||
|
||||
// Handle gravity
|
||||
mainOverrideVariable("g", &g_EyespyFallAccel);
|
||||
mainOverrideVariable("l", &g_EyespyMaxFallSpeed);
|
||||
|
||||
accel = g_EyespyFallAccel * 0.01; // always 1
|
||||
maxfallspeed = g_EyespyMaxFallSpeed * 0.01f; // always 30
|
||||
accel = 100 * 0.01; // always 1
|
||||
maxfallspeed = 3000 * 0.01f; // always 30
|
||||
|
||||
newy = chr->manground;
|
||||
newground = eyespyFindGround(NULL);
|
||||
|
||||
@@ -1983,12 +1983,6 @@ void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, s
|
||||
{
|
||||
bool usesammo = true;
|
||||
|
||||
static u32 rontime = 2;
|
||||
static u32 rofftime = 4;
|
||||
|
||||
mainOverrideVariable("rontime", &rontime);
|
||||
mainOverrideVariable("rofftime", &rofftime);
|
||||
|
||||
hand->firing = true;
|
||||
|
||||
if ((func->type & 0xff00) == 0x100) {
|
||||
@@ -2275,8 +2269,6 @@ bool bgun0f09aba4(struct hand *hand, struct handweaponinfo *info, s32 handnum, s
|
||||
|
||||
bool bgunTickIncAttackingShoot(struct handweaponinfo *info, s32 handnum, struct hand *hand)
|
||||
{
|
||||
static u32 var80070128 = 99;
|
||||
|
||||
struct weaponfunc *func = gsetGetWeaponFunction(&hand->gset);
|
||||
bool sp68;
|
||||
s32 sp64;
|
||||
@@ -2289,8 +2281,6 @@ bool bgunTickIncAttackingShoot(struct handweaponinfo *info, s32 handnum, struct
|
||||
if (hand->stateminor == 0) {
|
||||
sp64 = 1;
|
||||
|
||||
mainOverrideVariable("gkef", &var80070128);
|
||||
|
||||
if (hand->statecycles == 0) {
|
||||
hand->gs_float1 = 0;
|
||||
|
||||
|
||||
+3
-31
@@ -42,14 +42,6 @@ u32 var8007f854 = 0x00000000;
|
||||
u32 var8007f858 = 0xb8000000;
|
||||
u32 var8007f85c = 0x00000000;
|
||||
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
void func0f13c2d0nb(void)
|
||||
{
|
||||
mainOverrideVariable("fsrad", (u32 *)&g_IrBinocularRadius);
|
||||
mainOverrideVariable("fscs", (u32 *)&var8007f850);
|
||||
}
|
||||
#endif
|
||||
|
||||
Gfx *bviewDrawIrRect(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2)
|
||||
{
|
||||
gDPFillRectangle(gdl++, x1, y1, x2, y2);
|
||||
@@ -179,12 +171,6 @@ Gfx *bviewDrawFisheyeRect(Gfx *gdl, s32 arg1, f32 arg2, s32 arg3, s32 arg4)
|
||||
|
||||
Gfx *bviewPrepareStaticRgba16(Gfx *gdl, u32 colour, u32 alpha)
|
||||
{
|
||||
static u32 envcol = 0xffffffff;
|
||||
static u32 primcol = 0x7f7f7fff;
|
||||
|
||||
mainOverrideVariable("envcol", &envcol);
|
||||
mainOverrideVariable("primcol", &primcol);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, 5, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
@@ -213,12 +199,6 @@ Gfx *bviewPrepareStaticRgba16(Gfx *gdl, u32 colour, u32 alpha)
|
||||
|
||||
Gfx *bviewPrepareStaticI8(Gfx *gdl, u32 colour, u32 alpha)
|
||||
{
|
||||
static u32 envcol = 0xffffffff;
|
||||
static u32 primcol = 0x7f7f7fff;
|
||||
|
||||
mainOverrideVariable("envcol", &envcol);
|
||||
mainOverrideVariable("primcol", &primcol);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_8b, 0, 0x0000, 5, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
@@ -258,9 +238,6 @@ Gfx *bviewDrawMotionBlur(Gfx *gdl, u32 colour, u32 alpha)
|
||||
s32 newalpha;
|
||||
s32 i;
|
||||
|
||||
static u32 sfyyy = 1000;
|
||||
static u32 sfxxx = 1000;
|
||||
|
||||
if (var8007f848) {
|
||||
return gdl;
|
||||
}
|
||||
@@ -276,19 +253,14 @@ Gfx *bviewDrawMotionBlur(Gfx *gdl, u32 colour, u32 alpha)
|
||||
|
||||
var8007f844 = 0;
|
||||
|
||||
mainOverrideVariable("sfxxx", &sfxxx);
|
||||
fxxx = sfxxx / 1000.0f;
|
||||
mainOverrideVariable("sfyyy", &sfyyy);
|
||||
fyyy = sfyyy / 1000.0f;
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
|
||||
somefloat = (viewheight - viewheight / fyyy) * 0.5f;
|
||||
somefloat = (viewheight - viewheight / 1) * 0.5f;
|
||||
gdl = bviewPrepareStaticRgba16(gdl, colour, newalpha);
|
||||
|
||||
for (i = viewtop; i < viewtop + viewheight; i++) {
|
||||
gdl = bviewCopyPixels(gdl, fb, viewtop + (s32)somefloat, 5, i, fxxx, viewleft, viewwidth);
|
||||
somefloat += 1.0f / fyyy;
|
||||
gdl = bviewCopyPixels(gdl, fb, viewtop + (s32)somefloat, 5, i, 1, viewleft, viewwidth);
|
||||
somefloat += 1.0f;
|
||||
}
|
||||
|
||||
return gdl;
|
||||
|
||||
-3752
File diff suppressed because it is too large
Load Diff
@@ -5222,8 +5222,6 @@ void chr0f028544(void)
|
||||
void chr0f02855c(s32 arg0)
|
||||
{
|
||||
var80062978 = arg0;
|
||||
|
||||
mainOverrideVariable("selectanimnum", &g_SelectedAnimNum);
|
||||
}
|
||||
|
||||
void chrsCheckForNoise(f32 noiseradius)
|
||||
|
||||
@@ -862,12 +862,6 @@ Gfx *creditsDrawParticles(Gfx *gdl)
|
||||
f32 invsine;
|
||||
f32 invcosine;
|
||||
|
||||
static u32 tload = 0x25;
|
||||
static u32 dump = 0;
|
||||
|
||||
mainOverrideVariable("tload", &tload);
|
||||
mainOverrideVariable("dump", &dump);
|
||||
|
||||
colours = gfxAllocateColours(60);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -878,10 +872,6 @@ Gfx *creditsDrawParticles(Gfx *gdl)
|
||||
colour = g_CreditColourPalette[g_CreditsData->particlecolourindex2][i];
|
||||
}
|
||||
|
||||
if (tload == 0x28) {
|
||||
colour = 0xffffffff;
|
||||
}
|
||||
|
||||
for (j = 0; j < 15; j++) {
|
||||
colours[i + j * 4] = (colour & 0xffffff00) | ((colour & 0xff) * (15 - j) / 15);
|
||||
}
|
||||
@@ -1677,8 +1667,6 @@ void credits0f13ae04(Mtxf *mtx)
|
||||
void creditsTick(void)
|
||||
{
|
||||
s32 i;
|
||||
static bool flick = false;
|
||||
static u32 type = 0xffff;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (joyGetButtonsPressedThisFrame(0, 0)) {
|
||||
@@ -1686,21 +1674,6 @@ void creditsTick(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
mainOverrideVariable("for", &type);
|
||||
|
||||
if (type < 0xffff) {
|
||||
for (i = 0; i < ARRAYCOUNT(g_CreditsData->bglayers); i++) {
|
||||
g_CreditsData->bglayers[i].type = type;
|
||||
}
|
||||
}
|
||||
|
||||
mainOverrideVariable("flick", &flick);
|
||||
|
||||
if (flick) {
|
||||
creditsCreatePendingBgLayers(0xffffffff);
|
||||
flick = false;
|
||||
}
|
||||
|
||||
if (g_CreditsCurFrame2 == 0) {
|
||||
if (g_CreditsUsingAltTitle) {
|
||||
musicSetStage(STAGE_CREDITS);
|
||||
|
||||
+4
-10
@@ -117,20 +117,14 @@ void dyntexUpdateOcean(struct gfxvtx *vertices, struct dyntextype *type)
|
||||
f32 angle;
|
||||
s32 i;
|
||||
|
||||
static u32 ripsize = 65;
|
||||
static u32 modula = 22;
|
||||
|
||||
mainOverrideVariable("modula", &modula);
|
||||
mainOverrideVariable("ripsize", &ripsize);
|
||||
|
||||
for (i = 0; i < type->numvertices; i++) {
|
||||
struct gfxvtx *vertex = (struct gfxvtx *)((s32)vertices + g_DyntexVertices[type->vertexlistoffset + i].offset);
|
||||
|
||||
angle = ((g_DyntexVertices[type->vertexlistoffset + i].t % modula) / (f32) modula + f24) * M_BADTAU;
|
||||
vertex->t = g_DyntexVertices[type->vertexlistoffset + i].t + (s16) (sinf(angle) * ripsize);
|
||||
angle = ((g_DyntexVertices[type->vertexlistoffset + i].t % 22) / (f32) 22 + f24) * M_BADTAU;
|
||||
vertex->t = g_DyntexVertices[type->vertexlistoffset + i].t + (s16) (sinf(angle) * 65);
|
||||
|
||||
angle = (((g_DyntexVertices[type->vertexlistoffset + i].s + 22) % modula) / (f32) modula + f24) * M_BADTAU;
|
||||
vertex->s = g_DyntexVertices[type->vertexlistoffset + i].s + (s16) (cosf(angle) * ripsize);
|
||||
angle = (((g_DyntexVertices[type->vertexlistoffset + i].s + 22) % 22) / (f32) 22 + f24) * M_BADTAU;
|
||||
vertex->s = g_DyntexVertices[type->vertexlistoffset + i].s + (s16) (cosf(angle) * 65);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -997,28 +997,24 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
|
||||
*/
|
||||
s32 endscreenHandleCheatInfo(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
static u32 cheatcolour = 0xff7f7fff;
|
||||
|
||||
if (operation == MENUOP_GETCOLOUR
|
||||
&& ((g_Menus[g_MpPlayerNum].endscreen.cheatinfo & 0x200) || item->param == 5)) {
|
||||
// Timed cheat just got unlocked, and this item is the timed cheat name
|
||||
u32 weight = menuGetSinOscFrac(40) * 255;
|
||||
|
||||
mainOverrideVariable("ctcol", &cheatcolour);
|
||||
|
||||
if (item->param == 0
|
||||
&& cheatGetTime(g_Menus[g_MpPlayerNum].endscreen.cheatinfo & 0xff) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
data->label.colour2 = colourBlend(data->label.colour2, cheatcolour, weight);
|
||||
data->label.colour2 = colourBlend(data->label.colour2, 0xff7f7fff, weight);
|
||||
|
||||
if (item->param == 3) { // completion cheat name
|
||||
data->label.colour1 = colourBlend(data->label.colour1, cheatcolour, weight);
|
||||
data->label.colour1 = colourBlend(data->label.colour1, 0xff7f7fff, weight);
|
||||
}
|
||||
|
||||
if (item->param == 5) { // timed cheat name
|
||||
data->label.colour1 = colourBlend(data->label.colour1, cheatcolour, weight);
|
||||
data->label.colour1 = colourBlend(data->label.colour1, 0xff7f7fff, weight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1318,10 +1318,7 @@ Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
||||
|
||||
*colour = red << 24 | green << 16 | alpha | 0x80800000;
|
||||
} else {
|
||||
static u32 var8007e93c = 0xffffffff;
|
||||
mainOverrideVariable("ecol", &var8007e93c);
|
||||
*colour = 0xffffffff;
|
||||
*colour = var8007e93c;
|
||||
}
|
||||
|
||||
gDPSetColorArray(gdl++, osVirtualToPhysical(colour), 1);
|
||||
|
||||
+9
-300
@@ -150,13 +150,7 @@ bool var8007fb9c = false;
|
||||
s32 var8007fba0 = 0;
|
||||
s32 var8007fba4 = -1;
|
||||
u32 var8007fba8 = 0x00000000;
|
||||
u32 var8007fbac = 0x00000001;
|
||||
u32 var8007fbb0 = 0x00000064;
|
||||
u32 var8007fbb4 = 0x0000002c;
|
||||
u32 var8007fbb8 = 0x00000080;
|
||||
u32 var8007fbbc = 0x0000003c;
|
||||
u32 var8007fbc0 = 0x44444400;
|
||||
u32 var8007fbc4 = 0xffffff00;
|
||||
|
||||
void textInit(void)
|
||||
{
|
||||
@@ -856,9 +850,9 @@ u32 textApplyProjectionColour(s32 x, s32 y, u32 colour)
|
||||
f12 = 3000.0f;
|
||||
}
|
||||
|
||||
f14 = var8007fbac;
|
||||
f18 = var8007fbb0;
|
||||
f16 = var8007fbb4;
|
||||
f14 = 1;
|
||||
f18 = 100;
|
||||
f16 = 0x2c;
|
||||
|
||||
if (g_Blend.diagmode == 0) {
|
||||
if (g_Blend.diagtimer < f12) {
|
||||
@@ -960,9 +954,9 @@ u32 text0f1543ac(s32 x, s32 y, u32 colourarg)
|
||||
f12 = 3000.0f;
|
||||
}
|
||||
|
||||
f14 = var8007fbac;
|
||||
f18 = var8007fbb0;
|
||||
f16 = var8007fbb4;
|
||||
f14 = 1;
|
||||
f18 = 100;
|
||||
f16 = 0x2c;
|
||||
|
||||
if (g_Blend.diagmode == 0) {
|
||||
if (g_Blend.diagtimer < f12) {
|
||||
@@ -1006,14 +1000,12 @@ u32 text0f1543ac(s32 x, s32 y, u32 colourarg)
|
||||
} else {
|
||||
u32 alpha[4];
|
||||
|
||||
static s32 burncol = 0xffffff00;
|
||||
s32 burncol = 0xffffff00;
|
||||
|
||||
alpha[0] = colour & 0xff;
|
||||
f18 = 50.0f;
|
||||
f16 = 22.0f;
|
||||
|
||||
mainOverrideVariable("burncol", &burncol);
|
||||
|
||||
if (g_Blend.diagtimer < f12) {
|
||||
colour = colourBlend(alpha[0], colour, 110);
|
||||
} else if (g_Blend.diagtimer - f14 < f12) {
|
||||
@@ -1047,10 +1039,10 @@ u32 text0f1543ac(s32 x, s32 y, u32 colourarg)
|
||||
}
|
||||
|
||||
if (f0 < 0.0f) {
|
||||
s32 weight = var8007fbbc * (0 - f0);
|
||||
s32 weight = 0x3c * (0 - f0);
|
||||
colour = colourBlend(g_Blend.wavecolour1 | (colour & 0xff), colour, weight);
|
||||
} else {
|
||||
s32 weight = var8007fbb8 * f0;
|
||||
s32 weight = 0x80 * f0;
|
||||
colour = colourBlend(g_Blend.wavecolour2 | (colour & 0xff), colour, weight);
|
||||
}
|
||||
}
|
||||
@@ -1266,223 +1258,6 @@ u16 func0f154968jf(u8 value)
|
||||
void textMapCodeUnitToChar(char **text, struct fontchar **arg1, struct fontchar **arg2, struct fontchar *chars, u8 *prevchar);
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
GLOBAL_ASM(
|
||||
glabel textMapCodeUnitToChar
|
||||
/* f154b00: 27bdffd0 */ addiu $sp,$sp,-48
|
||||
/* f154b04: afbf001c */ sw $ra,0x1c($sp)
|
||||
/* f154b08: afb00018 */ sw $s0,0x18($sp)
|
||||
/* f154b0c: afa50034 */ sw $a1,0x34($sp)
|
||||
/* f154b10: afa60038 */ sw $a2,0x38($sp)
|
||||
/* f154b14: afa7003c */ sw $a3,0x3c($sp)
|
||||
/* f154b18: 8c8e0000 */ lw $t6,0x0($a0)
|
||||
/* f154b1c: 00808025 */ move $s0,$a0
|
||||
/* f154b20: 3c047f1c */ lui $a0,0x7f1c
|
||||
/* f154b24: 91c20000 */ lbu $v0,0x0($t6)
|
||||
/* f154b28: 240a000b */ li $t2,0xb
|
||||
/* f154b2c: 24848068 */ addiu $a0,$a0,-32664
|
||||
/* f154b30: 28410080 */ slti $at,$v0,0x80
|
||||
/* f154b34: 10200032 */ beqz $at,.JF0f154c00
|
||||
/* f154b38: 00401825 */ move $v1,$v0
|
||||
/* f154b3c: 10e00004 */ beqz $a3,.JF0f154b50
|
||||
/* f154b40: 3c188008 */ lui $t8,0x8008
|
||||
/* f154b44: 8f1800f0 */ lw $t8,0xf0($t8)
|
||||
/* f154b48: 53000016 */ beqzl $t8,.JF0f154ba4
|
||||
/* f154b4c: 2404000c */ li $a0,0xc
|
||||
.JF0f154b50:
|
||||
/* f154b50: 3c03800a */ lui $v1,0x800a
|
||||
/* f154b54: 24635008 */ addiu $v1,$v1,0x5008
|
||||
/* f154b58: 2405000c */ li $a1,0xc
|
||||
/* f154b5c: 304400ff */ andi $a0,$v0,0xff
|
||||
/* f154b60: a4600000 */ sh $zero,0x0($v1)
|
||||
/* f154b64: a0600002 */ sb $zero,0x2($v1)
|
||||
/* f154b68: a0650003 */ sb $a1,0x3($v1)
|
||||
/* f154b6c: a0650004 */ sb $a1,0x4($v1)
|
||||
/* f154b70: a4600006 */ sh $zero,0x6($v1)
|
||||
/* f154b74: 0fc5525a */ jal func0f154968jf
|
||||
/* f154b78: ac600008 */ sw $zero,0x8($v1)
|
||||
/* f154b7c: 8fab0034 */ lw $t3,0x34($sp)
|
||||
/* f154b80: 3c03800a */ lui $v1,0x800a
|
||||
/* f154b84: 24635008 */ addiu $v1,$v1,0x5008
|
||||
/* f154b88: 24590080 */ addiu $t9,$v0,0x80
|
||||
/* f154b8c: a4790000 */ sh $t9,0x0($v1)
|
||||
/* f154b90: ad630000 */ sw $v1,0x0($t3)
|
||||
/* f154b94: 8fac0038 */ lw $t4,0x38($sp)
|
||||
/* f154b98: 10000011 */ b .JF0f154be0
|
||||
/* f154b9c: ad830000 */ sw $v1,0x0($t4)
|
||||
/* f154ba0: 2404000c */ li $a0,0xc
|
||||
.JF0f154ba4:
|
||||
/* f154ba4: 00640019 */ multu $v1,$a0
|
||||
/* f154ba8: 8fae003c */ lw $t6,0x3c($sp)
|
||||
/* f154bac: 8fb90034 */ lw $t9,0x34($sp)
|
||||
/* f154bb0: 00006812 */ mflo $t5
|
||||
/* f154bb4: 01ae7821 */ addu $t7,$t5,$t6
|
||||
/* f154bb8: 25f8fe74 */ addiu $t8,$t7,-396
|
||||
/* f154bbc: af380000 */ sw $t8,0x0($t9)
|
||||
/* f154bc0: 8fab0040 */ lw $t3,0x40($sp)
|
||||
/* f154bc4: 8fb90038 */ lw $t9,0x38($sp)
|
||||
/* f154bc8: 916c0000 */ lbu $t4,0x0($t3)
|
||||
/* f154bcc: 01840019 */ multu $t4,$a0
|
||||
/* f154bd0: 00006812 */ mflo $t5
|
||||
/* f154bd4: 01ae7821 */ addu $t7,$t5,$t6
|
||||
/* f154bd8: 25f8fe74 */ addiu $t8,$t7,-396
|
||||
/* f154bdc: af380000 */ sw $t8,0x0($t9)
|
||||
.JF0f154be0:
|
||||
/* f154be0: 8e0b0000 */ lw $t3,0x0($s0)
|
||||
/* f154be4: 8fad0040 */ lw $t5,0x40($sp)
|
||||
/* f154be8: 916c0000 */ lbu $t4,0x0($t3)
|
||||
/* f154bec: a1ac0000 */ sb $t4,0x0($t5)
|
||||
/* f154bf0: 8e0e0000 */ lw $t6,0x0($s0)
|
||||
/* f154bf4: 25cf0001 */ addiu $t7,$t6,0x1
|
||||
/* f154bf8: 10000040 */ b .JF0f154cfc
|
||||
/* f154bfc: ae0f0000 */ sw $t7,0x0($s0)
|
||||
.JF0f154c00:
|
||||
/* f154c00: 3c03800a */ lui $v1,0x800a
|
||||
/* f154c04: 24635008 */ addiu $v1,$v1,0x5008
|
||||
/* f154c08: a4600000 */ sh $zero,0x0($v1)
|
||||
/* f154c0c: a0600002 */ sb $zero,0x2($v1)
|
||||
/* f154c10: a06a0003 */ sb $t2,0x3($v1)
|
||||
/* f154c14: a06a0004 */ sb $t2,0x4($v1)
|
||||
/* f154c18: a4600006 */ sh $zero,0x6($v1)
|
||||
/* f154c1c: ac600008 */ sw $zero,0x8($v1)
|
||||
/* f154c20: 8e020000 */ lw $v0,0x0($s0)
|
||||
/* f154c24: 3c058008 */ lui $a1,0x8008
|
||||
/* f154c28: 24a50228 */ addiu $a1,$a1,0x228
|
||||
/* f154c2c: 90460000 */ lbu $a2,0x0($v0)
|
||||
/* f154c30: 24580001 */ addiu $t8,$v0,0x1
|
||||
/* f154c34: ae180000 */ sw $t8,0x0($s0)
|
||||
/* f154c38: 93070000 */ lbu $a3,0x0($t8)
|
||||
/* f154c3c: 27190001 */ addiu $t9,$t8,0x1
|
||||
/* f154c40: 30cb007f */ andi $t3,$a2,0x7f
|
||||
/* f154c44: ae190000 */ sw $t9,0x0($s0)
|
||||
/* f154c48: 000b61c0 */ sll $t4,$t3,0x7
|
||||
/* f154c4c: 30ed007f */ andi $t5,$a3,0x7f
|
||||
/* f154c50: 018d4825 */ or $t1,$t4,$t5
|
||||
/* f154c54: a7a9002a */ sh $t1,0x2a($sp)
|
||||
/* f154c58: afa90024 */ sw $t1,0x24($sp)
|
||||
/* f154c5c: 0c0036b4 */ jal mainOverrideVariable
|
||||
/* f154c60: a3a00029 */ sb $zero,0x29($sp)
|
||||
/* f154c64: 3c0e8008 */ lui $t6,0x8008
|
||||
/* f154c68: 8dce0228 */ lw $t6,0x228($t6)
|
||||
/* f154c6c: 3c03800a */ lui $v1,0x800a
|
||||
/* f154c70: 24635008 */ addiu $v1,$v1,0x5008
|
||||
/* f154c74: 93a80029 */ lbu $t0,0x29($sp)
|
||||
/* f154c78: 11c00006 */ beqz $t6,.JF0f154c94
|
||||
/* f154c7c: 8fb00024 */ lw $s0,0x24($sp)
|
||||
/* f154c80: 0fc551e1 */ jal func0f154784jf
|
||||
/* f154c84: 3204ffff */ andi $a0,$s0,0xffff
|
||||
/* f154c88: 3c03800a */ lui $v1,0x800a
|
||||
/* f154c8c: 24635008 */ addiu $v1,$v1,0x5008
|
||||
/* f154c90: 304800ff */ andi $t0,$v0,0xff
|
||||
.JF0f154c94:
|
||||
/* f154c94: 11000004 */ beqz $t0,.JF0f154ca8
|
||||
/* f154c98: 01001025 */ move $v0,$t0
|
||||
/* f154c9c: 8fa5003c */ lw $a1,0x3c($sp)
|
||||
/* f154ca0: 2404000c */ li $a0,0xc
|
||||
/* f154ca4: 14a0000d */ bnez $a1,.JF0f154cdc
|
||||
.JF0f154ca8:
|
||||
/* f154ca8: 32181fff */ andi $t8,$s0,0x1fff
|
||||
/* f154cac: 2b010400 */ slti $at,$t8,0x400
|
||||
/* f154cb0: 14200002 */ bnez $at,.JF0f154cbc
|
||||
/* f154cb4: 24190002 */ li $t9,0x2
|
||||
/* f154cb8: a7b9002a */ sh $t9,0x2a($sp)
|
||||
.JF0f154cbc:
|
||||
/* f154cbc: 97ab002a */ lhu $t3,0x2a($sp)
|
||||
/* f154cc0: 8fad0034 */ lw $t5,0x34($sp)
|
||||
/* f154cc4: 256c0080 */ addiu $t4,$t3,0x80
|
||||
/* f154cc8: a46c0000 */ sh $t4,0x0($v1)
|
||||
/* f154ccc: ada30000 */ sw $v1,0x0($t5)
|
||||
/* f154cd0: 8fae0038 */ lw $t6,0x38($sp)
|
||||
/* f154cd4: 10000009 */ b .JF0f154cfc
|
||||
/* f154cd8: adc30000 */ sw $v1,0x0($t6)
|
||||
.JF0f154cdc:
|
||||
/* f154cdc: 00440019 */ multu $v0,$a0
|
||||
/* f154ce0: 8fab0034 */ lw $t3,0x34($sp)
|
||||
/* f154ce4: 00007812 */ mflo $t7
|
||||
/* f154ce8: 01e5c021 */ addu $t8,$t7,$a1
|
||||
/* f154cec: 2719fe74 */ addiu $t9,$t8,-396
|
||||
/* f154cf0: ad790000 */ sw $t9,0x0($t3)
|
||||
/* f154cf4: 8fac0038 */ lw $t4,0x38($sp)
|
||||
/* f154cf8: ad830000 */ sw $v1,0x0($t4)
|
||||
.JF0f154cfc:
|
||||
/* f154cfc: 8fbf001c */ lw $ra,0x1c($sp)
|
||||
/* f154d00: 8fb00018 */ lw $s0,0x18($sp)
|
||||
/* f154d04: 27bd0030 */ addiu $sp,$sp,0x30
|
||||
/* f154d08: 03e00008 */ jr $ra
|
||||
/* f154d0c: 00000000 */ nop
|
||||
);
|
||||
|
||||
u32 ope = 0;
|
||||
|
||||
const char var7f1b8068jf[] = "ope";
|
||||
|
||||
//void textMapCodeUnitToChar(char **text, struct fontchar **arg1, struct fontchar **arg2, struct fontchar *chars, u8 *prevchar)
|
||||
//{
|
||||
// u16 c;
|
||||
// u8 c1;
|
||||
// u8 c2;
|
||||
// u16 sp2a;
|
||||
// u8 sp29;
|
||||
//
|
||||
// c = **text;
|
||||
//
|
||||
// if (c < 0x80) {
|
||||
// if (chars == NULL || var800800f0jf) {
|
||||
// g_TmpJpnChar.index = 0;
|
||||
// g_TmpJpnChar.baseline = 0;
|
||||
// g_TmpJpnChar.height = 12;
|
||||
// g_TmpJpnChar.width = 12;
|
||||
// g_TmpJpnChar.unk06 = 0;
|
||||
// g_TmpJpnChar.pixeldata = NULL;
|
||||
//
|
||||
// g_TmpJpnChar.index = 0x80 + func0f154968jf(c);
|
||||
//
|
||||
// *arg1 = &g_TmpJpnChar;
|
||||
// *arg2 = &g_TmpJpnChar;
|
||||
// } else {
|
||||
// *arg1 = &chars[c - 0x21];
|
||||
// *arg2 = &chars[*prevchar - 0x21];
|
||||
// }
|
||||
//
|
||||
// *prevchar = **text;
|
||||
// *text += 1;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// g_TmpJpnChar.index = 0;
|
||||
// g_TmpJpnChar.baseline = 0;
|
||||
// g_TmpJpnChar.height = 11;
|
||||
// g_TmpJpnChar.width = 11;
|
||||
// g_TmpJpnChar.unk06 = 0;
|
||||
// g_TmpJpnChar.pixeldata = NULL;
|
||||
//
|
||||
// c1 = **text;
|
||||
// *text = *text + 1;
|
||||
// c2 = **text;
|
||||
// *text = *text + 1;
|
||||
//
|
||||
// sp2a = ((c1 & 0x7f) << 7) | (c2 & 0x7f);
|
||||
// sp29 = 0;
|
||||
//
|
||||
// mainOverrideVariable("ope", &ope);
|
||||
//
|
||||
// if (ope) {
|
||||
// sp29 = func0f154784jf(sp2a);
|
||||
// }
|
||||
//
|
||||
// if (sp29 == 0 || chars == NULL) {
|
||||
// if ((sp2a & 0x1fff) >= 0x400) {
|
||||
// sp2a = 2;
|
||||
// }
|
||||
//
|
||||
// g_TmpJpnChar.index = sp2a + 0x80;
|
||||
//
|
||||
// *arg1 = &g_TmpJpnChar;
|
||||
// *arg2 = &g_TmpJpnChar;
|
||||
// } else {
|
||||
// *arg1 = &chars[sp29 - 0x21];
|
||||
// *arg2 = &g_TmpJpnChar;
|
||||
// }
|
||||
//}
|
||||
#elif VERSION >= VERSION_PAL_BETA
|
||||
void textMapCodeUnitToChar(char **text, struct fontchar **arg1, struct fontchar **arg2, struct fontchar *chars, u8 *prevchar)
|
||||
{
|
||||
@@ -2427,8 +2202,6 @@ Gfx *textRenderProjected(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *
|
||||
#endif
|
||||
f32 alpha;
|
||||
|
||||
static u32 sbrd = 0x00000000;
|
||||
|
||||
spb0 = var8007fad0;
|
||||
|
||||
if (g_TextRotated90) {
|
||||
@@ -2439,69 +2212,13 @@ Gfx *textRenderProjected(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *
|
||||
}
|
||||
|
||||
if (var8007fbd8) {
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
menuGetSinOscFrac(40);
|
||||
newx = *x / g_ScaleX;
|
||||
newy = *y;
|
||||
tmpcolour = var800a463c;
|
||||
savedmode = g_Blend.diagmode;
|
||||
savedtypes = g_Blend.types;
|
||||
|
||||
if (!g_TextRotated90) {
|
||||
newy--;
|
||||
}
|
||||
|
||||
mainOverrideVariable("sbrd", &sbrd);
|
||||
|
||||
if (sbrd != 0) {
|
||||
tmpcolour = sbrd;
|
||||
}
|
||||
|
||||
g_Blend.types &= ~BLENDTYPE_WAVE;
|
||||
|
||||
if (g_Blend.diagmode != DIAGMODE_FADEIN) {
|
||||
g_Blend.types &= ~BLENDTYPE_DIAGONAL;
|
||||
} else {
|
||||
g_Blend.diagmode = DIAGMODE_FADEOUT;
|
||||
}
|
||||
|
||||
var8007fbd8 = 0;
|
||||
|
||||
newx = *x / g_ScaleX + 1;
|
||||
newy = *y - 1;
|
||||
gdl = textRenderProjected(gdl, &newx, &newy, text, chars, font, tmpcolour, width, height, arg9, lineheight);
|
||||
|
||||
newx = *x / g_ScaleX + 1;
|
||||
newy = *y + 1;
|
||||
gdl = textRenderProjected(gdl, &newx, &newy, text, chars, font, tmpcolour, width, height, arg9, lineheight);
|
||||
|
||||
newx = *x / g_ScaleX - 1;
|
||||
newy = *y - 1;
|
||||
gdl = textRenderProjected(gdl, &newx, &newy, text, chars, font, tmpcolour, width, height, arg9, lineheight);
|
||||
|
||||
newx = *x / g_ScaleX - 1;
|
||||
newy = *y + 1;
|
||||
gdl = textRenderProjected(gdl, &newx, &newy, text, chars, font, tmpcolour, width, height, arg9, lineheight);
|
||||
|
||||
var8007fbd8 = 1;
|
||||
|
||||
g_Blend.types = savedtypes;
|
||||
g_Blend.diagmode = savedmode;
|
||||
#else
|
||||
alpha = (1.0f - menuGetSinOscFrac(40.0f)) * 100.0f + 150.0f;
|
||||
newx = *x / g_ScaleX;
|
||||
newy = *y;
|
||||
tmpcolour = var800a463c;
|
||||
colour2 = (colour & 0xffffff00) | (u32) alpha;
|
||||
|
||||
mainOverrideVariable("sbrd", &sbrd);
|
||||
|
||||
if (sbrd) {
|
||||
tmpcolour = sbrd;
|
||||
}
|
||||
|
||||
gdl = textRender(gdl, &newx, &newy, text, chars, font, colour2, tmpcolour, width, height, arg9, lineheight);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
@@ -2510,14 +2227,6 @@ Gfx *textRenderProjected(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *
|
||||
}
|
||||
#endif
|
||||
|
||||
mainOverrideVariable("lalpha", &var8007fbac);
|
||||
mainOverrideVariable("subtlety", &var8007fbb8);
|
||||
mainOverrideVariable("subtletx", &var8007fbbc);
|
||||
mainOverrideVariable("coly", &var8007fbc4);
|
||||
mainOverrideVariable("colx", &var8007fbc0);
|
||||
mainOverrideVariable("lfade", &var8007fbb0);
|
||||
mainOverrideVariable("llimbo", &var8007fbb4);
|
||||
|
||||
savedx = *x;
|
||||
savedy = *y;
|
||||
prevchar = 'H';
|
||||
|
||||
+5
-11
@@ -2187,17 +2187,11 @@ Gfx *lasersightRenderDot(Gfx *gdl)
|
||||
Mtxf sp124;
|
||||
s32 i;
|
||||
|
||||
static u32 sp1 = 800;
|
||||
static u32 sp2 = 7000;
|
||||
static u32 sp3 = 9000;
|
||||
static u32 spb = 24;
|
||||
static u32 spi = 6;
|
||||
|
||||
mainOverrideVariable("sp1", &sp1);
|
||||
mainOverrideVariable("sp2", &sp2);
|
||||
mainOverrideVariable("sp3", &sp3);
|
||||
mainOverrideVariable("spb", &spb);
|
||||
mainOverrideVariable("spi", &spi);
|
||||
u32 sp1 = 800;
|
||||
u32 sp2 = 7000;
|
||||
u32 sp3 = 9000;
|
||||
u32 spb = 24;
|
||||
u32 spi = 6;
|
||||
|
||||
gDPSetCycleType(gdl++, G_CYC_1CYCLE);
|
||||
gDPSetTextureFilter(gdl++, G_TF_BILERP);
|
||||
|
||||
+21
-43
@@ -169,27 +169,27 @@ Gfx *healthbarDraw(Gfx *gdl, struct chrdata *chr, s32 offyarg, f32 heightfracarg
|
||||
f32 len0 = 0.0f;
|
||||
s32 coloursize;
|
||||
|
||||
static s32 radmax = 30; // outer radius of the shield
|
||||
static s32 radmed = 18; // inner radius of the shield
|
||||
static s32 radmin = 12; // radius of the health bar
|
||||
static s32 len1 = 170; // x pos of right side radius centre
|
||||
static s32 len2 = 47; // x pos of the left side of armour
|
||||
static s32 len3 = 40; // x pos of the right side of trauma (left side is 0)
|
||||
static u32 shieldcol = 0x10500090;
|
||||
static u32 armourcol = 0x00c00060;
|
||||
static u32 traumacol = 0xff000060;
|
||||
static u32 bgcol = 0x00000080;
|
||||
static s32 offx = -85;
|
||||
static s32 offy = -185;
|
||||
static s32 shieldfade = 100;
|
||||
static s32 armourfade = 100;
|
||||
static s32 traumafade = 200;
|
||||
static s32 shielddir = 1;
|
||||
static s32 underleft = 95;
|
||||
static s32 undertop = 18;
|
||||
static s32 underright = 225;
|
||||
static s32 underbottom = 46;
|
||||
static u32 undercol = 0x00000000;
|
||||
s32 radmax = 30; // outer radius of the shield
|
||||
s32 radmed = 18; // inner radius of the shield
|
||||
s32 radmin = 12; // radius of the health bar
|
||||
s32 len1 = 170; // x pos of right side radius centre
|
||||
s32 len2 = 47; // x pos of the left side of armour
|
||||
s32 len3 = 40; // x pos of the right side of trauma (left side is 0)
|
||||
u32 shieldcol = 0x10500090;
|
||||
u32 armourcol = 0x00c00060;
|
||||
u32 traumacol = 0xff000060;
|
||||
u32 bgcol = 0x00000080;
|
||||
s32 offx = -85;
|
||||
s32 offy = -185;
|
||||
s32 shieldfade = 100;
|
||||
s32 armourfade = 100;
|
||||
s32 traumafade = 200;
|
||||
s32 shielddir = 1;
|
||||
s32 underleft = 95;
|
||||
s32 undertop = 18;
|
||||
s32 underright = 225;
|
||||
s32 underbottom = 46;
|
||||
u32 undercol = 0x00000000;
|
||||
|
||||
vertices = gfxAllocateVertices(56);
|
||||
colours = gfxAllocateColours(56);
|
||||
@@ -205,28 +205,6 @@ Gfx *healthbarDraw(Gfx *gdl, struct chrdata *chr, s32 offyarg, f32 heightfracarg
|
||||
armourcolours = colours + 24;
|
||||
traumacolours = colours + 40;
|
||||
|
||||
mainOverrideVariable("radmax", &radmax);
|
||||
mainOverrideVariable("radmed", &radmed);
|
||||
mainOverrideVariable("radmin", &radmin);
|
||||
mainOverrideVariable("len1", &len1);
|
||||
mainOverrideVariable("len2", &len2);
|
||||
mainOverrideVariable("len3", &len3);
|
||||
mainOverrideVariable("offx", &offx);
|
||||
mainOverrideVariable("offy", &offy);
|
||||
mainOverrideVariable("shieldcol", &shieldcol);
|
||||
mainOverrideVariable("armourcol", &armourcol);
|
||||
mainOverrideVariable("traumacol", &traumacol);
|
||||
mainOverrideVariable("bgcol", &bgcol);
|
||||
mainOverrideVariable("shieldfade", &shieldfade);
|
||||
mainOverrideVariable("armourfade", &armourfade);
|
||||
mainOverrideVariable("traumafade", &traumafade);
|
||||
mainOverrideVariable("shielddir", &shielddir);
|
||||
mainOverrideVariable("underleft", &underleft);
|
||||
mainOverrideVariable("undertop", &undertop);
|
||||
mainOverrideVariable("underright", &underright);
|
||||
mainOverrideVariable("underbottom", &underbottom);
|
||||
mainOverrideVariable("undercol", &undercol);
|
||||
|
||||
if (chr == NULL || offyarg <= 0 || heightfracarg <= 0.0f) {
|
||||
// Use the player's health
|
||||
shieldfrac = g_Vars.currentplayer->apparentarmour;
|
||||
|
||||
@@ -5,43 +5,10 @@
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
s32 var8009d370jf;
|
||||
#endif
|
||||
|
||||
extern s32 var8009d140jf;
|
||||
|
||||
void langTick(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
static u32 language = 99;
|
||||
|
||||
var8009d370jf = 0;
|
||||
|
||||
mainOverrideVariable("jap", &language);
|
||||
|
||||
if (language < 2) {
|
||||
langSetJpnEnabled(language);
|
||||
language = 99;
|
||||
}
|
||||
|
||||
for (i = 0; i < var8009d140jf; i++) {
|
||||
if (var800aabb8[i].unk00_00) {
|
||||
var800aabb8[i].unk00_00--;
|
||||
}
|
||||
}
|
||||
#elif VERSION >= VERSION_PAL_BETA
|
||||
static u32 language = 99;
|
||||
|
||||
mainOverrideVariable("language", &language);
|
||||
|
||||
if (language < 5) {
|
||||
langSetEuropean(language);
|
||||
language = 99;
|
||||
}
|
||||
|
||||
if (g_Jpn) {
|
||||
for (i = 0; i != 124; i++) {
|
||||
if (var800aabb8[i].unk00_00) {
|
||||
@@ -49,13 +16,4 @@ void langTick(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (g_Jpn) {
|
||||
for (i = 0; i != 124; i++) {
|
||||
if (var800aabb8[i].unk00_00) {
|
||||
var800aabb8[i].unk00_00--;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+20
-42
@@ -2183,11 +2183,8 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(camGetPerspectiveMtxL()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
} else {
|
||||
f32 aspect = (f32) (g_MenuScissorX2 - g_MenuScissorX1) / (f32) (g_MenuScissorY2 - g_MenuScissorY1);
|
||||
static u32 znear = 10;
|
||||
static u32 zfar = 300;
|
||||
|
||||
mainOverrideVariable("mzn", &znear);
|
||||
mainOverrideVariable("mzf", &zfar);
|
||||
u32 znear = 10;
|
||||
u32 zfar = 300;
|
||||
|
||||
gdl = func0f0d49c8(gdl);
|
||||
|
||||
@@ -5755,13 +5752,9 @@ void func0f0f85e0(struct menudialogdef *dialogdef, s32 root)
|
||||
g_Vars.currentplayer->pausemode = PAUSEMODE_PAUSED;
|
||||
}
|
||||
|
||||
u32 g_MenuCThresh = 120;
|
||||
|
||||
Gfx *menuRenderDialog(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool lightweight)
|
||||
{
|
||||
mainOverrideVariable("cthresh", &g_MenuCThresh);
|
||||
|
||||
textSetWaveBlend(dialog->unk54, dialog->unk58, g_MenuCThresh);
|
||||
textSetWaveBlend(dialog->unk54, dialog->unk58, 120);
|
||||
|
||||
gdl = dialogRender(gdl, dialog, menu, lightweight);
|
||||
|
||||
@@ -6140,7 +6133,7 @@ void dialogTick(struct menudialog *dialog, struct menuinputs *inputs, u32 tickfl
|
||||
dialog->unk5c += g_Vars.diffframe60;
|
||||
dialog->unk54 += dialog->unk5c / 9;
|
||||
dialog->unk5c %= 9;
|
||||
dialog->unk54 %= g_MenuCThresh;
|
||||
dialog->unk54 %= 120;
|
||||
|
||||
// For endscreens, handle transitioning of background and dialog type
|
||||
if (dialog->transitionfrac < 0.0f) {
|
||||
@@ -7294,27 +7287,23 @@ Gfx *menuRenderBackgroundLayer1(Gfx *gdl, u8 bg, f32 frac)
|
||||
}
|
||||
break;
|
||||
case MENUBG_CONEALPHA:
|
||||
mainOverrideVariable("bblur", &bblur);
|
||||
|
||||
if (g_MenuData.screenshottimer) {
|
||||
return gdl;
|
||||
}
|
||||
|
||||
if (bblur) {
|
||||
// Render the blurred background
|
||||
gdl = menugfxRenderBgBlur(gdl, 0xffffffff, 0, 0);
|
||||
// Render the blurred background
|
||||
gdl = menugfxRenderBgBlur(gdl, 0xffffffff, 0, 0);
|
||||
|
||||
// While fading, render red
|
||||
if (frac < 1.0f) {
|
||||
u32 alpha;
|
||||
u32 stack;
|
||||
// While fading, render red
|
||||
if (frac < 1.0f) {
|
||||
u32 alpha;
|
||||
u32 stack;
|
||||
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
alpha = (1.0f - frac) * 255;
|
||||
gdl = textSetPrimColour(gdl, 0xff000000 | alpha);
|
||||
gDPFillRectangle(gdl++, 0, 0, viGetWidth(), viGetHeight());
|
||||
gdl = text0f153838(gdl);
|
||||
}
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
alpha = (1.0f - frac) * 255;
|
||||
gdl = textSetPrimColour(gdl, 0xff000000 | alpha);
|
||||
gDPFillRectangle(gdl++, 0, 0, viGetWidth(), viGetHeight());
|
||||
gdl = text0f153838(gdl);
|
||||
}
|
||||
break;
|
||||
case MENUBG_GRADIENT:
|
||||
@@ -7330,15 +7319,10 @@ Gfx *menuRenderBackgroundLayer1(Gfx *gdl, u8 bg, f32 frac)
|
||||
return gdl;
|
||||
}
|
||||
|
||||
u32 var800714f0 = 1;
|
||||
|
||||
Gfx *menuRenderBackgroundLayer2(Gfx *gdl, u8 bg, f32 frac)
|
||||
{
|
||||
if (bg == MENUBG_CONEALPHA || bg == MENUBG_CONEOPAQUE) {
|
||||
mainOverrideVariable("cone", &var800714f0);
|
||||
|
||||
if (var800714f0
|
||||
&& (g_MenuData.nextbg == MENUBG_CONEALPHA || g_MenuData.nextbg == 0 || g_MenuData.nextbg == 255)) {
|
||||
if (g_MenuData.nextbg == MENUBG_CONEALPHA || g_MenuData.nextbg == 0 || g_MenuData.nextbg == 255) {
|
||||
gdl = menugfxRenderBgCone(gdl);
|
||||
}
|
||||
}
|
||||
@@ -8337,8 +8321,6 @@ glabel var7f1b381cjf
|
||||
#else
|
||||
Gfx *menuRender(Gfx *gdl)
|
||||
{
|
||||
static u32 usepiece = 1;
|
||||
|
||||
g_MpPlayerNum = 0;
|
||||
|
||||
#if PAL
|
||||
@@ -8424,16 +8406,12 @@ Gfx *menuRender(Gfx *gdl)
|
||||
}
|
||||
}
|
||||
|
||||
mainOverrideVariable("usePiece", &usepiece);
|
||||
g_MenuData.unk5d5_03 = false;
|
||||
|
||||
if (usepiece) {
|
||||
g_MenuData.unk5d5_03 = false;
|
||||
gdl = menuRenderModels(gdl, &g_MenuData.unk01c, 1);
|
||||
gSPClearGeometryMode(gdl++, G_ZBUFFER);
|
||||
|
||||
gdl = menuRenderModels(gdl, &g_MenuData.unk01c, 1);
|
||||
gSPClearGeometryMode(gdl++, G_ZBUFFER);
|
||||
|
||||
g_MenuData.unk5d5_03 = true;
|
||||
}
|
||||
g_MenuData.unk5d5_03 = true;
|
||||
} else {
|
||||
var8009de98 = var8009de9c = 0;
|
||||
}
|
||||
|
||||
+1
-7
@@ -60,19 +60,13 @@ void menugfxCreateBlur(void)
|
||||
u32 b;
|
||||
u16 colour;
|
||||
|
||||
static u32 cccc = 1;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = (g_ViRes == VIRES_HI) ? 2 : 1;
|
||||
#endif
|
||||
|
||||
if (cccc == 1) {
|
||||
fb = (u8 *) viGetFrontBuffer();
|
||||
}
|
||||
|
||||
mainOverrideVariable("cccc", &cccc);
|
||||
fb = (u8 *) viGetFrontBuffer();
|
||||
|
||||
for (dsty = 0; dsty < BLURIMG_HEIGHT; dsty++) {
|
||||
|
||||
|
||||
@@ -1593,8 +1593,6 @@ Gfx *menuitemSeparatorRender(Gfx *gdl, struct menurendercontext *context)
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 var800711e8 = 0x00000000;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
GLOBAL_ASM(
|
||||
glabel menuitemObjectivesRenderOne
|
||||
@@ -2272,7 +2270,6 @@ Gfx *menuitemObjectivesRenderOne(Gfx *gdl, struct menudialog *dialog, s32 index,
|
||||
#endif
|
||||
}
|
||||
|
||||
mainOverrideVariable("brcol", &var800711e8);
|
||||
sp120 = langGet(g_Briefing.objectivenames[index]);
|
||||
y = objy;
|
||||
sp12c = MIXCOLOUR(dialog, unfocused);
|
||||
@@ -2323,10 +2320,6 @@ Gfx *menuitemObjectivesRenderOne(Gfx *gdl, struct menudialog *dialog, s32 index,
|
||||
|
||||
textMeasure(&textheight, &textwidth, spcc, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
|
||||
if (var800711e8 != 0) {
|
||||
spc8 = var800711e8;
|
||||
}
|
||||
|
||||
x = objx + width - textwidth - 10;
|
||||
y = objy + spbc + 9;
|
||||
|
||||
|
||||
-100
@@ -279,15 +279,9 @@ u32 var80075cd4 = 0x00000000;
|
||||
u32 var80075cd8 = 0x00000000;
|
||||
u32 g_PakDebugForceCrc = 0;
|
||||
u32 g_PakDebugForceScrub = 0;
|
||||
u32 g_PakDebugPakDump = 0;
|
||||
u32 g_PakDebugPakCache = 1;
|
||||
u32 g_PakDebugPakInit = 0;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
u32 g_PakDebugWipeEeprom = 0;
|
||||
u32 g_PakDebugCorruptMe = 0;
|
||||
#endif
|
||||
|
||||
char g_PakNoteGameName[] = {
|
||||
N64CHAR('P'),
|
||||
N64CHAR('E'),
|
||||
@@ -4649,54 +4643,9 @@ void pak0f11c6d0(void)
|
||||
|
||||
void pakExecuteDebugOperations(void)
|
||||
{
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
static u32 g_PakDebugDumpEeprom = 0;
|
||||
s32 pass = false;
|
||||
s8 i;
|
||||
|
||||
mainOverrideVariable("forcescrub", &g_PakDebugForceScrub);
|
||||
mainOverrideVariable("pakdump", &g_PakDebugPakDump);
|
||||
mainOverrideVariable("pakcache", &g_PakDebugPakCache);
|
||||
mainOverrideVariable("pakinit", &g_PakDebugPakInit);
|
||||
mainOverrideVariable("corruptme", &g_PakDebugCorruptMe);
|
||||
mainOverrideVariable("wipeeeprom", &g_PakDebugWipeEeprom);
|
||||
mainOverrideVariable("dumpeeprom", &g_PakDebugDumpEeprom);
|
||||
|
||||
if (g_PakDebugCorruptMe) {
|
||||
g_PakDebugCorruptMe = false;
|
||||
pakCorrupt();
|
||||
}
|
||||
|
||||
if (g_PakDebugPakDump) {
|
||||
pakDumpPak();
|
||||
g_PakDebugPakDump = false;
|
||||
}
|
||||
|
||||
if (g_PakDebugDumpEeprom) {
|
||||
g_PakDebugDumpEeprom = false;
|
||||
pakDumpEeprom();
|
||||
}
|
||||
|
||||
if (g_PakDebugWipeEeprom) {
|
||||
pakWipe(SAVEDEVICE_GAMEPAK, 0, 0x80);
|
||||
g_PakDebugWipeEeprom = false;
|
||||
}
|
||||
|
||||
if (g_PakDebugPakInit) {
|
||||
s32 device = g_PakDebugPakInit - 1;
|
||||
|
||||
joyDisableCyclicPolling();
|
||||
pakInitPak(&g_PiMesgQueue, PFS(device), device, 0);
|
||||
joyEnableCyclicPolling();
|
||||
|
||||
g_PakDebugPakInit = false;
|
||||
}
|
||||
|
||||
if (g_PakDebugForceScrub) {
|
||||
pakCreateFilesystem(SAVEDEVICE_GAMEPAK);
|
||||
g_PakDebugForceScrub = false;
|
||||
}
|
||||
|
||||
pak0f11ca30();
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
@@ -4722,55 +4671,6 @@ void pakExecuteDebugOperations(void)
|
||||
} else {
|
||||
var8005eedc = true;
|
||||
}
|
||||
#else
|
||||
static u32 g_PakDebugDumpEeprom = 0;
|
||||
s8 i;
|
||||
|
||||
osSyncPrintf("lvGetPause = %s", lvIsPaused() ? "TRUE" : "FALSE");
|
||||
osSyncPrintf("MP_GetPause = %s", mpIsPaused() ? "TRUE" : "FALSE");
|
||||
osSyncPrintf("getnumplayers = %d", PLAYERCOUNT());
|
||||
|
||||
mainOverrideVariable("forcecrc", &g_PakDebugForceCrc);
|
||||
mainOverrideVariable("forcescrub", &g_PakDebugForceScrub);
|
||||
mainOverrideVariable("dumph", &g_PakDebugPakDump);
|
||||
mainOverrideVariable("pakcache", &g_PakDebugPakCache);
|
||||
mainOverrideVariable("pakinit", &g_PakDebugPakInit);
|
||||
mainOverrideVariable("dumpeeprom", &g_PakDebugDumpEeprom);
|
||||
|
||||
if (g_PakDebugDumpEeprom) {
|
||||
g_PakDebugDumpEeprom = false;
|
||||
pakDumpEeprom();
|
||||
}
|
||||
|
||||
if (g_PakDebugPakInit) {
|
||||
s32 device = g_PakDebugPakInit - 1;
|
||||
|
||||
joyDisableCyclicPolling(4558, "pak.c");
|
||||
pakInitPak(&g_PiMesgQueue, PFS(device), device);
|
||||
joyEnableCyclicPolling(4560, "pak.c");
|
||||
|
||||
g_PakDebugPakInit = false;
|
||||
}
|
||||
|
||||
if (g_PakDebugForceCrc) {
|
||||
pakWipe(SAVEDEVICE_GAMEPAK, 0x4d, 0x4e);
|
||||
g_PakDebugForceCrc = false;
|
||||
}
|
||||
|
||||
if (g_PakDebugForceScrub) {
|
||||
pakCreateFilesystem(SAVEDEVICE_GAMEPAK);
|
||||
g_PakDebugForceScrub = false;
|
||||
}
|
||||
|
||||
pak0f11ca30();
|
||||
pakDumpPak();
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (g_Paks[i].unk014) {
|
||||
pak0f11df94(i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const char var7f1b46a8[] = "\nOS_GBPAK_GBCART_ON - ";
|
||||
|
||||
@@ -2123,7 +2123,6 @@ void playerStopAudioForPause(void)
|
||||
}
|
||||
}
|
||||
|
||||
u32 var8007083c = 0;
|
||||
u32 g_GlobalMenuRoot = 0;
|
||||
|
||||
void playerTickPauseMenu(void)
|
||||
@@ -3470,14 +3469,6 @@ void playerTick(bool arg0)
|
||||
aspectratio *= 1.1904761791229f;
|
||||
#endif
|
||||
|
||||
mainOverrideVariable("tps", &var8007083c);
|
||||
|
||||
if (var8007083c != TELEPORTSTATE_INACTIVE) {
|
||||
var8007083c = TELEPORTSTATE_INACTIVE;
|
||||
g_Vars.currentplayer->teleporttime = 0;
|
||||
g_Vars.currentplayer->teleportstate = TELEPORTSTATE_PREENTER;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->teleportstate != TELEPORTSTATE_INACTIVE) {
|
||||
playerTickTeleport(&aspectratio);
|
||||
}
|
||||
|
||||
+1
-44
@@ -1333,12 +1333,6 @@ s32 door0f068c04(struct prop *prop, s32 *arg1, s32 *arg2)
|
||||
struct prop *loopprop;
|
||||
struct pad *pad;
|
||||
|
||||
#if VERSION < VERSION_PAL_BETA
|
||||
static u32 debugdoors = 0;
|
||||
|
||||
mainOverrideVariable("debugdoors", &debugdoors);
|
||||
#endif
|
||||
|
||||
sibling = door;
|
||||
|
||||
while (sibling && sibling->base.prop) {
|
||||
@@ -1513,12 +1507,6 @@ void propCalculateShadeColour(struct prop *prop, u8 *nextcol, u16 floorcol)
|
||||
s32 roomb;
|
||||
s32 tmp;
|
||||
|
||||
static u32 scol = 0x00;
|
||||
static u32 salp = 0x00;
|
||||
|
||||
mainOverrideVariable("scol", &scol);
|
||||
mainOverrideVariable("salp", &salp);
|
||||
|
||||
if (prop->type & (PROPTYPE_OBJ | PROPTYPE_WEAPON | PROPTYPE_DOOR)) {
|
||||
obj = prop->obj;
|
||||
} else {
|
||||
@@ -1615,11 +1603,6 @@ void propCalculateShadeColour(struct prop *prop, u8 *nextcol, u16 floorcol)
|
||||
nextcol[0] >>= 1;
|
||||
nextcol[1] >>= 1;
|
||||
nextcol[2] >>= 1;
|
||||
|
||||
if (scol || salp) {
|
||||
nextcol[0] = nextcol[1] = nextcol[2] = scol;
|
||||
nextcol[3] = salp;
|
||||
}
|
||||
}
|
||||
|
||||
void propCalculateShadeInfo(struct prop *prop, u8 *nextcol, u16 floorcol)
|
||||
@@ -7470,15 +7453,8 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
u32 stack[2];
|
||||
|
||||
static f32 var80069bc4 = 0;
|
||||
static u32 kkg = 3;
|
||||
static u32 kkd = 20;
|
||||
static u32 kkp = 120;
|
||||
|
||||
mainOverrideVariable("kkg", &kkg);
|
||||
mainOverrideVariable("kkd", &kkd);
|
||||
mainOverrideVariable("kkp", &kkp);
|
||||
|
||||
tmp = ((kkd / 100.0f * var80069bc4 / LVUPDATE60FREAL()) + (kkp / 100.00f * sp28c * LVUPDATE60FREAL())) * (kkg / 100.000f);
|
||||
tmp = ((20 / 100.0f * var80069bc4 / LVUPDATE60FREAL()) + (120 / 100.00f * sp28c * LVUPDATE60FREAL())) * (3 / 100.000f);
|
||||
|
||||
var80069bc4 = sp28c;
|
||||
|
||||
@@ -8253,25 +8229,6 @@ void doorTick(struct prop *doorprop)
|
||||
f32 prevfrac = door->frac;
|
||||
u32 stack[2];
|
||||
|
||||
#if VERSION < VERSION_PAL_BETA
|
||||
static u32 debugdoor = 0;
|
||||
|
||||
mainOverrideVariable("debugdoor", &debugdoor);
|
||||
|
||||
// If debugdoor is set to 1 or to the address of this door,
|
||||
// print the distance to the door to console
|
||||
if (debugdoor) {
|
||||
u32 addr = (u32)doorprop;
|
||||
|
||||
if (debugdoor == 1 || debugdoor == addr) {
|
||||
f32 xdiff = doorprop->pos.x - g_Vars.players[0]->cam_pos.x;
|
||||
f32 zdiff = doorprop->pos.z - g_Vars.players[0]->cam_pos.z;
|
||||
|
||||
sqrtf(xdiff * xdiff + zdiff * zdiff);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// If door should autoclose this tick
|
||||
if (door->lastopen60 > 0
|
||||
&& door->mode == DOORMODE_IDLE
|
||||
|
||||
+3
-13
@@ -199,18 +199,12 @@ Gfx *menugfxDrawPlane(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour1, u32
|
||||
s16 scale = 10;
|
||||
f32 tmp2;
|
||||
|
||||
static u32 depthsub = 1000;
|
||||
static u32 txmul = 20;
|
||||
static u32 rsub = 5;
|
||||
|
||||
colours = gfxAllocateColours(2);
|
||||
vertices = gfxAllocateVertices(4);
|
||||
|
||||
sp34 = 1.0f;
|
||||
sp30 = 1.0f;
|
||||
|
||||
mainOverrideVariable("txmul", &txmul);
|
||||
|
||||
if (y1 < var8009de90 && y2 < var8009de90) {
|
||||
return gdl;
|
||||
}
|
||||
@@ -235,8 +229,8 @@ Gfx *menugfxDrawPlane(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour1, u32
|
||||
y2 = var8009de94;
|
||||
}
|
||||
|
||||
sp2e = (x1 + y1) * txmul;
|
||||
sp2c = (x2 + y2) * txmul;
|
||||
sp2e = (x1 + y1) * 20;
|
||||
sp2c = (x2 + y2) * 20;
|
||||
sp2a = 0;
|
||||
sp28 = 16384;
|
||||
|
||||
@@ -244,8 +238,6 @@ Gfx *menugfxDrawPlane(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour1, u32
|
||||
sp30 = 2.0f;
|
||||
}
|
||||
|
||||
mainOverrideVariable("depthsub", &depthsub);
|
||||
|
||||
a1 = 200;
|
||||
|
||||
if (type == MENUPLANE_02 || type == MENUPLANE_03) {
|
||||
@@ -300,9 +292,7 @@ Gfx *menugfxDrawPlane(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour1, u32
|
||||
}
|
||||
|
||||
if (type == MENUPLANE_07) {
|
||||
mainOverrideVariable("rsub", &rsub);
|
||||
|
||||
a1 = -rsub;
|
||||
a1 = -5;
|
||||
|
||||
sp30 = 8.0f;
|
||||
sp2a = 256;
|
||||
|
||||
@@ -16,12 +16,6 @@ u8 *g_GeCreditsData;
|
||||
|
||||
u32 setupGetCmdLength(u32 *cmd)
|
||||
{
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
static u32 crash1 = 0;
|
||||
|
||||
mainOverrideVariable("crash1", &crash1);
|
||||
#endif
|
||||
|
||||
switch ((u8)cmd[0]) {
|
||||
case OBJTYPE_CHR: return 11;
|
||||
case OBJTYPE_DOOR: return 55;
|
||||
@@ -81,12 +75,6 @@ u32 setupGetCmdLength(u32 *cmd)
|
||||
case OBJTYPE_ESCASTEP: return 27;
|
||||
}
|
||||
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
if (crash1) {
|
||||
CRASH();
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-17
@@ -626,7 +626,6 @@ Gfx *sightDrawDefault(Gfx *gdl, bool sighton)
|
||||
struct trackedprop *trackedprop;
|
||||
s32 i;
|
||||
|
||||
static s32 sight = 0;
|
||||
static s32 identifytimer = 0;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
@@ -657,16 +656,7 @@ Gfx *sightDrawDefault(Gfx *gdl, bool sighton)
|
||||
cornergap = 3;
|
||||
}
|
||||
|
||||
mainOverrideVariable("sight", &sight);
|
||||
|
||||
switch (sight) {
|
||||
case 0:
|
||||
gdl = sightDrawAimer(gdl, x, y, radius, cornergap, colour);
|
||||
break;
|
||||
case 1:
|
||||
gdl = sightDrawDelayedAimer(gdl, x, y, radius * 2, cornergap * 2, colour);
|
||||
break;
|
||||
}
|
||||
gdl = sightDrawAimer(gdl, x, y, radius, cornergap, colour);
|
||||
}
|
||||
break;
|
||||
case SIGHTTRACKTYPE_BETASCANNER:
|
||||
@@ -1387,12 +1377,6 @@ Gfx *sightDrawTarget(Gfx *gdl)
|
||||
s32 x = (s32)g_Vars.currentplayer->crosspos[0] / g_ScaleX;
|
||||
s32 y = g_Vars.currentplayer->crosspos[1];
|
||||
|
||||
static u32 var80070f9c = 0x00ff00ff;
|
||||
static u32 var80070fa0 = 0x00ff0011;
|
||||
|
||||
mainOverrideVariable("sout", &var80070f9c);
|
||||
mainOverrideVariable("sin", &var80070fa0);
|
||||
|
||||
gdl = textSetPrimColour(gdl, 0x00ff0028);
|
||||
|
||||
gDPHudRectangle(gdl++, x + 2, y + 0, x + 6, y + 0);
|
||||
|
||||
@@ -597,30 +597,12 @@ s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata
|
||||
u32 colour;
|
||||
#endif
|
||||
|
||||
static u32 x1 = 0;
|
||||
static u32 x2 = 0;
|
||||
static u32 y1 = 0;
|
||||
static u32 y2 = 0;
|
||||
static u32 x3 = 0;
|
||||
static u32 x4 = 0;
|
||||
static u32 y3 = 0;
|
||||
static u32 y4 = 0;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
linecolourmid = (linecolourmid & 0xffffff00) | ((linecolourmid & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
linecolourfig = (linecolourfig & 0xffffff00) | ((linecolourfig & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
linecolourtex = (linecolourtex & 0xffffff00) | ((linecolourtex & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
#endif
|
||||
|
||||
mainOverrideVariable("x1", &x1);
|
||||
mainOverrideVariable("x2", &x2);
|
||||
mainOverrideVariable("y1", &y1);
|
||||
mainOverrideVariable("y2", &y2);
|
||||
mainOverrideVariable("x3", &x3);
|
||||
mainOverrideVariable("x4", &x4);
|
||||
mainOverrideVariable("y3", &y3);
|
||||
mainOverrideVariable("y4", &y4);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
gDPSetAlphaCompare(gdl++, G_AC_NONE);
|
||||
|
||||
@@ -1056,8 +1056,6 @@ void wallhitsTick(void)
|
||||
sp12c = (g_Vars.lvupdate240 + 2.0f) * 0.25f;
|
||||
fov = currentPlayerGetGunZoomFov();
|
||||
|
||||
mainOverrideVariable("wallhit", &var8007f750);
|
||||
|
||||
var8007f740 = 0;
|
||||
|
||||
if (fov == 0.0f || fov == 60.0f) {
|
||||
|
||||
+14
-39
@@ -256,8 +256,6 @@ void weatherSetIntensity(s32 intensity)
|
||||
g_WeatherData->intensity = intensity;
|
||||
}
|
||||
|
||||
u32 g_RainSpeedExtra;
|
||||
u32 g_SnowSpeed;
|
||||
u32 g_SnowSpeedExtra;
|
||||
|
||||
void weatherTickRain(struct weatherdata *weather)
|
||||
@@ -270,8 +268,6 @@ void weatherTickRain(struct weatherdata *weather)
|
||||
f32 rand;
|
||||
s32 lvupdate;
|
||||
|
||||
mainOverrideVariable("rainspeedxtra", &g_RainSpeedExtra);
|
||||
|
||||
if (weather->unk90 > 0) {
|
||||
weather->unk88 += (weather->unk8c - weather->unk88) / weather->unk90;
|
||||
}
|
||||
@@ -390,7 +386,7 @@ void weatherTickRain(struct weatherdata *weather)
|
||||
|
||||
particle->unk1c = RANDOMFRAC() + 0.7f;
|
||||
|
||||
particle->inc.y = -(RANDOMFRAC() * g_RainSpeedExtra + weather->unkc8);
|
||||
particle->inc.y = -(RANDOMFRAC() * 20 + weather->unkc8);
|
||||
|
||||
if (ABS(relativetotal) < 2 && weather->unkd0 != weather->unkd4) {
|
||||
if (weather->unkd0 < weather->unkd4) {
|
||||
@@ -420,10 +416,6 @@ void weatherTickRain(struct weatherdata *weather)
|
||||
}
|
||||
}
|
||||
|
||||
u32 g_RainSpeedExtra = 20;
|
||||
u32 g_SnowSpeed = 15;
|
||||
u32 g_SnowSpeedExtra = 10;
|
||||
|
||||
void weatherTickSnow(struct weatherdata *weather)
|
||||
{ \
|
||||
s32 lVar7 = 0;
|
||||
@@ -433,9 +425,6 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
s32 i;
|
||||
struct weatherparticledata *data;
|
||||
|
||||
mainOverrideVariable("snowspeed", &g_SnowSpeed);
|
||||
mainOverrideVariable("snowspeedxtra", &g_SnowSpeedExtra);
|
||||
|
||||
if (g_StageIndex == STAGEINDEX_AIRBASE) {
|
||||
weather->windanglerad = 1.5707963705063f;
|
||||
weather->windspeedz = -weather->windspeed;
|
||||
@@ -573,7 +562,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
|
||||
particle->unk1c = RANDOMFRAC() + 0.7f;
|
||||
|
||||
particle->inc.y = -(g_SnowSpeed / 10.0f) - (RANDOMFRAC() * g_SnowSpeedExtra) / 10.0f;
|
||||
particle->inc.y = -(15 / 10.0f) - (RANDOMFRAC() * 10) / 10.0f;
|
||||
particle->inc.x = weather->windspeedx * particle->unk1c;
|
||||
particle->inc.z = weather->windspeedz * particle->unk1c;
|
||||
|
||||
@@ -2550,27 +2539,18 @@ Gfx *weatherRenderRain(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
||||
struct coord spe4;
|
||||
struct coord spd4;
|
||||
|
||||
static u32 var8007f0e4 = 0xaaaaaa1f;
|
||||
static u32 var8007f0e8 = 0x11111844;
|
||||
static u32 var8007f0ec = 50;
|
||||
static u32 var8007f0f0 = 2500;
|
||||
static u32 var8007f0f4 = 1;
|
||||
static u32 var8007f0f8 = 1;
|
||||
static u32 var8007f0fc = 22000;
|
||||
u32 var8007f0e4 = 0xaaaaaa1f;
|
||||
u32 var8007f0e8 = 0x11111844;
|
||||
u32 var8007f0ec = 50;
|
||||
u32 var8007f0f0 = 2500;
|
||||
u32 var8007f0f4 = 1;
|
||||
u32 var8007f0f8 = 1;
|
||||
u32 var8007f0fc = 22000;
|
||||
|
||||
spd80 = 1;
|
||||
s4 = 0;
|
||||
sp708 = 0;
|
||||
|
||||
mainOverrideVariable("raincol1", &var8007f0e4);
|
||||
mainOverrideVariable("raincol2", &var8007f0e8);
|
||||
mainOverrideVariable("rainwidth", &var8007f0e0);
|
||||
mainOverrideVariable("rainout", &var8007f0ec);
|
||||
mainOverrideVariable("cddiv", &var8007f0f0);
|
||||
mainOverrideVariable("wetclip", &var8007f0f4);
|
||||
mainOverrideVariable("bounder", &var8007f0f8);
|
||||
mainOverrideVariable("trypitch", &var8007f0fc);
|
||||
|
||||
if (g_Vars.lvupdate240 <= 0) {
|
||||
spd80 = 0;
|
||||
}
|
||||
@@ -4621,11 +4601,11 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
||||
s32 index;
|
||||
s32 stack2[2];
|
||||
|
||||
static u32 var8007f100 = 50;
|
||||
static u32 var8007f104 = 5;
|
||||
static u32 var8007f108 = 10;
|
||||
static u32 var8007f10c = 0x8888aaff;
|
||||
static u32 var8007f110 = 0xffffff7f;
|
||||
u32 var8007f100 = 50;
|
||||
u32 var8007f104 = 5;
|
||||
u32 var8007f108 = 10;
|
||||
u32 var8007f10c = 0x8888aaff;
|
||||
u32 var8007f110 = 0xffffff7f;
|
||||
|
||||
s7 = 0;
|
||||
sp1268 = 0;
|
||||
@@ -4642,11 +4622,6 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
||||
0, 0, 0, SHADE, TEXEL0, 0, SHADE, 0,
|
||||
0, 0, 0, SHADE, TEXEL0, 0, SHADE, 0);
|
||||
|
||||
mainOverrideVariable("snowwidth", &var8007f104);
|
||||
mainOverrideVariable("snowheight", &var8007f108);
|
||||
mainOverrideVariable("snowcol1", &var8007f10c);
|
||||
mainOverrideVariable("snowcol2", &var8007f110);
|
||||
|
||||
particledata = weather->particledata[arg2];
|
||||
|
||||
sp198 = 0;
|
||||
|
||||
+7
-15
@@ -6,9 +6,6 @@
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
u32 var80062950 = 100;
|
||||
bool g_WeatherTickEnabled = true;
|
||||
|
||||
void weatherTick(void)
|
||||
{
|
||||
if (!g_WeatherData
|
||||
@@ -17,17 +14,12 @@ void weatherTick(void)
|
||||
return;
|
||||
}
|
||||
|
||||
mainOverrideVariable("wettick", (u32 *)&g_WeatherTickEnabled);
|
||||
mainOverrideVariable("windspeed", &var80062950);
|
||||
|
||||
if (g_WeatherTickEnabled) {
|
||||
switch (g_WeatherData->type) {
|
||||
case WEATHERTYPE_RAIN:
|
||||
weatherTickRain(g_WeatherData);
|
||||
break;
|
||||
case WEATHERTYPE_SNOW:
|
||||
weatherTickSnow(g_WeatherData);
|
||||
break;
|
||||
}
|
||||
switch (g_WeatherData->type) {
|
||||
case WEATHERTYPE_RAIN:
|
||||
weatherTickRain(g_WeatherData);
|
||||
break;
|
||||
case WEATHERTYPE_SNOW:
|
||||
weatherTickSnow(g_WeatherData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ extern s32 var8005dd18;
|
||||
|
||||
void mainInit(void);
|
||||
void mainProc(void);
|
||||
void mainOverrideVariable(char *name, void *value);
|
||||
void mainLoop(void);
|
||||
void mainTick(void);
|
||||
void mainEndStage(void);
|
||||
|
||||
@@ -522,14 +522,6 @@ void joy00014238(void)
|
||||
|
||||
void joyDebugJoy(void)
|
||||
{
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
static u32 var8005ef08 = 0;
|
||||
|
||||
mainOverrideVariable("debugjoy", &var8005ef08);
|
||||
#else
|
||||
mainOverrideVariable("joyforce", &var800612c8nb);
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (g_Vars.paksconnected) {
|
||||
joyCheckPfs(1);
|
||||
|
||||
@@ -864,20 +864,6 @@ void mainProc(void)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* It's suspected that this function would have allowed developers to override
|
||||
* the value of variables while the game is running in order to view their
|
||||
* effects immediately rather than having to recompile the game each time.
|
||||
*
|
||||
* The developers would have used rmon to create a table of name/value pairs,
|
||||
* then this function would have looked up the given variable name in the table
|
||||
* and written the new value to the variable's address.
|
||||
*/
|
||||
void mainOverrideVariable(char *name, void *value)
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
/**
|
||||
* This function enters an infinite loop which iterates once per stage load.
|
||||
|
||||
Reference in New Issue
Block a user