mirror of
https://github.com/n64decomp/mk64
synced 2026-07-30 07:44:13 -04:00
EU 1.0 OK (#265)
* EU 1.0 ok * EU 1.1 ok Co-authored-by: AloXado320 <david.albujar.s.30@gmail.com>
This commit is contained in:
@@ -8,7 +8,11 @@
|
||||
#define AUDIO_LOCK_LOADING 0x19710515
|
||||
|
||||
#define NUMAIBUFFERS 3
|
||||
#ifdef VERSION_EU
|
||||
#define AIBUFFER_LEN (0xaa * 16)
|
||||
#else
|
||||
#define AIBUFFER_LEN (0xa0 * 16)
|
||||
#endif
|
||||
|
||||
// number of DMAs performed during this frame
|
||||
extern s32 gCurrAudioFrameDmaCount;
|
||||
|
||||
+63
-6
@@ -219,6 +219,10 @@ UNUSED u32 external_unused_u32s[]= { 0xff000000, 0xff000000, 0x00000000 };
|
||||
char external_unused_string11[] = "FX MIX %d\n";
|
||||
char external_unused_string12[] = "************** Seq Fadeout ***************\n";
|
||||
char external_unused_string13[] = "SEQ FADE OUT TIME %d\n";
|
||||
#ifdef VERSION_EU
|
||||
char external_unused_string_eu_02[] = "************** SE Fadeout ***************\n";
|
||||
char external_unused_string_eu_03[] = "SE FADE OUT TIME %d\n";
|
||||
#endif
|
||||
|
||||
// Requires void in the argument list to match properly.
|
||||
void func_800C13F0(void) {
|
||||
@@ -646,6 +650,10 @@ void func_800C2274(s32 player) {
|
||||
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C2274.s")
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VERSION_EU
|
||||
GLOBAL_ASM("asm/eu_nonmatchings/func_800C2474.s")
|
||||
#else
|
||||
void func_800C2474(void) {
|
||||
u8 var_v0;
|
||||
|
||||
@@ -723,6 +731,7 @@ void func_800C2474(void) {
|
||||
D_8018EFD8[var_v0].prev = var_v0 - 1;
|
||||
D_8018EFD8[var_v0].next = 0xFF;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_800C284C(u8 arg0, u8 arg1, u8 arg2, u16 arg3) {
|
||||
@@ -1146,6 +1155,22 @@ u8 func_800C357C(s32 arg0) {
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
#ifdef VERSION_EU
|
||||
u8 func_800C357C_eu(s32 arg0, s32 arg1) {
|
||||
u8 var_v1;
|
||||
u8 i;
|
||||
|
||||
i = D_800EA1E8;
|
||||
var_v1 = 1;
|
||||
for(i = D_800EA1E8; i < (s32) D_800EA1E4; i++) {
|
||||
if (arg0 == (D_80192CD0[i] & arg1)) {
|
||||
var_v1 = 0;
|
||||
i = D_800EA1E4;
|
||||
}
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_800C35E8(u8 arg0) {
|
||||
D_80192CC6[arg0] = 0;
|
||||
@@ -1428,7 +1453,11 @@ void func_800C3724(void) {
|
||||
} while (temp_t7 < 3);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C3724.s")
|
||||
#ifdef VERSION_EU
|
||||
GLOBAL_ASM("asm/eu_nonmatchings/func_800C3724.s")
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C3724.s")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void func_800C3F70(void) {
|
||||
@@ -2426,12 +2455,22 @@ void func_800C6108(u8 playerId) {
|
||||
D_800E9EB4[playerId] -= D_800E9DF4[playerId];
|
||||
}
|
||||
D_800E9EE4[playerId] = D_800E9EB4[playerId] - D_800E9EC4[playerId];
|
||||
if ((D_800E9EE4[playerId] > 0.5f) || (D_800E9EE4[playerId] < 0.5f)) {
|
||||
#ifdef VERSION_EU
|
||||
if ((D_800E9EE4[playerId] > 0.5f) || (D_800E9EE4[playerId] < -0.5f))
|
||||
#else
|
||||
if ((D_800E9EE4[playerId] > 0.5f) || (D_800E9EE4[playerId] < 0.5f))
|
||||
#endif
|
||||
{
|
||||
D_800E9ED4[playerId] = D_800E9EE4[playerId] * 0.25f;
|
||||
D_800E9F7C[playerId].unk_0C = D_800E9EC4[playerId] + D_800E9ED4[playerId] + D_800E9F34[playerId];
|
||||
} else {
|
||||
D_800E9F7C[playerId].unk_0C = D_800E9EB4[playerId] + D_800E9F34[playerId];
|
||||
}
|
||||
#ifdef VERSION_EU
|
||||
if (D_800E9F7C[playerId].unk_0C < 0.0f) {
|
||||
D_800E9F7C[playerId].unk_0C = 0.0f;
|
||||
}
|
||||
#endif
|
||||
if (D_800E9F7C[playerId].unk_0C > 4.0f) {
|
||||
D_800E9F7C[playerId].unk_0C = 4.0f;
|
||||
}
|
||||
@@ -2634,12 +2673,22 @@ void func_800C683C(u8 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#define C70A8_INDEX 0
|
||||
#define C70A8_INDEX2 0
|
||||
#define C70A8_INDEX3 1
|
||||
#else
|
||||
#define C70A8_INDEX 2
|
||||
#define C70A8_INDEX2 2
|
||||
#define C70A8_INDEX3 3
|
||||
#endif
|
||||
|
||||
void func_800C70A8(u8 playerId) {
|
||||
if (D_800EA0EC[playerId] == 0) {
|
||||
D_800E9E74[playerId] = 0;
|
||||
if ((D_800E9E54[playerId] > 3500.0f) || ((gPlayers[playerId].effects & 0x10) == 0x10)) {
|
||||
D_800E9E74[playerId] = 1;
|
||||
switch (gPlayers[playerId].boundingBoxCorners[2].surfaceType) { /* switch 1 */
|
||||
switch (gPlayers[playerId].boundingBoxCorners[C70A8_INDEX].surfaceType) {
|
||||
case 2: /* switch 1 */
|
||||
D_800E9E74[playerId] = 0x0000000D;
|
||||
break;
|
||||
@@ -2671,7 +2720,7 @@ void func_800C70A8(u8 playerId) {
|
||||
}
|
||||
if ((gPlayers[playerId].effects & 0x10) == 0x10) {
|
||||
D_800E9E74[playerId] = 2;
|
||||
switch (gPlayers[playerId].boundingBoxCorners[2].surfaceType) { /* switch 2 */
|
||||
switch (gPlayers[playerId].boundingBoxCorners[C70A8_INDEX2].surfaceType) { /* switch 2 */
|
||||
case 2: /* switch 2 */
|
||||
D_800E9E74[playerId] = 0x0000000D;
|
||||
break;
|
||||
@@ -2701,7 +2750,7 @@ void func_800C70A8(u8 playerId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (gPlayers[playerId].boundingBoxCorners[2].surfaceType) { /* switch 3 */
|
||||
switch (gPlayers[playerId].boundingBoxCorners[C70A8_INDEX2].surfaceType) { /* switch 3 */
|
||||
case 8: /* switch 3 */
|
||||
if (D_800E9E74[playerId] == 6) {
|
||||
D_800E9E74[playerId] = 4;
|
||||
@@ -2761,7 +2810,7 @@ void func_800C70A8(u8 playerId) {
|
||||
D_800E9E74[playerId] = 0x0000001B;
|
||||
break;
|
||||
}
|
||||
switch (gPlayers[playerId].boundingBoxCorners[3].surfaceType) { /* switch 4 */
|
||||
switch (gPlayers[playerId].boundingBoxCorners[C70A8_INDEX3].surfaceType) { /* switch 4 */
|
||||
case 8: /* switch 4 */
|
||||
if (D_800E9E74[playerId] == 5) {
|
||||
D_800E9E74[playerId] = 4;
|
||||
@@ -2836,6 +2885,13 @@ void func_800C70A8(u8 playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(VERSION_EU_1_0)
|
||||
GLOBAL_ASM("asm/eu_nonmatchings/func_800C76C0.s")
|
||||
#elif defined(VERSION_EU_1_1)
|
||||
GLOBAL_ASM("asm/eu_nonmatchings/func_800C76C0_v11.s")
|
||||
#else
|
||||
void func_800C76C0(u8 playerId) {
|
||||
if (D_800E9EA4[playerId] != 0) {
|
||||
if (D_800E9EA4[playerId] < 0x2BC) {
|
||||
@@ -3097,6 +3153,7 @@ void func_800C76C0(u8 playerId) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_800C847C(u8 playerId) {
|
||||
if ((gPlayers[playerId].unk_0DE & 1) == 1) {
|
||||
|
||||
+8
-3
@@ -6,6 +6,7 @@
|
||||
#include "audio/internal.h"
|
||||
#include "audio/playback.h"
|
||||
#include "audio/synthesis.h"
|
||||
#include "data/gfx_output_buffer.h"
|
||||
|
||||
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
||||
|
||||
@@ -783,8 +784,8 @@ void audio_init() {
|
||||
|
||||
#ifdef TARGET_N64
|
||||
// It seems boot.s doesn't clear the .bss area for audio, so do it here.
|
||||
lim3 = ((uintptr_t) &D_803B71A0 - (uintptr_t) &gGfxSPTaskOutputBufferSize) / 8;
|
||||
ptr64 = &gGfxSPTaskOutputBufferSize;
|
||||
lim3 = ((uintptr_t) &D_803B71A0 - (uintptr_t) ((u64 *)((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer))) ) / 8;
|
||||
ptr64 = (u64 *)((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));;
|
||||
for (k = lim3; k >= 0; k--) {
|
||||
*ptr64++ = 0;
|
||||
}
|
||||
@@ -874,5 +875,9 @@ void audio_init() {
|
||||
gAudioLoadLock = 0x76557364;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/load/audio_init.s")
|
||||
#ifdef VERSION_EU
|
||||
GLOBAL_ASM("asm/eu_nonmatchings/audio_init.s")
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/load/audio_init.s")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -232,6 +232,18 @@ void process_notes(void) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU_1_0
|
||||
// Just threw these in here. They are probably wrong place and variables.
|
||||
stubbed_printf("----------------------Double-Error CH: %x %f\n", ¬e, note->parentLayer->seqChannel);
|
||||
stubbed_printf("----------------------Double-Error NT: %x\n", ¬e);
|
||||
if (note != playbackState->parentLayer->note && playbackState->priority != 1) {
|
||||
playbackState->adsr.action |= ADSR_ACTION_RELEASE;
|
||||
playbackState->adsr.fadeOutVel = gAudioBufferParameters.updatesPerFrameInv;
|
||||
playbackState->priority = 1;
|
||||
goto d;
|
||||
}
|
||||
#endif
|
||||
if (!playbackState->parentLayer->enabled && playbackState->priority >= NOTE_PRIORITY_MIN) {
|
||||
goto c;
|
||||
} else if (playbackState->parentLayer->seqChannel->seqPlayer == NULL) {
|
||||
|
||||
@@ -24,6 +24,9 @@ char seqplayer_unused_string02[] = "Audio:Track: Warning :SUBTRACK had been stol
|
||||
char seqplayer_unused_string03[] = "SEQID %d,BANKID %d\n";
|
||||
char seqplayer_unused_string04[] = "ERR:SUBTRACK %d NOT ALLOCATED\n";
|
||||
char seqplayer_unused_string05[] = "Error:Same List Add\n";
|
||||
#ifdef VERSION_EU_1_0
|
||||
char seqplayer_unused_string_eu_01[] = "Wait Time out!\n";
|
||||
#endif
|
||||
char seqplayer_unused_string06[] = "Macro Level Over Error!\n";
|
||||
char seqplayer_unused_string07[] = "Macro Level Over Error!\n";
|
||||
char seqplayer_unused_string08[] = "WARNING: NPRG: cannot change %d\n";
|
||||
@@ -361,6 +364,13 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
if (!layer->continuousNotes) {
|
||||
seq_channel_layer_note_decay(layer);
|
||||
}
|
||||
#ifdef VERSION_EU_1_0
|
||||
else {
|
||||
if ((layer->note != 0) && (layer == layer->note->wantedParentLayer)) {
|
||||
seq_channel_layer_note_decay(layer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (PORTAMENTO_MODE(layer->portamento) == PORTAMENTO_MODE_1 ||
|
||||
PORTAMENTO_MODE(layer->portamento) == PORTAMENTO_MODE_2) {
|
||||
|
||||
@@ -32,11 +32,6 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateI
|
||||
u64 *synthesis_process_note(struct Note *note, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s16 *aiBuf, s32 bufLen, u64 *cmd);
|
||||
u64 *process_envelope(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings, u32 flags);
|
||||
|
||||
|
||||
u64 gGfxSPTaskOutputBuffer[0x3F00];
|
||||
|
||||
u32 gGfxSPTaskOutputBufferSize;
|
||||
u32 padding3[2];
|
||||
struct SynthesisReverb gSynthesisReverbs[4];
|
||||
u8 sAudioSynthesisPad[0x10];
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ Acmd *func_800B86A0(Acmd *cmd, struct NoteSubEu *note, struct NoteSynthesisState
|
||||
Acmd *note_apply_headset_pan_effects(Acmd *acmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *note, s32 bufLen, s32 flags, s32 leftRight);
|
||||
|
||||
// These 2 are almost certainly misnamed and misplaced
|
||||
extern u64 gGfxSPTaskOutputBuffer[0x3F00];
|
||||
extern u64 gGfxSPTaskOutputBuffer[];
|
||||
extern u32 gGfxSPTaskOutputBufferSize;
|
||||
|
||||
extern struct SynthesisReverb gSynthesisReverbs[4];
|
||||
|
||||
+25
-7
@@ -1608,12 +1608,13 @@ void func_8008FEDC(Player* player, UNUSED s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008FF08(Player *player, s8 playerId) {
|
||||
if(player->nearestWaypointId){}
|
||||
s16 waypoint;
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
if (((s16)gNearestWaypointByPlayerId[playerId] >= 0x235) && ((s16)gNearestWaypointByPlayerId[playerId] < 0x247)) {
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0x235) && (waypoint < 0x247)) {
|
||||
player->nearestWaypointId = 0x214;
|
||||
} else if (((s16)gNearestWaypointByPlayerId[playerId] >= 0x267) && ((s16)gNearestWaypointByPlayerId[playerId] < 0x277)) {
|
||||
} else if ((waypoint >= 0x267) && (waypoint < 0x277)) {
|
||||
player->nearestWaypointId = 0x25B;
|
||||
} else {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -1623,7 +1624,8 @@ void func_8008FF08(Player *player, s8 playerId) {
|
||||
}
|
||||
break;
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
if (((s16)gNearestWaypointByPlayerId[playerId] >= 0x12C) && ((s16)gNearestWaypointByPlayerId[playerId] < 0x13C)) {
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0x12C) && (waypoint < 0x13C)) {
|
||||
player->nearestWaypointId = 0x12CU;
|
||||
} else {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -1637,7 +1639,14 @@ void func_8008FF08(Player *player, s8 playerId) {
|
||||
player->nearestWaypointId = D_80165320[playerId];
|
||||
break;
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
if (((s16)gNearestWaypointByPlayerId[playerId] >= 0xF0) && ((s16)gNearestWaypointByPlayerId[playerId] < 0x105)) {
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
#ifdef VERSION_EU
|
||||
if (((waypoint >= 0xF0) && (waypoint < 0x11E)) ||
|
||||
((D_80165320[playerId] >= 0xF0) && (D_80165320[playerId] < 0x11E)))
|
||||
#else
|
||||
if ((waypoint >= 0xF0) && (waypoint < 0x105))
|
||||
#endif
|
||||
{
|
||||
player->nearestWaypointId = 0xF0U;
|
||||
} else {
|
||||
player->nearestWaypointId = D_80165320[playerId];
|
||||
@@ -1647,7 +1656,8 @@ void func_8008FF08(Player *player, s8 playerId) {
|
||||
}
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
if (((s16)gNearestWaypointByPlayerId[playerId] >= 0x258) && ((s16)gNearestWaypointByPlayerId[playerId] < 0x2A4)) {
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0x258) && (waypoint < 0x2A4)) {
|
||||
player->nearestWaypointId = 0x258U;
|
||||
} else {
|
||||
player->nearestWaypointId = D_80165320[playerId];
|
||||
@@ -1657,7 +1667,8 @@ void func_8008FF08(Player *player, s8 playerId) {
|
||||
}
|
||||
break;
|
||||
case COURSE_DK_JUNGLE:
|
||||
if (((s16)gNearestWaypointByPlayerId[playerId] >= 0xB9) && ((s16)gNearestWaypointByPlayerId[playerId] < 0x119)) {
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0xB9) && (waypoint < 0x119)) {
|
||||
player->nearestWaypointId = 0xB9U;
|
||||
} else {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -2079,3 +2090,10 @@ void func_80091298(Player *player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80091440(s8 arg0) {
|
||||
if ((gPlayers[arg0].unk_044 & 0x800) == 0) {
|
||||
gPlayers[arg0].unk_044 |= 0x2400;
|
||||
gPlayers[arg0].type &= ~0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,6 @@
|
||||
#include "math_util.h"
|
||||
#include "collision.h"
|
||||
|
||||
void func_80091440(s8 arg0) {
|
||||
if ((gPlayers[arg0].unk_044 & 0x800) == 0) {
|
||||
gPlayers[arg0].unk_044 |= 0x2400;
|
||||
gPlayers[arg0].type &= ~0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
void func_800914A0(void) {
|
||||
D_80152308 = gPlayerOneCopy->unk_006 + 7;
|
||||
if ((s32) D_8015F6F8 < D_80152308) {
|
||||
|
||||
+6
-2
@@ -13661,7 +13661,11 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#define FUNC_800ADF48DEF 70
|
||||
#else
|
||||
#define FUNC_800ADF48DEF 60
|
||||
#endif
|
||||
void func_800ADF48(struct_8018D9E0_entry *arg0) {
|
||||
s32 stackPadding;
|
||||
struct Controller *controller;
|
||||
@@ -13724,7 +13728,7 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) {
|
||||
} else {
|
||||
func_8009DFE0(30);
|
||||
play_sound2(0x4900801B);
|
||||
func_800CA330(60);
|
||||
func_800CA330(FUNC_800ADF48DEF);
|
||||
if (arg0->unk24 < 4.2) {
|
||||
arg0->unk24 += 4.0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,11 @@ u16 gRandomSeed16;
|
||||
|
||||
u8 randomSeedPadding[216];
|
||||
|
||||
u8 frameBufferPadding[22544];
|
||||
#ifdef VERSION_EU
|
||||
u8 frameBufferPadding[0x5750];
|
||||
#else
|
||||
u8 frameBufferPadding[0x5810];
|
||||
#endif
|
||||
|
||||
struct_D_802BFB80 D_802BFB80[2][2][8];
|
||||
struct_D_802DFB80 D_802DFB80[2][2][8];
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "gfx_output_buffer.h"
|
||||
|
||||
u64 gGfxSPTaskOutputBuffer[GFX_OUTPUT_BUFFER_SIZE];
|
||||
|
||||
u32 gGfxSPTaskOutputBufferSize;
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef GFX_OUTPUT_BUFFER_H
|
||||
#define GFX_OUTPUT_BUFFER_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
// 0x1f000 bytes, aligned to a 0x1000-byte boundary through sm64.ld. (This results
|
||||
// in a bunch of unused space: ~0x100 in JP, ~0x300 in US.)
|
||||
#define GFX_OUTPUT_BUFFER_SIZE 0x3f00
|
||||
|
||||
// 0x3F00
|
||||
extern u64 gGfxSPTaskOutputBuffer[GFX_OUTPUT_BUFFER_SIZE];
|
||||
extern u32 gGfxSPTaskOutputBufferSize;
|
||||
|
||||
#endif // GFX_OUTPUT_BUFFER_H
|
||||
@@ -317,6 +317,13 @@ s32 move_point_along_spline(Vec3f p, f32 *arg1, struct struct_80283430 spline[],
|
||||
secondSpeed = 1.0f / spline[*splineSegment + 2].unk2;
|
||||
}
|
||||
|
||||
#ifdef VERSION_EU
|
||||
if (gGamestate == CREDITS_SEQUENCE) {
|
||||
firstSpeed *= 1.14999997f;
|
||||
secondSpeed *= 1.14999997f;
|
||||
}
|
||||
#endif
|
||||
|
||||
progressChange = (((secondSpeed - firstSpeed)) * *progress + firstSpeed);
|
||||
if (1 <= (*progress += progressChange)) {
|
||||
(*splineSegment)++;
|
||||
@@ -1468,6 +1475,40 @@ struct struct_80286A10 {
|
||||
struct struct_80285D80 *unkC;
|
||||
};
|
||||
|
||||
#ifdef VERSION_EU
|
||||
struct struct_80286A04 D_80286A04[] = {
|
||||
|
||||
{ 0x01, 0x00, &D_80285D80[162], &D_80285D80[162], 0x0087 },
|
||||
{ 0x00, 0x08, &D_80285D80[0], &D_80285D80[4], 0x00D1 },
|
||||
{ 0x00, 0x09, &D_80285D80[8], &D_80285D80[13], 0x00D1 },
|
||||
{ 0x00, 0x0B, &D_80285D80[26], &D_80285D80[34], 0x00D1 },
|
||||
{ 0x00, 0x05, &D_80285D80[18], &D_80285D80[22], 0x00D1 },
|
||||
{ 0x00, 0x02, &D_80285D80[42], &D_80285D80[48], 0x00D1 },
|
||||
{ 0x00, 0x0E, &D_80285D80[259], &D_80285D80[263], 0x00D1 },
|
||||
{ 0x00, 0x0C, &D_80285D80[55], &D_80285D80[59], 0x00D1 },
|
||||
{ 0x00, 0x07, &D_80285D80[63], &D_80285D80[71], 0x00D1 },
|
||||
{ 0x00, 0x01, &D_80285D80[79], &D_80285D80[92], 0x00D1 },
|
||||
{ 0x00, 0x04, &D_80285D80[105], &D_80285D80[112], 0x00D2 },
|
||||
{ 0x00, 0x12, &D_80285D80[119], &D_80285D80[128], 0x00D2 },
|
||||
{ 0x00, 0x00, &D_80285D80[155], &D_80285D80[162], 0x00D2 },
|
||||
{ 0x00, 0x06, &D_80285D80[169], &D_80285D80[176], 0x00D2 },
|
||||
{ 0x00, 0x0A, &D_80285D80[183], &D_80285D80[193], 0x00D2 },
|
||||
{ 0x00, 0x03, &D_80285D80[203], &D_80285D80[211], 0x00D2 },
|
||||
{ 0x00, 0x0D, &D_80285D80[219], &D_80285D80[232], 0x00D2 },
|
||||
{ 0x01, 0x00, &D_80285D80[162], &D_80285D80[162], 0x00D2 },
|
||||
{ 0x02, 0x07, &D_80285D80[245], &D_80285D80[252], 0x00D2 },
|
||||
};
|
||||
|
||||
u16 D_80286B34[] = {
|
||||
0x0087, 0x00D5, 0x00D5, 0x00D5,
|
||||
0x00D5, 0x00D5, 0x00D5, 0x00D5,
|
||||
0x00D5, 0x00D5, 0x00D5, 0x00D5,
|
||||
0x00D5, 0x00D5, 0x00D4, 0x00D4,
|
||||
0x00D4, 0x00DB, 0x00D2, 0x0000,
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
// 0xC90 (80285D80 size) 3216 decimal.
|
||||
struct struct_80286A04 D_80286A04[] = {
|
||||
|
||||
@@ -1492,7 +1533,6 @@ struct struct_80286A04 D_80286A04[] = {
|
||||
{ 0x02, 0x07, &D_80285D80[245], &D_80285D80[252], 0x00F0 },
|
||||
};
|
||||
|
||||
|
||||
u16 D_80286B34[] = {
|
||||
0x0096, 0x00F3, 0x00F3, 0x00F3,
|
||||
0x00F3, 0x00F3, 0x00F3, 0x00F3,
|
||||
@@ -1500,6 +1540,8 @@ u16 D_80286B34[] = {
|
||||
0x00F3, 0x00F3, 0x00F2, 0x00F2,
|
||||
0x00F2, 0x00F9, 0x00F0, 0x0000,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
void func_802847CC(struct CinematicCamera *camera) {
|
||||
u16 sp2E;
|
||||
@@ -1510,7 +1552,11 @@ void func_802847CC(struct CinematicCamera *camera) {
|
||||
|
||||
cutscene_event((CameraEvent)func_80283CD0, camera, 0, 0);
|
||||
cutscene_event((CameraEvent)play_sound_welcome, camera, 8, 8);
|
||||
#ifdef VERSION_EU
|
||||
cutscene_event((CameraEvent)func_80283C78, camera, 134, 134);
|
||||
#else
|
||||
cutscene_event((CameraEvent)func_80283C78, camera, 149, 149);
|
||||
#endif
|
||||
cutscene_event((CameraEvent)func_80282434, camera, 0, 0);
|
||||
switch (D_80286A04[D_800DC5E4].unk0) {
|
||||
case 1:
|
||||
@@ -1531,9 +1577,11 @@ void func_802847CC(struct CinematicCamera *camera) {
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef VERSION_EU
|
||||
if (gCCSelection == 3) {
|
||||
sp2C = D_80286B34[D_800DC5E4];
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gCutsceneShotTimer == sp2C) {
|
||||
if (D_80286A04[D_800DC5E4].unk0 != 2) {
|
||||
|
||||
@@ -55,7 +55,6 @@ typedef struct {
|
||||
|
||||
extern u16 gRandomSeed16;
|
||||
extern u8 randomSeedPadding[216];
|
||||
extern u8 frameBufferPadding[22544];
|
||||
extern struct_D_802BFB80 D_802BFB80[][2][8];
|
||||
extern struct_D_802DFB80 D_802DFB80[][2][8];
|
||||
|
||||
|
||||
+15
-7
@@ -34,6 +34,7 @@
|
||||
#include "staff_ghosts.h"
|
||||
#include <debug.h>
|
||||
#include "crash_screen.h"
|
||||
#include "data/gfx_output_buffer.h"
|
||||
|
||||
// Declarations (not in this file)
|
||||
void func_80091B78(void);
|
||||
@@ -204,6 +205,9 @@ void create_thread(OSThread *thread, OSId id, void (*entry)(void *), void *arg,
|
||||
}
|
||||
void isPrintfInit(void);
|
||||
void main_func(void) {
|
||||
#ifdef VERSION_EU
|
||||
osTvType = TV_TYPE_PAL;
|
||||
#endif
|
||||
osInitialize();
|
||||
#ifdef DEBUG
|
||||
isPrintfInit(); // init osSyncPrintf
|
||||
@@ -217,11 +221,15 @@ void main_func(void) {
|
||||
*/
|
||||
void thread1_idle(void *arg) {
|
||||
osCreateViManager(OS_PRIORITY_VIMGR);
|
||||
#ifdef VERSION_EU
|
||||
osViSetMode(&osViModeTable[OS_VI_PAL_LAN1]);
|
||||
#else // VERSION_US
|
||||
if (osTvType == TV_TYPE_NTSC) {
|
||||
osViSetMode(&osViModeTable[OS_VI_NTSC_LAN1]);
|
||||
} else {
|
||||
osViSetMode(&osViModeTable[OS_VI_MPAL_LAN1]);
|
||||
}
|
||||
#endif
|
||||
osViBlack(TRUE);
|
||||
osViSetSpecialFeatures(OS_VI_GAMMA_OFF);
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &gPIMesgQueue, gPIMesgBuf, ARRAY_COUNT(gPIMesgBuf));
|
||||
@@ -232,7 +240,7 @@ void thread1_idle(void *arg) {
|
||||
osStartThread(&gVideoThread);
|
||||
osSetThreadPri(NULL, 0);
|
||||
|
||||
// halt
|
||||
// Halt
|
||||
while (TRUE);
|
||||
}
|
||||
|
||||
@@ -284,7 +292,7 @@ void create_gfx_task_structure(void) {
|
||||
gGfxSPTask->task.t.dram_stack = (u64 *) &gGfxSPTaskStack;
|
||||
gGfxSPTask->task.t.dram_stack_size = SP_DRAM_STACK_SIZE8;
|
||||
gGfxSPTask->task.t.output_buff = (u64 *) &gGfxSPTaskOutputBuffer;
|
||||
gGfxSPTask->task.t.output_buff_size = (u64 *) &gGfxSPTaskOutputBufferSize;
|
||||
gGfxSPTask->task.t.output_buff_size = (u64 *) ((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));
|
||||
gGfxSPTask->task.t.data_ptr = (u64 *) gGfxPool->gfxPool;
|
||||
gGfxSPTask->task.t.data_size = (gDisplayListHead - gGfxPool->gfxPool) * sizeof(Gfx);
|
||||
func_8008C214();
|
||||
@@ -580,7 +588,7 @@ void race_logic_loop(void) {
|
||||
if (gIsGamePaused == 0) {
|
||||
for (i = 0; i < gTickSpeed; i++) {
|
||||
if (D_8015011E) {
|
||||
gCourseTimer += 0.01666666; // 1 / 60
|
||||
gCourseTimer += COURSE_TIMER_ITER;
|
||||
}
|
||||
func_802909F0();
|
||||
evaluate_player_collision();
|
||||
@@ -645,7 +653,7 @@ void race_logic_loop(void) {
|
||||
if (gIsGamePaused == 0) {
|
||||
for (i = 0; i < gTickSpeed; i++) {
|
||||
if (D_8015011E != 0) {
|
||||
gCourseTimer += 0.01666666;
|
||||
gCourseTimer += COURSE_TIMER_ITER;
|
||||
}
|
||||
func_802909F0();
|
||||
evaluate_player_collision();
|
||||
@@ -691,7 +699,7 @@ void race_logic_loop(void) {
|
||||
if (gIsGamePaused == 0) {
|
||||
for (i = 0; i < gTickSpeed; i++) {
|
||||
if (D_8015011E != 0) {
|
||||
gCourseTimer += 0.01666666;
|
||||
gCourseTimer += COURSE_TIMER_ITER;
|
||||
}
|
||||
func_802909F0();
|
||||
evaluate_player_collision();
|
||||
@@ -759,7 +767,7 @@ void race_logic_loop(void) {
|
||||
if (gIsGamePaused == 0) {
|
||||
for (i = 0; i < gTickSpeed; i++) {
|
||||
if (D_8015011E != 0) {
|
||||
gCourseTimer += 0.01666666;
|
||||
gCourseTimer += COURSE_TIMER_ITER;
|
||||
}
|
||||
func_802909F0();
|
||||
evaluate_player_collision();
|
||||
@@ -953,7 +961,7 @@ void start_gfx_sptask(void) {
|
||||
}
|
||||
|
||||
void handle_vblank(void) {
|
||||
gVBlankTimer += 0.01666666;
|
||||
gVBlankTimer += V_BlANK_TIMER_ITER;
|
||||
sNumVBlanks++;
|
||||
|
||||
receive_new_tasks();
|
||||
|
||||
@@ -5,10 +5,19 @@ OSViMode osViModePalLan1 = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12574,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 625,
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
/*hSync*/ 1379433,
|
||||
/*leap*/ 208604270,
|
||||
#endif
|
||||
/*hStart*/ 8389376,
|
||||
/*xScale*/ 512,
|
||||
/*vCurrent*/ 0 },
|
||||
|
||||
+28
-28
@@ -329,13 +329,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12814,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 625,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -361,13 +361,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12878,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -393,13 +393,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12574,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 625,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -425,13 +425,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12382,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -457,13 +457,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 13071,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 625,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -489,13 +489,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12879,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -521,13 +521,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12319,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 625,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -553,13 +553,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12383,
|
||||
/*width*/ 320,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -585,13 +585,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12878,
|
||||
/*width*/ 1280,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -617,13 +617,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12878,
|
||||
/*width*/ 640,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -649,13 +649,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12382,
|
||||
/*width*/ 1280,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -681,13 +681,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12382,
|
||||
/*width*/ 640,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -713,13 +713,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 13135,
|
||||
/*width*/ 1280,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
@@ -745,13 +745,13 @@ OSViMode osViModeTable[] = {
|
||||
/*comRegs*/
|
||||
{ /*ctrl*/ 12879,
|
||||
/*width*/ 640,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*burst*/ 72621626,
|
||||
#else
|
||||
/*burst*/ 67380026,
|
||||
#endif
|
||||
/*vSync*/ 624,
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_EU
|
||||
/*hSync*/ 1510505,
|
||||
/*leap*/ 208604269,
|
||||
#else
|
||||
|
||||
@@ -884,9 +884,15 @@ void func_8028FBD4(void) {
|
||||
D_802BA038 = 5;
|
||||
}
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#define D_802BA038_SIZE 1600
|
||||
#else
|
||||
#define D_802BA038_SIZE 1920
|
||||
#endif
|
||||
|
||||
void func_8028FC34(void) {
|
||||
if (D_802BA038 < 0) {
|
||||
D_802BA038 = 1920;
|
||||
D_802BA038 = D_802BA038_SIZE;
|
||||
return;
|
||||
}
|
||||
D_802BA038--;
|
||||
|
||||
@@ -771,16 +771,26 @@ void func_802A59A4(void) {
|
||||
Camera *camera = &cameras[0];
|
||||
UNUSED s32 pad[4];
|
||||
u16 perspNorm;
|
||||
UNUSED s32 pad2[3];
|
||||
UNUSED s32 pad2[2];
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
#endif
|
||||
UNUSED s32 pad3;
|
||||
Mat4 matrix;
|
||||
|
||||
#ifdef VERSION_EU
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
func_802A53A4();
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5EC);
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
@@ -822,13 +832,20 @@ void func_802A5CB4(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
f32 sp9C;
|
||||
|
||||
func_802A50EC();
|
||||
#ifdef VERSION_EU
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5EC);
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[0], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
@@ -872,13 +889,20 @@ void func_802A5FAC(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
f32 sp9C;
|
||||
|
||||
func_802A5004();
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5F0);
|
||||
|
||||
#ifdef VERSION_EU
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[1], &perspNorm, gCameraZoom[1], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[1], &perspNorm, gCameraZoom[1], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[1], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
@@ -919,14 +943,23 @@ void func_802A62A4(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
#endif
|
||||
|
||||
func_802A51D4();
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH);
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5EC);
|
||||
|
||||
#ifdef VERSION_EU
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[0], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
@@ -968,15 +1001,23 @@ void func_802A65B8(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
#endif
|
||||
|
||||
func_802A52BC();
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH);
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5F0);
|
||||
|
||||
#ifdef VERSION_EU
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[1], &perspNorm, gCameraZoom[1], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[1], &perspNorm, gCameraZoom[1], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[1], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
@@ -1017,13 +1058,20 @@ void func_802A68CC(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
|
||||
func_802A54A8();
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5EC);
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[0], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
@@ -1064,13 +1112,20 @@ void func_802A6BB0(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
|
||||
func_802A5590();
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5F0);
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[1], &perspNorm, gCameraZoom[1], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[1], &perspNorm, gCameraZoom[1], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
@@ -1111,13 +1166,21 @@ void func_802A6E94(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
|
||||
func_802A5678();
|
||||
init_rdp();
|
||||
func_802A3730(D_800DC5F4);
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[2], &perspNorm, gCameraZoom[2], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[2], &perspNorm, gCameraZoom[2], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[2], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
@@ -1158,6 +1221,10 @@ void func_802A7178(void) {
|
||||
UNUSED s32 pad[2];
|
||||
u16 perspNorm;
|
||||
Mat4 matrix;
|
||||
#ifdef VERSION_EU
|
||||
f32 sp9C;
|
||||
sp9C = D_80150148 * 1.2f;
|
||||
#endif
|
||||
|
||||
func_802A5760();
|
||||
if (gPlayerCountSelection1 == 3) {
|
||||
@@ -1173,7 +1240,11 @@ void func_802A7178(void) {
|
||||
func_802A3730(D_800DC5F8);
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
#ifdef VERSION_EU
|
||||
guPerspective(&gGfxPool->mtxPersp[3], &perspNorm, gCameraZoom[3], sp9C, D_80150150, D_8015014C, 1.0f);
|
||||
#else
|
||||
guPerspective(&gGfxPool->mtxPersp[3], &perspNorm, gCameraZoom[3], D_80150148, D_80150150, D_8015014C, 1.0f);
|
||||
#endif
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guLookAt(&gGfxPool->mtxLookAt[3], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]);
|
||||
|
||||
+14
-4
@@ -95,14 +95,24 @@ void func_80004FF8(void) {
|
||||
* Activates staff ghost if time trial lap time is lower enough
|
||||
*
|
||||
*/
|
||||
#ifdef VERSION_EU
|
||||
#define BLAH 10700
|
||||
#define BLAH2 19300
|
||||
#define BLAH3 13300
|
||||
#else
|
||||
#define BLAH 9000
|
||||
#define BLAH2 16000
|
||||
#define BLAH3 11200
|
||||
|
||||
#endif
|
||||
|
||||
void set_staff_ghost(void) {
|
||||
u32 temp_v0; // Appears to be player total lap time.
|
||||
|
||||
switch(gCurrentCourseId) {
|
||||
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
temp_v0 = func_800B4E24(0) & 0xfffff;
|
||||
if (temp_v0 <= 9000) {
|
||||
if (temp_v0 <= BLAH) {
|
||||
D_80162DD6 = 0;
|
||||
D_80162DF4 = 0;
|
||||
} else {
|
||||
@@ -114,7 +124,7 @@ void set_staff_ghost(void) {
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
temp_v0 = func_800B4E24(0) & 0xfffff;
|
||||
if (temp_v0 <= 16000) {
|
||||
if (temp_v0 <= BLAH2) {
|
||||
D_80162DD6 = 0;
|
||||
D_80162DF4 = 0;
|
||||
} else {
|
||||
@@ -126,7 +136,7 @@ void set_staff_ghost(void) {
|
||||
break;
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
temp_v0 = func_800B4E24(0) & 0xfffff;
|
||||
if (temp_v0 <= 11200) {
|
||||
if (temp_v0 <= BLAH3) {
|
||||
D_80162DD6 = 0;
|
||||
D_80162DF4 = 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user