diff options
Diffstat (limited to 'src/modelinfo/VehicleModelInfo.cpp')
-rw-r--r-- | src/modelinfo/VehicleModelInfo.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp index 42ad635b..0c45aa12 100644 --- a/src/modelinfo/VehicleModelInfo.cpp +++ b/src/modelinfo/VehicleModelInfo.cpp @@ -12,6 +12,7 @@ #include "World.h" #include "Vehicle.h" #include "Automobile.h" +#include "Boat.h" #include "Train.h" #include "Plane.h" #include "Heli.h" @@ -80,9 +81,9 @@ RwObjectNameIdAssocation carIds[] = { }; RwObjectNameIdAssocation boatIds[] = { - { "boat_moving_hi", 1, VEHICLE_FLAG_COLLAPSE }, - { "boat_rudder_hi", 3, VEHICLE_FLAG_COLLAPSE }, - { "windscreen", 2, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_COLLAPSE }, + { "boat_moving_hi", BOAT_MOVING, VEHICLE_FLAG_COLLAPSE }, + { "boat_rudder_hi", BOAT_RUDDER, VEHICLE_FLAG_COLLAPSE }, + { "windscreen", BOAT_WINDSCREEN, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_COLLAPSE }, { "ped_frontseat", BOAT_POS_FRONTSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, { nil, 0, 0 } }; @@ -707,7 +708,7 @@ RpMaterial* CVehicleModelInfo::GetEditableMaterialListCB(RpMaterial *material, void *data) { static RwRGBA white = { 255, 255, 255, 255 }; - RwRGBA *col; + const RwRGBA *col; editableMatCBData *cbdata; cbdata = (editableMatCBData*)data; @@ -758,8 +759,8 @@ CVehicleModelInfo::SetVehicleColour(uint8 c1, uint8 c2) col = ms_vehicleColourTable[c1]; coltex = ms_colourTextureTable[c1]; for(matp = m_materials1; *matp; matp++){ - if(RpMaterialGetTexture(*matp) && RpMaterialGetTexture(*matp)->name[0] != '@'){ - colp = RpMaterialGetColor(*matp); + if(RpMaterialGetTexture(*matp) && RwTextureGetName(RpMaterialGetTexture(*matp))[0] != '@'){ + colp = (RwRGBA*)RpMaterialGetColor(*matp); // get rid of const colp->red = col.red; colp->green = col.green; colp->blue = col.blue; @@ -773,8 +774,8 @@ CVehicleModelInfo::SetVehicleColour(uint8 c1, uint8 c2) col = ms_vehicleColourTable[c2]; coltex = ms_colourTextureTable[c2]; for(matp = m_materials2; *matp; matp++){ - if(RpMaterialGetTexture(*matp) && RpMaterialGetTexture(*matp)->name[0] != '@'){ - colp = RpMaterialGetColor(*matp); + if(RpMaterialGetTexture(*matp) && RwTextureGetName(RpMaterialGetTexture(*matp))[0] != '@'){ + colp = (RwRGBA*)RpMaterialGetColor(*matp); // get rid of const colp->red = col.red; colp->green = col.green; colp->blue = col.blue; @@ -861,7 +862,7 @@ CreateCarColourTexture(uint8 r, uint8 g, uint8 b) RwImageDestroy(img); RwFree(pixels); tex = RwTextureCreate(ras); - tex->name[0] = '@'; + RwTextureGetName(tex)[0] = '@'; return tex; } @@ -1058,7 +1059,7 @@ CVehicleModelInfo::LoadEnvironmentMaps(void) } if(gpWhiteTexture == nil){ gpWhiteTexture = RwTextureRead("white", nil); - gpWhiteTexture->name[0] = '@'; + RwTextureGetName(gpWhiteTexture)[0] = '@'; RwTextureSetFilterMode(gpWhiteTexture, rwFILTERLINEAR); } CTxdStore::PopCurrentTxd(); |