Implement SpawnParams struct (#536)

* Impl SpawnParams

* Added json submodule

* Update json

* Update

* Works

* Remove comment

* Works refactor

* Snowman and thwomp working

* Impl hot air balloon

* More progress

* All OObjects are done

* cleanup

* Refactor 2Dpath to normal path

* Update nlohmann json & fix compile

* Rest of actors

* MORE CHANGES

* Finish actors

* Done PR, some fix to collision viewer

* Impl falling rocks

* Add const

* wip editor refactor

* Property work

* continue

* Overridable editor properties

* Actor saving/loading works now

* Fix light alignment

* Clarification

* Impl penguin

* params impl signs

* properties impl falling rock

* More property impls

* impl air balloon

* Add spawnParams to OObject Translate

* Snowman translate better

* impl hedgehog properly

* properties impl trophy

* thwomp progress

* Finish impl properties

* Fix compile

* Fix cursor collisions

* Move registered actors

* Rename pathPoint XYZ to xyz

* Fix editor pause bug

* Clean up

* Review comments

* Remove SpawnParams struct from actor classes

* Rename

* Player Label First Iteration

* Work now

* Working 3d text

* Fix boo bug

* Finish AText actor

* Fix spawnparams compile

* Register AText

* Finish Text Actor

* Fix thwomp interpolation

* Fix compile

* Fix crab and hedgehog

* Fix loading flagpole

* Fix Hot Air Balloon

* Turn zbuffer on for AText

* Update

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
MegaMech
2025-11-09 19:07:44 -07:00
committed by GitHub
parent 760fa3bf52
commit de9c5d5101
177 changed files with 6967 additions and 2105 deletions
-81
View File
@@ -620,75 +620,8 @@ void Harbour::Load() {
void Harbour::LoadTextures() {
dma_textures(gTextureTrees1, 0x0000035BU, 0x00000800U); // 0x03009000
D_802BA058 = dma_textures(gTexturePiranhaPlant1, 0x000003E8U, 0x00000800U); // 0x03009800
dma_textures(gTexturePiranhaPlant2, 0x000003E8U, 0x00000800U); // 0x0300A000
dma_textures(gTexturePiranhaPlant3, 0x000003E8U, 0x00000800U); // 0x0300A800
dma_textures(gTexturePiranhaPlant4, 0x000003E8U, 0x00000800U); // 0x0300B000
dma_textures(gTexturePiranhaPlant5, 0x000003E8U, 0x00000800U); // 0x0300B800
dma_textures(gTexturePiranhaPlant6, 0x000003E8U, 0x00000800U); // 0x0300C000
dma_textures(gTexturePiranhaPlant7, 0x000003E8U, 0x00000800U); // 0x0300C800
dma_textures(gTexturePiranhaPlant8, 0x000003E8U, 0x00000800U); // 0x0300D000
dma_textures(gTexturePiranhaPlant9, 0x000003E8U, 0x00000800U); // 0x0300D800
}
Path2D harbour_path2D[] = {
{ 0, 0},
{ 0, -100},
{ 0, -200},
{ 0, -300},
{ 0, -400},
{ 0, -500},
{ 0, -600},
{ 0, -700},
{ 0, -800},
{ 0, -900},
{ 0, -1000},
{ 0, -1096}, // Main point 1
{ 100, -1090},
{ 200, -1085},
{ 300, -1080},
{ 400, -1075},
{ 500, -1072}, // Curve begins to smooth here
{ 600, -1068},
{ 700, -1065},
{ 800, -1063},
{ 900, -1061},
{ 984, -1060}, // Main point 2
{ 990, -900},
{ 995, -800},
{ 997, -700},
{ 998, -600},
{ 999, -500},
{ 999, -400},
{ 999, -300},
{ 999, -200},
{ 999, -100},
{ 999, 0},
{ 999, 100},
{ 999, 200},
{ 999, 300},
{ 999, 400},
{ 999, 500},
{ 999, 600},
{ 999, 700},
{ 999, 800},
{ 999, 900},
{ 999, 940}, // Main point 3
{ 900, 945},
{ 800, 945},
{ 700, 947},
{ 600, 948},
{ 500, 949},
{ 400, 949},
{ 300, 949},
{ 200, 950},
{ 100, 950},
{ 0, 950}, // Main point 4
// End of path
{ -32768, -32768 } // Terminator
};
void Harbour::BeginPlay() {
struct ActorSpawnData itemboxes[] = {
{ 200, 1500, 200 , 0},
@@ -742,22 +675,8 @@ void Harbour::BeginPlay() {
// gWorldInstance.AddObject(new OBoos(10, IPathSpan(0, 5), IPathSpan(18, 23), IPathSpan(25, 50)));
// gVehicle2DPathPoint = harbour_path2D;
//gVehicle2DPathLength = 53;
// D_80162EB0 = spawn_actor_on_surface(harbour_path2D[0].x, 2000.0f, harbour_path2D[0].z);
// DEBUG ONLY TO VISUALIZE PATH
// for (size_t i = 0; i < ARRAY_COUNT(harbour_path); i++) {
// if (i % 10 == 1) {
// f32 height = spawn_actor_on_surface(harbour_path[i].posX, 2000.0f, harbour_path[i].posZ);
// Vec3f itemPos = {harbour_path[i].posX, height, harbour_path[i].posZ};
// add_actor_to_empty_slot(itemPos, rot, vel, ACTOR_ITEM_BOX);
// }
// }
//gWorldInstance.AddActor(new AShip(FVector(-1694, -111, 1451), AShip::Skin::GHOSTSHIP));
//gWorldInstance.AddActor(new AShip(FVector(2811, -83, 966), AShip::Skin::SHIP2));
//gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(16, -136, -34)));
}
void Harbour::WhatDoesThisDo(Player* player, int8_t playerId) {