mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-07 06:05:31 -04:00
[modding] Big Update PR (#118)
* Implement kart vehicle * Fix menu CC * Actors * variable framerate * Implement Actors vector * Fix water & scrolling textures * Finish ACoin * Refactor finishline * Refactor mtx to vector * Fix refactored screen code bugs * Fix playlist bug * Switching courses working now * Fix podium ceremony * Mostly Fix Demo and Credits * Credits Load Actors and Textures * Fix credits * Formatting * Update lus and torch * Fix water features * Fix crabs * Combine function * Fix wheels * Add Moon Jump Cheat * Wheel Change * Fix smoke due to wheel change * Fix screens for wheels * Fix transparency * Fix staff ghost * Fix lakitu transition widescreen * Rename and export credits text * Fixes --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,8 @@ extern "C" {
|
||||
#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;
|
||||
}
|
||||
|
||||
@@ -76,6 +78,8 @@ Course::Course() {
|
||||
void Course::Load(Vtx* vtx, Gfx* gfx) {
|
||||
gSegmentTable[4] = reinterpret_cast<uintptr_t>(&vtx[0]);
|
||||
gSegmentTable[7] = reinterpret_cast<uintptr_t>(&gfx[0]);
|
||||
|
||||
Course::Init();
|
||||
}
|
||||
|
||||
void Course::Load() {
|
||||
@@ -86,7 +90,6 @@ void Course::Load() {
|
||||
// Convert course vtx to vtx
|
||||
Vtx* vtx = reinterpret_cast<Vtx*>(allocate_memory(vtxSize));
|
||||
gSegmentTable[4] = reinterpret_cast<uintptr_t>(&vtx[0]);
|
||||
printf("\nVtxsize: 0x%X\n\n",vtxSize);
|
||||
func_802A86A8(reinterpret_cast<CourseVtx*>(LOAD_ASSET_RAW(this->vtx)), vtx, vtxSize / sizeof(Vtx));
|
||||
|
||||
// Load and allocate memory for course textures
|
||||
@@ -117,6 +120,28 @@ void Course::Load() {
|
||||
assert(gfx != NULL);
|
||||
gSegmentTable[7] = reinterpret_cast<uintptr_t>(&gfx[0]);
|
||||
displaylist_unpack(reinterpret_cast<uintptr_t *>(gfx), reinterpret_cast<uintptr_t>(packed), 0);
|
||||
|
||||
Course::Init();
|
||||
}
|
||||
|
||||
void Course::Init() {
|
||||
gNumActors = 0;
|
||||
gCourseMinX = 0;
|
||||
gCourseMinY = 0;
|
||||
gCourseMinZ = 0;
|
||||
|
||||
gCourseMaxX = 0;
|
||||
gCourseMaxY = 0;
|
||||
gCourseMaxZ = 0;
|
||||
|
||||
D_8015F59C = 0;
|
||||
D_8015F5A0 = 0;
|
||||
func_80295D6C();
|
||||
D_8015F58C = 0;
|
||||
gCollisionMeshCount = 0;
|
||||
gCollisionMesh = (CollisionTriangle*) gNextFreeMemoryAddress;
|
||||
D_800DC5BC = 0;
|
||||
D_800DC5C8 = 0;
|
||||
}
|
||||
|
||||
void Course::LoadTextures() { }
|
||||
@@ -172,7 +197,7 @@ void Course::SomeSounds() {
|
||||
|
||||
}
|
||||
|
||||
void Course::SetCourseVtxColours() {
|
||||
void Course::CreditsSpawnActors() {
|
||||
|
||||
}
|
||||
|
||||
@@ -195,9 +220,6 @@ void Course::SetStaffGhost() {
|
||||
D_80162DF4 = 1;
|
||||
}
|
||||
|
||||
void Course::SpawnBombKarts() {
|
||||
}
|
||||
|
||||
void Course::Waypoints(Player* player, int8_t playerId) {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
@@ -208,12 +230,11 @@ void Course::Waypoints(Player* player, int8_t playerId) {
|
||||
void Course::SpawnVehicles() {}
|
||||
void Course::UpdateVehicles() {}
|
||||
|
||||
void Course::BeginPlay() {}
|
||||
void Course::Render(struct UnkStruct_800DC5EC* arg0) {}
|
||||
void Course::RenderCredits() {}
|
||||
void Course::Collision() {}
|
||||
void Course::GenerateCollision() {}
|
||||
void Course::Water() {}
|
||||
void Course::ScrollingTextures() {}
|
||||
void Course::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {}
|
||||
|
||||
void Course::Destroy() { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user