diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2026-03-06 01:14:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 01:14:44 -0700 |
| commit | 25d49df90fe1ab2c95c962d45ef146cb5cf0c794 (patch) | |
| tree | e74caf587e90be8467ba806ed5642746db7b9a66 /src/render_objects.c | |
| parent | 89cd738955bf4cbbcb3f50c4a678b8baeeb75bcb (diff) | |
More Interp Fixes (#673)
* Update render_player.c
* Update render.inc.c
* Update render.inc.c
* Fix kart interp
* Remove feature
* Fix error
Diffstat (limited to 'src/render_objects.c')
| -rw-r--r-- | src/render_objects.c | 245 |
1 files changed, 0 insertions, 245 deletions
diff --git a/src/render_objects.c b/src/render_objects.c index a14c3d350..01f380bfa 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -3973,110 +3973,10 @@ void render_object_neon(s32 cameraId) { } } -Vec3iu D_800E46F8A[] = { - { 255, 255, 255 }, - { 255, 255, 0 }, - { 255, 0, 0 }, -}; u8 D_800E471CA[] = { 0, 1, 2, 3, 2, 1, 0, }; -void func_800562E4(s32 arg0, s32 arg1, s32 arg2) { - - // Vec3iu *A_800E46F8 = LOAD_ASSET(D_800E46F8); - - D_80165860 = D_800E46F8A[arg0][0]; - D_8016586C = D_800E46F8A[arg0][1]; - D_80165878 = D_800E46F8A[arg0][2]; - func_8004B138(D_80165860, D_8016586C, D_80165878, arg2); - rsp_set_matrix_transformation(D_80183E40, D_80183E80, 0.2f); - func_80044BF8(common_texture_particle_spark[arg1], 32, 32); - gSPVertex(gDisplayListHead++, D_0D005AE0, 4, 0); - gSPDisplayList(gDisplayListHead++, common_rectangle_display); -} - -void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) { - s32 temp_s0; - s32 temp_v0; - s32 residue; - Camera* camera; - Object* object; - - camera = &camera1[cameraId]; - object = &gObjectList[objectIndex]; - residue = D_801655CC % 4U; - D_80183E40[0] = object->pos[0]; - D_80183E40[1] = object->pos[1] + 1.0; - D_80183E40[2] = object->pos[2]; - D_80183E80[0] = 0; - D_80183E80[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos); - D_80183E80[2] = 0x8000; - rsp_set_matrix_transformation(D_80183E40, D_80183E80, 0.2f); - gSPDisplayList(gDisplayListHead++, D_0D007E98); - func_8004B310(arg2); - - int heigh = 32; - int width = 32; - - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_bomb); - rsp_load_texture((u8*) common_texture_bomb[residue], width, heigh); - gSPVertex(gDisplayListHead++, (uintptr_t) D_0D005AE0, 4, 0); - gSPDisplayList(gDisplayListHead++, (Gfx*) common_rectangle_display); - gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); - - temp_s0 = D_8018D400; - gSPDisplayList(gDisplayListHead++, D_0D007B00); - func_8004B414(0, 0, 0, arg2); - D_80183E40[1] = D_80183E40[1] + 4.0; - D_80183E80[2] = 0; - func_800562E4(temp_s0 % 3, temp_s0 % 4, arg2); - temp_v0 = temp_s0 + 1; - D_80183E80[2] = 0x6000; - func_800562E4(temp_v0 % 3, temp_v0 % 4, arg2); - temp_v0 = temp_s0 + 2; - D_80183E80[2] = 0xA000; - func_800562E4(temp_v0 % 3, temp_v0 % 4, arg2); - gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); -} - -void func_8005669C(s32 objectIndex, UNUSED s32 arg1, s32 arg2) { - gSPDisplayList(gDisplayListHead++, D_0D0079E8); - func_8004B310(arg2); - load_texture_block_rgba16_mirror((u8*) D_0D02AA58, 0x00000010, 0x00000010); - D_80183E40[1] = gObjectList[objectIndex].pos[1] - 2.0; - D_80183E40[0] = gObjectList[objectIndex].pos[0] + 2.0; - D_80183E40[2] = gObjectList[objectIndex].pos[2] + 2.0; - func_800431B0(D_80183E40, D_80183E80, 0.15f, common_vtx_rectangle); - D_80183E40[0] = gObjectList[objectIndex].pos[0] + 2.0; - D_80183E40[2] = gObjectList[objectIndex].pos[2] - 2.0; - func_800431B0(D_80183E40, D_80183E80, 0.15f, common_vtx_rectangle); - D_80183E40[0] = gObjectList[objectIndex].pos[0] - 2.0; - D_80183E40[2] = gObjectList[objectIndex].pos[2] - 2.0; - func_800431B0(D_80183E40, D_80183E80, 0.15f, common_vtx_rectangle); - D_80183E40[0] = gObjectList[objectIndex].pos[0] - 2.0; - D_80183E40[2] = gObjectList[objectIndex].pos[2] + 2.0; - func_800431B0(D_80183E40, D_80183E80, 0.15f, common_vtx_rectangle); - gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); -} - -Mat4 mtx; -void func_800568A0(s32 objectIndex, s32 playerId) { - Player* player; - - player = &gPlayerOne[playerId]; - D_80183E50[0] = gObjectList[objectIndex].pos[0]; - D_80183E50[1] = gObjectList[objectIndex].surfaceHeight + 0.8; - D_80183E50[2] = gObjectList[objectIndex].pos[2]; - set_transform_matrix(mtx, player->collision.orientationVector, D_80183E50, 0U, 0.5f); - // convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], mtx); - // gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), - // G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - - AddHudMatrix(mtx, G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(gDisplayListHead++, D_0D007B98); -} - void func_800569F4(s32 playerIndex) { CM_DisplayBattleBombKart(playerIndex, 0); } @@ -4090,151 +3990,6 @@ void func_80056A94(s32 playerIndex) { CM_DisplayBattleBombKart(playerIndex, 0); } -void render_battle_bomb_karts(s32 cameraId) { - Player* temp_v0; - s32 temp_s1; - s32 temp_s0; - s32 payerId; - Object* object; - - for (payerId = 0; payerId < NUM_BOMB_KARTS_BATTLE; payerId++) { - temp_s0 = gIndexObjectBombKart[payerId]; - object = &gObjectList[temp_s0]; - if (object->state != 0) { - temp_s1 = object->primAlpha; - temp_v0 = &gPlayerOne[payerId]; - object->pos[0] = temp_v0->pos[0]; - object->pos[1] = temp_v0->pos[1] - 2.0; - object->pos[2] = temp_v0->pos[2]; - object->surfaceHeight = temp_v0->unk_074; - func_800563DC(temp_s0, cameraId, temp_s1); - func_8005669C(temp_s0, cameraId, temp_s1); - func_800568A0(temp_s0, cameraId); - } - } -} - -void func_80056BF0(s32 bombIndex) { - UNUSED s32 stackPadding; - u8 thing; - s32 temp_s0; - s32 temp_v0; - u8* bombFrame; - BombKart sp40 = gBombKarts[bombIndex]; - - temp_v0 = D_801655CC % 6U; - thing = D_800E471CA[temp_v0]; - bombFrame = common_texture_bomb[thing]; - D_80183E40[0] = sp40.bombPos[0]; - D_80183E40[1] = sp40.bombPos[1] + 1.0; - D_80183E40[2] = sp40.bombPos[2]; - - rsp_set_matrix_transformation(D_80183E40, D_80183E80, 0.25f); - gSPDisplayList(gDisplayListHead++, D_0D007D78); - gDPLoadTLUT_pal256(gDisplayListHead++, (u8*) common_tlut_bomb); - rsp_load_texture(bombFrame, 0x20, 0x20); - gSPVertex(gDisplayListHead++, D_0D005AE0, 4, 0); - gSPDisplayList(gDisplayListHead++, common_rectangle_display); - gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); - - temp_s0 = D_8018D400; - gSPDisplayList(gDisplayListHead++, D_0D007B00); - func_8004B414(0, 0, 0, 0xFF); - D_80183E40[1] = sp40.bombPos[1] + 5.0; - D_80183E80[2] = 0; - func_800562E4((s32) temp_s0 % 3, temp_s0 % 4, 0xFFU); - temp_v0 = temp_s0 + 1; - D_80183E80[2] = 0x6000; - func_800562E4(temp_v0 % 3, temp_v0 % 4, 0xFFU); - temp_v0 = temp_s0 + 2; - D_80183E80[2] = 0xA000; - func_800562E4(temp_v0 % 3, temp_v0 % 4, 0xFFU); -} - -void func_80056E24(s32 bombIndex, Vec3f arg1) { - UNUSED s32 stackPadding[2]; - BombKart sp2C = gBombKarts[bombIndex]; - - D_80183E80[0] = 0; - D_80183E80[2] = 0x8000; - gSPDisplayList(gDisplayListHead++, D_0D0079C8); - load_texture_block_rgba16_mirror((u8*) D_0D02AA58, 0x00000010, 0x00000010); - D_80183E80[1] = func_800418AC(sp2C.wheel1Pos[0], sp2C.wheel1Pos[2], arg1); - func_800431B0(sp2C.wheel1Pos, D_80183E80, 0.15f, common_vtx_rectangle); - D_80183E80[1] = func_800418AC(sp2C.wheel2Pos[0], sp2C.wheel2Pos[2], arg1); - func_800431B0(sp2C.wheel2Pos, D_80183E80, 0.15f, common_vtx_rectangle); - D_80183E80[1] = func_800418AC(sp2C.wheel3Pos[0], sp2C.wheel3Pos[2], arg1); - func_800431B0(sp2C.wheel3Pos, D_80183E80, 0.15f, common_vtx_rectangle); - D_80183E80[1] = func_800418AC(sp2C.wheel4Pos[0], sp2C.wheel4Pos[2], arg1); - func_800431B0(sp2C.wheel4Pos, D_80183E80, 0.15f, common_vtx_rectangle); - gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); -} - -void func_80056FCC(s32 bombIndex) { - Mat4 mat; - BombKart* temp_v0; - - temp_v0 = &gBombKarts[bombIndex]; - D_80183E50[0] = temp_v0->bombPos[0]; - D_80183E50[1] = temp_v0->yPos + 1.0; - D_80183E50[2] = temp_v0->bombPos[2]; - set_transform_matrix(mat, gBombKartCollision[bombIndex].orientationVector, D_80183E50, 0U, 0.5f); - // convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], mat); - // gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), - // G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - AddHudMatrix(mat, G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(gDisplayListHead++, D_0D007B98); -} - -void render_bomb_karts(s32 cameraId) { - Camera* camera; - s32 objectIndex; - s32 temp_s4; - s32 i; - s32 state; - BombKart* var_s1_2; - - if (gGamestate == 5) { - cameraId = 0; - } - camera = &camera1[cameraId]; - if (cameraId == PLAYER_ONE) { - for (i = 0; i < NUM_BOMB_KARTS_VERSUS; i++) { - objectIndex = gIndexObjectBombKart[i]; - if (is_obj_flag_status_active(objectIndex, 0x00200000) != 0) { - gBombKarts[i].unk_4A = 0; - } else if (gGamestate != 5) { - gBombKarts[i].unk_4A = 1; - } - clear_object_flag(objectIndex, 0x00200000); - } - } - - for (i = 0; i < NUM_BOMB_KARTS_VERSUS; i++) { - var_s1_2 = &gBombKarts[i]; - // huh??? - state = var_s1_2->state; - if (var_s1_2->state != BOMB_STATE_INACTIVE) { - objectIndex = gIndexObjectBombKart[i]; - gObjectList[objectIndex].pos[0] = var_s1_2->bombPos[0]; - gObjectList[objectIndex].pos[1] = var_s1_2->bombPos[1]; - gObjectList[objectIndex].pos[2] = var_s1_2->bombPos[2]; - temp_s4 = func_8008A364(objectIndex, cameraId, 0x31C4U, 0x000001F4); - if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { - set_object_flag(objectIndex, 0x00200000); - D_80183E80[0] = 0; - D_80183E80[1] = func_800418AC(var_s1_2->bombPos[0], var_s1_2->bombPos[2], camera->pos); - D_80183E80[2] = 0x8000; - func_800563DC(objectIndex, cameraId, 0x000000FF); - func_80056E24(i, camera->pos); - if (((u32) temp_s4 < 0x4E21U) && (state != BOMB_STATE_EXPLODED)) { - func_80056FCC(i); - } - } - } - } -} - UNUSED void func_80057330(void) { } |
