summaryrefslogtreecommitdiffstats
path: root/src/extras/custompipes_d3d9.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/extras/custompipes_d3d9.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp
index 27006c6a..63ca5f28 100644
--- a/src/extras/custompipes_d3d9.cpp
+++ b/src/extras/custompipes_d3d9.cpp
@@ -139,7 +139,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
void
CreateVehiclePipe(void)
{
- if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0)
+ if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0)
printf("Error: couldn't open 'neo/carTweakingTable.dat'\n");
else{
char *fp = (char*)work_buff;
@@ -171,6 +171,9 @@ DestroyVehiclePipe(void)
rw::d3d::destroyVertexShader(neoVehicle_VS);
neoVehicle_VS = nil;
+ rw::d3d::destroyPixelShader(neoVehicle_PS);
+ neoVehicle_PS = nil;
+
((rw::d3d9::ObjPipeline*)vehiclePipe)->destroy();
vehiclePipe = nil;
}
@@ -251,7 +254,7 @@ worldRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
void
CreateWorldPipe(void)
{
- if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0)
+ if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0)
printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n");
else
ReadTweakValueTable((char*)work_buff, WorldLightmapBlend);
@@ -362,6 +365,12 @@ CreateGlossPipe(void)
void
DestroyGlossPipe(void)
{
+ rw::d3d::destroyVertexShader(neoGloss_VS);
+ neoGloss_VS = nil;
+
+ rw::d3d::destroyPixelShader(neoGloss_PS);
+ neoGloss_PS = nil;
+
((rw::d3d9::ObjPipeline*)glossPipe)->destroy();
glossPipe = nil;
}
@@ -491,7 +500,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
void
CreateRimLightPipes(void)
{
- if(CFileMgr::LoadFile("neo/rimTweakingTable.dat", work_buff, sizeof(work_buff), "r") == 0)
+ if(CFileMgr::LoadFile("neo/rimTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0)
printf("Error: couldn't open 'neo/rimTweakingTable.dat'\n");
else{
char *fp = (char*)work_buff;