summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
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/modelinfo
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/modelinfo/PedModelInfo.cpp2
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index 7b087fbd..015c6949 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -216,7 +216,7 @@ CPedModelInfo::AnimatePedColModel(CColModel* colmodel, RwFrame* frame)
RwMatrixCopy(mat, RwFrameGetMatrix(f));
for (f = RwFrameGetParent(f); f; f = RwFrameGetParent(f)) {
- RwMatrixTransform(mat, &f->modelling, rwCOMBINEPOSTCONCAT);
+ RwMatrixTransform(mat, RwFrameGetMatrix(f), rwCOMBINEPOSTCONCAT);
if (RwFrameGetParent(f) == frame)
break;
}
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp
index 42ad635b..432a9ea2 100644
--- a/src/modelinfo/VehicleModelInfo.cpp
+++ b/src/modelinfo/VehicleModelInfo.cpp
@@ -707,7 +707,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 +758,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 +773,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 +861,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 +1058,7 @@ CVehicleModelInfo::LoadEnvironmentMaps(void)
}
if(gpWhiteTexture == nil){
gpWhiteTexture = RwTextureRead("white", nil);
- gpWhiteTexture->name[0] = '@';
+ RwTextureGetName(gpWhiteTexture)[0] = '@';
RwTextureSetFilterMode(gpWhiteTexture, rwFILTERLINEAR);
}
CTxdStore::PopCurrentTxd();