diff options
| author | coco875 <pereira.jannin@gmail.com> | 2025-01-05 01:32:27 +0100 |
|---|---|---|
| committer | coco875 <pereira.jannin@gmail.com> | 2025-01-05 01:32:27 +0100 |
| commit | 49df2fc6e551138c367fb6b541ced77e9cf6e123 (patch) | |
| tree | a1ce132c50fea44973016b765fcfac5fb7d4e955 /src/racing | |
| parent | 4dfc8a9fef29af9319d7c145ba7190540ccd9d02 (diff) | |
multiple fix
Diffstat (limited to 'src/racing')
| -rw-r--r-- | src/racing/actors.c | 14 | ||||
| -rw-r--r-- | src/racing/skybox_and_splitscreen.c | 30 |
2 files changed, 24 insertions, 20 deletions
diff --git a/src/racing/actors.c b/src/racing/actors.c index 45330916c..caf623554 100644 --- a/src/racing/actors.c +++ b/src/racing/actors.c @@ -9,6 +9,7 @@ #include <actor_types.h> #include <defines.h> #include <macros.h> +#include <stdio.h> #include "code_800029B0.h" #include "main.h" @@ -1387,16 +1388,16 @@ s16 add_actor_to_empty_slot(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) // Cleanup unused actors for (index = 0; index < m_GetActorSize(); index++) { - //if (m_GetActor(index)->flags == 0) { - //! @todo Commented out because deletes too soon. - //m_DeleteActor(index); - //gNumActors--; + // if (m_GetActor(index)->flags == 0) { + //! @todo Commented out because deletes too soon. + // m_DeleteActor(index); + // gNumActors--; //} } gNumActors++; struct Actor* actor = m_AddBaseActor(); actor_init(actor, pos, rot, velocity, actorType); - return (s16)m_GetActorSize() - 1; // Return current index; + return (s16) m_GetActorSize() - 1; // Return current index; } UNUSED s16 spawn_actor_at_pos(Vec3f pos, s16 actorType) { @@ -2414,9 +2415,8 @@ void render_course_actors(struct UnkStruct_800DC5EC* arg0) { gSPSetLights1(gDisplayListHead++, D_800DC610[1]); gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - if (gModeSelection != BATTLE) { - //func_80297340(camera); + // func_80297340(camera); } D_8015F8E0 = 0; diff --git a/src/racing/skybox_and_splitscreen.c b/src/racing/skybox_and_splitscreen.c index e81ef92b0..eaa6015d5 100644 --- a/src/racing/skybox_and_splitscreen.c +++ b/src/racing/skybox_and_splitscreen.c @@ -760,7 +760,7 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) { s32 screenId = 0; s32 screenMode = SCREEN_MODE_1P; - switch(mode) { + switch (mode) { case RENDER_SCREEN_MODE_1P_PLAYER_ONE: func_802A53A4(); screenId = 0; @@ -816,8 +816,8 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) { break; } - struct UnkStruct_800DC5EC *screen = &D_8015F480[screenId]; - Camera *camera = &cameras[cameraId]; + struct UnkStruct_800DC5EC* screen = &D_8015F480[screenId]; + Camera* camera = &cameras[cameraId]; if (screenMode == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) { gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH); @@ -828,30 +828,34 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) { gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH); gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - guPerspective(&gGfxPool->mtxPersp[cameraId], &perspNorm, gCameraZoom[cameraId], gScreenAspect, CourseManager_GetProps()->NearPersp, CourseManager_GetProps()->FarPersp, 1.0f); + guPerspective(&gGfxPool->mtxPersp[cameraId], &perspNorm, gCameraZoom[cameraId], gScreenAspect, + CourseManager_GetProps()->NearPersp, CourseManager_GetProps()->FarPersp, 1.0f); gSPPerspNormalize(gDisplayListHead++, perspNorm); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[cameraId]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[cameraId]), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - guLookAt(&gGfxPool->mtxLookAt[cameraId], camera->pos[0], camera->pos[1], camera->pos[2], - camera->lookAt[0], camera->lookAt[1], camera->lookAt[2], camera->up[0], - camera->up[1], camera->up[2]); + guLookAt(&gGfxPool->mtxLookAt[cameraId], camera->pos[0], camera->pos[1], camera->pos[2], camera->lookAt[0], + camera->lookAt[1], camera->lookAt[2], camera->up[0], camera->up[1], camera->up[2]); if (D_800DC5C8 == 0) { - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), + G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); mtxf_identity(matrix); render_set_position(matrix, 0); } else { - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); } render_course(screen); if (D_800DC5C8 == 1) { - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[cameraId]), + G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); mtxf_identity(matrix); render_set_position(matrix, 0); } render_course_actors(screen); render_object(mode); - switch(screenId) { + switch (screenId) { case 0: render_players_on_screen_one(); break; @@ -867,7 +871,7 @@ void render_screens(s32 mode, s32 cameraId, s32 playerId) { } func_8029122C(screen, playerId); - switch(playerId) { + switch (playerId) { case 0: func_80021B0C(); break; |
