1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-14 06:29:17 +00:00

assert, temp fixes

This commit is contained in:
Fire-Head 2021-01-13 01:06:22 +03:00
parent 3e6016dc6e
commit 660d040531
3 changed files with 51 additions and 11 deletions

View file

@ -321,84 +321,101 @@ void CParticle::Initialise()
for ( int32 i = 0; i < MAX_SMOKE_FILES; i++ ) for ( int32 i = 0; i < MAX_SMOKE_FILES; i++ )
{ {
gpSmokeTex[i] = RwTextureRead(SmokeFiles[i], nil); gpSmokeTex[i] = RwTextureRead(SmokeFiles[i], nil);
ASSERT(gpSmokeTex[i] != nil);
gpSmokeRaster[i] = RwTextureGetRaster(gpSmokeTex[i]); gpSmokeRaster[i] = RwTextureGetRaster(gpSmokeTex[i]);
} }
gpSmoke2Tex = RwTextureRead("smokeII_3", nil); gpSmoke2Tex = RwTextureRead("smokeII_3", nil);
ASSERT(gpSmoke2Tex != nil);
gpSmoke2Raster = RwTextureGetRaster(gpSmoke2Tex); gpSmoke2Raster = RwTextureGetRaster(gpSmoke2Tex);
for ( int32 i = 0; i < MAX_RUBBER_FILES; i++ ) for ( int32 i = 0; i < MAX_RUBBER_FILES; i++ )
{ {
gpRubberTex[i] = RwTextureRead(RubberFiles[i], nil); gpRubberTex[i] = RwTextureRead(RubberFiles[i], nil);
ASSERT(gpRubberTex[i] != nil);
gpRubberRaster[i] = RwTextureGetRaster(gpRubberTex[i]); gpRubberRaster[i] = RwTextureGetRaster(gpRubberTex[i]);
} }
for ( int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ ) for ( int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ )
{ {
gpRainSplashTex[i] = RwTextureRead(RainSplashFiles[i], nil); gpRainSplashTex[i] = RwTextureRead(RainSplashFiles[i], nil);
ASSERT(gpRainSplashTex[i] != nil);
gpRainSplashRaster[i] = RwTextureGetRaster(gpRainSplashTex[i]); gpRainSplashRaster[i] = RwTextureGetRaster(gpRainSplashTex[i]);
} }
for ( int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ ) for ( int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ )
{ {
gpWatersprayTex[i] = RwTextureRead(WatersprayFiles[i], nil); gpWatersprayTex[i] = RwTextureRead(WatersprayFiles[i], nil);
ASSERT(gpWatersprayTex[i] != nil);
gpWatersprayRaster[i] = RwTextureGetRaster(gpWatersprayTex[i]); gpWatersprayRaster[i] = RwTextureGetRaster(gpWatersprayTex[i]);
} }
for ( int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ ) for ( int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ )
{ {
gpExplosionMediumTex[i] = RwTextureRead(ExplosionMediumFiles[i], nil); gpExplosionMediumTex[i] = RwTextureRead(ExplosionMediumFiles[i], nil);
ASSERT(gpExplosionMediumTex[i] != nil);
gpExplosionMediumRaster[i] = RwTextureGetRaster(gpExplosionMediumTex[i]); gpExplosionMediumRaster[i] = RwTextureGetRaster(gpExplosionMediumTex[i]);
} }
for ( int32 i = 0; i < MAX_GUNFLASH_FILES; i++ ) for ( int32 i = 0; i < MAX_GUNFLASH_FILES; i++ )
{ {
gpGunFlashTex[i] = RwTextureRead(GunFlashFiles[i], nil); gpGunFlashTex[i] = RwTextureRead(GunFlashFiles[i], nil);
ASSERT(gpGunFlashTex[i] != nil);
gpGunFlashRaster[i] = RwTextureGetRaster(gpGunFlashTex[i]); gpGunFlashRaster[i] = RwTextureGetRaster(gpGunFlashTex[i]);
} }
gpRainDropTex = RwTextureRead("raindrop4", nil); gpRainDropTex = RwTextureRead("raindrop4", nil);
ASSERT(gpRainDropTex != nil);
gpRainDropRaster = RwTextureGetRaster(gpRainDropTex); gpRainDropRaster = RwTextureGetRaster(gpRainDropTex);
for ( int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ ) for ( int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ )
{ {
gpRainSplashupTex[i] = RwTextureRead(RainSplashupFiles[i], nil); gpRainSplashupTex[i] = RwTextureRead(RainSplashupFiles[i], nil);
ASSERT(gpRainSplashupTex[i] != nil);
gpRainSplashupRaster[i] = RwTextureGetRaster(gpRainSplashupTex[i]); gpRainSplashupRaster[i] = RwTextureGetRaster(gpRainSplashupTex[i]);
} }
for ( int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ ) for ( int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ )
{ {
gpBirdfrontTex[i] = RwTextureRead(BirdfrontFiles[i], nil); gpBirdfrontTex[i] = RwTextureRead(BirdfrontFiles[i], nil);
ASSERT(gpBirdfrontTex[i] != nil);
gpBirdfrontRaster[i] = RwTextureGetRaster(gpBirdfrontTex[i]); gpBirdfrontRaster[i] = RwTextureGetRaster(gpBirdfrontTex[i]);
} }
for ( int32 i = 0; i < MAX_BOAT_FILES; i++ ) for ( int32 i = 0; i < MAX_BOAT_FILES; i++ )
{ {
gpBoatTex[i] = RwTextureRead(BoatFiles[i], nil); gpBoatTex[i] = RwTextureRead(BoatFiles[i], nil);
ASSERT(gpBoatTex[i] != nil);
gpBoatRaster[i] = RwTextureGetRaster(gpBoatTex[i]); gpBoatRaster[i] = RwTextureGetRaster(gpBoatTex[i]);
} }
for ( int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ ) for ( int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ )
{ {
gpCarDebrisTex[i] = RwTextureRead(CardebrisFiles[i], nil); gpCarDebrisTex[i] = RwTextureRead(CardebrisFiles[i], nil);
ASSERT(gpCarDebrisTex[i] != nil);
gpCarDebrisRaster[i] = RwTextureGetRaster(gpCarDebrisTex[i]); gpCarDebrisRaster[i] = RwTextureGetRaster(gpCarDebrisTex[i]);
} }
for ( int32 i = 0; i < MAX_CARSPLASH_FILES; i++ ) for ( int32 i = 0; i < MAX_CARSPLASH_FILES; i++ )
{ {
gpCarSplashTex[i] = RwTextureRead(CarsplashFiles[i], nil); gpCarSplashTex[i] = RwTextureRead(CarsplashFiles[i], nil);
ASSERT(gpCarSplashTex[i] != nil);
gpCarSplashRaster[i] = RwTextureGetRaster(gpCarSplashTex[i]); gpCarSplashRaster[i] = RwTextureGetRaster(gpCarSplashTex[i]);
} }
gpBoatWakeTex = RwTextureRead("boatwake2", nil); gpBoatWakeTex = RwTextureRead("boatwake2", nil);
ASSERT(gpBoatWakeTex != nil);
gpBoatWakeRaster = RwTextureGetRaster(gpBoatWakeTex); gpBoatWakeRaster = RwTextureGetRaster(gpBoatWakeTex);
gpFlame1Tex = RwTextureRead("flame1", nil); gpFlame1Tex = RwTextureRead("flame1", nil);
ASSERT(gpFlame1Tex != nil);
gpFlame1Raster = RwTextureGetRaster(gpFlame1Tex); gpFlame1Raster = RwTextureGetRaster(gpFlame1Tex);
gpFlame5Tex = RwTextureRead("flame5", nil); gpFlame5Tex = RwTextureRead("flame5", nil);
ASSERT(gpFlame5Tex != nil);
#ifdef FIX_BUGS //#ifdef FIX_BUGS
#if 0
gpFlame5Raster = RwTextureGetRaster(gpFlame5Tex); gpFlame5Raster = RwTextureGetRaster(gpFlame5Tex);
#else #else
// this seems to have become more of a design choice // this seems to have become more of a design choice
@ -406,68 +423,91 @@ void CParticle::Initialise()
#endif #endif
gpRainDropSmallTex = RwTextureRead("rainsmall", nil); gpRainDropSmallTex = RwTextureRead("rainsmall", nil);
ASSERT(gpRainDropSmallTex != nil);
gpRainDropSmallRaster = RwTextureGetRaster(gpRainDropSmallTex); gpRainDropSmallRaster = RwTextureGetRaster(gpRainDropSmallTex);
gpBloodTex = RwTextureRead("blood", nil); gpBloodTex = RwTextureRead("blood", nil);
ASSERT(gpBloodTex != nil);
gpBloodRaster = RwTextureGetRaster(gpBloodTex); gpBloodRaster = RwTextureGetRaster(gpBloodTex);
gpLeafTex = RwTextureRead("gameleaf01_64", nil); gpLeafTex = RwTextureRead("gameleaf01_64", nil);
ASSERT(gpLeafTex != nil);
gpLeafRaster = RwTextureGetRaster(gpLeafTex); gpLeafRaster = RwTextureGetRaster(gpLeafTex);
gpLetterTex = RwTextureRead("letter", nil); gpLetterTex = RwTextureRead("letter", nil);
ASSERT(gpLetterTex != nil);
gpLetterRaster = RwTextureGetRaster(gpLetterTex); gpLetterRaster = RwTextureGetRaster(gpLetterTex);
gpCloudTex1 = RwTextureRead("cloud3", nil); gpCloudTex1 = RwTextureRead("cloud3", nil);
ASSERT(gpCloudTex1 != nil);
gpCloudRaster1 = RwTextureGetRaster(gpCloudTex1); gpCloudRaster1 = RwTextureGetRaster(gpCloudTex1);
gpCloudTex4 = RwTextureRead("cloudmasked", nil); gpCloudTex4 = RwTextureRead("cloudmasked", nil);
ASSERT(gpCloudTex4 != nil);
gpCloudRaster4 = RwTextureGetRaster(gpCloudTex4); gpCloudRaster4 = RwTextureGetRaster(gpCloudTex4);
gpBloodSmallTex = RwTextureRead("bloodsplat2", nil); gpBloodSmallTex = RwTextureRead("bloodsplat2", nil);
ASSERT(gpBloodSmallTex != nil);
gpBloodSmallRaster = RwTextureGetRaster(gpBloodSmallTex); gpBloodSmallRaster = RwTextureGetRaster(gpBloodSmallTex);
gpGungeTex = RwTextureRead("gunge", nil); gpGungeTex = RwTextureRead("gunge", nil);
ASSERT(gpGungeTex != nil);
gpGungeRaster = RwTextureGetRaster(gpGungeTex); gpGungeRaster = RwTextureGetRaster(gpGungeTex);
gpCollisionSmokeTex = RwTextureRead("collisionsmoke", nil); gpCollisionSmokeTex = RwTextureRead("collisionsmoke", nil);
ASSERT(gpCollisionSmokeTex != nil);
gpCollisionSmokeRaster = RwTextureGetRaster(gpCollisionSmokeTex); gpCollisionSmokeRaster = RwTextureGetRaster(gpCollisionSmokeTex);
gpBulletHitTex = RwTextureRead("bullethitsmoke", nil); gpBulletHitTex = RwTextureRead("bullethitsmoke", nil);
ASSERT(gpBulletHitTex != nil);
gpBulletHitRaster = RwTextureGetRaster(gpBulletHitTex); gpBulletHitRaster = RwTextureGetRaster(gpBulletHitTex);
gpGunShellTex = RwTextureRead("gunshell", nil); gpGunShellTex = RwTextureRead("gunshell", nil);
ASSERT(gpGunShellTex != nil);
gpGunShellRaster = RwTextureGetRaster(gpGunShellTex); gpGunShellRaster = RwTextureGetRaster(gpGunShellTex);
gpPointlightTex = RwTextureRead("smoke5", nil); gpPointlightTex = RwTextureRead("smoke5", nil);
ASSERT(gpPointlightTex != nil);
gpPointlightRaster = RwTextureGetRaster(gpPointlightTex); gpPointlightRaster = RwTextureGetRaster(gpPointlightTex);
gpSparkTex = RwTextureRead("spark", nil); gpSparkTex = RwTextureRead("spark", nil);
ASSERT(gpSparkTex != nil);
gpSparkRaster = RwTextureGetRaster(gpSparkTex); gpSparkRaster = RwTextureGetRaster(gpSparkTex);
gpNewspaperTex = RwTextureRead("ballot_paper", nil); gpNewspaperTex = RwTextureRead("ballot_paper", nil);
ASSERT(gpNewspaperTex != nil);
gpNewspaperRaster = RwTextureGetRaster(gpNewspaperTex); gpNewspaperRaster = RwTextureGetRaster(gpNewspaperTex);
gpGunSmokeTex = RwTextureRead("gunsmoke3", nil); gpGunSmokeTex = RwTextureRead("gunsmoke3", nil);
ASSERT(gpGunSmokeTex != nil);
gpGunSmokeRaster = RwTextureGetRaster(gpGunSmokeTex); gpGunSmokeRaster = RwTextureGetRaster(gpGunSmokeTex);
gpHeatHazeTex = RwTextureRead("heathaze", nil); gpHeatHazeTex = RwTextureRead("heathaze", nil);
ASSERT(gpHeatHazeTex != nil);
gpHeatHazeRaster = RwTextureGetRaster(gpHeatHazeTex); gpHeatHazeRaster = RwTextureGetRaster(gpHeatHazeTex);
gpBeastieTex = RwTextureRead("beastie", nil); gpBeastieTex = RwTextureRead("beastie", nil);
ASSERT(gpBeastieTex != nil);
gpBeastieRaster = RwTextureGetRaster(gpBeastieTex); gpBeastieRaster = RwTextureGetRaster(gpBeastieTex);
gpRainDripTex[0] = RwTextureRead("raindrip64", nil); gpRainDripTex[0] = RwTextureRead("raindrip64", nil);
ASSERT(gpRainDripTex[0] != nil);
gpRainDripRaster[0] = RwTextureGetRaster(gpRainDripTex[0]); gpRainDripRaster[0] = RwTextureGetRaster(gpRainDripTex[0]);
gpRainDripTex[1] = RwTextureRead("raindripb64", nil); gpRainDripTex[1] = RwTextureRead("raindripb64", nil);
ASSERT(gpRainDripTex[1] != nil);
gpRainDripRaster[1] = RwTextureGetRaster(gpRainDripTex[1]); gpRainDripRaster[1] = RwTextureGetRaster(gpRainDripTex[1]);
gpRainDripDarkTex[0] = RwTextureRead("raindrip64_d", nil); gpRainDripDarkTex[0] = RwTextureRead("raindrip64_d", nil);
ASSERT(gpRainDripDarkTex[0] != nil);
gpRainDripDarkRaster[0] = RwTextureGetRaster(gpRainDripDarkTex[0]); gpRainDripDarkRaster[0] = RwTextureGetRaster(gpRainDripDarkTex[0]);
gpMultiPlayerHitTex = RwTextureRead("mphit", nil); gpMultiPlayerHitTex = RwTextureRead("mphit", nil);
ASSERT(gpMultiPlayerHitTex != nil);
gpMultiPlayerHitRaster = RwTextureGetRaster(gpMultiPlayerHitTex); gpMultiPlayerHitRaster = RwTextureGetRaster(gpMultiPlayerHitTex);
gpFireHoseTex = RwTextureRead("firehose", nil); gpFireHoseTex = RwTextureRead("firehose", nil);
ASSERT(gpFireHoseTex != nil);
gpFireHoseRaster = RwTextureGetRaster(gpFireHoseTex); gpFireHoseRaster = RwTextureGetRaster(gpFireHoseTex);
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();

View file

@ -76,14 +76,14 @@ CShadows::Init(void)
gpShadowBikeTex = RwTextureRead("shad_bike", nil); gpShadowBikeTex = RwTextureRead("shad_bike", nil);
gpShadowBaronTex = RwTextureRead("shad_rcbaron", nil); gpShadowBaronTex = RwTextureRead("shad_rcbaron", nil);
gpShadowExplosionTex = RwTextureRead("shad_exp", nil); gpShadowExplosionTex = RwTextureRead("shad_exp", nil);
gpShadowHeadLightsTex = RwTextureRead("headlight", nil); gpShadowHeadLightsTex = RwTextureRead("headlight_single", nil);
gpOutline1Tex = RwTextureRead("outline_64", nil); gpOutline1Tex = RwTextureRead("outline_64", nil);
gpOutline2Tex = RwTextureRead("outline2_64", nil); gpOutline2Tex = RwTextureRead("outline2_64", nil);
gpOutline3Tex = RwTextureRead("outline3_64", nil); gpOutline3Tex = RwTextureRead("outline3_64", nil);
gpBloodPoolTex = RwTextureRead("bloodpool_64", nil); gpBloodPoolTex = RwTextureRead("bloodpool_64", nil);
gpReflectionTex = RwTextureRead("reflection01", nil); //gpReflectionTex = RwTextureRead("reflection01", nil);
gpWalkDontTex = RwTextureRead("walk_dont", nil); gpWalkDontTex = RwTextureRead("walk_dont", nil);
gpCrackedGlassTex = RwTextureRead("wincrack_32", nil); //gpCrackedGlassTex = RwTextureRead("wincrack_32", nil);
gpPostShadowTex = RwTextureRead("lamp_shad_64", nil); gpPostShadowTex = RwTextureRead("lamp_shad_64", nil);
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();
@ -99,9 +99,9 @@ CShadows::Init(void)
ASSERT(gpOutline2Tex != nil); ASSERT(gpOutline2Tex != nil);
ASSERT(gpOutline3Tex != nil); ASSERT(gpOutline3Tex != nil);
ASSERT(gpBloodPoolTex != nil); ASSERT(gpBloodPoolTex != nil);
ASSERT(gpReflectionTex != nil); //ASSERT(gpReflectionTex != nil);
ASSERT(gpWalkDontTex != nil); ASSERT(gpWalkDontTex != nil);
ASSERT(gpCrackedGlassTex != nil); //ASSERT(gpCrackedGlassTex != nil);
ASSERT(gpPostShadowTex != nil); ASSERT(gpPostShadowTex != nil);
@ -178,9 +178,9 @@ CShadows::Shutdown(void)
ASSERT(gpOutline2Tex != nil); ASSERT(gpOutline2Tex != nil);
ASSERT(gpOutline3Tex != nil); ASSERT(gpOutline3Tex != nil);
ASSERT(gpBloodPoolTex != nil); ASSERT(gpBloodPoolTex != nil);
ASSERT(gpReflectionTex != nil); //ASSERT(gpReflectionTex != nil);
ASSERT(gpWalkDontTex != nil); ASSERT(gpWalkDontTex != nil);
ASSERT(gpCrackedGlassTex != nil); //ASSERT(gpCrackedGlassTex != nil);
ASSERT(gpPostShadowTex != nil); ASSERT(gpPostShadowTex != nil);
RwTextureDestroy(gpShadowCarTex); RwTextureDestroy(gpShadowCarTex);
@ -194,9 +194,9 @@ CShadows::Shutdown(void)
RwTextureDestroy(gpOutline2Tex); RwTextureDestroy(gpOutline2Tex);
RwTextureDestroy(gpOutline3Tex); RwTextureDestroy(gpOutline3Tex);
RwTextureDestroy(gpBloodPoolTex); RwTextureDestroy(gpBloodPoolTex);
RwTextureDestroy(gpReflectionTex); //RwTextureDestroy(gpReflectionTex);
RwTextureDestroy(gpWalkDontTex); RwTextureDestroy(gpWalkDontTex);
RwTextureDestroy(gpCrackedGlassTex); //RwTextureDestroy(gpCrackedGlassTex);
RwTextureDestroy(gpPostShadowTex); RwTextureDestroy(gpPostShadowTex);
} }

2
vendor/librw vendored

@ -1 +1 @@
Subproject commit 78d540fce0ca090b07377cee40d73eadfb7a699d Subproject commit ed9cb45ee9a2749a0a89231bf16f09a5c53bfc92