mirror of
https://github.com/n64decomp/mk64
synced 2026-08-15 20:39:56 -04:00
Match func_8006F008 (#519)
This commit is contained in:
+126
-143
@@ -20,6 +20,7 @@
|
||||
#include "main.h"
|
||||
#include "menus.h"
|
||||
#include "data/other_textures.h"
|
||||
#include "hud_renderer.h"
|
||||
|
||||
void init_object_list(void) {
|
||||
|
||||
@@ -250,223 +251,205 @@ void func_8006EF60(void) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EF60.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-09-2023
|
||||
extern s32 D_801655C8;
|
||||
extern s16 D_80165718;
|
||||
extern s16 D_80165720;
|
||||
extern s16 D_80165728;
|
||||
extern u8 *D_80165880;
|
||||
extern f32 D_8018D2A0;
|
||||
extern s16 D_8018D2C0;
|
||||
extern s16 D_8018D2D8;
|
||||
extern s16 D_8018D2E0;
|
||||
extern s16 D_8018D2E8;
|
||||
extern s16 D_8018D300;
|
||||
extern s16 D_8018D308;
|
||||
extern s16 D_8018D310;
|
||||
extern s16 D_8018D318;
|
||||
s16 gCurrentCourseId; /* unable to generate initializer */
|
||||
static u8 gTextureExhaust0[0x479];
|
||||
static u8 gTextureExhaust1[0x485];
|
||||
static u8 gTextureExhaust2[0x4F4];
|
||||
static u8 gTextureExhaust3[0x3C8];
|
||||
static u8 gTextureExhaust4[0x3F8];
|
||||
static u8 gTextureExhaust5[0x443];
|
||||
|
||||
//static u8 gTextureExhaust0[0x479];
|
||||
//static u8 gTextureExhaust1[0x485];
|
||||
//static u8 gTextureExhaust2[0x4F4];
|
||||
//static u8 gTextureExhaust3[0x3C8];
|
||||
//static u8 gTextureExhaust4[0x3F8];
|
||||
//static u8 gTextureExhaust5[0x443];
|
||||
|
||||
void func_8006F008(void) {
|
||||
s16 temp_a0;
|
||||
s16 var_t9;
|
||||
|
||||
D_801655C8 = 0;
|
||||
xOrientation = 1.0f;
|
||||
if (gIsMirrorMode != 0) {
|
||||
xOrientation = -1.0f;
|
||||
}
|
||||
D_8018D2C0.unk0 = 0x0101;
|
||||
D_8018D2D8.unk0 = 0x00AA;
|
||||
D_8018D300 = 0x00FF;
|
||||
D_8018D308 = 0x00FF;
|
||||
temp_a0 = gCurrentCourseId;
|
||||
D_8018D310 = 0x00FF;
|
||||
D_8018D318 = 0x00FF;
|
||||
if (temp_a0 < 0x14) {
|
||||
func_8006EEE8((s32) temp_a0);
|
||||
D_8018D2C0[0] = 257;
|
||||
D_8018D2D8[0] = 170;
|
||||
D_8018D300 = 255;
|
||||
D_8018D308 = 255;
|
||||
D_8018D310 = 255;
|
||||
D_8018D318 = 255;
|
||||
if (gCurrentCourseId < NUM_COURSES - 1) {
|
||||
func_8006EEE8((s32) gCurrentCourseId);
|
||||
}
|
||||
switch (temp_a0) {
|
||||
case 0:
|
||||
D_8018D220 = dma_textures(gTextureExhaust5, 0x00000443U, 0x00001000U);
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
D_8018D220 = dma_textures(gTextureExhaust5, 0x443, 0x1000);
|
||||
D_8018D2A0 = 0.022f;
|
||||
D_8018D2E0 = 6;
|
||||
D_8018D2E8 = 0x001C;
|
||||
D_8018D2C0.unk0 = 0x0104;
|
||||
D_8018D2D8.unk0 = 0x00AA;
|
||||
D_8018D2E8 = 28;
|
||||
D_8018D2C0[0] = 260;
|
||||
D_8018D2D8[0] = 170;
|
||||
D_80165718 = 0;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -0x00F0;
|
||||
D_80165728 = -240;
|
||||
break;
|
||||
case 1:
|
||||
case COURSE_CHOCO_MOUNTAIN:
|
||||
D_8018D2A0 = 0.022f;
|
||||
D_8018D2C0.unk0 = 0x0109;
|
||||
D_8018D2E0 = 0x0013;
|
||||
var_t9 = 0x0025;
|
||||
block_26:
|
||||
D_8018D2E8 = var_t9;
|
||||
D_8018D2C0[0] = 265;
|
||||
D_8018D2E0 = 19;
|
||||
D_8018D2E8 = 37;
|
||||
break;
|
||||
case 2:
|
||||
D_8018D2C0.unk0 = 0x0109;
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
D_8018D2C0[0] = 265;
|
||||
D_8018D2A0 = 0.0174f;
|
||||
D_8018D2E0 = 0x000C;
|
||||
D_8018D2E8 = 0x0030;
|
||||
D_8018D2E0 = 12;
|
||||
D_8018D2E8 = 48;
|
||||
break;
|
||||
case 3:
|
||||
D_80165880 = dma_textures(gTextureGhosts, 0x00004CC2U, 0x0000D980U);
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
D_80165880 = dma_textures(gTextureGhosts, 0x4CC2, 0xD980);
|
||||
D_8018D2A0 = 0.016f;
|
||||
D_8018D2C0.unk0 = 0x0106;
|
||||
D_8018D2E0 = 0x0037;
|
||||
D_8018D2E8 = 0x0027;
|
||||
D_8018D2C0[0] = 0x0106;
|
||||
D_8018D2E0 = 55;
|
||||
D_8018D2E8 = 39;
|
||||
break;
|
||||
case 4:
|
||||
D_8018D220 = dma_textures(gTextureExhaust0, 0x00000479U, 0x00000C00U);
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
D_8018D220 = dma_textures(gTextureExhaust0, 0x479, 0xC00);
|
||||
D_8018D2A0 = 0.018f;
|
||||
D_8018D2E0 = 0x003D;
|
||||
D_8018D2E8 = 0x0026;
|
||||
D_8018D2E0 = 61;
|
||||
D_8018D2E8 = 38;
|
||||
break;
|
||||
case 5:
|
||||
D_8018D2C0.unk0 = 0x0106;
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2A0 = 0.016f;
|
||||
D_8018D2E0 = 0x0024;
|
||||
D_8018D2E8 = 0x0028;
|
||||
D_8018D300 = 0x0048;
|
||||
D_8018D308 = 0x0064;
|
||||
D_8018D310 = 0x00FF;
|
||||
D_8018D2E0 = 36;
|
||||
D_8018D2E8 = 40;
|
||||
D_8018D300 = 72;
|
||||
D_8018D308 = 100;
|
||||
D_8018D310 = 255;
|
||||
break;
|
||||
case 6:
|
||||
D_8018D220 = dma_textures(gTextureExhaust3, 0x000003C8U, 0x00001000U);
|
||||
case COURSE_KOOPA_BEACH:
|
||||
D_8018D220 = dma_textures(gTextureExhaust3, 0x3C8U, 0x1000);
|
||||
D_8018D2A0 = 0.014f;
|
||||
D_8018D2C0.unk0 = 0x010C;
|
||||
D_8018D2E0 = 0x0028;
|
||||
D_8018D2E8 = 0x0015;
|
||||
D_8018D2C0[0] = 268;
|
||||
D_8018D2E0 = 40;
|
||||
D_8018D2E8 = 21;
|
||||
break;
|
||||
case 7:
|
||||
D_8018D220 = dma_textures(gTextureExhaust4, 0x000003F8U, 0x00001000U);
|
||||
D_8018D2C0.unk0 = 0x0106;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
D_8018D220 = dma_textures(gTextureExhaust4, 0x3F8, 0x1000);
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2A0 = 0.014f;
|
||||
D_8018D2E0 = 0x0025;
|
||||
D_8018D2E8 = 0x0032;
|
||||
D_80165718 = -0x0040;
|
||||
D_8018D2E0 = 37;
|
||||
D_8018D2E8 = 50;
|
||||
D_80165718 = -64;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -0x014A;
|
||||
D_80165728 = -330;
|
||||
break;
|
||||
case 8:
|
||||
D_8018D220 = dma_textures(gTextureExhaust2, 0x000004F4U, 0x00000C00U);
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
D_8018D220 = dma_textures(gTextureExhaust2, 0x4F4U, 0xC00);
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0.unk0 = 0x010F;
|
||||
D_8018D2E0 = 0x002D;
|
||||
D_8018D2E8 = 0x003C;
|
||||
D_80165718 = -0x008C;
|
||||
D_80165720 = -0x002C;
|
||||
D_80165728 = -0x00D7;
|
||||
D_8018D2C0[0] = 271;
|
||||
D_8018D2E0 = 45;
|
||||
D_8018D2E8 = 60;
|
||||
D_80165718 = -140;
|
||||
D_80165720 = -44;
|
||||
D_80165728 = -215;
|
||||
break;
|
||||
case 9:
|
||||
D_8018D220 = dma_textures(gTextureExhaust0, 0x00000479U, 0x00000C00U);
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
D_8018D220 = dma_textures(gTextureExhaust0, 0x479, 0xC00);
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0.unk0 = 0x010F;
|
||||
D_8018D2E0 = 0x0012;
|
||||
D_8018D2E8 = 0x0024;
|
||||
D_8018D2C0[0] = 271;
|
||||
D_8018D2E0 = 18;
|
||||
D_8018D2E8 = 36;
|
||||
break;
|
||||
case 10:
|
||||
case COURSE_TOADS_TURNPIKE:
|
||||
D_8018D2A0 = 0.013f;
|
||||
D_8018D2C0.unk0 = 0x00FC;
|
||||
D_8018D2E0 = 0x0039;
|
||||
D_8018D2E8 = 0x002C;
|
||||
D_8018D2C0[0] = 252;
|
||||
D_8018D2E0 = 57;
|
||||
D_8018D2E8 = 44;
|
||||
break;
|
||||
case 11:
|
||||
D_8018D2C0.unk0 = 0x0107;
|
||||
D_8018D2D8.unk0 = 0x00A5;
|
||||
D_8018D220 = dma_textures(gTextureExhaust5, 0x00000443U, 0x00001000U);
|
||||
case COURSE_KALAMARI_DESERT:
|
||||
D_8018D2C0[0] = 263;
|
||||
D_8018D2D8[0] = 165;
|
||||
D_8018D220 = dma_textures(gTextureExhaust5, 0x443, 0x1000);
|
||||
D_8018D2A0 = 0.015f;
|
||||
D_8018D2E0 = 0x0037;
|
||||
D_8018D2E8 = 0x001B;
|
||||
D_8018D2E0 = 55;
|
||||
D_8018D2E8 = 27;
|
||||
break;
|
||||
case 12:
|
||||
D_8018D220 = dma_textures(gTextureExhaust1, 0x00000485U, 0x00000C00U);
|
||||
case COURSE_SHERBET_LAND:
|
||||
D_8018D220 = dma_textures(gTextureExhaust1, 0x485, 0xC00);
|
||||
D_8018D2A0 = 0.015f;
|
||||
D_8018D2C0.unk0 = 0x0106;
|
||||
D_8018D2E0 = 0x0034;
|
||||
D_8018D2E8 = 0x0021;
|
||||
D_8018D300 = 0x0048;
|
||||
D_8018D308 = 0x0064;
|
||||
D_8018D310 = 0x00FF;
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2E0 = 52;
|
||||
D_8018D2E8 = 33;
|
||||
D_8018D300 = 72;
|
||||
D_8018D308 = 100;
|
||||
D_8018D310 = 255;
|
||||
break;
|
||||
case 13:
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
D_8018D2A0 = 0.0103f;
|
||||
D_8018D2C0.unk0 = 0x0105;
|
||||
D_8018D2D8.unk0 = 0x00A6;
|
||||
D_8018D2E0 = 0x0027;
|
||||
D_8018D2E8 = 0x0037;
|
||||
D_8018D2C0[0] = 261;
|
||||
D_8018D2D8[0] = 166;
|
||||
D_8018D2E0 = 39;
|
||||
D_8018D2E8 = 55;
|
||||
break;
|
||||
case 14:
|
||||
case COURSE_WARIO_STADIUM:
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0.unk0 = 0x0106;
|
||||
D_8018D2E0 = 0x0035;
|
||||
D_8018D2E8 = 0x0023;
|
||||
D_8018D2C0[0] = 0x0106;
|
||||
D_8018D2E0 = 53;
|
||||
D_8018D2E8 = 35;
|
||||
break;
|
||||
case 15:
|
||||
case COURSE_BLOCK_FORT:
|
||||
D_8018D2A0 = 0.0335f;
|
||||
D_8018D2E0 = 0x0020;
|
||||
D_8018D2E8 = 0x0020;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 32;
|
||||
break;
|
||||
case 16:
|
||||
case COURSE_SKYSCRAPER:
|
||||
D_8018D2A0 = 0.0445f;
|
||||
D_8018D2E0 = 0x0020;
|
||||
D_8018D2E8 = 0x0020;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 32;
|
||||
break;
|
||||
case 17:
|
||||
case COURSE_DOUBLE_DECK:
|
||||
D_8018D2A0 = 0.0285f;
|
||||
D_8018D2E0 = 0x0020;
|
||||
D_8018D2E8 = 0x0020;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 32;
|
||||
break;
|
||||
case 18:
|
||||
case COURSE_DK_JUNGLE:
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0.unk0 = 0x00FF;
|
||||
D_8018D2E0 = 0x001D;
|
||||
D_8018D2E8 = 0x002F;
|
||||
D_8018D2C0[0] = 255;
|
||||
D_8018D2E0 = 29;
|
||||
D_8018D2E8 = 47;
|
||||
break;
|
||||
case 19:
|
||||
case COURSE_BIG_DONUT:
|
||||
D_8018D2A0 = 0.0257f;
|
||||
D_8018D2E0 = 0x0020;
|
||||
var_t9 = 0x001F;
|
||||
goto block_26;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 31;
|
||||
}
|
||||
if (gIsMirrorMode != 0) {
|
||||
D_8018D2E0 = D_8018D2B0 - D_8018D2E0;
|
||||
}
|
||||
if (gPlayerCount == 4) {
|
||||
D_8018D2C0.unk0 = 0x00A0;
|
||||
D_8018D2D8.unk0 = 0x0078;
|
||||
D_8018D2C0[0] = 160;
|
||||
D_8018D2D8[0] = 120;
|
||||
return;
|
||||
}
|
||||
if (gPlayerCount == 3) {
|
||||
D_8018D2C0.unk0 = 0x00EB;
|
||||
D_8018D2D8.unk0 = 0x00AF;
|
||||
D_8018D2C0[0] = 235;
|
||||
D_8018D2D8[0] = 175;
|
||||
return;
|
||||
}
|
||||
if (gPlayerCount == 2) {
|
||||
if (gCurrentCourseId != 0x000A) {
|
||||
D_8018D2C0.unk2 = 0x0109;
|
||||
D_8018D2C0.unk0 = D_8018D2C0.unk2;
|
||||
if (gCurrentCourseId != 10) {
|
||||
D_8018D2C0[1] = 265;
|
||||
D_8018D2C0[0] = D_8018D2C0[1];
|
||||
} else {
|
||||
D_8018D2C0.unk2 = 0x00FF;
|
||||
D_8018D2C0.unk0 = D_8018D2C0.unk2;
|
||||
D_8018D2C0[1] = 255;
|
||||
D_8018D2C0[0] = D_8018D2C0[1];
|
||||
}
|
||||
D_8018D2D8.unk0 = 0x0041;
|
||||
D_8018D2D8.unk2 = 0x00B4;
|
||||
D_8018D2D8[0] = 65;
|
||||
D_8018D2D8[1] = 180;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F008.s")
|
||||
#endif
|
||||
|
||||
extern s8 D_801657E4;
|
||||
extern bool8 D_801657E6;
|
||||
|
||||
Reference in New Issue
Block a user