New Feature: Drug System Overhaul. The drug system has been completely overhauled.

Requires GameDir >= r2257.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=341541&#msg_341541

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7896 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-06-28 17:47:25 +00:00
parent ceea35b0e9
commit 4d9140da57
61 changed files with 1667 additions and 871 deletions
+18 -3
View File
@@ -492,23 +492,38 @@ void AssignBackgroundHelpText( UINT16 ubNumber, MOUSE_REGION* pMouseregion )
}
}
UINT8 strused = 0;
for ( UINT8 i = 0; i < BG_MAX; ++i)
{
if ( BG_DISLIKEBG == i && zBackground[ubNumber].value[i] )
{
swprintf( atStr, szBackgroundText_Value[i] );
swprintf( atStr, szBackgroundText_Value[strused] );
wcscat( apStr, atStr );
}
else if ( BG_TRACKER_ABILITY == i && zBackground[ubNumber].value[i] )
{
swprintf( atStr, szBackgroundText_Value[i], (UINT16)((gSkillTraitValues.usSVTrackerMaxRange * zBackground[ubNumber].value[i]) / 100) );
swprintf( atStr, szBackgroundText_Value[strused], (UINT16)((gSkillTraitValues.usSVTrackerMaxRange * zBackground[ubNumber].value[i]) / 100) );
wcscat( apStr, atStr );
}
else if ( BG_SMOKERTYPE == i )
{
if ( zBackground[ubNumber].value[i] == 1 )
swprintf( atStr, szBackgroundText_Value[strused] );
else
swprintf( atStr, szBackgroundText_Value[strused + 1] );
wcscat( apStr, atStr );
// smoke has 2 texts, so extra increase of counter is needed
++strused;
}
else if ( zBackground[ ubNumber ].value[i] )
{
swprintf(atStr, szBackgroundText_Value[ i ], zBackground[ ubNumber ].value[i] > 0 ? L"+" : L"", zBackground[ ubNumber ].value[i] );
swprintf( atStr, szBackgroundText_Value[strused], zBackground[ubNumber].value[i] > 0 ? L"+" : L"", zBackground[ubNumber].value[i] );
wcscat( apStr, atStr );
}
++strused;
}
}
else
+21
View File
@@ -826,6 +826,27 @@ BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB )
usPosY += DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
}
// smoker
INT16 smokerA = GetBackgroundValue( usProfileA, BG_SMOKERTYPE );
INT16 smokerB = GetBackgroundValue( usProfileB, BG_SMOKERTYPE );
if ( smokerA && smokerB )
{
if ( smokerA != smokerB )
val = -2;
else
val = 1;
swprintf( sText, smokerA == 1 ? szBackgroundText_Value[BG_SMOKERTYPE] : szBackgroundText_Value[BG_SMOKERTYPE + 1] );
DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
swprintf( sText, L"%d", val );
DisplayWrappedString( usPosX + MCA_NUMBEROFFSET, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
swprintf( sText, smokerB == 1 ? szBackgroundText_Value[BG_SMOKERTYPE] : szBackgroundText_Value[BG_SMOKERTYPE + 1] );
DisplayWrappedString( usPosX + MCA_SIDEOFFSET, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
swprintf( sText, L"%d", val );
usPosY += DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
}
// after this, the lines are no longer synchronous - we just list each property on its own side
usPosY2 = usPosY;