mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-06-23 01:20:10 -04:00
multiple fix
This commit is contained in:
+4
-2
@@ -138,6 +138,8 @@ void gSPDisplayListOffset(Gfx* pkt, Gfx* dl, int offset);
|
||||
void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0);
|
||||
void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr);
|
||||
|
||||
#define TEXTURE_SHIFT 2
|
||||
|
||||
// Dumb hack to fix load tile size on higher than native resolutions
|
||||
#define gMKLoadTextureTile(pkt, timg, fmt, siz, width, height, uls, ult, lrs, lrt, pal, cms, cmt, masks, maskt, \
|
||||
shifts, shiftt) \
|
||||
@@ -147,7 +149,7 @@ void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr);
|
||||
maskt, shiftt, cms, masks, shifts); \
|
||||
gDPLoadSync(pkt); \
|
||||
gDPLoadTile(pkt, G_TX_LOADTILE, (uls) << G_TEXTURE_IMAGE_FRAC, (ult) << G_TEXTURE_IMAGE_FRAC, \
|
||||
(lrs) << G_TEXTURE_IMAGE_FRAC, (lrt + 2) << G_TEXTURE_IMAGE_FRAC); \
|
||||
(lrs) << G_TEXTURE_IMAGE_FRAC, (lrt + TEXTURE_SHIFT) << G_TEXTURE_IMAGE_FRAC); \
|
||||
gDPPipeSync(pkt); \
|
||||
gDPSetTile(pkt, fmt, siz, (((((lrs) - (uls) + 1) * siz##_LINE_BYTES) + 7) >> 3), 0, G_TX_RENDERTILE, pal, cmt, \
|
||||
maskt, shiftt, cms, masks, shifts); \
|
||||
@@ -163,7 +165,7 @@ void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr);
|
||||
shiftt, cms, masks, shifts); \
|
||||
gDPLoadSync(pkt); \
|
||||
gDPLoadTile(pkt, G_TX_LOADTILE, (uls) << (G_TEXTURE_IMAGE_FRAC - 1), (ult) << (G_TEXTURE_IMAGE_FRAC), \
|
||||
(lrs) << (G_TEXTURE_IMAGE_FRAC - 1), (lrt + 2) << (G_TEXTURE_IMAGE_FRAC)); \
|
||||
(lrs) << (G_TEXTURE_IMAGE_FRAC - 1), (lrt + TEXTURE_SHIFT) << (G_TEXTURE_IMAGE_FRAC)); \
|
||||
gDPPipeSync(pkt); \
|
||||
gDPSetTile(pkt, fmt, G_IM_SIZ_4b, (((((lrs) - (uls) + 1) >> 1) + 7) >> 3), 0, G_TX_RENDERTILE, pal, cmt, \
|
||||
maskt, shiftt, cms, masks, shifts); \
|
||||
|
||||
+3
-3
@@ -55,7 +55,7 @@ u16 D_800DC5E4 = 0;
|
||||
//! @todo gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8
|
||||
s32 gPlayerWinningIndex = 0;
|
||||
|
||||
ALIGNED16 struct UnkStruct_800DC5EC D_8015F480[4];
|
||||
ALIGNED16 struct UnkStruct_800DC5EC D_8015F480[4] = { 0 };
|
||||
struct UnkStruct_800DC5EC* D_800DC5EC = &D_8015F480[0];
|
||||
struct UnkStruct_800DC5EC* D_800DC5F0 = &D_8015F480[1];
|
||||
struct UnkStruct_800DC5EC* D_800DC5F4 = &D_8015F480[2];
|
||||
@@ -124,8 +124,8 @@ Vec3f D_8015F768;
|
||||
Vec3f D_8015F778;
|
||||
|
||||
f32 gCourseDirection; // Extra mode, flips vertices.
|
||||
s32 gNumScreens; // Set to zero in single player mode
|
||||
s32 D_8015F790[64]; // Unknown data, potentially not used.
|
||||
s32 gNumScreens; // Set to zero in single player mode
|
||||
s32 D_8015F790[64]; // Unknown data, potentially not used.
|
||||
u16 D_8015F890;
|
||||
u16 D_8015F892;
|
||||
u16 D_8015F894;
|
||||
|
||||
@@ -5,21 +5,21 @@
|
||||
#include "ChocoMountain.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
#include "memory.h"
|
||||
#include "common_structs.h"
|
||||
#include "course_offsets.h"
|
||||
#include "some_data.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "assets/common_data.h"
|
||||
#include "render_objects.h"
|
||||
#include "save.h"
|
||||
#include "staff_ghosts.h"
|
||||
#include "Engine.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "render_courses.h"
|
||||
extern StaffGhost* d_mario_raceway_staff_ghost;
|
||||
#include "main.h"
|
||||
#include "memory.h"
|
||||
#include "common_structs.h"
|
||||
#include "course_offsets.h"
|
||||
#include "some_data.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "assets/common_data.h"
|
||||
#include "render_objects.h"
|
||||
#include "save.h"
|
||||
#include "staff_ghosts.h"
|
||||
#include "Engine.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "render_courses.h"
|
||||
extern StaffGhost* d_mario_raceway_staff_ghost;
|
||||
}
|
||||
|
||||
Course::Course() {
|
||||
@@ -28,7 +28,7 @@ Course::Course() {
|
||||
// Props.CourseLength = "567m";
|
||||
// Props.Cup = FLOWER_CUP;
|
||||
// Props.CupIndex = 3;
|
||||
Props.LakituTowType = (s32)OLakitu::LakituTowType::NORMAL;
|
||||
Props.LakituTowType = (s32) OLakitu::LakituTowType::NORMAL;
|
||||
Props.AIBehaviour = D_0D008F28;
|
||||
Props.AIMaximumSeparation = 50.0f;
|
||||
Props.AIMinimumSeparation = 0.3f;
|
||||
@@ -38,7 +38,7 @@ Course::Course() {
|
||||
Props.NearPersp = 3.0f;
|
||||
Props.FarPersp = 6800.0f;
|
||||
|
||||
Props.PathSizes = {600, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
|
||||
Props.PathSizes = { 600, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
Props.D_0D009418[0] = 4.1666665f;
|
||||
Props.D_0D009418[1] = 5.5833334f;
|
||||
@@ -104,13 +104,13 @@ void Course::Load() {
|
||||
size = ResourceGetTexSizeByName(asset->addr);
|
||||
freeMemory = (u8*) allocate_memory(size);
|
||||
|
||||
texture = (u8*)(asset->addr);
|
||||
texture = (u8*) (asset->addr);
|
||||
if (texture) {
|
||||
if (asset == &this->Props.textures[0]) {
|
||||
gSegmentTable[5] = reinterpret_cast<uintptr_t>(&freeMemory[0]);
|
||||
}
|
||||
strcpy(reinterpret_cast<char*>(freeMemory), asset->addr);
|
||||
//memcpy(freeMemory, texture, size);
|
||||
// memcpy(freeMemory, texture, size);
|
||||
texSegSize += size;
|
||||
// printf("Texture Addr: 0x%llX, size 0x%X\n", &freeMemory[0], size);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ void Course::Load() {
|
||||
}
|
||||
|
||||
gSegmentTable[7] = reinterpret_cast<uintptr_t>(&gfx[0]);
|
||||
displaylist_unpack(reinterpret_cast<uintptr_t *>(gfx), reinterpret_cast<uintptr_t>(packed), 0);
|
||||
displaylist_unpack(reinterpret_cast<uintptr_t*>(gfx), reinterpret_cast<uintptr_t>(packed), 0);
|
||||
|
||||
Course::Init();
|
||||
}
|
||||
@@ -143,17 +143,17 @@ void Course::Init() {
|
||||
D_8015F59C = 0;
|
||||
D_8015F5A0 = 0;
|
||||
func_80295D6C();
|
||||
D_8015F58C = 0;
|
||||
D_8015F58C = 0;
|
||||
gCollisionMeshCount = 0;
|
||||
gCollisionMesh = (CollisionTriangle*) gNextFreeMemoryAddress;
|
||||
D_800DC5BC = 0;
|
||||
D_800DC5C8 = 0;
|
||||
}
|
||||
|
||||
void Course::LoadTextures() { }
|
||||
void Course::LoadTextures() {
|
||||
}
|
||||
|
||||
void Course::SpawnActors() {
|
||||
|
||||
}
|
||||
|
||||
void Course::InitClouds() {
|
||||
@@ -177,48 +177,41 @@ void Course::UpdateClouds(s32 arg0, Camera* camera) {
|
||||
}
|
||||
|
||||
// Adjusts player speed on steep hills
|
||||
void Course::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
|
||||
void Course::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
|
||||
f32* arg7) {
|
||||
func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
|
||||
|
||||
void Course::MinimapSettings() {
|
||||
|
||||
}
|
||||
|
||||
void Course::InitCourseObjects() {
|
||||
|
||||
}
|
||||
|
||||
void Course::UpdateCourseObjects() {
|
||||
|
||||
}
|
||||
|
||||
void Course::RenderCourseObjects(s32 cameraId) {
|
||||
|
||||
}
|
||||
|
||||
// Implemented for the first cup of each course plus Koopa Beach
|
||||
void Course::SomeSounds() {
|
||||
|
||||
}
|
||||
|
||||
void Course::CreditsSpawnActors() {
|
||||
|
||||
}
|
||||
|
||||
void Course::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
|
||||
}
|
||||
|
||||
void Course::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void Course::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY,
|
||||
(u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void Course::SetStaffGhost() {
|
||||
@@ -233,16 +226,25 @@ void Course::Waypoints(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
void Course::SpawnVehicles() {}
|
||||
void Course::UpdateVehicles() {}
|
||||
void Course::SpawnVehicles() {
|
||||
}
|
||||
void Course::UpdateVehicles() {
|
||||
}
|
||||
|
||||
void Course::Render(struct UnkStruct_800DC5EC* arg0) {}
|
||||
void Course::RenderCredits() {}
|
||||
void Course::Collision() {}
|
||||
void Course::ScrollingTextures() {}
|
||||
void Course::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {}
|
||||
void Course::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
}
|
||||
void Course::RenderCredits() {
|
||||
}
|
||||
void Course::Collision() {
|
||||
}
|
||||
void Course::ScrollingTextures() {
|
||||
}
|
||||
void Course::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
|
||||
uint16_t playerDirection) {
|
||||
}
|
||||
|
||||
void Course::Destroy() {}
|
||||
void Course::Destroy() {
|
||||
}
|
||||
|
||||
bool Course::IsMod() {
|
||||
return false;
|
||||
|
||||
@@ -11,31 +11,31 @@
|
||||
#include "engine/actors/AFinishline.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
#include "camera.h"
|
||||
#include "course_offsets.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "render_courses.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "defines.h"
|
||||
#include "math_util.h"
|
||||
#include "external.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "spawn_players.h"
|
||||
#include "render_objects.h"
|
||||
#include "assets/common_data.h"
|
||||
#include "save.h"
|
||||
#include "staff_ghosts.h"
|
||||
#include "actors.h"
|
||||
#include "collision.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "memory.h"
|
||||
#include "courses/staff_ghost_data.h"
|
||||
#include "framebuffer_effects.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
extern const char *luigi_raceway_dls[];
|
||||
extern s16 currentScreenSection;
|
||||
#include "main.h"
|
||||
#include "camera.h"
|
||||
#include "course_offsets.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "render_courses.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "defines.h"
|
||||
#include "math_util.h"
|
||||
#include "external.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "spawn_players.h"
|
||||
#include "render_objects.h"
|
||||
#include "assets/common_data.h"
|
||||
#include "save.h"
|
||||
#include "staff_ghosts.h"
|
||||
#include "actors.h"
|
||||
#include "collision.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "memory.h"
|
||||
#include "courses/staff_ghost_data.h"
|
||||
#include "framebuffer_effects.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
extern const char* luigi_raceway_dls[];
|
||||
extern s16 currentScreenSection;
|
||||
}
|
||||
|
||||
const course_texture luigi_raceway_textures[] = {
|
||||
@@ -104,7 +104,7 @@ LuigiRaceway::LuigiRaceway() {
|
||||
Props.NearPersp = 9.0f;
|
||||
Props.FarPersp = 4500.0f;
|
||||
|
||||
Props.PathSizes = {0x2DA, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
|
||||
Props.PathSizes = { 0x2DA, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
Props.D_0D009418[0] = 4.1666665f;
|
||||
Props.D_0D009418[1] = 5.5833334f;
|
||||
@@ -126,12 +126,12 @@ LuigiRaceway::LuigiRaceway() {
|
||||
Props.D_0D009808[2] = 5.75f;
|
||||
Props.D_0D009808[3] = 6.3333334f;
|
||||
|
||||
Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_luigi_raceway_unknown_waypoints);
|
||||
Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_luigi_raceway_unknown_waypoints);
|
||||
Props.PathTable[1] = NULL;
|
||||
Props.PathTable[2] = NULL;
|
||||
Props.PathTable[3] = NULL;
|
||||
|
||||
Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_luigi_raceway_track_waypoints);
|
||||
Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_luigi_raceway_track_waypoints);
|
||||
Props.PathTable2[1] = NULL;
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
@@ -141,21 +141,21 @@ LuigiRaceway::LuigiRaceway() {
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {128, 184, 248};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
Props.Skybox.BottomLeft = {216, 232, 248};
|
||||
Props.Skybox.TopLeft = {128, 184, 248};
|
||||
Props.Skybox.FloorTopRight = {216, 232, 248};
|
||||
Props.Skybox.FloorBottomRight = {0, 0, 0};
|
||||
Props.Skybox.FloorBottomLeft = {0, 0, 0};
|
||||
Props.Skybox.FloorTopLeft = {216, 232, 248};
|
||||
Props.Skybox.TopRight = { 128, 184, 248 };
|
||||
Props.Skybox.BottomRight = { 216, 232, 248 };
|
||||
Props.Skybox.BottomLeft = { 216, 232, 248 };
|
||||
Props.Skybox.TopLeft = { 128, 184, 248 };
|
||||
Props.Skybox.FloorTopRight = { 216, 232, 248 };
|
||||
Props.Skybox.FloorBottomRight = { 0, 0, 0 };
|
||||
Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
|
||||
Props.Skybox.FloorTopLeft = { 216, 232, 248 };
|
||||
Props.Sequence = MusicSeq::MUSIC_SEQ_RACEWAYS_WARIO_STADIUM;
|
||||
}
|
||||
|
||||
void LuigiRaceway::Load() {
|
||||
Course::Load();
|
||||
|
||||
parse_course_displaylists((TrackSectionsI*)LOAD_ASSET_RAW(d_course_luigi_raceway_addr));
|
||||
parse_course_displaylists((TrackSectionsI*) LOAD_ASSET_RAW(d_course_luigi_raceway_addr));
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = gCourseMinY - 10.0f;
|
||||
}
|
||||
@@ -167,8 +167,8 @@ void LuigiRaceway::LoadTextures() {
|
||||
|
||||
void LuigiRaceway::SpawnActors() {
|
||||
gWorldInstance.AddActor(new AFinishline());
|
||||
spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_luigi_raceway_tree_spawn));
|
||||
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_luigi_raceway_item_box_spawns));
|
||||
spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_luigi_raceway_tree_spawn));
|
||||
spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_luigi_raceway_item_box_spawns));
|
||||
|
||||
if (gGamestate == CREDITS_SEQUENCE) {
|
||||
gWorldInstance.AddObject(new OHotAirBalloon(FVector(-1250.0f, 0.0f, 1110.0f)));
|
||||
@@ -179,7 +179,7 @@ void LuigiRaceway::SpawnActors() {
|
||||
|
||||
void LuigiRaceway::SpawnVehicles() {
|
||||
if (gModeSelection == VERSUS) {
|
||||
Vec3f pos = {0, 0, 0};
|
||||
Vec3f pos = { 0, 0, 0 };
|
||||
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][50], 50, 1, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][200], 200, 3, 0.8333333f);
|
||||
@@ -193,7 +193,7 @@ void LuigiRaceway::SpawnVehicles() {
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void LuigiRaceway::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust2, 0x4F4U, 0xC00));
|
||||
D_8018D220 = reinterpret_cast<uint8_t(*)[1024]>(dma_textures(gTextureExhaust2, 0x4F4U, 0xC00));
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0[0] = 271;
|
||||
D_8018D2E0 = 45;
|
||||
@@ -229,8 +229,7 @@ void LuigiRaceway::SomeSounds() {
|
||||
}
|
||||
|
||||
void LuigiRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) &&
|
||||
((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
|
||||
if (D_80165300[playerId] != 1) {
|
||||
func_800CA288(playerId, 0x55);
|
||||
}
|
||||
@@ -244,8 +243,7 @@ void LuigiRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
}
|
||||
|
||||
void LuigiRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) &&
|
||||
((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
|
||||
if (D_80165300[playerId] != 1) {
|
||||
func_800CA2E4(playerId, 0x55);
|
||||
}
|
||||
@@ -261,7 +259,8 @@ void LuigiRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
// Positions the finishline on the minimap
|
||||
void LuigiRaceway::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY,
|
||||
(u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void LuigiRaceway::SetStaffGhost() {
|
||||
@@ -277,6 +276,108 @@ void LuigiRaceway::SetStaffGhost() {
|
||||
D_80162DE4 = 1;
|
||||
}
|
||||
|
||||
void render_LuigiRaceway_jumbotron() {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0x0000, G_TX_RENDERTILE, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x007C, 0x007C);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x5800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 1023, 256);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xB710), 3, 0);
|
||||
gSP1Triangle(gDisplayListHead++, 0, 1, 2, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xB800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 1023, 256);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xB740), 32, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 4, 5, 6, 0, 4, 6, 7, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 8, 9, 10, 0, 9, 11, 12, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 9, 12, 10, 0, 13, 14, 15, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 13, 15, 16, 0, 17, 18, 19, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 17, 19, 20, 0, 11, 21, 12, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 10, 22, 23, 0, 10, 23, 24, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 25, 22, 26, 0, 25, 26, 27, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 28, 23, 29, 0, 28, 29, 30, 0);
|
||||
gSP1Triangle(gDisplayListHead++, 27, 26, 31, 0);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xB940), 14, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 3, 4, 5, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 3, 5, 6, 0, 1, 7, 8, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 1, 8, 9, 0, 10, 11, 12, 0);
|
||||
gSP1Triangle(gDisplayListHead++, 10, 12, 13, 0);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0x0000, G_TX_RENDERTILE, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x00FC, 0x007C);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xF800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBA20), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x10800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBA60), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x11800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBAA0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x12800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBAE0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x13800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBB20), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x14800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBB60), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0x0000, G_TX_RENDERTILE, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x007C, 0x007C);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xB000);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 1023, 256);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0xBBA0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
}
|
||||
|
||||
void LuigiRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
UNUSED s32 pad;
|
||||
u16 sp22 = (u16) arg0->pathCounter;
|
||||
@@ -306,6 +407,7 @@ void LuigiRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
|
||||
render_LuigiRaceway_jumbotron();
|
||||
render_course_segments(luigi_raceway_dls, arg0);
|
||||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
@@ -334,23 +436,25 @@ void LuigiRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The jumbo television screen used to be split into six sections to fit into the n64's texture size restrictions
|
||||
* It isn't split into six sections anymore
|
||||
* The jumbo television screen used to be split into six sections to fit into the n64's texture size
|
||||
* restrictions It isn't split into six sections anymore
|
||||
*/
|
||||
copy_jumbotron_fb_port(D_800DC5DC, D_800DC5E0, currentScreenSection,
|
||||
(u16*) gPortFramebuffers[prevFrame],
|
||||
(u16*) (gSegmentTable[5] + 0xF800));
|
||||
copy_jumbotron_fb_port(D_800DC5DC, D_800DC5E0, currentScreenSection, (u16*) gPortFramebuffers[prevFrame],
|
||||
(u16*) (gSegmentTable[5] + 0xF800));
|
||||
}
|
||||
}
|
||||
|
||||
void LuigiRaceway::RenderCredits() {
|
||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_luigi_raceway_dl_FD40));
|
||||
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_luigi_raceway_dl_FD40));
|
||||
}
|
||||
|
||||
void LuigiRaceway::Collision() {}
|
||||
void LuigiRaceway::Collision() {
|
||||
}
|
||||
|
||||
void LuigiRaceway::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
|
||||
void LuigiRaceway::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
|
||||
f32* arg6, f32* arg7) {
|
||||
func_8003E9EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
|
||||
void LuigiRaceway::Destroy() { }
|
||||
void LuigiRaceway::Destroy() {
|
||||
}
|
||||
|
||||
@@ -11,29 +11,29 @@
|
||||
#include "engine/actors/AFinishline.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
#include "camera.h"
|
||||
#include "course_offsets.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "render_courses.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "defines.h"
|
||||
#include "math_util.h"
|
||||
#include "external.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "spawn_players.h"
|
||||
#include "render_objects.h"
|
||||
#include "assets/common_data.h"
|
||||
#include "save.h"
|
||||
#include "staff_ghosts.h"
|
||||
#include "actors.h"
|
||||
#include "collision.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "memory.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
extern const char *wario_stadium_dls[];
|
||||
extern s16 currentScreenSection;
|
||||
#include "main.h"
|
||||
#include "camera.h"
|
||||
#include "course_offsets.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "render_courses.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "defines.h"
|
||||
#include "math_util.h"
|
||||
#include "external.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "spawn_players.h"
|
||||
#include "render_objects.h"
|
||||
#include "assets/common_data.h"
|
||||
#include "save.h"
|
||||
#include "staff_ghosts.h"
|
||||
#include "actors.h"
|
||||
#include "collision.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "memory.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
extern const char* wario_stadium_dls[];
|
||||
extern s16 currentScreenSection;
|
||||
}
|
||||
|
||||
const course_texture wario_stadium_textures[] = {
|
||||
@@ -81,7 +81,7 @@ WarioStadium::WarioStadium() {
|
||||
Props.NearPersp = 10.0f;
|
||||
Props.FarPersp = 4800.0f;
|
||||
|
||||
Props.PathSizes = {0x640, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
|
||||
Props.PathSizes = { 0x640, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
Props.D_0D009418[0] = 4.1666665f;
|
||||
Props.D_0D009418[1] = 5.5833334f;
|
||||
@@ -103,12 +103,12 @@ WarioStadium::WarioStadium() {
|
||||
Props.D_0D009808[2] = 5.75f;
|
||||
Props.D_0D009808[3] = 6.3333334f;
|
||||
|
||||
Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_wario_stadium_unknown_waypoints);
|
||||
Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_wario_stadium_unknown_waypoints);
|
||||
Props.PathTable[1] = NULL;
|
||||
Props.PathTable[2] = NULL;
|
||||
Props.PathTable[3] = NULL;
|
||||
|
||||
Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_wario_stadium_track_waypoints);
|
||||
Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_wario_stadium_track_waypoints);
|
||||
Props.PathTable2[1] = NULL;
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
@@ -118,39 +118,39 @@ WarioStadium::WarioStadium() {
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {20, 30, 56};
|
||||
Props.Skybox.BottomRight = {40, 60, 110};
|
||||
Props.Skybox.BottomLeft = {40, 60, 110};
|
||||
Props.Skybox.TopLeft = {20, 30, 56};
|
||||
Props.Skybox.FloorTopRight = {0, 0, 0};
|
||||
Props.Skybox.FloorBottomRight = {0, 0, 0};
|
||||
Props.Skybox.FloorBottomLeft = {0, 0, 0};
|
||||
Props.Skybox.FloorTopLeft = {0, 0, 0};
|
||||
Props.Skybox.TopRight = { 20, 30, 56 };
|
||||
Props.Skybox.BottomRight = { 40, 60, 110 };
|
||||
Props.Skybox.BottomLeft = { 40, 60, 110 };
|
||||
Props.Skybox.TopLeft = { 20, 30, 56 };
|
||||
Props.Skybox.FloorTopRight = { 0, 0, 0 };
|
||||
Props.Skybox.FloorBottomRight = { 0, 0, 0 };
|
||||
Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
|
||||
Props.Skybox.FloorTopLeft = { 0, 0, 0 };
|
||||
Props.Sequence = MusicSeq::MUSIC_SEQ_RACEWAYS_WARIO_STADIUM;
|
||||
}
|
||||
|
||||
void WarioStadium::Load() {
|
||||
Course::Load();
|
||||
|
||||
parse_course_displaylists((TrackSectionsI*)LOAD_ASSET_RAW(d_course_wario_stadium_addr));
|
||||
parse_course_displaylists((TrackSectionsI*) LOAD_ASSET_RAW(d_course_wario_stadium_addr));
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = gCourseMinY - 10.0f;
|
||||
// d_course_wario_stadium_packed_dl_C50
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000C50), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000C50), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_BD8
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000BD8), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000BD8), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_B60
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000B60), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000B60), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_AE8
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000AE8), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000AE8), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_CC8
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000CC8), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000CC8), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_D50
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000D50), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000D50), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_DD0
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000DD0), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000DD0), 100, 255, 255, 255);
|
||||
// d_course_wario_stadium_packed_dl_E48
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000E48), 100, 255, 255, 255);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000E48), 100, 255, 255, 255);
|
||||
}
|
||||
|
||||
void WarioStadium::LoadTextures() {
|
||||
@@ -158,30 +158,31 @@ void WarioStadium::LoadTextures() {
|
||||
|
||||
void WarioStadium::SpawnActors() {
|
||||
Vec3f finish;
|
||||
finish[0] = (gIsMirrorMode != 0) ? D_80164490->posX + 12.0f : D_80164490->posX - 12.0f;(gIsMirrorMode != 0) ? D_80164490->posX + 12.0f : D_80164490->posX - 12.0f;
|
||||
finish[0] = (gIsMirrorMode != 0) ? D_80164490->posX + 12.0f : D_80164490->posX - 12.0f;
|
||||
(gIsMirrorMode != 0) ? D_80164490->posX + 12.0f : D_80164490->posX - 12.0f;
|
||||
finish[1] = D_8015F8D0[1] = (f32) (D_80164490->posY - 15);
|
||||
finish[2] = D_8015F8D0[2] = D_80164490->posZ;
|
||||
|
||||
gWorldInstance.AddActor(new AFinishline(finish));
|
||||
|
||||
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_wario_stadium_item_box_spawns));
|
||||
spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_wario_stadium_item_box_spawns));
|
||||
|
||||
Vec3f pos = {-131.0f, 83.0f, 286.0f};
|
||||
Vec3f pos = { -131.0f, 83.0f, 286.0f };
|
||||
pos[0] *= gCourseDirection;
|
||||
gWorldInstance.AddActor(new AWarioSign(pos));
|
||||
|
||||
Vec3f pos2 = {-2353.0f, 72.0f, -1608.0f};
|
||||
Vec3f pos2 = { -2353.0f, 72.0f, -1608.0f };
|
||||
pos2[0] *= gCourseDirection;
|
||||
gWorldInstance.AddActor(new AWarioSign(pos2));
|
||||
|
||||
Vec3f pos3 = {-2622.0f, 79.0f, 739.0f};
|
||||
Vec3f pos3 = { -2622.0f, 79.0f, 739.0f };
|
||||
pos3[0] *= gCourseDirection;
|
||||
gWorldInstance.AddActor(new AWarioSign(pos3));
|
||||
}
|
||||
|
||||
void WarioStadium::SpawnVehicles() {
|
||||
if (gModeSelection == VERSUS) {
|
||||
Vec3f pos = {0, 0, 0};
|
||||
Vec3f pos = { 0, 0, 0 };
|
||||
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][50], 50, 3, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][100], 100, 1, 0.8333333f);
|
||||
@@ -209,7 +210,8 @@ void WarioStadium::MinimapSettings() {
|
||||
D_8018D2E8 = 35;
|
||||
}
|
||||
|
||||
void WarioStadium::InitCourseObjects() {}
|
||||
void WarioStadium::InitCourseObjects() {
|
||||
}
|
||||
|
||||
void WarioStadium::SomeSounds() {
|
||||
vec3f_set(D_8015F748, 298.0f, 202.0f, -850.0f);
|
||||
@@ -222,14 +224,92 @@ void WarioStadium::SomeSounds() {
|
||||
func_800C9D80(D_8015F778, D_802B91C8, 0x5103700B);
|
||||
}
|
||||
|
||||
void WarioStadium::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
void WarioStadium::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
}
|
||||
|
||||
void WarioStadium::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
void WarioStadium::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void WarioStadium::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY,
|
||||
(u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void render_WarioStadium_jumbotron() {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0x0000, G_TX_RENDERTILE, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x007C, 0x007C);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x7800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 1023, 256);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x177B0), 32, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 4, 5, 6, 0, 4, 6, 7, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 8, 9, 10, 0, 8, 10, 11, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 12, 13, 14, 0, 12, 14, 15, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 16, 17, 18, 0, 16, 18, 19, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 20, 21, 22, 0, 20, 22, 23, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 24, 25, 26, 0, 24, 26, 27, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 28, 29, 30, 0, 28, 30, 31, 0);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0x0000, G_TX_RENDERTILE, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x00FC, 0x007C);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x8800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x179B0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0x9800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x179F0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xA800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x17A30), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xB800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x17A70), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xC800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x17AB0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gSegmentTable[5] + 0xD800);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 2047, 128);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t) segment_vtx_to_virtual(0x17AF0), 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
}
|
||||
|
||||
void WarioStadium::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
@@ -244,20 +324,21 @@ void WarioStadium::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
// d_course_wario_stadium_packed_dl_A0C8
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x0700A0C8));
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x0700A0C8));
|
||||
}
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATERGBA, G_CC_MODULATERGBA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
|
||||
render_WarioStadium_jumbotron();
|
||||
render_course_segments(wario_stadium_dls, arg0);
|
||||
|
||||
// d_course_wario_stadium_packed_dl_A228
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x0700A228));
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x0700A228));
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
// d_course_wario_stadium_packed_dl_A88
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07000A88));
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07000A88));
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
|
||||
D_800DC5DC = 88;
|
||||
@@ -275,26 +356,28 @@ void WarioStadium::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The jumbo television screen used to be split into six sections to fit into the n64's texture size restrictions
|
||||
* It isn't split into six sections anymore
|
||||
* The jumbo television screen used to be split into six sections to fit into the n64's texture size
|
||||
* restrictions It isn't split into six sections anymore
|
||||
*/
|
||||
copy_jumbotron_fb_port(D_800DC5DC, D_800DC5E0, currentScreenSection,
|
||||
(u16*) gPortFramebuffers[prevFrame],
|
||||
(u16*) (gSegmentTable[5] + 0x8800));
|
||||
copy_jumbotron_fb_port(D_800DC5DC, D_800DC5E0, currentScreenSection, (u16*) gPortFramebuffers[prevFrame],
|
||||
(u16*) (gSegmentTable[5] + 0x8800));
|
||||
}
|
||||
}
|
||||
|
||||
void WarioStadium::RenderCredits() {
|
||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_wario_stadium_dl_CA78));
|
||||
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_wario_stadium_dl_CA78));
|
||||
}
|
||||
|
||||
void WarioStadium::Collision() {}
|
||||
void WarioStadium::Collision() {
|
||||
}
|
||||
|
||||
void WarioStadium::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
|
||||
void WarioStadium::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
|
||||
f32* arg6, f32* arg7) {
|
||||
func_8003EE2C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
|
||||
void WarioStadium::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
||||
void WarioStadium::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
|
||||
uint16_t playerDirection) {
|
||||
Mat4 matrix;
|
||||
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
@@ -314,7 +397,7 @@ void WarioStadium::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCou
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2);
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0xFF, 0xFF, 0x00, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_EC0
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07000EC0));
|
||||
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07000EC0));
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 1, 1, G_OFF);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
||||
@@ -333,21 +416,22 @@ void WarioStadium::CreditsSpawnActors() {
|
||||
vec3f_set(position, -2622.0f, 79.0f, 739.0f);
|
||||
add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN);
|
||||
// d_course_wario_stadium_packed_dl_C50
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000C50), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000C50), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_BD8
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000BD8), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000BD8), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_B60
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000B60), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000B60), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_AE8
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000AE8), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000AE8), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_CC8
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000CC8), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000CC8), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_D50
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000D50), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000D50), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_DD0
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000DD0), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000DD0), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
// d_course_wario_stadium_packed_dl_E48
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000E48), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000E48), 0x64, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
|
||||
void WarioStadium::Destroy() { }
|
||||
void WarioStadium::Destroy() {
|
||||
}
|
||||
|
||||
+363
-311
File diff suppressed because it is too large
Load Diff
+11
-15
@@ -49,12 +49,12 @@ enum SubMenuSelectionType {
|
||||
SUB_MENU_ERASE_QUIT = SUB_MENU_ERASE_MIN,
|
||||
SUB_MENU_ERASE_ERASE,
|
||||
SUB_MENU_ERASE_MAX = SUB_MENU_ERASE_ERASE, // 0x1F
|
||||
SUB_MENU_SAVE_DATA_ERASED, // 0x20
|
||||
SUB_MENU_SAVE_DATA_ERASED, // 0x20
|
||||
SUB_MENU_COPY_PAK_FROM_GHOST_MIN = 0x28,
|
||||
SUB_MENU_COPY_PAK_FROM_GHOST1_1P = SUB_MENU_COPY_PAK_FROM_GHOST_MIN,
|
||||
SUB_MENU_COPY_PAK_FROM_GHOST2_1P,
|
||||
SUB_MENU_COPY_PAK_FROM_GHOST_MAX = SUB_MENU_COPY_PAK_FROM_GHOST2_1P, // 0x29
|
||||
SUB_MENU_COPY_PAK_ERROR_2P_MIN, // 0x2A
|
||||
SUB_MENU_COPY_PAK_ERROR_2P_MIN, // 0x2A
|
||||
SUB_MENU_COPY_PAK_ERROR_NO_GHOST_DATA = SUB_MENU_COPY_PAK_ERROR_2P_MIN,
|
||||
SUB_MENU_COPY_PAK_ERROR_NO_GAME_DATA,
|
||||
SUB_MENU_COPY_PAK_ERROR_NO_PAK_2P,
|
||||
@@ -95,10 +95,10 @@ enum MainMenuSelectionType {
|
||||
MAIN_MENU_OPTION,
|
||||
MAIN_MENU_DATA,
|
||||
MAIN_MENU_PLAYER_SELECT,
|
||||
MAIN_MENU_MODE_SELECT, // Mario GP - T. Trials - VS - Battle
|
||||
MAIN_MENU_MODE_SUB_SELECT, // CC Selection and T.Trials options (Begin, Data)
|
||||
MAIN_MENU_OK_SELECT, // OK option after selecting a submode
|
||||
MAIN_MENU_OK_SELECT_GO_BACK, // OK option after going back from player select
|
||||
MAIN_MENU_MODE_SELECT, // Mario GP - T. Trials - VS - Battle
|
||||
MAIN_MENU_MODE_SUB_SELECT, // CC Selection and T.Trials options (Begin, Data)
|
||||
MAIN_MENU_OK_SELECT, // OK option after selecting a submode
|
||||
MAIN_MENU_OK_SELECT_GO_BACK, // OK option after going back from player select
|
||||
MAIN_MENU_MODE_SUB_SELECT_GO_BACK // Used in T.Trials after going back to Data option from course data
|
||||
};
|
||||
|
||||
@@ -108,7 +108,7 @@ enum MainMenuSelectionType {
|
||||
enum PlayerSelectMenuSelectionTypes {
|
||||
PLAYER_SELECT_MENU_NONE,
|
||||
PLAYER_SELECT_MENU_MAIN,
|
||||
PLAYER_SELECT_MENU_OK, // OK option after selecting characters
|
||||
PLAYER_SELECT_MENU_OK, // OK option after selecting characters
|
||||
PLAYER_SELECT_MENU_OK_GO_BACK // OK option after going back from map select
|
||||
};
|
||||
|
||||
@@ -178,11 +178,7 @@ enum DebugGotoSceneTypes {
|
||||
/**
|
||||
* @brief Options for gFadeModeSelection
|
||||
*/
|
||||
enum FadeModeSelectionTypes {
|
||||
FADE_MODE_NONE,
|
||||
FADE_MODE_MAIN,
|
||||
FADE_MODE_LOGO
|
||||
};
|
||||
enum FadeModeSelectionTypes { FADE_MODE_NONE, FADE_MODE_MAIN, FADE_MODE_LOGO };
|
||||
|
||||
/**
|
||||
* @brief Options for gControllerPakScrollDirection
|
||||
@@ -226,7 +222,7 @@ extern f32 gIntroModelPosZ;
|
||||
extern s32 gMenuFadeType;
|
||||
|
||||
extern s8 gCharacterGridSelections[];
|
||||
extern s8 gCharacterGridIsSelected[];
|
||||
extern bool gCharacterGridIsSelected[];
|
||||
extern s8 gSubMenuSelection;
|
||||
extern s8 gMainMenuSelection;
|
||||
extern s8 gPlayerSelectMenuSelection;
|
||||
@@ -242,8 +238,8 @@ extern s8 gTimeTrialDataCourseIndex;
|
||||
extern s8 gCourseRecordsMenuSelection;
|
||||
extern s8 gCourseRecordsSubMenuSelection;
|
||||
extern s8 gDebugGotoScene;
|
||||
extern s8 gGhostPlayerInit;
|
||||
extern s8 gCourseMapInit;
|
||||
extern bool gGhostPlayerInit;
|
||||
extern bool gCourseMapInit;
|
||||
extern s32 gMenuTimingCounter;
|
||||
extern s32 gMenuDelayTimer;
|
||||
extern s8 gDemoUseController;
|
||||
|
||||
+43
-37
@@ -62,7 +62,8 @@ GameEngine::GameEngine() {
|
||||
}
|
||||
}
|
||||
|
||||
this->context = Ship::Context::CreateInstance("Spaghettify", "skart64", "spaghettify.cfg.json", OTRFiles, {}, 3, { 26800, 512, 1100 });
|
||||
this->context = Ship::Context::CreateInstance("Spaghettify", "skart64", "spaghettify.cfg.json", OTRFiles, {}, 3,
|
||||
{ 26800, 512, 1100 });
|
||||
|
||||
auto wnd = std::dynamic_pointer_cast<Fast::Fast3dWindow>(Ship::Context::GetInstance()->GetWindow());
|
||||
|
||||
@@ -70,18 +71,19 @@ GameEngine::GameEngine() {
|
||||
this->context->InitGfxDebugger();
|
||||
|
||||
auto loader = context->GetResourceManager()->GetResourceLoader();
|
||||
loader->RegisterResourceFactory(std::make_shared<SM64::AudioBankFactoryV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"AudioBank", static_cast<uint32_t>(SF64::ResourceType::Bank), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SM64::AudioSampleFactoryV0>(), RESOURCE_FORMAT_BINARY,
|
||||
loader->RegisterResourceFactory(std::make_shared<SM64::AudioBankFactoryV0>(), RESOURCE_FORMAT_BINARY, "AudioBank",
|
||||
static_cast<uint32_t>(SF64::ResourceType::Bank), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SM64::AudioSampleFactoryV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"AudioSample", static_cast<uint32_t>(SF64::ResourceType::Sample), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SM64::AudioSequenceFactoryV0>(), RESOURCE_FORMAT_BINARY,
|
||||
loader->RegisterResourceFactory(std::make_shared<SM64::AudioSequenceFactoryV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"AudioSequence", static_cast<uint32_t>(SF64::ResourceType::Sequence), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryVec3fV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Vec3f", static_cast<uint32_t>(SF64::ResourceType::Vec3f), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryVec3sV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Vec3s", static_cast<uint32_t>(SF64::ResourceType::Vec3s), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryGenericArrayV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"GenericArray", static_cast<uint32_t>(SF64::ResourceType::GenericArray), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SF64::ResourceFactoryBinaryGenericArrayV0>(),
|
||||
RESOURCE_FORMAT_BINARY, "GenericArray",
|
||||
static_cast<uint32_t>(SF64::ResourceType::GenericArray), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Texture", static_cast<uint32_t>(LUS::ResourceType::Texture), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV1>(), RESOURCE_FORMAT_BINARY,
|
||||
@@ -89,8 +91,8 @@ GameEngine::GameEngine() {
|
||||
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryVertexV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Vertex", static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryXMLVertexV0>(), RESOURCE_FORMAT_XML,
|
||||
"Vertex", static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryXMLVertexV0>(), RESOURCE_FORMAT_XML, "Vertex",
|
||||
static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryDisplayListV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"DisplayList", static_cast<uint32_t>(LUS::ResourceType::DisplayList), 0);
|
||||
@@ -109,14 +111,18 @@ GameEngine::GameEngine() {
|
||||
"KartAI", static_cast<uint32_t>(MK64::ResourceType::KartAI), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryCourseVtxV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"CourseVtx", static_cast<uint32_t>(MK64::ResourceType::CourseVertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryTrackSectionsV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"TrackSections", static_cast<uint32_t>(MK64::ResourceType::TrackSection), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryTrackWaypointsV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"Waypoints", static_cast<uint32_t>(MK64::ResourceType::Waypoints), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryActorSpawnDataV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"SpawnData", static_cast<uint32_t>(MK64::ResourceType::SpawnData), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryUnkActorSpawnDataV0>(), RESOURCE_FORMAT_BINARY,
|
||||
"UnkSpawnData", static_cast<uint32_t>(MK64::ResourceType::UnkSpawnData), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryTrackSectionsV0>(),
|
||||
RESOURCE_FORMAT_BINARY, "TrackSections",
|
||||
static_cast<uint32_t>(MK64::ResourceType::TrackSection), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryTrackWaypointsV0>(),
|
||||
RESOURCE_FORMAT_BINARY, "Waypoints",
|
||||
static_cast<uint32_t>(MK64::ResourceType::Waypoints), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryActorSpawnDataV0>(),
|
||||
RESOURCE_FORMAT_BINARY, "SpawnData",
|
||||
static_cast<uint32_t>(MK64::ResourceType::SpawnData), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<MK64::ResourceFactoryBinaryUnkActorSpawnDataV0>(),
|
||||
RESOURCE_FORMAT_BINARY, "UnkSpawnData",
|
||||
static_cast<uint32_t>(MK64::ResourceType::UnkSpawnData), 0);
|
||||
}
|
||||
|
||||
void GameEngine::Create() {
|
||||
@@ -128,7 +134,7 @@ void GameEngine::Create() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void GameEngine::Destroy(){
|
||||
void GameEngine::Destroy() {
|
||||
AudioExit();
|
||||
}
|
||||
|
||||
@@ -178,7 +184,7 @@ void GameEngine::ProcessGfxCommands(Gfx* commands) {
|
||||
|
||||
// Audio
|
||||
|
||||
void GameEngine::HandleAudioThread(){
|
||||
void GameEngine::HandleAudioThread() {
|
||||
while (audio.running) {
|
||||
{
|
||||
std::unique_lock<std::mutex> Lock(audio.mutex);
|
||||
@@ -200,14 +206,14 @@ void GameEngine::HandleAudioThread(){
|
||||
create_next_audio_buffer(audio_buffer + i * (num_audio_samples * 2), num_audio_samples);
|
||||
}
|
||||
|
||||
AudioPlayerPlayFrame((u8 *) audio_buffer, 2 * num_audio_samples * 4);
|
||||
AudioPlayerPlayFrame((u8*) audio_buffer, 2 * num_audio_samples * 4);
|
||||
|
||||
audio.processing = false;
|
||||
audio.cv_from_thread.notify_one();
|
||||
}
|
||||
}
|
||||
|
||||
void GameEngine::StartAudioFrame(){
|
||||
void GameEngine::StartAudioFrame() {
|
||||
{
|
||||
std::unique_lock<std::mutex> Lock(audio.mutex);
|
||||
audio.processing = true;
|
||||
@@ -216,7 +222,7 @@ void GameEngine::StartAudioFrame(){
|
||||
audio.cv_to_thread.notify_one();
|
||||
}
|
||||
|
||||
void GameEngine::EndAudioFrame(){
|
||||
void GameEngine::EndAudioFrame() {
|
||||
{
|
||||
std::unique_lock<std::mutex> Lock(audio.mutex);
|
||||
while (audio.processing) {
|
||||
@@ -235,16 +241,16 @@ void GameEngine::AudioInit() {
|
||||
Instance->audioSequenceTable.resize(512);
|
||||
Instance->banksTable.resize(512);
|
||||
|
||||
for(auto& bank : *banksFiles){
|
||||
for (auto& bank : *banksFiles) {
|
||||
auto path = "__OTR__" + bank;
|
||||
const auto ctl = static_cast<CtlEntry *>(ResourceGetDataByName(path.c_str()));
|
||||
const auto ctl = static_cast<CtlEntry*>(ResourceGetDataByName(path.c_str()));
|
||||
this->bankMapTable[bank] = ctl->bankId;
|
||||
SPDLOG_INFO("Loaded bank: {}", bank);
|
||||
}
|
||||
|
||||
for(auto& sequence : *sequences_files){
|
||||
for (auto& sequence : *sequences_files) {
|
||||
auto path = "__OTR__" + sequence;
|
||||
auto seq = static_cast<AudioSequenceData *>(ResourceGetDataByName(path.c_str()));
|
||||
auto seq = static_cast<AudioSequenceData*>(ResourceGetDataByName(path.c_str()));
|
||||
Instance->sequenceTable[seq->id] = path;
|
||||
SPDLOG_INFO("Loaded sequence: {}", sequence);
|
||||
}
|
||||
@@ -268,7 +274,7 @@ void GameEngine::AudioExit() {
|
||||
}
|
||||
|
||||
uint8_t GameEngine::GetBankIdByName(const std::string& name) {
|
||||
if(Instance->bankMapTable.contains(name)){
|
||||
if (Instance->bankMapTable.contains(name)) {
|
||||
return Instance->bankMapTable[name];
|
||||
}
|
||||
return 0;
|
||||
@@ -296,17 +302,17 @@ extern "C" uint32_t GameEngine_GetSamplesPerFrame() {
|
||||
extern "C" CtlEntry* GameEngine_LoadBank(const uint8_t bankId) {
|
||||
const auto engine = GameEngine::Instance;
|
||||
|
||||
if(bankId >= engine->bankMapTable.size()){
|
||||
if (bankId >= engine->bankMapTable.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if(engine->banksTable[bankId] != nullptr){
|
||||
if (engine->banksTable[bankId] != nullptr) {
|
||||
return engine->banksTable[bankId];
|
||||
}
|
||||
|
||||
for(auto& bank : engine->bankMapTable){
|
||||
if(bank.second == bankId){
|
||||
const auto ctl = static_cast<CtlEntry *>(ResourceGetDataByName(("__OTR__" + bank.first).c_str()));
|
||||
for (auto& bank : engine->bankMapTable) {
|
||||
if (bank.second == bankId) {
|
||||
const auto ctl = static_cast<CtlEntry*>(ResourceGetDataByName(("__OTR__" + bank.first).c_str()));
|
||||
engine->banksTable[bankId] = ctl;
|
||||
return ctl;
|
||||
}
|
||||
@@ -328,20 +334,20 @@ extern "C" void GameEngine_UnloadBank(const uint8_t bankId) {
|
||||
extern "C" AudioSequenceData* GameEngine_LoadSequence(const uint8_t seqId) {
|
||||
auto engine = GameEngine::Instance;
|
||||
|
||||
if(engine->sequenceTable[seqId].empty()){
|
||||
if (engine->sequenceTable[seqId].empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if(engine->audioSequenceTable[seqId] != nullptr){
|
||||
if (engine->audioSequenceTable[seqId] != nullptr) {
|
||||
return engine->audioSequenceTable[seqId];
|
||||
}
|
||||
|
||||
auto sequences = static_cast<AudioSequenceData *>(ResourceGetDataByName(engine->sequenceTable[seqId].c_str()));
|
||||
auto sequences = static_cast<AudioSequenceData*>(ResourceGetDataByName(engine->sequenceTable[seqId].c_str()));
|
||||
engine->audioSequenceTable[seqId] = sequences;
|
||||
return sequences;
|
||||
}
|
||||
|
||||
extern "C" uint32_t GameEngine_GetSequenceCount(){
|
||||
extern "C" uint32_t GameEngine_GetSequenceCount() {
|
||||
auto engine = GameEngine::Instance;
|
||||
return engine->sequenceTable.size();
|
||||
}
|
||||
@@ -367,7 +373,7 @@ static const char* sOtrSignature = "__OTR__";
|
||||
|
||||
extern "C" uint8_t GameEngine_OTRSigCheck(const char* data) {
|
||||
static const char* sOtrSignaturea = "__OTR__";
|
||||
return strncmp(data, sOtrSignaturea, strlen(sOtrSignaturea)) == 0;
|
||||
return strncmp(data, sOtrSignature, strlen(sOtrSignature)) == 0;
|
||||
}
|
||||
|
||||
// struct TimedEntry {
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C" void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0) {
|
||||
extern "C" void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr) {
|
||||
auto data = reinterpret_cast<char*>(texAddr);
|
||||
|
||||
if (texAddr != 0 && GameEngine_OTRSigCheck(data)) {
|
||||
if (texAddr != 0 && GameEngine_OTRSigCheck(data) == 1) {
|
||||
const auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResource(data);
|
||||
const auto type = static_cast<LUS::ResourceType>(res->GetInitData()->Type);
|
||||
|
||||
|
||||
+7
-7
@@ -9,6 +9,7 @@
|
||||
#include <actor_types.h>
|
||||
#include <defines.h>
|
||||
#include <macros.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "code_800029B0.h"
|
||||
#include "main.h"
|
||||
@@ -1387,16 +1388,16 @@ s16 add_actor_to_empty_slot(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType)
|
||||
|
||||
// Cleanup unused actors
|
||||
for (index = 0; index < m_GetActorSize(); index++) {
|
||||
//if (m_GetActor(index)->flags == 0) {
|
||||
//! @todo Commented out because deletes too soon.
|
||||
//m_DeleteActor(index);
|
||||
//gNumActors--;
|
||||
// if (m_GetActor(index)->flags == 0) {
|
||||
//! @todo Commented out because deletes too soon.
|
||||
// m_DeleteActor(index);
|
||||
// gNumActors--;
|
||||
//}
|
||||
}
|
||||
gNumActors++;
|
||||
struct Actor* actor = m_AddBaseActor();
|
||||
actor_init(actor, pos, rot, velocity, actorType);
|
||||
return (s16)m_GetActorSize() - 1; // Return current index;
|
||||
return (s16) m_GetActorSize() - 1; // Return current index;
|
||||
}
|
||||
|
||||
UNUSED s16 spawn_actor_at_pos(Vec3f pos, s16 actorType) {
|
||||
@@ -2414,9 +2415,8 @@ void render_course_actors(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPSetLights1(gDisplayListHead++, D_800DC610[1]);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
|
||||
if (gModeSelection != BATTLE) {
|
||||
//func_80297340(camera);
|
||||
// func_80297340(camera);
|
||||
}
|
||||
D_8015F8E0 = 0;
|
||||
|
||||
|
||||
@@ -760,7 +760,7 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) {
|
||||
s32 screenId = 0;
|
||||
s32 screenMode = SCREEN_MODE_1P;
|
||||
|
||||
switch(mode) {
|
||||
switch (mode) {
|
||||
case RENDER_SCREEN_MODE_1P_PLAYER_ONE:
|
||||
func_802A53A4();
|
||||
screenId = 0;
|
||||
@@ -816,8 +816,8 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) {
|
||||
break;
|
||||
}
|
||||
|
||||
struct UnkStruct_800DC5EC *screen = &D_8015F480[screenId];
|
||||
Camera *camera = &cameras[cameraId];
|
||||
struct UnkStruct_800DC5EC* screen = &D_8015F480[screenId];
|
||||
Camera* camera = &cameras[cameraId];
|
||||
|
||||
if (screenMode == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) {
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH);
|
||||
@@ -828,30 +828,34 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) {
|
||||
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);
|
||||
|
||||
guPerspective(&gGfxPool->mtxPersp[cameraId], &perspNorm, gCameraZoom[cameraId], gScreenAspect, CourseManager_GetProps()->NearPersp, CourseManager_GetProps()->FarPersp, 1.0f);
|
||||
guPerspective(&gGfxPool->mtxPersp[cameraId], &perspNorm, gCameraZoom[cameraId], gScreenAspect,
|
||||
CourseManager_GetProps()->NearPersp, CourseManager_GetProps()->FarPersp, 1.0f);
|
||||
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[cameraId]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[cameraId]),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
guLookAt(&gGfxPool->mtxLookAt[cameraId], 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]);
|
||||
guLookAt(&gGfxPool->mtxLookAt[cameraId], 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]);
|
||||
if (D_800DC5C8 == 0) {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]),
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
mtxf_identity(matrix);
|
||||
render_set_position(matrix, 0);
|
||||
} else {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
}
|
||||
render_course(screen);
|
||||
if (D_800DC5C8 == 1) {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]),
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
mtxf_identity(matrix);
|
||||
render_set_position(matrix, 0);
|
||||
}
|
||||
render_course_actors(screen);
|
||||
render_object(mode);
|
||||
switch(screenId) {
|
||||
switch (screenId) {
|
||||
case 0:
|
||||
render_players_on_screen_one();
|
||||
break;
|
||||
@@ -867,7 +871,7 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) {
|
||||
}
|
||||
func_8029122C(screen, playerId);
|
||||
|
||||
switch(playerId) {
|
||||
switch (playerId) {
|
||||
case 0:
|
||||
func_80021B0C();
|
||||
break;
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ s32 mio0encode(s32 input, s32 arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
void tkmk00decode(u8* src, u8* arg1, u8* dest, s32 n) {
|
||||
memcpy(dest, src, 0x1000);
|
||||
dest = src;
|
||||
// memcpy((void*) dest, (void*) src, 0x1000);
|
||||
}
|
||||
|
||||
void osStartThread(OSThread* thread) {
|
||||
|
||||
Reference in New Issue
Block a user