- New feature: zombies can now spawn from corpses, if you specify that option in the preferences screen (by Flugente)

o if set to off, no zombies will spawn. This can also be changed in mid-game
o for more information on how this works and how to set it up, see http://www.bears-pit.com/board/ubbthreads.php/topics/295746/Zombies_WH40K_and_more.html#Post295746
o with the tag <PoisonPercentage>, you can now poison guns or ammo. This is the percentage of damage dealt that will be poisonous (see zombie thread for an explanation)
o The zombie option can only be enabled in a single player game

o AI fix: to prevent the endless clock problem, the AI now ends the turn if the same actor calls the decision routine over 100 times in a single turn.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-05-29 22:49:17 +00:00
parent 744ce2ee9c
commit c90f4bce47
73 changed files with 4481 additions and 609 deletions
+83 -18
View File
@@ -24,22 +24,30 @@
#endif
#define LIFE_BAR_SHADOW FROMRGB( 108, 12, 12 )
#define LIFE_BAR FROMRGB( 200, 0, 0 )
#define LIFE_BAR FROMRGB( 200, 0, 0 )
#define BANDAGE_BAR_SHADOW FROMRGB( 156, 60, 60 )
#define BANDAGE_BAR FROMRGB( 222, 132, 132 )
#define BANDAGE_BAR FROMRGB( 222, 132, 132 )
#define BLEEDING_BAR_SHADOW FROMRGB( 128, 128, 60 )
#define BLEEDING_BAR FROMRGB( 240, 240, 20 )
#define CURR_BREATH_BAR_SHADOW FROMRGB( 8, 12, 118 ) // the MAX max breatth, always at 100%
#define CURR_BREATH_BAR FROMRGB( 8, 12, 160 )
#define CURR_MAX_BREATH FROMRGB( 0, 0, 0 ) // the current max breath, black
#define CURR_MAX_BREATH_SHADOW FROMRGB( 0, 0, 0 )
#define MORALE_BAR_SHADOW FROMRGB( 8, 112, 12 )
#define MORALE_BAR FROMRGB( 8, 180, 12 )
#define BREATH_BAR_SHADOW FROMRGB( 60, 108, 108 ) // the lt blue current breath
#define BREATH_BAR FROMRGB( 113, 178, 218 )
#define BLEEDING_BAR FROMRGB( 240, 240, 20 )
#define POISON_LIFE_BAR_SHADOW FROMRGB( 12, 108, 12 )
#define POISON_LIFE_BAR FROMRGB( 0, 200, 0 )
#define POISON_BANDAGE_BAR_SHADOW FROMRGB( 80, 186, 80 )
#define POISON_BANDAGE_BAR FROMRGB( 152, 252, 152 )
#define POISON_BLEEDING_BAR_SHADOW FROMRGB( 128, 60, 128 )
#define POISON_BLEEDING_BAR FROMRGB( 240, 20, 240 )
#define CURR_BREATH_BAR_SHADOW FROMRGB( 8, 12, 118 ) // the MAX max breatth, always at 100%
#define CURR_BREATH_BAR FROMRGB( 8, 12, 160 )
#define CURR_MAX_BREATH FROMRGB( 0, 0, 0 ) // the current max breath, black
#define CURR_MAX_BREATH_SHADOW FROMRGB( 0, 0, 0 )
#define MORALE_BAR_SHADOW FROMRGB( 8, 112, 12 )
#define MORALE_BAR FROMRGB( 8, 180, 12 )
#define BREATH_BAR_SHADOW FROMRGB( 60, 108, 108 ) // the lt blue current breath
#define BREATH_BAR FROMRGB( 113, 178, 218 )
#define BREATH_BAR_SHAD_BACK FROMRGB( 1,1,1 )
#define FACE_WIDTH 48
#define FACE_HEIGHT 43
#define FACE_WIDTH 48
#define FACE_HEIGHT 43
// backgrounds for breath max background
@@ -162,12 +170,15 @@ void DrawLifeUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWi
pDestBuf = LockVideoSurface( uiBuffer, &uiDestPitchBYTES );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
dStart = sYPos;
dEnd = 0;
// FIRST DO MAX LIFE
dPercentage = (FLOAT)pSoldier->stats.bLife / (FLOAT)100;
FLOAT dstart1 = dStart - dEnd;
dStart = (FLOAT)( dStart - dEnd );
dEnd = dPercentage * sHeight;
dStart = sYPos;
usLineColor = Get16BPPColor( LIFE_BAR_SHADOW );
RectangleDraw( TRUE, sXPos, (INT32)dStart, sXPos, (INT32)( dStart - dEnd ) , usLineColor, pDestBuf );
@@ -177,15 +188,33 @@ void DrawLifeUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWi
usLineColor = Get16BPPColor( LIFE_BAR_SHADOW );
RectangleDraw( TRUE, sXPos+ 2, (INT32)dStart, sXPos + 2, (INT32)( dStart - dEnd ), usLineColor, pDestBuf );
// NOW DO BANDAGE
// poisoned life first
if ( pSoldier->bPoisonLife )
{
dPercentage = (FLOAT)pSoldier->bPoisonLife / (FLOAT)100;
FLOAT dpoisonStart = (FLOAT)( dstart1 );
FLOAT dpoisonEnd = dPercentage * sHeight;
usLineColor = Get16BPPColor( POISON_LIFE_BAR_SHADOW );
RectangleDraw( TRUE, sXPos, (INT32)dpoisonStart, sXPos, (INT32)( dpoisonStart - dpoisonEnd ) , usLineColor, pDestBuf );
usLineColor = Get16BPPColor( POISON_LIFE_BAR );
RectangleDraw( TRUE, sXPos+ 1, (INT32)dpoisonStart, sXPos + 1, (INT32)( dpoisonStart - dpoisonEnd ), usLineColor, pDestBuf );
usLineColor = Get16BPPColor( POISON_LIFE_BAR_SHADOW );
RectangleDraw( TRUE, sXPos+ 2, (INT32)dpoisonStart, sXPos + 2, (INT32)( dpoisonStart - dpoisonEnd ), usLineColor, pDestBuf );
}
// NOW DO BANDAGE
// Calculate bandage
FLOAT dstart2 = dStart - dEnd;
bBandage = pSoldier->stats.bLifeMax - pSoldier->stats.bLife - pSoldier->bBleeding;
if ( bBandage )
{
dPercentage = (FLOAT)bBandage / (FLOAT)100;
dStart = (FLOAT)( sYPos - dEnd );
dStart = (FLOAT)( dStart - dEnd );
dEnd = ( dPercentage * sHeight );
usLineColor = Get16BPPColor( BANDAGE_BAR_SHADOW );
@@ -198,7 +227,26 @@ void DrawLifeUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWi
RectangleDraw( TRUE, sXPos+ 2, (INT32)dStart, sXPos + 2, (INT32)( dStart - dEnd ), usLineColor, pDestBuf );
}
// get amount of poisoned bandage
INT8 bPoisonBandage = pSoldier->bPoisonSum - pSoldier->bPoisonBleeding - pSoldier->bPoisonLife;
if ( bPoisonBandage )
{
dPercentage = (FLOAT)bPoisonBandage / (FLOAT)100;
FLOAT dpoisonStart = (FLOAT)( dstart2 );
FLOAT dpoisonEnd = dPercentage * sHeight;
usLineColor = Get16BPPColor( POISON_BANDAGE_BAR_SHADOW );
RectangleDraw( TRUE, sXPos, (INT32)dpoisonStart, sXPos, (INT32)( dpoisonStart - dpoisonEnd ) , usLineColor, pDestBuf );
usLineColor = Get16BPPColor( POISON_BANDAGE_BAR );
RectangleDraw( TRUE, sXPos+ 1, (INT32)dpoisonStart, sXPos + 1, (INT32)( dpoisonStart - dpoisonEnd ), usLineColor, pDestBuf );
usLineColor = Get16BPPColor( POISON_BANDAGE_BAR_SHADOW );
RectangleDraw( TRUE, sXPos+ 2, (INT32)dpoisonStart, sXPos + 2, (INT32)( dpoisonStart - dpoisonEnd ), usLineColor, pDestBuf );
}
// NOW DO BLEEDING
FLOAT dstart3 = dStart - dEnd;
if ( pSoldier->bBleeding )
{
dPercentage = (FLOAT)pSoldier->bBleeding / (FLOAT)100;
@@ -215,6 +263,23 @@ void DrawLifeUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWi
RectangleDraw( TRUE, sXPos+ 2, (INT32)dStart, sXPos + 2, (INT32)( dStart - dEnd ), usLineColor, pDestBuf );
}
// poisoned bleeding
if ( pSoldier->bPoisonBleeding )
{
dPercentage = (FLOAT)pSoldier->bPoisonBleeding / (FLOAT)100;
FLOAT dpoisonStart = (FLOAT)( dstart3 );
FLOAT dpoisonEnd = dPercentage * sHeight;
usLineColor = Get16BPPColor( POISON_BLEEDING_BAR_SHADOW );
RectangleDraw( TRUE, sXPos, (INT32)dpoisonStart, sXPos, (INT32)( dpoisonStart - dpoisonEnd ) , usLineColor, pDestBuf );
usLineColor = Get16BPPColor( POISON_BLEEDING_BAR );
RectangleDraw( TRUE, sXPos+ 1, (INT32)dpoisonStart, sXPos + 1, (INT32)( dpoisonStart - dpoisonEnd ), usLineColor, pDestBuf );
usLineColor = Get16BPPColor( POISON_BLEEDING_BAR_SHADOW );
RectangleDraw( TRUE, sXPos+ 2, (INT32)dpoisonStart, sXPos + 2, (INT32)( dpoisonStart - dpoisonEnd ), usLineColor, pDestBuf );
}
UnLockVideoSurface( uiBuffer );
}