mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
*********************************************************
* 2006/05/04 * * Madd Mugsy * * Developed in VS 2003 * ********************************************************* - Added tile lighting animation effects to tracer bullets, forced muzzle flash on tracers so enemies can see you, regardless of flash suppression - Re-enabled laptop animation, since Lesh fixed it (I forgot to mention that in my earlier changes :p) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@54 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+111
-116
@@ -1811,15 +1811,14 @@ UINT32 LaptopScreenHandle()
|
|||||||
|
|
||||||
if( gfStartMapScreenToLaptopTransition )
|
if( gfStartMapScreenToLaptopTransition )
|
||||||
{
|
{
|
||||||
// WANNE 2: I disabled the animation of the laptop, because the screen redrawing does not work correct!
|
|
||||||
// Madd: It'd be nice if someone who knows more about graphics than I do could re-enable this, at least for 640x480
|
|
||||||
//Everything is set up to start the transition animation.
|
//Everything is set up to start the transition animation.
|
||||||
//SGPRect SrcRect2, DstRect;
|
//SGPRect SrcRect1;
|
||||||
//INT32 iPercentage, iScalePercentage, iFactor;
|
SGPRect SrcRect2, DstRect;
|
||||||
//UINT32 uiStartTime, uiTimeRange, uiCurrTime;
|
INT32 iPercentage, iScalePercentage, iFactor;
|
||||||
//INT32 iX, iY, iWidth, iHeight;
|
UINT32 uiStartTime, uiTimeRange, uiCurrTime;
|
||||||
|
INT32 iX, iY, iWidth, iHeight;
|
||||||
|
|
||||||
//INT32 iRealPercentage;
|
INT32 iRealPercentage;
|
||||||
|
|
||||||
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
//Step 1: Build the laptop image into the save buffer.
|
//Step 1: Build the laptop image into the save buffer.
|
||||||
@@ -1834,63 +1833,62 @@ UINT32 LaptopScreenHandle()
|
|||||||
PrintNumberOnTeam( );
|
PrintNumberOnTeam( );
|
||||||
ShowLights();
|
ShowLights();
|
||||||
|
|
||||||
//// WANNE 2 <change>
|
//Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
|
||||||
////Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
|
// Start transitioning the screen.
|
||||||
//// Start transitioning the screen.
|
DstRect.iLeft = iScreenWidthOffset; //0
|
||||||
//DstRect.iLeft = iScreenWidthOffset; //0
|
DstRect.iTop = iScreenHeightOffset; //0
|
||||||
//DstRect.iTop = iScreenHeightOffset; //0
|
DstRect.iRight = iScreenWidthOffset + 640; //640
|
||||||
//DstRect.iRight = iScreenWidthOffset + 640; //640
|
DstRect.iBottom = iScreenHeightOffset + 480; //480
|
||||||
//DstRect.iBottom = iScreenHeightOffset + 480; //480
|
uiTimeRange = 1000;
|
||||||
//uiTimeRange = 1000;
|
iPercentage = iRealPercentage = 0;
|
||||||
//iPercentage = iRealPercentage = 0;
|
uiStartTime = GetJA2Clock();
|
||||||
//uiStartTime = GetJA2Clock();
|
|
||||||
|
|
||||||
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
||||||
// 640, 480 );
|
640, 480 );
|
||||||
//BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
|
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
|
||||||
|
|
||||||
//PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
||||||
//
|
|
||||||
//// WANNE 2 with laptop zooming
|
|
||||||
//while( iRealPercentage < 100 )
|
|
||||||
//{
|
|
||||||
// uiCurrTime = GetJA2Clock();
|
|
||||||
// iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
|
|
||||||
// iPercentage = min( iPercentage, 100 );
|
|
||||||
|
|
||||||
// iRealPercentage = iPercentage;
|
// WANNE 2 with laptop zooming
|
||||||
|
while( iRealPercentage < 100 )
|
||||||
|
{
|
||||||
|
uiCurrTime = GetJA2Clock();
|
||||||
|
iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
|
||||||
|
iPercentage = min( iPercentage, 100 );
|
||||||
|
|
||||||
// //Factor the percentage so that it is modified by a gravity falling acceleration effect.
|
iRealPercentage = iPercentage;
|
||||||
// iFactor = (iPercentage - 50) * 2;
|
|
||||||
// if( iPercentage < 50 )
|
|
||||||
// iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
|
|
||||||
// else
|
|
||||||
// iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
|
|
||||||
|
|
||||||
// //Laptop source rect
|
//Factor the percentage so that it is modified by a gravity falling acceleration effect.
|
||||||
// if( iPercentage < 99 )
|
iFactor = (iPercentage - 50) * 2;
|
||||||
// iScalePercentage = 10000 / (100-iPercentage);
|
if( iPercentage < 50 )
|
||||||
// else
|
iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
|
||||||
// iScalePercentage = 5333;
|
else
|
||||||
// iWidth = 12 * iScalePercentage / 100;
|
iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
|
||||||
// iHeight = 9 * iScalePercentage / 100;
|
|
||||||
|
|
||||||
// iX = iScreenWidthOffset + 472 - (472-320) * iScalePercentage / 5333;
|
//Laptop source rect
|
||||||
// iY = iScreenHeightOffset + 424 - (424-240) * iScalePercentage / 5333;
|
if( iPercentage < 99 )
|
||||||
|
iScalePercentage = 10000 / (100-iPercentage);
|
||||||
|
else
|
||||||
|
iScalePercentage = 5333;
|
||||||
|
iWidth = 12 * iScalePercentage / 100;
|
||||||
|
iHeight = 9 * iScalePercentage / 100;
|
||||||
|
|
||||||
// SrcRect2.iLeft = iX - iWidth / 2;
|
iX = 472 - (472 - (iScreenWidthOffset + 320)) * iScalePercentage / 5333;
|
||||||
// SrcRect2.iRight = SrcRect2.iLeft + iWidth;
|
iY = 424 - (424 - (iScreenHeightOffset + 240)) * iScalePercentage / 5333;
|
||||||
// SrcRect2.iTop = iY - iHeight / 2;
|
|
||||||
// SrcRect2.iBottom = SrcRect2.iTop + iHeight;
|
|
||||||
//
|
|
||||||
// BltStretchVideoSurface(FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &DstRect, &SrcRect2 );
|
|
||||||
|
|
||||||
// //WANNE 2
|
SrcRect2.iLeft = iX - iWidth / 2;
|
||||||
// InvalidateScreen();
|
SrcRect2.iRight = SrcRect2.iLeft + iWidth;
|
||||||
//
|
SrcRect2.iTop = iY - iHeight / 2;
|
||||||
// //WANNE 2
|
SrcRect2.iBottom = SrcRect2.iTop + iHeight;
|
||||||
// RefreshScreen( NULL );
|
|
||||||
//}
|
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset, 0, &DstRect, &SrcRect2 );
|
||||||
|
|
||||||
|
//WANNE 2
|
||||||
|
InvalidateScreen();
|
||||||
|
|
||||||
|
//WANNE 2
|
||||||
|
RefreshScreen( NULL );
|
||||||
|
}
|
||||||
|
|
||||||
fReDrawScreenFlag = TRUE;
|
fReDrawScreenFlag = TRUE;
|
||||||
}
|
}
|
||||||
@@ -2445,14 +2443,11 @@ BOOLEAN LeaveLapTopScreen( void )
|
|||||||
|
|
||||||
if( !gfDontStartTransitionFromLaptop )
|
if( !gfDontStartTransitionFromLaptop )
|
||||||
{
|
{
|
||||||
// WANNE 2: I disabled the laptop animation, because the screen redrawing does not work correctly!
|
SGPRect SrcRect1, SrcRect2, DstRect;
|
||||||
// Madd: It'd be nice if someone who knows more about graphics than I do could re-enable this, at least for 640x480
|
INT32 iPercentage, iScalePercentage, iFactor;
|
||||||
|
UINT32 uiStartTime, uiTimeRange, uiCurrTime;
|
||||||
//SGPRect SrcRect1, SrcRect2, DstRect;
|
INT32 iX, iY, iWidth, iHeight;
|
||||||
//INT32 iPercentage, iScalePercentage, iFactor;
|
INT32 iRealPercentage;
|
||||||
//UINT32 uiStartTime, uiTimeRange, uiCurrTime;
|
|
||||||
//INT32 iX, iY, iWidth, iHeight;
|
|
||||||
//INT32 iRealPercentage;
|
|
||||||
|
|
||||||
gfDontStartTransitionFromLaptop = TRUE;
|
gfDontStartTransitionFromLaptop = TRUE;
|
||||||
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
@@ -2467,66 +2462,66 @@ BOOLEAN LeaveLapTopScreen( void )
|
|||||||
PrintNumberOnTeam( );
|
PrintNumberOnTeam( );
|
||||||
ShowLights();
|
ShowLights();
|
||||||
|
|
||||||
////Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
|
//Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
|
||||||
//// Start transitioning the screen.
|
// Start transitioning the screen.
|
||||||
//DstRect.iLeft = iScreenWidthOffset + 0; // 0
|
DstRect.iLeft = iScreenWidthOffset + 0; // 0
|
||||||
//DstRect.iTop = iScreenHeightOffset + 0; // 0
|
DstRect.iTop = iScreenHeightOffset + 0; // 0
|
||||||
//DstRect.iRight = iScreenWidthOffset + 640; // 640
|
DstRect.iRight = iScreenWidthOffset + 640; // 640
|
||||||
//DstRect.iBottom = iScreenHeightOffset + 480; // 480
|
DstRect.iBottom = iScreenHeightOffset + 480; // 480
|
||||||
//uiTimeRange = 1000;
|
uiTimeRange = 1000;
|
||||||
//iPercentage = iRealPercentage = 100;
|
iPercentage = iRealPercentage = 100;
|
||||||
//uiStartTime = GetJA2Clock();
|
uiStartTime = GetJA2Clock();
|
||||||
|
|
||||||
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
||||||
// 640, 480 );
|
640, 480 );
|
||||||
|
|
||||||
//PlayJA2SampleFromFile( "SOUNDS\\Laptop power down (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
PlayJA2SampleFromFile( "SOUNDS\\Laptop power down (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
||||||
|
|
||||||
//// WANNE 2
|
// WANNE 2
|
||||||
//while( iRealPercentage > 0 )
|
while( iRealPercentage > 0 )
|
||||||
//{
|
{
|
||||||
// BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
|
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
|
||||||
|
|
||||||
// uiCurrTime = GetJA2Clock();
|
uiCurrTime = GetJA2Clock();
|
||||||
// iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
|
iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
|
||||||
// iPercentage = min( iPercentage, 100 );
|
iPercentage = min( iPercentage, 100 );
|
||||||
// iPercentage = 100 - iPercentage;
|
iPercentage = 100 - iPercentage;
|
||||||
|
|
||||||
// iRealPercentage = iPercentage;
|
iRealPercentage = iPercentage;
|
||||||
|
|
||||||
// //Factor the percentage so that it is modified by a gravity falling acceleration effect.
|
//Factor the percentage so that it is modified by a gravity falling acceleration effect.
|
||||||
// iFactor = (iPercentage - 50) * 2;
|
iFactor = (iPercentage - 50) * 2;
|
||||||
// if( iPercentage < 50 )
|
if( iPercentage < 50 )
|
||||||
// iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
|
iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
|
||||||
// else
|
else
|
||||||
// iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
|
iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
|
||||||
|
|
||||||
// //Mapscreen source rect
|
//Mapscreen source rect
|
||||||
// SrcRect1.iLeft = iScreenWidthOffset + 464 * iPercentage / 100;
|
SrcRect1.iLeft = iScreenWidthOffset + 464 * iPercentage / 100;
|
||||||
// SrcRect1.iRight = iScreenWidthOffset + 640 - 163 * iPercentage / 100;
|
SrcRect1.iRight = iScreenWidthOffset + 640 - 163 * iPercentage / 100;
|
||||||
// SrcRect1.iTop = iScreenHeightOffset + 417 * iPercentage / 100;
|
SrcRect1.iTop = iScreenHeightOffset + 417 * iPercentage / 100;
|
||||||
// SrcRect1.iBottom = iScreenHeightOffset + 480 - 55 * iPercentage / 100;
|
SrcRect1.iBottom = iScreenHeightOffset + 480 - 55 * iPercentage / 100;
|
||||||
// //Laptop source rect
|
//Laptop source rect
|
||||||
// if( iPercentage < 99 )
|
if( iPercentage < 99 )
|
||||||
// iScalePercentage = 10000 / (100-iPercentage);
|
iScalePercentage = 10000 / (100-iPercentage);
|
||||||
// else
|
else
|
||||||
// iScalePercentage = 5333;
|
iScalePercentage = 5333;
|
||||||
// iWidth = 12 * iScalePercentage / 100;
|
iWidth = 12 * iScalePercentage / 100;
|
||||||
// iHeight = 9 * iScalePercentage / 100;
|
iHeight = 9 * iScalePercentage / 100;
|
||||||
// iX = iScreenWidthOffset + 472 - (472-320) * iScalePercentage / 5333;
|
iX = 472 - (472 - (iScreenWidthOffset + 320)) * iScalePercentage / 5333;
|
||||||
// iY = iScreenHeightOffset + 424 - (424-240) * iScalePercentage / 5333;
|
iY = 424 - (424 - (iScreenHeightOffset + 240)) * iScalePercentage / 5333;
|
||||||
|
|
||||||
// SrcRect2.iLeft = iX - iWidth / 2;
|
SrcRect2.iLeft = iX - iWidth / 2;
|
||||||
// SrcRect2.iRight = SrcRect2.iLeft + iWidth;
|
SrcRect2.iRight = SrcRect2.iLeft + iWidth;
|
||||||
// SrcRect2.iTop = iY - iHeight / 2;
|
SrcRect2.iTop = iY - iHeight / 2;
|
||||||
// SrcRect2.iBottom = SrcRect2.iTop + iHeight;
|
SrcRect2.iBottom = SrcRect2.iTop + iHeight;
|
||||||
|
|
||||||
// BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &DstRect, &SrcRect2 );
|
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, iScreenWidthOffset, iScreenHeightOffset, &DstRect, &SrcRect2 );
|
||||||
|
|
||||||
// InvalidateScreen();
|
InvalidateScreen();
|
||||||
// //gfPrintFrameBuffer = TRUE;
|
//gfPrintFrameBuffer = TRUE;
|
||||||
// RefreshScreen( NULL );
|
RefreshScreen( NULL );
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -4519,8 +4514,8 @@ BOOLEAN DisplayTitleBarMaximizeGraphic(BOOLEAN fForward, BOOLEAN fInit, UINT16 u
|
|||||||
|
|
||||||
sPosBottomY = LAPTOP_TITLE_BAR_HEIGHT;
|
sPosBottomY = LAPTOP_TITLE_BAR_HEIGHT;
|
||||||
|
|
||||||
SrcRect.iLeft = iScreenWidthOffset;
|
SrcRect.iLeft = 0;
|
||||||
SrcRect.iTop = iScreenHeightOffset;
|
SrcRect.iTop = 0;
|
||||||
SrcRect.iRight = LAPTOP_TITLE_BAR_WIDTH;
|
SrcRect.iRight = LAPTOP_TITLE_BAR_WIDTH;
|
||||||
SrcRect.iBottom = LAPTOP_TITLE_BAR_HEIGHT;
|
SrcRect.iBottom = LAPTOP_TITLE_BAR_HEIGHT;
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ typedef struct
|
|||||||
ANITILE *pShadowAniTile;
|
ANITILE *pShadowAniTile;
|
||||||
UINT8 ubItemStatus;
|
UINT8 ubItemStatus;
|
||||||
UINT16 fromItem;
|
UINT16 fromItem;
|
||||||
|
INT32 flash;
|
||||||
} BULLET;
|
} BULLET;
|
||||||
|
|
||||||
extern UINT32 guiNumBullets;
|
extern UINT32 guiNumBullets;
|
||||||
|
|||||||
+5
-1
@@ -6637,10 +6637,14 @@ BOOLEAN IsRemoteDetonatorAttached( OBJECTTYPE * pObj )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj )
|
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj, SOLDIERTYPE * pSoldier )
|
||||||
{
|
{
|
||||||
INT8 bLoop;
|
INT8 bLoop;
|
||||||
|
|
||||||
|
//Madd: tracers automatically negate any muzzle flash suppression due to inherent lighting effects
|
||||||
|
if (Item[pObj->usItem].usItemClass == IC_GUN && AmmoTypes[pObj->ubGunAmmoType].tracerEffect && pSoldier->bDoBurst )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (Item[pObj->usItem].hidemuzzleflash )
|
if (Item[pObj->usItem].hidemuzzleflash )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -245,7 +245,7 @@ INT8 FindNonSmokeLaunchable( SOLDIERTYPE * pSoldier, UINT16 usWeapon );
|
|||||||
INT8 FindNonSmokeLaunchableAttachment( OBJECTTYPE * pObj, UINT16 usWeapon );
|
INT8 FindNonSmokeLaunchableAttachment( OBJECTTYPE * pObj, UINT16 usWeapon );
|
||||||
UINT16 PickARandomLaunchable(UINT16 itemIndex);
|
UINT16 PickARandomLaunchable(UINT16 itemIndex);
|
||||||
|
|
||||||
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj );
|
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj, SOLDIERTYPE * pSoldier );
|
||||||
INT16 GetFlashSuppressorStatus( OBJECTTYPE * pObj );
|
INT16 GetFlashSuppressorStatus( OBJECTTYPE * pObj );
|
||||||
BOOLEAN IsRemoteDetonator( OBJECTTYPE * pObj );
|
BOOLEAN IsRemoteDetonator( OBJECTTYPE * pObj );
|
||||||
BOOLEAN IsDetonator( OBJECTTYPE * pObj );
|
BOOLEAN IsDetonator( OBJECTTYPE * pObj );
|
||||||
|
|||||||
+1
-1
@@ -198,7 +198,7 @@ void ResetRain()
|
|||||||
|
|
||||||
void GenerateRainDropsList()
|
void GenerateRainDropsList()
|
||||||
{
|
{
|
||||||
guiCurrMaxAmountOfRainDrops = (UINT32)BASE_MAXIMUM_DROPS * gbCurrentRainIntensity;
|
guiCurrMaxAmountOfRainDrops = (UINT32)(BASE_MAXIMUM_DROPS) * gbCurrentRainIntensity;
|
||||||
|
|
||||||
pRainDrops = (TRainDrop *)MemAlloc( sizeof( TRainDrop ) * guiCurrMaxAmountOfRainDrops );
|
pRainDrops = (TRainDrop *)MemAlloc( sizeof( TRainDrop ) * guiCurrMaxAmountOfRainDrops );
|
||||||
memset( pRainDrops, 0, sizeof( TRainDrop ) * guiCurrMaxAmountOfRainDrops );
|
memset( pRainDrops, 0, sizeof( TRainDrop ) * guiCurrMaxAmountOfRainDrops );
|
||||||
|
|||||||
@@ -2796,7 +2796,7 @@ void EVENT_FireSoldierWeapon( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo )
|
|||||||
// break;
|
// break;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if ( IsFlashSuppressor (&pSoldier->inv[ pSoldier->ubAttackingHand ] ) )
|
if ( IsFlashSuppressor (&pSoldier->inv[ pSoldier->ubAttackingHand ], pSoldier ) )
|
||||||
pSoldier->fMuzzleFlash = FALSE;
|
pSoldier->fMuzzleFlash = FALSE;
|
||||||
else
|
else
|
||||||
pSoldier->fMuzzleFlash = TRUE;
|
pSoldier->fMuzzleFlash = TRUE;
|
||||||
|
|||||||
@@ -1737,7 +1737,7 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT16 sTargetGridNo )
|
|||||||
fBuckshot = FALSE;
|
fBuckshot = FALSE;
|
||||||
if (!CREATURE_OR_BLOODCAT( pSoldier ) )
|
if (!CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||||
{
|
{
|
||||||
if ( IsFlashSuppressor(&pSoldier->inv[ pSoldier->ubAttackingHand ]) )
|
if ( IsFlashSuppressor(&pSoldier->inv[ pSoldier->ubAttackingHand ], pSoldier ) )
|
||||||
pSoldier->fMuzzleFlash = FALSE;
|
pSoldier->fMuzzleFlash = FALSE;
|
||||||
else
|
else
|
||||||
pSoldier->fMuzzleFlash = TRUE;
|
pSoldier->fMuzzleFlash = TRUE;
|
||||||
|
|||||||
@@ -409,9 +409,11 @@ void AddMissileTrail( BULLET *pBullet, FIXEDPT qCurrX, FIXEDPT qCurrY, FIXEDPT q
|
|||||||
else if ( pBullet->usFlags & ( BULLET_FLAG_TRACER ) )
|
else if ( pBullet->usFlags & ( BULLET_FLAG_TRACER ) )
|
||||||
{
|
{
|
||||||
strcpy( AniParams.zCachedFile, "TILECACHE\\BULLET_TRACER.STI" );
|
strcpy( AniParams.zCachedFile, "TILECACHE\\BULLET_TRACER.STI" );
|
||||||
|
AniParams.uiFlags |= ANITILE_LIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateAnimationTile( &AniParams );
|
CreateAnimationTile( &AniParams );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,24 @@ ANITILE *CreateAnimationTile( ANITILE_PARAMS *pAniParams )
|
|||||||
|
|
||||||
pNewAniNode->pLevelNode = pNode;
|
pNewAniNode->pLevelNode = pNode;
|
||||||
|
|
||||||
|
if ( uiFlags & ANITILE_LIGHT )
|
||||||
|
{
|
||||||
|
if ( ubAmbientLightLevel >= MIN_AMB_LEVEL_FOR_MERC_LIGHTS )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( ( pNewAniNode->lightSprite=LightSpriteCreate("L-R03.LHT", 0 ) )!=(-1))
|
||||||
|
{
|
||||||
|
LightSpritePower(pNewAniNode->lightSprite, TRUE);
|
||||||
|
{
|
||||||
|
INT16 sXPos, sYPos;
|
||||||
|
|
||||||
|
ConvertGridNoToCenterCellXY( sGridNo, &sXPos, &sYPos );
|
||||||
|
LightSpritePosition( pNewAniNode->lightSprite, (INT16)(sXPos/CELL_X_SIZE), (INT16)(sYPos/CELL_Y_SIZE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( ( uiFlags & ANITILE_CACHEDTILE ) )
|
if ( ( uiFlags & ANITILE_CACHEDTILE ) )
|
||||||
{
|
{
|
||||||
pNewAniNode->pLevelNode->uiFlags |= ( LEVELNODE_CACHEDANITILE );
|
pNewAniNode->pLevelNode->uiFlags |= ( LEVELNODE_CACHEDANITILE );
|
||||||
@@ -363,6 +381,10 @@ void DeleteAniTile( ANITILE *pAniTile )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if ( pAniNode->uiFlags & ANITILE_LIGHT )
|
||||||
|
{
|
||||||
|
LightSpriteDestroy(pAniNode->lightSprite);
|
||||||
|
}
|
||||||
|
|
||||||
if ( ( pAniNode->uiFlags & ANITILE_CACHEDTILE ) )
|
if ( ( pAniNode->uiFlags & ANITILE_CACHEDTILE ) )
|
||||||
{
|
{
|
||||||
@@ -592,6 +614,11 @@ void UpdateAniTiles( )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//if ( pNode->uiFlags & ANITILE_LIGHT )
|
||||||
|
//{
|
||||||
|
// LightSpriteDestroy(pNode->lightSprite);
|
||||||
|
//}
|
||||||
|
|
||||||
// Delete from world!
|
// Delete from world!
|
||||||
DeleteAniTile( pNode );
|
DeleteAniTile( pNode );
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#define ANITILE_EXPLOSION 0x20000000
|
#define ANITILE_EXPLOSION 0x20000000
|
||||||
#define ANITILE_RELEASE_ATTACKER_WHEN_DONE 0x40000000
|
#define ANITILE_RELEASE_ATTACKER_WHEN_DONE 0x40000000
|
||||||
#define ANITILE_USE_4DIRECTION_FOR_START_FRAME 0x02000000
|
#define ANITILE_USE_4DIRECTION_FOR_START_FRAME 0x02000000
|
||||||
|
#define ANITILE_LIGHT 0x80000000
|
||||||
|
|
||||||
|
|
||||||
#define ANI_LAND_LEVEL 1
|
#define ANI_LAND_LEVEL 1
|
||||||
@@ -71,7 +72,7 @@ typedef struct TAG_anitile
|
|||||||
UINT32 uiUserData3;
|
UINT32 uiUserData3;
|
||||||
|
|
||||||
INT8 bFrameCountAfterStart;
|
INT8 bFrameCountAfterStart;
|
||||||
|
INT32 lightSprite;
|
||||||
} ANITILE;
|
} ANITILE;
|
||||||
|
|
||||||
|
|
||||||
@@ -100,7 +101,7 @@ typedef struct TAG_anitile_params
|
|||||||
UINT32 uiUserData;
|
UINT32 uiUserData;
|
||||||
UINT8 ubUserData2;
|
UINT8 ubUserData2;
|
||||||
UINT32 uiUserData3;
|
UINT32 uiUserData3;
|
||||||
|
INT32 lightSprite;
|
||||||
} ANITILE_PARAMS;
|
} ANITILE_PARAMS;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user