diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-11-14 23:32:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-14 23:32:55 -0700 |
| commit | 475f167bb2803999c5116bc285601d1f9a05d7de (patch) | |
| tree | 859fec292c5c9807cc9690ebf4f0600f558b6063 /src/engine/courses/MooMooFarm.cpp | |
| parent | 4fbb031dd95f2a84e73fbca269f517e98808d293 (diff) | |
[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>
Diffstat (limited to 'src/engine/courses/MooMooFarm.cpp')
| -rw-r--r-- | src/engine/courses/MooMooFarm.cpp | 59 |
1 files changed, 40 insertions, 19 deletions
diff --git a/src/engine/courses/MooMooFarm.cpp b/src/engine/courses/MooMooFarm.cpp index f755dde39..6517eab82 100644 --- a/src/engine/courses/MooMooFarm.cpp +++ b/src/engine/courses/MooMooFarm.cpp @@ -6,7 +6,8 @@ #include "MooMooFarm.h" #include "GameObject.h" #include "World.h" -#include "BombKart.h" +#include "engine/actors/AFinishline.h" +#include "engine/vehicles/OBombKart.h" #include "assets/moo_moo_farm_data.h" extern "C" { @@ -103,6 +104,14 @@ MooMooFarm::MooMooFarm() { Props.Skybox.FloorTopLeft = {255, 184, 99}; } +void MooMooFarm::Load() { + Course::Load(); + + parse_course_displaylists((TrackSectionsI*)LOAD_ASSET_RAW(d_course_moo_moo_farm_addr)); + func_80295C6C(); + D_8015F8E4 = gCourseMinY - 10.0f; +} + void MooMooFarm::LoadTextures() { dma_textures(gTextureTrees4Left, 0x000003E8U, 0x00000800U); dma_textures(gTextureTrees4Right, 0x000003E8U, 0x00000800U); @@ -119,12 +128,28 @@ void MooMooFarm::LoadTextures() { } void MooMooFarm::SpawnActors() { + gWorldInstance.AddActor(new AFinishline()); + if (gPlayerCountSelection1 != 4) { spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_moo_moo_farm_tree_spawn)); } spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_moo_moo_farm_item_box_spawns)); } +void MooMooFarm::SpawnVehicles() { + if (gModeSelection == VERSUS) { + Vec3f pos = {0, 0, 0}; + + gWorldInstance.AddBombKart(pos, &D_80164550[0][50], 50, 3, 0.8333333f); + gWorldInstance.AddBombKart(pos, &D_80164550[0][140], 140, 3, 0.8333333f); + gWorldInstance.AddBombKart(pos, &D_80164550[0][225], 225, 3, 0.8333333f); + gWorldInstance.AddBombKart(pos, &D_80164550[0][316], 316, 3, 0.8333333f); + gWorldInstance.AddBombKart(pos, &D_80164550[0][434], 434, 3, 0.8333333f); + gWorldInstance.AddBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f); + gWorldInstance.AddBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f); + } +} + // Likely sets minimap boundaries void MooMooFarm::MinimapSettings() { D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust0, 0x479, 0xC00)); @@ -237,26 +262,12 @@ void MooMooFarm::WhatDoesThisDoAI(Player* player, int8_t playerId) { } } -void MooMooFarm::SpawnBombKarts() { - gWorldInstance.AddObject(std::make_unique<OBombKart>(40, 3, 0.8333333, 0, 0, 0, 0)); - gWorldInstance.AddObject(std::make_unique<OBombKart>(100, 3, 0.8333333, 0, 0, 0, 0)); - gWorldInstance.AddObject(std::make_unique<OBombKart>(265, 3, 0.8333333, 0, 0, 0, 0)); - gWorldInstance.AddObject(std::make_unique<OBombKart>(285, 1, 0.8333333, 0, 0, 0, 0)); - gWorldInstance.AddObject(std::make_unique<OBombKart>(420, 1, 0.8333333, 0, 0, 0, 0)); - gWorldInstance.AddObject(std::make_unique<OBombKart>(0, 0, 0.8333333, 0, 0, 0, 0)); - gWorldInstance.AddObject(std::make_unique<OBombKart>(0, 0, 0.8333333, 0, 0, 0, 0)); -} - // Positions the finishline on the minimap void MooMooFarm::MinimapFinishlinePosition() { //! todo: Place hard-coded values here. draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line); } -void MooMooFarm::SetStaffGhost() {} - -void MooMooFarm::BeginPlay() {} - void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) { s16 temp_s0 = arg0->pathCounter; s16 temp_s1 = arg0->playerDirection; @@ -336,10 +347,20 @@ void MooMooFarm::RenderCredits() { void MooMooFarm::Collision() {} -void MooMooFarm::GenerateCollision() { - parse_course_displaylists((TrackSectionsI*)LOAD_ASSET_RAW(d_course_moo_moo_farm_addr)); - func_80295C6C(); - D_8015F8E4 = gCourseMinY - 10.0f; +void MooMooFarm::CreditsSpawnActors() { + dma_textures(gTextureTrees4Left, 0x3E8, 0x800); + dma_textures(gTextureTrees4Right, 0x3E8, 0x800); + dma_textures(gTextureCow01Left, 0x400, 0x800); + dma_textures(gTextureCow01Right, 0x400, 0x800); + dma_textures(gTextureCow02Left, 0x400, 0x800); + dma_textures(gTextureCow02Right, 0x400, 0x800); + dma_textures(gTextureCow03Left, 0x400, 0x800); + dma_textures(gTextureCow03Right, 0x400, 0x800); + dma_textures(gTextureCow04Left, 0x400, 0x800); + dma_textures(gTextureCow04Right, 0x400, 0x800); + dma_textures(gTextureCow05Left, 0x400, 0x800); + dma_textures(gTextureCow05Right, 0x400, 0x800); + spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_moo_moo_farm_tree_spawn)); } void MooMooFarm::Destroy() { } |
