- 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;
};
};
}