diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2024-10-17 09:53:40 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2024-10-17 09:53:40 -0600 |
| commit | 2cfbe01e50e65ff1ada5ba100eb73feac18524ae (patch) | |
| tree | 039241c739eccbc456bedc54cd42061dab175dec /src/engine | |
| parent | cd288a4c5b816ddad9a019d41ee2e442f169eba1 (diff) | |
Added frame interpolation markers
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/fox_beam.c | 1 | ||||
| -rw-r--r-- | src/engine/fox_bg.c | 6 | ||||
| -rw-r--r-- | src/engine/fox_display.c | 9 | ||||
| -rw-r--r-- | src/engine/fox_edisplay.c | 17 | ||||
| -rw-r--r-- | src/engine/fox_effect.c | 1 | ||||
| -rw-r--r-- | src/engine/fox_std_lib.c | 2 |
6 files changed, 30 insertions, 6 deletions
diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 8a990226..62d2d39d 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -1504,6 +1504,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { void PlayerShot_Draw(PlayerShot* shot) { FrameInterpolation_RecordOpenChild(shot, 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); switch (shot->obj.status) { case SHOT_ACTIVE: PlayerShot_DrawShot(shot); diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index b377e4da..4f52fd11 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -258,6 +258,7 @@ void Background_DrawStarfield(void) { if ((vx >= STAR_MARGIN) && (vx < currentScreenWidth - STAR_MARGIN) && (vy >= STAR_MARGIN) && (vy < currentScreenHeight - STAR_MARGIN)) { FrameInterpolation_RecordOpenChild("Starfield", i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); // Translate to (vx, vy) in ortho coordinates Matrix_Push(&gGfxMatrix); @@ -368,6 +369,7 @@ void Background_DrawPartialStarfield(s32 yMin, s32 yMax) { // Stars that are in if ((vx >= 0) && (vx < currentScreenWidth) && (yMin < vy) && (vy < yMax)) { // Tag the transform. Assuming TAG_STARFIELD is a defined base tag value FrameInterpolation_RecordOpenChild("SmallStarfield", i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); // Translate to (vx, vy) in ortho coordinates Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, vx - (currentScreenWidth / 2.0f), -(vy - (currentScreenHeight / 2.0f)), 0.0f, @@ -460,6 +462,7 @@ void Background_DrawBackdrop(void) { // Render the textures across the screen (left to right) for (int i = 0; i < 6; i++) { FrameInterpolation_RecordOpenChild("Backdrop", i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); switch (gCurrentLevel) { case LEVEL_VERSUS: @@ -510,6 +513,7 @@ void Background_DrawBackdrop(void) { // Render the textures across a wider range to cover the screen for (int i = 0; i < 10; i++) { FrameInterpolation_RecordOpenChild("Backdrop", i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); switch ((s32) gCurrentLevel) { case LEVEL_CORNERIA: @@ -533,6 +537,7 @@ void Background_DrawBackdrop(void) { case LEVEL_VENOM_ANDROSS: // WIP if (gDrawBackdrop != 6) { FrameInterpolation_RecordOpenChild("Backdrop", 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) { Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, MTXF_APPLY); @@ -630,6 +635,7 @@ void Background_DrawBackdrop(void) { // Render the textures across the screen (left to right) for (int i = 0; i < 5; i++) { FrameInterpolation_RecordOpenChild("Backdrop", i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { gSPDisplayList(gMasterDisp++, D_AQ_601AFF0); } else { diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 3b73ab15..4095abb5 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -712,6 +712,7 @@ void Display_Reticle(Player* player) { (gGameState == GSTATE_MENU))) { for (i = 0; i < 2; i++) { FrameInterpolation_RecordOpenChild("Reticle", i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); translate = &D_display_801613E0[i]; Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY); @@ -1507,6 +1508,7 @@ void Display_ActorMarks(void) { for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { if (gTeamArrowsViewPos[i].z < 0.0f) { FrameInterpolation_RecordOpenChild(&gTeamArrowsViewPos[i], i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); var_fs0 = (VEC3F_MAG(&gTeamArrowsViewPos[i])) * 0.0015f; if (var_fs0 > 100.0f) { var_fs0 = 100.0f; @@ -1552,6 +1554,7 @@ void Display_LockOnIndicator(void) { var_fs0 = VEC3F_MAG(&gLockOnTargetViewPos[i]); if (var_fs0 < 20000.0f) { FrameInterpolation_RecordOpenChild("LcckOnIndicator", 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); var_fs0 *= 0.0015f; if (var_fs0 > 100.0f) { var_fs0 = 100.0f; @@ -1751,10 +1754,9 @@ void Display_Update(void) { Background_DrawStarfield(); } - FrameInterpolation_RecordOpenChild("Backdrop", 0); Background_DrawBackdrop(); - FrameInterpolation_RecordCloseChild(); FrameInterpolation_RecordOpenChild("Sun", 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Background_DrawSun(); FrameInterpolation_RecordCloseChild(); Matrix_Push(&gGfxMatrix); @@ -1773,6 +1775,7 @@ void Display_Update(void) { } else if (gGroundSurface != SURFACE_WATER) { D_bg_8015F964 = false; FrameInterpolation_RecordOpenChild("Ground", 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Background_DrawGround(); FrameInterpolation_RecordCloseChild(); } @@ -1839,6 +1842,7 @@ void Display_Update(void) { D_bg_8015F964 = true; Effect_Draw(1); FrameInterpolation_RecordOpenChild("Ground", 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Background_DrawGround(); FrameInterpolation_RecordCloseChild(); } @@ -1855,6 +1859,7 @@ void Display_Update(void) { for (i = 0, player = &gPlayer[0]; i < gCamCount; i++, player++) { if (sPlayersVisible[i]) { FrameInterpolation_RecordOpenChild(player, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Display_PlayerShadow_Update(player); Display_PlayerFeatures(player); Display_ArwingWingTrail_Update(player); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index db07a84a..88753517 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -828,6 +828,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { if (((gGameFrameCount & 0x18) != 0) && (this->state == 0)) { FrameInterpolation_RecordOpenChild(this, 0); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -840,6 +841,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { FrameInterpolation_RecordCloseChild(); } FrameInterpolation_RecordOpenChild(this, 1); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -1705,6 +1707,7 @@ void Object_DrawAll(s32 arg0) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { FrameInterpolation_RecordOpenChild(scenery360, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_LEVEL_OBJECTS)) { if (gCurrentLevel == LEVEL_BOLSE) { spAC.x = scenery360->sfxSource[0]; @@ -1723,15 +1726,16 @@ void Object_DrawAll(s32 arg0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (scenery->obj.status >= OBJ_ACTIVE) { + FrameInterpolation_RecordOpenChild(scenery, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if (arg0 > 0) { Display_SetSecondLight(&scenery->obj.pos); } Matrix_Push(&gGfxMatrix); - FrameInterpolation_RecordOpenChild(scenery, i); Scenery_Draw(scenery, arg0); - FrameInterpolation_RecordCloseChild(); Matrix_Pop(&gGfxMatrix); Object_UpdateSfxSource(scenery->sfxSource); + FrameInterpolation_RecordCloseChild(); } } } @@ -1739,6 +1743,7 @@ void Object_DrawAll(s32 arg0) { for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_BO_BASE_SHIELD)) { FrameInterpolation_RecordOpenChild(boss, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { @@ -1764,6 +1769,7 @@ void Object_DrawAll(s32 arg0) { for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status >= OBJ_ACTIVE) && func_enmy_80060FE4(&sprite->obj.pos, -12000.0f)) { FrameInterpolation_RecordOpenChild(sprite, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Matrix_Push(&gGfxMatrix); if ((sprite->obj.id == OBJ_SPRITE_CO_RUIN1) || (sprite->obj.id == OBJ_SPRITE_CO_RUIN2)) { @@ -1781,6 +1787,7 @@ void Object_DrawAll(s32 arg0) { for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status >= OBJ_ACTIVE) { FrameInterpolation_RecordOpenChild(actor, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if ((actor->timer_0C6 % 2) == 0) { if (gCurrentLevel == LEVEL_UNK_15) { RCP_SetupDL_23(); @@ -1829,7 +1836,7 @@ void Object_DrawAll(s32 arg0) { } break; } - FrameInterpolation_RecordCloseChild(); + FrameInterpolation_RecordCloseChild(); } } @@ -1841,6 +1848,7 @@ void Object_DrawAll(s32 arg0) { for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { FrameInterpolation_RecordOpenChild(item, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Object_SetCullDirection(arg0); @@ -1864,6 +1872,7 @@ void Effect_DrawAll(s32 arg0) { for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status >= OBJ_ACTIVE) { FrameInterpolation_RecordOpenChild(effect, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if (effect->info.unk_14 == 1) { effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); @@ -1891,6 +1900,7 @@ void Effect_DrawAll(s32 arg0) { for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) { FrameInterpolation_RecordOpenChild(boss, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { @@ -1962,6 +1972,7 @@ void TexturedLine_Draw(void) { for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { TexturedLine* texLine = &gTexturedLines[i]; FrameInterpolation_RecordOpenChild(texLine, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); if (gTexturedLines[i].mode != 0) { Matrix_Push(&gGfxMatrix); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 489ac82c..8b600457 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -140,6 +140,7 @@ void BonusText_DrawAll(void) { for (i = 0, bonus = gBonusText; i < ARRAY_COUNT(gBonusText); i++, bonus++) { if (bonus->hits != 0) { FrameInterpolation_RecordOpenChild(bonus, i); + FrameInterpolation_RecordMarker(__FILE__, __LINE__); Matrix_Push(&gGfxMatrix); BonusText_Draw(bonus); Matrix_Pop(&gGfxMatrix); diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index b6e71ef1..b3c4e9c4 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -31,7 +31,7 @@ void Lib_Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { u16 tempPxl; s32 u; s32 v; - // return; + return; // LTodo: [HD-Textures] This is broken switch (mode) { |
