diff options
Diffstat (limited to '')
m--------- | librw | 0 | ||||
-rw-r--r-- | src/control/CarCtrl.h | 3 | ||||
-rw-r--r-- | src/core/FileLoader.cpp | 28 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 2 | ||||
-rw-r--r-- | src/fakerw/fake.cpp | 20 | ||||
-rw-r--r-- | src/modelinfo/VehicleModelInfo.h | 11 |
6 files changed, 35 insertions, 29 deletions
diff --git a/librw b/librw -Subproject bdbc92d86eef28344e01c992d55a9c4f43629f8 +Subproject 661feeabf4a4f0a8b0bee23b53ba557a14352d0 diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h index 44ef9ab6..457224fb 100644 --- a/src/control/CarCtrl.h +++ b/src/control/CarCtrl.h @@ -23,6 +23,7 @@ enum{ class CCarCtrl { +public: enum eCarClass { POOR = 0, RICH, @@ -43,7 +44,7 @@ class CCarCtrl GANG9, COPS }; -public: + static void SwitchVehicleToRealPhysics(CVehicle*); static void AddToCarArray(int32 id, int32 vehclass); static void UpdateCarCount(CVehicle*, bool); diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index 25c43778..adf4b9f8 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -812,33 +812,33 @@ CFileLoader::LoadVehicleObject(const char *line) // Well this is kinda dumb.... if(strncmp(vehclass, "poorfamily", 11) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_POOR; + mi->m_vehicleClass = CCarCtrl::POOR; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_POOR); + CCarCtrl::AddToCarArray(id, CCarCtrl::POOR); }else if(strncmp(vehclass, "richfamily", 11) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_RICH; + mi->m_vehicleClass = CCarCtrl::RICH; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_RICH); + CCarCtrl::AddToCarArray(id, CCarCtrl::RICH); }else if(strncmp(vehclass, "executive", 10) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_EXECUTIVE; + mi->m_vehicleClass = CCarCtrl::EXEC; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_EXECUTIVE); + CCarCtrl::AddToCarArray(id, CCarCtrl::EXEC); }else if(strncmp(vehclass, "worker", 7) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_WORKER; + mi->m_vehicleClass = CCarCtrl::WORKER; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_WORKER); + CCarCtrl::AddToCarArray(id, CCarCtrl::WORKER); }else if(strncmp(vehclass, "special", 8) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_SPECIAL; + mi->m_vehicleClass = CCarCtrl::SPECIAL; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_SPECIAL); + CCarCtrl::AddToCarArray(id, CCarCtrl::SPECIAL); }else if(strncmp(vehclass, "big", 4) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_BIG; + mi->m_vehicleClass = CCarCtrl::BIG; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_BIG); + CCarCtrl::AddToCarArray(id, CCarCtrl::BIG); }else if(strncmp(vehclass, "taxi", 5) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_TAXI; + mi->m_vehicleClass = CCarCtrl::TAXI; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_TAXI); + CCarCtrl::AddToCarArray(id, CCarCtrl::TAXI); } } diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index dab8bafb..72630d57 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1331,7 +1331,7 @@ CStreaming::StreamVehiclesAndPeds(void) for(i = 1; i <= 10; i++){ model = CCarCtrl::ChooseCarModel(modelQualityClass); modelQualityClass++; - if(modelQualityClass >= NUM_VEHICLE_CLASSES) + if(modelQualityClass >= CCarCtrl::TOTAL_CUSTOM_CLASSES) modelQualityClass = 0; // check if we want to load this model diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index e569dea9..f1531490 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -756,6 +756,7 @@ RwCamera *RwCameraForAllClumpsNotInFrustum(RwCamera *camera, RwInt32 numClumps, RwBool RpMatFXPluginAttach( void ) { registerMatFXPlugin(); return true; } RpAtomic *RpMatFXAtomicEnableEffects( RpAtomic *atomic ) { MatFX::enableEffects(atomic); return atomic; } +RpMatFXMaterialFlags RpMatFXMaterialGetEffects( const RpMaterial *material ){ return (RpMatFXMaterialFlags)MatFX::getEffects(material); } RpMaterial *RpMatFXMaterialSetEffects( RpMaterial *material, RpMatFXMaterialFlags flags ) { MatFX::setEffects(material, (uint32)flags); return material; } RpMaterial *RpMatFXMaterialSetupEnvMap( RpMaterial *material, RwTexture *texture, RwFrame *frame, RwBool useFrameBufferAlpha, RwReal coef ) { MatFX *mfx = MatFX::get(material); @@ -764,8 +765,23 @@ RpMaterial *RpMatFXMaterialSetupEnvMap( RpMaterial *material, RwTexture *texture mfx->setEnvCoefficient(coef); return material; } - - +RpMaterial *RpMatFXMaterialSetEnvMapFrame( RpMaterial *material, RwFrame *frame ) +{ + MatFX *mfx = MatFX::get(material); + mfx->setEnvFrame(frame); + return material; +} +RpMaterial *RpMatFXMaterialSetEnvMapCoefficient( RpMaterial *material, RwReal coef ) +{ + MatFX *mfx = MatFX::get(material); + mfx->setEnvCoefficient(coef); + return material; +} +RwReal RpMatFXMaterialGetEnvMapCoefficient( const RpMaterial *material ) +{ + MatFX *mfx = MatFX::get(material); + return mfx->getEnvCoefficient(); +} diff --git a/src/modelinfo/VehicleModelInfo.h b/src/modelinfo/VehicleModelInfo.h index 9992ab98..6946c5c1 100644 --- a/src/modelinfo/VehicleModelInfo.h +++ b/src/modelinfo/VehicleModelInfo.h @@ -36,17 +36,6 @@ enum eVehicleType { }; enum { - VEHICLE_CLASS_POOR, - VEHICLE_CLASS_RICH, - VEHICLE_CLASS_EXECUTIVE, - VEHICLE_CLASS_WORKER, - VEHICLE_CLASS_SPECIAL, - VEHICLE_CLASS_BIG, - VEHICLE_CLASS_TAXI, - NUM_VEHICLE_CLASSES -}; - -enum { NUM_VEHICLE_POSITIONS = 10 }; |