mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +00:00
improve matches (#1542)
This commit is contained in:
parent
107c0288cc
commit
a8d670fe5c
5 changed files with 146 additions and 140 deletions
|
@ -281,26 +281,23 @@ void EffDust_DrawFunc_8099E4F4(Actor* thisx, PlayState* play2) {
|
|||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, sEmptyDL);
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
if (*distanceTraveled < 1.0f) {
|
||||
aux = 1.0f - (*distanceTraveled * *distanceTraveled);
|
||||
Matrix_Translate(this->actor.world.pos.x + (initialPositions->x * ((this->dx * aux) + (1.0f - this->dx))),
|
||||
this->actor.world.pos.y + (initialPositions->y * ((this->dy * aux) + (1.0f - this->dy))),
|
||||
this->actor.world.pos.z + (initialPositions->z * ((this->dz * aux) + (1.0f - this->dz))),
|
||||
MTXMODE_NEW);
|
||||
|
||||
Matrix_Scale(this->scalingFactor, this->scalingFactor, this->scalingFactor, MTXMODE_APPLY);
|
||||
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 449),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffSparklesDL));
|
||||
for (i = 0; i < 64; i++, initialPositions++, distanceTraveled++) {
|
||||
if (!(*distanceTraveled < 1.0f)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
initialPositions++;
|
||||
distanceTraveled++;
|
||||
// Needed for matching.
|
||||
if (0) {}
|
||||
aux = 1.0f - SQ(*distanceTraveled);
|
||||
Matrix_Translate(this->actor.world.pos.x + (initialPositions->x * ((this->dx * aux) + (1.0f - this->dx))),
|
||||
this->actor.world.pos.y + (initialPositions->y * ((this->dy * aux) + (1.0f - this->dy))),
|
||||
this->actor.world.pos.z + (initialPositions->z * ((this->dz * aux) + (1.0f - this->dz))),
|
||||
MTXMODE_NEW);
|
||||
|
||||
Matrix_Scale(this->scalingFactor, this->scalingFactor, this->scalingFactor, MTXMODE_APPLY);
|
||||
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 449),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffSparklesDL));
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_dust.c", 458);
|
||||
|
@ -333,33 +330,29 @@ void EffDust_DrawFunc_8099E784(Actor* thisx, PlayState* play2) {
|
|||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, sEmptyDL);
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
if (*distanceTraveled < 1.0f) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, *distanceTraveled * 255);
|
||||
|
||||
// Needed to match.
|
||||
if (!this) {}
|
||||
|
||||
aux = 1.0f - (*distanceTraveled * *distanceTraveled);
|
||||
|
||||
Matrix_Mult(&player->mf_9E0, MTXMODE_NEW);
|
||||
|
||||
Matrix_Translate(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
initialPositions->y * (1.0f - *distanceTraveled) + 320.0f,
|
||||
initialPositions->z * (1.0f - *distanceTraveled) + -20.0f, MTXMODE_APPLY);
|
||||
|
||||
Matrix_Scale(*distanceTraveled * this->scalingFactor, *distanceTraveled * this->scalingFactor,
|
||||
*distanceTraveled * this->scalingFactor, MTXMODE_APPLY);
|
||||
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 506),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffSparklesDL));
|
||||
for (i = 0; i < 64; i++, initialPositions++, distanceTraveled++) {
|
||||
if (!(*distanceTraveled < 1.0f)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
initialPositions++;
|
||||
distanceTraveled++;
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, *distanceTraveled * 255);
|
||||
|
||||
aux = 1.0f - SQ(*distanceTraveled);
|
||||
|
||||
Matrix_Mult(&player->mf_9E0, MTXMODE_NEW);
|
||||
|
||||
Matrix_Translate(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
initialPositions->y * (1.0f - *distanceTraveled) + 320.0f,
|
||||
initialPositions->z * (1.0f - *distanceTraveled) + -20.0f, MTXMODE_APPLY);
|
||||
|
||||
Matrix_Scale(*distanceTraveled * this->scalingFactor, *distanceTraveled * this->scalingFactor,
|
||||
*distanceTraveled * this->scalingFactor, MTXMODE_APPLY);
|
||||
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 506),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffSparklesDL));
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_dust.c", 515);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue