summaryrefslogtreecommitdiff
path: root/src/engine/actors
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-05-14 18:30:32 -0600
committerGitHub <noreply@github.com>2025-05-14 18:30:32 -0600
commit32632cacdb316d7f2d3b6ecdb634f0ef9aebadf0 (patch)
treed374a84675fc0f49100c275aa34828bc9db538f8 /src/engine/actors
parent70f049cb6c326dede27e0ba7e88ac0d67b7651a4 (diff)
Impl new intro (#193)
* Update menus * Update CMakeLists.txt * Add Ship * Impl hm ship actors * Update HM course * Impl new intro * Finish intro scene * Rename * Start Editor Work * raycast works * Fix ScreenRayTrace in widescreen * Basic Actor Picking * wip * Editor use vtx collision * gizmo work * otr works for object picking * Impl objects for editor * actor init * Update * Add all axis move (freemove) * Docking Windows works here * Setup imgui layout for editor * Editor Snap to Ground works * Basic Scene Explorer Works * Editor get actor names * Impl editor object names * impl Editor Play and Pause buttons * Editor translate works while paused * Fix freecam lighting * Added adjustable track properties to editor * Editor matrix, icons, rotation, impl light * Setup Track Properties 1 * Editor tooling wip * Load modded o2rs * Don't enable hud if editor is enabled * Updates * SceneManager nearly working * Fix mario kart 64 intro logo sizing * Fix Rotator * Finish new matrix translation code * Cleanup headers * Cleanup * Cleanup 2 * Cleanup 3 * Prevent divize by zero crash * Add visible circle for translate in all axis * Editor scaling/rot works properly now * Scale All_Axis evenly * Fixes to includes to work on Linux. * Removed overfilled arguments in gfx_create_framebuffer() * Added missing function definitions to Game.h * Editor sun face the camera * Add rotation model to gizmo * Add new handles * Failed attempt at transforming collision * Impl water volume * Import fast64 paths * water surface * Scene Setup 1 * Custom Track O2R almost working needs testing * Custom Track Load path O2r * Render custom track. Wip collision * Add missing function * Debug Spawning Custom O2R Track * Import courses working now * Fix memory leak * Remove New Track Button * Engine.cpp more consistent with sf64 * Fix Editor Enable Button * Editor Accurate mouse click drag objects * Editor selects closest object and cleanup * Gizmo rot and scale collision working * Remove constexpr from IRotator * Impl properties for location/rot/scale * Better Properties display, swap rot handles * Fix content browser dock and editor now disabled by default * Remove GameInfoWindow, Multiplayer Button, and FPS Slider * Disable Editor when its disabled * Add new logo to hm intro * Fix pause menu item box cursor * Remove minimap from Course::from_json and to_json * Impl Import Minimap * Fix custom minimap rendering * minimap uses extension .png * Refactor minimap * Freecam only for player 1 * GrandPrix Balloons work in custom track * Track Id is now std::string and outside of Props * Moved editor assets to be included in ship.o2r * Fixed GenerateO2R to package the correct folder and save to the correct filename * Linux specific changes. * Added "#include <stdio.h>" that required them * Changed how the "ship.o2r" file is loaded to allow it to load the file from within appimages. * Changed the Linuxdeploy version to avoid errors later when the Github Actions creates appimages(same fix applied to other ports.) * Revert "Moved editor assets to be included in ship.o2r" This reverts commit 05704c01f761baa67a83e357d9765f5c6b5e3fdb. * Added back files(this time without LUS changes) * Changed workflow file to use correct filename for assets file. * Missed a few spots in the workflow file. * Added .desktop file and made corrections to the main workflow. * Added the rest of upstream CMakeLists.txt * disabled USE_NETWORKING * New InverseMatrix * Renamed both .o2r files to be more accurate to its contents. * Reverted CmakeList.txt --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com> Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
Diffstat (limited to 'src/engine/actors')
-rw-r--r--src/engine/actors/Banana.cpp (renamed from src/engine/actors/ABanana.cpp)3
-rw-r--r--src/engine/actors/Banana.h (renamed from src/engine/actors/ABanana.h)1
-rw-r--r--src/engine/actors/BowserStatue.cpp1
-rw-r--r--src/engine/actors/Cloud.cpp (renamed from src/engine/actors/ACloud.cpp)11
-rw-r--r--src/engine/actors/Cloud.h (renamed from src/engine/actors/ACloud.h)3
-rw-r--r--src/engine/actors/Finishline.cpp (renamed from src/engine/actors/AFinishline.cpp)3
-rw-r--r--src/engine/actors/Finishline.h (renamed from src/engine/actors/AFinishline.h)0
-rw-r--r--src/engine/actors/MarioSign.cpp56
-rw-r--r--src/engine/actors/MarioSign.h19
-rw-r--r--src/engine/actors/Ship.cpp45
-rw-r--r--src/engine/actors/Ship.h6
-rw-r--r--src/engine/actors/SpaghettiShip.cpp37
-rw-r--r--src/engine/actors/SpaghettiShip.h6
-rw-r--r--src/engine/actors/Starship.cpp31
-rw-r--r--src/engine/actors/Starship.h3
-rw-r--r--src/engine/actors/Tree.cpp (renamed from src/engine/actors/ATree.cpp)3
-rw-r--r--src/engine/actors/Tree.h (renamed from src/engine/actors/ATree.h)0
-rw-r--r--src/engine/actors/WarioSign.cpp (renamed from src/engine/actors/AWarioSign.cpp)14
-rw-r--r--src/engine/actors/WarioSign.h (renamed from src/engine/actors/AWarioSign.h)4
19 files changed, 155 insertions, 91 deletions
diff --git a/src/engine/actors/ABanana.cpp b/src/engine/actors/Banana.cpp
index d484ab983..6c7f837d1 100644
--- a/src/engine/actors/ABanana.cpp
+++ b/src/engine/actors/Banana.cpp
@@ -1,6 +1,6 @@
#include <libultraship.h>
-#include "ABanana.h"
+#include "Banana.h"
#include "engine/Actor.h"
extern "C" {
@@ -11,6 +11,7 @@ void render_actor_banana(Camera*, float[4][4], struct BananaActor*);
}
ABanana::ABanana(uint16_t playerId, const float pos[3], const s16 rot[3], const float velocity[3]) {
+ Name = "Banana";
// Initialize the BananaActor's position, rotation, and velocity
std::copy(pos, pos + 3, Pos);
//std::copy(rot, rot + 3, this->a.rot);
diff --git a/src/engine/actors/ABanana.h b/src/engine/actors/Banana.h
index 0da9eb98f..d8c55e9cb 100644
--- a/src/engine/actors/ABanana.h
+++ b/src/engine/actors/Banana.h
@@ -10,7 +10,6 @@ public:
// Constructor
ABanana(uint16_t playerId, const float pos[3], const s16 rot[3], const float velocity[3]);
-
virtual ~ABanana() override = default;
// Virtual functions to be overridden by derived classes
diff --git a/src/engine/actors/BowserStatue.cpp b/src/engine/actors/BowserStatue.cpp
index de448de5e..c680c4c25 100644
--- a/src/engine/actors/BowserStatue.cpp
+++ b/src/engine/actors/BowserStatue.cpp
@@ -13,6 +13,7 @@ Vtx gBowserStatueVtx[717];
Gfx gBowserStatueGfx[162];
ABowserStatue::ABowserStatue(FVector pos, ABowserStatue::Behaviour behaviour) {
+ Name = "Bowser Statue";
Pos = pos;
ABowserStatue::Behaviour _behaviour = behaviour;
}
diff --git a/src/engine/actors/ACloud.cpp b/src/engine/actors/Cloud.cpp
index d3eaad32d..cae55e342 100644
--- a/src/engine/actors/ACloud.cpp
+++ b/src/engine/actors/Cloud.cpp
@@ -1,6 +1,6 @@
#include <libultraship.h>
-#include "ACloud.h"
+#include "Cloud.h"
#include "engine/Actor.h"
#include "World.h"
@@ -14,10 +14,11 @@ extern f32 gKartHopInitialVelocityTable[];
extern f32 gKartGravityTable[];
}
-ACloud::ACloud(Vec3f pos) {
- Pos[0] = pos[0];
- Pos[1] = pos[1];
- Pos[2] = pos[2];
+ACloud::ACloud(FVector pos) {
+ Name = "Cloud";
+ Pos[0] = pos.x;
+ Pos[1] = pos.y;
+ Pos[2] = pos.z;
Rot[0] = 0;
Rot[1] = 0;
Rot[2] = 0;
diff --git a/src/engine/actors/ACloud.h b/src/engine/actors/Cloud.h
index 3d266243c..4805c08b9 100644
--- a/src/engine/actors/ACloud.h
+++ b/src/engine/actors/Cloud.h
@@ -2,6 +2,7 @@
#include <libultraship.h>
#include "engine/Actor.h"
+#include "CoreMath.h"
extern "C" {
#include "macros.h"
@@ -15,7 +16,7 @@ public:
// Constructor
- ACloud(Vec3f pos);
+ ACloud(FVector pos);
virtual ~ACloud() override = default;
diff --git a/src/engine/actors/AFinishline.cpp b/src/engine/actors/Finishline.cpp
index 77dd37ede..0680e60bd 100644
--- a/src/engine/actors/AFinishline.cpp
+++ b/src/engine/actors/Finishline.cpp
@@ -2,7 +2,7 @@
#include <libultra/gbi.h>
#include "CoreMath.h"
-#include "AFinishline.h"
+#include "Finishline.h"
#include "engine/Actor.h"
#include "World.h"
#include "assets/common_data.h"
@@ -18,6 +18,7 @@ extern f32 gKartGravityTable[];
}
AFinishline::AFinishline(std::optional<FVector> pos) {
+ Name = "Finishline";
if (pos.has_value()) {
// Set spawn point to the provided position
diff --git a/src/engine/actors/AFinishline.h b/src/engine/actors/Finishline.h
index 61b561a5e..61b561a5e 100644
--- a/src/engine/actors/AFinishline.h
+++ b/src/engine/actors/Finishline.h
diff --git a/src/engine/actors/MarioSign.cpp b/src/engine/actors/MarioSign.cpp
new file mode 100644
index 000000000..f39e4f69b
--- /dev/null
+++ b/src/engine/actors/MarioSign.cpp
@@ -0,0 +1,56 @@
+#include "MarioSign.h"
+
+#include <libultra/gbi.h>
+#include <assets/mario_raceway_data.h>
+
+extern "C" {
+#include "common_structs.h"
+#include "math_util.h"
+#include "main.h"
+#include "actor_types.h"
+}
+
+AMarioSign::AMarioSign(FVector pos) {
+ Type = ACTOR_MARIO_SIGN;
+ Name = "Mario Sign";
+ Pos[0] = pos.x;
+ Pos[1] = pos.y;
+ Pos[2] = pos.z;
+ Flags |= 0x4000;
+}
+
+void AMarioSign::Tick() {
+ if ((Flags & 0x800) == 0) {
+ if ((Flags & 0x400) != 0) {
+ Pos[1] += 4.0f;
+ if (Pos[1] > 800.0f) {
+ Flags |= 0x800;
+ Rot[1] += 1820;
+ }
+ } else {
+ Rot[1] += 182;
+ }
+ }
+}
+
+void AMarioSign::Draw(Camera *camera) {
+ Mat4 sp40;
+ f32 unk;
+
+ if (Flags & 0x800) {
+ return;
+ }
+
+ unk = is_within_render_distance(camera->pos, Pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 16000000.0f);
+ if (CVarGetInteger("gNoCulling", 0) == 1) {
+ unk = MAX(unk, 0.0f);
+ }
+ if (!(unk < 0.0f)) {
+ gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
+ gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
+ mtxf_pos_rotation_xyz(sp40, Pos, Rot);
+ if (render_set_position(sp40, 0) != 0) {
+ gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_mario_raceway_dl_sign);
+ }
+ }
+}
diff --git a/src/engine/actors/MarioSign.h b/src/engine/actors/MarioSign.h
new file mode 100644
index 000000000..099894dc1
--- /dev/null
+++ b/src/engine/actors/MarioSign.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <libultraship.h>
+#include "engine/Actor.h"
+#include "CoreMath.h"
+
+extern "C" {
+#include "common_structs.h"
+}
+
+class AMarioSign : public AActor {
+public:
+
+ virtual ~AMarioSign() = default;
+ explicit AMarioSign(FVector pos);
+
+ virtual void Tick() override;
+ virtual void Draw(Camera*) override;
+};
diff --git a/src/engine/actors/Ship.cpp b/src/engine/actors/Ship.cpp
index 148b883eb..5af3553e2 100644
--- a/src/engine/actors/Ship.cpp
+++ b/src/engine/actors/Ship.cpp
@@ -1,6 +1,8 @@
#include "Ship.h"
#include <libultra/gbi.h>
+#include "CoreMath.h"
+#include "Matrix.h"
extern "C" {
#include "common_structs.h"
@@ -14,48 +16,41 @@ extern "C" {
AShip::AShip(FVector pos, AShip::Skin skin) {
Spawn = pos;
Spawn.y += 10;
-
+ Pos[0] = pos.x;
+ Pos[1] = pos.y;
+ Pos[2] = pos.z;
+ Scale = FVector(0.4, 0.4, 0.4);
+
switch(skin) {
case GHOSTSHIP:
+ Name = "Ghostship";
_skin = ghostship_Plane_mesh;
break;
case SHIP2:
+ Name = "Ship_1";
_skin = ship2_SoH_mesh;
break;
case SHIP3:
+ Name = "Ship_2";
_skin = ship3_2Ship_mesh;
break;
}
+ Model = _skin;
}
void AShip::Tick() {
- static float angle = 0.0f; // Keeps track of the ship's rotation around the circle
- float radius = 150.0f; // The radius of the circular path
- float speed = 0.01f; // Speed of rotation
-
- angle += speed; // Increment the angle to move in a circle
-
- // Update the position based on a circular path
- Pos.x = Spawn.x + radius * cosf(angle);
- Pos.z = Spawn.z + radius * sinf(angle);
+ // static float angle = 0.0f; // Keeps track of the ship's rotation around the circle
+ // float radius = 150.0f; // The radius of the circular path
+ // float speed = 0.01f; // Speed of rotation
- // Rotate to face forward along the circle
- Rot.yaw = -static_cast<int16_t>(angle * (32768.0f / M_PI / 2.0f));
-}
-
-void AShip::Draw(Camera *camera) {
- Mat4 shipMtx;
- Vec3f hullPos = {Pos.x, Pos.y, Pos.z};
- Vec3s hullRot = {Rot.pitch, Rot.yaw, Rot.roll};
+ // angle += speed; // Increment the angle to move in a circle
- gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
- gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
+ // // Update the position based on a circular path
+ // Pos.x = Spawn.x + radius * cosf(angle);
+ // Pos.z = Spawn.z + radius * sinf(angle);
- mtxf_pos_rotation_xyz(shipMtx, hullPos, hullRot);
- mtxf_scale(shipMtx, 0.4);
- if (render_set_position(shipMtx, 0) != 0) {
- gSPDisplayList(gDisplayListHead++, _skin);
- }
+ // // Rotate to face forward along the circle
+ // Rot.yaw = -static_cast<int16_t>(angle * (32768.0f / M_PI / 2.0f));
}
bool AShip::IsMod() { return true; }
diff --git a/src/engine/actors/Ship.h b/src/engine/actors/Ship.h
index 59ceb68a8..fe5743922 100644
--- a/src/engine/actors/Ship.h
+++ b/src/engine/actors/Ship.h
@@ -23,12 +23,12 @@ public:
virtual ~AShip() = default;
virtual void Tick() override;
- virtual void Draw(Camera*) override;
virtual bool IsMod() override;
FVector Spawn;
- FVector Pos;
- FRotation Rot = {0, 0, 0};
+ //FVector Pos;
+ ///IRotator Rot = {0, 0, 0};
+ //FVector Scale = {0.4, 0.4, 0.4};
private:
Gfx* _skin;
};
diff --git a/src/engine/actors/SpaghettiShip.cpp b/src/engine/actors/SpaghettiShip.cpp
index d53b90f07..b09ada319 100644
--- a/src/engine/actors/SpaghettiShip.cpp
+++ b/src/engine/actors/SpaghettiShip.cpp
@@ -1,6 +1,7 @@
#include "SpaghettiShip.h"
#include <libultra/gbi.h>
+#include "Matrix.h"
extern "C" {
#include "common_structs.h"
@@ -10,8 +11,13 @@ extern "C" {
}
ASpaghettiShip::ASpaghettiShip(FVector pos) {
+ Name = "Spaghetti Ship";
+ Pos[0] = pos.x;
+ Pos[1] = pos.y;
+ Pos[2] = pos.z;
Spawn = pos;
Spawn.y += 10;
+ Scale = {0.4, 0.4, 0.4};
}
void ASpaghettiShip::Tick() {
@@ -22,12 +28,11 @@ void ASpaghettiShip::Tick() {
angle += speed; // Increment the angle to move in a circle
// Update the position based on a circular path
- Pos.x = Spawn.x + radius * cosf(angle);
- Pos.z = Spawn.z + radius * sinf(angle);
+ Pos[0] = Spawn.x + radius * cosf(angle);
+ Pos[2] = Spawn.z + radius * sinf(angle);
// Rotate to face forward along the circle
- Rot.yaw = -static_cast<int16_t>(angle * (32768.0f / M_PI / 2.0f));
-
+ Rot[1] = -static_cast<int16_t>(angle * (32768.0f / M_PI / 2.0f));
WheelRot.pitch += 500;
}
@@ -36,30 +41,27 @@ void ASpaghettiShip::Draw(Camera *camera) {
Mat4 shipMtx;
Mat4 objectMtx;
Mat4 resultMtx;
- Vec3f hullPos = {Pos.x, Pos.y, Pos.z};
- Vec3s hullRot = {Rot.pitch, Rot.yaw, Rot.roll};
+ Vec3f hullPos = {Pos[0], Pos[1], Pos[2]};
+ Vec3s hullRot = {Rot[0], Rot[1], Rot[2]};
Vec3s rot = {WheelRot.pitch, WheelRot.yaw, WheelRot.roll};
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- // empty/null mtx as a base
- mtxf_pos_rotation_xyz(shipMtx, hullPos, hullRot);
- mtxf_scale(shipMtx, 0.4);
+ ApplyMatrixTransformations(shipMtx, *(FVector*)Pos, *(IRotator*)Rot, Scale);
if (render_set_position(shipMtx, 0) != 0) {}
// Render the ships hull
- Vec3f hullPos2 = {0, 0, 0};
- mtxf_translate(objectMtx, hullPos2);
+ ApplyMatrixTransformations(objectMtx, {0, 0, 0}, {0, 0, 0}, {1, 1, 1});
mtxf_multiplication(resultMtx, shipMtx, objectMtx);
if (render_set_position(resultMtx, 3) != 0) {
- gSPDisplayList(gDisplayListHead++, ship1_Spaghetti_mesh);
+ gSPDisplayList(gDisplayListHead++, ship1_spag1_mesh);
}
// Front tyre
- Vec3f pos = {0, 0, 110};
- mtxf_rotate_x(shipMtx, WheelRot.pitch);
- mtxf_translate(objectMtx, pos);
+ ApplyMatrixTransformations(objectMtx, FVector(0, 0, 110), IRotator(0, 0, 0), FVector(1, 1, 1));
+ mtxf_identity(shipMtx);
+ AddLocalRotation(shipMtx, WheelRot);
mtxf_multiplication(resultMtx, shipMtx, objectMtx);
if (render_set_position(resultMtx, 3) != 0) {
gSPDisplayList(gDisplayListHead++, wheels_Spaghetti_002_mesh);
@@ -67,9 +69,8 @@ void ASpaghettiShip::Draw(Camera *camera) {
}
// Back tyre
- Vec3f pos2 = {0, 0, -165};
- mtxf_rotate_x(shipMtx, WheelRot.pitch);
- mtxf_translate(objectMtx, pos2);
+ AddLocalRotation(shipMtx, WheelRot);
+ ApplyMatrixTransformations(objectMtx, FVector(0, 0, -165), {0, 0, 0}, {1, 1, 1});
mtxf_multiplication(resultMtx, shipMtx, objectMtx);
if (render_set_position(resultMtx, 3) != 0) {
gSPDisplayList(gDisplayListHead++, wheels_Spaghetti_002_mesh);
diff --git a/src/engine/actors/SpaghettiShip.h b/src/engine/actors/SpaghettiShip.h
index 1d0d656c5..70bd047d7 100644
--- a/src/engine/actors/SpaghettiShip.h
+++ b/src/engine/actors/SpaghettiShip.h
@@ -20,9 +20,5 @@ public:
virtual bool IsMod() override;
FVector Spawn;
- FVector Pos;
- FRotation Rot = {0, 0, 0};
- FRotation WheelRot = {0, 0, 0};
-private:
- f32 scale;
+ IRotator WheelRot = {0, 0, 0};
};
diff --git a/src/engine/actors/Starship.cpp b/src/engine/actors/Starship.cpp
index bc201b84a..e104d0eb6 100644
--- a/src/engine/actors/Starship.cpp
+++ b/src/engine/actors/Starship.cpp
@@ -1,6 +1,7 @@
#include "Starship.h"
#include <libultra/gbi.h>
+#include "Matrix.h"
extern "C" {
#include "common_structs.h"
@@ -10,7 +11,11 @@ extern "C" {
}
AStarship::AStarship(FVector pos) {
+ Name = "Starship";
Spawn = pos;
+ SetLocation(pos);
+ Scale = FVector(1.5, 1.5, 1.5);
+ Model = starship_Cube_mesh;
}
void AStarship::Tick() {
@@ -21,29 +26,17 @@ void AStarship::Tick() {
angle += speed;
// Move relative to the initial position
- Pos.x = Spawn.x + radius * cosf(angle);
- Pos.z = Spawn.z + radius * sinf(angle);
+
+ FVector pos = GetLocation();
+ pos.x = Spawn.x + radius * cosf(angle);
+ pos.z = Spawn.z + radius * sinf(angle);
+ SetLocation(pos);
// Keep y from changing (or adjust it if necessary)
- Pos.y = Spawn.y;
+ //Pos.y = Spawn.y;
// Rotate to face forward along the circle
- Rot.yaw = angle * (180.0f / M_PI) + 90.0f;
-}
-
-void AStarship::Draw(Camera *camera) {
- Mat4 shipMtx;
- Vec3f hullPos = {Pos.x, Pos.y, Pos.z};
- Vec3s hullRot = {Rot.pitch, Rot.yaw, Rot.roll};
-
- gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
- gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
-
- mtxf_pos_rotation_xyz(shipMtx, hullPos, hullRot);
- mtxf_scale(shipMtx, 1.5);
- if (render_set_position(shipMtx, 0) != 0) {
- gSPDisplayList(gDisplayListHead++, starship_Cube_mesh);
- }
+ Rot[1] = angle * (180.0f / M_PI) + 90.0f;
}
bool AStarship::IsMod() { return true; }
diff --git a/src/engine/actors/Starship.h b/src/engine/actors/Starship.h
index 390aed2ea..71b898358 100644
--- a/src/engine/actors/Starship.h
+++ b/src/engine/actors/Starship.h
@@ -16,10 +16,7 @@ public:
virtual ~AStarship() = default;
virtual void Tick() override;
- virtual void Draw(Camera*) override;
virtual bool IsMod() override;
FVector Spawn;
- FVector Pos;
- FRotation Rot = {0, 0, 0};
};
diff --git a/src/engine/actors/ATree.cpp b/src/engine/actors/Tree.cpp
index fa1c7f580..faffd0798 100644
--- a/src/engine/actors/ATree.cpp
+++ b/src/engine/actors/Tree.cpp
@@ -1,4 +1,4 @@
-#include "ATree.h"
+#include "Tree.h"
#include <libultra/gbi.h>
@@ -10,6 +10,7 @@ extern "C" {
}
ATree::ATree(Vec3f pos, Gfx* displaylist, f32 drawDistance, f32 minDrawDistance, const char* tlut = nullptr) {
+ Name = "Tree";
Pos[0] = pos[0];
Pos[1] = pos[1];
Pos[2] = pos[2];
diff --git a/src/engine/actors/ATree.h b/src/engine/actors/Tree.h
index eb51f6e7e..eb51f6e7e 100644
--- a/src/engine/actors/ATree.h
+++ b/src/engine/actors/Tree.h
diff --git a/src/engine/actors/AWarioSign.cpp b/src/engine/actors/WarioSign.cpp
index 8e73a94f3..0e83e114f 100644
--- a/src/engine/actors/AWarioSign.cpp
+++ b/src/engine/actors/WarioSign.cpp
@@ -1,4 +1,4 @@
-#include "AWarioSign.h"
+#include "WarioSign.h"
#include <libultra/gbi.h>
#include <assets/wario_stadium_data.h>
@@ -7,12 +7,15 @@ extern "C" {
#include "common_structs.h"
#include "math_util.h"
#include "main.h"
+#include "actor_types.h"
}
-AWarioSign::AWarioSign(Vec3f pos) {
- Pos[0] = pos[0];
- Pos[1] = pos[1];
- Pos[2] = pos[2];
+AWarioSign::AWarioSign(FVector pos) {
+ Type = ACTOR_WARIO_SIGN;
+ Name = "Wario Sign";
+ Pos[0] = pos.x;
+ Pos[1] = pos.y;
+ Pos[2] = pos.z;
}
void AWarioSign::Tick() {
@@ -27,7 +30,6 @@ void AWarioSign::Draw(Camera *camera) {
if (CVarGetInteger("gNoCulling", 0) == 1) {
unk = MAX(unk, 0.0f);
}
-
if (!(unk < 0.0f)) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
diff --git a/src/engine/actors/AWarioSign.h b/src/engine/actors/WarioSign.h
index 31d9b9434..634b2132e 100644
--- a/src/engine/actors/AWarioSign.h
+++ b/src/engine/actors/WarioSign.h
@@ -2,6 +2,7 @@
#include <libultraship.h>
#include "engine/Actor.h"
+#include "CoreMath.h"
extern "C" {
#include "common_structs.h"
@@ -10,9 +11,8 @@ extern "C" {
class AWarioSign : public AActor {
public:
-
virtual ~AWarioSign() = default;
- explicit AWarioSign(Vec3f pos);
+ explicit AWarioSign(FVector pos);
virtual void Tick() override;
virtual void Draw(Camera*) override;