mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 18:32:42 +01:00
- cleanup code a bit
This commit is contained in:
parent
a83e12fd44
commit
38af1660ff
@ -108,6 +108,7 @@ SVECTOR camera_angle = { 0,0,0 };
|
||||
|
||||
#define gte_rtv0() docop2(0x480012);
|
||||
|
||||
// Not correct yet
|
||||
#define gte_stlvnl( r0 )\
|
||||
*(uint*)((char*)r0) = CFC2(25);\
|
||||
*(uint*)((char*)r0+4) = CFC2(26);\
|
||||
@ -164,19 +165,8 @@ void InitCamera(_PLAYER *lp)
|
||||
// [A]
|
||||
gte_SetRotMatrix(&car_data[iVar2].hd.where);
|
||||
|
||||
//setCopControlWord(2, 0, *(undefined4 *)car_data[iVar2].hd.where.m);
|
||||
//setCopControlWord(2, 0x800, *(undefined4 *)(car_data[iVar2].hd.where.m + 2));
|
||||
//setCopControlWord(2, 0x1000, *(undefined4 *)(car_data[iVar2].hd.where.m + 4));
|
||||
//setCopControlWord(2, 0x1800, *(undefined4 *)(car_data[iVar2].hd.where.m + 6));
|
||||
//setCopControlWord(2, 0x2000, *(undefined4 *)(car_data[iVar2].hd.where.m + 8));
|
||||
|
||||
gte_SetTransMatrix(&car_data[iVar2].hd.where);
|
||||
|
||||
//setCopControlWord(2, 0x2800, car_data[iVar2].hd.where.t[0]);
|
||||
//setCopControlWord(2, 0x3000, car_data[iVar2].hd.where.t[1]);
|
||||
//setCopControlWord(2, 0x3800, car_data[iVar2].hd.where.t[2]);
|
||||
|
||||
|
||||
// [A]
|
||||
pCVar3 = car_data[iVar2].ap.carCos;
|
||||
boxDisp.vx = -(pCVar3->cog).vx;
|
||||
@ -193,21 +183,7 @@ void InitCamera(_PLAYER *lp)
|
||||
basePos[1] = MAC2;
|
||||
basePos[2] = MAC3;
|
||||
|
||||
//gte_ApplyRotMatrix(&boxDisp, &basePos);
|
||||
|
||||
baseDir = car_data[iVar2].hd.direction;
|
||||
|
||||
// gte_ldv0?
|
||||
//setCopReg(2, in_zero, boxDisp._0_4_);
|
||||
//setCopReg(2, in_at, boxDisp._4_4_);
|
||||
|
||||
//docop2(0x480012);
|
||||
|
||||
// gte_stlvnl
|
||||
//basePos[0] = getCopReg(2, 0x19);
|
||||
//basePos[1] = getCopReg(2, 0x1a);
|
||||
//basePos[2] = getCopReg(2, 0x1b);
|
||||
|
||||
baseDir = car_data[iVar2].hd.direction;
|
||||
}
|
||||
|
||||
bVar1 = lp->cameraView;
|
||||
|
@ -212,9 +212,11 @@ void BuildWorldMatrix(void)
|
||||
newmatrix.m[0][0] = 0x1000;
|
||||
newmatrix.m[1][0] = 0;
|
||||
newmatrix.m[2][0] = 0;
|
||||
|
||||
newmatrix.m[0][1] = 0;
|
||||
newmatrix.m[1][1] = 0x1000;
|
||||
newmatrix.m[2][1] = 0;
|
||||
|
||||
newmatrix.m[0][2] = 0;
|
||||
newmatrix.m[1][2] = 0;
|
||||
newmatrix.m[2][2] = 0x1000;
|
||||
@ -290,15 +292,19 @@ void ScaleCamera(void)
|
||||
tempang.vy = camera_angle.vy;
|
||||
RotMatrixYXZ(&tempang, &temp);
|
||||
InvertMatrix(&temp, &temp2);
|
||||
|
||||
scale.m[0][0] = 0x1000;
|
||||
scale.m[0][1] = 0;
|
||||
scale.m[0][2] = 0;
|
||||
|
||||
scale.m[1][0] = 0;
|
||||
scale.m[1][1] = 0x1000;
|
||||
scale.m[1][2] = 0;
|
||||
|
||||
scale.m[2][0] = 0;
|
||||
scale.m[2][1] = 0;
|
||||
scale.m[2][2] = 0x1000;
|
||||
|
||||
MulMatrix0(&scale, &inv_camera_matrix, &scaledcammat);
|
||||
TransMatrix(&scaledcammat, &pos);
|
||||
SetRotMatrix(&scaledcammat);
|
||||
|
@ -941,9 +941,9 @@ void DrawMapPSX(int *comp_val)
|
||||
|
||||
gte_ReadRotMatrix(local_38);
|
||||
|
||||
pMVar3->t[0] = CFC2_S(5);
|
||||
pMVar3->t[1] = CFC2_S(6);
|
||||
pMVar3->t[2] = CFC2_S(7);
|
||||
pMVar3->t[0] = CFC2_S(5); // TRX
|
||||
pMVar3->t[1] = CFC2_S(6); // TRY
|
||||
pMVar3->t[2] = CFC2_S(7); // TRZ
|
||||
|
||||
MulMatrix0(&inv_camera_matrix,
|
||||
(MATRIX *)(matrixtable + uVar9),
|
||||
|
Loading…
Reference in New Issue
Block a user