[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:
MegaMech
2024-10-15 13:09:43 -06:00
committed by GitHub
parent 58d56fcba8
commit a0862b6a15
82 changed files with 3130 additions and 808 deletions
+14 -15
View File
@@ -38,6 +38,9 @@ BansheeBoardwalk::BansheeBoardwalk() {
this->gfx = d_course_banshee_boardwalk_packed_dls;
this->gfxSize = 3689;
this->textures = banshee_boardwalk_textures;
Props.MinimapTexture = gTextureCourseOutlineBansheeBoardwalk;
Props.D_800E5548[0] = 64;
Props.D_800E5548[1] = 64;
Props.Id = "mk:banshee_boardwalk";
Props.Name = "banshee boardwalk";
@@ -74,12 +77,12 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
Props.PathTable[0] = d_course_banshee_boardwalk_unknown_waypoints;
Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
Props.PathTable2[0] = d_course_banshee_boardwalk_track_waypoints;
Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -103,7 +106,7 @@ void BansheeBoardwalk::LoadTextures() {
}
void BansheeBoardwalk::SpawnActors() {
spawn_all_item_boxes(d_course_banshee_boardwalk_item_box_spawns);
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_item_box_spawns));
}
void BansheeBoardwalk::Init() { }
@@ -188,17 +191,13 @@ void BansheeBoardwalk::WhatDoesThisDoAI(Player* player, int8_t playerId) {
}
void BansheeBoardwalk::SpawnBombKarts() {
World* world = GetWorld();
if (world) {
world->SpawnObject(std::make_unique<OBombKart>(140, 3, 0.8333333, 0, 0, 0, 0));
world->SpawnObject(std::make_unique<OBombKart>(165, 1, 0.8333333, 0, 0, 0, 0));
world->SpawnObject(std::make_unique<OBombKart>(330, 3, 0.8333333, 0, 0, 0, 0));
world->SpawnObject(std::make_unique<OBombKart>(550, 1, 0.8333333, 0, 0, 0, 0));
world->SpawnObject(std::make_unique<OBombKart>(595, 3, 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>(140, 3, 0.8333333, 0, 0, 0, 0));
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(165, 1, 0.8333333, 0, 0, 0, 0));
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(330, 3, 0.8333333, 0, 0, 0, 0));
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(550, 1, 0.8333333, 0, 0, 0, 0));
gWorldInstance.SpawnObject(std::make_unique<OBombKart>(595, 3, 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
@@ -282,7 +281,7 @@ void BansheeBoardwalk::GenerateCollision() {
D_801625EC = 0;
D_801625F4 = 0;
D_801625F0 = 0;
parse_course_displaylists(d_course_banshee_boardwalk_track_sections);
parse_course_displaylists((TrackSectionsI*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
func_80295C6C();
find_vtx_and_set_colours(segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07000878)), 128, 0, 0, 0);
D_8015F8E4 = -80.0f;