mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 19:13:42 +00:00
Rename MtxF members to use the common convention (#923)
* Rename MtxF members like xy -> now_21 * Revert comments I didn't mean to commit * Rename c*/r* temps in `SkinMatrix_MtxFMtxFMult` * Rename MtxF members like now_21 -> yx
This commit is contained in:
parent
7728f75d2a
commit
430a172183
20 changed files with 683 additions and 683 deletions
|
@ -33,10 +33,10 @@ typedef float MtxF_t[4][4];
|
|||
typedef union {
|
||||
MtxF_t mf;
|
||||
struct {
|
||||
float xx, xy, xz, xw,
|
||||
yx, yy, yz, yw,
|
||||
zx, zy, zz, zw,
|
||||
wx, wy, wz, ww;
|
||||
float xx, yx, zx, wx,
|
||||
xy, yy, zy, wy,
|
||||
xz, yz, zz, wz,
|
||||
xw, yw, zw, ww;
|
||||
};
|
||||
} MtxF;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3146,8 +3146,8 @@ s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, GlobalContext* glob
|
|||
|
||||
mtx = &bodyBreak->matrices[bodyBreak->count];
|
||||
|
||||
spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&globalCtx->actorCtx, actor, globalCtx, ACTOR_EN_PART, mtx->wx,
|
||||
mtx->wy, mtx->wz, 0, 0, objBankIndex, type);
|
||||
spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&globalCtx->actorCtx, actor, globalCtx, ACTOR_EN_PART, mtx->xw,
|
||||
mtx->yw, mtx->zw, 0, 0, objBankIndex, type);
|
||||
|
||||
if (spawnedEnPart != NULL) {
|
||||
Matrix_MtxFToYXZRotS(&bodyBreak->matrices[bodyBreak->count], &spawnedEnPart->actor.shape.rot, 0);
|
||||
|
|
|
@ -225,20 +225,20 @@ void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest) {
|
|||
}
|
||||
}
|
||||
dest->xx = phi_f2;
|
||||
dest->xy = (-nx) * phi_f14;
|
||||
dest->xz = nx * phi_f12;
|
||||
dest->yx = nx;
|
||||
dest->yx = (-nx) * phi_f14;
|
||||
dest->zx = nx * phi_f12;
|
||||
dest->xy = nx;
|
||||
dest->yy = ny;
|
||||
dest->yz = nz;
|
||||
dest->zy = phi_f12;
|
||||
dest->zy = nz;
|
||||
dest->yz = phi_f12;
|
||||
dest->zz = phi_f14;
|
||||
dest->xw = 0.0f;
|
||||
dest->yw = 0.0f;
|
||||
dest->zx = 0.0f;
|
||||
dest->zw = 0.0f;
|
||||
dest->wx = tx;
|
||||
dest->wy = ty;
|
||||
dest->wz = tz;
|
||||
dest->wx = 0.0f;
|
||||
dest->wy = 0.0f;
|
||||
dest->xz = 0.0f;
|
||||
dest->wz = 0.0f;
|
||||
dest->xw = tx;
|
||||
dest->yw = ty;
|
||||
dest->zw = tz;
|
||||
dest->ww = 1.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -1387,37 +1387,37 @@ f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) {
|
|||
}
|
||||
|
||||
mf->xx = temp1;
|
||||
mf->xy = -nx * temp2;
|
||||
mf->xz = nx * temp3;
|
||||
mf->yx = nx;
|
||||
mf->yx = -nx * temp2;
|
||||
mf->zx = nx * temp3;
|
||||
mf->xy = nx;
|
||||
mf->yy = ny;
|
||||
mf->yz = nz;
|
||||
mf->zy = temp3;
|
||||
mf->zy = nz;
|
||||
mf->yz = temp3;
|
||||
mf->zz = temp2;
|
||||
mf->xw = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->zx = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->wx = vec->x;
|
||||
mf->wy = floorY;
|
||||
mf->wz = vec->z;
|
||||
mf->wx = 0.0f;
|
||||
mf->wy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->wz = 0.0f;
|
||||
mf->xw = vec->x;
|
||||
mf->yw = floorY;
|
||||
mf->zw = vec->z;
|
||||
mf->ww = 1.0f;
|
||||
} else {
|
||||
mf->yx = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->xy = 0.0f;
|
||||
mf->xx = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->zx = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yx = 0.0f;
|
||||
mf->xx = 0.0f;
|
||||
mf->wz = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->wy = 0.0f;
|
||||
mf->wx = 0.0f;
|
||||
mf->zz = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->yy = 1.0f;
|
||||
mf->wx = vec->x;
|
||||
mf->wy = vec->y;
|
||||
mf->wz = vec->z;
|
||||
mf->xw = vec->x;
|
||||
mf->yw = vec->y;
|
||||
mf->zw = vec->z;
|
||||
mf->ww = 1.0f;
|
||||
}
|
||||
|
||||
|
@ -1487,7 +1487,7 @@ void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
|
|||
Matrix_MultVec3f(src, dest);
|
||||
|
||||
temp = globalCtx->mf_11D60.ww +
|
||||
(globalCtx->mf_11D60.xw * src->x + globalCtx->mf_11D60.yw * src->y + globalCtx->mf_11D60.zw * src->z);
|
||||
(globalCtx->mf_11D60.wx * src->x + globalCtx->mf_11D60.wy * src->y + globalCtx->mf_11D60.wz * src->z);
|
||||
|
||||
dest->x = 160.0f + ((dest->x / temp) * 160.0f);
|
||||
dest->y = 120.0f - ((dest->y / temp) * 120.0f);
|
||||
|
|
|
@ -17,12 +17,12 @@ void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx*
|
|||
temp_s2->n.ob[0] = arg4->x;
|
||||
temp_s2->n.ob[1] = arg4->y;
|
||||
temp_s2->n.ob[2] = arg4->z;
|
||||
temp_x = mtx->wx;
|
||||
temp_y = mtx->wy;
|
||||
temp_z = mtx->wz;
|
||||
mtx->wz = 0.0f;
|
||||
mtx->wy = 0.0f;
|
||||
mtx->wx = 0.0f;
|
||||
temp_x = mtx->xw;
|
||||
temp_y = mtx->yw;
|
||||
temp_z = mtx->zw;
|
||||
mtx->zw = 0.0f;
|
||||
mtx->yw = 0.0f;
|
||||
mtx->xw = 0.0f;
|
||||
sp64.x = phi_s1->unk_6;
|
||||
sp64.y = phi_s1->unk_7;
|
||||
sp64.z = phi_s1->unk_8;
|
||||
|
@ -30,9 +30,9 @@ void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx*
|
|||
temp_s2->n.n[0] = sp70.x;
|
||||
temp_s2->n.n[1] = sp70.y;
|
||||
temp_s2->n.n[2] = sp70.z;
|
||||
mtx->wx = temp_x;
|
||||
mtx->wy = temp_y;
|
||||
mtx->wz = temp_z;
|
||||
mtx->xw = temp_x;
|
||||
mtx->yw = temp_y;
|
||||
mtx->zw = temp_z;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ MtxF sMtxFClear = {
|
|||
* \f[ [\texttt{xyzDest}, \texttt{wDest}] = [\texttt{src}, 1] \cdot [mf] \f]
|
||||
*/
|
||||
void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest) {
|
||||
xyzDest->x = mf->wx + ((src->x * mf->xx) + (src->y * mf->yx) + (src->z * mf->zx));
|
||||
xyzDest->y = mf->wy + ((src->x * mf->xy) + (src->y * mf->yy) + (src->z * mf->zy));
|
||||
xyzDest->z = mf->wz + ((src->x * mf->xz) + (src->y * mf->yz) + (src->z * mf->zz));
|
||||
*wDest = mf->ww + ((src->x * mf->xw) + (src->y * mf->yw) + (src->z * mf->zw));
|
||||
xyzDest->x = mf->xw + ((src->x * mf->xx) + (src->y * mf->xy) + (src->z * mf->xz));
|
||||
xyzDest->y = mf->yw + ((src->x * mf->yx) + (src->y * mf->yy) + (src->z * mf->yz));
|
||||
xyzDest->z = mf->zw + ((src->x * mf->zx) + (src->y * mf->zy) + (src->z * mf->zz));
|
||||
*wDest = mf->ww + ((src->x * mf->wx) + (src->y * mf->wy) + (src->z * mf->wz));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,20 +30,20 @@ void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDe
|
|||
*/
|
||||
void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest) {
|
||||
f32 mx = mf->xx;
|
||||
f32 my = mf->yx;
|
||||
f32 mz = mf->zx;
|
||||
f32 mw = mf->wx;
|
||||
f32 my = mf->xy;
|
||||
f32 mz = mf->xz;
|
||||
f32 mw = mf->xw;
|
||||
|
||||
dest->x = mw + ((src->x * mx) + (src->y * my) + (src->z * mz));
|
||||
mx = mf->xy;
|
||||
mx = mf->yx;
|
||||
my = mf->yy;
|
||||
mz = mf->zy;
|
||||
mw = mf->wy;
|
||||
mz = mf->yz;
|
||||
mw = mf->yw;
|
||||
dest->y = mw + ((src->x * mx) + (src->y * my) + (src->z * mz));
|
||||
mx = mf->xz;
|
||||
my = mf->yz;
|
||||
mx = mf->zx;
|
||||
my = mf->zy;
|
||||
mz = mf->zz;
|
||||
mw = mf->wz;
|
||||
mw = mf->zw;
|
||||
dest->z = mw + ((src->x * mx) + (src->y * my) + (src->z * mz));
|
||||
}
|
||||
|
||||
|
@ -52,130 +52,130 @@ void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest) {
|
|||
* mfA and dest should not be the same matrix.
|
||||
*/
|
||||
void SkinMatrix_MtxFMtxFMult(MtxF* mfB, MtxF* mfA, MtxF* dest) {
|
||||
f32 rx;
|
||||
f32 ry;
|
||||
f32 rz;
|
||||
f32 rw;
|
||||
//---COL1---
|
||||
f32 cx = mfB->xx;
|
||||
f32 cy = mfB->yx;
|
||||
f32 cz = mfB->zx;
|
||||
f32 cw = mfB->wx;
|
||||
f32 x2;
|
||||
f32 y2;
|
||||
f32 z2;
|
||||
f32 w2;
|
||||
//---ROW1---
|
||||
f32 x1 = mfB->xx;
|
||||
f32 y1 = mfB->xy;
|
||||
f32 z1 = mfB->xz;
|
||||
f32 w1 = mfB->xw;
|
||||
//--------
|
||||
|
||||
rx = mfA->xx;
|
||||
ry = mfA->xy;
|
||||
rz = mfA->xz;
|
||||
rw = mfA->xw;
|
||||
dest->xx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xx;
|
||||
y2 = mfA->yx;
|
||||
z2 = mfA->zx;
|
||||
w2 = mfA->wx;
|
||||
dest->xx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->yx;
|
||||
ry = mfA->yy;
|
||||
rz = mfA->yz;
|
||||
rw = mfA->yw;
|
||||
dest->yx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xy;
|
||||
y2 = mfA->yy;
|
||||
z2 = mfA->zy;
|
||||
w2 = mfA->wy;
|
||||
dest->xy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->zx;
|
||||
ry = mfA->zy;
|
||||
rz = mfA->zz;
|
||||
rw = mfA->zw;
|
||||
dest->zx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xz;
|
||||
y2 = mfA->yz;
|
||||
z2 = mfA->zz;
|
||||
w2 = mfA->wz;
|
||||
dest->xz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->wx;
|
||||
ry = mfA->wy;
|
||||
rz = mfA->wz;
|
||||
rw = mfA->ww;
|
||||
dest->wx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xw;
|
||||
y2 = mfA->yw;
|
||||
z2 = mfA->zw;
|
||||
w2 = mfA->ww;
|
||||
dest->xw = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
//---2Col---
|
||||
cx = mfB->xy;
|
||||
cy = mfB->yy;
|
||||
cz = mfB->zy;
|
||||
cw = mfB->wy;
|
||||
//---ROW2---
|
||||
x1 = mfB->yx;
|
||||
y1 = mfB->yy;
|
||||
z1 = mfB->yz;
|
||||
w1 = mfB->yw;
|
||||
//--------
|
||||
rx = mfA->xx;
|
||||
ry = mfA->xy;
|
||||
rz = mfA->xz;
|
||||
rw = mfA->xw;
|
||||
dest->xy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xx;
|
||||
y2 = mfA->yx;
|
||||
z2 = mfA->zx;
|
||||
w2 = mfA->wx;
|
||||
dest->yx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->yx;
|
||||
ry = mfA->yy;
|
||||
rz = mfA->yz;
|
||||
rw = mfA->yw;
|
||||
dest->yy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xy;
|
||||
y2 = mfA->yy;
|
||||
z2 = mfA->zy;
|
||||
w2 = mfA->wy;
|
||||
dest->yy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->zx;
|
||||
ry = mfA->zy;
|
||||
rz = mfA->zz;
|
||||
rw = mfA->zw;
|
||||
dest->zy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xz;
|
||||
y2 = mfA->yz;
|
||||
z2 = mfA->zz;
|
||||
w2 = mfA->wz;
|
||||
dest->yz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->wx;
|
||||
ry = mfA->wy;
|
||||
rz = mfA->wz;
|
||||
rw = mfA->ww;
|
||||
dest->wy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xw;
|
||||
y2 = mfA->yw;
|
||||
z2 = mfA->zw;
|
||||
w2 = mfA->ww;
|
||||
dest->yw = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
//---3Col---
|
||||
cx = mfB->xz;
|
||||
cy = mfB->yz;
|
||||
cz = mfB->zz;
|
||||
cw = mfB->wz;
|
||||
//---ROW3---
|
||||
x1 = mfB->zx;
|
||||
y1 = mfB->zy;
|
||||
z1 = mfB->zz;
|
||||
w1 = mfB->zw;
|
||||
//--------
|
||||
rx = mfA->xx;
|
||||
ry = mfA->xy;
|
||||
rz = mfA->xz;
|
||||
rw = mfA->xw;
|
||||
dest->xz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xx;
|
||||
y2 = mfA->yx;
|
||||
z2 = mfA->zx;
|
||||
w2 = mfA->wx;
|
||||
dest->zx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->yx;
|
||||
ry = mfA->yy;
|
||||
rz = mfA->yz;
|
||||
rw = mfA->yw;
|
||||
dest->yz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xy;
|
||||
y2 = mfA->yy;
|
||||
z2 = mfA->zy;
|
||||
w2 = mfA->wy;
|
||||
dest->zy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->zx;
|
||||
ry = mfA->zy;
|
||||
rz = mfA->zz;
|
||||
rw = mfA->zw;
|
||||
dest->zz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xz;
|
||||
y2 = mfA->yz;
|
||||
z2 = mfA->zz;
|
||||
w2 = mfA->wz;
|
||||
dest->zz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->wx;
|
||||
ry = mfA->wy;
|
||||
rz = mfA->wz;
|
||||
rw = mfA->ww;
|
||||
dest->wz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xw;
|
||||
y2 = mfA->yw;
|
||||
z2 = mfA->zw;
|
||||
w2 = mfA->ww;
|
||||
dest->zw = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
//---4Col---
|
||||
cx = mfB->xw;
|
||||
cy = mfB->yw;
|
||||
cz = mfB->zw;
|
||||
cw = mfB->ww;
|
||||
//---ROW4---
|
||||
x1 = mfB->wx;
|
||||
y1 = mfB->wy;
|
||||
z1 = mfB->wz;
|
||||
w1 = mfB->ww;
|
||||
//--------
|
||||
rx = mfA->xx;
|
||||
ry = mfA->xy;
|
||||
rz = mfA->xz;
|
||||
rw = mfA->xw;
|
||||
dest->xw = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xx;
|
||||
y2 = mfA->yx;
|
||||
z2 = mfA->zx;
|
||||
w2 = mfA->wx;
|
||||
dest->wx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->yx;
|
||||
ry = mfA->yy;
|
||||
rz = mfA->yz;
|
||||
rw = mfA->yw;
|
||||
dest->yw = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xy;
|
||||
y2 = mfA->yy;
|
||||
z2 = mfA->zy;
|
||||
w2 = mfA->wy;
|
||||
dest->wy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->zx;
|
||||
ry = mfA->zy;
|
||||
rz = mfA->zz;
|
||||
rw = mfA->zw;
|
||||
dest->zw = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xz;
|
||||
y2 = mfA->yz;
|
||||
z2 = mfA->zz;
|
||||
w2 = mfA->wz;
|
||||
dest->wz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
|
||||
rx = mfA->wx;
|
||||
ry = mfA->wy;
|
||||
rz = mfA->wz;
|
||||
rw = mfA->ww;
|
||||
dest->ww = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw);
|
||||
x2 = mfA->xw;
|
||||
y2 = mfA->yw;
|
||||
z2 = mfA->zw;
|
||||
w2 = mfA->ww;
|
||||
dest->ww = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -190,36 +190,36 @@ void SkinMatrix_Clear(MtxF* mf) {
|
|||
mf->yy = 1.0f;
|
||||
mf->zz = 1.0f;
|
||||
mf->ww = 1.0f;
|
||||
mf->xy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yx = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->zx = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->wx = 0.0f;
|
||||
mf->xy = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->wy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->wz = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
}
|
||||
|
||||
void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest) {
|
||||
dest->xx = src->xx;
|
||||
dest->xy = src->xy;
|
||||
dest->xz = src->xz;
|
||||
dest->xw = src->xw;
|
||||
dest->yx = src->yx;
|
||||
dest->yy = src->yy;
|
||||
dest->yz = src->yz;
|
||||
dest->yw = src->yw;
|
||||
dest->zx = src->zx;
|
||||
dest->zy = src->zy;
|
||||
dest->zz = src->zz;
|
||||
dest->zw = src->zw;
|
||||
dest->wx = src->wx;
|
||||
dest->xy = src->xy;
|
||||
dest->yy = src->yy;
|
||||
dest->zy = src->zy;
|
||||
dest->wy = src->wy;
|
||||
dest->xz = src->xz;
|
||||
dest->yz = src->yz;
|
||||
dest->zz = src->zz;
|
||||
dest->wz = src->wz;
|
||||
dest->xw = src->xw;
|
||||
dest->yw = src->yw;
|
||||
dest->zw = src->zw;
|
||||
dest->ww = src->ww;
|
||||
}
|
||||
|
||||
|
@ -290,18 +290,18 @@ s32 SkinMatrix_Invert(MtxF* src, MtxF* dest) {
|
|||
* Produces a matrix which scales x,y,z components of vectors or x,y,z rows of matrices (when applied on LHS)
|
||||
*/
|
||||
void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z) {
|
||||
mf->xy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yx = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->zx = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->wx = 0.0f;
|
||||
mf->xy = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->wy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->wz = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->ww = 1.0f;
|
||||
mf->xx = x;
|
||||
mf->yy = y;
|
||||
|
@ -315,16 +315,16 @@ void SkinMatrix_SetRotateRPY(MtxF* mf, s16 roll, s16 pitch, s16 yaw) {
|
|||
f32 cos2;
|
||||
f32 sin = Math_SinS(yaw);
|
||||
f32 cos = Math_CosS(yaw);
|
||||
f32 yx;
|
||||
f32 xy;
|
||||
f32 sin2;
|
||||
f32 zx;
|
||||
f32 xz;
|
||||
f32 yy;
|
||||
f32 zy;
|
||||
f32 yz;
|
||||
|
||||
mf->yy = cos;
|
||||
mf->yx = -sin;
|
||||
mf->xw = mf->yw = mf->zw = 0;
|
||||
mf->xy = -sin;
|
||||
mf->wx = mf->wy = mf->wz = 0;
|
||||
mf->xw = mf->yw = mf->zw = 0;
|
||||
mf->ww = 1;
|
||||
|
||||
if (pitch != 0) {
|
||||
|
@ -332,20 +332,20 @@ void SkinMatrix_SetRotateRPY(MtxF* mf, s16 roll, s16 pitch, s16 yaw) {
|
|||
cos2 = Math_CosS(pitch);
|
||||
|
||||
mf->xx = cos * cos2;
|
||||
mf->zx = cos * sin2;
|
||||
mf->xz = cos * sin2;
|
||||
|
||||
mf->xy = sin * cos2;
|
||||
mf->zy = sin * sin2;
|
||||
mf->xz = -sin2;
|
||||
mf->yx = sin * cos2;
|
||||
mf->yz = sin * sin2;
|
||||
mf->zx = -sin2;
|
||||
mf->zz = cos2;
|
||||
|
||||
} else {
|
||||
mf->xx = cos;
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
zx = sin; // required to match
|
||||
mf->xy = sin;
|
||||
mf->xz = mf->zx = mf->zy = 0;
|
||||
xz = sin; // required to match
|
||||
mf->yx = sin;
|
||||
mf->zx = mf->xz = mf->yz = 0;
|
||||
mf->zz = 1;
|
||||
}
|
||||
|
||||
|
@ -353,22 +353,22 @@ void SkinMatrix_SetRotateRPY(MtxF* mf, s16 roll, s16 pitch, s16 yaw) {
|
|||
sin2 = Math_SinS(roll);
|
||||
cos2 = Math_CosS(roll);
|
||||
|
||||
yx = mf->yx;
|
||||
zx = mf->zx;
|
||||
mf->yx = (yx * cos2) + (zx * sin2);
|
||||
mf->zx = (zx * cos2) - (yx * sin2);
|
||||
xy = mf->xy;
|
||||
xz = mf->xz;
|
||||
mf->xy = (xy * cos2) + (xz * sin2);
|
||||
mf->xz = (xz * cos2) - (xy * sin2);
|
||||
|
||||
if (1) {}
|
||||
zy = mf->zy;
|
||||
yz = mf->yz;
|
||||
yy = mf->yy;
|
||||
mf->yy = (yy * cos2) + (zy * sin2);
|
||||
mf->zy = (zy * cos2) - (yy * sin2);
|
||||
mf->yy = (yy * cos2) + (yz * sin2);
|
||||
mf->yz = (yz * cos2) - (yy * sin2);
|
||||
|
||||
if (cos2) {}
|
||||
mf->yz = mf->zz * sin2;
|
||||
mf->zy = mf->zz * sin2;
|
||||
mf->zz = mf->zz * cos2;
|
||||
} else {
|
||||
mf->yz = 0;
|
||||
mf->zy = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -379,21 +379,21 @@ void SkinMatrix_SetRotateYRP(MtxF* mf, s16 yaw, s16 roll, s16 pitch) {
|
|||
f32 cos2;
|
||||
f32 sin;
|
||||
f32 cos;
|
||||
f32 xz;
|
||||
f32 zx;
|
||||
f32 sin2;
|
||||
f32 yz;
|
||||
f32 zy;
|
||||
f32 xx;
|
||||
f32 yx;
|
||||
f32 xy;
|
||||
sin = Math_SinS(roll);
|
||||
cos = Math_CosS(roll);
|
||||
mf->xx = cos;
|
||||
mf->xz = -sin;
|
||||
mf->zw = 0;
|
||||
mf->yw = 0;
|
||||
mf->xw = 0;
|
||||
mf->zx = -sin;
|
||||
mf->wz = 0;
|
||||
mf->wy = 0;
|
||||
mf->wx = 0;
|
||||
mf->zw = 0;
|
||||
mf->yw = 0;
|
||||
mf->xw = 0;
|
||||
mf->ww = 1;
|
||||
|
||||
if (yaw != 0) {
|
||||
|
@ -401,20 +401,20 @@ void SkinMatrix_SetRotateYRP(MtxF* mf, s16 yaw, s16 roll, s16 pitch) {
|
|||
cos2 = Math_CosS(yaw);
|
||||
|
||||
mf->zz = cos * cos2;
|
||||
mf->yz = cos * sin2;
|
||||
mf->zy = cos * sin2;
|
||||
|
||||
mf->zx = sin * cos2;
|
||||
mf->yx = sin * sin2;
|
||||
mf->zy = -sin2;
|
||||
mf->xz = sin * cos2;
|
||||
mf->xy = sin * sin2;
|
||||
mf->yz = -sin2;
|
||||
mf->yy = cos2;
|
||||
|
||||
} else {
|
||||
mf->zz = cos;
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
yx = sin; // required to match
|
||||
mf->zx = sin;
|
||||
mf->yx = mf->yz = mf->zy = 0;
|
||||
xy = sin; // required to match
|
||||
mf->xz = sin;
|
||||
mf->xy = mf->zy = mf->yz = 0;
|
||||
mf->yy = 1;
|
||||
}
|
||||
|
||||
|
@ -422,19 +422,19 @@ void SkinMatrix_SetRotateYRP(MtxF* mf, s16 yaw, s16 roll, s16 pitch) {
|
|||
sin2 = Math_SinS(pitch);
|
||||
cos2 = Math_CosS(pitch);
|
||||
xx = mf->xx;
|
||||
yx = mf->yx;
|
||||
mf->xx = (xx * cos2) + (yx * sin2);
|
||||
mf->yx = yx * cos2 - (xx * sin2);
|
||||
xy = mf->xy;
|
||||
mf->xx = (xx * cos2) + (xy * sin2);
|
||||
mf->xy = xy * cos2 - (xx * sin2);
|
||||
if (1) {}
|
||||
yz = mf->yz;
|
||||
xz = mf->xz;
|
||||
mf->xz = (xz * cos2) + (yz * sin2);
|
||||
mf->yz = (yz * cos2) - (xz * sin2);
|
||||
zy = mf->zy;
|
||||
zx = mf->zx;
|
||||
mf->zx = (zx * cos2) + (zy * sin2);
|
||||
mf->zy = (zy * cos2) - (zx * sin2);
|
||||
if (cos2) {}
|
||||
mf->xy = mf->yy * sin2;
|
||||
mf->yx = mf->yy * sin2;
|
||||
mf->yy = mf->yy * cos2;
|
||||
} else {
|
||||
mf->xy = 0;
|
||||
mf->yx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -442,22 +442,22 @@ void SkinMatrix_SetRotateYRP(MtxF* mf, s16 yaw, s16 roll, s16 pitch) {
|
|||
* Produces a matrix which translates a vector by amounts in the x, y and z directions
|
||||
*/
|
||||
void SkinMatrix_SetTranslate(MtxF* mf, f32 x, f32 y, f32 z) {
|
||||
mf->xy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yx = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->zx = 0.0f;
|
||||
mf->wx = 0.0f;
|
||||
mf->xy = 0.0f;
|
||||
mf->zy = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->wy = 0.0f;
|
||||
mf->xz = 0.0f;
|
||||
mf->yz = 0.0f;
|
||||
mf->wz = 0.0f;
|
||||
mf->xx = 1.0f;
|
||||
mf->yy = 1.0f;
|
||||
mf->zz = 1.0f;
|
||||
mf->ww = 1.0f;
|
||||
mf->wx = x;
|
||||
mf->wy = y;
|
||||
mf->wz = z;
|
||||
mf->xw = x;
|
||||
mf->yw = y;
|
||||
mf->zw = z;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -523,19 +523,19 @@ void SkinMatrix_MtxFToMtx(MtxF* src, Mtx* dest) {
|
|||
m1[0] = (temp >> 0x10);
|
||||
m1[16 + 0] = temp & 0xFFFF;
|
||||
|
||||
temp = src->xy * 0x10000;
|
||||
temp = src->yx * 0x10000;
|
||||
m1[1] = (temp >> 0x10);
|
||||
m1[16 + 1] = temp & 0xFFFF;
|
||||
|
||||
temp = src->xz * 0x10000;
|
||||
temp = src->zx * 0x10000;
|
||||
m1[2] = (temp >> 0x10);
|
||||
m1[16 + 2] = temp & 0xFFFF;
|
||||
|
||||
temp = src->xw * 0x10000;
|
||||
temp = src->wx * 0x10000;
|
||||
m1[3] = (temp >> 0x10);
|
||||
m1[16 + 3] = temp & 0xFFFF;
|
||||
|
||||
temp = src->yx * 0x10000;
|
||||
temp = src->xy * 0x10000;
|
||||
m1[4] = (temp >> 0x10);
|
||||
m1[16 + 4] = temp & 0xFFFF;
|
||||
|
||||
|
@ -543,19 +543,19 @@ void SkinMatrix_MtxFToMtx(MtxF* src, Mtx* dest) {
|
|||
m1[5] = (temp >> 0x10);
|
||||
m1[16 + 5] = temp & 0xFFFF;
|
||||
|
||||
temp = src->yz * 0x10000;
|
||||
temp = src->zy * 0x10000;
|
||||
m1[6] = (temp >> 0x10);
|
||||
m1[16 + 6] = temp & 0xFFFF;
|
||||
|
||||
temp = src->yw * 0x10000;
|
||||
temp = src->wy * 0x10000;
|
||||
m1[7] = (temp >> 0x10);
|
||||
m1[16 + 7] = temp & 0xFFFF;
|
||||
|
||||
temp = src->zx * 0x10000;
|
||||
temp = src->xz * 0x10000;
|
||||
m1[8] = (temp >> 0x10);
|
||||
m1[16 + 8] = temp & 0xFFFF;
|
||||
|
||||
temp = src->zy * 0x10000;
|
||||
temp = src->yz * 0x10000;
|
||||
m1[9] = (temp >> 0x10);
|
||||
m2[9] = temp & 0xFFFF;
|
||||
|
||||
|
@ -563,19 +563,19 @@ void SkinMatrix_MtxFToMtx(MtxF* src, Mtx* dest) {
|
|||
m1[10] = (temp >> 0x10);
|
||||
m2[10] = temp & 0xFFFF;
|
||||
|
||||
temp = src->zw * 0x10000;
|
||||
temp = src->wz * 0x10000;
|
||||
m1[11] = (temp >> 0x10);
|
||||
m2[11] = temp & 0xFFFF;
|
||||
|
||||
temp = src->wx * 0x10000;
|
||||
temp = src->xw * 0x10000;
|
||||
m1[12] = (temp >> 0x10);
|
||||
m2[12] = temp & 0xFFFF;
|
||||
|
||||
temp = src->wy * 0x10000;
|
||||
temp = src->yw * 0x10000;
|
||||
m1[13] = (temp >> 0x10);
|
||||
m2[13] = temp & 0xFFFF;
|
||||
|
||||
temp = src->wz * 0x10000;
|
||||
temp = src->zw * 0x10000;
|
||||
m1[14] = (temp >> 0x10);
|
||||
m2[14] = temp & 0xFFFF;
|
||||
|
||||
|
@ -620,21 +620,21 @@ void func_800A7EC0(MtxF* mf, s16 a, f32 x, f32 y, f32 z) {
|
|||
xz = x * z;
|
||||
|
||||
mf->xx = (1.0f - xx) * cosA + xx;
|
||||
mf->xy = (1.0f - cosA) * xy + z * sinA;
|
||||
mf->xz = (1.0f - cosA) * xz - y * sinA;
|
||||
mf->xw = 0.0f;
|
||||
mf->yx = (1.0f - cosA) * xy + z * sinA;
|
||||
mf->zx = (1.0f - cosA) * xz - y * sinA;
|
||||
mf->wx = 0.0f;
|
||||
|
||||
mf->yx = (1.0f - cosA) * xy - z * sinA;
|
||||
mf->xy = (1.0f - cosA) * xy - z * sinA;
|
||||
mf->yy = (1.0f - yy) * cosA + yy;
|
||||
mf->yz = (1.0f - cosA) * yz + x * sinA;
|
||||
mf->yw = 0.0f;
|
||||
mf->zy = (1.0f - cosA) * yz + x * sinA;
|
||||
mf->wy = 0.0f;
|
||||
|
||||
mf->zx = (1.0f - cosA) * xz + y * sinA;
|
||||
mf->zy = (1.0f - cosA) * yz - x * sinA;
|
||||
mf->xz = (1.0f - cosA) * xz + y * sinA;
|
||||
mf->yz = (1.0f - cosA) * yz - x * sinA;
|
||||
mf->zz = (1.0f - zz) * cosA + zz;
|
||||
mf->zw = 0.0f;
|
||||
mf->wz = 0.0f;
|
||||
|
||||
mf->wx = mf->wy = mf->wz = 0.0f;
|
||||
mf->xw = mf->yw = mf->zw = 0.0f;
|
||||
mf->ww = 1.0f;
|
||||
}
|
||||
|
||||
|
@ -669,19 +669,19 @@ void func_800A8030(MtxF* mf, f32* arg1) {
|
|||
zzNorm = arg1[2] * zNorm;
|
||||
|
||||
mf->xx = (1.0f - (yyNorm + zzNorm));
|
||||
mf->xy = (xyNorm + wzNorm);
|
||||
mf->xz = (xzNorm - wyNorm);
|
||||
mf->xw = 0.0f;
|
||||
mf->yx = (xyNorm - wzNorm);
|
||||
mf->yy = (1.0f - (xxNorm + zzNorm));
|
||||
mf->yz = (yzNorm + wxNorm);
|
||||
mf->yw = 0.0f;
|
||||
mf->zx = (yzNorm + wyNorm);
|
||||
mf->zy = (yzNorm - wxNorm);
|
||||
mf->zz = (1.0f - (xxNorm + yyNorm));
|
||||
mf->zw = 0.0f;
|
||||
mf->yx = (xyNorm + wzNorm);
|
||||
mf->zx = (xzNorm - wyNorm);
|
||||
mf->wx = 0.0f;
|
||||
mf->xy = (xyNorm - wzNorm);
|
||||
mf->yy = (1.0f - (xxNorm + zzNorm));
|
||||
mf->zy = (yzNorm + wxNorm);
|
||||
mf->wy = 0.0f;
|
||||
mf->ww = 1.0f;
|
||||
mf->xz = (yzNorm + wyNorm);
|
||||
mf->yz = (yzNorm - wxNorm);
|
||||
mf->zz = (1.0f - (xxNorm + yyNorm));
|
||||
mf->wz = 0.0f;
|
||||
mf->xw = 0.0f;
|
||||
mf->yw = 0.0f;
|
||||
mf->ww = 1.0f;
|
||||
mf->zw = 0.0f;
|
||||
}
|
||||
|
|
|
@ -211,9 +211,9 @@ Gfx* BgHidanRsekizou_DrawFireball(GlobalContext* globalCtx, BgHidanRsekizou* thi
|
|||
mf->xx = mf->yy = mf->zz = (0.7f * fVar6) + 0.5f;
|
||||
tmpf7 = (((((0.7f * fVar6) + 0.5f) * 10.0f) * fVar6) + 20.0f);
|
||||
|
||||
mf->wx = (tmpf7 * sins) + this->dyna.actor.world.pos.x;
|
||||
mf->wy = (this->dyna.actor.world.pos.y + 30.0f) + ((7.0f / 10.0f) * fVar6);
|
||||
mf->wz = (tmpf7 * coss) + this->dyna.actor.world.pos.z;
|
||||
mf->xw = (tmpf7 * sins) + this->dyna.actor.world.pos.x;
|
||||
mf->yw = (this->dyna.actor.world.pos.y + 30.0f) + ((7.0f / 10.0f) * fVar6);
|
||||
mf->zw = (tmpf7 * coss) + this->dyna.actor.world.pos.z;
|
||||
|
||||
gSPMatrix(displayList++,
|
||||
Matrix_MtxFToMtx(Matrix_CheckFloats(mf, "../z_bg_hidan_rsekizou.c", 543),
|
||||
|
|
|
@ -244,16 +244,16 @@ Gfx* func_8088EB54(GlobalContext* globalCtx, BgHidanSima* this, Gfx* gfx) {
|
|||
v0 = 3 - (this->timer >> 1);
|
||||
v0 = CLAMP_MIN(v0, 0);
|
||||
|
||||
mtxF.wx = this->dyna.actor.world.pos.x + ((79 - ((this->timer % 6) * 4)) + v0 * 25) * sin;
|
||||
mtxF.wz = this->dyna.actor.world.pos.z + ((79 - ((this->timer % 6) * 4)) + v0 * 25) * cos;
|
||||
mtxF.wy = this->dyna.actor.world.pos.y + 40.0f;
|
||||
mtxF.xw = this->dyna.actor.world.pos.x + ((79 - ((this->timer % 6) * 4)) + v0 * 25) * sin;
|
||||
mtxF.zw = this->dyna.actor.world.pos.z + ((79 - ((this->timer % 6) * 4)) + v0 * 25) * cos;
|
||||
mtxF.yw = this->dyna.actor.world.pos.y + 40.0f;
|
||||
mtxF.zz = v0 * 0.4f + 1.0f;
|
||||
mtxF.yy = v0 * 0.4f + 1.0f;
|
||||
mtxF.xx = v0 * 0.4f + 1.0f;
|
||||
|
||||
for (s3 = v0; s3 < phi_s5; s3++) {
|
||||
mtxF.wx += 25.0f * sin;
|
||||
mtxF.wz += 25.0f * cos;
|
||||
mtxF.xw += 25.0f * sin;
|
||||
mtxF.zw += 25.0f * cos;
|
||||
mtxF.xx += 0.4f;
|
||||
mtxF.yy += 0.4f;
|
||||
mtxF.zz += 0.4f;
|
||||
|
@ -265,8 +265,8 @@ Gfx* func_8088EB54(GlobalContext* globalCtx, BgHidanSima* this, Gfx* gfx) {
|
|||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfx++, gFireTempleFireballDL);
|
||||
}
|
||||
mtxF.wx = this->dyna.actor.world.pos.x + (phi_s5 * 25 + 80) * sin;
|
||||
mtxF.wz = this->dyna.actor.world.pos.z + (phi_s5 * 25 + 80) * cos;
|
||||
mtxF.xw = this->dyna.actor.world.pos.x + (phi_s5 * 25 + 80) * sin;
|
||||
mtxF.zw = this->dyna.actor.world.pos.z + (phi_s5 * 25 + 80) * cos;
|
||||
gSPSegment(gfx++, 0x09, SEGMENTED_TO_VIRTUAL(sFireballsTexs[(this->timer + s3) % 7]));
|
||||
gSPMatrix(gfx++,
|
||||
Matrix_MtxFToMtx(Matrix_CheckFloats(&mtxF, "../z_bg_hidan_sima.c", 624),
|
||||
|
|
|
@ -171,15 +171,15 @@ void func_809C5BA8(EnBomChu* this, CollisionPoly* floorPoly, GlobalContext* glob
|
|||
if (1) {}
|
||||
|
||||
mf.xx = this->unk_16C.x;
|
||||
mf.xy = this->unk_16C.y;
|
||||
mf.xz = this->unk_16C.z;
|
||||
mf.yx = this->unk_16C.y;
|
||||
mf.zx = this->unk_16C.z;
|
||||
|
||||
mf.yx = sp84.x;
|
||||
mf.xy = sp84.x;
|
||||
mf.yy = sp84.y;
|
||||
mf.yz = sp84.z;
|
||||
mf.zy = sp84.z;
|
||||
|
||||
mf.zx = this->unk_154.x;
|
||||
mf.zy = this->unk_154.y;
|
||||
mf.xz = this->unk_154.x;
|
||||
mf.yz = this->unk_154.y;
|
||||
mf.zz = this->unk_154.z;
|
||||
|
||||
Matrix_MtxFToYXZRotS(&mf, &this->actor.world.rot, 0);
|
||||
|
|
|
@ -310,13 +310,13 @@ void EnBrob_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
|||
|
||||
Matrix_Get(&mtx);
|
||||
if (limbIndex == 3) {
|
||||
this->colliders[0].dim.pos.x = mtx.wx;
|
||||
this->colliders[0].dim.pos.y = mtx.wy;
|
||||
this->colliders[0].dim.pos.z = mtx.wz;
|
||||
this->colliders[0].dim.pos.x = mtx.xw;
|
||||
this->colliders[0].dim.pos.y = mtx.yw;
|
||||
this->colliders[0].dim.pos.z = mtx.zw;
|
||||
} else if (limbIndex == 8) {
|
||||
this->colliders[1].dim.pos.x = mtx.wx;
|
||||
this->colliders[1].dim.pos.y = (mtx.wy + 7.0f);
|
||||
this->colliders[1].dim.pos.z = mtx.wz;
|
||||
this->colliders[1].dim.pos.x = mtx.xw;
|
||||
this->colliders[1].dim.pos.y = (mtx.yw + 7.0f);
|
||||
this->colliders[1].dim.pos.z = mtx.zw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1192,10 +1192,10 @@ void EnDekubaba_DrawStemExtended(EnDekubaba* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
for (i = 0; i < stemSections; i++) {
|
||||
mtx.wy += 20.0f * Math_SinS(this->stemSectionAngle[i]) * this->size;
|
||||
mtx.yw += 20.0f * Math_SinS(this->stemSectionAngle[i]) * this->size;
|
||||
horizontalStepSize = 20.0f * Math_CosS(this->stemSectionAngle[i]) * this->size;
|
||||
mtx.wx -= horizontalStepSize * Math_SinS(this->actor.shape.rot.y);
|
||||
mtx.wz -= horizontalStepSize * Math_CosS(this->actor.shape.rot.y);
|
||||
mtx.xw -= horizontalStepSize * Math_SinS(this->actor.shape.rot.y);
|
||||
mtx.zw -= horizontalStepSize * Math_CosS(this->actor.shape.rot.y);
|
||||
|
||||
Matrix_Put(&mtx);
|
||||
Matrix_RotateRPY(this->stemSectionAngle[i], this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
|
@ -1209,9 +1209,9 @@ void EnDekubaba_DrawStemExtended(EnDekubaba* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (i == 0) {
|
||||
if (this->actionFunc != EnDekubaba_Sway) {
|
||||
this->actor.focus.pos.x = mtx.wx;
|
||||
this->actor.focus.pos.y = mtx.wy;
|
||||
this->actor.focus.pos.z = mtx.wz;
|
||||
this->actor.focus.pos.x = mtx.xw;
|
||||
this->actor.focus.pos.y = mtx.yw;
|
||||
this->actor.focus.pos.z = mtx.zw;
|
||||
} else {
|
||||
this->actor.focus.pos.x = this->actor.home.pos.x;
|
||||
this->actor.focus.pos.y = this->actor.home.pos.y + (40.0f * this->size);
|
||||
|
@ -1221,9 +1221,9 @@ void EnDekubaba_DrawStemExtended(EnDekubaba* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((i < 2) && (this->actor.colorFilterTimer != 0)) {
|
||||
// checking colorFilterTimer ensures that spA4 has been initialized earlier, so not a bug
|
||||
this->bodyPartsPos[i].x = mtx.wx;
|
||||
this->bodyPartsPos[i].y = mtx.wy - spA4;
|
||||
this->bodyPartsPos[i].z = mtx.wz;
|
||||
this->bodyPartsPos[i].x = mtx.xw;
|
||||
this->bodyPartsPos[i].y = mtx.yw - spA4;
|
||||
this->bodyPartsPos[i].z = mtx.zw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -756,9 +756,9 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
|||
if ((limbIndex == 15) || (limbIndex == 21)) {
|
||||
if (this->actionFunc != EnFirefly_Die) {
|
||||
Matrix_Get(&mtx);
|
||||
effPos.x = (Rand_ZeroOne() * 5.0f) + mtx.wx;
|
||||
effPos.y = (Rand_ZeroOne() * 5.0f) + mtx.wy;
|
||||
effPos.z = (Rand_ZeroOne() * 5.0f) + mtx.wz;
|
||||
effPos.x = (Rand_ZeroOne() * 5.0f) + mtx.xw;
|
||||
effPos.y = (Rand_ZeroOne() * 5.0f) + mtx.yw;
|
||||
effPos.z = (Rand_ZeroOne() * 5.0f) + mtx.zw;
|
||||
effScaleStep = -40;
|
||||
effLife = 3;
|
||||
} else {
|
||||
|
|
|
@ -375,8 +375,8 @@ void EnHonotrap_FlameMove(EnHonotrap* this, GlobalContext* globalCtx) {
|
|||
Vec3f tempVel;
|
||||
Vec3f shieldVec;
|
||||
|
||||
shieldVec.x = -player->shieldMf.zx;
|
||||
shieldVec.y = -player->shieldMf.zy;
|
||||
shieldVec.x = -player->shieldMf.xz;
|
||||
shieldVec.y = -player->shieldMf.yz;
|
||||
shieldVec.z = -player->shieldMf.zz;
|
||||
EnHonotrap_GetNormal(&shieldNorm, &shieldVec);
|
||||
|
||||
|
|
|
@ -913,9 +913,9 @@ void EnPoField_PostLimDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
|||
}
|
||||
Matrix_Get(&sLimb7Mtx);
|
||||
if (this->actionFunc == EnPoField_Death && this->actionTimer == 27) {
|
||||
this->actor.world.pos.x = sLimb7Mtx.wx;
|
||||
this->actor.world.pos.y = sLimb7Mtx.wy;
|
||||
this->actor.world.pos.z = sLimb7Mtx.wz;
|
||||
this->actor.world.pos.x = sLimb7Mtx.xw;
|
||||
this->actor.world.pos.y = sLimb7Mtx.yw;
|
||||
this->actor.world.pos.z = sLimb7Mtx.zw;
|
||||
}
|
||||
Lights_PointGlowSetInfo(&this->lightInfo, vec.x, vec.y, vec.z, this->soulColor.r, this->soulColor.g,
|
||||
this->soulColor.b, this->soulColor.a * (200.0f / 255));
|
||||
|
|
|
@ -1061,9 +1061,9 @@ void EnPoh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
|||
}
|
||||
Matrix_Get(&this->unk_368);
|
||||
if (this->actionFunc == func_80ADF15C && this->unk_198 == 27) {
|
||||
this->actor.world.pos.x = this->unk_368.wx;
|
||||
this->actor.world.pos.y = this->unk_368.wy;
|
||||
this->actor.world.pos.z = this->unk_368.wz;
|
||||
this->actor.world.pos.x = this->unk_368.xw;
|
||||
this->actor.world.pos.y = this->unk_368.yw;
|
||||
this->actor.world.pos.z = this->unk_368.zw;
|
||||
}
|
||||
Lights_PointGlowSetInfo(&this->lightInfo, this->colliderSph.elements[0].dim.worldSphere.center.x,
|
||||
this->colliderSph.elements[0].dim.worldSphere.center.y,
|
||||
|
|
|
@ -90,20 +90,20 @@ s32 func_80B0BE20(EnSw* this, CollisionPoly* poly) {
|
|||
this->unk_37C.z = this->unk_37C.z * (1.0f / temp_f0);
|
||||
this->unk_364 = sp44;
|
||||
this->unk_3D8.xx = this->unk_370.x;
|
||||
this->unk_3D8.xy = this->unk_370.y;
|
||||
this->unk_3D8.xz = this->unk_370.z;
|
||||
this->unk_3D8.xw = 0.0f;
|
||||
this->unk_3D8.yx = this->unk_364.x;
|
||||
this->unk_3D8.yy = this->unk_364.y;
|
||||
this->unk_3D8.yz = this->unk_364.z;
|
||||
this->unk_3D8.yw = 0.0f;
|
||||
this->unk_3D8.zx = this->unk_37C.x;
|
||||
this->unk_3D8.zy = this->unk_37C.y;
|
||||
this->unk_3D8.zz = this->unk_37C.z;
|
||||
this->unk_3D8.zw = 0.0f;
|
||||
this->unk_3D8.yx = this->unk_370.y;
|
||||
this->unk_3D8.zx = this->unk_370.z;
|
||||
this->unk_3D8.wx = 0.0f;
|
||||
this->unk_3D8.xy = this->unk_364.x;
|
||||
this->unk_3D8.yy = this->unk_364.y;
|
||||
this->unk_3D8.zy = this->unk_364.z;
|
||||
this->unk_3D8.wy = 0.0f;
|
||||
this->unk_3D8.xz = this->unk_37C.x;
|
||||
this->unk_3D8.yz = this->unk_37C.y;
|
||||
this->unk_3D8.zz = this->unk_37C.z;
|
||||
this->unk_3D8.wz = 0.0f;
|
||||
this->unk_3D8.xw = 0.0f;
|
||||
this->unk_3D8.yw = 0.0f;
|
||||
this->unk_3D8.zw = 0.0f;
|
||||
this->unk_3D8.ww = 1.0f;
|
||||
Matrix_MtxFToYXZRotS(&this->unk_3D8, &this->actor.world.rot, 0);
|
||||
//! @bug: Does not return.
|
||||
|
@ -405,20 +405,20 @@ s32 func_80B0CCF4(EnSw* this, f32* arg1) {
|
|||
this->unk_37C.y *= temp_f0;
|
||||
this->unk_37C.z *= temp_f0;
|
||||
sp2C.xx = this->unk_370.x;
|
||||
sp2C.xy = this->unk_370.y;
|
||||
sp2C.xz = this->unk_370.z;
|
||||
sp2C.xw = 0.0f;
|
||||
sp2C.yx = this->unk_364.x;
|
||||
sp2C.yy = this->unk_364.y;
|
||||
sp2C.yz = this->unk_364.z;
|
||||
sp2C.yw = 0.0f;
|
||||
sp2C.zx = this->unk_37C.x;
|
||||
sp2C.zy = this->unk_37C.y;
|
||||
sp2C.zz = this->unk_37C.z;
|
||||
sp2C.zw = 0.0f;
|
||||
sp2C.yx = this->unk_370.y;
|
||||
sp2C.zx = this->unk_370.z;
|
||||
sp2C.wx = 0.0f;
|
||||
sp2C.xy = this->unk_364.x;
|
||||
sp2C.yy = this->unk_364.y;
|
||||
sp2C.zy = this->unk_364.z;
|
||||
sp2C.wy = 0.0f;
|
||||
sp2C.xz = this->unk_37C.x;
|
||||
sp2C.yz = this->unk_37C.y;
|
||||
sp2C.zz = this->unk_37C.z;
|
||||
sp2C.wz = 0.0f;
|
||||
sp2C.xw = 0.0f;
|
||||
sp2C.yw = 0.0f;
|
||||
sp2C.zw = 0.0f;
|
||||
sp2C.ww = 1.0f;
|
||||
Matrix_MtxFToYXZRotS(&sp2C, &this->actor.world.rot, 0);
|
||||
return true;
|
||||
|
|
|
@ -190,13 +190,13 @@ void func_80B86F68(ItemShield* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
MtxF* shield = &player->shieldMf;
|
||||
|
||||
this->actor.world.pos.x = shield->wx;
|
||||
this->actor.world.pos.y = shield->wy;
|
||||
this->actor.world.pos.z = shield->wz;
|
||||
this->actor.world.pos.x = shield->xw;
|
||||
this->actor.world.pos.y = shield->yw;
|
||||
this->actor.world.pos.z = shield->zw;
|
||||
this->unk_19C &= ~2;
|
||||
|
||||
this->actor.shape.rot.y = Math_Atan2S(-shield->zz, -shield->zx);
|
||||
this->actor.shape.rot.x = Math_Atan2S(-shield->zy, sqrtf(shield->zz * shield->zz + shield->zx * shield->zx));
|
||||
this->actor.shape.rot.y = Math_Atan2S(-shield->zz, -shield->xz);
|
||||
this->actor.shape.rot.x = Math_Atan2S(-shield->yz, sqrtf(shield->zz * shield->zz + shield->xz * shield->xz));
|
||||
|
||||
if (ABS(this->actor.shape.rot.x) > 0x4000) {
|
||||
this->unk_19C |= 1;
|
||||
|
|
|
@ -274,10 +274,10 @@ void MirRay_SetIntensity(MirRay* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->reflectIntensity = 0.0f;
|
||||
|
||||
if (MirRay_CheckInFrustum(&this->sourcePt, &this->poolPt, shieldMtx->wx, shieldMtx->wy, shieldMtx->wz,
|
||||
if (MirRay_CheckInFrustum(&this->sourcePt, &this->poolPt, shieldMtx->xw, shieldMtx->yw, shieldMtx->zw,
|
||||
this->sourceEndRad, this->poolEndRad)) {
|
||||
|
||||
temp_f0 = sqrtf(SQ(shieldMtx->zz) + (SQ(shieldMtx->zx) + SQ(shieldMtx->zy)));
|
||||
temp_f0 = sqrtf(SQ(shieldMtx->zz) + (SQ(shieldMtx->xz) + SQ(shieldMtx->yz)));
|
||||
|
||||
if (temp_f0 == 0.0f) {
|
||||
this->reflectRange = 1.0f;
|
||||
|
@ -293,7 +293,7 @@ void MirRay_SetIntensity(MirRay* this, GlobalContext* globalCtx) {
|
|||
sp4C[1] = this->poolPt.y - this->sourcePt.y;
|
||||
sp4C[2] = this->poolPt.z - this->sourcePt.z;
|
||||
|
||||
temp_f2_2 = -shieldMtx->zx * sp4C[0] - shieldMtx->zy * sp4C[1] - shieldMtx->zz * sp4C[2];
|
||||
temp_f2_2 = -shieldMtx->xz * sp4C[0] - shieldMtx->yz * sp4C[1] - shieldMtx->zz * sp4C[2];
|
||||
|
||||
if (temp_f2_2 < 0.0f) {
|
||||
temp_f0_2 = sqrtf(SQ(sp4C[0]) + SQ(sp4C[1]) + SQ(sp4C[2]));
|
||||
|
@ -319,19 +319,19 @@ void MirRay_SetupReflectionPolys(MirRay* this, GlobalContext* globalCtx, MirRayS
|
|||
|
||||
shieldMtx = &player->shieldMf;
|
||||
|
||||
sp60.x = -((*shieldMtx).zx * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
sp60.y = -((*shieldMtx).zy * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
sp60.x = -((*shieldMtx).xz * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
sp60.y = -((*shieldMtx).yz * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
sp60.z = -((*shieldMtx).zz * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
|
||||
sp60 = sp60; // Need something involving sp60 or the whole function changes
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
posA.x = ((*shieldMtx).wx + (this->shieldCorners[i].x * (*shieldMtx).xx)) +
|
||||
(this->shieldCorners[i].y * (*shieldMtx).yx);
|
||||
posA.y = ((*shieldMtx).wy + (this->shieldCorners[i].x * (*shieldMtx).xy)) +
|
||||
posA.x = ((*shieldMtx).xw + (this->shieldCorners[i].x * (*shieldMtx).xx)) +
|
||||
(this->shieldCorners[i].y * (*shieldMtx).xy);
|
||||
posA.y = ((*shieldMtx).yw + (this->shieldCorners[i].x * (*shieldMtx).yx)) +
|
||||
(this->shieldCorners[i].y * (*shieldMtx).yy);
|
||||
posA.z = ((*shieldMtx).wz + (this->shieldCorners[i].x * (*shieldMtx).xz)) +
|
||||
(this->shieldCorners[i].y * (*shieldMtx).yz);
|
||||
posA.z = ((*shieldMtx).zw + (this->shieldCorners[i].x * (*shieldMtx).zx)) +
|
||||
(this->shieldCorners[i].y * (*shieldMtx).zy);
|
||||
posB.x = sp60.x + posA.x;
|
||||
posB.y = sp60.y + posA.y;
|
||||
posB.z = sp60.z + posA.z;
|
||||
|
@ -383,25 +383,25 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe
|
|||
|
||||
shieldMtx = &player->shieldMf;
|
||||
|
||||
spE8.x = -(shieldMtx->zx * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
spE8.y = -(shieldMtx->zy * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
spE8.x = -(shieldMtx->xz * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
spE8.y = -(shieldMtx->yz * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
spE8.z = -(shieldMtx->zz * this->reflectRange) * this->reflectIntensity * 400.0f;
|
||||
|
||||
vecB.x = shieldMtx->wx;
|
||||
vecB.y = shieldMtx->wy;
|
||||
vecB.z = shieldMtx->wz;
|
||||
vecB.x = shieldMtx->xw;
|
||||
vecB.y = shieldMtx->yw;
|
||||
vecB.z = shieldMtx->zw;
|
||||
|
||||
vecD.x = spE8.x + vecB.x;
|
||||
vecD.y = spE8.y + vecB.y;
|
||||
vecD.z = spE8.z + vecB.z;
|
||||
|
||||
vecA.x = vecB.x + (shieldMtx->xx * 300.0f);
|
||||
vecA.y = vecB.y + (shieldMtx->xy * 300.0f);
|
||||
vecA.z = vecB.z + (shieldMtx->xz * 300.0f);
|
||||
vecA.y = vecB.y + (shieldMtx->yx * 300.0f);
|
||||
vecA.z = vecB.z + (shieldMtx->zx * 300.0f);
|
||||
|
||||
vecC.x = vecD.x + (shieldMtx->xx * 300.0f);
|
||||
vecC.y = vecD.y + (shieldMtx->xy * 300.0f);
|
||||
vecC.z = vecD.z + (shieldMtx->xz * 300.0f);
|
||||
vecC.y = vecD.y + (shieldMtx->yx * 300.0f);
|
||||
vecC.z = vecD.z + (shieldMtx->zx * 300.0f);
|
||||
|
||||
Collider_SetQuadVertices(&this->shieldRay, &vecA, &vecB, &vecC, &vecD);
|
||||
|
||||
|
@ -430,8 +430,8 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe
|
|||
spE8 = spE8; // Required to match
|
||||
|
||||
sp10C.x = (shieldMtx->xx * 100.0f) + vecB.x;
|
||||
sp10C.y = (shieldMtx->xy * 100.0f) + vecB.y;
|
||||
sp10C.z = (shieldMtx->xz * 100.0f) + vecB.z;
|
||||
sp10C.y = (shieldMtx->yx * 100.0f) + vecB.y;
|
||||
sp10C.z = (shieldMtx->zx * 100.0f) + vecB.z;
|
||||
|
||||
sp100.x = (spE8.x * 4.0f) + sp10C.x;
|
||||
sp100.y = (spE8.y * 4.0f) + sp10C.y;
|
||||
|
@ -439,7 +439,7 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe
|
|||
|
||||
normalVec = normalVec; // Required to match
|
||||
|
||||
currentReflection->mtx.wz = 0.0f;
|
||||
currentReflection->mtx.zw = 0.0f;
|
||||
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
|
@ -448,21 +448,21 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe
|
|||
|
||||
currentReflection->mtx.xx = currentReflection->mtx.yy = currentReflection->mtx.zz =
|
||||
currentReflection->mtx.ww = 1.0f;
|
||||
currentReflection->mtx.xy = currentReflection->mtx.xz = currentReflection->mtx.xw =
|
||||
currentReflection->mtx.yx = currentReflection->mtx.yz = currentReflection->mtx.yw =
|
||||
currentReflection->mtx.zx = currentReflection->mtx.zy = currentReflection->mtx.zw =
|
||||
currentReflection->mtx.wx = currentReflection->mtx.wy = currentReflection->mtx.wz;
|
||||
currentReflection->mtx.yx = currentReflection->mtx.zx = currentReflection->mtx.wx =
|
||||
currentReflection->mtx.xy = currentReflection->mtx.zy = currentReflection->mtx.wy =
|
||||
currentReflection->mtx.xz = currentReflection->mtx.yz = currentReflection->mtx.wz =
|
||||
currentReflection->mtx.xw = currentReflection->mtx.yw = currentReflection->mtx.zw;
|
||||
|
||||
if (Math3D_LineSegVsPlane(normalVec.x, normalVec.y, normalVec.z,
|
||||
currentReflection->reflectionPoly->dist, &sp10C, &sp100, &intersection, 1)) {
|
||||
currentReflection->mtx.xx = intersection.x - sp118.x;
|
||||
currentReflection->mtx.xy = intersection.y - sp118.y;
|
||||
currentReflection->mtx.xz = intersection.z - sp118.z;
|
||||
currentReflection->mtx.yx = intersection.y - sp118.y;
|
||||
currentReflection->mtx.zx = intersection.z - sp118.z;
|
||||
}
|
||||
|
||||
sp10C.x = (shieldMtx->yx * 100.0f) + vecB.x;
|
||||
sp10C.x = (shieldMtx->xy * 100.0f) + vecB.x;
|
||||
sp10C.y = (shieldMtx->yy * 100.0f) + vecB.y;
|
||||
sp10C.z = (shieldMtx->yz * 100.0f) + vecB.z;
|
||||
sp10C.z = (shieldMtx->zy * 100.0f) + vecB.z;
|
||||
|
||||
sp100.x = (spE8.x * 4.0f) + sp10C.x;
|
||||
sp100.y = (spE8.y * 4.0f) + sp10C.y;
|
||||
|
@ -470,9 +470,9 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe
|
|||
|
||||
if (Math3D_LineSegVsPlane(normalVec.x, normalVec.y, normalVec.z,
|
||||
currentReflection->reflectionPoly->dist, &sp10C, &sp100, &intersection, 1)) {
|
||||
currentReflection->mtx.yx = intersection.x - sp118.x;
|
||||
currentReflection->mtx.xy = intersection.x - sp118.x;
|
||||
currentReflection->mtx.yy = intersection.y - sp118.y;
|
||||
currentReflection->mtx.yz = intersection.z - sp118.z;
|
||||
currentReflection->mtx.zy = intersection.z - sp118.z;
|
||||
}
|
||||
} else {
|
||||
currentReflection->reflectionPoly = NULL;
|
||||
|
|
|
@ -91,7 +91,7 @@ void EffectSsDeadDs_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
|||
this->rRoll = rpy.x;
|
||||
this->rPitch = rpy.y;
|
||||
this->rYaw = rpy.z;
|
||||
this->pos.y = mf.wy;
|
||||
this->pos.y = mf.yw;
|
||||
this->rTimer++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue