summaryrefslogtreecommitdiff
path: root/src/engine/actors/WarioSign.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/actors/WarioSign.cpp')
-rw-r--r--src/engine/actors/WarioSign.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/engine/actors/WarioSign.cpp b/src/engine/actors/WarioSign.cpp
new file mode 100644
index 000000000..0e83e114f
--- /dev/null
+++ b/src/engine/actors/WarioSign.cpp
@@ -0,0 +1,43 @@
+#include "WarioSign.h"
+
+#include <libultra/gbi.h>
+#include <assets/wario_stadium_data.h>
+
+extern "C" {
+#include "common_structs.h"
+#include "math_util.h"
+#include "main.h"
+#include "actor_types.h"
+}
+
+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() {
+ Rot[1] += 0xB6;
+}
+
+void AWarioSign::Draw(Camera *camera) {
+ Mat4 sp38;
+ f32 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(sp38, Pos, Rot);
+ if (render_set_position(sp38, 0) != 0) {
+
+ gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_wario_stadium_dl_sign);
+ }
+ }
+}