Added Headrock's HAM 2.8

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2650 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-04-01 12:20:30 +00:00
parent 5f9261273a
commit 335747c3ff
48 changed files with 3439 additions and 406 deletions
+76 -34
View File
@@ -16,6 +16,8 @@
#include "overhead.h"
#include "Cursor Control.h"
#include "Sound Control.h"
// HEADROCK HAM B2.6: included this here to allow toggling the CTH bars.
#include "GameSettings.h"
#endif
//aim
@@ -1244,10 +1246,11 @@ extern UINT16 gsCurMouseWidth;*/
void DrawMouseGraphics( )
{
// HEADROCK (HAM): Made several changes here to allow multi-shot CtH display for bursts.
UINT16 * ptrBuf;
UINT32 uiPitch;
UINT32 cnt;
UINT32 actualPct = __min(gbCtH,99);
UINT32 cnt, i;
UINT32 actualPct = __min(gbCtH[0],99);
UINT16 usCBorderTop = Get16BPPColor( FROMRGB( 155, 155, 155 ) );
UINT16 usCBorderBottom = Get16BPPColor( FROMRGB( 120, 120, 120 ) );
UINT16 usCBar = Get16BPPColor( FROMRGB( 255, 255-255*actualPct/99, 0 ) );
@@ -1255,40 +1258,67 @@ void DrawMouseGraphics( )
UINT16 usCBar2 = Get16BPPColor( FROMRGB( 180, 140-140*actualPct/99, 0 ) );
UINT16 usCBack2 = Get16BPPColor( FROMRGB( 110, 100-100*actualPct/99, 0 ) );
UINT32 barLength = __min(35,gsCurMouseWidth);
UINT32 barY = gsCurMouseOffsetY-__min(35,gsCurMouseHeight)/2;
//UINT32 barY = gsCurMouseOffsetY-__min(35,gsCurMouseHeight)/2;
UINT32 barY;
if(gfUICtHBar)
{
ptrBuf = (UINT16 *) LockMouseBuffer( &uiPitch );
uiPitch >>= 1;
// HEADROCK HAM B1/2/2.6:
// This causes the function to display two CTH bars for autofire - the CTH of the first bullet,
// and the CTH of the last bullet in the volley, stored in gbCtH[0] and [1] respectively.
if ( gbCtHAutoFire && (gGameExternalOptions.iNewCTHBars == 1 || gGameExternalOptions.iNewCTHBars == 3) )
gbCtHBurstCount = 2;
else if ( gbCtHAutoFire )
gbCtHBurstCount = 0;
for(cnt = gsCurMouseOffsetX+barLength/2;cnt > gsCurMouseOffsetX-barLength/2+1;cnt--)
// Sets the initial offsets of the bars. Burst and Autofire will display them higher above the
// cursor, to avoid obscuring the target or other data.
if (gbCtHBurstCount > 1 && !gbCtHAutoFire && (gGameExternalOptions.iNewCTHBars == 1 || gGameExternalOptions.iNewCTHBars == 2) )
barY = gsCurMouseOffsetY-__min(55,gsCurMouseHeight)/2;
else if (gbCtHBurstCount && gbCtHAutoFire && (gGameExternalOptions.iNewCTHBars == 1 || gGameExternalOptions.iNewCTHBars == 3) )
barY = gsCurMouseOffsetY-__min(55,gsCurMouseHeight)/2;
else
barY = gsCurMouseOffsetY-__min(35,gsCurMouseHeight)/2;
for (i=0; i<gbCtHBurstCount; i++)
{
ptrBuf[cnt-1 + uiPitch*(3+barY)] = usCBorderBottom;
ptrBuf[cnt-1 + uiPitch*barY] = usCBorderTop;
actualPct = __min(gbCtH[ i ],99);
ptrBuf = (UINT16 *) LockMouseBuffer( &uiPitch );
uiPitch >>= 1;
for(cnt = gsCurMouseOffsetX+barLength/2;cnt > gsCurMouseOffsetX-barLength/2+1;cnt--)
{
ptrBuf[cnt-1 + uiPitch*(3+barY)] = usCBorderBottom;
ptrBuf[cnt-1 + uiPitch*barY] = usCBorderTop;
}
ptrBuf[gsCurMouseOffsetX+barLength/2 + uiPitch*(1+barY)] = usCBorderBottom;
ptrBuf[gsCurMouseOffsetX-barLength/2 + uiPitch*(1+barY)] = usCBorderTop;
ptrBuf[gsCurMouseOffsetX+barLength/2 + uiPitch*(2+barY)] = usCBorderBottom;
ptrBuf[gsCurMouseOffsetX-barLength/2 + uiPitch*(2+barY)] = usCBorderTop;
for(cnt = 0;cnt < (barLength-2)*actualPct/99;cnt++)
{
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+2)] = usCBar2;
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+1)] = usCBar;
}
for(cnt = (barLength-2)*actualPct/99;cnt < (barLength-2);cnt++)
{
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+2)] = usCBack2;
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+1)] = usCBack;
}
UnlockMouseBuffer();
if (gbCtHBurstCount>1)
barY = barY+5;
}
ptrBuf[gsCurMouseOffsetX+barLength/2 + uiPitch*(1+barY)] = usCBorderBottom;
ptrBuf[gsCurMouseOffsetX-barLength/2 + uiPitch*(1+barY)] = usCBorderTop;
ptrBuf[gsCurMouseOffsetX+barLength/2 + uiPitch*(2+barY)] = usCBorderBottom;
ptrBuf[gsCurMouseOffsetX-barLength/2 + uiPitch*(2+barY)] = usCBorderTop;
for(cnt = 0;cnt < (barLength-2)*actualPct/99;cnt++)
{
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+2)] = usCBar2;
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+1)] = usCBar;
}
for(cnt = (barLength-2)*actualPct/99;cnt < (barLength-2);cnt++)
{
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+2)] = usCBack2;
ptrBuf[cnt + gsCurMouseOffsetX-barLength/2+1 + uiPitch*(barY+1)] = usCBack;
}
UnlockMouseBuffer();
barY = gsCurMouseOffsetY-__min(35,gsCurMouseHeight)/2;
}
}
@@ -1346,11 +1376,23 @@ void DrawMouseText( )
swprintf( pStr, L"%d", gsBulletCount );
FindFontCenterCoordinates( 0, 0, gsCurMouseWidth, gsCurMouseHeight, pStr, TINYFONT1, &sX, &sY );
mprintf( sX, sY - 10 - GetFontHeight(TINYFONT1), pStr );
// HEADROCK HAM B2: Moved bullet counter to right side (and a bit upwards) to accomodate two CTH bars.
//mprintf( sX, sY - 10 - GetFontHeight(TINYFONT1), pStr );
if (gGameExternalOptions.iNewCTHBars == 1 || gGameExternalOptions.iNewCTHBars == 3)
// New CTH Bar moves bullet count to new location.
mprintf( 46, sY - 15 - GetFontHeight(TINYFONT1), pStr );
else
// Vanilla 1.13
mprintf( sX, sY - 10 - GetFontHeight(TINYFONT1), pStr );
swprintf( pStr, L"%d", gsTotalBulletCount );
FindFontCenterCoordinates( 0, 0, gsCurMouseWidth, gsCurMouseHeight, pStr, TINYFONT1, &sX, &sY );
mprintf( sX, sY + 7 + GetFontHeight(TINYFONT1), pStr );
// HEADROCK HAM B2: Removed this. The bottom line will now display bodypart targetting, like Burst and
// Single.
if ( gGameExternalOptions.iNewCTHBars != 1 && gGameExternalOptions.iNewCTHBars != 3 )
{
swprintf( pStr, L"%d", gsTotalBulletCount );
FindFontCenterCoordinates( 0, 0, gsCurMouseWidth, gsCurMouseHeight, pStr, TINYFONT1, &sX, &sY );
mprintf( sX, sY + 7 + GetFontHeight(TINYFONT1), pStr );
}
// reset
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
+2
View File
@@ -1653,6 +1653,8 @@ extern STR16 New113Message[];
extern STR16 New113MERCMercMailTexts[];
extern STR16 MissingIMPSkillsDescriptions[];
// HEADROCK: HAM Messages
extern STR16 New113HAMMessage[];
enum
{
MSG113_STORM_STARTED,
+9 -3
View File
@@ -5091,9 +5091,10 @@ STR16 sRepairsDoneString[] =
L"%s修复了自己的物品。",
L"%s修复了所有人的枪和护甲。",
L"%s修复了所有人的装备。",
L"%s修复了所有人的携带物品。",
L"%s修复了所有人的携带物品。",
L"%s修复了所有人的携带物品。",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -5406,6 +5407,11 @@ STR16 New113Message[] =
L"你得检查一下你的眼部装备",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ?characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4243,9 +4243,10 @@ STR16 sRepairsDoneString[] =
L"%s is klaar met reparatie van eigen items",
L"%s is klaar met reparatie van ieders wapens en bepantering",
L"%s is klaar met reparatie van ieders uitrusting",
L"%s is klaar met reparatie van ieders vervoerde items",
L"%s is klaar met reparatie van ieders vervoerde items",
L"%s is klaar met reparatie van ieders vervoerde items",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4474,6 +4475,11 @@ STR16 New113Message[] =
L"You should check your goggles",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+10 -3
View File
@@ -4250,14 +4250,16 @@ STR16 gzCreditNameFunny[]=
L"(did items and loading screens too!)", // Joey \"Joeker\" Whelan",
};
// HEADROCK: Adjusted strings for better feedback, and added new string for LBE repair.
STR16 sRepairsDoneString[] =
{
L"%s finished repairing own items",
L"%s finished repairing everyone's guns & armor",
L"%s finished repairing everyone's equipped items",
L"%s finished repairing everyone's carried items",
L"%s finished repairing everyone's carried items",
L"%s finished repairing everyone's carried items",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4486,6 +4488,11 @@ STR16 New113Message[] =
L"You should check your goggles",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4256,9 +4256,10 @@ STR16 sRepairsDoneString[] =
L"%s a terminé la réparation de ses objets",
L"%s a terminé la réparation des armes & protections",
L"%s a terminé la réparation des objets portés",
L"%s a terminé la réparation des objets transportés",
L"%s a terminé la réparation des objets transportés",
L"%s a terminé la réparation des objets transportés",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4487,6 +4488,11 @@ STR16 New113Message[] =
L"Vous devriez vérifier votre accessoire de vision",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4058,9 +4058,10 @@ STR16 sRepairsDoneString[] =
L"%s hat seine eigenen Gegenstände repariert",
L"%s hat die Waffen und Rüstungen aller Teammitglieder repariert",
L"%s hat die aktivierten Gegenstände aller Teammitglieder repariert",
L"%s hat die mitgeführten Gegenstände aller Teammitglieder repariert",
L"%s hat die mitgeführten Gegenstände aller Teammitglieder repariert",
L"%s hat die mitgeführten Gegenstände aller Teammitglieder repariert",
L"%s hat die großen mitgeführten Gegenstände aller Teammitglieder repariert",
L"%s hat die mittelgroßen mitgeführten Gegenstände aller Teammitglieder repariert",
L"%s hat die kleinen mitgeführten Gegenstände aller Teammitglieder repariert",
L"%s hat die LBE-Gegenstände aller Teammitglieder repariert",
};
STR16 zGioDifConfirmText[]=
@@ -4282,6 +4283,11 @@ STR16 New113Message[] =
L"Sie sollten Ihre Brillen prüfen",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4235,9 +4235,10 @@ STR16 sRepairsDoneString[] =
L"%s ha finito di riparare gli oggetti",
L"%s ha finito di riparare le armi e i giubbotti antiproiettile di tutti",
L"%s ha finito di riparare gli oggetti dell'equipaggiamento di tutti",
L"%s ha finito di riparare gli oggetti trasportati di tutti",
L"%s ha finito di riparare gli oggetti trasportati di tutti",
L"%s ha finito di riparare gli oggetti trasportati di tutti",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4472,6 +4473,11 @@ STR16 New113Message[] =
L"You should check your goggles",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4248,9 +4248,10 @@ STR16 sRepairsDoneString[] =
L"%s skoñczy³(a) naprawiaæ w³asne wyposa¿enie",
L"%s skoñczy³(a) naprawiaæ broñ i ochraniacze wszystkich cz³onków oddzia³u",
L"%s skoñczy³(a) naprawiaæ wyposa¿enie wszystkich cz³onków oddzia³u",
L"%s skończył(a) naprawiać ekwipunek wszystkich członków oddziału",
L"%s zakończył(a) naprawę ekwipunku oddziału",
L"%s zakończył(a) naprawę ekwipunku oddziału",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4479,6 +4480,11 @@ STR16 New113Message[] =
L"SprawdŸ swoje gogle",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4250,9 +4250,10 @@ STR16 sRepairsDoneString[] =
L"%s: çàâåðøåí ðåìîíò ëè÷íûõ âåùåé.",
L"%s: çàâåðøåí ðåìîíò âñåãî îðóæèÿ è áðîíè.",
L"%s: çàâåðøåí ðåìîíò âñåé ýêèïèðîâêè îòðÿäà.",
L"%s: ηΰβεπψεν πεμξνς βρευ βεωει, θμεώωθυρ σ ξςπδΰ.",
L"%s: ηΰβεπψεν πεμξνς βρευ βεωει, θμεώωθυρ σ ξςπδΰ.",
L"%s: ηΰβεπψεν πεμξνς βρευ βεωει, θμεώωθυρ σ ξςπδΰ.",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4482,6 +4483,11 @@ STR16 New113Message[] =
L"Ïðîâåðü ÷òî ñîëäàòó ìåøàåò ëó÷øå âèäåòü.", //You should check your goggles
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =
+9 -3
View File
@@ -4255,9 +4255,10 @@ STR16 sRepairsDoneString[] =
L"%s finished repairing own items",
L"%s finished repairing everyone's guns & armor",
L"%s finished repairing everyone's equipped items",
L"%s finished repairing everyone's carried items",
L"%s finished repairing everyone's carried items",
L"%s finished repairing everyone's carried items",
L"%s finished repairing everyone's large carried items",
L"%s finished repairing everyone's medium carried items",
L"%s finished repairing everyone's small carried items",
L"%s finished repairing everyone's LBE gear",
};
STR16 zGioDifConfirmText[]=
@@ -4486,6 +4487,11 @@ STR16 New113Message[] =
L"You should check your goggles",
};
STR16 New113HAMMessage[] =
{
L"%s cowers in fear!",
};
// WANNE: This are the email texts, when one of the 4 new 1.13 MERC mercs have levelled up, that Speck sends
// INFO: Do not replace the ± characters. They indicate the <B2> (-> Newline) from the edt files
STR16 New113MERCMercMailTexts[] =