diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2021-08-31 20:19:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-31 14:19:41 -0400 |
| commit | 430a172183fe6f7fe5781325386803e3f1f975cd (patch) | |
| tree | cff76b37bce826ef5fa8be582455b3e85eddbbb4 /src/code | |
| parent | 7728f75d2a8b99b480f56690d49b4c2d9edf9299 (diff) | |
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
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/sys_matrix.c | 608 | ||||
| -rw-r--r-- | src/code/z_actor.c | 4 | ||||
| -rw-r--r-- | src/code/z_bgcheck.c | 24 | ||||
| -rw-r--r-- | src/code/z_play.c | 46 | ||||
| -rw-r--r-- | src/code/z_skin.c | 18 | ||||
| -rw-r--r-- | src/code/z_skin_matrix.c | 484 |
6 files changed, 592 insertions, 592 deletions
diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index c0c668771..ac2555b56 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -63,17 +63,17 @@ void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) { if (mode == MTXMODE_APPLY) { tx = cmf->xx; - ty = cmf->yx; - cmf->wx += tx * x + ty * y + cmf->zx * z; - tx = cmf->xy; + ty = cmf->xy; + cmf->xw += tx * x + ty * y + cmf->xz * z; + tx = cmf->yx; ty = cmf->yy; - cmf->wy += tx * x + ty * y + cmf->zy * z; - tx = cmf->xz; - ty = cmf->yz; - cmf->wz += tx * x + ty * y + cmf->zz * z; - tx = cmf->xw; - ty = cmf->yw; - cmf->ww += tx * x + ty * y + cmf->zw * z; + cmf->yw += tx * x + ty * y + cmf->yz * z; + tx = cmf->zx; + ty = cmf->zy; + cmf->zw += tx * x + ty * y + cmf->zz * z; + tx = cmf->wx; + ty = cmf->wy; + cmf->ww += tx * x + ty * y + cmf->wz * z; } else { SkinMatrix_SetTranslate(cmf, x, y, z); } @@ -84,17 +84,17 @@ void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) { if (mode == MTXMODE_APPLY) { cmf->xx *= x; - cmf->xy *= x; - cmf->xz *= x; - cmf->yx *= y; + cmf->yx *= x; + cmf->zx *= x; + cmf->xy *= y; cmf->yy *= y; - cmf->yz *= y; - cmf->zx *= z; - cmf->zy *= z; + cmf->zy *= y; + cmf->xz *= z; + cmf->yz *= z; cmf->zz *= z; - cmf->xw *= x; - cmf->yw *= y; - cmf->zw *= z; + cmf->wx *= x; + cmf->wy *= y; + cmf->wz *= z; } else { SkinMatrix_SetScale(cmf, x, y, z); } @@ -114,25 +114,25 @@ void Matrix_RotateX(f32 x, u8 mode) { sin = sinf(x); cos = cosf(x); - temp1 = cmf->yx; - temp2 = cmf->zx; - cmf->yx = temp1 * cos + temp2 * sin; - cmf->zx = temp2 * cos - temp1 * sin; + temp1 = cmf->xy; + temp2 = cmf->xz; + cmf->xy = temp1 * cos + temp2 * sin; + cmf->xz = temp2 * cos - temp1 * sin; temp1 = cmf->yy; - temp2 = cmf->zy; + temp2 = cmf->yz; cmf->yy = temp1 * cos + temp2 * sin; - cmf->zy = temp2 * cos - temp1 * sin; + cmf->yz = temp2 * cos - temp1 * sin; - temp1 = cmf->yz; + temp1 = cmf->zy; temp2 = cmf->zz; - cmf->yz = temp1 * cos + temp2 * sin; + cmf->zy = temp1 * cos + temp2 * sin; cmf->zz = temp2 * cos - temp1 * sin; - temp1 = cmf->yw; - temp2 = cmf->zw; - cmf->yw = temp1 * cos + temp2 * sin; - cmf->zw = temp2 * cos - temp1 * sin; + temp1 = cmf->wy; + temp2 = cmf->wz; + cmf->wy = temp1 * cos + temp2 * sin; + cmf->wz = temp2 * cos - temp1 * sin; } } else { cmf = sCurrentMatrix; @@ -145,22 +145,22 @@ void Matrix_RotateX(f32 x, u8 mode) { cos = 1.0f; } - cmf->xy = 0.0f; - cmf->xz = 0.0f; - cmf->xw = 0.0f; cmf->yx = 0.0f; - cmf->yw = 0.0f; cmf->zx = 0.0f; - cmf->zw = 0.0f; cmf->wx = 0.0f; + cmf->xy = 0.0f; cmf->wy = 0.0f; + cmf->xz = 0.0f; cmf->wz = 0.0f; + cmf->xw = 0.0f; + cmf->yw = 0.0f; + cmf->zw = 0.0f; cmf->xx = 1.0f; cmf->ww = 1.0f; cmf->yy = cos; cmf->zz = cos; - cmf->yz = sin; - cmf->zy = -sin; + cmf->zy = sin; + cmf->yz = -sin; } } @@ -179,24 +179,24 @@ void Matrix_RotateY(f32 y, u8 mode) { cos = cosf(y); temp1 = cmf->xx; - temp2 = cmf->zx; + temp2 = cmf->xz; cmf->xx = temp1 * cos - temp2 * sin; - cmf->zx = temp1 * sin + temp2 * cos; + cmf->xz = temp1 * sin + temp2 * cos; - temp1 = cmf->xy; - temp2 = cmf->zy; - cmf->xy = temp1 * cos - temp2 * sin; - cmf->zy = temp1 * sin + temp2 * cos; + temp1 = cmf->yx; + temp2 = cmf->yz; + cmf->yx = temp1 * cos - temp2 * sin; + cmf->yz = temp1 * sin + temp2 * cos; - temp1 = cmf->xz; + temp1 = cmf->zx; temp2 = cmf->zz; - cmf->xz = temp1 * cos - temp2 * sin; + cmf->zx = temp1 * cos - temp2 * sin; cmf->zz = temp1 * sin + temp2 * cos; - temp1 = cmf->xw; - temp2 = cmf->zw; - cmf->xw = temp1 * cos - temp2 * sin; - cmf->zw = temp1 * sin + temp2 * cos; + temp1 = cmf->wx; + temp2 = cmf->wz; + cmf->wx = temp1 * cos - temp2 * sin; + cmf->wz = temp1 * sin + temp2 * cos; } } else { cmf = sCurrentMatrix; @@ -209,22 +209,22 @@ void Matrix_RotateY(f32 y, u8 mode) { cos = 1.0f; } - cmf->xy = 0.0f; - cmf->xw = 0.0f; cmf->yx = 0.0f; - cmf->yz = 0.0f; - cmf->yw = 0.0f; - cmf->zy = 0.0f; - cmf->zw = 0.0f; cmf->wx = 0.0f; + cmf->xy = 0.0f; + cmf->zy = 0.0f; cmf->wy = 0.0f; + cmf->yz = 0.0f; cmf->wz = 0.0f; + cmf->xw = 0.0f; + cmf->yw = 0.0f; + cmf->zw = 0.0f; cmf->yy = 1.0f; cmf->ww = 1.0f; cmf->xx = cos; cmf->zz = cos; - cmf->xz = -sin; - cmf->zx = sin; + cmf->zx = -sin; + cmf->xz = sin; } } @@ -243,24 +243,24 @@ void Matrix_RotateZ(f32 z, u8 mode) { cos = cosf(z); temp1 = cmf->xx; - temp2 = cmf->yx; + temp2 = cmf->xy; cmf->xx = temp1 * cos + temp2 * sin; - cmf->yx = temp2 * cos - temp1 * sin; + cmf->xy = temp2 * cos - temp1 * sin; - temp1 = cmf->xy; + temp1 = cmf->yx; temp2 = cmf->yy; - cmf->xy = temp1 * cos + temp2 * sin; + cmf->yx = temp1 * cos + temp2 * sin; cmf->yy = temp2 * cos - temp1 * sin; - temp1 = cmf->xz; - temp2 = cmf->yz; - cmf->xz = temp1 * cos + temp2 * sin; - cmf->yz = temp2 * cos - temp1 * sin; + temp1 = cmf->zx; + temp2 = cmf->zy; + cmf->zx = temp1 * cos + temp2 * sin; + cmf->zy = temp2 * cos - temp1 * sin; - temp1 = cmf->xw; - temp2 = cmf->yw; - cmf->xw = temp1 * cos + temp2 * sin; - cmf->yw = temp2 * cos - temp1 * sin; + temp1 = cmf->wx; + temp2 = cmf->wy; + cmf->wx = temp1 * cos + temp2 * sin; + cmf->wy = temp2 * cos - temp1 * sin; } } else { cmf = sCurrentMatrix; @@ -273,22 +273,22 @@ void Matrix_RotateZ(f32 z, u8 mode) { cos = 1.0f; } - cmf->xz = 0.0f; - cmf->xw = 0.0f; - cmf->yz = 0.0f; - cmf->yw = 0.0f; cmf->zx = 0.0f; - cmf->zy = 0.0f; - cmf->zw = 0.0f; cmf->wx = 0.0f; + cmf->zy = 0.0f; cmf->wy = 0.0f; + cmf->xz = 0.0f; + cmf->yz = 0.0f; cmf->wz = 0.0f; + cmf->xw = 0.0f; + cmf->yw = 0.0f; + cmf->zw = 0.0f; cmf->zz = 1.0f; cmf->ww = 1.0f; cmf->xx = cos; cmf->yy = cos; - cmf->xy = sin; - cmf->yx = -sin; + cmf->yx = sin; + cmf->xy = -sin; } } @@ -310,73 +310,73 @@ void Matrix_RotateRPY(s16 x, s16 y, s16 z, u8 mode) { cos = Math_CosS(z); temp1 = cmf->xx; - temp2 = cmf->yx; + temp2 = cmf->xy; cmf->xx = temp1 * cos + temp2 * sin; - cmf->yx = temp2 * cos - temp1 * sin; + cmf->xy = temp2 * cos - temp1 * sin; - temp1 = cmf->xy; + temp1 = cmf->yx; temp2 = cmf->yy; - cmf->xy = temp1 * cos + temp2 * sin; + cmf->yx = temp1 * cos + temp2 * sin; cmf->yy = temp2 * cos - temp1 * sin; - temp1 = cmf->xz; - temp2 = cmf->yz; - cmf->xz = temp1 * cos + temp2 * sin; - cmf->yz = temp2 * cos - temp1 * sin; + temp1 = cmf->zx; + temp2 = cmf->zy; + cmf->zx = temp1 * cos + temp2 * sin; + cmf->zy = temp2 * cos - temp1 * sin; - temp1 = cmf->xw; - temp2 = cmf->yw; - cmf->xw = temp1 * cos + temp2 * sin; - cmf->yw = temp2 * cos - temp1 * sin; + temp1 = cmf->wx; + temp2 = cmf->wy; + cmf->wx = temp1 * cos + temp2 * sin; + cmf->wy = temp2 * cos - temp1 * sin; if (y != 0) { sin = Math_SinS(y); cos = Math_CosS(y); temp1 = cmf->xx; - temp2 = cmf->zx; + temp2 = cmf->xz; cmf->xx = temp1 * cos - temp2 * sin; - cmf->zx = temp1 * sin + temp2 * cos; + cmf->xz = temp1 * sin + temp2 * cos; - temp1 = cmf->xy; - temp2 = cmf->zy; - cmf->xy = temp1 * cos - temp2 * sin; - cmf->zy = temp1 * sin + temp2 * cos; + temp1 = cmf->yx; + temp2 = cmf->yz; + cmf->yx = temp1 * cos - temp2 * sin; + cmf->yz = temp1 * sin + temp2 * cos; - temp1 = cmf->xz; + temp1 = cmf->zx; temp2 = cmf->zz; - cmf->xz = temp1 * cos - temp2 * sin; + cmf->zx = temp1 * cos - temp2 * sin; cmf->zz = temp1 * sin + temp2 * cos; - temp1 = cmf->xw; - temp2 = cmf->zw; - cmf->xw = temp1 * cos - temp2 * sin; - cmf->zw = temp1 * sin + temp2 * cos; + temp1 = cmf->wx; + temp2 = cmf->wz; + cmf->wx = temp1 * cos - temp2 * sin; + cmf->wz = temp1 * sin + temp2 * cos; } if (x != 0) { sin = Math_SinS(x); cos = Math_CosS(x); - temp1 = cmf->yx; - temp2 = cmf->zx; - cmf->yx = temp1 * cos + temp2 * sin; - cmf->zx = temp2 * cos - temp1 * sin; + temp1 = cmf->xy; + temp2 = cmf->xz; + cmf->xy = temp1 * cos + temp2 * sin; + cmf->xz = temp2 * cos - temp1 * sin; temp1 = cmf->yy; - temp2 = cmf->zy; + temp2 = cmf->yz; cmf->yy = temp1 * cos + temp2 * sin; - cmf->zy = temp2 * cos - temp1 * sin; + cmf->yz = temp2 * cos - temp1 * sin; - temp1 = cmf->yz; + temp1 = cmf->zy; temp2 = cmf->zz; - cmf->yz = temp1 * cos + temp2 * sin; + cmf->zy = temp1 * cos + temp2 * sin; cmf->zz = temp2 * cos - temp1 * sin; - temp1 = cmf->yw; - temp2 = cmf->zw; - cmf->yw = temp1 * cos + temp2 * sin; - cmf->zw = temp2 * cos - temp1 * sin; + temp1 = cmf->wy; + temp2 = cmf->wz; + cmf->wy = temp1 * cos + temp2 * sin; + cmf->wz = temp2 * cos - temp1 * sin; } } else { SkinMatrix_SetRotateRPY(cmf, x, y, z); @@ -394,77 +394,77 @@ void Matrix_JointPosition(Vec3f* position, Vec3s* rotation) { f32 temp2; temp1 = cmf->xx; - temp2 = cmf->yx; - cmf->wx += temp1 * position->x + temp2 * position->y + cmf->zx * position->z; + temp2 = cmf->xy; + cmf->xw += temp1 * position->x + temp2 * position->y + cmf->xz * position->z; cmf->xx = temp1 * cos + temp2 * sin; - cmf->yx = temp2 * cos - temp1 * sin; + cmf->xy = temp2 * cos - temp1 * sin; - temp1 = cmf->xy; + temp1 = cmf->yx; temp2 = cmf->yy; - cmf->wy += temp1 * position->x + temp2 * position->y + cmf->zy * position->z; - cmf->xy = temp1 * cos + temp2 * sin; + cmf->yw += temp1 * position->x + temp2 * position->y + cmf->yz * position->z; + cmf->yx = temp1 * cos + temp2 * sin; cmf->yy = temp2 * cos - temp1 * sin; - temp1 = cmf->xz; - temp2 = cmf->yz; - cmf->wz += temp1 * position->x + temp2 * position->y + cmf->zz * position->z; - cmf->xz = temp1 * cos + temp2 * sin; - cmf->yz = temp2 * cos - temp1 * sin; + temp1 = cmf->zx; + temp2 = cmf->zy; + cmf->zw += temp1 * position->x + temp2 * position->y + cmf->zz * position->z; + cmf->zx = temp1 * cos + temp2 * sin; + cmf->zy = temp2 * cos - temp1 * sin; - temp1 = cmf->xw; - temp2 = cmf->yw; - cmf->ww += temp1 * position->x + temp2 * position->y + cmf->zw * position->z; - cmf->xw = temp1 * cos + temp2 * sin; - cmf->yw = temp2 * cos - temp1 * sin; + temp1 = cmf->wx; + temp2 = cmf->wy; + cmf->ww += temp1 * position->x + temp2 * position->y + cmf->wz * position->z; + cmf->wx = temp1 * cos + temp2 * sin; + cmf->wy = temp2 * cos - temp1 * sin; if (rotation->y != 0) { sin = Math_SinS(rotation->y); cos = Math_CosS(rotation->y); temp1 = cmf->xx; - temp2 = cmf->zx; + temp2 = cmf->xz; cmf->xx = temp1 * cos - temp2 * sin; - cmf->zx = temp1 * sin + temp2 * cos; + cmf->xz = temp1 * sin + temp2 * cos; - temp1 = cmf->xy; - temp2 = cmf->zy; - cmf->xy = temp1 * cos - temp2 * sin; - cmf->zy = temp1 * sin + temp2 * cos; + temp1 = cmf->yx; + temp2 = cmf->yz; + cmf->yx = temp1 * cos - temp2 * sin; + cmf->yz = temp1 * sin + temp2 * cos; - temp1 = cmf->xz; + temp1 = cmf->zx; temp2 = cmf->zz; - cmf->xz = temp1 * cos - temp2 * sin; + cmf->zx = temp1 * cos - temp2 * sin; cmf->zz = temp1 * sin + temp2 * cos; - temp1 = cmf->xw; - temp2 = cmf->zw; - cmf->xw = temp1 * cos - temp2 * sin; - cmf->zw = temp1 * sin + temp2 * cos; + temp1 = cmf->wx; + temp2 = cmf->wz; + cmf->wx = temp1 * cos - temp2 * sin; + cmf->wz = temp1 * sin + temp2 * cos; } if (rotation->x != 0) { sin = Math_SinS(rotation->x); cos = Math_CosS(rotation->x); - temp1 = cmf->yx; - temp2 = cmf->zx; - cmf->yx = temp1 * cos + temp2 * sin; - cmf->zx = temp2 * cos - temp1 * sin; + temp1 = cmf->xy; + temp2 = cmf->xz; + cmf->xy = temp1 * cos + temp2 * sin; + cmf->xz = temp2 * cos - temp1 * sin; temp1 = cmf->yy; - temp2 = cmf->zy; + temp2 = cmf->yz; cmf->yy = temp1 * cos + temp2 * sin; - cmf->zy = temp2 * cos - temp1 * sin; + cmf->yz = temp2 * cos - temp1 * sin; - temp1 = cmf->yz; + temp1 = cmf->zy; temp2 = cmf->zz; - cmf->yz = temp1 * cos + temp2 * sin; + cmf->zy = temp1 * cos + temp2 * sin; cmf->zz = temp2 * cos - temp1 * sin; - temp1 = cmf->yw; - temp2 = cmf->zw; - cmf->yw = temp1 * cos + temp2 * sin; - cmf->zw = temp2 * cos - temp1 * sin; + temp1 = cmf->wy; + temp2 = cmf->wz; + cmf->wy = temp1 * cos + temp2 * sin; + cmf->wz = temp2 * cos - temp1 * sin; } } @@ -476,13 +476,13 @@ void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec) { f32 sp24; cmf->xx = sp2C; - cmf->xz = -sp30; - cmf->wx = x; - cmf->wy = y; - cmf->wz = z; - cmf->xw = 0.0f; - cmf->yw = 0.0f; - cmf->zw = 0.0f; + cmf->zx = -sp30; + cmf->xw = x; + cmf->yw = y; + cmf->zw = z; + cmf->wx = 0.0f; + cmf->wy = 0.0f; + cmf->wz = 0.0f; cmf->ww = 1.0f; if (vec->x != 0) { @@ -490,17 +490,17 @@ void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec) { sp28 = Math_CosS(vec->x); cmf->zz = sp2C * sp28; - cmf->yz = sp2C * sp24; - cmf->zx = sp30 * sp28; - cmf->yx = sp30 * sp24; - cmf->zy = -sp24; + cmf->zy = sp2C * sp24; + cmf->xz = sp30 * sp28; + cmf->xy = sp30 * sp24; + cmf->yz = -sp24; cmf->yy = sp28; } else { cmf->zz = sp2C; - cmf->zx = sp30; - cmf->zy = 0.0f; + cmf->xz = sp30; cmf->yz = 0.0f; - cmf->yx = 0.0f; + cmf->zy = 0.0f; + cmf->xy = 0.0f; cmf->yy = 1.0f; } @@ -509,20 +509,20 @@ void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec) { sp28 = Math_CosS(vec->z); sp30 = cmf->xx; - sp2C = cmf->yx; + sp2C = cmf->xy; cmf->xx = sp30 * sp28 + sp2C * sp24; - cmf->yx = sp2C * sp28 - sp30 * sp24; + cmf->xy = sp2C * sp28 - sp30 * sp24; - sp30 = cmf->xz; - sp2C = cmf->yz; - cmf->xz = sp30 * sp28 + sp2C * sp24; - cmf->yz = sp2C * sp28 - sp30 * sp24; + sp30 = cmf->zx; + sp2C = cmf->zy; + cmf->zx = sp30 * sp28 + sp2C * sp24; + cmf->zy = sp2C * sp28 - sp30 * sp24; sp2C = cmf->yy; - cmf->xy = sp2C * sp24; + cmf->yx = sp2C * sp24; cmf->yy = sp2C * sp28; } else { - cmf->xy = 0.0f; + cmf->yx = 0.0f; } } @@ -535,19 +535,19 @@ Mtx* Matrix_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; @@ -555,19 +555,19 @@ Mtx* Matrix_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; @@ -575,19 +575,19 @@ Mtx* Matrix_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; @@ -612,43 +612,43 @@ Mtx* Matrix_MtxFToNewMtx(MtxF* src, GraphicsContext* gfxCtx) { void Matrix_MultVec3f(Vec3f* src, Vec3f* dest) { MtxF* cmf = sCurrentMatrix; - dest->x = cmf->wx + (cmf->xx * src->x + cmf->yx * src->y + cmf->zx * src->z); - dest->y = cmf->wy + (cmf->xy * src->x + cmf->yy * src->y + cmf->zy * src->z); - dest->z = cmf->wz + (cmf->xz * src->x + cmf->yz * src->y + cmf->zz * src->z); + dest->x = cmf->xw + (cmf->xx * src->x + cmf->xy * src->y + cmf->xz * src->z); + dest->y = cmf->yw + (cmf->yx * src->x + cmf->yy * src->y + cmf->yz * src->z); + dest->z = cmf->zw + (cmf->zx * src->x + cmf->zy * src->y + cmf->zz * src->z); } void Matrix_MtxFCopy(MtxF* dest, MtxF* src) { dest->xx = src->xx; - dest->xy = src->xy; - dest->xz = src->xz; - dest->xw = src->xw; dest->yx = src->yx; + dest->zx = src->zx; + dest->wx = src->wx; + dest->xy = src->xy; dest->yy = src->yy; - dest->yz = src->yz; - dest->yw = src->yw; + dest->zy = src->zy; + dest->wy = src->wy; 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; - dest->zx = src->zx; - dest->zy = src->zy; + dest->xz = src->xz; + dest->yz = src->yz; dest->zz = src->zz; - dest->zw = src->zw; - dest->wx = src->wx; - dest->wy = src->wy; dest->wz = src->wz; + dest->xw = src->xw; + dest->yw = src->yw; + dest->zw = src->zw; dest->ww = src->ww; } @@ -657,43 +657,43 @@ void Matrix_MtxToMtxF(Mtx* src, MtxF* dest) { u16* m2 = (u16*)&src->m[2][0]; dest->xx = ((m1[0] << 0x10) | m2[0]) * (1 / 65536.0f); - dest->xy = ((m1[1] << 0x10) | m2[1]) * (1 / 65536.0f); - dest->xz = ((m1[2] << 0x10) | m2[2]) * (1 / 65536.0f); - dest->xw = ((m1[3] << 0x10) | m2[3]) * (1 / 65536.0f); - dest->yx = ((m1[4] << 0x10) | m2[4]) * (1 / 65536.0f); + dest->yx = ((m1[1] << 0x10) | m2[1]) * (1 / 65536.0f); + dest->zx = ((m1[2] << 0x10) | m2[2]) * (1 / 65536.0f); + dest->wx = ((m1[3] << 0x10) | m2[3]) * (1 / 65536.0f); + dest->xy = ((m1[4] << 0x10) | m2[4]) * (1 / 65536.0f); dest->yy = ((m1[5] << 0x10) | m2[5]) * (1 / 65536.0f); - dest->yz = ((m1[6] << 0x10) | m2[6]) * (1 / 65536.0f); - dest->yw = ((m1[7] << 0x10) | m2[7]) * (1 / 65536.0f); - dest->zx = ((m1[8] << 0x10) | m2[8]) * (1 / 65536.0f); - dest->zy = ((m1[9] << 0x10) | m2[9]) * (1 / 65536.0f); + dest->zy = ((m1[6] << 0x10) | m2[6]) * (1 / 65536.0f); + dest->wy = ((m1[7] << 0x10) | m2[7]) * (1 / 65536.0f); + dest->xz = ((m1[8] << 0x10) | m2[8]) * (1 / 65536.0f); + dest->yz = ((m1[9] << 0x10) | m2[9]) * (1 / 65536.0f); dest->zz = ((m1[10] << 0x10) | m2[10]) * (1 / 65536.0f); - dest->zw = ((m1[11] << 0x10) | m2[11]) * (1 / 65536.0f); - dest->wx = ((m1[12] << 0x10) | m2[12]) * (1 / 65536.0f); - dest->wy = ((m1[13] << 0x10) | m2[13]) * (1 / 65536.0f); - dest->wz = ((m1[14] << 0x10) | m2[14]) * (1 / 65536.0f); + dest->wz = ((m1[11] << 0x10) | m2[11]) * (1 / 65536.0f); + dest->xw = ((m1[12] << 0x10) | m2[12]) * (1 / 65536.0f); + dest->yw = ((m1[13] << 0x10) | m2[13]) * (1 / 65536.0f); + dest->zw = ((m1[14] << 0x10) | m2[14]) * (1 / 65536.0f); dest->ww = ((m1[15] << 0x10) | m2[15]) * (1 / 65536.0f); } void Matrix_MultVec3fExt(Vec3f* src, Vec3f* dest, MtxF* mf) { - dest->x = mf->wx + (mf->xx * src->x + mf->yx * src->y + mf->zx * src->z); - dest->y = mf->wy + (mf->xy * src->x + mf->yy * src->y + mf->zy * src->z); - dest->z = mf->wz + (mf->xz * src->x + mf->yz * src->y + mf->zz * src->z); + dest->x = mf->xw + (mf->xx * src->x + mf->xy * src->y + mf->xz * src->z); + dest->y = mf->yw + (mf->yx * src->x + mf->yy * src->y + mf->yz * src->z); + dest->z = mf->zw + (mf->zx * src->x + mf->zy * src->y + mf->zz * src->z); } void Matrix_Transpose(MtxF* mf) { f32 temp; - temp = mf->xy; - mf->xy = mf->yx; - mf->yx = temp; + temp = mf->yx; + mf->yx = mf->xy; + mf->xy = temp; - temp = mf->xz; - mf->xz = mf->zx; - mf->zx = temp; + temp = mf->zx; + mf->zx = mf->xz; + mf->xz = temp; - temp = mf->yz; - mf->yz = mf->zy; - mf->zy = temp; + temp = mf->zy; + mf->zy = mf->yz; + mf->yz = temp; } void func_800D1FD4(MtxF* mf) { @@ -704,38 +704,38 @@ void func_800D1FD4(MtxF* mf) { temp = cmf->xx; temp *= temp; - temp2 = cmf->xy; + temp2 = cmf->yx; temp += SQ(temp2); - temp2 = cmf->xz; + temp2 = cmf->zx; temp += SQ(temp2); temp3 = sqrtf(temp); cmf->xx = mf->xx * temp3; - cmf->xy = mf->xy * temp3; - cmf->xz = mf->xz * temp3; + cmf->yx = mf->yx * temp3; + cmf->zx = mf->zx * temp3; - temp = cmf->yx; + temp = cmf->xy; temp *= temp; temp2 = cmf->yy; temp += SQ(temp2); - temp2 = cmf->yz; + temp2 = cmf->zy; temp += SQ(temp2); temp3 = sqrtf(temp); - cmf->yx = mf->yx * temp3; + cmf->xy = mf->xy * temp3; cmf->yy = mf->yy * temp3; - cmf->yz = mf->yz * temp3; + cmf->zy = mf->zy * temp3; - temp = cmf->zx; + temp = cmf->xz; temp *= temp; - temp2 = cmf->zy; + temp2 = cmf->yz; temp += SQ(temp2); temp2 = cmf->zz; temp += SQ(temp2); temp3 = sqrtf(temp); - cmf->zx = mf->zx * temp3; - cmf->zy = mf->zy * temp3; + cmf->xz = mf->xz * temp3; + cmf->yz = mf->yz * temp3; cmf->zz = mf->zz * temp3; } @@ -749,43 +749,43 @@ void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag) { f32 temp3; f32 temp4; - temp = mf->zx; + temp = mf->xz; temp *= temp; temp += SQ(mf->zz); - rotDest->x = Math_FAtan2F(-mf->zy, sqrtf(temp)) * (0x8000 / M_PI); + rotDest->x = Math_FAtan2F(-mf->yz, sqrtf(temp)) * (0x8000 / M_PI); if ((rotDest->x == 0x4000) || (rotDest->x == -0x4000)) { rotDest->z = 0; - rotDest->y = Math_FAtan2F(-mf->xz, mf->xx) * (0x8000 / M_PI); + rotDest->y = Math_FAtan2F(-mf->zx, mf->xx) * (0x8000 / M_PI); } else { - rotDest->y = Math_FAtan2F(mf->zx, mf->zz) * (0x8000 / M_PI); + rotDest->y = Math_FAtan2F(mf->xz, mf->zz) * (0x8000 / M_PI); if (!flag) { - rotDest->z = Math_FAtan2F(mf->xy, mf->yy) * (0x8000 / M_PI); + rotDest->z = Math_FAtan2F(mf->yx, mf->yy) * (0x8000 / M_PI); } else { temp = mf->xx; - temp2 = mf->xz; - temp3 = mf->yz; + temp2 = mf->zx; + temp3 = mf->zy; temp *= temp; temp += SQ(temp2); - temp2 = mf->xy; + temp2 = mf->yx; temp += SQ(temp2); - /* temp = xx^2+xz^2+xy^2 == 1 for a rotation matrix */ + /* temp = xx^2+zx^2+yx^2 == 1 for a rotation matrix */ temp = sqrtf(temp); temp = temp2 / temp; - temp2 = mf->yx; + temp2 = mf->xy; temp2 *= temp2; temp2 += SQ(temp3); temp3 = mf->yy; temp2 += SQ(temp3); - /* temp2 = yx^2+yz^2+yy^2 == 1 for a rotation matrix */ + /* temp2 = xy^2+zy^2+yy^2 == 1 for a rotation matrix */ temp2 = sqrtf(temp2); temp2 = temp3 / temp2; - /* for a rotation matrix, temp == xy and temp2 == yy + /* for a rotation matrix, temp == yx and temp2 == yy * which is the same as in the !flag branch */ rotDest->z = Math_FAtan2F(temp, temp2) * (0x8000 / M_PI); } @@ -804,31 +804,31 @@ void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag) { temp = mf->xx; temp *= temp; - temp += SQ(mf->xy); - rotDest->y = Math_FAtan2F(-mf->xz, sqrtf(temp)) * (0x8000 / M_PI); + temp += SQ(mf->yx); + rotDest->y = Math_FAtan2F(-mf->zx, sqrtf(temp)) * (0x8000 / M_PI); if ((rotDest->y == 0x4000) || (rotDest->y == -0x4000)) { rotDest->x = 0; - rotDest->z = Math_FAtan2F(-mf->yx, mf->yy) * (0x8000 / M_PI); + rotDest->z = Math_FAtan2F(-mf->xy, mf->yy) * (0x8000 / M_PI); } else { - rotDest->z = Math_FAtan2F(mf->xy, mf->xx) * (0x8000 / M_PI); + rotDest->z = Math_FAtan2F(mf->yx, mf->xx) * (0x8000 / M_PI); if (!flag) { - rotDest->x = Math_FAtan2F(mf->yz, mf->zz) * (0x8000 / M_PI); + rotDest->x = Math_FAtan2F(mf->zy, mf->zz) * (0x8000 / M_PI); } else { // see Matrix_MtxFToYXZRotS - temp = mf->yx; + temp = mf->xy; temp2 = mf->yy; - temp3 = mf->zy; + temp3 = mf->yz; temp *= temp; temp += SQ(temp2); - temp2 = mf->yz; + temp2 = mf->zy; temp += SQ(temp2); temp = sqrtf(temp); temp = temp2 / temp; - temp2 = mf->zx; + temp2 = mf->xz; temp2 *= temp2; temp2 += SQ(temp3); temp3 = mf->zz; @@ -864,28 +864,28 @@ void Matrix_RotateAxis(f32 f, Vec3f* vec, u8 mode) { sin = sinf(f); cos = cosf(f); - temp2 = cmf->yx; - temp3 = cmf->zx; + temp2 = cmf->xy; + temp3 = cmf->xz; temp1 = cmf->xx; temp4 = (vec->x * temp1 + vec->y * temp2 + vec->z * temp3) * (1.0f - cos); cmf->xx = temp1 * cos + vec->x * temp4 + sin * (temp2 * vec->z - temp3 * vec->y); - cmf->yx = temp2 * cos + vec->y * temp4 + sin * (temp3 * vec->x - temp1 * vec->z); - cmf->zx = temp3 * cos + vec->z * temp4 + sin * (temp1 * vec->y - temp2 * vec->x); + cmf->xy = temp2 * cos + vec->y * temp4 + sin * (temp3 * vec->x - temp1 * vec->z); + cmf->xz = temp3 * cos + vec->z * temp4 + sin * (temp1 * vec->y - temp2 * vec->x); - temp1 = cmf->xy; + temp1 = cmf->yx; temp2 = cmf->yy; - temp3 = cmf->zy; + temp3 = cmf->yz; temp4 = (vec->x * temp1 + vec->y * temp2 + vec->z * temp3) * (1.0f - cos); - cmf->xy = temp1 * cos + vec->x * temp4 + sin * (temp2 * vec->z - temp3 * vec->y); + cmf->yx = temp1 * cos + vec->x * temp4 + sin * (temp2 * vec->z - temp3 * vec->y); cmf->yy = temp2 * cos + vec->y * temp4 + sin * (temp3 * vec->x - temp1 * vec->z); - cmf->zy = temp3 * cos + vec->z * temp4 + sin * (temp1 * vec->y - temp2 * vec->x); + cmf->yz = temp3 * cos + vec->z * temp4 + sin * (temp1 * vec->y - temp2 * vec->x); - temp1 = cmf->xz; - temp2 = cmf->yz; + temp1 = cmf->zx; + temp2 = cmf->zy; temp3 = cmf->zz; temp4 = (vec->x * temp1 + vec->y * temp2 + vec->z * temp3) * (1.0f - cos); - cmf->xz = temp1 * cos + vec->x * temp4 + sin * (temp2 * vec->z - temp3 * vec->y); - cmf->yz = temp2 * cos + vec->y * temp4 + sin * (temp3 * vec->x - temp1 * vec->z); + cmf->zx = temp1 * cos + vec->x * temp4 + sin * (temp2 * vec->z - temp3 * vec->y); + cmf->zy = temp2 * cos + vec->y * temp4 + sin * (temp3 * vec->x - temp1 * vec->z); cmf->zz = temp3 * cos + vec->z * temp4 + sin * (temp1 * vec->y - temp2 * vec->x); } } else { @@ -904,34 +904,34 @@ void Matrix_RotateAxis(f32 f, Vec3f* vec, u8 mode) { temp2 = vec->x * rCos * vec->y; temp3 = vec->z * sin; - cmf->xy = temp2 + temp3; - cmf->yx = temp2 - temp3; + cmf->yx = temp2 + temp3; + cmf->xy = temp2 - temp3; temp2 = vec->x * rCos * vec->z; temp3 = vec->y * sin; - cmf->xz = temp2 - temp3; - cmf->zx = temp2 + temp3; + cmf->zx = temp2 - temp3; + cmf->xz = temp2 + temp3; temp2 = vec->y * rCos * vec->z; temp3 = vec->x * sin; - cmf->yz = temp2 + temp3; - cmf->zy = temp2 - temp3; + cmf->zy = temp2 + temp3; + cmf->yz = temp2 - temp3; - cmf->xw = cmf->yw = cmf->zw = cmf->wx = cmf->wy = cmf->wz = 0.0f; + cmf->wx = cmf->wy = cmf->wz = cmf->xw = cmf->yw = cmf->zw = 0.0f; cmf->ww = 1.0f; } else { - cmf->xy = 0.0f; - cmf->xz = 0.0f; - cmf->xw = 0.0f; cmf->yx = 0.0f; - cmf->yz = 0.0f; - cmf->yw = 0.0f; cmf->zx = 0.0f; - cmf->zy = 0.0f; - cmf->zw = 0.0f; cmf->wx = 0.0f; + cmf->xy = 0.0f; + cmf->zy = 0.0f; cmf->wy = 0.0f; + cmf->xz = 0.0f; + cmf->yz = 0.0f; cmf->wz = 0.0f; + cmf->xw = 0.0f; + cmf->yw = 0.0f; + cmf->zw = 0.0f; cmf->xx = 1.0f; cmf->yy = 1.0f; cmf->zz = 1.0f; @@ -951,8 +951,8 @@ MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) { "| %12.6f %12.6f %12.6f %12.6f |\n" "| %12.6f %12.6f %12.6f %12.6f |\n" "\\ %12.6f %12.6f %12.6f %12.6f /\n", - file, line, "mf", mf->xx, mf->yx, mf->zx, mf->wx, mf->xy, mf->yy, mf->zy, mf->wy, mf->xz, - mf->yz, mf->zz, mf->wz, mf->xw, mf->yw, mf->zw, mf->ww); + file, line, "mf", mf->xx, mf->xy, mf->xz, mf->xw, mf->yx, mf->yy, mf->yz, mf->yw, mf->zx, + mf->zy, mf->zz, mf->zw, mf->wx, mf->wy, mf->wz, mf->ww); Fault_AddHungupAndCrash(file, line); } } @@ -962,21 +962,21 @@ MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) { } void func_800D2A34(MtxF* mf, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - 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 = arg1; mf->yy = arg1; mf->zz = arg1; - mf->wx = arg2; - mf->wy = arg3; - mf->wz = arg4; + mf->xw = arg2; + mf->yw = arg3; + mf->zw = arg4; mf->ww = 1.0f; } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 4ddc2581b..588c10c9d 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -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); diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index 426757f75..4c13653c1 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -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; } diff --git a/src/code/z_play.c b/src/code/z_play.c index d12eddcec..8b90a835c 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -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); diff --git a/src/code/z_skin.c b/src/code/z_skin.c index fdb1169da..b340aec64 100644 --- a/src/code/z_skin.c +++ b/src/code/z_skin.c @@ -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; } } diff --git a/src/code/z_skin_matrix.c b/src/code/z_skin_matrix.c index 646a26c70..7362804f6 100644 --- a/src/code/z_skin_matrix.c +++ b/src/code/z_skin_matrix.c @@ -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); - - rx = mfA->yx; - ry = mfA->yy; - rz = mfA->yz; - rw = mfA->yw; - dest->yx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->zx; - ry = mfA->zy; - rz = mfA->zz; - rw = mfA->zw; - dest->zx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->wx; - ry = mfA->wy; - rz = mfA->wz; - rw = mfA->ww; - dest->wx = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - //---2Col--- - cx = mfB->xy; - cy = mfB->yy; - cz = mfB->zy; - cw = mfB->wy; + x2 = mfA->xx; + y2 = mfA->yx; + z2 = mfA->zx; + w2 = mfA->wx; + dest->xx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xy; + y2 = mfA->yy; + z2 = mfA->zy; + w2 = mfA->wy; + dest->xy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xz; + y2 = mfA->yz; + z2 = mfA->zz; + w2 = mfA->wz; + dest->xz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xw; + y2 = mfA->yw; + z2 = mfA->zw; + w2 = mfA->ww; + dest->xw = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + //---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); - - rx = mfA->yx; - ry = mfA->yy; - rz = mfA->yz; - rw = mfA->yw; - dest->yy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->zx; - ry = mfA->zy; - rz = mfA->zz; - rw = mfA->zw; - dest->zy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->wx; - ry = mfA->wy; - rz = mfA->wz; - rw = mfA->ww; - dest->wy = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - //---3Col--- - cx = mfB->xz; - cy = mfB->yz; - cz = mfB->zz; - cw = mfB->wz; + x2 = mfA->xx; + y2 = mfA->yx; + z2 = mfA->zx; + w2 = mfA->wx; + dest->yx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xy; + y2 = mfA->yy; + z2 = mfA->zy; + w2 = mfA->wy; + dest->yy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xz; + y2 = mfA->yz; + z2 = mfA->zz; + w2 = mfA->wz; + dest->yz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xw; + y2 = mfA->yw; + z2 = mfA->zw; + w2 = mfA->ww; + dest->yw = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + //---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); - - rx = mfA->yx; - ry = mfA->yy; - rz = mfA->yz; - rw = mfA->yw; - dest->yz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->zx; - ry = mfA->zy; - rz = mfA->zz; - rw = mfA->zw; - dest->zz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->wx; - ry = mfA->wy; - rz = mfA->wz; - rw = mfA->ww; - dest->wz = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - //---4Col--- - cx = mfB->xw; - cy = mfB->yw; - cz = mfB->zw; - cw = mfB->ww; + x2 = mfA->xx; + y2 = mfA->yx; + z2 = mfA->zx; + w2 = mfA->wx; + dest->zx = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xy; + y2 = mfA->yy; + z2 = mfA->zy; + w2 = mfA->wy; + dest->zy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xz; + y2 = mfA->yz; + z2 = mfA->zz; + w2 = mfA->wz; + dest->zz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xw; + y2 = mfA->yw; + z2 = mfA->zw; + w2 = mfA->ww; + dest->zw = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + //---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); - - rx = mfA->yx; - ry = mfA->yy; - rz = mfA->yz; - rw = mfA->yw; - dest->yw = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->zx; - ry = mfA->zy; - rz = mfA->zz; - rw = mfA->zw; - dest->zw = (cx * rx) + (cy * ry) + (cz * rz) + (cw * rw); - - rx = mfA->wx; - ry = mfA->wy; - rz = mfA->wz; - rw = mfA->ww; - dest->ww = (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); + + x2 = mfA->xy; + y2 = mfA->yy; + z2 = mfA->zy; + w2 = mfA->wy; + dest->wy = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + x2 = mfA->xz; + y2 = mfA->yz; + z2 = mfA->zz; + w2 = mfA->wz; + dest->wz = (x1 * x2) + (y1 * y2) + (z1 * z2) + (w1 * w2); + + 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; } |
