mirror of
https://github.com/n64decomp/mk64
synced 2026-08-03 00:26:41 -04:00
@@ -712,8 +712,8 @@ void update_obj_banana(struct BananaActor *banana) {
|
||||
} else {
|
||||
controller = &gControllers[banana->rot[0]];
|
||||
}
|
||||
if ((controller->buttonDepressed & 0x2000) != 0) {
|
||||
controller->buttonDepressed &= ~0x2000;
|
||||
if ((controller->buttonDepressed & Z_TRIG) != 0) {
|
||||
controller->buttonDepressed &= ~Z_TRIG;
|
||||
banana->state = 1;
|
||||
banana->unk_04 = 0x00B4;
|
||||
player->statusEffects &= ~0x40000;
|
||||
|
||||
+54
-166
@@ -9,7 +9,7 @@
|
||||
#include "math_util_2.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "code_8001F980.h"
|
||||
#include "code_800431B0.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_80071F00.h"
|
||||
#include "code_80086E70.h"
|
||||
@@ -2837,17 +2837,14 @@ loop_2:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005D1F4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 dma_textures(? *, ?, ?); // extern
|
||||
extern ? D_0F05D1E8;
|
||||
extern ? D_0F05D420;
|
||||
extern ? D_0F05D674;
|
||||
extern ? D_0F05DA50;
|
||||
extern ? D_0F05DDFC;
|
||||
extern ? D_0F05DFC0;
|
||||
extern ? D_0F05E19C;
|
||||
extern ? D_0F05E3E0;
|
||||
extern Gfx D_0F05D1E8[];
|
||||
extern Gfx D_0F05D420[];
|
||||
extern Gfx D_0F05D674[];
|
||||
extern Gfx D_0F05DA50[];
|
||||
extern Gfx D_0F05DDFC[];
|
||||
extern Gfx D_0F05DFC0[];
|
||||
extern Gfx D_0F05E19C[];
|
||||
extern Gfx D_0F05E3E0[];
|
||||
extern s32 D_8018D420;
|
||||
extern s32 D_8018D424;
|
||||
extern s32 D_8018D438;
|
||||
@@ -2865,13 +2862,10 @@ extern s32 D_8018D464;
|
||||
extern s32 D_8018D468;
|
||||
extern s32 D_8018D46C;
|
||||
extern s32 D_8018D470;
|
||||
extern s32 D_8018D474;
|
||||
extern s32 D_8018D478;
|
||||
extern s32 D_8018D480;
|
||||
extern s32 D_8018D484;
|
||||
extern s32 D_8018D488;
|
||||
extern s32 D_8018D48C;
|
||||
extern s32 D_8018D490;
|
||||
extern s32 D_8018D494;
|
||||
extern s32 D_8018D498;
|
||||
extern s32 D_8018D49C;
|
||||
@@ -2886,35 +2880,35 @@ extern s32 D_8018D4BC;
|
||||
extern s32 D_8018D4C0;
|
||||
extern s32 D_8018D4C4;
|
||||
extern s32 D_8018D4C8;
|
||||
extern ? gTexture69B03C;
|
||||
extern ? gTexture69B140;
|
||||
extern ? gTexture69B378;
|
||||
extern ? gTexture69B960;
|
||||
extern ? gTexture69BA28;
|
||||
extern ? gTexture69C1E8;
|
||||
extern ? gTexture69C354;
|
||||
extern ? gTexture69C4E4;
|
||||
extern ? gTexture69C80C;
|
||||
extern ? gTexture69C9C4;
|
||||
extern ? gTexture69CB84;
|
||||
extern ? gTexture69CCEC;
|
||||
extern ? gTexture69CEB8;
|
||||
extern ? gTexture69D148;
|
||||
extern ? gTexture69D4E0;
|
||||
extern ? gTexture69D8FC;
|
||||
extern ? gTexture69DCB4;
|
||||
extern ? gTexture69DFA0;
|
||||
extern ? gTexture69E25C;
|
||||
extern ? gTexture69E518;
|
||||
extern ? gTexture69E7A8;
|
||||
extern ? gTexture69EA18;
|
||||
extern ? gTexture69EC54;
|
||||
extern ? gTexture69EE38;
|
||||
extern ? gTexture69EFE0;
|
||||
extern ? gTextureBoingExclamation;
|
||||
extern ? gTextureKartShadow;
|
||||
extern ? gTextureLightningBolt0;
|
||||
extern ? gTextureLightningBolt1;
|
||||
extern u8 gTexture69B03C[];
|
||||
extern u8 gTexture69B140[];
|
||||
extern u8 gTexture69B378[];
|
||||
extern u8 gTexture69B960[];
|
||||
extern u8 gTexture69BA28[];
|
||||
extern u8 gTexture69C1E8[];
|
||||
extern u8 gTexture69C354[];
|
||||
extern u8 gTexture69C4E4[];
|
||||
extern u8 gTexture69C80C[];
|
||||
extern u8 gTexture69C9C4[];
|
||||
extern u8 gTexture69CB84[];
|
||||
extern u8 gTexture69CCEC[];
|
||||
extern u8 gTexture69CEB8[];
|
||||
extern u8 gTexture69D148[];
|
||||
extern u8 gTexture69D4E0[];
|
||||
extern u8 gTexture69D8FC[];
|
||||
extern u8 gTexture69DCB4[];
|
||||
extern u8 gTexture69DFA0[];
|
||||
extern u8 gTexture69E25C[];
|
||||
extern u8 gTexture69E518[];
|
||||
extern u8 gTexture69E7A8[];
|
||||
extern u8 gTexture69EA18[];
|
||||
extern u8 gTexture69EC54[];
|
||||
extern u8 gTexture69EE38[];
|
||||
extern u8 gTexture69EFE0[];
|
||||
extern u8 gTextureBoingExclamation[];
|
||||
extern u8 gTextureKartShadow[];
|
||||
extern u8 gTextureLightningBolt0[];
|
||||
extern u8 gTextureLightningBolt1[];
|
||||
|
||||
void func_8005D290(void) {
|
||||
D_8018D488 = dma_textures(&gTexture69C80C, 0x400, 0x400);
|
||||
@@ -2956,9 +2950,6 @@ void func_8005D290(void) {
|
||||
D_8018D4C4 = dma_textures(&gTextureLightningBolt0, 0x800, 0x800);
|
||||
D_8018D4C8 = dma_textures(&gTextureLightningBolt1, 0x800, 0x800);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005D290.s")
|
||||
#endif
|
||||
|
||||
void func_8005D6C0(Player* player) {
|
||||
s32 temp_v0;
|
||||
@@ -8909,126 +8900,23 @@ void func_8006AFD0(Player *player, s16 arg1, s8 arg2, s8 arg3) {
|
||||
func_80021E10((f32 (*)[4]) &sp140[0], &sp134, &sp12C);
|
||||
func_80021F84((f32 (*)[4]) &sp140[0], var_f20);
|
||||
func_80022180(&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0, (f32 (*)[4]) &sp140[0]);
|
||||
temp_v0_3 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_3 + 8;
|
||||
temp_v0_3->words.w0 = 0x01020040;
|
||||
temp_v0_3->words.w1 = (s32) (&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0) & 0x1FFFFFFF;
|
||||
temp_v0_4 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_4 + 8;
|
||||
temp_v0_4->words.w1 = (u32) D_0D008DB8;
|
||||
temp_v0_4->words.w0 = 0x06000000;
|
||||
temp_v0_5 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_5 + 8;
|
||||
temp_v0_5->words.w0 = 0xFD100000;
|
||||
temp_v0_5->words.w1 = (u32) &D_800E52D0;
|
||||
temp_v0_6 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_6 + 8;
|
||||
temp_v0_6->words.w0 = 0xE8000000;
|
||||
temp_v0_6->words.w1 = 0;
|
||||
temp_v0_7 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_7 + 8;
|
||||
temp_v0_7->words.w0 = 0xF5000100;
|
||||
temp_v0_7->words.w1 = 0x07000000;
|
||||
temp_v0_8 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_8 + 8;
|
||||
temp_v0_8->words.w0 = 0xE6000000;
|
||||
temp_v0_8->words.w1 = 0;
|
||||
temp_v0_9 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_9 + 8;
|
||||
temp_v0_9->words.w0 = 0xF0000000;
|
||||
temp_v0_9->words.w1 = 0x073FC000;
|
||||
temp_v0_10 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_10 + 8;
|
||||
spB0 = temp_v0_10;
|
||||
temp_v0_10->words.w0 = 0xE7000000;
|
||||
temp_v0_10->words.w1 = 0;
|
||||
temp_v0_11 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_11 + 8;
|
||||
spAC = temp_v0_11;
|
||||
temp_v0_11->words.w0 = 0xBA000E02;
|
||||
spAC->words.w1 = 0x00008000;
|
||||
|
||||
gSPMatrix(gDisplayListHead++, PHYSICAL_TO_VIRTUAL(&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, 0x800E52D0);
|
||||
gDPSetTextureLUT(gDisplayListHead++, G_TT_RGBA16);
|
||||
|
||||
func_8004B614((s32) sp128, (s32) sp126, (s32) sp124, (s32) sp122, (s32) sp120, (s32) sp11E, 0x000000D8);
|
||||
temp_v0_12 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_12 + 8;
|
||||
temp_v0_12->words.w0 = 0xB900031D;
|
||||
temp_v0_12->words.w1 = 0x00505978;
|
||||
temp_v0_13 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_13 + 8;
|
||||
temp_v0_13->words.w0 = 0xFD500000;
|
||||
temp_v0_13->words.w1 = D_8018D4BC;
|
||||
temp_v0_14 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_14 + 8;
|
||||
temp_v0_14->words.w1 = 0x07080200;
|
||||
temp_v0_14->words.w0 = 0xF5500000;
|
||||
temp_v0_15 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_15 + 8;
|
||||
temp_v0_15->words.w1 = 0;
|
||||
temp_v0_15->words.w0 = 0xE6000000;
|
||||
temp_v0_16 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_16 + 8;
|
||||
temp_v0_16->words.w1 = 0x073FF100;
|
||||
temp_v0_16->words.w0 = 0xF3000000;
|
||||
temp_v0_17 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_17 + 8;
|
||||
temp_v0_17->words.w1 = 0;
|
||||
temp_v0_17->words.w0 = 0xE7000000;
|
||||
temp_v0_18 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_18 + 8;
|
||||
temp_v0_18->words.w0 = 0xF5481000;
|
||||
temp_v0_18->words.w1 = 0x00080200;
|
||||
temp_v0_19 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_19 + 8;
|
||||
temp_v0_19->words.w0 = 0xF2000000;
|
||||
temp_v0_19->words.w1 = 0x000FC07C;
|
||||
temp_v0_20 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_20 + 8;
|
||||
temp_v0_20->words.w1 = (u32) &D_800E5250;
|
||||
temp_v0_20->words.w0 = 0x0400103F;
|
||||
temp_v0_21 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_21 + 8;
|
||||
temp_v0_21->words.w1 = (u32) D_0D008C78;
|
||||
temp_v0_21->words.w0 = 0x06000000;
|
||||
temp_v0_22 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_22 + 8;
|
||||
temp_v0_22->words.w0 = 0xFD500000;
|
||||
temp_v0_22->words.w1 = D_8018D4C0 - 0x40;
|
||||
temp_v0_23 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_23 + 8;
|
||||
temp_v0_23->words.w1 = 0x07080200;
|
||||
temp_v0_23->words.w0 = 0xF5500000;
|
||||
temp_v0_24 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_24 + 8;
|
||||
temp_v0_24->words.w1 = 0;
|
||||
temp_v0_24->words.w0 = 0xE6000000;
|
||||
temp_v0_25 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_25 + 8;
|
||||
temp_v0_25->words.w1 = 0x073FF100;
|
||||
temp_v0_25->words.w0 = 0xF3000000;
|
||||
temp_v0_26 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_26 + 8;
|
||||
temp_v0_26->words.w1 = 0;
|
||||
temp_v0_26->words.w0 = 0xE7000000;
|
||||
temp_v0_27 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_27 + 8;
|
||||
temp_v0_27->words.w0 = 0xF5481000;
|
||||
temp_v0_27->words.w1 = 0x00080200;
|
||||
temp_v0_28 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_28 + 8;
|
||||
temp_v0_28->words.w0 = 0xF2000000;
|
||||
temp_v0_28->words.w1 = 0x000FC07C;
|
||||
temp_v0_29 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_29 + 8;
|
||||
temp_v0_29->words.w1 = (u32) &D_800E5290;
|
||||
temp_v0_29->words.w0 = 0x0400103F;
|
||||
temp_v0_30 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_30 + 8;
|
||||
temp_v0_30->words.w1 = (u32) D_0D008C78;
|
||||
temp_v0_30->words.w0 = 0x06000000;
|
||||
temp_v0_31 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_31 + 8;
|
||||
temp_v0_31->words.w1 = 0x00010001;
|
||||
temp_v0_31->words.w0 = 0xBB000000;
|
||||
D_80164AF0 += 1;
|
||||
|
||||
gDPSetRenderMode(gDisplayListHead++, AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D4BC, G_IM_FMT_CI, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPVertex(gDisplayListHead++, D_800E5250, 4, 0);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008C78);
|
||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D4C0 - 0x40, G_IM_FMT_CI, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPVertex(gDisplayListHead++, D_800E5290, 4, 0);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008C78);
|
||||
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
|
||||
D_80164AF0++;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006AFD0.s")
|
||||
|
||||
+1
-1
@@ -1274,7 +1274,7 @@ UNUSED void func_8008A2CC(s32 objectIndex, s32 cameraId, u16 arg2) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 func_8008A364(s32 objectIndex, s32 cameraId, u16 arg2, s32 arg3) {
|
||||
s32 func_8008A364(s32 objectIndex, s32 cameraId, u16 arg2, s32 arg3) {
|
||||
Camera *camera;
|
||||
u32 var_v1;
|
||||
u16 var_a2;
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ s32 func_8008A0B4(s32, Player*, Camera*, u16);
|
||||
s32 func_8008A140(s32, Camera*, u16);
|
||||
void func_8008A1D0(s32, s32, s32, s32);
|
||||
void func_8008A2CC(s32, s32, u16);
|
||||
u32 func_8008A364(s32, s32, u16, s32);
|
||||
s32 func_8008A364(s32, s32, u16, s32);
|
||||
void func_8008A454(s32, s32, s32);
|
||||
void func_8008A4CC(s32);
|
||||
void func_8008A610(s32);
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#include "code_80005FD0.h"
|
||||
#include "code_8001F980.h"
|
||||
#include "code_80027D00.h"
|
||||
#include "code_800431B0.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "audio/external.h"
|
||||
|
||||
+2
-3
@@ -325,6 +325,7 @@ void func_80092258(void); // todo remove this line
|
||||
void func_80091FA4(void) {
|
||||
s32 i;
|
||||
|
||||
// todo: These sizes need to be sizeof() for shiftability if possible
|
||||
D_8018D9B4 = get_next_available_memory_addr(0x00002800);
|
||||
D_8018D9B0 = get_next_available_memory_addr(0x000124F8);
|
||||
D_8018D9B8 = get_next_available_memory_addr(0x00001000);
|
||||
@@ -11262,7 +11263,6 @@ void func_800A7790(struct_8018D9E0_entry *arg0) {
|
||||
s32 creditIndex;
|
||||
s8 slideDirection;
|
||||
UNUSED s32 pad;
|
||||
|
||||
creditIndex = arg0->type - 0x190;
|
||||
set_text_color(D_802850C0[creditIndex].textColor);
|
||||
slideDirection = D_802850C0[creditIndex].slideDirection;
|
||||
@@ -11292,8 +11292,7 @@ void convert_number_to_ascii(s32 number, char *buffer) {
|
||||
void write_dashes(char *buffer) {
|
||||
buffer[0] = 0x2D;
|
||||
buffer[1] = 0x2D;
|
||||
// Terminator
|
||||
buffer[2] = 0;
|
||||
buffer[2] = '\0';
|
||||
}
|
||||
|
||||
// Originally func_800A78F4
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include "variables.h"
|
||||
#include "common_textures.h"
|
||||
#include "code_8001F980.h"
|
||||
#include "code_800431B0.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_80280650.h"
|
||||
|
||||
void func_80280650(void) {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#include "main.h"
|
||||
#include "math_util.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include "code_800431B0.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_80091750.h"
|
||||
#include "code_80280650.h"
|
||||
|
||||
+3
-1
@@ -220,7 +220,8 @@ void thread9_crash_screen(UNUSED void *arg0)
|
||||
// Run only on the first iteration.
|
||||
if (sCounter == 0) {
|
||||
crash_screen_draw_square((u16 *)pFramebuffer);
|
||||
|
||||
//#define SKIP_DRAW_SQUARE
|
||||
#ifndef SKIP_DRAW_SQUARE
|
||||
while(1)
|
||||
{
|
||||
read_controllers();
|
||||
@@ -238,6 +239,7 @@ void thread9_crash_screen(UNUSED void *arg0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
crash_screen_draw_info((u16 *) pFramebuffer, thread);
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,6 +17,6 @@ UNUSED void gfx_func_80040D00(void) {
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
guOrtho(&gGfxPool->mtxPool[0], 0.0f, 320.0f, 0.0f, 240.0f, -1.0f, 1.0f, 1.0f);
|
||||
gDPHalf1(gDisplayListHead++, 0x0000FFFF);
|
||||
gSPMatrix(gDisplayListHead++, (u32) gGfxPool & 0x1FFFFFFF, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, (u32) &D_0D008E98 & 0x1FFFFFFF, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
}
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(gGfxPool), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&D_0D008E98), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
#ifndef CODE_800431B0_H
|
||||
#define CODE_800431B0_H
|
||||
#ifndef hud_renderer_H
|
||||
#define hud_renderer_H
|
||||
|
||||
#include "common_structs.h"
|
||||
|
||||
@@ -205,7 +205,7 @@ void func_8004BD14(s32, s32, u32, u32, s32, s8*, s8*);
|
||||
|
||||
void func_8004C024(s16, s16, s16, u16, u16, u16, u16);
|
||||
void func_8004C148(s16, s16, s16, u16, u16, u16, u16);
|
||||
void func_8004C268(s32, s32, s32, u32, u32, u32, s32);
|
||||
//void func_8004C268(s32, s32, s32, u32, u32, u32, s32);
|
||||
void func_8004C354();
|
||||
void func_8004C35C();
|
||||
void func_8004C364(s32, s32, u32, u32, s32);
|
||||
@@ -370,7 +370,7 @@ void func_800573CC();
|
||||
void func_800573D4();
|
||||
void func_800573DC();
|
||||
void func_800573E4(s32, s32, s8);
|
||||
void func_80057454(s32*, s32*);
|
||||
void debug_wrap_text(s32*, s32*);
|
||||
void func_80057708();
|
||||
void load_debug_font();
|
||||
void func_80057778();
|
||||
@@ -383,7 +383,7 @@ void func_80057908(s32, s32, s8*, s32);
|
||||
void func_80057960(s32, s32, s8*, s32);
|
||||
void func_800579B8(s32, s32, s8*);
|
||||
void func_800579F8(s32, s32, s8*, s32);
|
||||
void func_80057A50(s32, s32, char*, s32);
|
||||
void func_80057A50(s32*, s32*, char*, s32);
|
||||
void func_80057AA8(s32, s32, s8*, s32);
|
||||
void func_80057B14(s32, s32, s8*, s32);
|
||||
void func_80057B80(s32, s32, s8*, s32);
|
||||
+3
-1
@@ -17,7 +17,7 @@
|
||||
#include "profiler.h"
|
||||
#include "race_logic.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include "code_800431B0.h"
|
||||
#include "hud_renderer.h"
|
||||
#include "code_8008C1D0.h"
|
||||
#include "code_80281780.h"
|
||||
#include "audio/external.h"
|
||||
@@ -1099,6 +1099,8 @@ void update_gamestate(void) {
|
||||
gCurrentlyLoadedCourseId = COURSE_NULL;
|
||||
break;
|
||||
case RACING:
|
||||
// @bug Reloading this segment makes random_u16() deterministic for player spawn order.
|
||||
// In laymens terms, random_u16() outputs the same value everytime.
|
||||
init_seg_8028DF00();
|
||||
setup_race();
|
||||
break;
|
||||
|
||||
+18
-16
@@ -4,27 +4,30 @@
|
||||
#include <variables.h>
|
||||
#include <main.h>
|
||||
#include "framebuffers.h"
|
||||
#include <PR/rcp.h>
|
||||
// Location based from sm64.
|
||||
// This may need to be moved before framebuffers.c
|
||||
// If math_util has data that does not line-up with trig_tables.
|
||||
#include "trig_tables.inc.c"
|
||||
#pragma intrinsic (sqrtf)
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
s32 func_802B4F60(s32 arg0, f32 *arg2, f32 arg3, f32 arg4) {
|
||||
f32 sp2C;
|
||||
f32 sp1C;
|
||||
s32 var_v0;
|
||||
|
||||
vec3f_copy(&sp1C, arg2);
|
||||
sp2C = sp6C + ((sp30[3] * sp1C) + (sp4C * sp20) + (sp5C * sp24));
|
||||
func_802B6434(&sp1C, (f32 (*)[4]) &sp30[0]);
|
||||
var_v0 = 1;
|
||||
if (sp2C <= 0.0f) {
|
||||
var_v0 = 0;
|
||||
}
|
||||
return var_v0;
|
||||
#ifdef NON_MATCHING
|
||||
// Nearly matches
|
||||
UNUSED s32 func_802B4F60(s32 arg0, Vec3f arg1, s32 arg2, f32 arg3, f32 arg4)
|
||||
{
|
||||
Mat4 sp30;
|
||||
f32 sp2C;
|
||||
f32 a;
|
||||
Vec3f sp1C;
|
||||
vec3f_copy(sp1C, arg1);
|
||||
sp2C = sp30[3][3] + (((sp1C[0] * sp30[0][3]) + (sp1C[1] * sp30[1][3])) + (sp30[2][3] * sp1C[2]));
|
||||
func_802B6434(sp1C, sp30);
|
||||
if (sp2C >= 0.0f)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/math_util/func_802B4F60.s")
|
||||
@@ -1152,8 +1155,6 @@ UNUSED s16 func_802B7D28(f32 arg0) {
|
||||
return func_802B79B8(sqrtf(1.0 - (f64)(arg0 * arg0)), arg0) * 32768.0f / 3.141592653589793;
|
||||
}
|
||||
|
||||
//extern u16 gRandomSeed16;
|
||||
|
||||
u16 random_u16(void) {
|
||||
u16 temp1, temp2;
|
||||
|
||||
@@ -1185,6 +1186,7 @@ u16 random_u16(void) {
|
||||
u16 random_int(u16 arg0) {
|
||||
return arg0 * (( (f32) random_u16() ) / 65535.0);
|
||||
}
|
||||
|
||||
s16 func_802B7F34(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||
return atan2s(arg2 - arg0, arg3 - arg1);
|
||||
}
|
||||
|
||||
+16
-1
@@ -846,6 +846,21 @@ void course_data_menu_act(struct Controller *controller, UNUSED u16 arg1) {
|
||||
void logo_intro_menu_act(struct Controller *arg0, UNUSED u16 arg1) {
|
||||
u16 anyInput = arg0->buttonPressed | arg0->stickPressed;
|
||||
|
||||
// Note: Choosing a course in the middle of a cup
|
||||
// will contain no definition for player staging/lineup.
|
||||
//#define SKIP_TO_RACE
|
||||
#ifdef SKIP_TO_RACE
|
||||
gGamestateNext = 4; // Enter race state
|
||||
gCCSelection = 1;
|
||||
gCupSelection = 1;
|
||||
gCupCourseSelection = 0;
|
||||
gCurrentCourseId = 0;
|
||||
gScreenModeSelection = 0;
|
||||
gCharacterSelections[0] = 0;
|
||||
gModeSelection = 0;
|
||||
D_8018EDF3 = 1;
|
||||
#endif
|
||||
|
||||
if ((func_800B4520() == 0) && (anyInput)) {
|
||||
// Audio related
|
||||
func_800CA388(0x3C);
|
||||
@@ -1782,7 +1797,7 @@ void course_select_menu_act(struct Controller *arg0, u16 arg1) {
|
||||
void func_800B3F74(s32 menuSelection) {
|
||||
s32 i;
|
||||
|
||||
gDebugMenuSelection = DEBUG_MENU_DISABLED;
|
||||
gDebugMenuSelection = DEBUG_MENU;
|
||||
gMenuTimingCounter = 0;
|
||||
gMenuDelayTimer = 0;
|
||||
D_8018EE08 = 0;
|
||||
|
||||
@@ -439,8 +439,11 @@ void func_80039F44(f32 *arg0, f32 *arg1, f32 arg2) {
|
||||
rand = random_int(7);
|
||||
} while(rand == gCharacterSelections[0]);
|
||||
|
||||
// Randomize gPlayerTwo
|
||||
D_80165560[0] = rand;
|
||||
|
||||
// Chooses arr[0] as a fallback to prevent duplicating characters.
|
||||
// If it doesn't find the if, it will grab the final index as a fallback.
|
||||
for (i = 1; i < 7; i++) {
|
||||
u16* arr = (u16 *) D_800E3890[gCharacterSelections[0]];
|
||||
if (rand == arr[i]) {
|
||||
|
||||
Reference in New Issue
Block a user