diff --git a/Tactical/Weapons.h b/Tactical/Weapons.h index 4080969ca..22cf34db5 100644 --- a/Tactical/Weapons.h +++ b/Tactical/Weapons.h @@ -299,7 +299,7 @@ typedef struct UINT8 ubVolatility; // maximum chance of accidental explosion UINT8 ubAnimationID; // Animation enum to use UINT32 uiIndex; - UINT8 ubDuration; + int ubDuration; UINT8 ubStartRadius; } EXPLOSIVETYPE; diff --git a/Tactical/XML_Explosive.cpp b/Tactical/XML_Explosive.cpp index 8aba8a19e..25a95134a 100644 --- a/Tactical/XML_Explosive.cpp +++ b/Tactical/XML_Explosive.cpp @@ -187,7 +187,7 @@ explosiveEndElementHandle(void *userData, const char *name) else if(strcmp(name, "ubDuration") == 0) { pData->curElement = ELEMENT; - pData->curExplosive.ubDuration = (UINT8) atol(pData->szCharData); + pData->curExplosive.ubDuration = (int) atol(pData->szCharData); } pData->maxReadDepth--; diff --git a/TileEngine/LightEffects.cpp b/TileEngine/LightEffects.cpp index 62ee07785..d7c5de7da 100644 --- a/TileEngine/LightEffects.cpp +++ b/TileEngine/LightEffects.cpp @@ -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; INT32 iLightIndex; diff --git a/TileEngine/LightEffects.h b/TileEngine/LightEffects.h index bc752adcc..62a68e30d 100644 --- a/TileEngine/LightEffects.h +++ b/TileEngine/LightEffects.h @@ -15,9 +15,9 @@ typedef struct { 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 - INT8 bAge; // the number of turns light has been around + int bAge; // the number of turns light has been around BOOLEAN fAllocated; INT32 iLight; UINT32 uiTimeOfLastUpdate; @@ -35,7 +35,7 @@ void AddLightEffectToTile( INT8 bType, 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 ); diff --git a/TileEngine/SmokeEffects.cpp b/TileEngine/SmokeEffects.cpp index 1253fe540..96577432c 100644 --- a/TileEngine/SmokeEffects.cpp +++ b/TileEngine/SmokeEffects.cpp @@ -166,8 +166,6 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner ) SMOKEEFFECT *pSmoke; INT32 iSmokeIndex; INT8 bSmokeEffectType=0; - UINT8 ubDuration=0; - UINT8 ubStartRadius=0; if( ( iSmokeIndex = GetFreeSmokeEffect() )==(-1) ) return(-1); @@ -193,28 +191,20 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner ) case EXPLOSV_MUSTGAS: bSmokeEffectType = MUSTARDGAS_SMOKE_EFFECT; - ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration; - ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius; break; case EXPLOSV_BURNABLEGAS: bSmokeEffectType = BURNABLEGAS_SMOKE_EFFECT; - ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration; - ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius; break; case EXPLOSV_TEARGAS: bSmokeEffectType = TEARGAS_SMOKE_EFFECT; - ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration; - ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius; break; case EXPLOSV_SMOKE: bSmokeEffectType = NORMAL_SMOKE_EFFECT; - ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration; - ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius; break; // case SMALL_CREATURE_GAS: @@ -225,8 +215,6 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner ) case EXPLOSV_CREATUREGAS: bSmokeEffectType = CREATURE_SMOKE_EFFECT; - ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration; - ubStartRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius; break; // case VERY_SMALL_CREATURE_GAS: @@ -239,8 +227,8 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner ) - pSmoke->ubDuration = ubDuration; - pSmoke->ubRadius = ubStartRadius; + pSmoke->ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration; + pSmoke->ubRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius; pSmoke->bAge = 0; pSmoke->fAllocated = TRUE; pSmoke->bType = bSmokeEffectType; diff --git a/TileEngine/SmokeEffects.h b/TileEngine/SmokeEffects.h index d2ddd5e22..ce7944f45 100644 --- a/TileEngine/SmokeEffects.h +++ b/TileEngine/SmokeEffects.h @@ -22,10 +22,10 @@ typedef struct TAG_SMOKE_EFFECT { 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 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; INT8 bType; UINT16 usItem; diff --git a/TileEngine/TileEngine.vcproj b/TileEngine/TileEngine.vcproj index 3b7017a73..57aa7bfb9 100644 --- a/TileEngine/TileEngine.vcproj +++ b/TileEngine/TileEngine.vcproj @@ -3033,6 +3033,9 @@ + + @@ -3069,6 +3072,9 @@ + +