mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-06 11:21:09 -04:00
[modding] Implement Vehicles & Fix Animations (#109)
* Train works * Fix minimap * Fix highway * Fix * Refactor train and boat * Update * Implement Trucks * Fix tanker * Finish implementing vehicles * Fix animations * Fix spawn players * Fix spawn players * Fix loading custom data --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
@@ -28,6 +28,7 @@ extern "C" {
|
||||
#include "staff_ghosts.h"
|
||||
#include "actors.h"
|
||||
#include "collision.h"
|
||||
#include "code_8003DC40.h"
|
||||
#include "memory.h"
|
||||
extern const char *luigi_raceway_dls[];
|
||||
extern s16 currentScreenSection;
|
||||
@@ -38,6 +39,9 @@ LuigiRaceway::LuigiRaceway() {
|
||||
this->gfx = d_course_luigi_raceway_packed_dls;
|
||||
this->gfxSize = 6377;
|
||||
this->textures = luigi_raceway_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineLuigiRaceway;
|
||||
Props.D_800E5548[0] = 64;
|
||||
Props.D_800E5548[1] = 96;
|
||||
|
||||
Props.Id = "mk:luigi_raceway";
|
||||
Props.Name = "luigi raceway";
|
||||
@@ -74,12 +78,12 @@ LuigiRaceway::LuigiRaceway() {
|
||||
Props.D_0D009808[2] = 5.75f;
|
||||
Props.D_0D009808[3] = 6.3333334f;
|
||||
|
||||
Props.PathTable[0] = 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] = 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;
|
||||
@@ -105,8 +109,8 @@ void LuigiRaceway::LoadTextures() {
|
||||
}
|
||||
|
||||
void LuigiRaceway::SpawnActors() {
|
||||
spawn_foliage(d_course_luigi_raceway_tree_spawn);
|
||||
spawn_all_item_boxes(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));
|
||||
}
|
||||
|
||||
void LuigiRaceway::Init() {}
|
||||
@@ -186,17 +190,13 @@ void LuigiRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
|
||||
void LuigiRaceway::SpawnBombKarts() {
|
||||
World* world = GetWorld();
|
||||
|
||||
if (world) {
|
||||
world->SpawnObject(std::make_unique<OBombKart>(40, 3, 0.8333333, 0, 0, 0, 0));
|
||||
world->SpawnObject(std::make_unique<OBombKart>(100, 3, 0.8333333, 0, 0, 0, 0));
|
||||
world->SpawnObject(std::make_unique<OBombKart>(265, 3, 0.8333333, 0, 0, 0, 0));
|
||||
world->SpawnObject(std::make_unique<OBombKart>(285, 1, 0.8333333, 0, 0, 0, 0));
|
||||
world->SpawnObject(std::make_unique<OBombKart>(420, 1, 0.8333333, 0, 0, 0, 0));
|
||||
world->SpawnObject(std::make_unique<OBombKart>(0, 0, 0.8333333, 0, 0, 0, 0));
|
||||
world->SpawnObject(std::make_unique<OBombKart>(0, 0, 0.8333333, 0, 0, 0, 0));
|
||||
}
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(40, 3, 0.8333333, 0, 0, 0, 0));
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(100, 3, 0.8333333, 0, 0, 0, 0));
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(265, 3, 0.8333333, 0, 0, 0, 0));
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(285, 1, 0.8333333, 0, 0, 0, 0));
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(420, 1, 0.8333333, 0, 0, 0, 0));
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(0, 0, 0.8333333, 0, 0, 0, 0));
|
||||
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(0, 0, 0.8333333, 0, 0, 0, 0));
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
@@ -328,8 +328,12 @@ void LuigiRaceway::RenderCredits() {
|
||||
|
||||
void LuigiRaceway::Collision() {}
|
||||
|
||||
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::GenerateCollision() {
|
||||
parse_course_displaylists(d_course_luigi_raceway_addr);
|
||||
parse_course_displaylists((TrackSectionsI*)LOAD_ASSET_RAW(d_course_luigi_raceway_addr));
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = gCourseMinY - 10.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user