From b170dbb1e5a6ab093c2b98c9732f9d09a0cb35f9 Mon Sep 17 00:00:00 2001 From: Overhaul Date: Sat, 20 Oct 2007 08:32:53 +0000 Subject: [PATCH] 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 --- Utils/Event Pump.cpp | 6 ++-- Utils/MapUtility.cpp | 4 +-- Utils/Music Control.cpp | 12 ++++---- Utils/Slider.cpp | 6 ++-- Utils/Sound Control.cpp | 23 +++++++------- Utils/Utilities.cpp | 3 +- Utils/WordWrap.cpp | 66 ++++++++++++++++++++--------------------- Utils/XML_Strings.cpp | 2 +- Utils/message.cpp | 36 +++++++++++----------- 9 files changed, 79 insertions(+), 79 deletions(-) diff --git a/Utils/Event Pump.cpp b/Utils/Event Pump.cpp index 882b7f5c..e404caf2 100644 --- a/Utils/Event Pump.cpp +++ b/Utils/Event Pump.cpp @@ -884,7 +884,7 @@ BOOLEAN DequeAllGameEvents( BOOLEAN fExecute ) BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute ) { EVENT *pEvent; - BOOLEAN fCompleteLoop = FALSE; + //BOOLEAN fCompleteLoop = FALSE; // Dequeue all events on the demand queue (only) @@ -977,7 +977,7 @@ BOOLEAN ExecuteGameEvent( EVENT *pEvent ) // Call soldier function DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "Event Pump: Change Dest"); - EVENT_SetSoldierDestination( pSoldier, SChangeDest.usNewDestination ); + EVENT_SetSoldierDestination( pSoldier, (UINT8) SChangeDest.usNewDestination ); break; case S_SETPOSITION: @@ -1113,7 +1113,7 @@ BOOLEAN ExecuteGameEvent( EVENT *pEvent ) // Call soldier function 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; diff --git a/Utils/MapUtility.cpp b/Utils/MapUtility.cpp index 42e8f75f..8256ba55 100644 --- a/Utils/MapUtility.cpp +++ b/Utils/MapUtility.cpp @@ -36,8 +36,8 @@ HVSURFACE ghvSurface; extern BOOLEAN gfOverheadMapDirty; -extern int iOffsetHorizontal; -extern int iOffsetVertical; +extern UINT16 iOffsetHorizontal; +extern UINT16 iOffsetVertical; // Utililty file for sub-sampling/creating our radar screen maps // Loops though our maps directory and reads all .map files, subsamples an area, color diff --git a/Utils/Music Control.cpp b/Utils/Music Control.cpp index 49106fc6..d4fc55bc 100644 --- a/Utils/Music Control.cpp +++ b/Utils/Music Control.cpp @@ -416,11 +416,11 @@ BOOLEAN StartMusicBasedOnMode( ) { 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 { MusicPlay( bNothingModeSong ); - bNothingModeSong = NOTHING_A_MUSIC + (INT8)Random( 4 ); + bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random( 4 ) ); } break; @@ -465,7 +465,7 @@ BOOLEAN StartMusicBasedOnMode( ) else { MusicPlay( bEnemyModeSong ); - bEnemyModeSong = TENSOR_A_MUSIC + (INT8)Random( 3 ); + bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random( 3 )); } break; @@ -480,7 +480,7 @@ BOOLEAN StartMusicBasedOnMode( ) { MusicPlay( bBattleModeSong ); } - bBattleModeSong = BATTLE_A_MUSIC + (INT8)Random( 2 ); + bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random( 2 )); break; case MUSIC_TACTICAL_VICTORY: diff --git a/Utils/Slider.cpp b/Utils/Slider.cpp index e8577849..91140af4 100644 --- a/Utils/Slider.cpp +++ b/Utils/Slider.cpp @@ -155,9 +155,9 @@ INT32 AddSlider( UINT8 ubStyle, UINT16 usCursor, UINT16 usPosX, UINT16 usPosY, U { SLIDER *pTemp = NULL; SLIDER *pNewSlider = NULL; - INT32 iNewID=0; - UINT32 cnt=0; - UINT16 usIncrementWidth=0; + //INT32 iNewID=0; + //UINT32 cnt=0; + //UINT16 usIncrementWidth=0; AssertMsg( gfSliderInited, "Trying to Add a Slider Bar when the Slider System was never inited"); diff --git a/Utils/Sound Control.cpp b/Utils/Sound Control.cpp index 024c97db..282c29cc 100644 --- a/Utils/Sound Control.cpp +++ b/Utils/Sound Control.cpp @@ -680,7 +680,7 @@ INT32 SoundDir( INT16 sGridNo ) sDif = sMiddleX - sScreenX; - if ( ( sAbsDif = abs( sDif ) ) > 64 ) + if ( ( sAbsDif = (INT16) abs( sDif ) ) > 64 ) { // OK, NOT the middle. // Is it outside the screen? @@ -735,8 +735,8 @@ INT32 SoundVolume( INT8 bInitialVolume, INT16 sGridNo ) sDifX = sMiddleX - sScreenX; sDifY = sMiddleY - sScreenY; - sAbsDifX = abs( sDifX ); - sAbsDifY = abs( sDifY ); + sAbsDifX = (INT16) abs( sDifX ); + sAbsDifY = (INT16) abs( sDifY ); if ( sAbsDifX > 64 || sAbsDifY > 64 ) { @@ -968,7 +968,7 @@ void SetPositionSndsInActive( ) } // == Lesh slightly changed this function ============ -INT32 PositionSoundDir( INT16 sGridNo ) +UINT8 PositionSoundDir( INT16 sGridNo ) { INT16 sWorldX, sWorldY; INT16 sScreenX, sScreenY; @@ -991,7 +991,7 @@ INT32 PositionSoundDir( INT16 sGridNo ) sDif = sMiddleX - sScreenX; - if ( ( sAbsDif = abs( sDif ) ) > 64 ) + if ( ( sAbsDif = (INT16) abs( sDif ) ) > 64 ) { // 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 sScreenX, sScreenY; @@ -1050,8 +1050,8 @@ INT32 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo ) sDifX = sMiddleX - sScreenX; sDifY = sMiddleY - sScreenY; - sAbsDifX = abs( sDifX ); - sAbsDifY = abs( sDifY ); + sAbsDifX = (INT16) abs( sDifX ); + sAbsDifY = (INT16) abs( sDifY ); sMaxDistX = (INT16)( ( gsBottomRightWorldX - gsTopLeftWorldX ) * 1.5 ); sMaxDistY = (INT16)( ( gsBottomRightWorldY - gsTopLeftWorldY ) * 1.5 ); @@ -1078,7 +1078,8 @@ void SetPositionSndsVolumeAndPanning( ) { UINT32 cnt; POSITIONSND *pPositionSnd; - INT8 bVolume, bPan; + INT8 bVolume; + UINT8 ubPan; SOLDIERTYPE *pSoldier; for ( cnt = 0; cnt < guiNumPositionSnds; cnt++ ) @@ -1119,9 +1120,9 @@ void SetPositionSndsVolumeAndPanning( ) SoundSetVolume( pPositionSnd->iSoundSampleID, bVolume ); - bPan = PositionSoundDir( pPositionSnd->sGridNo ); + ubPan = PositionSoundDir( pPositionSnd->sGridNo ); - SoundSetPan( pPositionSnd->iSoundSampleID, bPan ); + SoundSetPan( pPositionSnd->iSoundSampleID, ubPan ); } } } diff --git a/Utils/Utilities.cpp b/Utils/Utilities.cpp index aedb1af4..0090094b 100644 --- a/Utils/Utilities.cpp +++ b/Utils/Utilities.cpp @@ -499,9 +499,8 @@ BOOLEAN HandleJA2CDCheckTwo( ) return( TRUE ); } -#endif - return( FALSE ); +#endif } diff --git a/Utils/WordWrap.cpp b/Utils/WordWrap.cpp index 312d3aa7..8c1941e0 100644 --- a/Utils/WordWrap.cpp +++ b/Utils/WordWrap.cpp @@ -73,7 +73,7 @@ WRAPPED_STRING *LineWrapForSingleCharWords(UINT32 ulFont, UINT16 usLineWidthPixe //Get the next char OneChar[0] = TempString[ usCurIndex ]; - usCurrentWidthPixels += WFStringPixLength( OneChar, ulFont); + usCurrentWidthPixels = usCurrentWidthPixels + WFStringPixLength( OneChar, ulFont); //If we are at the end of the string if(TempString[ usCurIndex ] == 0) @@ -152,7 +152,7 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin va_list argptr; BOOLEAN fDone = FALSE; UINT16 usCurrentWidthPixels=0; - UINT16 usCurrentLineWidthPixels=0; + //UINT16 usCurrentLineWidthPixels=0; CHAR16 OneChar[2]; BOOLEAN fNewLine=FALSE; BOOLEAN fTheStringIsToLong=FALSE; @@ -201,7 +201,7 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin } OneChar[0] = TempString[ usCurIndex ]; - usCurrentWidthPixels += WFStringPixLength( OneChar, ulFont); + usCurrentWidthPixels = usCurrentWidthPixels + WFStringPixLength( OneChar, ulFont); //If we are at the end of the string if(TempString[ usCurIndex ] == 0) @@ -242,7 +242,7 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin { OneChar[0] = DestString[ usDestIndex ]; - usCurrentWidthPixels -= WFStringPixLength( OneChar, ulFont); + usCurrentWidthPixels = usCurrentWidthPixels - WFStringPixLength( OneChar, ulFont); usCurIndex--; usDestIndex--; @@ -712,10 +712,10 @@ UINT16 IanDisplayWrappedString(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UIN usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -756,10 +756,10 @@ UINT16 IanDisplayWrappedString(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UIN usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -825,10 +825,10 @@ DEF: commented out for Beta. Nov 30 usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -865,10 +865,10 @@ DEF: commented out for Beta. Nov 30 usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -910,7 +910,7 @@ DEF: commented out for Beta. Nov 30 usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont); // calc new pixel length for the line - usLineLengthPixels += usWordLengthPixels; + usLineLengthPixels = usLineLengthPixels + usWordLengthPixels; // reset dest char counter usDestCounter = 0; @@ -1099,7 +1099,7 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt UINT16 usJustification = LEFT_JUSTIFIED,usLocalPosX=usPosX; UINT8 ubLocalColor = ubColor; BOOLEAN fBoldOn=FALSE; - UINT32 iTotalHeight =0; + //UINT32 iTotalHeight =0; CHAR16 zLineString[640] = L"",zWordString[640]= L""; usHeight = WFGetFontHeight(uiFont); @@ -1227,10 +1227,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1257,10 +1257,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1299,10 +1299,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1326,10 +1326,10 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1371,7 +1371,7 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont); // calc new pixel length for the line - usLineLengthPixels += usWordLengthPixels; + usLineLengthPixels = usLineLengthPixels + usWordLengthPixels; // reset dest char counter usDestCounter = 0; @@ -1438,7 +1438,7 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT UINT16 usJustification = LEFT_JUSTIFIED,usLocalPosX=usPosX; UINT8 ubLocalColor = ubColor; BOOLEAN fBoldOn=FALSE; - UINT32 iTotalHeight =0; + //UINT32 iTotalHeight =0; CHAR16 zLineString[640] = L"",zWordString[640]= L""; usHeight = WFGetFontHeight(uiFont); @@ -1552,10 +1552,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT // calc length of what we just wrote usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1578,10 +1578,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1614,10 +1614,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1638,10 +1638,10 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT usPhraseLengthPixels = WFStringPixLength(zLineString,uiLocalFont); // calculate new x position for next time - usLocalPosX += usPhraseLengthPixels; + usLocalPosX = usLocalPosX + usPhraseLengthPixels; // shorten width for next time - usLocalWidth -= usLineLengthPixels; + usLocalWidth = usLocalWidth - usLineLengthPixels; // erase line string memset(zLineString,0,sizeof(zLineString)); @@ -1683,7 +1683,7 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont); // calc new pixel length for the line - usLineLengthPixels += usWordLengthPixels; + usLineLengthPixels = usLineLengthPixels + usWordLengthPixels; // reset dest char counter usDestCounter = 0; diff --git a/Utils/XML_Strings.cpp b/Utils/XML_Strings.cpp index 8fbb91d4..b5cdfeca 100644 --- a/Utils/XML_Strings.cpp +++ b/Utils/XML_Strings.cpp @@ -164,7 +164,7 @@ BOOLEAN ReadInStringArray() memset(&pData,0,sizeof(pData)); pData.maxArraySize = MAXITEMS; - pData.curIndex = -1; + pData.curIndex = 0xffffffff; XML_SetUserData(parser, &pData); diff --git a/Utils/message.cpp b/Utils/message.cpp index 92e41527..99e62706 100644 --- a/Utils/message.cpp +++ b/Utils/message.cpp @@ -352,7 +352,7 @@ void ClearDisplayedListOfTacticalStrings( void ) void ScrollString( ) { - ScrollStringStPtr pStringSt = pStringS; + //ScrollStringStPtr pStringSt = pStringS; UINT32 suiTimer=0; UINT32 cnt; 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; BOOLEAN fDitchLastMessage = FALSE; - INT32 iMsgYStart = SCREEN_HEIGHT - 150; + INT16 iMsgYStart = SCREEN_HEIGHT - 150; // UPDATE TIMER suiTimer=GetJA2Clock(); @@ -704,18 +704,18 @@ void TacticalScreenMsg( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) ScrollStringStPtr pStringSt; UINT32 uiFont = TINYFONT1; - UINT16 usPosition=0; - UINT16 usCount=0; - UINT16 usStringLength=0; - UINT16 usCurrentSPosition=0; - UINT16 usCurrentLookup=0; + //UINT16 usPosition=0; + //UINT16 usCount=0; + //UINT16 usStringLength=0; + //UINT16 usCurrentSPosition=0; + //UINT16 usCurrentLookup=0; //STR16pString; - BOOLEAN fLastLine=FALSE; + //BOOLEAN fLastLine=FALSE; va_list argptr; CHAR16 DestString[512];//, DestStringA[ 512 ]; //STR16pStringBuffer; - BOOLEAN fMultiLine=FALSE; + //BOOLEAN fMultiLine=FALSE; ScrollStringStPtr pTempStringSt=NULL; WRAPPED_STRING *pStringWrapper=NULL; WRAPPED_STRING *pStringWrapperHead=NULL; @@ -857,17 +857,17 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) ScrollStringStPtr pStringSt; UINT32 uiFont = MAP_SCREEN_MESSAGE_FONT; - UINT16 usPosition=0; - UINT16 usCount=0; - UINT16 usStringLength=0; - UINT16 usCurrentSPosition=0; - UINT16 usCurrentLookup=0; + //UINT16 usPosition=0; + //UINT16 usCount=0; + //UINT16 usStringLength=0; + //UINT16 usCurrentSPosition=0; + //UINT16 usCurrentLookup=0; //STR16pString; - BOOLEAN fLastLine=FALSE; + //BOOLEAN fLastLine=FALSE; va_list argptr; CHAR16 DestString[512], DestStringA[ 512 ]; //STR16pStringBuffer; - BOOLEAN fMultiLine=FALSE; + //BOOLEAN fMultiLine=FALSE; WRAPPED_STRING *pStringWrapper=NULL; WRAPPED_STRING *pStringWrapperHead=NULL; BOOLEAN fNewString = FALSE; @@ -1033,7 +1033,7 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) // add string to the map screen message list void AddStringToMapScreenMessageList( STR16 pString, UINT16 usColor, UINT32 uiFont, BOOLEAN fStartOfNewString, UINT8 ubPriority ) { - UINT8 ubSlotIndex = 0; + //UINT8 ubSlotIndex = 0; ScrollStringStPtr pStringSt = NULL; @@ -1122,7 +1122,7 @@ void DisplayStringsInMapScreenMessageList( void ) // print this line mprintf_coded( 20, sY, gMapScreenMessageList[ ubCurrentStringIndex ]->pString16 ); - sY += usSpacing; + sY = sY + usSpacing; // next message index to print (may wrap around) ubCurrentStringIndex = ( ubCurrentStringIndex + 1 ) % 256;