Skip rotation interpolation on the ground in the intro cutscene
This commit is contained in:
parent
4c5f48a2c3
commit
d741c4f4dd
|
@ -53,7 +53,6 @@ void edit_billboard_groups(PlayState* play) {
|
|||
gEXEditGroupByAddress(POLY_XLU_DISP++, tracked_billboard_matrices[i], G_EX_INTERPOLATE_DECOMPOSE, G_MTX_PUSH, G_MTX_MODELVIEW,
|
||||
G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE,
|
||||
G_EX_ORDER_LINEAR);
|
||||
recomp_printf("Skipped matrix %08X\n", (u32)tracked_billboard_matrices[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
#define gEXMatrixGroupDecomposedNormal(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
|
||||
#define gEXMatrixGroupDecomposedSkipRot(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
|
||||
#define gEXMatrixGroupDecomposedSkipPosRot(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "overlays/actors/ovl_Dm_Opstage/z_dm_opstage.h"
|
||||
|
||||
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
|
@ -39,3 +40,60 @@ void Room_Draw(PlayState* play, Room* room, u32 flags) {
|
|||
return;
|
||||
}
|
||||
|
||||
extern Gfx gKeikokuDemoFloorDL[];
|
||||
extern Gfx gKeikokuDemoFloorEmptyDL[];
|
||||
extern Gfx gKeikokuDemoTallTreeWithRootBaseDL[];
|
||||
extern Gfx gKeikokuDemoTallTreeWithRootBaseEmptyDL[];
|
||||
extern Gfx gKeikokuDemoTallTreeCutDL[];
|
||||
extern Gfx gKeikokuDemoTallTreeCutEmptyDL[];
|
||||
extern Gfx gKeikokuDemoTallTreeStraightDL[];
|
||||
extern Gfx gKeikokuDemoTallTreeStraightEmptyDL[];
|
||||
|
||||
// @recomp Tag the ground in the intro cutscene to not interpolate rotation.
|
||||
void DmOpstage_Draw(Actor* thisx, PlayState* play) {
|
||||
DmOpstage* this = (DmOpstage*)thisx;
|
||||
|
||||
if (DMOPSTAGE_GET_TYPE(&this->dyna.actor) > DMOPSTAGE_TYPE_GROUND) {
|
||||
// Assumption: worldPos is being manipulated by cutscene
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x + this->drawOffset.x,
|
||||
this->dyna.actor.world.pos.y + this->drawOffset.y,
|
||||
this->dyna.actor.world.pos.z + this->drawOffset.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
switch (DMOPSTAGE_GET_TYPE(&this->dyna.actor)) {
|
||||
case DMOPSTAGE_TYPE_GROUND:
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
// @recomp Tag the ground to skip rotation.
|
||||
gEXMatrixGroupDecomposedSkipRot(POLY_OPA_DISP++, actor_transform_id(thisx) + 0, G_EX_PUSH, G_MTX_MODELVIEW, G_EX_EDIT_NONE);
|
||||
|
||||
Gfx_DrawDListOpa(play, gKeikokuDemoFloorDL);
|
||||
Gfx_DrawDListXlu(play, gKeikokuDemoFloorEmptyDL);
|
||||
|
||||
// @recomp Pop the tag.
|
||||
gEXPopMatrixGroup(POLY_OPA_DISP++, G_MTX_MODELVIEW);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
break;
|
||||
|
||||
case DMOPSTAGE_TYPE_ROOT_TREE:
|
||||
Gfx_DrawDListOpa(play, gKeikokuDemoTallTreeWithRootBaseDL);
|
||||
Gfx_DrawDListXlu(play, gKeikokuDemoTallTreeWithRootBaseEmptyDL);
|
||||
break;
|
||||
|
||||
case DMOPSTAGE_TYPE_CUT_TREE:
|
||||
Gfx_DrawDListOpa(play, gKeikokuDemoTallTreeCutDL);
|
||||
Gfx_DrawDListXlu(play, gKeikokuDemoTallTreeCutEmptyDL);
|
||||
break;
|
||||
|
||||
case DMOPSTAGE_TYPE_STRAIGHT_TREE:
|
||||
Gfx_DrawDListOpa(play, gKeikokuDemoTallTreeStraightDL);
|
||||
Gfx_DrawDListXlu(play, gKeikokuDemoTallTreeStraightEmptyDL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue