summaryrefslogtreecommitdiff
path: root/src/engine/objects/Trophy.cpp
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-12-07 13:14:45 -0700
committerGitHub <noreply@github.com>2025-12-07 13:14:45 -0700
commit65853330926fa5c77ad75effab8c479ba1d96952 (patch)
treeb2bd8f865401a8d7c4ce9f78b94f34bfb778dbaf /src/engine/objects/Trophy.cpp
parent02ad54ca72f5baf4614cb9b7c30f8dd780764d90 (diff)
Camera Refactor --> Adds Track Tour Camera (#568)
* 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>
Diffstat (limited to 'src/engine/objects/Trophy.cpp')
-rw-r--r--src/engine/objects/Trophy.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/engine/objects/Trophy.cpp b/src/engine/objects/Trophy.cpp
index 865ccc822..44b9e7e51 100644
--- a/src/engine/objects/Trophy.cpp
+++ b/src/engine/objects/Trophy.cpp
@@ -231,14 +231,10 @@ void OTrophy::Draw(s32 cameraId) {
if (*_toggleVisibility == true) {
object = &gObjectList[listIndex];
if (object->state >= 2) {
- // Prevents a perspective glitch
- if (CVarGetInteger("gFreecam", 0) == true) {
- cameraId = CAMERA_FREECAM;
- }
-
- gSPMatrix(gDisplayListHead++, GetPerspMatrix(cameraId),
+ gSPMatrix(gDisplayListHead++, cameras[cameraId].perspectiveMatrix,
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
- gSPMatrix(gDisplayListHead++, GetLookAtMatrix(cameraId),
+ gSPMatrix(gDisplayListHead++, cameras[cameraId].lookAtMatrix,
+
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtxf_set_matrix_transformation(someMatrix1, object->pos, object->direction_angle, object->sizeScaling);
//convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], someMatrix1);
@@ -249,8 +245,10 @@ void OTrophy::Draw(s32 cameraId) {
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D0077A0);
gSPDisplayList(gDisplayListHead++, object->model);
- gSPMatrix(gDisplayListHead++, GetLookAtMatrix(cameraId),
+
+ gSPMatrix(gDisplayListHead++, cameras[cameraId].lookAtMatrix,
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
+
mtxf_identity(someMatrix2);
render_set_position(someMatrix2, 0);
}