summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-09 16:35:24 +0200
committeraap <aap@papnet.eu>2020-04-09 17:45:05 +0200
commit6225e5072309e69e98246f59222ba82ddf6a418a (patch)
tree9a34067ead53a4b1dc5682ac2d78ede339b62c0d /src/vehicles
parentAddExplosion shadow fix (diff)
downloadre3-6225e5072309e69e98246f59222ba82ddf6a418a.tar
re3-6225e5072309e69e98246f59222ba82ddf6a418a.tar.gz
re3-6225e5072309e69e98246f59222ba82ddf6a418a.tar.bz2
re3-6225e5072309e69e98246f59222ba82ddf6a418a.tar.lz
re3-6225e5072309e69e98246f59222ba82ddf6a418a.tar.xz
re3-6225e5072309e69e98246f59222ba82ddf6a418a.tar.zst
re3-6225e5072309e69e98246f59222ba82ddf6a418a.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Automobile.cpp10
-rw-r--r--src/vehicles/Boat.cpp54
2 files changed, 20 insertions, 44 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 0c8f0dd4..1c0d673e 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -182,17 +182,17 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
m_weaponDoorTimerRight = m_weaponDoorTimerLeft;
if(GetModelIndex() == MI_DODO){
- RpAtomicSetFlags(GetFirstObject(m_aCarNodes[CAR_WHEEL_LF]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(m_aCarNodes[CAR_WHEEL_LF]), 0);
CMatrix mat1;
mat1.Attach(RwFrameGetMatrix(m_aCarNodes[CAR_WHEEL_RF]));
CMatrix mat2(RwFrameGetMatrix(m_aCarNodes[CAR_WHEEL_LF]));
mat1.GetPosition() += CVector(mat2.GetPosition().x + 0.1f, 0.0f, mat2.GetPosition().z);
mat1.UpdateRW();
}else if(GetModelIndex() == MI_MIAMI_SPARROW || GetModelIndex() == MI_MIAMI_RCRAIDER){
- RpAtomicSetFlags(GetFirstObject(m_aCarNodes[CAR_WHEEL_LF]), 0);
- RpAtomicSetFlags(GetFirstObject(m_aCarNodes[CAR_WHEEL_RF]), 0);
- RpAtomicSetFlags(GetFirstObject(m_aCarNodes[CAR_WHEEL_LB]), 0);
- RpAtomicSetFlags(GetFirstObject(m_aCarNodes[CAR_WHEEL_RB]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(m_aCarNodes[CAR_WHEEL_LF]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(m_aCarNodes[CAR_WHEEL_RF]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(m_aCarNodes[CAR_WHEEL_LB]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(m_aCarNodes[CAR_WHEEL_RB]), 0);
}else if(GetModelIndex() == MI_RHINO){
bExplosionProof = true;
bBulletProof = true;
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 6d584017..9c7cbb4f 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -94,7 +94,7 @@ CBoat::GetComponentWorldPosition(int32 component, CVector &pos)
pos = *RwMatrixGetPos(RwFrameGetLTM(m_aBoatNodes[component]));
}
-RxObjSpace3DVertex KeepWaterOutVertices[4];
+RwIm3DVertex KeepWaterOutVertices[4];
RwImVertexIndex KeepWaterOutIndices[6];
void
@@ -103,7 +103,7 @@ CBoat::Render()
CMatrix matrix;
if (m_aBoatNodes[1] != nil) {
- matrix.Attach(&m_aBoatNodes[1]->modelling);
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[1]));
CVector pos = matrix.GetPosition();
matrix.SetRotateZ(m_fMovingHiRotation);
@@ -111,7 +111,7 @@ CBoat::Render()
matrix.UpdateRW();
if (CVehicle::bWheelsOnlyCheat) {
- RpAtomicRenderMacro((RpAtomic*)GetFirstObject(m_aBoatNodes[1]));
+ RpAtomicRender((RpAtomic*)GetFirstObject(m_aBoatNodes[1]));
}
}
m_fMovingHiRotation += 0.05f;
@@ -130,47 +130,23 @@ CBoat::Render()
KeepWaterOutIndices[5] = 3;
switch (GetModelIndex()) {
case MI_SPEEDER:
- KeepWaterOutVertices[0].objVertex.x = -1.15f;
- KeepWaterOutVertices[0].objVertex.y = 3.61f;
- KeepWaterOutVertices[0].objVertex.z = 1.03f;
- KeepWaterOutVertices[1].objVertex.x = 1.15f;
- KeepWaterOutVertices[1].objVertex.y = 3.61f;
- KeepWaterOutVertices[1].objVertex.z = 1.03f;
- KeepWaterOutVertices[2].objVertex.x = -1.15f;
- KeepWaterOutVertices[2].objVertex.y = 0.06f;
- KeepWaterOutVertices[2].objVertex.z = 1.03f;
- KeepWaterOutVertices[3].objVertex.x = 1.15f;
- KeepWaterOutVertices[3].objVertex.y = 0.06f;
- KeepWaterOutVertices[3].objVertex.z = 1.03f;
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.15f, 3.61f, 1.03f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.15f, 3.61f, 1.03f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.15f, 0.06f, 1.03f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.15f, 0.06f, 1.03f);
break;
case MI_REEFER:
- KeepWaterOutVertices[2].objVertex.x = -1.9f;
- KeepWaterOutVertices[2].objVertex.y = 2.83f;
- KeepWaterOutVertices[2].objVertex.z = 1.0f;
- KeepWaterOutVertices[3].objVertex.x = 1.9f;
- KeepWaterOutVertices[3].objVertex.y = 2.83f;
- KeepWaterOutVertices[3].objVertex.z = 1.0f;
- KeepWaterOutVertices[0].objVertex.x = -1.66f;
- KeepWaterOutVertices[0].objVertex.y = -4.48f;
- KeepWaterOutVertices[0].objVertex.z = 0.83f;
- KeepWaterOutVertices[1].objVertex.x = 1.66f;
- KeepWaterOutVertices[1].objVertex.y = -4.48f;
- KeepWaterOutVertices[1].objVertex.z = 0.83f;
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.9f, 2.83f, 1.0f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.9f, 2.83f, 1.0f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.66f, -4.48f, 0.83f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.66f, -4.48f, 0.83f);
break;
case MI_PREDATOR:
default:
- KeepWaterOutVertices[0].objVertex.x = -1.45f;
- KeepWaterOutVertices[0].objVertex.y = 1.9f;
- KeepWaterOutVertices[0].objVertex.z = 0.96f;
- KeepWaterOutVertices[1].objVertex.x = 1.45f;
- KeepWaterOutVertices[1].objVertex.y = 1.9f;
- KeepWaterOutVertices[1].objVertex.z = 0.96f;
- KeepWaterOutVertices[2].objVertex.x = -1.45f;
- KeepWaterOutVertices[2].objVertex.y = -3.75f;
- KeepWaterOutVertices[2].objVertex.z = 0.96f;
- KeepWaterOutVertices[3].objVertex.x = 1.45f;
- KeepWaterOutVertices[3].objVertex.y = -3.75f;
- KeepWaterOutVertices[3].objVertex.z = 0.96f;
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.45f, 1.9f, 0.96f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.45f, 1.9f, 0.96f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.45f, -3.75f, 0.96f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.45f, -3.75f, 0.96f);
break;
}
KeepWaterOutVertices[0].u = 0.0f;