mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-05-26 07:48:42 -04:00
6585333092
* 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 * Camera Refactor * Camera Refactor Complete * Place Lookbehind behind a CVar * Make Tour CVar * Fix Tour Camera Billboarding * micro optimization * Impl tour cam in imgui editor and add to scenefile * As per review * Revert cleanWorld change as per review * Cleanup SceneManager * Func rename * Proper enabling of freecam and wip zoom fix * Couple fix * Fix credits * Fix podium ceremony * Stop music on reset & label new play sequence func * Rename func_800C8EF8 to play_sequence2 * Rename func_800CA414 to play_sequences * Fix compile * Label play_sequences * Clean up * Verify lakitu access * Renames * Fix tour enable logic * Add Audio * tour camera impl ending transition * As per review * Fix linux compile, probably * Update TourCamera.cpp * Update TourCamera.cpp * Update TrackProperties.cpp * Update TrackProperties.cpp * Update Game.cpp * Update SceneManager.cpp * Update camera.c * Update render_objects.h * Update render_objects.h * Update code_80057C60.h * fixing compile * addition --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
32 lines
891 B
C++
32 lines
891 B
C++
#include "StaticMeshActor.h"
|
|
#include <libultra/gbi.h>
|
|
#include "Matrix.h"
|
|
|
|
extern "C" {
|
|
#include "main.h"
|
|
#include "math_util.h"
|
|
#include "math_util_2.h"
|
|
}
|
|
|
|
StaticMeshActor::StaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale, std::string model, int32_t* collision) : Name(name), Pos(pos), Rot(rot), Scale(scale), Model(""), CollisionMesh(collision) {
|
|
Name = "StaticMesh";
|
|
ResourceName = "hm:static_mesh";
|
|
|
|
}
|
|
|
|
void StaticMeshActor::Draw() {
|
|
Mat4 mtx;
|
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
|
if (!Model.empty()) {
|
|
ApplyMatrixTransformations(mtx, Pos, Rot, Scale);
|
|
if (render_set_position(mtx, 0) != 0) {
|
|
gSPDisplayList(gDisplayListHead++, (Gfx*)Model.c_str());
|
|
}
|
|
}
|
|
}
|
|
|
|
void StaticMeshActor::Destroy() {
|
|
bPendingDestroy = true;
|
|
}
|