diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2026-08-01 23:19:52 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 23:19:52 -0600 |
| commit | 97f28334329d50a9cf2fb7ff1ee57ae0c18de92c (patch) | |
| tree | 767f8f6b4bbf02e1b41382a49c4f57c8fbe78c0e /src/engine/objects | |
| parent | 8629bec3205b35b6f052a5f0a0164b8132ac1304 (diff) | |
Remove As Much Code As Possible and Still Pass Tests (#732)
* Update render_objects.c
* Remove unused HUD texture function declarations
Removed several unused function declarations related to HUD textures.
* Update skybox_and_splitscreen.c
* Remove unused set_viewport2 function declaration
Removed unused function declaration for set_viewport2.
* Update code_80005FD0.c
* Remove set_bomb_kart_spawn_positions function declaration
* Update skybox_and_splitscreen.c
* Update skybox_and_splitscreen.h
* Modify Draw function to adjust crab visibility
Commented out code to prevent premature disappearance of the crab when the camera rotates.
* Update Crab.cpp
* Update Crab.h
* Update Crab.cpp
* Delete unused texture rendering functions
Removed unused functions related to texture rendering.
* Update render_objects.h
Diffstat (limited to 'src/engine/objects')
| -rw-r--r-- | src/engine/objects/Crab.cpp | 35 | ||||
| -rw-r--r-- | src/engine/objects/Crab.h | 2 |
2 files changed, 7 insertions, 30 deletions
diff --git a/src/engine/objects/Crab.cpp b/src/engine/objects/Crab.cpp index a435e881e..bc278e158 100644 --- a/src/engine/objects/Crab.cpp +++ b/src/engine/objects/Crab.cpp @@ -74,6 +74,13 @@ Vtx common_vtx_crab[] = { void OCrab::Draw(s32 cameraId) { Camera* camera; s32 objectIndex = _objectIndex; + + // With this the crab disappears too early when the camera is rotating away from the crab + // func_8008A364(objectIndex, cameraId, 0x2AABU, 800); + // if (is_obj_flag_status_active(objectIndex, VISIBLE) == 0) { + // return; + // } + if (gObjectList[objectIndex].state >= 2) { camera = &camera1[cameraId]; FrameInterpolation_RecordOpenChild("crab", (_idx << 5) | cameraId); @@ -94,34 +101,6 @@ void OCrab::Draw(s32 cameraId) { } } -void OCrab::DrawModel(s32 cameraId) { - s32 someIndex; - s32 objectIndex = _objectIndex; - func_8008A364(objectIndex, cameraId, 0x2AABU, 800); - if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { - Camera* camera; - - if (gObjectList[objectIndex].state >= 2) { - camera = &camera1[cameraId]; - FrameInterpolation_RecordOpenChild("crab3", (_idx << 5) | cameraId); - func_8004A6EC(objectIndex, 0.5f); - FrameInterpolation_RecordCloseChild(); - gObjectList[objectIndex].orientation[1] = - func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); - FrameInterpolation_RecordOpenChild("crab4", (_idx << 5) | cameraId); - rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, - gObjectList[objectIndex].sizeScaling); - gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007D78); - gDPLoadTLUT_pal256(gDisplayListHead++, gObjectList[objectIndex].activeTLUT); - rsp_load_texture((u8*) gObjectList[objectIndex].activeTexture, 64, 64); - gSPVertex(gDisplayListHead++, (uintptr_t) common_vtx_crab, 4, 0); - gSPDisplayList(gDisplayListHead++, (Gfx*) common_rectangle_display); - gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); - FrameInterpolation_RecordCloseChild(); - } - } -} - void OCrab::init_ktb_crab(s32 objectIndex) { Object* object; diff --git a/src/engine/objects/Crab.h b/src/engine/objects/Crab.h index 9a892bcf7..6c2ef7de6 100644 --- a/src/engine/objects/Crab.h +++ b/src/engine/objects/Crab.h @@ -52,8 +52,6 @@ public: virtual void SetSpawnParams(SpawnParams& params) override; virtual void DrawEditorProperties() override; - void DrawModel(s32 cameraId); - void init_ktb_crab(s32 objectIndex); void func_80082B34(s32 objectIndex); void func_80082C30(s32 objectIndex); |
