mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fixes to reduce the number of compile warnings. Still many more to fix
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1535 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -884,7 +884,7 @@ BOOLEAN DequeAllGameEvents( BOOLEAN fExecute )
|
|||||||
BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute )
|
BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute )
|
||||||
{
|
{
|
||||||
EVENT *pEvent;
|
EVENT *pEvent;
|
||||||
BOOLEAN fCompleteLoop = FALSE;
|
//BOOLEAN fCompleteLoop = FALSE;
|
||||||
|
|
||||||
// Dequeue all events on the demand queue (only)
|
// Dequeue all events on the demand queue (only)
|
||||||
|
|
||||||
@@ -977,7 +977,7 @@ BOOLEAN ExecuteGameEvent( EVENT *pEvent )
|
|||||||
|
|
||||||
// Call soldier function
|
// Call soldier function
|
||||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "Event Pump: Change Dest");
|
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "Event Pump: Change Dest");
|
||||||
EVENT_SetSoldierDestination( pSoldier, SChangeDest.usNewDestination );
|
EVENT_SetSoldierDestination( pSoldier, (UINT8) SChangeDest.usNewDestination );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S_SETPOSITION:
|
case S_SETPOSITION:
|
||||||
@@ -1113,7 +1113,7 @@ BOOLEAN ExecuteGameEvent( EVENT *pEvent )
|
|||||||
|
|
||||||
// Call soldier function
|
// Call soldier function
|
||||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Event Pump: SetDesiredDirection: Dir( %d )", SSetDesiredDirection.usDesiredDirection) );
|
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Event Pump: SetDesiredDirection: Dir( %d )", SSetDesiredDirection.usDesiredDirection) );
|
||||||
EVENT_SetSoldierDesiredDirection( pSoldier, SSetDesiredDirection.usDesiredDirection );
|
EVENT_SetSoldierDesiredDirection( pSoldier, (UINT8) SSetDesiredDirection.usDesiredDirection );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ HVSURFACE ghvSurface;
|
|||||||
|
|
||||||
extern BOOLEAN gfOverheadMapDirty;
|
extern BOOLEAN gfOverheadMapDirty;
|
||||||
|
|
||||||
extern int iOffsetHorizontal;
|
extern UINT16 iOffsetHorizontal;
|
||||||
extern int iOffsetVertical;
|
extern UINT16 iOffsetVertical;
|
||||||
|
|
||||||
// Utililty file for sub-sampling/creating our radar screen maps
|
// Utililty file for sub-sampling/creating our radar screen maps
|
||||||
// Loops though our maps directory and reads all .map files, subsamples an area, color
|
// Loops though our maps directory and reads all .map files, subsamples an area, color
|
||||||
|
|||||||
@@ -416,11 +416,11 @@ BOOLEAN StartMusicBasedOnMode( )
|
|||||||
{
|
{
|
||||||
fFirstTime = FALSE;
|
fFirstTime = FALSE;
|
||||||
|
|
||||||
bNothingModeSong = NOTHING_A_MUSIC + (INT8)Random( 4 );
|
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random( 4 ));
|
||||||
|
|
||||||
bEnemyModeSong = TENSOR_A_MUSIC + (INT8)Random( 3 );
|
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random( 3 ));
|
||||||
|
|
||||||
bBattleModeSong = BATTLE_A_MUSIC + (INT8)Random( 2 );
|
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random( 2 ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ BOOLEAN StartMusicBasedOnMode( )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
MusicPlay( bNothingModeSong );
|
MusicPlay( bNothingModeSong );
|
||||||
bNothingModeSong = NOTHING_A_MUSIC + (INT8)Random( 4 );
|
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random( 4 ) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -465,7 +465,7 @@ BOOLEAN StartMusicBasedOnMode( )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
MusicPlay( bEnemyModeSong );
|
MusicPlay( bEnemyModeSong );
|
||||||
bEnemyModeSong = TENSOR_A_MUSIC + (INT8)Random( 3 );
|
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random( 3 ));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ BOOLEAN StartMusicBasedOnMode( )
|
|||||||
{
|
{
|
||||||
MusicPlay( bBattleModeSong );
|
MusicPlay( bBattleModeSong );
|
||||||
}
|
}
|
||||||
bBattleModeSong = BATTLE_A_MUSIC + (INT8)Random( 2 );
|
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random( 2 ));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUSIC_TACTICAL_VICTORY:
|
case MUSIC_TACTICAL_VICTORY:
|
||||||
|
|||||||
+3
-3
@@ -155,9 +155,9 @@ INT32 AddSlider( UINT8 ubStyle, UINT16 usCursor, UINT16 usPosX, UINT16 usPosY, U
|
|||||||
{
|
{
|
||||||
SLIDER *pTemp = NULL;
|
SLIDER *pTemp = NULL;
|
||||||
SLIDER *pNewSlider = NULL;
|
SLIDER *pNewSlider = NULL;
|
||||||
INT32 iNewID=0;
|
//INT32 iNewID=0;
|
||||||
UINT32 cnt=0;
|
//UINT32 cnt=0;
|
||||||
UINT16 usIncrementWidth=0;
|
//UINT16 usIncrementWidth=0;
|
||||||
|
|
||||||
AssertMsg( gfSliderInited, "Trying to Add a Slider Bar when the Slider System was never inited");
|
AssertMsg( gfSliderInited, "Trying to Add a Slider Bar when the Slider System was never inited");
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -680,7 +680,7 @@ INT32 SoundDir( INT16 sGridNo )
|
|||||||
|
|
||||||
sDif = sMiddleX - sScreenX;
|
sDif = sMiddleX - sScreenX;
|
||||||
|
|
||||||
if ( ( sAbsDif = abs( sDif ) ) > 64 )
|
if ( ( sAbsDif = (INT16) abs( sDif ) ) > 64 )
|
||||||
{
|
{
|
||||||
// OK, NOT the middle.
|
// OK, NOT the middle.
|
||||||
// Is it outside the screen?
|
// Is it outside the screen?
|
||||||
@@ -735,8 +735,8 @@ INT32 SoundVolume( INT8 bInitialVolume, INT16 sGridNo )
|
|||||||
sDifX = sMiddleX - sScreenX;
|
sDifX = sMiddleX - sScreenX;
|
||||||
sDifY = sMiddleY - sScreenY;
|
sDifY = sMiddleY - sScreenY;
|
||||||
|
|
||||||
sAbsDifX = abs( sDifX );
|
sAbsDifX = (INT16) abs( sDifX );
|
||||||
sAbsDifY = abs( sDifY );
|
sAbsDifY = (INT16) abs( sDifY );
|
||||||
|
|
||||||
if ( sAbsDifX > 64 || sAbsDifY > 64 )
|
if ( sAbsDifX > 64 || sAbsDifY > 64 )
|
||||||
{
|
{
|
||||||
@@ -968,7 +968,7 @@ void SetPositionSndsInActive( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// == Lesh slightly changed this function ============
|
// == Lesh slightly changed this function ============
|
||||||
INT32 PositionSoundDir( INT16 sGridNo )
|
UINT8 PositionSoundDir( INT16 sGridNo )
|
||||||
{
|
{
|
||||||
INT16 sWorldX, sWorldY;
|
INT16 sWorldX, sWorldY;
|
||||||
INT16 sScreenX, sScreenY;
|
INT16 sScreenX, sScreenY;
|
||||||
@@ -991,7 +991,7 @@ INT32 PositionSoundDir( INT16 sGridNo )
|
|||||||
|
|
||||||
sDif = sMiddleX - sScreenX;
|
sDif = sMiddleX - sScreenX;
|
||||||
|
|
||||||
if ( ( sAbsDif = abs( sDif ) ) > 64 )
|
if ( ( sAbsDif = (INT16) abs( sDif ) ) > 64 )
|
||||||
{
|
{
|
||||||
// OK, NOT the middle.
|
// OK, NOT the middle.
|
||||||
|
|
||||||
@@ -1022,7 +1022,7 @@ INT32 PositionSoundDir( INT16 sGridNo )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT32 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo )
|
INT8 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo )
|
||||||
{
|
{
|
||||||
INT16 sWorldX, sWorldY;
|
INT16 sWorldX, sWorldY;
|
||||||
INT16 sScreenX, sScreenY;
|
INT16 sScreenX, sScreenY;
|
||||||
@@ -1050,8 +1050,8 @@ INT32 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo )
|
|||||||
sDifX = sMiddleX - sScreenX;
|
sDifX = sMiddleX - sScreenX;
|
||||||
sDifY = sMiddleY - sScreenY;
|
sDifY = sMiddleY - sScreenY;
|
||||||
|
|
||||||
sAbsDifX = abs( sDifX );
|
sAbsDifX = (INT16) abs( sDifX );
|
||||||
sAbsDifY = abs( sDifY );
|
sAbsDifY = (INT16) abs( sDifY );
|
||||||
|
|
||||||
sMaxDistX = (INT16)( ( gsBottomRightWorldX - gsTopLeftWorldX ) * 1.5 );
|
sMaxDistX = (INT16)( ( gsBottomRightWorldX - gsTopLeftWorldX ) * 1.5 );
|
||||||
sMaxDistY = (INT16)( ( gsBottomRightWorldY - gsTopLeftWorldY ) * 1.5 );
|
sMaxDistY = (INT16)( ( gsBottomRightWorldY - gsTopLeftWorldY ) * 1.5 );
|
||||||
@@ -1078,7 +1078,8 @@ void SetPositionSndsVolumeAndPanning( )
|
|||||||
{
|
{
|
||||||
UINT32 cnt;
|
UINT32 cnt;
|
||||||
POSITIONSND *pPositionSnd;
|
POSITIONSND *pPositionSnd;
|
||||||
INT8 bVolume, bPan;
|
INT8 bVolume;
|
||||||
|
UINT8 ubPan;
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
|
|
||||||
for ( cnt = 0; cnt < guiNumPositionSnds; cnt++ )
|
for ( cnt = 0; cnt < guiNumPositionSnds; cnt++ )
|
||||||
@@ -1119,9 +1120,9 @@ void SetPositionSndsVolumeAndPanning( )
|
|||||||
|
|
||||||
SoundSetVolume( pPositionSnd->iSoundSampleID, bVolume );
|
SoundSetVolume( pPositionSnd->iSoundSampleID, bVolume );
|
||||||
|
|
||||||
bPan = PositionSoundDir( pPositionSnd->sGridNo );
|
ubPan = PositionSoundDir( pPositionSnd->sGridNo );
|
||||||
|
|
||||||
SoundSetPan( pPositionSnd->iSoundSampleID, bPan );
|
SoundSetPan( pPositionSnd->iSoundSampleID, ubPan );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -499,9 +499,8 @@ BOOLEAN HandleJA2CDCheckTwo( )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+33
-33
@@ -73,7 +73,7 @@ WRAPPED_STRING *LineWrapForSingleCharWords(UINT32 ulFont, UINT16 usLineWidthPixe
|
|||||||
//Get the next char
|
//Get the next char
|
||||||
OneChar[0] = TempString[ usCurIndex ];
|
OneChar[0] = TempString[ usCurIndex ];
|
||||||
|
|
||||||
usCurrentWidthPixels += WFStringPixLength( OneChar, ulFont);
|
usCurrentWidthPixels = usCurrentWidthPixels + WFStringPixLength( OneChar, ulFont);
|
||||||
|
|
||||||
//If we are at the end of the string
|
//If we are at the end of the string
|
||||||
if(TempString[ usCurIndex ] == 0)
|
if(TempString[ usCurIndex ] == 0)
|
||||||
@@ -152,7 +152,7 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin
|
|||||||
va_list argptr;
|
va_list argptr;
|
||||||
BOOLEAN fDone = FALSE;
|
BOOLEAN fDone = FALSE;
|
||||||
UINT16 usCurrentWidthPixels=0;
|
UINT16 usCurrentWidthPixels=0;
|
||||||
UINT16 usCurrentLineWidthPixels=0;
|
//UINT16 usCurrentLineWidthPixels=0;
|
||||||
CHAR16 OneChar[2];
|
CHAR16 OneChar[2];
|
||||||
BOOLEAN fNewLine=FALSE;
|
BOOLEAN fNewLine=FALSE;
|
||||||
BOOLEAN fTheStringIsToLong=FALSE;
|
BOOLEAN fTheStringIsToLong=FALSE;
|
||||||
@@ -201,7 +201,7 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin
|
|||||||
}
|
}
|
||||||
OneChar[0] = TempString[ usCurIndex ];
|
OneChar[0] = TempString[ usCurIndex ];
|
||||||
|
|
||||||
usCurrentWidthPixels += WFStringPixLength( OneChar, ulFont);
|
usCurrentWidthPixels = usCurrentWidthPixels + WFStringPixLength( OneChar, ulFont);
|
||||||
|
|
||||||
//If we are at the end of the string
|
//If we are at the end of the string
|
||||||
if(TempString[ usCurIndex ] == 0)
|
if(TempString[ usCurIndex ] == 0)
|
||||||
@@ -242,7 +242,7 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin
|
|||||||
{
|
{
|
||||||
OneChar[0] = DestString[ usDestIndex ];
|
OneChar[0] = DestString[ usDestIndex ];
|
||||||
|
|
||||||
usCurrentWidthPixels -= WFStringPixLength( OneChar, ulFont);
|
usCurrentWidthPixels = usCurrentWidthPixels - WFStringPixLength( OneChar, ulFont);
|
||||||
|
|
||||||
usCurIndex--;
|
usCurIndex--;
|
||||||
usDestIndex--;
|
usDestIndex--;
|
||||||
@@ -712,10 +712,10 @@ UINT16 IanDisplayWrappedString(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UIN
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -756,10 +756,10 @@ UINT16 IanDisplayWrappedString(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UIN
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -825,10 +825,10 @@ DEF: commented out for Beta. Nov 30
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -865,10 +865,10 @@ DEF: commented out for Beta. Nov 30
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -910,7 +910,7 @@ DEF: commented out for Beta. Nov 30
|
|||||||
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
|
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
|
||||||
|
|
||||||
// calc new pixel length for the line
|
// calc new pixel length for the line
|
||||||
usLineLengthPixels += usWordLengthPixels;
|
usLineLengthPixels = usLineLengthPixels + usWordLengthPixels;
|
||||||
|
|
||||||
// reset dest char counter
|
// reset dest char counter
|
||||||
usDestCounter = 0;
|
usDestCounter = 0;
|
||||||
@@ -1099,7 +1099,7 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
|
|||||||
UINT16 usJustification = LEFT_JUSTIFIED,usLocalPosX=usPosX;
|
UINT16 usJustification = LEFT_JUSTIFIED,usLocalPosX=usPosX;
|
||||||
UINT8 ubLocalColor = ubColor;
|
UINT8 ubLocalColor = ubColor;
|
||||||
BOOLEAN fBoldOn=FALSE;
|
BOOLEAN fBoldOn=FALSE;
|
||||||
UINT32 iTotalHeight =0;
|
//UINT32 iTotalHeight =0;
|
||||||
CHAR16 zLineString[640] = L"",zWordString[640]= L"";
|
CHAR16 zLineString[640] = L"",zWordString[640]= L"";
|
||||||
|
|
||||||
usHeight = WFGetFontHeight(uiFont);
|
usHeight = WFGetFontHeight(uiFont);
|
||||||
@@ -1227,10 +1227,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1257,10 +1257,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1299,10 +1299,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1326,10 +1326,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1371,7 +1371,7 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
|
|||||||
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
|
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
|
||||||
|
|
||||||
// calc new pixel length for the line
|
// calc new pixel length for the line
|
||||||
usLineLengthPixels += usWordLengthPixels;
|
usLineLengthPixels = usLineLengthPixels + usWordLengthPixels;
|
||||||
|
|
||||||
// reset dest char counter
|
// reset dest char counter
|
||||||
usDestCounter = 0;
|
usDestCounter = 0;
|
||||||
@@ -1438,7 +1438,7 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
|
|||||||
UINT16 usJustification = LEFT_JUSTIFIED,usLocalPosX=usPosX;
|
UINT16 usJustification = LEFT_JUSTIFIED,usLocalPosX=usPosX;
|
||||||
UINT8 ubLocalColor = ubColor;
|
UINT8 ubLocalColor = ubColor;
|
||||||
BOOLEAN fBoldOn=FALSE;
|
BOOLEAN fBoldOn=FALSE;
|
||||||
UINT32 iTotalHeight =0;
|
//UINT32 iTotalHeight =0;
|
||||||
CHAR16 zLineString[640] = L"",zWordString[640]= L"";
|
CHAR16 zLineString[640] = L"",zWordString[640]= L"";
|
||||||
|
|
||||||
usHeight = WFGetFontHeight(uiFont);
|
usHeight = WFGetFontHeight(uiFont);
|
||||||
@@ -1552,10 +1552,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
|
|||||||
// calc length of what we just wrote
|
// calc length of what we just wrote
|
||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1578,10 +1578,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1614,10 +1614,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1638,10 +1638,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
|
|||||||
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont);
|
||||||
|
|
||||||
// calculate new x position for next time
|
// calculate new x position for next time
|
||||||
usLocalPosX += usPhraseLengthPixels;
|
usLocalPosX = usLocalPosX + usPhraseLengthPixels;
|
||||||
|
|
||||||
// shorten width for next time
|
// shorten width for next time
|
||||||
usLocalWidth -= usLineLengthPixels;
|
usLocalWidth = usLocalWidth - usLineLengthPixels;
|
||||||
|
|
||||||
// erase line string
|
// erase line string
|
||||||
memset(zLineString,0,sizeof(zLineString));
|
memset(zLineString,0,sizeof(zLineString));
|
||||||
@@ -1683,7 +1683,7 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
|
|||||||
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
|
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
|
||||||
|
|
||||||
// calc new pixel length for the line
|
// calc new pixel length for the line
|
||||||
usLineLengthPixels += usWordLengthPixels;
|
usLineLengthPixels = usLineLengthPixels + usWordLengthPixels;
|
||||||
|
|
||||||
// reset dest char counter
|
// reset dest char counter
|
||||||
usDestCounter = 0;
|
usDestCounter = 0;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ BOOLEAN ReadInStringArray()
|
|||||||
|
|
||||||
memset(&pData,0,sizeof(pData));
|
memset(&pData,0,sizeof(pData));
|
||||||
pData.maxArraySize = MAXITEMS;
|
pData.maxArraySize = MAXITEMS;
|
||||||
pData.curIndex = -1;
|
pData.curIndex = 0xffffffff;
|
||||||
|
|
||||||
XML_SetUserData(parser, &pData);
|
XML_SetUserData(parser, &pData);
|
||||||
|
|
||||||
|
|||||||
+18
-18
@@ -352,7 +352,7 @@ void ClearDisplayedListOfTacticalStrings( void )
|
|||||||
|
|
||||||
void ScrollString( )
|
void ScrollString( )
|
||||||
{
|
{
|
||||||
ScrollStringStPtr pStringSt = pStringS;
|
//ScrollStringStPtr pStringSt = pStringS;
|
||||||
UINT32 suiTimer=0;
|
UINT32 suiTimer=0;
|
||||||
UINT32 cnt;
|
UINT32 cnt;
|
||||||
INT32 iNumberOfNewStrings = 0; // the count of new strings, so we can update position by WIDTH_BETWEEN_NEW_STRINGS pixels in the y
|
INT32 iNumberOfNewStrings = 0; // the count of new strings, so we can update position by WIDTH_BETWEEN_NEW_STRINGS pixels in the y
|
||||||
@@ -360,7 +360,7 @@ void ScrollString( )
|
|||||||
INT32 iMaxAge = 0;
|
INT32 iMaxAge = 0;
|
||||||
BOOLEAN fDitchLastMessage = FALSE;
|
BOOLEAN fDitchLastMessage = FALSE;
|
||||||
|
|
||||||
INT32 iMsgYStart = SCREEN_HEIGHT - 150;
|
INT16 iMsgYStart = SCREEN_HEIGHT - 150;
|
||||||
|
|
||||||
// UPDATE TIMER
|
// UPDATE TIMER
|
||||||
suiTimer=GetJA2Clock();
|
suiTimer=GetJA2Clock();
|
||||||
@@ -704,18 +704,18 @@ void TacticalScreenMsg( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... )
|
|||||||
|
|
||||||
ScrollStringStPtr pStringSt;
|
ScrollStringStPtr pStringSt;
|
||||||
UINT32 uiFont = TINYFONT1;
|
UINT32 uiFont = TINYFONT1;
|
||||||
UINT16 usPosition=0;
|
//UINT16 usPosition=0;
|
||||||
UINT16 usCount=0;
|
//UINT16 usCount=0;
|
||||||
UINT16 usStringLength=0;
|
//UINT16 usStringLength=0;
|
||||||
UINT16 usCurrentSPosition=0;
|
//UINT16 usCurrentSPosition=0;
|
||||||
UINT16 usCurrentLookup=0;
|
//UINT16 usCurrentLookup=0;
|
||||||
//STR16pString;
|
//STR16pString;
|
||||||
BOOLEAN fLastLine=FALSE;
|
//BOOLEAN fLastLine=FALSE;
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
|
|
||||||
CHAR16 DestString[512];//, DestStringA[ 512 ];
|
CHAR16 DestString[512];//, DestStringA[ 512 ];
|
||||||
//STR16pStringBuffer;
|
//STR16pStringBuffer;
|
||||||
BOOLEAN fMultiLine=FALSE;
|
//BOOLEAN fMultiLine=FALSE;
|
||||||
ScrollStringStPtr pTempStringSt=NULL;
|
ScrollStringStPtr pTempStringSt=NULL;
|
||||||
WRAPPED_STRING *pStringWrapper=NULL;
|
WRAPPED_STRING *pStringWrapper=NULL;
|
||||||
WRAPPED_STRING *pStringWrapperHead=NULL;
|
WRAPPED_STRING *pStringWrapperHead=NULL;
|
||||||
@@ -857,17 +857,17 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... )
|
|||||||
|
|
||||||
ScrollStringStPtr pStringSt;
|
ScrollStringStPtr pStringSt;
|
||||||
UINT32 uiFont = MAP_SCREEN_MESSAGE_FONT;
|
UINT32 uiFont = MAP_SCREEN_MESSAGE_FONT;
|
||||||
UINT16 usPosition=0;
|
//UINT16 usPosition=0;
|
||||||
UINT16 usCount=0;
|
//UINT16 usCount=0;
|
||||||
UINT16 usStringLength=0;
|
//UINT16 usStringLength=0;
|
||||||
UINT16 usCurrentSPosition=0;
|
//UINT16 usCurrentSPosition=0;
|
||||||
UINT16 usCurrentLookup=0;
|
//UINT16 usCurrentLookup=0;
|
||||||
//STR16pString;
|
//STR16pString;
|
||||||
BOOLEAN fLastLine=FALSE;
|
//BOOLEAN fLastLine=FALSE;
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
CHAR16 DestString[512], DestStringA[ 512 ];
|
CHAR16 DestString[512], DestStringA[ 512 ];
|
||||||
//STR16pStringBuffer;
|
//STR16pStringBuffer;
|
||||||
BOOLEAN fMultiLine=FALSE;
|
//BOOLEAN fMultiLine=FALSE;
|
||||||
WRAPPED_STRING *pStringWrapper=NULL;
|
WRAPPED_STRING *pStringWrapper=NULL;
|
||||||
WRAPPED_STRING *pStringWrapperHead=NULL;
|
WRAPPED_STRING *pStringWrapperHead=NULL;
|
||||||
BOOLEAN fNewString = FALSE;
|
BOOLEAN fNewString = FALSE;
|
||||||
@@ -1033,7 +1033,7 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... )
|
|||||||
// add string to the map screen message list
|
// add string to the map screen message list
|
||||||
void AddStringToMapScreenMessageList( STR16 pString, UINT16 usColor, UINT32 uiFont, BOOLEAN fStartOfNewString, UINT8 ubPriority )
|
void AddStringToMapScreenMessageList( STR16 pString, UINT16 usColor, UINT32 uiFont, BOOLEAN fStartOfNewString, UINT8 ubPriority )
|
||||||
{
|
{
|
||||||
UINT8 ubSlotIndex = 0;
|
//UINT8 ubSlotIndex = 0;
|
||||||
ScrollStringStPtr pStringSt = NULL;
|
ScrollStringStPtr pStringSt = NULL;
|
||||||
|
|
||||||
|
|
||||||
@@ -1122,7 +1122,7 @@ void DisplayStringsInMapScreenMessageList( void )
|
|||||||
// print this line
|
// print this line
|
||||||
mprintf_coded( 20, sY, gMapScreenMessageList[ ubCurrentStringIndex ]->pString16 );
|
mprintf_coded( 20, sY, gMapScreenMessageList[ ubCurrentStringIndex ]->pString16 );
|
||||||
|
|
||||||
sY += usSpacing;
|
sY = sY + usSpacing;
|
||||||
|
|
||||||
// next message index to print (may wrap around)
|
// next message index to print (may wrap around)
|
||||||
ubCurrentStringIndex = ( ubCurrentStringIndex + 1 ) % 256;
|
ubCurrentStringIndex = ( ubCurrentStringIndex + 1 ) % 256;
|
||||||
|
|||||||
Reference in New Issue
Block a user