- added VS2005 compability fix from Space Viking

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@766 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2007-03-10 18:46:57 +00:00
parent 9971b56b0e
commit 3f37673034
110 changed files with 477 additions and 439 deletions
+2 -2
View File
@@ -475,7 +475,7 @@ void ClearTaskbarRegion( INT16 sLeft, INT16 sTop, INT16 sRight, INT16 sBottom )
//This is a new function which duplicates the older "yellow info boxes" that
//are common throughout the editor. This draws the yellow box with the indentation
//look.
void DrawEditorInfoBox( UINT16 *str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h )
void DrawEditorInfoBox( wchar_t *str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h )
{
UINT16 usFillColorDark, usFillColorLight, usFillColorBack;
UINT16 x2, y2;
@@ -727,7 +727,7 @@ void RenderDoorLockInfo()
{
INT16 i, xp, yp;
INT16 sScreenX, sScreenY;
UINT16 str[ 50 ];
wchar_t str[ 50 ];
for( i = 0; i < gubNumDoors; i++ )
{
GetGridNoScreenPos( DoorTable[ i ].sGridNo, 0, &sScreenX, &sScreenY );
+2 -2
View File
@@ -53,9 +53,9 @@ void DisableEditorRegion( INT8 bRegionID );
//Rendering Utils
void mprintfEditor(INT16 x, INT16 y, UINT16 *pFontString, ...);
void mprintfEditor(INT16 x, INT16 y, wchar_t *pFontString, ...);
void ClearTaskbarRegion( INT16 sLeft, INT16 sTop, INT16 sRight, INT16 sBottom );
void DrawEditorInfoBox( UINT16 *str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h );
void DrawEditorInfoBox( wchar_t *str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h );
extern INT32 giEditMercDirectionIcons[2];
extern UINT32 guiMercInventoryPanel;
+2 -2
View File
@@ -729,7 +729,7 @@ void RemoveLockedDoorCursors()
void SetupTextInputForBuildings()
{
UINT16 str[4];
wchar_t str[4];
InitTextInputModeWithScheme( DEFAULT_SCHEME );
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
swprintf( str, L"%d", gubMaxRoomNumber );
@@ -738,7 +738,7 @@ void SetupTextInputForBuildings()
void ExtractAndUpdateBuildingInfo()
{
UINT16 str[4];
wchar_t str[4];
INT32 temp;
//extract light1 colors
temp = min( GetNumericStrictValueFromField( 1 ), 255 );
+4 -4
View File
@@ -68,7 +68,7 @@ BOOLEAN gfEditorForceShadeTableRebuild = FALSE;
void SetupTextInputForMapInfo()
{
UINT16 str[10];
wchar_t str[10];
InitTextInputModeWithScheme( DEFAULT_SCHEME );
@@ -149,7 +149,7 @@ void UpdateMapInfo()
void UpdateMapInfoFields()
{
UINT16 str[10];
wchar_t str[10];
//Update the text fields to reflect the validated values.
//light rgb fields
swprintf( str, L"%d", gEditorLightColor.peRed );
@@ -175,7 +175,7 @@ void UpdateMapInfoFields()
void ExtractAndUpdateMapInfo()
{
UINT16 str[10];
wchar_t str[10];
INT32 temp;
BOOLEAN fUpdateLight1 = FALSE;
//extract light1 colors
@@ -246,7 +246,7 @@ void ExtractAndUpdateMapInfo()
BOOLEAN ApplyNewExitGridValuesToTextFields()
{
UINT16 str[10];
wchar_t str[10];
//exit grid input fields
if( iCurrentTaskbar != TASK_MAPINFO )
return FALSE;
+10 -10
View File
@@ -185,7 +185,7 @@ void SetupTextInputForMercSchedule();
void ExtractAndUpdateMercAttributes();
void ExtractAndUpdateMercProfile();
void ExtractAndUpdateMercSchedule();
void CalcStringForValue( UINT16 *str, INT32 iValue, UINT32 uiMax );
void CalcStringForValue( wchar_t *str, INT32 iValue, UINT32 uiMax );
void ChangeBodyType( INT8 bOffset ); //+1 or -1 only
//internal merc variables
@@ -1719,7 +1719,7 @@ void DeleteSelectedMerc()
void SetupTextInputForMercProfile()
{
UINT16 str[4];
wchar_t str[4];
INT16 sNum;
InitTextInputModeWithScheme( DEFAULT_SCHEME );
@@ -1735,7 +1735,7 @@ void SetupTextInputForMercProfile()
void SetupTextInputForMercAttributes()
{
UINT16 str[4];
wchar_t str[4];
InitTextInputModeWithScheme( DEFAULT_SCHEME );
@@ -1773,7 +1773,7 @@ void SetupTextInputForMercAttributes()
//In the merc editing, all detailed placement values for generated attributes are set to -1.
//When making a generated attribute static, we then set the value to its applicable value.
//This function is similar to the itoa function except that -1 is converted to a null string.
void CalcStringForValue( UINT16 *str, INT32 iValue, UINT32 uiMax )
void CalcStringForValue( wchar_t *str, INT32 iValue, UINT32 uiMax )
{
if( iValue < 0 ) //a blank string is determined by a negative value.
str[0] = '\0';
@@ -2388,7 +2388,7 @@ void SetMercEditingMode( UINT8 ubNewMode )
void DisplayBodyTypeInfo()
{
UINT16 str[20];
wchar_t str[20];
switch( gpSelected->pBasicPlacement->bBodyType )
{
case RANDOM: swprintf( str, L"Random" ); break;
@@ -2583,7 +2583,7 @@ void UpdateMercsInfo()
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 439, L"4)" );
if( gubScheduleInstructions )
{
UINT16 str[255];
wchar_t str[255];
UINT16 keyword[10] = L"";
ColorFillVideoSurfaceArea( FRAME_BUFFER, iScreenWidthOffset + 431, 2 * iScreenHeightOffset + 388, iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 450, Get16BPPColor( FROMRGB( 32, 45, 72 ) ) );
switch( gCurrSchedule.ubAction[ gubCurrentScheduleActionIndex ] )
@@ -3112,7 +3112,7 @@ void RenderMercStrings()
INT16 sX, sY;
UINT16 *pStr;
SOLDIERINITNODE *curr;
UINT16 str[50];
wchar_t str[50];
curr = gSoldierInitHead;
while( curr )
@@ -3306,7 +3306,7 @@ void CancelCurrentScheduleAction()
void RegisterCurrentScheduleAction( INT32 iMapIndex )
{
UINT16 str[6];
wchar_t str[6];
MarkWorldDirty();
swprintf( str, L"%d", iMapIndex );
if( gfUseScheduleData2 )
@@ -3498,7 +3498,7 @@ void RenderCurrentSchedule()
INT16 sXMapPos, sYMapPos;
INT16 sScreenX, sScreenY;
INT16 sX, sY;
UINT16 str[ 3 ];
wchar_t str[ 3 ];
for( i = 0; i < 8; i++ )
{
if( i % 2 )
@@ -3542,7 +3542,7 @@ void UpdateScheduleInfo()
{
INT32 i;
SCHEDULENODE *pSchedule;
UINT16 str[6];
wchar_t str[6];
if( gpSelected->pSoldier->ubScheduleID )
{
pSchedule = GetSchedule( gpSelected->pSoldier->ubScheduleID );
+1 -1
View File
@@ -49,7 +49,7 @@ extern UINT8 gubCurrMercMode, gubPrevMercMode;
#define NUM_DIFF_LVLS 5
extern UINT16 *zDiffNames[NUM_DIFF_LVLS];
extern wchar_t *zDiffNames[NUM_DIFF_LVLS];
extern INT16 sCurBaseDiff;
extern INT16 gsSelectedMercID;
extern INT16 gsSelectedMercGridNo;
+10 -10
View File
@@ -642,7 +642,7 @@ void RemoveGameTypeFlags()
void SetupGunGUI()
{
UINT16 str[20];
wchar_t str[20];
INT16 yp;
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
swprintf( str, L"%d", gpItem->bGunStatus );
@@ -788,7 +788,7 @@ void ExtractAndUpdateGunGUI()
void SetupAmmoGUI()
{
UINT16 str[20];
wchar_t str[20];
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
swprintf( str, L"%d", gpItem->bTrap );
@@ -833,7 +833,7 @@ void ExtractAndUpdateAmmoGUI()
void SetupArmourGUI()
{
UINT16 str[20];
wchar_t str[20];
swprintf( str, L"%d", gpItem->bStatus[0] );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
swprintf( str, L"%d", gpItem->bTrap );
@@ -894,7 +894,7 @@ void ExtractAndUpdateArmourGUI()
void SetupEquipGUI()
{
UINT16 str[20];
wchar_t str[20];
swprintf( str, L"%d", gpItem->bStatus[0] );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
swprintf( str, L"%d", gpItem->bTrap );
@@ -938,7 +938,7 @@ void ExtractAndUpdateEquipGUI()
void SetupExplosivesGUI()
{
UINT16 str[20];
wchar_t str[20];
INT16 yp;
swprintf( str, L"%d", gpItem->bStatus[0] );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
@@ -1020,7 +1020,7 @@ void ExtractAndUpdateExplosivesGUI()
void SetupMoneyGUI()
{
UINT16 str[20];
wchar_t str[20];
swprintf( str, L"%d", gpItem->uiMoneyAmount );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 45, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
if( gpEditingItemPool )
@@ -1058,7 +1058,7 @@ void RemoveMoneyGUI()
void SetupOwnershipGUI()
{
UINT16 str[20];
wchar_t str[20];
swprintf( str, L"%d", gpItem->ubOwnerProfile );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
giOwnershipGroupButton =
@@ -1104,7 +1104,7 @@ void RemoveOwnershipGUI()
void SetupKeysGUI()
{
UINT16 str[20];
wchar_t str[20];
if( gpEditingItemPool )
{
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
@@ -1130,7 +1130,7 @@ void RemoveKeysGUI()
void SetupActionItemsGUI()
{
UINT16 str[4];
wchar_t str[4];
UINT16 *pStr;
swprintf( str, L"%d", gpItem->bStatus[0] );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
@@ -1197,7 +1197,7 @@ void AlarmTriggerCheckboxCallback( GUI_BUTTON *btn, INT32 reason )
void SetupTriggersGUI()
{
UINT16 str[4];
wchar_t str[4];
swprintf( str, L"%d", gpItem->bTrap );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
swprintf( str, L"%d", gpItem->ubTolerance );
+1 -1
View File
@@ -371,7 +371,7 @@ UINT32 LoadSaveScreenHandle(void)
sprintf( gszCurrFilename, "MAPS\\%S", gzFilename );
if( GetFileFirst(gszCurrFilename, &FileInfo) )
{
UINT16 str[40];
wchar_t str[40];
if( FileInfo.uiFileAttribs & (FILE_IS_READONLY|FILE_IS_HIDDEN|FILE_IS_SYSTEM) )
{
swprintf( str, L" Delete READ-ONLY file %s? ", gzFilename );
+3 -3
View File
@@ -26,7 +26,7 @@ extern BOOLEAN gfDestroyFDlg;
UINT32 WaitForFileName( void );
void RemoveFileDialog(void);
void CreateFileDialog( UINT16 *zTitle );
void CreateFileDialog( wchar_t *zTitle );
void SelectFileDialogYPos( UINT16 usRelativeYPos );
@@ -37,8 +37,8 @@ BOOLEAN ExtractFilenameFromFields();
BOOLEAN ValidCoordinate();
BOOLEAN ValidFilename();
BOOLEAN ExternalLoadMap( UINT16 *szFilename );
BOOLEAN ExternalSaveMap( UINT16 *szFilename );
BOOLEAN ExternalLoadMap( wchar_t *szFilename );
BOOLEAN ExternalSaveMap( wchar_t *szFilename );
extern BOOLEAN gfErrorCatch;
extern UINT16 gzErrorCatchString[ 256 ];
+10 -10
View File
@@ -499,7 +499,7 @@ void DestroySummaryWindow()
void RenderSectorInformation()
{
//UINT16 str[ 100 ];
//wchar_t str[ 100 ];
MAPCREATE_STRUCT *m;
SUMMARYFILE *s;
UINT8 ePoints = 0;
@@ -677,7 +677,7 @@ void RenderItemDetails()
FLOAT dAvgExistChance, dAvgStatus;
OBJECTTYPE *pItem;
INT32 index, i;
UINT16 str[100];
wchar_t str[100];
UINT32 uiQuantity, uiExistChance, uiStatus;
UINT32 uiTriggerQuantity[8], uiActionQuantity[8], uiTriggerExistChance[8], uiActionExistChance[8];
UINT32 xp, yp;
@@ -1025,7 +1025,7 @@ void RenderSummaryWindow()
SetFontShadow( FONT_NEARBLACK );
if( gfGlobalSummaryExists )
{
UINT16 str[100];
wchar_t str[100];
BOOLEAN fSectorSummaryExists = FALSE;
if( gusNumEntriesWithOutdatedOrNoSummaryInfo && !gfOutdatedDenied )
{
@@ -1379,7 +1379,7 @@ void RenderSummaryWindow()
}
for( x = 1; x <= 16; x++ )
{
UINT16 str[3];
wchar_t str[3];
swprintf( str, L"%d", x );
mprintf( MAP_LEFT+x*13-(13+StringPixLength( str, SMALLCOMPFONT ))/2, MAP_TOP-8, str );
}
@@ -1402,7 +1402,7 @@ void RenderSummaryWindow()
if( gfRenderProgress )
{
UINT8 ubNumUndergroundLevels;
UINT16 str[2];
wchar_t str[2];
for( y = 0; y < 16; y++ )
{
ClipRect.iTop = MAP_TOP + y*13;
@@ -1528,7 +1528,7 @@ void RenderSummaryWindow()
void UpdateSectorSummary( UINT16 *gszFilename, BOOLEAN fUpdate )
{
UINT16 str[50];
wchar_t str[50];
UINT8 szCoord[40];
UINT16 *ptr;
INT16 x, y;
@@ -2089,7 +2089,7 @@ void SummaryLoadMapCallback( GUI_BUTTON *btn, INT32 reason )
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
UINT16 *ptr;
UINT16 str[ 50 ];
wchar_t str[ 50 ];
gfRenderSummary = TRUE;
SetFont( FONT10ARIAL );
@@ -2623,7 +2623,7 @@ void UpdateMasterProgress()
void ReportError( UINT8 *pSector, UINT8 ubLevel )
{
static INT32 yp = iScreenHeightOffset + 180;
UINT16 str[40];
wchar_t str[40];
UINT16 temp[10];
//Make sure the file exists... if not, then return false
@@ -2751,7 +2751,7 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason )
void ExtractTempFilename()
{
UINT16 str[40];
wchar_t str[40];
Get16BitStringFromField( 1, str );
if( wcscmp( gszTempFilename, str ) )
{
@@ -2766,7 +2766,7 @@ void ExtractTempFilename()
void ApologizeOverrideAndForceUpdateEverything()
{
INT32 x, y;
UINT16 str[ 50 ];
wchar_t str[ 50 ];
UINT8 name[50];
SUMMARYFILE *pSF;
//Create one huge assed button
+1 -1
View File
@@ -14,7 +14,7 @@ void DestroySummaryWindow();
void RenderSummaryWindow();
void LoadWorldInfo();
void UpdateSectorSummary( UINT16 *gszFilename, BOOLEAN fUpdate );
void UpdateSectorSummary( wchar_t *gszFilename, BOOLEAN fUpdate );
void SaveGlobalSummary();
void LoadGlobalSummary();
+1 -1
View File
@@ -3540,7 +3540,7 @@ void ProcessAreaSelection( BOOLEAN fWithLeftButton )
gubMaxRoomNumber++;
if( iCurrentTaskbar == TASK_BUILDINGS && TextInputMode() )
{
UINT16 str[4];
wchar_t str[4];
swprintf( str, L"%d", gubCurrRoomNumber );
SetInputFieldStringWith16BitString( 1, str );
SetActiveField( 0 );
+1 -1
View File
@@ -14,7 +14,7 @@ enum
extern UINT8 gubMessageBoxStatus;
extern BOOLEAN gfMessageBoxResult;
void CreateMessageBox( UINT16 *wzString );
void CreateMessageBox( wchar_t *wzString );
BOOLEAN MessageBoxHandled();
void RemoveMessageBox();
+1 -1
View File
@@ -85,7 +85,7 @@ typedef struct currentPopupMenuInformation{
//A global var that keeps the popup menu information.
extern CurrentPopupMenuInformation gPopup;
extern UINT16 *popupMenuStrings[5];
extern wchar_t *popupMenuStrings[5];
//These are the two main functions that outside users would call.
void InitPopupMenu( INT32 iButtonID, UINT8 ubPopupMenuID, UINT8 ubDirection );
+1 -1
View File
@@ -86,7 +86,7 @@ typedef struct
};
struct
{
UINT16 * pString;
wchar_t * pString;
};
};
}
+7 -7
View File
@@ -240,7 +240,7 @@ void DoneFadeOutForExitGameInitOptionScreen( void );
void DoneFadeInForExitGameInitOptionScreen( void );
// JA2Gold: no more timed turns setting
//UINT8 GetCurrentTimedTurnsButtonSetting();
BOOLEAN DoGioMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
BOOLEAN DoGioMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DisplayMessageToUserAboutGameDifficulty();
void ConfirmGioDifSettingMessageBoxCallBack( UINT8 bExitValue );
BOOLEAN DisplayMessageToUserAboutIronManMode();
@@ -1276,7 +1276,7 @@ void DoneFadeInForExitGameInitOptionScreen( void )
}
BOOLEAN DoGioMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
BOOLEAN DoGioMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
@@ -1299,16 +1299,16 @@ void DisplayMessageToUserAboutGameDifficulty()
switch( ubDiffLevel )
{
case 0:
DoGioMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zGioDifConfirmText[GIO_CFS_NOVICE], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
DoGioMessageBox( MSG_BOX_BASIC_STYLE, zGioDifConfirmText[GIO_CFS_NOVICE], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
break;
case 1:
DoGioMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zGioDifConfirmText[GIO_CFS_EXPERIENCED], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
DoGioMessageBox( MSG_BOX_BASIC_STYLE, zGioDifConfirmText[GIO_CFS_EXPERIENCED], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
break;
case 2:
DoGioMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zGioDifConfirmText[GIO_CFS_EXPERT], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
DoGioMessageBox( MSG_BOX_BASIC_STYLE, zGioDifConfirmText[GIO_CFS_EXPERT], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
break;
case 3:
DoGioMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zGioDifConfirmText[GIO_CFS_INSANE], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
DoGioMessageBox( MSG_BOX_BASIC_STYLE, zGioDifConfirmText[GIO_CFS_INSANE], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioDifSettingMessageBoxCallBack );
break;
}
}
@@ -1330,7 +1330,7 @@ BOOLEAN DisplayMessageToUserAboutIronManMode()
//if the user has selected IRON MAN mode
if( ubIronManMode )
{
DoGioMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gzIronManModeWarningText[ IMM__IRON_MAN_MODE_WARNING_TEXT ], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioIronManMessageBoxCallBack );
DoGioMessageBox( MSG_BOX_BASIC_STYLE, gzIronManModeWarningText[ IMM__IRON_MAN_MODE_WARNING_TEXT ], GAME_INIT_OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmGioIronManMessageBoxCallBack );
return( TRUE );
}
+2 -2
View File
@@ -23,13 +23,13 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else
//RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.765" };
wchar_t zVersionLabel[256] = { L"Release v1.13.766" };
#endif
INT8 czVersionNumber[16] = { "Build 07.03.04" }; //YY.MM.DD
INT16 zTrackingNumber[16] = { L"Z" };
wchar_t zTrackingNumber[16] = { L"Z" };
//
+2 -2
View File
@@ -11,9 +11,9 @@ extern "C" {
// Keeps track of the game version
//
extern INT16 zVersionLabel[256];
extern wchar_t zVersionLabel[256];
extern INT8 czVersionNumber[16];
extern INT16 zTrackingNumber[16];
extern wchar_t zTrackingNumber[16];
+1 -1
View File
@@ -546,7 +546,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
OutputFile="D:\games\Jagged Alliance 2 v1.13\ja2 v1.13.751_EN.exe"
OutputFile="D:\games\Jagged Alliance 2 v1.13\ja2 v1.13.766_EN.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
+2 -2
View File
@@ -1210,7 +1210,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
HVOBJECT hVObject;
UINT32 usHeight, usWidth;
ETRLEObject *pTrav;
UINT16 gzItemName[ SIZE_ITEM_NAME ];
wchar_t gzItemName[ SIZE_ITEM_NAME ];
UINT8 ubItemCount=0;
// UINT16 gzTempItemName[ SIZE_ITEM_INFO ];
@@ -2432,7 +2432,7 @@ BOOLEAN DisplayTalkingMercFaceForVideoPopUp(INT32 iFaceIndex)
return(fIsTheMercTalking);
}
void DisplayTextForMercFaceVideoPopUp(INT16 * pString)
void DisplayTextForMercFaceVideoPopUp(wchar_t * pString)
{
#ifdef TAIWANESE
+1 -1
View File
@@ -11,7 +11,7 @@ BOOLEAN RenderAIMMembers();
BOOLEAN DrawNumeralsToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 usLocY, UINT32 ulFont, UINT8 ubColor);
BOOLEAN DrawMoneyToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 usLocY, UINT32 ulFont, UINT8 ubColor);
void DisplayTextForMercFaceVideoPopUp(INT16 * pString);
void DisplayTextForMercFaceVideoPopUp(wchar_t * pString);
BOOLEAN DisplayTalkingMercFaceForVideoPopUp(INT32 iFaceIndex);
void EnterInitAimMembers();
+1 -1
View File
@@ -2280,7 +2280,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
UINT8 i;
CHAR16 zItemName[ SIZE_ITEM_NAME ];
UINT8 ubItemCount=0;
INT16 pStr[ 250 ];
wchar_t pStr[ 250 ];
if( gfBigImageMouseRegionCreated )
return;
+1 -1
View File
@@ -1514,7 +1514,7 @@ void ProcessTransactionString(STR16 pString, FinanceUnitPtr pFinance)
break;
case( TRAIN_TOWN_MILITIA ):
{
UINT16 str[ 128 ];
wchar_t str[ 128 ];
UINT8 ubSectorX;
UINT8 ubSectorY;
ubSectorX = (UINT8)SECTORX( pFinance->ubSecondCode );
+1 -1
View File
@@ -1625,7 +1625,7 @@ void PurchaseOrExtendInsuranceForSoldier( SOLDIERTYPE *pSoldier, UINT32 uiInsura
if( guiCurrentScreen == LAPTOP_SCREEN )
DoLapTopMessageBox( MSG_BOX_RED_ON_WHITE, sText, LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
else
DoMapMessageBox( MSG_BOX_RED_ON_WHITE, (INT16 *)sText, MAP_SCREEN, MSG_BOX_FLAG_OK, NULL);
DoMapMessageBox( MSG_BOX_RED_ON_WHITE, sText, MAP_SCREEN, MSG_BOX_FLAG_OK, NULL);
}
else
{
+4 -2
View File
@@ -4439,6 +4439,8 @@ void LapTopScreenCallBack(MOUSE_REGION * pRegion, INT32 iReason )
return;
}
template BOOLEAN DoLapTopMessageBox<wchar_t *>(UINT8, wchar_t *, UINT32, UINT8, MSGBOX_CALLBACK);
template BOOLEAN DoLapTopMessageBox<wchar_t const *>(UINT8, wchar_t const *, UINT32, UINT8, MSGBOX_CALLBACK);
template BOOLEAN DoLapTopMessageBox<unsigned short *>(UINT8, unsigned short *, UINT32, UINT8, MSGBOX_CALLBACK);
template BOOLEAN DoLapTopMessageBox<unsigned short const *>(UINT8, unsigned short const *, UINT32, UINT8, MSGBOX_CALLBACK);
template <typename string2>
@@ -4462,7 +4464,7 @@ BOOLEAN DoLapTopMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen
}
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
{
// reset exit mode
fExitDueToMessageBox = TRUE;
@@ -4474,7 +4476,7 @@ BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32
return( ( iLaptopMessageBox != -1 ) );
}
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {iScreenWidthOffset, iScreenHeightOffset,
iScreenWidthOffset + 640, INV_INTERFACE_START_Y };
+1 -1
View File
@@ -37,7 +37,7 @@ void BlitTitleBarIcons( void );
void HandleKeyBoardShortCutsForLapTop( UINT16 usEvent, UINT32 usParam, UINT16 usKeyState );
BOOLEAN RenderWWWProgramTitleBar( void );
void DisplayProgramBoundingBox( BOOLEAN fMarkButtons );
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
BOOLEAN RemoveBookMark( INT32 iBookId );
void CreateFileAndNewEmailIconFastHelpText( UINT32 uiHelpTextID, BOOLEAN fClearHelpText );
BOOLEAN InitLaptopAndLaptopScreens();
+1 -1
View File
@@ -1537,7 +1537,7 @@ void HandleTalkingSpeck()
}
}
void DisplayTextForSpeckVideoPopUp(INT16 * pString)
void DisplayTextForSpeckVideoPopUp(wchar_t * pString)
{
UINT16 usActualHeight;
INT32 iOldMercPopUpBoxId = iMercPopUpBox;
+1 -1
View File
@@ -64,7 +64,7 @@ BOOLEAN RemoveMercBackGround();
void DailyUpdateOfMercSite( UINT16 usDate);
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID);
void DisplayTextForSpeckVideoPopUp(INT16 * pString);
void DisplayTextForSpeckVideoPopUp(wchar_t * pString);
BOOLEAN IsMercMercAvailable( UINT8 ubMercID );
+9 -5
View File
@@ -76,6 +76,8 @@ CHAR16 gzUserDefinedButton2[ 128 ];
template INT32 DoMessageBox<unsigned short *>(UINT8, unsigned short *, UINT32, UINT16, MSGBOX_CALLBACK, SGPRect *);
template INT32 DoMessageBox<unsigned short const*>(UINT8, unsigned short const*, UINT32, UINT16, MSGBOX_CALLBACK, SGPRect *);
template INT32 DoMessageBox<wchar_t *>(UINT8, wchar_t *, UINT32, UINT16, MSGBOX_CALLBACK, SGPRect *);
template INT32 DoMessageBox<wchar_t const*>(UINT8, wchar_t const*, UINT32, UINT16, MSGBOX_CALLBACK, SGPRect *);
template <typename string2>
INT32 DoMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
{
@@ -1196,31 +1198,33 @@ UINT32 MessageBoxScreenShutdown( )
// a basic box that don't care what screen we came from
template void DoScreenIndependantMessageBox<wchar_t *>(wchar_t *, UINT16, MSGBOX_CALLBACK);
template void DoScreenIndependantMessageBox<wchar_t const *>(wchar_t const *, UINT16, MSGBOX_CALLBACK);
template void DoScreenIndependantMessageBox<unsigned short *>(unsigned short *, UINT16, MSGBOX_CALLBACK);
template void DoScreenIndependantMessageBox<unsigned short const *>(unsigned short const *, UINT16, MSGBOX_CALLBACK);
template <typename string1>
void DoScreenIndependantMessageBox( string1 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y };
DoScreenIndependantMessageBoxWithRect( (INT16 *) zString, usFlags, ReturnCallback, &CenteringRect );
DoScreenIndependantMessageBoxWithRect( (wchar_t *) zString, usFlags, ReturnCallback, &CenteringRect );
}
// a basic box that don't care what screen we came from
void DoUpperScreenIndependantMessageBox( INT16 *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
void DoUpperScreenIndependantMessageBox( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y / 2 };
DoScreenIndependantMessageBoxWithRect( zString, usFlags, ReturnCallback, &CenteringRect );
}
// a basic box that don't care what screen we came from
void DoLowerScreenIndependantMessageBox( UINT16 * zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
void DoLowerScreenIndependantMessageBox( wchar_t * zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {0, INV_INTERFACE_START_Y / 2, SCREEN_WIDTH, INV_INTERFACE_START_Y };
DoScreenIndependantMessageBoxWithRect( (INT16 *)zString, usFlags, ReturnCallback, &CenteringRect );
DoScreenIndependantMessageBoxWithRect( zString, usFlags, ReturnCallback, &CenteringRect );
}
void DoScreenIndependantMessageBoxWithRect( INT16 *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
void DoScreenIndependantMessageBoxWithRect( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
{
/// which screen are we in?
+7 -7
View File
@@ -93,16 +93,16 @@ template <typename string2>
INT32 DoMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
template <typename string1>
void DoScreenIndependantMessageBox( string1 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoUpperScreenIndependantMessageBox( INT16 *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoUpperScreenIndependantMessageBox( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoLowerScreenIndependantMessageBox( UINT16 * zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoScreenIndependantMessageBoxWithRect( INT16 *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
void DoLowerScreenIndependantMessageBox( wchar_t * zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoScreenIndependantMessageBoxWithRect( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
//wrappers for other screens
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
#endif
+5 -5
View File
@@ -221,7 +221,7 @@ void SetOptionsExitScreen( UINT32 uiExitScreen );
void SoundFXSliderChangeCallBack( INT32 iNewValue );
void SpeechSliderChangeCallBack( INT32 iNewValue );
void MusicSliderChangeCallBack( INT32 iNewValue );
//BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
//BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
void ConfirmQuitToMainMenuMessageBoxCallBack( UINT8 bExitValue );
void HandleSliderBarMovementSounds();
void HandleOptionToggle( UINT8 ubButton, BOOLEAN fState, BOOLEAN fDown, BOOLEAN fPlaySound );
@@ -973,7 +973,7 @@ void BtnOptQuitCallback(GUI_BUTTON *btn,INT32 reason)
btn->uiFlags &= (~BUTTON_CLICKED_ON );
//Confirm the Exit to the main menu screen
DoOptionsMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zOptionsText[OPT_RETURN_TO_MAIN], OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmQuitToMainMenuMessageBoxCallBack );
DoOptionsMessageBox( MSG_BOX_BASIC_STYLE, zOptionsText[OPT_RETURN_TO_MAIN], OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmQuitToMainMenuMessageBoxCallBack );
/// SetOptionsExitScreen( MAINMENU_SCREEN );
@@ -1084,7 +1084,7 @@ void HandleOptionToggle( UINT8 ubButton, BOOLEAN fState, BOOLEAN fDown, BOOLEAN
ButtonList[ guiOptionsToggles[ ubButton ] ]->uiFlags |= BUTTON_CLICKED_ON;
//Confirm the Exit to the main menu screen
DoOptionsMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zOptionsText[OPT_NEED_AT_LEAST_SPEECH_OR_SUBTITLE_OPTION_ON], OPTIONS_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoOptionsMessageBox( MSG_BOX_BASIC_STYLE, zOptionsText[OPT_NEED_AT_LEAST_SPEECH_OR_SUBTITLE_OPTION_ON], OPTIONS_SCREEN, MSG_BOX_FLAG_OK, NULL );
gfExitOptionsDueToMessageBox = FALSE;
}
}
@@ -1136,7 +1136,7 @@ void MusicSliderChangeCallBack( INT32 iNewValue )
MusicSetVolume( iNewValue );
}
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
{
// reset exit mode
gfExitOptionsDueToMessageBox = TRUE;
@@ -1148,7 +1148,7 @@ BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExi
return( ( giOptionsMessageBox != -1 ) );
}
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
+1 -1
View File
@@ -23,7 +23,7 @@ void SetOptionsScreenToggleBoxes();
void GetOptionsScreenToggleBoxes();
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
#endif
+2 -2
View File
@@ -1114,7 +1114,7 @@ void SaveLoadGameNumber( INT8 bSaveGameID )
}
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
{
// do message box and return
giSaveLoadMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT8 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, pCenteringRect );
@@ -2329,7 +2329,7 @@ BOOLEAN DoQuickSave()
gTacticalStatus.uiFlags &= ~LOADING_SAVED_GAME;
if( guiPreviousOptionScreen == MAP_SCREEN )
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zSaveLoadText[SLG_SAVE_GAME_ERROR], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_SAVE_GAME_ERROR], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
else
DoMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_SAVE_GAME_ERROR], GAME_SCREEN, MSG_BOX_FLAG_OK, NULL, NULL );
}
+12 -10
View File
@@ -1672,7 +1672,7 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
}
//Creates a generic button with text on it.
INT32 CreateTextButton(UINT16 *string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback)
INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback)
{
GUI_BUTTON *b;
INT32 ButtonNum;
@@ -1716,7 +1716,7 @@ INT32 CreateTextButton(UINT16 *string, UINT32 uiFont, INT16 sForeColor, INT16 sS
b->string = NULL;
if ( string && wcslen( string ) )
{
b->string = (UINT16*)MemAlloc( (wcslen(string)+1)*sizeof(UINT16) );
b->string = (wchar_t*)MemAlloc( (wcslen(string)+1)*sizeof(wchar_t) );
AssertMsg( b->string, "Out of memory error: Couldn't allocate string in CreateTextButton." );
wcscpy( b->string, string );
}
@@ -2123,6 +2123,8 @@ INT32 CreateSimpleButton( INT32 x, INT32 y, string3 filename, INT32 Type, INT16
return( ButNum );
}
template INT32 CreateIconAndTextButton<wchar_t const *>(INT32, wchar_t const *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
template INT32 CreateIconAndTextButton<wchar_t *>(INT32, wchar_t *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
template INT32 CreateIconAndTextButton<unsigned short const *>(INT32, unsigned short const *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
template INT32 CreateIconAndTextButton<unsigned short *>(INT32, unsigned short *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
template INT32 CreateIconAndTextButton<short *>(INT32, short *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
@@ -2190,7 +2192,7 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
b->string = NULL;
if ( string )
{
b->string = (UINT16*)MemAlloc( (wcslen((wchar_t *)string)+1)*sizeof(UINT16) );
b->string = (wchar_t*)MemAlloc( (wcslen((wchar_t *)string)+1)*sizeof(wchar_t) );
AssertMsg( b->string, "Out of memory error: Couldn't allocate string in CreateIconAndTextButton." );
wcscpy( b->string, string );
}
@@ -2263,7 +2265,7 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
}
//New functions
void SpecifyButtonText( INT32 iButtonID, UINT16 * string )
void SpecifyButtonText( INT32 iButtonID, wchar_t * string )
{
GUI_BUTTON *b;
@@ -2280,7 +2282,7 @@ void SpecifyButtonText( INT32 iButtonID, UINT16 * string )
if( string && wcslen( string ) )
{
//allocate memory for the new string
b->string = (UINT16*)MemAlloc( (wcslen(string)+1)*sizeof(UINT16) );
b->string = (wchar_t*)MemAlloc( (wcslen(string)+1)*sizeof(wchar_t) );
Assert( b->string );
//copy the string to the button
wcscpy( b->string, string );
@@ -2360,7 +2362,7 @@ void SpecifyButtonTextJustification( INT32 iButtonID, INT8 bJustification )
b->uiFlags |= BUTTON_DIRTY ;
}
void SpecifyFullButtonTextAttributes( INT32 iButtonID, UINT16 *string, INT32 uiFont,
void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
INT16 sForeColor, INT16 sShadowColor,
INT16 sForeColorDown, INT16 sShadowColorDown, INT8 bJustification )
{
@@ -2383,7 +2385,7 @@ void SpecifyFullButtonTextAttributes( INT32 iButtonID, UINT16 *string, INT32 uiF
b->uiFlags |= BUTTON_DIRTY ;
}
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, UINT16 *string, INT32 uiFont,
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
INT16 sForeColor, INT16 sShadowColor )
{
GUI_BUTTON *b;
@@ -2540,7 +2542,7 @@ void AllowDisabledButtonFastHelp( INT32 iButtonID, BOOLEAN fAllow )
//
// Set the text that will be displayed as the FastHelp
//
void SetButtonFastHelpText(INT32 iButton, UINT16 * Text)
void SetButtonFastHelpText(INT32 iButton, wchar_t * Text)
{
GUI_BUTTON *b;
if(iButton<0 || iButton>MAX_BUTTONS)
@@ -3947,7 +3949,7 @@ BOOLEAN SetDialogAttributes( CreateDlgInfo *pDlgInfo, INT32 iAttrib, ... )
{
va_list arg;
INT32 iFont,iFontOptions;
UINT16 *zString;
wchar_t *zString;
INT32 iX,iY,iW,iH;
INT32 iIndex;
HVOBJECT hVObj;
@@ -3998,7 +4000,7 @@ BOOLEAN SetDialogAttributes( CreateDlgInfo *pDlgInfo, INT32 iAttrib, ... )
iFont = va_arg( arg, INT32 );
pDlgInfo->iTextFont = iFont;
zString = (UINT16 *)va_arg( arg, UINT32 );
zString = (wchar_t *)va_arg( arg, UINT32 );
if ( pDlgInfo->zDlgText != NULL )
MemFree( pDlgInfo->zDlgText );
+7 -7
View File
@@ -116,7 +116,7 @@ typedef struct _GUI_BUTTON {
//Button disabled style
INT8 bDisabledStyle;
//For buttons with text
UINT16 *string; //the string
wchar_t *string; //the string
UINT16 usFont; //font for text
BOOLEAN fMultiColor; //font is a multi-color font
INT16 sForeColor; //text colors if there is text
@@ -184,7 +184,7 @@ INT16 FindFreeIconSlot(void);
INT32 GetNextButtonNumber(void);
// Now used by Wizardry -- DB
void SetButtonFastHelpText(INT32 iButton, UINT16 * Text);
void SetButtonFastHelpText(INT32 iButton, wchar_t * Text);
#ifdef _JA2_RENDER_DIRTY
void SetBtnHelpEndCallback( INT32 iButton, MOUSE_HELPTEXT_DONE_CALLBACK CallbackFxn );
@@ -265,7 +265,7 @@ INT32 CreateCheckBoxButton( INT16 x, INT16 y, string3 filename, INT16 Priority,
INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16 yloc,INT16 w,INT16 h,INT32 Type,INT16 Priority,GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
INT32 CreateHotSpot(INT16 xloc, INT16 yloc, INT16 Width, INT16 Height,INT16 Priority,GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
INT32 CreateTextButton(UINT16 *string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback);
INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback);
template <typename string2>
INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
INT16 sForeColor, INT16 sShadowColor,
@@ -275,19 +275,19 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
//New functions
void SpecifyButtonText( INT32 iButtonID, UINT16 * string );
void SpecifyButtonText( INT32 iButtonID, wchar_t * string );
void SpecifyButtonFont( INT32 iButtonID, UINT32 uiFont );
void SpecifyButtonMultiColorFont(INT32 iButtonID, BOOLEAN fMultiColor);
void SpecifyButtonUpTextColors( INT32 iButtonID, INT16 sForeColor, INT16 sShadowColor );
void SpecifyButtonDownTextColors( INT32 iButtonID, INT16 sForeColorDown, INT16 sShadowColorDown );
void SpecifyButtonHilitedTextColors( INT32 iButtonID, INT16 sForeColorHilited, INT16 sShadowColorHilited );
void SpecifyButtonTextJustification( INT32 iButtonID, INT8 bJustification );
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, UINT16 *string, INT32 uiFont,
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
INT16 sForeColor, INT16 sShadowColor );
void SpecifyFullButtonTextAttributes( INT32 iButtonID, UINT16 *string, INT32 uiFont,
void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
INT16 sForeColor, INT16 sShadowColor,
INT16 sForeColorDown, INT16 sShadowColorDown, INT8 bJustification );
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, UINT16 *string, INT32 uiFont,
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
INT16 sForeColor, INT16 sShadowColor );
void SpecifyButtonTextOffsets( INT32 iButtonID, INT8 bTextXOffset, INT8 bTextYOffset, BOOLEAN fShiftText );
void SpecifyButtonTextSubOffsets( INT32 iButtonID, INT8 bTextXOffset, INT8 bTextYOffset, BOOLEAN fShiftText );
+16 -1
View File
@@ -17,6 +17,10 @@
// Because we're in a library, define SGP_DEBUG here - the client may not always
// use the code to write text, because the header switches on the define
#define SGP_DEBUG
//#undef _DEBUG
// WDS: Note: To compile with VS2005 in release mode you might have to not define SGP_DEBUG and
// undefine _DEBUG or you get linker errors.
#ifdef JA2_PRECOMPILED_HEADERS
@@ -70,8 +74,16 @@ UINT8 gubAssertString[128];
UINT8 gbTmpDebugString[8][MAX_MSG_LENGTH2];
UINT8 gubStringIndex = 0;
#ifdef __cplusplus
}
#endif
#ifdef SGP_DEBUG
#ifdef __cplusplus
extern "C" {
#endif
//**************************************************************************
//
// Defines
@@ -501,9 +513,9 @@ template void _FailMessage<unsigned char *, char const *>(unsigned char *, unsig
template <typename type1, typename type2>
void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
{
MSG Message;
UINT8 ubOutputString[512];
#ifndef _NO_DEBUG_TXT
MSG Message;
FILE *DebugFile;
#endif
BOOLEAN fDone = FALSE;
@@ -613,6 +625,9 @@ void _FailMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
#endif
#else
BOOLEAN DbgInitialize(void) { return true; };
void DbgShutdown(void) {};
#endif
// This is NOT a _DEBUG only function! It is also needed in
+29 -16
View File
@@ -419,7 +419,7 @@ UINT32 GetWidth(HVOBJECT hSrcVObject, INT16 ssIndex)
// evaluate to is 512.
// 'uiCharCount' specifies how many characters of the string are counted.
//*****************************************************************************
INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, UINT16 *pFontString, ...)
INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, wchar_t *pFontString, ...)
{
va_list argptr;
wchar_t string[512];
@@ -457,12 +457,12 @@ wchar_t string[512];
// 'uiCharCount' specifies how many characters of the string are counted.
// YOU HAVE TO PREBUILD THE FAST HELP STRING!
//*****************************************************************************
INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, UINT16 *pFontString )
INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, wchar_t *pFontString )
{
wchar_t string[512];
UINT32 i, index;
INT16 sBoldDiff = 0;
UINT16 str[2];
wchar_t str[2];
Assert(pFontString!=NULL);
@@ -518,10 +518,10 @@ INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCha
// Created on: 12/1/99
//
//*****************************************************************************************
INT16 StringNPixLength(UINT16 *string, UINT32 uiMaxCount, INT32 UseFont)
INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont)
{
UINT32 Cur, uiCharCount;
UINT16 *curletter,transletter;
wchar_t *curletter,transletter;
Cur = 0;
uiCharCount = 0;
@@ -545,6 +545,7 @@ INT16 StringNPixLength(UINT16 *string, UINT32 uiMaxCount, INT32 UseFont)
//*****************************************************************************
template INT16 StringPixLength<short *>(short *, INT32);
template INT16 StringPixLength<unsigned short const *>(unsigned short const *, INT32);
template INT16 StringPixLength<wchar_t const *>(wchar_t const *, INT32);
template <typename type1>
INT16 StringPixLength(type1 string, INT32 UseFont)
{
@@ -730,6 +731,8 @@ BOOLEAN SetFontDestBuffer(UINT32 DestBuffer, INT32 x1, INT32 y1, INT32 x2, INT32
// the parameters are identical to printf. The resulting string may be no longer
// than 512 word-characters. Uses monochrome font color settings
//*****************************************************************************
template UINT32 mprintf<wchar_t *>(INT32, INT32, wchar_t *, ...);
template UINT32 mprintf<wchar_t const *>(INT32, INT32, wchar_t const *, ...);
template UINT32 mprintf<short *>(INT32, INT32, short *, ...);
template UINT32 mprintf<unsigned short *>(INT32, INT32, unsigned short *, ...);
template UINT32 mprintf<unsigned short const *>(INT32, INT32, unsigned short const *, ...);
@@ -737,7 +740,7 @@ template <typename type3>
UINT32 mprintf(INT32 x, INT32 y, type3 pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
UINT32 uiDestPitchBYTES;
@@ -787,6 +790,8 @@ UINT8 *pDestBuf;
template void VarFindFontRightCoordinates<short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, short *, ...);
template void VarFindFontRightCoordinates<unsigned short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, unsigned short *, ...);
template void VarFindFontRightCoordinates<wchar_t *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t *, ...);
template void VarFindFontRightCoordinates<wchar_t const *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t const *, ...);
template <typename type8>
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... )
{
@@ -800,6 +805,8 @@ void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 s
FindFontRightCoordinates( sLeft, sTop, sWidth, sHeight, string, iFontIndex, psNewX, psNewY );
}
template void VarFindFontCenterCoordinates<wchar_t *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t *, ...);
template void VarFindFontCenterCoordinates<wchar_t const *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t const*, ...);
template void VarFindFontCenterCoordinates<short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, short *, ...);
template void VarFindFontCenterCoordinates<unsigned short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, unsigned short *, ...);
template void VarFindFontCenterCoordinates<unsigned short const *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, unsigned short const*, ...);
@@ -816,10 +823,12 @@ void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16
FindFontCenterCoordinates( sLeft, sTop, sWidth, sHeight, string, iFontIndex, psNewX, psNewY );
}
template void FindFontRightCoordinates<wchar_t *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, unsigned short *, unsigned short *);
template void FindFontRightCoordinates<short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, short *, INT32, unsigned short *, unsigned short *);
template void FindFontRightCoordinates<short *, short *, unsigned short *>(INT16, INT16, INT16, INT16, short *, INT32, short *, unsigned short *);
template void FindFontRightCoordinates<unsigned short *, short *, short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, short *, short *);
template void FindFontRightCoordinates<unsigned short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, unsigned short *, unsigned short *);
template void FindFontRightCoordinates<wchar_t *, wchar_t *, wchar_t *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, wchar_t *, wchar_t *);
template <typename string5, typename string7, typename string8>
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, string5 pStr, INT32 iFontIndex, string7 psNewX, string8 psNewY )
{
@@ -833,10 +842,12 @@ void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHei
*psNewY = yp;
}
template void FindFontCenterCoordinates<wchar_t *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, unsigned short *, unsigned short *);
template void FindFontCenterCoordinates<short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, short *, INT32, unsigned short *, unsigned short *);
template void FindFontCenterCoordinates<unsigned short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, unsigned short *, unsigned short *);
template void FindFontCenterCoordinates<unsigned short *, short *, short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, short *, short *);
template void FindFontCenterCoordinates<short *, short *, short *>(INT16, INT16, INT16, INT16, short *, INT32, short *, short *);
template void FindFontCenterCoordinates<wchar_t *, wchar_t *, wchar_t *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, wchar_t *, wchar_t *);
template <typename string5, typename string7, typename string8>
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, string5 pStr, INT32 iFontIndex, string7 psNewX, string8 psNewY )
{
@@ -858,10 +869,10 @@ void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHe
// the parameters are identical to printf. The resulting string may be no longer
// than 512 word-characters.
//*****************************************************************************
UINT32 gprintf(INT32 x, INT32 y, UINT16 *pFontString, ...)
UINT32 gprintf(INT32 x, INT32 y, wchar_t *pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
UINT32 uiDestPitchBYTES;
@@ -909,10 +920,10 @@ UINT8 *pDestBuf;
return(0);
}
UINT32 gprintfDirty(INT32 x, INT32 y, UINT16 *pFontString, ...)
UINT32 gprintfDirty(INT32 x, INT32 y, wchar_t *pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
UINT32 uiDestPitchBYTES;
@@ -978,10 +989,10 @@ UINT8 *pDestBuf;
// the parameters are identical to printf. The resulting string may be no longer
// than 512 word-characters.
//*****************************************************************************
UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, UINT16 *pFontString, ...)
UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, wchar_t *pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
@@ -1025,11 +1036,13 @@ wchar_t string[512];
template UINT32 mprintf_buffer<short *>(UINT8 *, UINT32, UINT32, INT32, INT32, short *, ...);
template UINT32 mprintf_buffer<unsigned short *>(UINT8 *, UINT32, UINT32, INT32, INT32, unsigned short *, ...);
template UINT32 mprintf_buffer<unsigned short const*>(UINT8 *, UINT32, UINT32, INT32, INT32, unsigned short const*, ...);
template UINT32 mprintf_buffer<wchar_t *>(UINT8 *, UINT32, UINT32, INT32, INT32, wchar_t *, ...);
template UINT32 mprintf_buffer<wchar_t const*>(UINT8 *, UINT32, UINT32, INT32, INT32, wchar_t const*, ...);
template <typename string6>
UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
@@ -1074,7 +1087,7 @@ template <typename string6>
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
UINT16 usOldForeColor;
@@ -1131,10 +1144,10 @@ UINT16 usOldForeColor;
}
UINT32 mprintf_coded( INT32 x, INT32 y, UINT16 *pFontString, ...)
UINT32 mprintf_coded( INT32 x, INT32 y, wchar_t *pFontString, ...)
{
INT32 destx, desty;
UINT16 *curletter, transletter;
wchar_t *curletter, transletter;
va_list argptr;
wchar_t string[512];
UINT16 usOldForeColor;
+7 -7
View File
@@ -123,11 +123,11 @@ UINT16 *GetFontObjectPalette16BPP(INT32 iFont);
void DestroyEnglishTransTable( void );
extern HVOBJECT GetFontObject(INT32 iFont);
extern UINT32 gprintf(INT32 x, INT32 y, UINT16 *pFontString, ...);
extern UINT32 gprintfDirty(INT32 x, INT32 y, UINT16 *pFontString, ...);
extern UINT32 gprintf(INT32 x, INT32 y, wchar_t *pFontString, ...);
extern UINT32 gprintfDirty(INT32 x, INT32 y, wchar_t *pFontString, ...);
template <typename type3>
extern UINT32 mprintf(INT32 x, INT32 y, type3 pFontString, ...);
extern UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, UINT16 *pFontString, ...);
extern UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, wchar_t *pFontString, ...);
template <typename string6>
extern UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...);
@@ -137,7 +137,7 @@ extern UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 F
template <typename string6>
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...);
UINT32 mprintf_coded( INT32 x, INT32 y, UINT16 *pFontString, ...);
UINT32 mprintf_coded( INT32 x, INT32 y, wchar_t *pFontString, ...);
extern BOOLEAN SetFontDestBuffer(UINT32 DestBuffer, INT32 x1, INT32 y1, INT32 x2, INT32 y2, BOOLEAN wrap);
@@ -155,12 +155,12 @@ extern FontTranslationTable *CreateEnglishTransTable( );
extern INT16 GetIndex(UINT16 siChar);
extern UINT32 GetWidth(HVOBJECT hSrcVObject, INT16 ssIndex);
extern INT16 StringPixLengthArgFastHelp( INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, UINT16 *pFontString );
extern INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, UINT16 *pFontString, ...);
extern INT16 StringPixLengthArgFastHelp( INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, wchar_t *pFontString );
extern INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, wchar_t *pFontString, ...);
template <typename type1>
extern INT16 StringPixLength(type1 string,INT32 UseFont);
extern INT16 StringNPixLength(UINT16 *string, UINT32 uiMaxCount, INT32 UseFont);
extern INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont);
extern void SaveFontSettings(void);
extern void RestoreFontSettings(void);
+5 -5
View File
@@ -108,7 +108,7 @@ HWINFONT *GetWinFont( INT32 iFont )
}
}
UINT16 gzFontName[32];
wchar_t gzFontName[32];
INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
INT32 iWeight, BOOLEAN fItalic, BOOLEAN fUnderline, BOOLEAN fStrikeOut, STR16 szFontName, INT32 iCharSet )
@@ -191,7 +191,7 @@ void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor )
}
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, UINT16 *pFontString, ...)
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...)
{
va_list argptr;
wchar_t string2[512];
@@ -240,7 +240,7 @@ void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, UINT16 *pFon
}
INT16 WinFontStringPixLength( UINT16 *string2, INT32 iFont )
INT16 WinFontStringPixLength( wchar_t *string2, INT32 iFont )
{
HWINFONT *pWinFont;
HDC hdc;
@@ -269,7 +269,7 @@ INT16 WinFontStringPixLength( UINT16 *string2, INT32 iFont )
}
INT16 GetWinFontHeight( UINT16 *string2, INT32 iFont )
INT16 GetWinFontHeight( wchar_t *string2, INT32 iFont )
{
HWINFONT *pWinFont;
HDC hdc;
@@ -297,7 +297,7 @@ INT16 GetWinFontHeight( UINT16 *string2, INT32 iFont )
return( (INT16)RectSize.cy );
}
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, UINT16 *pFontString, ...)
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...)
{
va_list argptr;
wchar_t string[512];
+4 -4
View File
@@ -11,11 +11,11 @@ void DeleteWinFont( INT32 iFont );
void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor );
void SetWinFontForeColor( INT32 iFont, COLORVAL *pColor );
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, UINT16 *pFontString, ...);
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...);
INT16 WinFontStringPixLength( UINT16 *string, INT32 iFont );
INT16 GetWinFontHeight( UINT16 *string, INT32 iFont );
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, UINT16 *pFontString, ...);
INT16 WinFontStringPixLength( wchar_t *string, INT32 iFont );
INT16 GetWinFontHeight( wchar_t *string, INT32 iFont );
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...);
BOOLEAN DoesWinFontExistOnSystem( STR16 pTypeFaceName, INT32 iCharSet );
+3 -1
View File
@@ -1234,6 +1234,8 @@ void RefreshMouseRegions( )
}
template void SetRegionFastHelpText<wchar_t *>(MOUSE_REGION *, wchar_t *);
template void SetRegionFastHelpText<wchar_t const*>(MOUSE_REGION *, wchar_t const*);
template void SetRegionFastHelpText<short *>(MOUSE_REGION *, short *);
template void SetRegionFastHelpText<unsigned short *>(MOUSE_REGION *, unsigned short *);
template void SetRegionFastHelpText<unsigned short const*>(MOUSE_REGION *, unsigned short const*);
@@ -1257,7 +1259,7 @@ void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
return; //blank (or clear)
// Allocate memory for the button's FastHelp text string...
region->FastHelpText = (UINT16*)MemAlloc( (wcslen( (wchar_t *)szText ) + 1) * sizeof(UINT16) );
region->FastHelpText = (wchar_t*)MemAlloc( (wcslen( (wchar_t *)szText ) + 1) * sizeof(wchar_t) );
Assert( region->FastHelpText );
wcscpy( region->FastHelpText, szText );
+1 -1
View File
@@ -54,7 +54,7 @@ typedef struct _MOUSE_REGION {
//Fast help vars.
INT16 FastHelpTimer; // Countdown timer for FastHelp text
UINT16 *FastHelpText; // Text string for the FastHelp (describes buttons if left there a while)
wchar_t *FastHelpText; // Text string for the FastHelp (describes buttons if left there a while)
INT32 FastHelpRect;
MOUSE_HELPTEXT_DONE_CALLBACK HelpDoneCallback;
+4 -4
View File
@@ -223,7 +223,7 @@ UINT16 gwGroupTypeString[ NUM_ENEMY_INTENTIONS ][ 20 ] =
};
void StringFromValue( UINT16 *str, INT32 iValue, UINT32 uiMax )
void StringFromValue( wchar_t *str, INT32 iValue, UINT32 uiMax )
{
if( iValue < 0 ) //a blank string is determined by a negative value.
str[0] = '\0';
@@ -236,7 +236,7 @@ void StringFromValue( UINT16 *str, INT32 iValue, UINT32 uiMax )
BOOLEAN CreateAIViewer()
{
VOBJECT_DESC VObjectDesc;
UINT16 str[6];
wchar_t str[6];
//Kaiden: Loading INI file to read Values...
// Here's another one of those INI reads
@@ -447,7 +447,7 @@ void RenderStationaryGroups()
HVOBJECT hVObject;
SECTORINFO *pSector;
INT32 x, y, xp, yp;
UINT16 str[20];
wchar_t str[20];
INT32 iSector = 0;
UINT8 ubIconColor;
UINT8 ubGroupSize = 0;
@@ -851,7 +851,7 @@ void RenderViewer()
}
for( x = 1; x <= 16; x++ )
{
UINT16 str[3];
wchar_t str[3];
if( x == gsSelSectorX )
SetFontForeground( FONT_RED );
else if( x == gsHiSectorX )
+1 -1
View File
@@ -7078,7 +7078,7 @@ void ContractMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
}
else
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gzLateLocalizedString[ 48 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, MercDismissConfirmCallBack );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 48 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, MercDismissConfirmCallBack );
}
fOkToClose = TRUE;
+3 -3
View File
@@ -1654,7 +1654,7 @@ void RenderAutoResolve()
INT32 xp, yp;
SOLDIERCELL *pCell = NULL;
INT32 index = 0;
UINT16 str[100];
wchar_t str[100];
UINT8 bTownId = 0;
UINT8 ubGood, ubBad;
@@ -3293,8 +3293,8 @@ void RenderSoldierCellHealth( SOLDIERCELL *pCell )
{
INT32 cnt, cntStart;
INT32 xp, yp;
UINT16 *pStr;
UINT16 str[20];
wchar_t *pStr;
wchar_t str[20];
UINT8 *pDestBuf, *pSrcBuf;
UINT32 uiSrcPitchBYTES, uiDestPitchBYTES;
UINT16 usColor;
+1 -1
View File
@@ -407,7 +407,7 @@ void InitCreatureQuest()
default:
#ifdef JA2BETAVERSION
{
UINT16 str[512];
wchar_t str[512];
swprintf( str, L"Creature quest never chose a lair and won't infect any mines. Infectible mines = %d, iRandom = %d. "
L"This isn't a bug if you are not receiving income from any mines.", iNumMinesInfectible, iOrigRandom );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
+1 -1
View File
@@ -82,7 +82,7 @@ INT32 iPausedPopUpBox = -1;
UINT32 guiDay;
UINT32 guiHour;
UINT32 guiMin;
UINT16 gswzWorldTimeStr[20];
wchar_t gswzWorldTimeStr[20];
INT32 giTimeCompressSpeeds[ NUM_TIME_COMPRESS_SPEEDS ] = { 0, 1, 5 * 60, 30 * 60, 60 * 60 };
UINT16 usPausedActualWidth;
UINT16 usPausedActualHeight;
+1 -1
View File
@@ -123,7 +123,7 @@ void AdvanceToNextDay();
void UpdateClock();
extern UINT16 gswzWorldTimeStr[ 20 ]; //Day 99, 23:55
extern wchar_t gswzWorldTimeStr[ 20 ]; //Day 99, 23:55
extern UINT32 guiDay;
extern UINT32 guiHour;
+1 -1
View File
@@ -1618,7 +1618,7 @@ void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
if( !CanGameBeSaved() )
{
//Display a message saying the player cant save now
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zNewTacticalMessages[ TCTL_MSG__IRON_MAN_CANT_SAVE_NOW ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, zNewTacticalMessages[ TCTL_MSG__IRON_MAN_CANT_SAVE_NOW ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
}
@@ -463,7 +463,7 @@ void UpdateHelpTextForInvnentoryStashSlots( void )
{
if( pInventoryPoolList[ iCounter + iFirstSlotOnPage ].o.ubNumberOfObjects > 0 )
{
GetHelpTextForItem( (INT16 *)pStr , &( pInventoryPoolList[ iCounter + iFirstSlotOnPage ].o ), NULL );
GetHelpTextForItem( pStr , &( pInventoryPoolList[ iCounter + iFirstSlotOnPage ].o ), NULL );
SetRegionFastHelpText( &(MapInventoryPoolSlots[ iCounter ] ), pStr );
/*
@@ -836,7 +836,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
if ( pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ].o.usItem != NOTHING )
{
// not reachable
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gzLateLocalizedString[38], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[38], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
}
@@ -847,7 +847,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
// valid character?
if( gCharactersList[ bSelectedInfoChar ].fValid == FALSE )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapInventoryErrorString[ 1 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapInventoryErrorString[ 1 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
@@ -869,7 +869,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
{
swprintf( sString, pMapInventoryErrorString[ 5 ], Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].name );
}
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
}
@@ -888,7 +888,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
// if( ( ( gTacticalStatus.fEnemyInSector ) ||( ( sSelMapX == gWorldSectorX ) && ( sSelMapY == gWorldSectorY ) && ( iCurrentMapSectorZ == gbWorldSectorZ ) && ( gTacticalStatus.uiFlags & INCOMBAT ) ) ) )
if( !CanPlayerUseSectorInventory( &Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ] ) )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapInventoryErrorString[ 3 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapInventoryErrorString[ 3 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
@@ -921,7 +921,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
// if( ( gTacticalStatus.fEnemyInSector ) ||( ( sSelMapX == gWorldSectorX ) && ( sSelMapY == gWorldSectorY ) && ( iCurrentMapSectorZ == gbWorldSectorZ ) && ( gTacticalStatus.uiFlags & INCOMBAT ) ) )
if( !CanPlayerUseSectorInventory( &Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ] ) )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapInventoryErrorString[ 4 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapInventoryErrorString[ 4 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
+4 -4
View File
@@ -1149,14 +1149,14 @@ void ActivateSoldierPopup( SOLDIERTYPE *pSoldier, UINT8 ubPopupType, INT16 xp, I
INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
{ // reset the highlighted line
giHighLine = -1;
return DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags | MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, pCenteringRect );
}
INT32 DoMapMessageBox( UINT8 ubStyle, INT16 * zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
INT32 DoMapMessageBox( UINT8 ubStyle, wchar_t * zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
// WANNE 2
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y };
@@ -6142,11 +6142,11 @@ void ReportMapScreenMovementError( INT8 bErrorNumber )
if ( bErrorNumber == -99 )
{
// - 99 is a special message # indicating a customized message
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gsCustomErrorString, MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gsCustomErrorString, MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
else
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapErrorString[ bErrorNumber ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapErrorString[ bErrorNumber ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
}
+1 -1
View File
@@ -391,7 +391,7 @@ void EnableTeamInfoPanels( void );
void ActivateSoldierPopup( SOLDIERTYPE *pSoldier, UINT8 ubPopupType, INT16 xp, INT16 yp );
// do mapscreen message box
INT32 DoMapMessageBox( UINT8 ubStyle, INT16 * zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
INT32 DoMapMessageBox( UINT8 ubStyle, wchar_t * zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
// hop up one leve,l int he map screen level interface
void GoUpOneLevelInMap( void );
+1 -1
View File
@@ -350,7 +350,7 @@ BOOLEAN BeginMeanwhile( UINT8 ubMeanwhileID )
void BringupMeanwhileBox( )
{
INT16 zStr[256];
wchar_t zStr[256];
#ifdef JA2TESTVERSION
swprintf( (wchar_t *)zStr, (wchar_t *)L"Meanwhile..... ( %S : Remember to make sure towns are controlled if required by script )", gzMeanwhileStr[ gCurrentMeanwhileDef.ubMeanwhileID ] );
+2 -2
View File
@@ -1138,11 +1138,11 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
if( fInSector == FALSE )
{
// set up for mapscreen
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_GENERICCONTRACT : MSG_BOX_FLAG_GENERIC ) ), MercDepartEquipmentBoxCallBack );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_GENERICCONTRACT : MSG_BOX_FLAG_GENERIC ) ), MercDepartEquipmentBoxCallBack );
}
else
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_OKCONTRACT : MSG_BOX_FLAG_OK ) ), MercDepartEquipmentBoxCallBack );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_OKCONTRACT : MSG_BOX_FLAG_OK ) ), MercDepartEquipmentBoxCallBack );
}
}
+6 -6
View File
@@ -89,7 +89,7 @@ void AutoResolveBattleCallback( GUI_BUTTON *btn, INT32 reason );
void GoToSectorCallback( GUI_BUTTON *btn, INT32 reason );
void RetreatMercsCallback( GUI_BUTTON *btn, INT32 reason );
void GetSoldierConditionInfo( SOLDIERTYPE *pSoldier, UINT16 *szCondition, UINT8 *pubHPPercent, UINT8 *pubBPPercent );
void GetSoldierConditionInfo( SOLDIERTYPE *pSoldier, wchar_t *szCondition, UINT8 *pubHPPercent, UINT8 *pubBPPercent );
void CheckForRobotAndIfItsControlled( void );
@@ -213,7 +213,7 @@ void ValidateAndCorrectInBattleCounters( GROUP *pLocGroup )
if( ubInvalidGroups || pSector->ubAdminsInBattle || pSector->ubTroopsInBattle || pSector->ubElitesInBattle || pSector->ubCreaturesInBattle )
{
UINT16 str[ 512 ];
wchar_t str[ 512 ];
swprintf( str, L"Strategic info warning: Sector 'in battle' counters are not clear when they should be. "
L"If you can provide information on how a previous battle was resolved here or nearby patrol "
L"(auto resolve, tactical battle, cheat keys, or retreat),"
@@ -904,7 +904,7 @@ void KillPreBattleInterface()
void RenderPBHeader( INT32 *piX, INT32 *piWidth)
{
UINT16 str[100];
wchar_t str[100];
INT32 x, width;
SetFont( FONT10ARIALBOLD );
if( gfBlinkHeader )
@@ -967,8 +967,8 @@ void RenderPreBattleInterface()
GROUP *pGroup;
HVOBJECT hVObject;
INT32 i, x, y, line, width;
UINT16 str[100];
UINT16 pSectorName[ 128 ];
wchar_t str[100];
wchar_t pSectorName[ 128 ];
UINT8 ubHPPercent, ubBPPercent;
BOOLEAN fMouseInRetreatButtonArea;
UINT8 ubJunk;
@@ -1417,7 +1417,7 @@ enum
COND_DEAD
};
void GetSoldierConditionInfo( SOLDIERTYPE *pSoldier, UINT16 *szCondition, UINT8 *pubHPPercent, UINT8 *pubBPPercent )
void GetSoldierConditionInfo( SOLDIERTYPE *pSoldier, wchar_t *szCondition, UINT8 *pubHPPercent, UINT8 *pubBPPercent )
{
Assert( pSoldier );
*pubHPPercent = (UINT8)(pSoldier->bLife * 100 / pSoldier->bLifeMax);
+4 -4
View File
@@ -81,7 +81,7 @@ void ValidateEnemiesHaveWeapons()
// do message box and return
if( iNumInvalid )
{
UINT16 str[ 100 ];
wchar_t str[ 100 ];
swprintf( str, L"%d enemies have been added without any weapons! KM:0. Please note sector.", iNumInvalid );
iErrorDialog = DoMessageBox( MSG_BOX_BASIC_STYLE, str, GAME_SCREEN, MSG_BOX_FLAG_OK, NULL, &CenteringRect );
}
@@ -713,7 +713,7 @@ void ProcessQueenCmdImplicationsOfDeath( SOLDIERTYPE *pSoldier )
{
INT32 iNumEnemiesInSector;
SECTORINFO *pSector;
// UINT16 str[128];
// wchar_t str[128];
INT32 iMaxEnemyGroupSize = gGameExternalOptions.iMaxEnemyGroupSize;
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"QueenCommand");
@@ -766,7 +766,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"QueenCommand");
if( !pGroup )
{
#ifdef JA2BETAVERSION
UINT16 str[256];
wchar_t str[256];
swprintf( str, L"Enemy soldier killed with ubGroupID of %d, and the group doesn't exist!", pSoldier->ubGroupID );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
#endif
@@ -775,7 +775,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"QueenCommand");
if( pGroup->fPlayer )
{
#ifdef JA2BETAVERSION
UINT16 str[256];
wchar_t str[256];
swprintf( str, L"Attempting to process player group thinking it's an enemy group in ProcessQueenCmdImplicationsOfDeath()", pSoldier->ubGroupID );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
#endif
+12 -12
View File
@@ -626,7 +626,7 @@ void ChangeFactState( INT32 iNumber );
void DisplayCurrentGridNo();
void EnableQDSButtons();
BOOLEAN DoQDSMessageBox( UINT8 ubStyle, INT16 * zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
BOOLEAN DoQDSMessageBox( UINT8 ubStyle, wchar_t * zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
void IncrementActiveDropDownBox( INT16 sIncrementValue );
INT16 IsMercInTheSector( UINT16 usMercID );
void RefreshAllNPCInventory();
@@ -1038,7 +1038,7 @@ BOOLEAN EnterQuestDebugSystem()
if( giHaveSelectedNPC != -1 )
{
UINT16 zItemDesc[ SIZE_ITEM_INFO ];
wchar_t zItemDesc[ SIZE_ITEM_INFO ];
if( gfUseLocalNPCs )
swprintf( zItemDesc, L"%d - %s", gubCurrentNpcInSector[ giHaveSelectedNPC ], gMercProfiles[ gubCurrentNpcInSector[ giHaveSelectedNPC ] ].zNickname );
@@ -1053,8 +1053,8 @@ BOOLEAN EnterQuestDebugSystem()
if( giHaveSelectedItem != -1 )
{
UINT16 zItemName[ SIZE_ITEM_NAME ];
UINT16 zItemDesc[ SIZE_ITEM_INFO ];
wchar_t zItemName[ SIZE_ITEM_NAME ];
wchar_t zItemDesc[ SIZE_ITEM_INFO ];
wcscpy( zItemName, ShortItemNames[ giHaveSelectedItem ] );
@@ -1388,7 +1388,7 @@ void GetUserInput()
// toggle whether dropped items are damaged or not
gfDropDamagedItems ^= 1;
swprintf( zTemp, L"Items dropped will be in %s condition", gfDropDamagedItems ? L"DAMAGED" : L"PERFECT" );
DoQDSMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoQDSMessageBox( MSG_BOX_BASIC_STYLE, zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
}
break;
}
@@ -2045,8 +2045,8 @@ void DisplaySelectedItem()
UINT16 i;
UINT16 usPosX, usPosY;
UINT16 usFontHeight = GetFontHeight( QUEST_DBS_FONT_LISTBOX_TEXT ) + 2;
UINT16 zItemName[ SIZE_ITEM_NAME ];
// UINT16 zItemDesc[ SIZE_ITEM_INFO ];
wchar_t zItemName[ SIZE_ITEM_NAME ];
// wchar_t zItemDesc[ SIZE_ITEM_INFO ];
wchar_t zButtonName[ 256 ];
@@ -2661,7 +2661,7 @@ void BtnQuestDebugNPCRefreshButtonButtonCallback(GUI_BUTTON *btn,INT32 reason)
swprintf( zTemp, L"%s %s", QuestDebugText[ QUEST_DBS_REFRESH_FAILED ], gMercProfiles[ ubMercID ].zNickname );
}
DoQDSMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoQDSMessageBox( MSG_BOX_BASIC_STYLE, zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
btn->uiFlags &= (~BUTTON_CLICKED_ON );
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
@@ -3120,8 +3120,8 @@ void CreateDestroyDisplayNPCInventoryPopup( UINT8 ubAction )
case QD_DROP_DOWN_DISPLAY:
{
UINT16 zItemName[ SIZE_ITEM_NAME ];
// UINT16 zItemDesc[ SIZE_ITEM_INFO ];
wchar_t zItemName[ SIZE_ITEM_NAME ];
// wchar_t zItemDesc[ SIZE_ITEM_INFO ];
UINT16 usFontHeight = GetFontHeight( QUEST_DBS_FONT_LISTBOX_TEXT ) + 2;
@@ -3565,7 +3565,7 @@ void EnableQDSButtons()
*/
}
BOOLEAN DoQDSMessageBox( UINT8 ubStyle, INT16 * zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback )
BOOLEAN DoQDSMessageBox( UINT8 ubStyle, wchar_t * zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect pCenteringRect= {0, 0, 639, 479 };
@@ -3706,7 +3706,7 @@ void StartMercTalkingFromQuoteNum( INT32 iQuoteToStartTalkingFrom )
if( iQuoteToStartTalkingFrom < 0 || iQuoteToStartTalkingFrom > uiMaxNumberOfQuotes )
{
swprintf( zTemp, L"Please enter a value between 0 and %d", uiMaxNumberOfQuotes );
DoQDSMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoQDSMessageBox( MSG_BOX_BASIC_STYLE, zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
}
else
{
+6 -6
View File
@@ -707,7 +707,7 @@ void ValidatePendingGroups()
}
if( iErrorsForInvalidPendingGroup )
{
UINT16 str[256];
wchar_t str[256];
swprintf( str, L"Strategic AI: Internal error -- %d pending groups were discovered to be invalid. Please report error and send save."
L"You can continue playing, as this has been auto-corrected. No need to send any debug files.", iErrorsForInvalidPendingGroup );
SAIReportError( str );
@@ -742,7 +742,7 @@ void ValidateWeights( INT32 iID )
if( giReinforcementPoints != iSumReinforcementPoints || giRequestPoints != iSumRequestPoints )
{
UINT16 str[256];
wchar_t str[256];
swprintf( str, L"Strategic AI: Internal error #%02d (total request/reinforcement points). Please report error including error#. "
L"You can continue playing, as the points have been auto-corrected. No need to send any save/debug files.", iID );
//Correct the misalignment.
@@ -770,7 +770,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic2");
{
#ifdef JA2BETAVERSION
{
UINT16 str[256];
wchar_t str[256];
swprintf( str, L"Strategic AI: Internal error (invalid enemy group #%d location at %c%d, destination %c%d). Please send PRIOR save file and Strategic Decisions.txt.",
pGroup->ubGroupID, pGroup->ubSectorY + 'A' - 1, pGroup->ubSectorX, pGroup->ubNextY + 'A' - 1, pGroup->ubNextX );
SAIReportError( str );
@@ -811,7 +811,7 @@ void ValidateLargeGroup( GROUP *pGroup )
#ifdef JA2BETAVERSION
if( pGroup->ubGroupSize > 25 )
{
UINT16 str[ 512 ];
wchar_t str[ 512 ];
swprintf( str, L"Strategic AI warning: Enemy group containing %d soldiers "
L"(%d admins, %d troops, %d elites) in sector %c%d. This message is a temporary test message "
L"to evaluate a potential problems with very large enemy groups.",
@@ -868,7 +868,7 @@ void ValidatePlayersAreInOneGroupOnly()
GROUP *pGroup, *pOtherGroup;
PLAYERGROUP *pPlayer;
SOLDIERTYPE *pSoldier;
UINT16 str[ 1024 ];
wchar_t str[ 1024 ];
UINT8 ubGroupID;
//Go through each merc slot in the player team
iNumErrors = 0;
@@ -2090,7 +2090,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic5");
{
UINT8 ubCut;
#ifdef JA2BETAVERSION
UINT16 str[512];
wchar_t str[512];
swprintf( str, L"Patrol group #%d in %c%d received too many reinforcements from group #%d that was created in %c%d. Size truncated from %d to %d."
L"Please send Strategic Decisions.txt and PRIOR save.",
pPatrolGroup->ubGroupID, pPatrolGroup->ubSectorY + 'A' - 1, pPatrolGroup->ubSectorX,
+12 -12
View File
@@ -698,7 +698,7 @@ GROUP* CreateNewEnemyGroupDepartingFromSector( UINT32 uiSector, UINT8 ubNumAdmin
#ifdef JA2BETAVERSION
{
UINT16 str[ 512 ];
wchar_t str[ 512 ];
if( PlayerMercsInSector( pNew->ubSectorX, pNew->ubSectorY, 0 ) || CountAllMilitiaInSector( pNew->ubSectorX, pNew->ubSectorY ) )
{
swprintf( str, L"Attempting to send enemy troops from player occupied location. "
@@ -1150,7 +1150,7 @@ BOOLEAN CheckConditionsForBattle( GROUP *pGroup )
if( GetTownIdForSector( pGroup->ubSectorX, pGroup->ubSectorY ) == BLANK_SECTOR)
{
// UINT16 str[ 256 ];
// wchar_t str[ 256 ];
// UINT16 uiSectorC = L'A' + pGroup->ubSectorY - 1;
// swprintf( str, gpStrategicString[ STR_DIALOG_ENEMIES_ATTACK_MILITIA ], uiSectorC, pGroup->ubSectorX );
// DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, TriggerPrebattleInterface );
@@ -1159,8 +1159,8 @@ BOOLEAN CheckConditionsForBattle( GROUP *pGroup )
}
else
{
UINT16 str[ 256 ];
UINT16 pSectorStr[ 128 ];
wchar_t str[ 256 ];
wchar_t pSectorStr[ 128 ];
GetSectorIDString( pGroup->ubSectorX, pGroup->ubSectorY, pGroup->ubSectorZ , pSectorStr, TRUE );
swprintf( str, gpStrategicString[ STR_DIALOG_ENEMIES_ATTACK_UNCONCIOUSMERCS ], pSectorStr );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, TriggerPrebattleInterface );
@@ -2228,8 +2228,8 @@ BOOLEAN PossibleToCoordinateSimultaneousGroupArrivals( GROUP *pFirstGroup )
if( ubNumNearbyGroups )
{ //postpone the battle until the user answers the dialog.
UINT16 str[255];
UINT16 *pStr, *pEnemyType;
wchar_t str[255];
wchar_t *pStr, *pEnemyType;
InterruptTime();
PauseGame();
LockPauseState( 13 );
@@ -2264,7 +2264,7 @@ BOOLEAN PossibleToCoordinateSimultaneousGroupArrivals( GROUP *pFirstGroup )
//Kris August 03, 1999 Bug fix: Changed 1st line to 2nd line to fix game breaking if this dialog came up while in tactical.
// It would kick you to mapscreen, where things would break...
//DoMapMessageBox( MSG_BOX_BASIC_STYLE, str, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PlanSimultaneousGroupArrivalCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)str, guiCurrentScreen, MSG_BOX_FLAG_YESNO, PlanSimultaneousGroupArrivalCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, str, guiCurrentScreen, MSG_BOX_FLAG_YESNO, PlanSimultaneousGroupArrivalCallback );
gfWaitingForInput = TRUE;
return TRUE;
@@ -4488,7 +4488,7 @@ void AddFuelToVehicle( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pVehicle )
if( !Item[pItem->usItem].gascan )
{
#ifdef JA2BETAVERSION
UINT16 str[ 100 ];
wchar_t str[ 100 ];
swprintf( str, L"%s is supposed to have gas can in hand. ATE:0", pSoldier->name );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
#endif
@@ -4519,7 +4519,7 @@ void AddFuelToVehicle( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pVehicle )
void ReportVehicleOutOfGas( INT32 iVehicleID, UINT8 ubSectorX, UINT8 ubSectorY )
{
UINT16 str[255];
wchar_t str[255];
//Report that the vehicle that just arrived is out of gas.
swprintf( str, gzLateLocalizedString[ 5 ],
pVehicleStrings[ pVehicleList[ iVehicleID ].ubVehicleType ],
@@ -4747,8 +4747,8 @@ BOOLEAN TestForBloodcatAmbush( GROUP *pGroup )
void NotifyPlayerOfBloodcatBattle( UINT8 ubSectorX, UINT8 ubSectorY )
{
UINT16 str[ 256 ];
UINT16 zTempString[ 128 ];
wchar_t str[ 256 ];
wchar_t zTempString[ 128 ];
if( gubEnemyEncounterCode == BLOODCAT_AMBUSH_CODE )
{
GetSectorIDString( ubSectorX, ubSectorY, 0, zTempString, TRUE );
@@ -5149,7 +5149,7 @@ void ValidateGroups( GROUP *pGroup )
if( !pGroup->fPlayer && !pGroup->ubGroupSize )
{
//report error
UINT16 str[ 512 ];
wchar_t str[ 512 ];
if( pGroup->ubSectorIDOfLastReassignment == 255 )
{
swprintf( str, L"Enemy group found with 0 troops in it. This is illegal and group will be deleted."
+2 -2
View File
@@ -1550,8 +1550,8 @@ void AdjustLoyaltyForCivsEatenByMonsters( INT16 sSectorX, INT16 sSectorY, UINT8
{
INT8 bTownId = 0;
UINT32 uiLoyaltyChange = 0;
UINT16 str[256];
UINT16 pSectorString[128];
wchar_t str[256];
wchar_t pSectorString[128];
// get town id
+7 -7
View File
@@ -647,17 +647,17 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
// if we are in mapscreen, make a pop up
if( guiCurrentScreen == MAP_SCREEN )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
}
else
{
DoMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, GAME_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback, &pCenteringRect );
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, GAME_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback, &pCenteringRect );
}
return;
}
void DoContinueMilitiaTrainingMessageBox( INT16 sSectorX, INT16 sSectorY, UINT16 *str, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
void DoContinueMilitiaTrainingMessageBox( INT16 sSectorX, INT16 sSectorY, wchar_t *str, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
if( sSectorX <= 10 && sSectorY >= 6 && sSectorY <= 11 )
{
@@ -780,7 +780,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
// ask player whether he'd like to continue training
//DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
}
@@ -821,7 +821,7 @@ void PayMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue )
StopTimeCompression();
swprintf( sString, L"%s", pMilitiaConfirmStrings[ 2 ] );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)sString, MAP_SCREEN, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
}
}
else if( bExitValue == MSG_BOX_RETURN_NO )
@@ -1456,9 +1456,9 @@ BOOLEAN MilitiaTrainingAllowedInTown( INT8 bTownId )
return( gfMilitiaAllowedInTown[bTownId] );
}
void BuildMilitiaPromotionsString( UINT16 *str )
void BuildMilitiaPromotionsString( wchar_t *str )
{
UINT16 pStr[256];
wchar_t pStr[256];
BOOLEAN fAddSpace = FALSE;
swprintf( str, L"" );
+1 -1
View File
@@ -37,7 +37,7 @@ void StrategicRemoveMilitiaFromSector(INT16 sMapX, INT16 sMapY, UINT8 ubRank, UI
// this will check for promotions and handle them for you
UINT8 CheckOneMilitiaForPromotion(INT16 sMapX, INT16 sMapY, UINT8 ubCurrentRank, UINT8 ubRecentKillPts);
void BuildMilitiaPromotionsString( UINT16 *str );
void BuildMilitiaPromotionsString( wchar_t *str );
// call this if the player attacks his own militia
void HandleMilitiaDefections(INT16 sMapX, INT16 sMapY);
+16 -16
View File
@@ -3528,7 +3528,7 @@ UINT32 MapScreenHandle(void)
RenderTeamRegionBackground( );
// now do the warning box
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapErrorString[ 4 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapErrorString[ 4 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
@@ -4917,7 +4917,7 @@ UINT32 HandleMapUI( )
else
{
// no strategic movement is possible from underground sectors
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapErrorString[ 1 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapErrorString[ 1 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
return( MAP_SCREEN );
}
}
@@ -5732,7 +5732,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
else
{
//Display a message saying the player cant save now
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)zNewTacticalMessages[ TCTL_MSG__IRON_MAN_CANT_SAVE_NOW ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, zNewTacticalMessages[ TCTL_MSG__IRON_MAN_CANT_SAVE_NOW ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
}
}
}
@@ -6622,7 +6622,7 @@ void PollRightButtonInMapView( UINT32 *puiNewEvent )
void PopupText( UINT16 *pFontString, ... )
void PopupText( wchar_t *pFontString, ... )
{
UINT8 *pDestBuf;
UINT32 uiDestPitchBYTES;
@@ -9841,11 +9841,11 @@ void TrashCanBtnCallback( MOUSE_REGION *pRegion, INT32 iReason)
// set up for mapscreen
if( gpItemPointer -> ubMission )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pTrashItemText[ 1 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, TrashItemMessageBoxCallBack );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pTrashItemText[ 1 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, TrashItemMessageBoxCallBack );
}
else
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pTrashItemText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, TrashItemMessageBoxCallBack );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pTrashItemText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, TrashItemMessageBoxCallBack );
}
}
}
@@ -10830,17 +10830,17 @@ void TellPlayerWhyHeCantCompressTime( void )
else if( gfAtLeastOneMercWasHired == FALSE )
{
// no mercs hired, ever
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapScreenJustStartedHelpText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapScreenJustStartedHelpText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
else if ( !AnyUsableRealMercenariesOnTeam() )
{
// no usable mercs left on team
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pMapErrorString[ 39 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapErrorString[ 39 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
else if ( ActiveTimedBombExists() )
{
// can't time compress when a bomb is about to go off!
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gzLateLocalizedString[ 2 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 2 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
else if ( gfContractRenewalSquenceOn )
{
@@ -10868,7 +10868,7 @@ void TellPlayerWhyHeCantCompressTime( void )
}
else if( fShowMapInventoryPool )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gzLateLocalizedString[ 55 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 55 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
// ARM: THIS TEST SHOULD BE THE LAST ONE, BECAUSE IT ACTUALLY RESULTS IN SOMETHING HAPPENING NOW.
// KM: Except if we are in a creature lair and haven't loaded the sector yet (no battle yet)
@@ -10876,11 +10876,11 @@ void TellPlayerWhyHeCantCompressTime( void )
{
if( OnlyHostileCivsInSector() )
{
UINT16 str[ 256 ];
UINT16 pSectorString[ 128 ];
wchar_t str[ 256 ];
wchar_t pSectorString[ 128 ];
GetSectorIDString( gWorldSectorX, gWorldSectorY, gbWorldSectorZ, pSectorString, TRUE );
swprintf( str, gzLateLocalizedString[ 27 ], pSectorString );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)str, MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, str, MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
else
{
@@ -10890,7 +10890,7 @@ void TellPlayerWhyHeCantCompressTime( void )
}
else if( PlayerGroupIsInACreatureInfestedMine() )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)gzLateLocalizedString[ 28 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 28 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
}
@@ -12181,7 +12181,7 @@ BOOLEAN RequestGiveSkyriderNewDestination( void )
( GetNumberOfPassengersInHelicopter() == 0 ) &&
( PlayerMercsInHelicopterSector() > 0 ) )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, (INT16 *)pSkyriderText[ 6 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pSkyriderText[ 6 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
gfSkyriderEmptyHelpGiven = TRUE;
return( FALSE );
}
@@ -12602,7 +12602,7 @@ void HandlePostAutoresolveMessages()
}
else if( gbMilitiaPromotions )
{
UINT16 str[ 512 ];
wchar_t str[ 512 ];
BuildMilitiaPromotionsString( str );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
+4 -4
View File
@@ -1313,7 +1313,7 @@ void EndLoadScreen( )
#ifdef JA2TESTVERSION
//Report the time it took to load the map. This is temporary until we are satisfied with the time
//it takes to load the map.
UINT16 str[60];
wchar_t str[60];
FILE *fp;
UINT32 uiSeconds;
UINT32 uiHundreths;
@@ -2677,8 +2677,8 @@ void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY,
if( fError )
{ //strategic insertion failed because it expected to find an entry point. This is likely
//a missing part of the map or possible fault in strategic movement costs, traversal logic, etc.
UINT16 szEntry[10];
UINT16 szSector[10];
wchar_t szEntry[10];
wchar_t szSector[10];
INT16 sGridNo;
GetLoadedSectorString( szSector );
if( gMapInformation.sNorthGridNo != -1 )
@@ -5253,7 +5253,7 @@ INT16 PickGridNoToWalkIn( SOLDIERTYPE *pSoldier, UINT8 ubInsertionDirection, UIN
}
void GetLoadedSectorString( UINT16 *pString )
void GetLoadedSectorString( wchar_t *pString )
{
if( !gfWorldLoaded )
{
+1 -1
View File
@@ -93,7 +93,7 @@ void GetShortSectorString( INT16 sMapX,INT16 sMapY, STR16 sString );
//Examples: A9
// A10_B1
// J9_B2_A ( >= BETAVERSION ) else J9_B2 (release equivalent)
void GetLoadedSectorString( UINT16 *pString );
void GetLoadedSectorString( wchar_t *pString );
// This will get an ID string like A9- OMERTA...
void GetSectorIDString( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ , CHAR16 * zString, BOOLEAN fDetailed );
+12 -12
View File
@@ -142,7 +142,7 @@ UINT16 gusSubtitleBoxHeight;
INT32 giTextBoxOverlay = -1;
BOOLEAN gfFacePanelActive = FALSE;
UINT32 guiScreenIDUsedWhenUICreated;
INT16 gzQuoteStr[ QUOTE_MESSAGE_SIZE ];
wchar_t gzQuoteStr[ QUOTE_MESSAGE_SIZE ];
MOUSE_REGION gTextBoxMouseRegion;
MOUSE_REGION gFacePopupMouseRegion;
BOOLEAN gfUseAlternateDialogueFile = FALSE;
@@ -187,12 +187,12 @@ void FaceOverlayClickCallback( MOUSE_REGION * pRegion, INT32 iReason );
// Handler functions for tactical ui diaplay
void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, INT16 *zQuoteStr );
void HandleTacticalNPCTextUI( UINT8 ubCharacterNum, INT16 *zQuoteStr );
void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, wchar_t *zQuoteStr );
void HandleTacticalNPCTextUI( UINT8 ubCharacterNum, wchar_t *zQuoteStr );
void HandleTacticalSpeechUI( UINT8 ubCharacterNum, INT32 iFaceIndex );
void DisplayTextForExternalNPC( UINT8 ubCharacterNum, STR16 zQuoteStr );
void CreateTalkingUI( INT8 bUIHandlerID, INT32 iFaceIndex, UINT8 ubCharacterNum, SOLDIERTYPE *pSoldier, INT16 *zQuoteStr );
void CreateTalkingUI( INT8 bUIHandlerID, INT32 iFaceIndex, UINT8 ubCharacterNum, SOLDIERTYPE *pSoldier, wchar_t *zQuoteStr );
void HandleExternNPCSpeechFace( INT32 iIndex );
@@ -1184,7 +1184,7 @@ void HandleDialogue( )
MemFree( QItem );
}
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, UINT16 * zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString );
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, wchar_t * zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString );
BOOLEAN DelayedTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum )
@@ -1621,7 +1621,7 @@ BOOLEAN ExecuteCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32
CHECKF( iFaceIndex != -1 );
if ( !GetDialogue( ubCharacterNum,
usQuoteNum, DIALOGUESIZE, (UINT16 *)gzQuoteStr, &uiSoundID, zSoundString) )
usQuoteNum, DIALOGUESIZE, gzQuoteStr, &uiSoundID, zSoundString) )
{
return( FALSE );
}
@@ -1648,7 +1648,7 @@ BOOLEAN ExecuteCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32
}
void CreateTalkingUI( INT8 bUIHandlerID, INT32 iFaceIndex, UINT8 ubCharacterNum, SOLDIERTYPE *pSoldier, INT16 *zQuoteStr )
void CreateTalkingUI( INT8 bUIHandlerID, INT32 iFaceIndex, UINT8 ubCharacterNum, SOLDIERTYPE *pSoldier, wchar_t *zQuoteStr )
{
// Show text, if on
@@ -1823,7 +1823,7 @@ BOOLEAN DialogueDataFileExistsForProfile( UINT8 ubCharacterNum, UINT16 usQuoteNu
return( FileExists( (STR)pFilename ) );
}
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, UINT16 * zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString )
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, wchar_t * zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString )
{
UINT8 *pFilename;
@@ -1890,9 +1890,9 @@ BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize,
// Handlers for tactical UI stuff
void HandleTacticalNPCTextUI( UINT8 ubCharacterNum, INT16 *zQuoteStr )
void HandleTacticalNPCTextUI( UINT8 ubCharacterNum, wchar_t *zQuoteStr )
{
INT16 zText[ QUOTE_MESSAGE_SIZE ];
wchar_t zText[ QUOTE_MESSAGE_SIZE ];
// Setup dialogue text box
if ( guiCurrentScreen != MAP_SCREEN )
@@ -1952,9 +1952,9 @@ void DisplayTextForExternalNPC( UINT8 ubCharacterNum, STR16 zQuoteStr )
}
void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, INT16 *zQuoteStr )
void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, wchar_t *zQuoteStr )
{
INT16 zText[ QUOTE_MESSAGE_SIZE ];
wchar_t zText[ QUOTE_MESSAGE_SIZE ];
INT16 sLeft = 0;
//BUild text
+2 -2
View File
@@ -1387,12 +1387,12 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
if ( pFace->fDisplayTextOver == FACE_DRAW_TEXT_OVER )
{
gprintfinvalidate( sFontX, sFontY, (UINT16 *)pFace->zDisplayText );
gprintfinvalidate( sFontX, sFontY, pFace->zDisplayText );
mprintf( sFontX, sFontY, pFace->zDisplayText );
}
else if ( pFace->fDisplayTextOver == FACE_ERASE_TEXT_OVER )
{
gprintfRestore( sFontX, sFontY, (UINT16 *)pFace->zDisplayText );
gprintfRestore( sFontX, sFontY, pFace->zDisplayText );
pFace->fDisplayTextOver = FACE_NO_TEXT_OVER;
}
+4 -4
View File
@@ -3209,7 +3209,7 @@ BOOLEAN DrawItemPoolList( ITEM_POOL *pItemPool, INT16 sGridNo, UINT8 bCommand, I
INT16 sY;
INVTYPE *pItem;
ITEM_POOL *pTempItemPool;
INT16 pStr[ 100 ];
wchar_t pStr[ 100 ];
INT16 cnt = 0, sHeight = 0;
INT16 sLargeLineWidth = 0, sLineWidth;
BOOLEAN fRecalcNumListed = FALSE;
@@ -3380,7 +3380,7 @@ BOOLEAN DrawItemPoolList( ITEM_POOL *pItemPool, INT16 sGridNo, UINT8 bCommand, I
SetFontForeground( FONT_MCOLOR_DKGRAY );
}
swprintf( (wchar_t *)pStr, (wchar_t *)TacticalStr[ ITEMPOOL_POPUP_PREV_STR ] );
gprintfdirty( sFontX, sY, (UINT16 *)pStr );
gprintfdirty( sFontX, sY, pStr );
mprintf( sFontX, sY, pStr );
sY += GetFontHeight( SMALLFONT1 ) - 2;
cnt++;
@@ -3416,7 +3416,7 @@ BOOLEAN DrawItemPoolList( ITEM_POOL *pItemPool, INT16 sGridNo, UINT8 bCommand, I
swprintf( (wchar_t *)pStr, (wchar_t *)L"%s", ShortItemNames[ gWorldItems[ pItemPool->iItemIndex ].o.usItem ] );
}
gprintfdirty( sFontX, sY, (UINT16 *)pStr );
gprintfdirty( sFontX, sY, pStr );
mprintf( sFontX, sY, pStr );
sY += GetFontHeight( SMALLFONT1 ) - 2;
@@ -3448,7 +3448,7 @@ BOOLEAN DrawItemPoolList( ITEM_POOL *pItemPool, INT16 sGridNo, UINT8 bCommand, I
SetFontForeground( FONT_MCOLOR_DKGRAY );
}
swprintf( (wchar_t *)pStr, (wchar_t *)TacticalStr[ ITEMPOOL_POPUP_MORE_STR ] );
gprintfdirty( sFontX, sY, (UINT16 *)pStr );
gprintfdirty( sFontX, sY, pStr );
mprintf( sFontX, sY, pStr );
}
}
+1 -1
View File
@@ -2554,7 +2554,7 @@ UINT32 UIHandleCAMercShoot( UI_EVENT *pUIEvent )
// If this is one of our own guys.....pop up requiester...
if ( ( pTSoldier->bTeam == gbPlayerNum || pTSoldier->bTeam == MILITIA_TEAM ) && Item[ pSoldier->inv[ HANDPOS ].usItem ].usItemClass != IC_MEDKIT && !Item[pSoldier->inv[ HANDPOS ].usItem].gascan && gTacticalStatus.ubLastRequesterTargetID != pTSoldier->ubProfile && ( pTSoldier->ubID != pSoldier->ubID ) )
{
INT16 zStr[200];
wchar_t zStr[200];
gpRequesterMerc = pSoldier;
gpRequesterTargetMerc = pTSoldier;
+1 -1
View File
@@ -4378,7 +4378,7 @@ BOOLEAN PlayerTeamHasTwoSpotsLeft( )
void StartDialogueMessageBox( UINT8 ubProfileID, UINT16 usMessageBoxType )
{
INT32 iTemp;
UINT16 zTemp[256], zTemp2[256];
wchar_t zTemp[256], zTemp2[256];
gusDialogueMessageBoxType = usMessageBoxType;
switch( gusDialogueMessageBoxType )
+27 -27
View File
@@ -257,13 +257,13 @@ BOOLEAN gfInItemDescBox = FALSE;
UINT32 guiCurrentItemDescriptionScreen=0;
OBJECTTYPE *gpItemDescObject = NULL;
BOOLEAN gfItemDescObjectIsAttachment = FALSE;
UINT16 gzItemName[ SIZE_ITEM_NAME ];
UINT16 gzItemDesc[ SIZE_ITEM_INFO ];
UINT16 gzItemPros[ SIZE_ITEM_PROS ];
UINT16 gzItemCons[ SIZE_ITEM_CONS ];
UINT16 gzFullItemPros[ SIZE_ITEM_PROS ];
UINT16 gzFullItemCons[ SIZE_ITEM_PROS ];
UINT16 gzFullItemTemp[ SIZE_ITEM_PROS ]; // necessary, unfortunately
wchar_t gzItemName[ SIZE_ITEM_NAME ];
wchar_t gzItemDesc[ SIZE_ITEM_INFO ];
wchar_t gzItemPros[ SIZE_ITEM_PROS ];
wchar_t gzItemCons[ SIZE_ITEM_CONS ];
wchar_t gzFullItemPros[ SIZE_ITEM_PROS ];
wchar_t gzFullItemCons[ SIZE_ITEM_PROS ];
wchar_t gzFullItemTemp[ SIZE_ITEM_PROS ]; // necessary, unfortunately
void ItemDescCallback( MOUSE_REGION * pRegion, INT32 iReason );
INT16 gsInvDescX;
INT16 gsInvDescY;
@@ -590,10 +590,10 @@ BOOLEAN AttemptToAddSubstring( STR16 zDest, STR16 zTemp, UINT32 * puiStringLengt
}
}
void GenerateProsString( UINT16 * zItemPros, OBJECTTYPE * pObject, UINT32 uiPixLimit )
void GenerateProsString( wchar_t * zItemPros, OBJECTTYPE * pObject, UINT32 uiPixLimit )
{
UINT32 uiStringLength = 0;
UINT16 * zTemp;
wchar_t * zTemp;
UINT16 usItem = pObject->usItem;
UINT8 ubWeight;
@@ -714,10 +714,10 @@ void GenerateProsString( UINT16 * zItemPros, OBJECTTYPE * pObject, UINT32 uiPixL
}
}
void GenerateConsString( UINT16 * zItemCons, OBJECTTYPE * pObject, UINT32 uiPixLimit )
void GenerateConsString( wchar_t * zItemCons, OBJECTTYPE * pObject, UINT32 uiPixLimit )
{
UINT32 uiStringLength = 0;
UINT16 * zTemp;
wchar_t * zTemp;
UINT8 ubWeight;
UINT16 usItem = pObject->usItem;
@@ -1058,7 +1058,7 @@ void RenderInvBodyPanel( SOLDIERTYPE *pSoldier, INT16 sX, INT16 sY )
void HandleRenderInvSlots( SOLDIERTYPE *pSoldier, UINT8 fDirtyLevel )
{
INT32 cnt;
static INT16 pStr[ 150 ];
static wchar_t pStr[ 150 ];
if ( InItemDescriptionBox( ) || InItemStackPopup( ) || InKeyRingPopup( ) )
{
@@ -1999,7 +1999,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
INT16 sFontX2, sFontY2;
INT16 sFontX, sFontY;
static INT16 pStr[ 100 ], pStr2[ 100 ];
static wchar_t pStr[ 100 ], pStr2[ 100 ];
if ( pObject->usItem == NOTHING )
{
@@ -2090,13 +2090,13 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
//}
swprintf( (wchar_t *)pStr, L"%d", pObject->ubGunShotsLeft );
swprintf( pStr, L"%d", pObject->ubGunShotsLeft );
if ( uiBuffer == guiSAVEBUFFER )
{
RestoreExternBackgroundRect( sNewX, sNewY, 20, 15 );
}
mprintf( sNewX, sNewY, pStr );
gprintfinvalidate( sNewX, sNewY, (UINT16 *)pStr );
gprintfinvalidate( sNewX, sNewY, pStr );
SetFontForeground( FONT_MCOLOR_DKGRAY );
@@ -2117,7 +2117,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
VarFindFontCenterCoordinates( sX, sY, sWidth, sHeight , ITEM_FONT, &sNewX, &sNewY, pStr );
mprintf( sNewX, sNewY, pStr );
gprintfinvalidate( sNewX, sNewY, (UINT16 *)pStr );
gprintfinvalidate( sNewX, sNewY, pStr );
}
}
else
@@ -2142,7 +2142,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
}
mprintf( sNewX, sNewY, pStr );
gprintfinvalidate( sNewX, sNewY, (UINT16 *)pStr );
gprintfinvalidate( sNewX, sNewY, pStr );
}
}
@@ -2172,7 +2172,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
}
mprintf( sNewX, sNewY, pStr );
gprintfinvalidate( sNewX, sNewY, (UINT16 *)pStr );
gprintfinvalidate( sNewX, sNewY, pStr );
}
@@ -2215,7 +2215,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
}
mprintf( sNewX, sNewY, pStr );
gprintfinvalidate( sNewX, sNewY, (UINT16 *)pStr );
gprintfinvalidate( sNewX, sNewY, pStr );
}
@@ -2246,13 +2246,13 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
VarFindFontCenterCoordinates( sX, sY, sWidth, sHeight , ITEM_FONT, &sFontX, &sFontY, pStr );
sFontY = sY + 1;
gprintfinvalidate( sFontX, sFontY, (UINT16 *)pStr );
gprintfinvalidate( sFontX, sFontY, pStr );
if ( fLineSplit )
{
VarFindFontCenterCoordinates( sX, sY, sWidth, sHeight , ITEM_FONT, &sFontX2, &sFontY2, pStr2 );
sFontY2 = sY + 13;
gprintfinvalidate( sFontX2, sFontY2, (UINT16 *)pStr2 );
gprintfinvalidate( sFontX2, sFontY2, pStr2 );
}
}
@@ -2269,11 +2269,11 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
else if ( *pubHighlightCounter == 1 )
{
*pubHighlightCounter = 0;
gprintfRestore( sFontX, sFontY, (UINT16 *)pStr );
gprintfRestore( sFontX, sFontY, pStr );
if ( fLineSplit )
{
gprintfRestore( sFontX2, sFontY2, (UINT16 *)pStr2 );
gprintfRestore( sFontX2, sFontY2, pStr2 );
}
}
}
@@ -2797,7 +2797,7 @@ BOOLEAN ReloadItemDesc( )
void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
{
static BOOLEAN fRightDown = FALSE;
INT16 pStr[10];
wchar_t pStr[10];
/* region gets disabled in SKI for shopkeeper boxes. It now works normally for merc's inventory boxes!
//if we are currently in the shopkeeper interface, return;
@@ -2830,7 +2830,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
gpItemPointerSoldier = gpItemDescSoldier;
swprintf( (wchar_t *)pStr, L"0" );
SpecifyButtonText( giItemDescAmmoButton, (UINT16 *)pStr );
SpecifyButtonText( giItemDescAmmoButton, pStr );
// Set mouse
guiExternVo = GetInterfaceGraphicForItem( &(Item[ gpItemPointer->usItem ]) );
@@ -2862,7 +2862,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
fInterfacePanelDirty = DIRTYLEVEL2;
swprintf( (wchar_t *)pStr, L"0" );
SpecifyButtonText( giItemDescAmmoButton, (UINT16 *)pStr );
SpecifyButtonText( giItemDescAmmoButton, pStr );
fItemDescDelete = TRUE;
}
@@ -7383,7 +7383,7 @@ BOOLEAN AttemptToApplyCamo( SOLDIERTYPE *pSoldier, UINT16 usItemIndex )
void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier )
void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier )
{
INT16 pStr[ 250 ];
UINT16 usItem = pObject->usItem;
+1 -1
View File
@@ -134,7 +134,7 @@ UINT32 GetInterfaceGraphicForItem( INVTYPE *pItem );
UINT16 GetTileGraphicForItem( INVTYPE *pItem );
BOOLEAN LoadTileGraphicForItem( INVTYPE *pItem, UINT32 *puiVo );
void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier );
void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier );
BOOLEAN AttemptToApplyCamo( SOLDIERTYPE *pSoldier, UINT16 usItemIndex );
+1 -1
View File
@@ -3795,7 +3795,7 @@ void RenderTEAMPanel( BOOLEAN fDirty )
INT16 sFontX, sFontY;
UINT32 cnt, posIndex;
SOLDIERTYPE *pSoldier;
static INT16 pStr[ 200 ], pMoraleStr[ 20 ];
static wchar_t pStr[ 200 ], pMoraleStr[ 20 ];
// WANNE 2 <new>
if ( fDirty == DIRTYLEVEL2 )
+25 -25
View File
@@ -111,7 +111,7 @@ typedef struct
TOP_MESSAGE gTopMessage;
BOOLEAN gfTopMessageDirty = FALSE;
void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, UINT16 * psString );
void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, wchar_t * psString );
extern UINT16 GetAnimStateForInteraction( SOLDIERTYPE *pSoldier, BOOLEAN fDoor, UINT16 usAnimState );
@@ -681,7 +681,7 @@ void PopupMovementMenu( UI_EVENT *pUIEvent )
SOLDIERTYPE *pSoldier = NULL;
INT32 iMenuAnchorX, iMenuAnchorY;
UINT32 uiActionImages;
INT16 zActionString[ 50 ];
wchar_t zActionString[ 50 ];
BOOLEAN fDisableAction = FALSE;
// Erase other menus....
@@ -920,7 +920,7 @@ void PopupMovementMenu( UI_EVENT *pUIEvent )
return;
}
//SetButtonSavedRect( iActionIcons[ ACTIONC_ICON ] );
SetButtonFastHelpText( iActionIcons[ ACTIONC_ICON ], (UINT16 *)zActionString );
SetButtonFastHelpText( iActionIcons[ ACTIONC_ICON ], zActionString );
ButtonList[ iActionIcons[ ACTIONC_ICON ] ]->UserData[0] = (UINT32)pUIEvent;
if ( fDisableAction )
@@ -1489,8 +1489,8 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
INT16 sX, sY;
INT32 iBack;
TILE_ELEMENT TileElem;
UINT16 *pStr;
UINT16 NameStr[ 50 ];
wchar_t *pStr;
wchar_t NameStr[ 50 ];
UINT16 usGraphicToUse = THIRDPOINTERS1;
BOOLEAN fRaiseName = FALSE;
BOOLEAN fDoName = TRUE;
@@ -1836,7 +1836,7 @@ void RenderOverlayMessage( VIDEO_OVERLAY *pBlitter )
}
void BeginOverlayMessage( UINT32 uiFont, UINT16 *pFontString, ... )
void BeginOverlayMessage( UINT32 uiFont, wchar_t *pFontString, ... )
{
va_list argptr;
VIDEO_OVERLAY_DESC VideoOverlayDesc;
@@ -2215,7 +2215,7 @@ BOOLEAN InitDoorOpenMenu( SOLDIERTYPE *pSoldier, STRUCTURE *pStructure, UINT8 ub
void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
INT32 iMenuAnchorX, iMenuAnchorY;
INT16 zDisp[ 100 ];
wchar_t zDisp[ 100 ];
iMenuAnchorX = gOpenDoorMenu.sX;
iMenuAnchorY = gOpenDoorMenu.sY;
@@ -2250,7 +2250,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ USE_KEYRING_ICON ], AP_UNLOCK_DOOR );
}
SetButtonFastHelpText( iActionIcons[ USE_KEYRING_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ USE_KEYRING_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_UNLOCK_DOOR, BP_UNLOCK_DOOR, FALSE ) || fClosingDoor || AM_AN_EPC( gOpenDoorMenu.pSoldier ) )
{
@@ -2281,7 +2281,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ USE_CROWBAR_ICON ], AP_USE_CROWBAR );
}
SetButtonFastHelpText( iActionIcons[ USE_CROWBAR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ USE_CROWBAR_ICON ], zDisp );
// Greyout if no crowbar found...
if ( FindUsableCrowbar ( gOpenDoorMenu.pSoldier ) == NO_SLOT || fClosingDoor )
@@ -2311,7 +2311,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ LOCKPICK_DOOR_ICON ], AP_PICKLOCK );
}
SetButtonFastHelpText( iActionIcons[ LOCKPICK_DOOR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ LOCKPICK_DOOR_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_PICKLOCK, BP_PICKLOCK, FALSE ) || fClosingDoor || AM_AN_EPC( gOpenDoorMenu.pSoldier ) )
{
@@ -2343,7 +2343,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ EXPLOSIVE_DOOR_ICON ], AP_EXPLODE_DOOR );
}
SetButtonFastHelpText( iActionIcons[ EXPLOSIVE_DOOR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ EXPLOSIVE_DOOR_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_EXPLODE_DOOR, BP_EXPLODE_DOOR, FALSE ) || fClosingDoor || AM_AN_EPC( gOpenDoorMenu.pSoldier ) )
{
@@ -2389,7 +2389,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ OPEN_DOOR_ICON ], AP_OPEN_DOOR );
}
}
SetButtonFastHelpText( iActionIcons[ OPEN_DOOR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ OPEN_DOOR_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_OPEN_DOOR, BP_OPEN_DOOR, FALSE ) )
{
@@ -2415,7 +2415,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ EXAMINE_DOOR_ICON ], AP_EXAMINE_DOOR );
}
SetButtonFastHelpText( iActionIcons[ EXAMINE_DOOR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ EXAMINE_DOOR_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_EXAMINE_DOOR, BP_EXAMINE_DOOR, FALSE ) || fClosingDoor || AM_AN_EPC( gOpenDoorMenu.pSoldier ) )
{
@@ -2439,7 +2439,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ BOOT_DOOR_ICON ], AP_BOOT_DOOR );
}
SetButtonFastHelpText( iActionIcons[ BOOT_DOOR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ BOOT_DOOR_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_BOOT_DOOR, BP_BOOT_DOOR, FALSE ) || fClosingDoor || AM_AN_EPC( gOpenDoorMenu.pSoldier ) )
{
@@ -2464,7 +2464,7 @@ void PopupDoorOpenMenu( BOOLEAN fClosingDoor )
{
swprintf( (wchar_t *)zDisp, L"%s ( %d )", pTacticalPopupButtonStrings[ UNTRAP_DOOR_ICON ], AP_UNTRAP_DOOR );
}
SetButtonFastHelpText( iActionIcons[ UNTRAP_DOOR_ICON ], (UINT16 *)zDisp );
SetButtonFastHelpText( iActionIcons[ UNTRAP_DOOR_ICON ], zDisp );
if ( !EnoughPoints( gOpenDoorMenu.pSoldier, AP_UNTRAP_DOOR, BP_UNTRAP_DOOR, FALSE ) || fClosingDoor || AM_AN_EPC( gOpenDoorMenu.pSoldier ) )
{
@@ -2752,7 +2752,7 @@ void RenderUIMessage( VIDEO_OVERLAY *pBlitter )
}
void InternalBeginUIMessage( BOOLEAN fUseSkullIcon, UINT16 *pFontString, ... )
void InternalBeginUIMessage( BOOLEAN fUseSkullIcon, wchar_t *pFontString, ... )
{
va_list argptr;
VIDEO_OVERLAY_DESC VideoOverlayDesc;
@@ -2812,7 +2812,7 @@ void InternalBeginUIMessage( BOOLEAN fUseSkullIcon, UINT16 *pFontString, ... )
gfUseSkullIconMessage = fUseSkullIcon;
}
void BeginUIMessage( UINT16 *pFontString, ... )
void BeginUIMessage( wchar_t *pFontString, ... )
{
va_list argptr;
wchar_t MsgString[512];
@@ -2825,7 +2825,7 @@ void BeginUIMessage( UINT16 *pFontString, ... )
}
void BeginMapUIMessage( UINT8 ubPosition, UINT16 *pFontString, ... )
void BeginMapUIMessage( UINT8 ubPosition, wchar_t *pFontString, ... )
{
va_list argptr;
VIDEO_OVERLAY_DESC VideoOverlayDesc;
@@ -2919,7 +2919,7 @@ void EndUIMessage( )
#define PLAYER_TEAM_TIMER_TICKS_PER_ENEMY ( 2000 / PLAYER_TEAM_TIMER_SEC_PER_TICKS )
BOOLEAN AddTopMessage( UINT8 ubType, UINT16 * pzString )
BOOLEAN AddTopMessage( UINT8 ubType, wchar_t * pzString )
{
UINT32 cnt;
BOOLEAN fFound = FALSE;
@@ -2956,7 +2956,7 @@ BOOLEAN AddTopMessage( UINT8 ubType, UINT16 * pzString )
return( FALSE );
}
void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, UINT16 * psString )
void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, wchar_t * psString )
{
UINT32 uiBAR, uiPLAYERBAR, uiINTBAR;
VOBJECT_DESC VObjectDesc;
@@ -3260,7 +3260,7 @@ void HandleTopMessages( )
if ( !gTopMessage.fCreated )
{
gfTopMessageDirty = TRUE;
AddTopMessage( gTacticalStatus.ubTopMessageType, (UINT16 *)gTacticalStatus.zTopMessageString );
AddTopMessage( gTacticalStatus.ubTopMessageType, gTacticalStatus.zTopMessageString );
}
if ( gTacticalStatus.ubTopMessageType == COMPUTER_TURN_MESSAGE ||
@@ -3285,7 +3285,7 @@ void HandleTopMessages( )
gTacticalStatus.usTactialTurnLimitCounter = ( ( gubProgCurEnemy ) * PLAYER_TEAM_TIMER_TICKS_PER_ENEMY );
}
CreateTopMessage( gTopMessage.uiSurface, gTacticalStatus.ubTopMessageType, (UINT16 *)gTacticalStatus.zTopMessageString );
CreateTopMessage( gTopMessage.uiSurface, gTacticalStatus.ubTopMessageType, gTacticalStatus.zTopMessageString );
}
}
else if ( gGameOptions.fTurnTimeLimit )
@@ -3329,7 +3329,7 @@ void HandleTopMessages( )
gTacticalStatus.usTactialTurnLimitCounter++;
}
CreateTopMessage( gTopMessage.uiSurface, gTacticalStatus.ubTopMessageType, (UINT16 *)gTacticalStatus.zTopMessageString );
CreateTopMessage( gTopMessage.uiSurface, gTacticalStatus.ubTopMessageType, gTacticalStatus.zTopMessageString );
// Have we reached max?
if ( gTacticalStatus.usTactialTurnLimitCounter == ( gTacticalStatus.usTactialTurnLimitMax - 1) )
@@ -3501,7 +3501,7 @@ void UpdateEnemyUIBar( )
if ( gTacticalStatus.ubTopMessageType == COMPUTER_TURN_MESSAGE )
{
// Update message!
CreateTopMessage( gTopMessage.uiSurface, COMPUTER_TURN_MESSAGE, (UINT16 *)gTacticalStatus.zTopMessageString );
CreateTopMessage( gTopMessage.uiSurface, COMPUTER_TURN_MESSAGE, gTacticalStatus.zTopMessageString );
}
}
}
@@ -3598,7 +3598,7 @@ void DoorMenuBackregionCallback( MOUSE_REGION * pRegion, INT32 iReason )
}
}
UINT16 *GetSoldierHealthString( SOLDIERTYPE *pSoldier )
wchar_t *GetSoldierHealthString( SOLDIERTYPE *pSoldier )
{
INT32 cnt, cntStart;
if( pSoldier->bLife == pSoldier->bLifeMax )
+6 -6
View File
@@ -146,7 +146,7 @@ void CancelOpenDoorMenu( );
void HandleInterfaceBackgrounds( );
void BeginOverlayMessage( UINT32 uiFont, UINT16 *pFontString, ... );
void BeginOverlayMessage( UINT32 uiFont, wchar_t *pFontString, ... );
void EndOverlayMessage( );
@@ -177,12 +177,12 @@ void DirtyMercPanelInterface( SOLDIERTYPE *pSoldier, UINT8 ubDirtyLevel );
void EndUIMessage( );
void BeginUIMessage( UINT16 *pFontString, ... );
void InternalBeginUIMessage( BOOLEAN fUseSkullIcon, UINT16 *pFontString, ... );
void BeginUIMessage( wchar_t *pFontString, ... );
void InternalBeginUIMessage( BOOLEAN fUseSkullIcon, wchar_t *pFontString, ... );
// map screen version, for centering over the map area
void BeginMapUIMessage( UINT8 fPosition, UINT16 *pFontString, ... );
void BeginMapUIMessage( UINT8 fPosition, wchar_t *pFontString, ... );
extern UINT16 gusUIOldSelectedSoldier;
@@ -204,7 +204,7 @@ enum MESSAGE_TYPES
void HandleTopMessages( );
BOOLEAN AddTopMessage( UINT8 ubType, UINT16 * pzString );
BOOLEAN AddTopMessage( UINT8 ubType, wchar_t * pzString );
BOOLEAN InTopMessageBarAnimation( );
void EndTopMessage( );
@@ -213,7 +213,7 @@ void PauseRT( BOOLEAN fPause );
void InitEnemyUIBar( UINT8 ubNumEnemies, UINT8 ubDoneEnemies );
UINT16 *GetSoldierHealthString( SOLDIERTYPE *pSoldier );
wchar_t *GetSoldierHealthString( SOLDIERTYPE *pSoldier );
void GetLaunchItemParamsFromUI( );
+3 -3
View File
@@ -1866,7 +1866,7 @@ BOOLEAN ValidItemAttachment( OBJECTTYPE * pObj, UINT16 usAttachment, BOOLEAN fAt
if ( fAttemptingAttachment && ValidAttachmentClass( usAttachment, pObj->usItem ) )
{
// well, maybe the player thought he could
UINT16 zTemp[ 100 ];
wchar_t zTemp[ 100 ];
swprintf( zTemp, Message[ STR_CANT_ATTACH ], ItemNames[ usAttachment ], ItemNames[ pObj->usItem ] );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, zTemp );
@@ -3790,7 +3790,7 @@ BOOLEAN PlaceObject( SOLDIERTYPE * pSoldier, INT8 bPos, OBJECTTYPE * pObj )
{
if ( !CompatibleFaceItem( pObj->usItem, pSoldier->inv[ HEAD2POS ].usItem ) )
{
UINT16 zTemp[ 150 ];
wchar_t zTemp[ 150 ];
swprintf( zTemp, Message[ STR_CANT_USE_TWO_ITEMS ], ItemNames[ pObj->usItem ], ItemNames[ pSoldier->inv[ HEAD2POS ].usItem ] );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, zTemp );
@@ -3801,7 +3801,7 @@ BOOLEAN PlaceObject( SOLDIERTYPE * pSoldier, INT8 bPos, OBJECTTYPE * pObj )
{
if ( !CompatibleFaceItem( pObj->usItem, pSoldier->inv[ HEAD1POS ].usItem ) )
{
UINT16 zTemp[ 150 ];
wchar_t zTemp[ 150 ];
swprintf( zTemp, Message[ STR_CANT_USE_TWO_ITEMS ], ItemNames[ pObj->usItem ], ItemNames[ pSoldier->inv[ HEAD1POS ].usItem ] );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, zTemp );
+1 -1
View File
@@ -233,7 +233,7 @@ void HandleMilitiaPromotions( void )
{
// ATE: Problems here with bringing up message box...
// UINT16 str[ 512 ];
// wchar_t str[ 512 ];
// BuildMilitiaPromotionsString( str );
// DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
}
+1 -1
View File
@@ -121,7 +121,7 @@ typedef struct
UINT16 usTactialTurnLimitCounter;
BOOLEAN fInTopMessage;
UINT8 ubTopMessageType;
INT16 zTopMessageString[20];
wchar_t zTopMessageString[20];
UINT16 usTactialTurnLimitMax;
UINT32 uiTactialTurnLimitClock;
BOOLEAN fTactialTurnLimitStartedBeep;
+1 -1
View File
@@ -7759,7 +7759,7 @@ void BuildItemHelpTextString( wchar_t sString[], INVENTORY_IN_SLOT *pInv, UINT8
if( pInv != NULL )
{
GetHelpTextForItem( (INT16 *)zHelpText, &( pInv->ItemObject ), NULL );
GetHelpTextForItem( zHelpText, &( pInv->ItemObject ), NULL );
// add repair time for items in a repairman's offer area
if ( ( ubScreenArea == ARMS_DEALER_OFFER_AREA ) &&
+1 -1
View File
@@ -378,7 +378,7 @@ typedef struct
INT8 bScientific;
// traits
INT16 sWeightCarriedAtTurnStart;
UINT16 name[ 10 ];
wchar_t name[ 10 ];
INT8 bVisible; // to render or not to render...
+1 -1
View File
@@ -109,7 +109,7 @@ typedef struct
//Kris: Additions November 16, 1997 (padding down to 129 from 150)
BOOLEAN fVisible;
UINT16 name[ 10 ];
wchar_t name[ 10 ];
UINT8 ubSoldierClass; //army, administrator, elite
+2 -2
View File
@@ -1865,7 +1865,7 @@ void AddSoldierInitListBloodcats()
ubSectorID != SEC_I16 && ubSectorID != SEC_N5 )
{
#ifdef JA2BETAVERSION
UINT16 str[200];
wchar_t str[200];
swprintf( str, L"Table specifies that there are %d bloodcat placements in sector %c%d, but the map actually has %d bloodcat placements. Map value takes precedence. KM,LC:1",
pSector->bBloodCatPlacements, gWorldSectorY + 'A' - 1, gWorldSectorX, bBloodCatPlacements );
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
@@ -2101,7 +2101,7 @@ BOOLEAN ValidateSoldierInitLinks( UINT8 ubCode )
{
SOLDIERINITNODE *curr;
UINT32 uiNumInvalids = 0;
UINT16 str[512];
wchar_t str[512];
curr = gSoldierInitHead;
while( curr )
{
+4 -4
View File
@@ -522,7 +522,7 @@ void UpdateSectorExitMenu( )
MSYS_DisableRegion(&(gExitDialog.SingleRegion) );
if( gExitDialog.fSelectedMercIsEPC )
{ //EPCs cannot leave the sector alone and must be escorted
UINT16 str[ 256 ];
wchar_t str[ 256 ];
swprintf( str, pExitingSectorHelpText[ EXIT_GUI_ESCORTED_CHARACTERS_MUST_BE_ESCORTED_HELPTEXT ], MercPtrs[ gusSelectedSoldier ]->name );
SetButtonFastHelpText( gExitDialog.uiSingleMoveButton, str );
SetRegionFastHelpText( &gExitDialog.SingleRegion, str );
@@ -531,7 +531,7 @@ void UpdateSectorExitMenu( )
{ //It has been previously determined that there are only two mercs in the squad, the selected merc
//isn't an EPC, but the other merc is. That means that this merc cannot leave the sector alone
//as he would isolate the EPC.
UINT16 str[ 256 ];
wchar_t str[ 256 ];
if( !gExitDialog.fSquadHasMultipleEPCs )
{
if( gMercProfiles[ MercPtrs[ gusSelectedSoldier ]->ubProfile ].bSex == MALE )
@@ -562,7 +562,7 @@ void UpdateSectorExitMenu( )
}
else
{
UINT16 str[ 256 ];
wchar_t str[ 256 ];
EnableButton( gExitDialog.uiSingleMoveButton );
MSYS_EnableRegion(&(gExitDialog.SingleRegion) );
swprintf( str, pExitingSectorHelpText[ EXIT_GUI_SINGLE_TRAVERSAL_WILL_SEPARATE_SQUADS_HELPTEXT ], MercPtrs[ gusSelectedSoldier ]->name );
@@ -698,7 +698,7 @@ BOOLEAN HandleSectorExitMenu( )
void RemoveSectorExitMenu( BOOLEAN fOk )
{
INT16 Str[ 50 ];
wchar_t Str[ 50 ];
if ( gfInSectorExitMenu )
{
+1 -1
View File
@@ -3832,7 +3832,7 @@ BOOLEAN HandleCheckForExitArrowsInput( BOOLEAN fAdjustConfirm )
}
else if( gubLoneMercAttemptingToAbandonEPCs )
{
UINT16 str[256];
wchar_t str[256];
if( gubLoneMercAttemptingToAbandonEPCs == 1 )
{ //Use the singular version of the string
if( gMercProfiles[ MercPtrs[ gusSelectedSoldier ]->ubProfile ].bSex == MALE )
+1 -1
View File
@@ -239,7 +239,7 @@ BOOLEAN WriteAmmoStats()
{
FilePrintf(hFile,"\t<AMMO>\r\n");
UINT16 * szRemainder = AmmoCaliber[cnt]; //the remaining string to be output (for making valid XML)
wchar_t * szRemainder = AmmoCaliber[cnt]; //the remaining string to be output (for making valid XML)
FilePrintf(hFile,"\t\t<AmmoCaliber>");
while(szRemainder[0] != '\0')
+1 -1
View File
@@ -97,7 +97,7 @@ typedef struct
BOOLEAN fDisplayTextOver; // Boolean indicating to display text on face
BOOLEAN fOldDisplayTextOver; // OLD Boolean indicating to display text on face
BOOLEAN fCanHandleInactiveNow;
INT16 zDisplayText[ 30 ]; // String of text that can be displayed
wchar_t zDisplayText[ 30 ]; // String of text that can be displayed
UINT16 usEyesX;
UINT16 usEyesY;
+6 -6
View File
@@ -4313,7 +4313,7 @@ void DebugSoldierPage3( )
}
void AppendAttachmentCode( UINT16 usItem, UINT16 *str )
void AppendAttachmentCode( UINT16 usItem, wchar_t *str )
{
switch( usItem )
{
@@ -4334,7 +4334,7 @@ void AppendAttachmentCode( UINT16 usItem, UINT16 *str )
void WriteQuantityAndAttachments( OBJECTTYPE *pObject, INT32 yp )
{
UINT16 szAttach[30];
wchar_t szAttach[30];
BOOLEAN fAttachments;
//100% Qty: 2 Attach:
//100% Qty: 2
@@ -4360,8 +4360,8 @@ void WriteQuantityAndAttachments( OBJECTTYPE *pObject, INT32 yp )
{ //ammo
if( pObject->ubNumberOfObjects > 1 )
{
UINT16 str[50];
UINT16 temp[5];
wchar_t str[50];
wchar_t temp[5];
UINT8 i;
swprintf( str, L"Clips: %d (%d", pObject->ubNumberOfObjects, pObject->bStatus[0] );
for( i = 1; i < pObject->ubNumberOfObjects; i++ )
@@ -4400,8 +4400,8 @@ void DebugSoldierPage4( )
{
SOLDIERTYPE *pSoldier;
UINT32 uiMercFlags;
UINT16 szOrders[20];
UINT16 szAttitude[20];
wchar_t szOrders[20];
wchar_t szAttitude[20];
UINT16 usSoldierIndex;
UINT8 ubLine;
+2 -2
View File
@@ -161,8 +161,8 @@ typedef enum{
typedef struct
{
UINT16 zName[ NAME_LENGTH ];
UINT16 zNickname[ NICKNAME_LENGTH ];
wchar_t zName[ NAME_LENGTH ];
wchar_t zNickname[ NICKNAME_LENGTH ];
UINT32 uiAttnSound;
UINT32 uiCurseSound;
UINT32 uiDieSound;
+3 -3
View File
@@ -746,7 +746,7 @@ BOOLEAN CopyExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 s
// to the video buffer.
//
//*****************************************************************************
UINT16 gprintfdirty(INT16 x, INT16 y, UINT16 * pFontString, ...)
UINT16 gprintfdirty(INT16 x, INT16 y, wchar_t * pFontString, ...)
{
va_list argptr;
wchar_t string[512];
@@ -783,7 +783,7 @@ INT32 iBack;
return(uiStringLength);
}
UINT16 gprintfinvalidate(INT16 x, INT16 y, UINT16 * pFontString, ...)
UINT16 gprintfinvalidate(INT16 x, INT16 y, wchar_t * pFontString, ...)
{
va_list argptr;
wchar_t string[512];
@@ -807,7 +807,7 @@ UINT16 uiStringLength, uiStringHeight;
// explicit instantiating work around MSVC not supporting export templated functions/classes (jonathanl)
UINT16 gprintfRestore(INT16 x, INT16 y, UINT16 * pFontString, ...)
UINT16 gprintfRestore(INT16 x, INT16 y, wchar_t * pFontString, ...)
{
va_list argptr;
wchar_t string[512];
+4 -4
View File
@@ -83,7 +83,7 @@ typedef struct
INT16 sY;
UINT8 ubFontBack;
UINT8 ubFontFore;
INT16 pzText[ 200 ];
wchar_t pzText[ 200 ];
OVERLAY_CALLBACK BltCallback;
} VIDEO_OVERLAY_DESC;
@@ -124,9 +124,9 @@ BOOLEAN EmptyBackgroundRects( void );
// GPRINTF DIRTY STUFF
UINT16 gprintfdirty(INT16 x, INT16 y, UINT16 * pFontString, ...);
UINT16 gprintfinvalidate(INT16 x, INT16 y, UINT16 * pFontString, ...);
UINT16 gprintfRestore(INT16 x, INT16 y, UINT16 * pFontString, ...);
UINT16 gprintfdirty(INT16 x, INT16 y, wchar_t * pFontString, ...);
UINT16 gprintfinvalidate(INT16 x, INT16 y, wchar_t * pFontString, ...);
UINT16 gprintfRestore(INT16 x, INT16 y, wchar_t * pFontString, ...);
// VIDEO OVERLAY STUFF
+1 -1
View File
@@ -440,7 +440,7 @@ void RenderTacticalPlacementGUI()
SOLDIERTYPE *pSoldier;
UINT32 uiDestPitchBYTES;
UINT16 usHatchColor;
UINT16 str[ 128 ];
wchar_t str[ 128 ];
UINT8 *pDestBuf;
UINT8 ubColor;
+1 -1
View File
@@ -2229,7 +2229,7 @@ BOOLEAN EvaluateWorld( UINT8 * pSector, UINT8 ubLevel )
INT32 cnt;
INT32 i;
INT32 iTilesetID;
UINT16 str[40];
wchar_t str[40];
UINT8 bCounts[ WORLD_MAX ][8];
UINT8 ubCombine;
UINT8 szDirFilename[ 50 ];
+3 -3
View File
@@ -128,7 +128,7 @@ void DefineProgressBarPanel( UINT32 ubID, UINT8 r, UINT8 g, UINT8 b,
//Assigning a title for the panel will automatically position the text horizontally centered on the
//panel and vertically centered from the top of the panel, to the top of the progress bar.
void SetProgressBarTitle( UINT32 ubID, UINT16 *pString, UINT32 usFont, UINT8 ubForeColor, UINT8 ubShadowColor )
void SetProgressBarTitle( UINT32 ubID, wchar_t *pString, UINT32 usFont, UINT8 ubForeColor, UINT8 ubShadowColor )
{
PROGRESSBAR *pCurr;
Assert( ubID < MAX_PROGRESSBARS );
@@ -142,7 +142,7 @@ void SetProgressBarTitle( UINT32 ubID, UINT16 *pString, UINT32 usFont, UINT8 ubF
}
if( pString && wcslen( pString ) )
{
pCurr->swzTitle = (UINT16*)MemAlloc( sizeof( UINT16 ) * ( wcslen( pString ) + 1 ) );
pCurr->swzTitle = (wchar_t*)MemAlloc( sizeof( wchar_t ) * ( wcslen( pString ) + 1 ) );
swprintf( pCurr->swzTitle, pString );
}
pCurr->usTitleFont = (UINT16)usFont;
@@ -186,7 +186,7 @@ void RemoveProgressBar( UINT8 ubID )
//As the process animates using UpdateProgressBar( 0 to 100 ), the total progress bar will only reach 30%
//at the 100% mark within UpdateProgressBar. At that time, you would go onto the next step, resetting the
//relative start and end percentage from 30 to whatever, until your done.
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT32 uiRelStartPerc, UINT32 uiRelEndPerc, UINT16 *str)
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT32 uiRelStartPerc, UINT32 uiRelEndPerc, wchar_t *str)
{
PROGRESSBAR *pCurr;
UINT16 usStartX, usStartY;
+2 -2
View File
@@ -12,7 +12,7 @@ typedef struct PROGRESSBAR
BOOLEAN fPanel;
UINT16 usPanelLeft, usPanelTop, usPanelRight, usPanelBottom;
UINT16 usColor, usLtColor, usDkColor;
UINT16 *swzTitle;
wchar_t *swzTitle;
UINT16 usTitleFont;
UINT8 ubTitleFontForeColor, ubTitleFontShadowColor;
UINT16 usMsgFont;
@@ -61,7 +61,7 @@ void RemoveProgressBar( UINT8 ubID );
//As the process animates using UpdateProgressBar( 0 to 100 ), the total progress bar will only reach 30%
//at the 100% mark within UpdateProgressBar. At that time, you would go onto the next step, resetting the
//relative start and end percentage from 30 to whatever, until your done.
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT32 uiRelStartPerc, UINT32 uiRelEndPerc, UINT16 *str);
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT32 uiRelStartPerc, UINT32 uiRelEndPerc, wchar_t *str);
//This part renders the progress bar at the percentage level that you specify. If you have set relative
//percentage values in the above function, then the uiPercentage will be reflected based off of the relative
+1 -1
View File
@@ -354,7 +354,7 @@ UINT16 WFGetFontHeight( INT32 FontNum )
}
INT16 WFStringPixLength( UINT16 *string,INT32 UseFont )
INT16 WFStringPixLength( wchar_t *string,INT32 UseFont )
{
if ( USE_WINFONTS( ) )
{
+1 -1
View File
@@ -22,7 +22,7 @@ extern INT32 giCurWinFont;
// ATE: A few winfont wrappers..
UINT16 WFGetFontHeight( INT32 FontNum );
INT16 WFStringPixLength( UINT16 *string,INT32 UseFont );
INT16 WFStringPixLength( wchar_t *string,INT32 UseFont );
+1 -1
View File
@@ -392,7 +392,7 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorde
// reset flags
guiFlags = 0;
usStringPixLength = WFStringPixLength( (UINT16 *) pString, TEXT_POPUP_FONT);
usStringPixLength = WFStringPixLength( pString, TEXT_POPUP_FONT);
if( usStringPixLength < ( usWidth - ( MERC_TEXT_POPUP_WINDOW_TEXT_OFFSET_X ) * 2 ) )
{
+12 -12
View File
@@ -32,7 +32,7 @@ void AddChar( UINT32 uiKey );
void RemoveChar( UINT8 ubArrayIndex );
void DeleteHilitedText();
void DoublePercentileCharacterFromStringIntoString( UINT16 *pSrcString, UINT16 *pDstString );
void DoublePercentileCharacterFromStringIntoString( wchar_t *pSrcString, wchar_t *pDstString );
//All exclusive input types are handled in this function.
void HandleExclusiveInput( UINT32 uiKey );
@@ -63,7 +63,7 @@ typedef struct TEXTINPUTNODE{
UINT8 ubID;
UINT16 usInputType;
UINT8 ubMaxChars;
UINT16 *szString;
wchar_t *szString;
UINT8 ubStrLen;
BOOLEAN fEnabled;
BOOLEAN fUserField;
@@ -238,7 +238,7 @@ void KillAllTextInputModes()
//of calls to this function dictate the TAB order from traversing from one field to the next. This
//function adds mouse regions and processes them for you, as well as deleting them when you are done.
void AddTextInputField( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT8 bPriority,
UINT16 *szInitText, UINT8 ubMaxChars, UINT16 usInputType )
wchar_t *szInitText, UINT8 ubMaxChars, UINT16 usInputType )
{
TEXTINPUTNODE *pNode;
pNode = (TEXTINPUTNODE*)MemAlloc(sizeof(TEXTINPUTNODE));
@@ -266,7 +266,7 @@ void AddTextInputField( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, IN
if( usInputType == INPUTTYPE_EXCLUSIVE_24HOURCLOCK )
ubMaxChars = 6;
//Allocate and copy the string.
pNode->szString = (UINT16*)MemAlloc( (ubMaxChars+1)*sizeof(UINT16) );
pNode->szString = (wchar_t*)MemAlloc( (ubMaxChars+1)*sizeof(wchar_t) );
Assert( pNode->szString );
if( szInitText )
{
@@ -383,7 +383,7 @@ INT16 GetActiveFieldID()
//This is a useful call made from an external user input field. Using the previous file dialog example, this
//call would be made when the user selected a different filename in the list via clicking or scrolling with
//the arrows, or even using alpha chars to jump to the appropriate filename.
void SetInputFieldStringWith16BitString( UINT8 ubField, UINT16 *szNewText )
void SetInputFieldStringWith16BitString( UINT8 ubField, wchar_t *szNewText )
{
TEXTINPUTNODE *curr;
curr = gpTextInputHead;
@@ -458,7 +458,7 @@ void Get8BitStringFromField( UINT8 ubField, UINT8 *szString )
szString[0] = '\0';
}
void Get16BitStringFromField( UINT8 ubField, UINT16 *szString )
void Get16BitStringFromField( UINT8 ubField, wchar_t *szString )
{
TEXTINPUTNODE *curr;
curr = gpTextInputHead;
@@ -478,8 +478,8 @@ void Get16BitStringFromField( UINT8 ubField, UINT16 *szString )
//returns -1 if blank or invalid. Only works for positive numbers.
INT32 GetNumericStrictValueFromField( UINT8 ubField )
{
UINT16 *ptr;
UINT16 str[20];
wchar_t *ptr;
wchar_t str[20];
INT32 total;
Get16BitStringFromField( ubField, str );
//Blank string, so return -1
@@ -1242,7 +1242,7 @@ void RenderActiveTextField()
{
UINT32 uiCursorXPos;
UINT16 usOffset;
UINT16 str[ 256 ];
wchar_t str[ 256 ];
if( !gpActive || !gpActive->szString )
return;
@@ -1320,7 +1320,7 @@ void RenderInactiveTextField( UINT8 ubID )
{
UINT16 usOffset;
TEXTINPUTNODE* pNode, *curr;
UINT16 str[ 256 ];
wchar_t str[ 256 ];
curr = gpTextInputHead;
pNode = NULL;
while( curr )
@@ -1348,7 +1348,7 @@ void RenderInactiveTextField( UINT8 ubID )
void RenderInactiveTextFieldNode( TEXTINPUTNODE *pNode )
{
UINT16 usOffset;
UINT16 str[ 256 ];
wchar_t str[ 256 ];
if( !pNode || !pNode->szString )
return;
SaveFontSettings();
@@ -1747,7 +1747,7 @@ void SetExclusive24HourTimeValue( UINT8 ubField, UINT16 usTime )
}
}
void DoublePercentileCharacterFromStringIntoString( UINT16 *pSrcString, UINT16 *pDstString )
void DoublePercentileCharacterFromStringIntoString( wchar_t *pSrcString, wchar_t *pDstString )
{
INT32 iSrcIndex = 0, iDstIndex = 0;
while( pSrcString[ iSrcIndex ] != 0 )
+3 -3
View File
@@ -90,7 +90,7 @@ UINT16 GetTextInputCursor();
//of calls to this function dictate the TAB order from traversing from one field to the next. This
//function adds mouse regions and processes them for you, as well as deleting them when you are done.
void AddTextInputField( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT8 bPriority,
UINT16 *szInitText, UINT8 ubMaxChars, UINT16 usInputType );
wchar_t *szInitText, UINT8 ubMaxChars, UINT16 usInputType );
//This allows you to insert special processing functions and modes that can't be determined here. An example
//would be a file dialog where there would be a file list. This file list would be accessed using the Win95
@@ -113,13 +113,13 @@ void RemoveTextInputField( UINT8 ubField );
//This is a useful call made from an external user input field. Using the previous file dialog example, this
//call would be made when the user selected a different filename in the list via clicking or scrolling with
//the arrows, or even using alpha chars to jump to the appropriate filename.
void SetInputFieldStringWith16BitString( UINT8 ubField, UINT16 *szNewText );
void SetInputFieldStringWith16BitString( UINT8 ubField, wchar_t *szNewText );
void SetInputFieldStringWith8BitString( UINT8 ubField, UINT8 * szNewText );
//Allows external functions to access the strings within the fields at anytime.
void Get8BitStringFromField( UINT8 ubField, UINT8 *szString );
void Get16BitStringFromField( UINT8 ubField, UINT16 *szString );
void Get16BitStringFromField( UINT8 ubField, wchar_t *szString );
//Utility functions for the INPUTTYPE_EXCLUSIVE_24HOURCLOCK input type.
UINT16 GetExclusive24HourTimeValueFromField( UINT8 ubField );
+3 -3
View File
@@ -504,15 +504,15 @@ void LoadAllExternalText( void )
LoadAllItemNames();
}
INT16* GetWeightUnitString( void )
wchar_t* GetWeightUnitString( void )
{
if ( gGameSettings.fOptions[ TOPTION_USE_METRIC_SYSTEM ] ) // metric
{
return(INT16 *)( pMessageStrings[ MSG_KILOGRAM_ABBREVIATION ] );
return( pMessageStrings[ MSG_KILOGRAM_ABBREVIATION ] );
}
else
{
return(INT16 *)( pMessageStrings[ MSG_POUND_ABBREVIATION ] );
return( pMessageStrings[ MSG_POUND_ABBREVIATION ] );
}
}

Some files were not shown because too many files have changed in this diff Show More