- added SmokeEffects.h and LightEffects.h to TileEngine.vcproj

- increased the INT8 & UINT8 bAge/ubDuration variables in SmokeEffects.cpp and LightEffects.cpp to a good old "int".

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@192 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-06-08 00:54:14 +00:00
parent 21bc685f8d
commit 454a0575d8
7 changed files with 16 additions and 22 deletions
+1 -1
View File
@@ -299,7 +299,7 @@ typedef struct
UINT8 ubVolatility; // maximum chance of accidental explosion UINT8 ubVolatility; // maximum chance of accidental explosion
UINT8 ubAnimationID; // Animation enum to use UINT8 ubAnimationID; // Animation enum to use
UINT32 uiIndex; UINT32 uiIndex;
UINT8 ubDuration; int ubDuration;
UINT8 ubStartRadius; UINT8 ubStartRadius;
} EXPLOSIVETYPE; } EXPLOSIVETYPE;
+1 -1
View File
@@ -187,7 +187,7 @@ explosiveEndElementHandle(void *userData, const char *name)
else if(strcmp(name, "ubDuration") == 0) else if(strcmp(name, "ubDuration") == 0)
{ {
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
pData->curExplosive.ubDuration = (UINT8) atol(pData->szCharData); pData->curExplosive.ubDuration = (int) atol(pData->szCharData);
} }
pData->maxReadDepth--; pData->maxReadDepth--;
+1 -1
View File
@@ -96,7 +96,7 @@ void UpdateLightingSprite( LIGHTEFFECT *pLight )
} }
INT32 NewLightEffect( INT16 sGridNo, UINT8 ubDuration, UINT8 ubStartRadius ) INT32 NewLightEffect( INT16 sGridNo, int ubDuration, UINT8 ubStartRadius )
{ {
LIGHTEFFECT *pLight; LIGHTEFFECT *pLight;
INT32 iLightIndex; INT32 iLightIndex;
+3 -3
View File
@@ -15,9 +15,9 @@ typedef struct
{ {
INT16 sGridNo; // gridno at which the tear gas cloud is centered INT16 sGridNo; // gridno at which the tear gas cloud is centered
UINT8 ubDuration; // the number of turns will remain effective int ubDuration; // the number of turns will remain effective
UINT8 bRadius; // the current radius UINT8 bRadius; // the current radius
INT8 bAge; // the number of turns light has been around int bAge; // the number of turns light has been around
BOOLEAN fAllocated; BOOLEAN fAllocated;
INT32 iLight; INT32 iLight;
UINT32 uiTimeOfLastUpdate; UINT32 uiTimeOfLastUpdate;
@@ -35,7 +35,7 @@ void AddLightEffectToTile( INT8 bType, INT16 sGridNo );
void RemoveLightEffectFromTile( INT16 sGridNo ); void RemoveLightEffectFromTile( INT16 sGridNo );
INT32 NewLightEffect( INT16 sGridNo, UINT8 ubDuration, UINT8 ubStartRadius ); INT32 NewLightEffect( INT16 sGridNo, int ubDuration, UINT8 ubStartRadius );
BOOLEAN SaveLightEffectsToSaveGameFile( HWFILE hFile ); BOOLEAN SaveLightEffectsToSaveGameFile( HWFILE hFile );
+2 -14
View File
@@ -166,8 +166,6 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner )
SMOKEEFFECT *pSmoke; SMOKEEFFECT *pSmoke;
INT32 iSmokeIndex; INT32 iSmokeIndex;
INT8 bSmokeEffectType=0; INT8 bSmokeEffectType=0;
UINT8 ubDuration=0;
UINT8 ubStartRadius=0;
if( ( iSmokeIndex = GetFreeSmokeEffect() )==(-1) ) if( ( iSmokeIndex = GetFreeSmokeEffect() )==(-1) )
return(-1); return(-1);
@@ -193,28 +191,20 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner )
case EXPLOSV_MUSTGAS: case EXPLOSV_MUSTGAS:
bSmokeEffectType = MUSTARDGAS_SMOKE_EFFECT; bSmokeEffectType = MUSTARDGAS_SMOKE_EFFECT;
ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
break; break;
case EXPLOSV_BURNABLEGAS: case EXPLOSV_BURNABLEGAS:
bSmokeEffectType = BURNABLEGAS_SMOKE_EFFECT; bSmokeEffectType = BURNABLEGAS_SMOKE_EFFECT;
ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
break; break;
case EXPLOSV_TEARGAS: case EXPLOSV_TEARGAS:
bSmokeEffectType = TEARGAS_SMOKE_EFFECT; bSmokeEffectType = TEARGAS_SMOKE_EFFECT;
ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
break; break;
case EXPLOSV_SMOKE: case EXPLOSV_SMOKE:
bSmokeEffectType = NORMAL_SMOKE_EFFECT; bSmokeEffectType = NORMAL_SMOKE_EFFECT;
ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
break; break;
// case SMALL_CREATURE_GAS: // case SMALL_CREATURE_GAS:
@@ -225,8 +215,6 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner )
case EXPLOSV_CREATUREGAS: case EXPLOSV_CREATUREGAS:
bSmokeEffectType = CREATURE_SMOKE_EFFECT; bSmokeEffectType = CREATURE_SMOKE_EFFECT;
ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
break; break;
// case VERY_SMALL_CREATURE_GAS: // case VERY_SMALL_CREATURE_GAS:
@@ -239,8 +227,8 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner )
pSmoke->ubDuration = ubDuration; pSmoke->ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
pSmoke->ubRadius = ubStartRadius; pSmoke->ubRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
pSmoke->bAge = 0; pSmoke->bAge = 0;
pSmoke->fAllocated = TRUE; pSmoke->fAllocated = TRUE;
pSmoke->bType = bSmokeEffectType; pSmoke->bType = bSmokeEffectType;
+2 -2
View File
@@ -22,10 +22,10 @@ typedef struct TAG_SMOKE_EFFECT
{ {
INT16 sGridNo; // gridno at which the tear gas cloud is centered INT16 sGridNo; // gridno at which the tear gas cloud is centered
UINT8 ubDuration; // the number of turns gas will remain effective int ubDuration; // the number of turns gas will remain effective
UINT8 ubRadius; // the current radius of the cloud in map tiles UINT8 ubRadius; // the current radius of the cloud in map tiles
UINT8 bFlags; // 0 - outdoors (fast spread), 1 - indoors (slow) UINT8 bFlags; // 0 - outdoors (fast spread), 1 - indoors (slow)
INT8 bAge; // the number of turns gas has been around int bAge; // the number of turns gas has been around
BOOLEAN fAllocated; BOOLEAN fAllocated;
INT8 bType; INT8 bType;
UINT16 usItem; UINT16 usItem;
+6
View File
@@ -3033,6 +3033,9 @@
<File <File
RelativePath="Isometric Utils.h"> RelativePath="Isometric Utils.h">
</File> </File>
<File
RelativePath=".\LightEffects.h">
</File>
<File <File
RelativePath="lighting.h"> RelativePath="lighting.h">
</File> </File>
@@ -3069,6 +3072,9 @@
<File <File
RelativePath="Smell.h"> RelativePath="Smell.h">
</File> </File>
<File
RelativePath=".\SmokeEffects.h">
</File>
<File <File
RelativePath="Structure Internals.h"> RelativePath="Structure Internals.h">
</File> </File>