mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
bug fixes from Overhaul:
- Data type changes - Templates removed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -37,7 +37,7 @@ extern INT16 sGridX; // symbol already declared globally in editscreen.cpp (jona
|
||||
extern INT16 sGridY; // symbol already declared globally in editscreen.cpp (jonathanl)
|
||||
INT16 sBadMarker = -1;
|
||||
|
||||
UINT16 *wszSelType[6]= { L"Small", L"Medium", L"Large", L"XLarge", L"Width: xx", L"Area" };
|
||||
STR16 wszSelType[6]= { L"Small", L"Medium", L"Large", L"XLarge", L"Width: xx", L"Area" };
|
||||
|
||||
BOOLEAN gfAllowRightButtonSelections = FALSE;
|
||||
BOOLEAN gfCurrentSelectionWithRightButton = FALSE;
|
||||
|
||||
@@ -29,7 +29,7 @@ void IncreaseSelectionDensity();
|
||||
void DecreaseSelectionDensity();
|
||||
void RemoveCursors();
|
||||
|
||||
extern UINT16 *wszSelType[6];
|
||||
extern STR16 wszSelType[6];
|
||||
|
||||
extern BOOLEAN gfCurrentSelectionWithRightButton;
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ void InitEditorItemStatsButtons()
|
||||
|
||||
void InitEditorMercsToolbar()
|
||||
{
|
||||
INT16 TempString[30];
|
||||
UINT16 *FaceDirs[8] = {L"north",L"northeast",L"east",L"southeast",L"south",L"southwest",L"west",L"northwest"};
|
||||
CHAR16 TempString[30];
|
||||
STR16 FaceDirs[8] = {L"north",L"northeast",L"east",L"southeast",L"south",L"southwest",L"west",L"northwest"};
|
||||
INT32 x;
|
||||
|
||||
iEditorButton[ MERCS_PLAYERTOGGLE ] =
|
||||
@@ -256,8 +256,8 @@ void InitEditorMercsToolbar()
|
||||
iScreenWidthOffset + 360, 2 * iScreenHeightOffset + 395, 30, 30, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, MercsDirectionSetCallback );
|
||||
for ( x = 0; x < 8; x++ )
|
||||
{
|
||||
swprintf( (wchar_t *)TempString, (wchar_t *)L"Set merc to face %s", FaceDirs[x] );
|
||||
SetButtonFastHelpText( iEditorButton[ FIRST_MERCS_DIRECTION_BUTTON + x ], (UINT16 *) TempString );
|
||||
swprintf( TempString, L"Set merc to face %s", FaceDirs[x] );
|
||||
SetButtonFastHelpText( iEditorButton[ FIRST_MERCS_DIRECTION_BUTTON + x ], TempString );
|
||||
MSYS_SetBtnUserData( iEditorButton[ FIRST_MERCS_DIRECTION_BUTTON + x ], 0, x);
|
||||
}
|
||||
|
||||
|
||||
@@ -428,10 +428,10 @@ void EnableEditorTaskbar(void)
|
||||
//A specialized mprint function that'll restore the editor panel underneath the
|
||||
//string before rendering the string. This is obviously only useful for drawing text
|
||||
//in the editor taskbar.
|
||||
void mprintfEditor(INT16 x, INT16 y, UINT16 *pFontString, ...)
|
||||
void mprintfEditor(INT16 x, INT16 y, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT16 uiStringLength, uiStringHeight;
|
||||
|
||||
Assert( pFontString != NULL );
|
||||
@@ -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( wchar_t *str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h )
|
||||
void DrawEditorInfoBox( STR16 str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h )
|
||||
{
|
||||
UINT16 usFillColorDark, usFillColorLight, usFillColorBack;
|
||||
UINT16 x2, y2;
|
||||
@@ -694,7 +694,7 @@ void RenderMapEntryPointsAndLights()
|
||||
}
|
||||
}
|
||||
|
||||
void BuildTriggerName( OBJECTTYPE *pItem, UINT16 *szItemName )
|
||||
void BuildTriggerName( OBJECTTYPE *pItem, STR16 szItemName )
|
||||
{
|
||||
if( pItem->usItem == SWITCH )
|
||||
{
|
||||
@@ -727,7 +727,7 @@ void RenderDoorLockInfo()
|
||||
{
|
||||
INT16 i, xp, yp;
|
||||
INT16 sScreenX, sScreenY;
|
||||
wchar_t str[ 50 ];
|
||||
CHAR16 str[ 50 ];
|
||||
for( i = 0; i < gubNumDoors; i++ )
|
||||
{
|
||||
GetGridNoScreenPos( DoorTable[ i ].sGridNo, 0, &sScreenX, &sScreenY );
|
||||
@@ -781,7 +781,7 @@ void RenderSelectedItemBlownUp()
|
||||
HVOBJECT hVObject;
|
||||
INT16 sScreenX, sScreenY, xp, yp;
|
||||
ITEM_POOL *pItemPool;
|
||||
UINT16 szItemName[ SIZE_ITEM_NAME ];
|
||||
CHAR16 szItemName[ SIZE_ITEM_NAME ];
|
||||
INT32 i;
|
||||
INT16 sWidth, sHeight, sOffsetX, sOffsetY;
|
||||
|
||||
@@ -826,7 +826,7 @@ void RenderSelectedItemBlownUp()
|
||||
|
||||
if( gpItem->usItem == ACTION_ITEM )
|
||||
{
|
||||
UINT16 *pStr;
|
||||
STR16 pStr;
|
||||
pStr = GetActionItemName( gpItem );
|
||||
xp = sScreenX - (StringPixLength( pStr, FONT10ARIALBOLD ) - 40) / 2;
|
||||
yp += 10;
|
||||
@@ -865,7 +865,7 @@ void RenderSelectedItemBlownUp()
|
||||
|
||||
void RenderEditorInfo( )
|
||||
{
|
||||
wchar_t FPSText[ 50 ];
|
||||
CHAR16 FPSText[ 50 ];
|
||||
static INT32 iSpewWarning = 0;
|
||||
INT16 iMapIndex;
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ void DisableEditorRegion( INT8 bRegionID );
|
||||
|
||||
|
||||
//Rendering Utils
|
||||
void mprintfEditor(INT16 x, INT16 y, wchar_t *pFontString, ...);
|
||||
void mprintfEditor(INT16 x, INT16 y, STR16 pFontString, ...);
|
||||
void ClearTaskbarRegion( INT16 sLeft, INT16 sTop, INT16 sRight, INT16 sBottom );
|
||||
void DrawEditorInfoBox( wchar_t *str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h );
|
||||
void DrawEditorInfoBox( STR16 str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h );
|
||||
|
||||
extern INT32 giEditMercDirectionIcons[2];
|
||||
extern UINT32 guiMercInventoryPanel;
|
||||
|
||||
@@ -729,7 +729,7 @@ void RemoveLockedDoorCursors()
|
||||
|
||||
void SetupTextInputForBuildings()
|
||||
{
|
||||
wchar_t str[4];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[4];
|
||||
CHAR16 str[4];
|
||||
INT32 temp;
|
||||
//extract light1 colors
|
||||
temp = min( GetNumericStrictValueFromField( 1 ), 255 );
|
||||
|
||||
+16
-16
@@ -221,8 +221,8 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
INT16 sWidth, sOffset, sStart;
|
||||
INT16 i, x, y;
|
||||
UINT16 usCounter;
|
||||
INT16 pStr[ 100 ];//, pStr2[ 100 ];
|
||||
UINT16 pItemName[SIZE_ITEM_NAME];
|
||||
CHAR16 pStr[ 100 ];//, pStr2[ 100 ];
|
||||
CHAR16 pItemName[SIZE_ITEM_NAME];
|
||||
UINT8 ubBitDepth;
|
||||
BOOLEAN fTypeMatch;
|
||||
INT32 iEquipCount = 0;
|
||||
@@ -366,8 +366,8 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
SetFontDestBuffer( eInfo.uiBuffer, 0, 0, eInfo.sWidth, eInfo.sHeight, FALSE );
|
||||
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"%S", LockTable[ i ].ubEditorName );
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, (STR16) pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
swprintf( pStr, L"%S", LockTable[ i ].ubEditorName );
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
|
||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
@@ -474,46 +474,46 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
if( eInfo.uiItemType != TBAR_MODE_ITEM_TRIGGERS )
|
||||
{
|
||||
LoadItemInfo( usCounter, pItemName, NULL );
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"%s", pItemName );
|
||||
swprintf( pStr, L"%s", pItemName );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( i == PRESSURE_ACTION_ID )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Pressure Action" );
|
||||
swprintf( pStr, L"Pressure Action" );
|
||||
}
|
||||
else if( i < 2 )
|
||||
{
|
||||
if( usCounter == SWITCH )
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Panic Trigger1" );
|
||||
swprintf( pStr, L"Panic Trigger1" );
|
||||
else
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Panic Action1" );
|
||||
swprintf( pStr, L"Panic Action1" );
|
||||
}
|
||||
else if( i < 4 )
|
||||
{
|
||||
if( usCounter == SWITCH )
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Panic Trigger2" );
|
||||
swprintf( pStr, L"Panic Trigger2" );
|
||||
else
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Panic Action2" );
|
||||
swprintf( pStr, L"Panic Action2" );
|
||||
}
|
||||
else if( i < 6 )
|
||||
{
|
||||
if( usCounter == SWITCH )
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Panic Trigger3" );
|
||||
swprintf( pStr, L"Panic Trigger3" );
|
||||
else
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Panic Action3" );
|
||||
swprintf( pStr, L"Panic Action3" );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( usCounter == SWITCH )
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Trigger%d", (i-4)/2 );
|
||||
swprintf( pStr, L"Trigger%d", (i-4)/2 );
|
||||
else
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"Action%d", (i-4)/2 );
|
||||
swprintf( pStr, L"Action%d", (i-4)/2 );
|
||||
}
|
||||
}
|
||||
|
||||
// WANNE: EDITOR?
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, (STR16)pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
|
||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
@@ -1616,7 +1616,7 @@ void DisplayItemStatistics()
|
||||
{
|
||||
BOOLEAN fUseSelectedItem;
|
||||
INT16 usItemIndex;
|
||||
UINT16 pItemName[SIZE_ITEM_NAME];
|
||||
CHAR16 pItemName[SIZE_ITEM_NAME];
|
||||
INVTYPE *pItem;
|
||||
|
||||
if( !eInfo.fActive )
|
||||
|
||||
@@ -68,7 +68,7 @@ BOOLEAN gfEditorForceShadeTableRebuild = FALSE;
|
||||
|
||||
void SetupTextInputForMapInfo()
|
||||
{
|
||||
wchar_t str[10];
|
||||
CHAR16 str[10];
|
||||
|
||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||
|
||||
@@ -149,7 +149,7 @@ void UpdateMapInfo()
|
||||
|
||||
void UpdateMapInfoFields()
|
||||
{
|
||||
wchar_t str[10];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[10];
|
||||
CHAR16 str[10];
|
||||
INT32 temp;
|
||||
BOOLEAN fUpdateLight1 = FALSE;
|
||||
//extract light1 colors
|
||||
@@ -246,7 +246,7 @@ void ExtractAndUpdateMapInfo()
|
||||
|
||||
BOOLEAN ApplyNewExitGridValuesToTextFields()
|
||||
{
|
||||
wchar_t str[10];
|
||||
CHAR16 str[10];
|
||||
//exit grid input fields
|
||||
if( iCurrentTaskbar != TASK_MAPINFO )
|
||||
return FALSE;
|
||||
|
||||
+22
-22
@@ -74,7 +74,7 @@ extern void GetSoldierAboveGuyPositions( SOLDIERTYPE *pSoldier, INT16 *psX, INT1
|
||||
// SANMONA_ARMS_GROUP,
|
||||
// ANGELS_GROUP,
|
||||
// NUM_CIV_GROUPS
|
||||
UINT16 gszCivGroupNames[ NUM_CIV_GROUPS ][ 20 ] =
|
||||
CHAR16 gszCivGroupNames[ NUM_CIV_GROUPS ][ 20 ] =
|
||||
{
|
||||
L"NONE",
|
||||
L"REBEL",
|
||||
@@ -112,7 +112,7 @@ UINT16 gszCivGroupNames[ NUM_CIV_GROUPS ][ 20 ] =
|
||||
// SCHEDULE_ACTION_ENTERSECTOR,
|
||||
// SCHEDULE_ACTION_STAYINSECTOR,
|
||||
// SCHEDULE_ACTION_SLEEP,
|
||||
UINT16 gszScheduleActions[ NUM_SCHEDULE_ACTIONS ][20] =
|
||||
CHAR16 gszScheduleActions[ NUM_SCHEDULE_ACTIONS ][20] =
|
||||
{
|
||||
L"No action",
|
||||
L"Lock door",
|
||||
@@ -185,7 +185,7 @@ void SetupTextInputForMercSchedule();
|
||||
void ExtractAndUpdateMercAttributes();
|
||||
void ExtractAndUpdateMercProfile();
|
||||
void ExtractAndUpdateMercSchedule();
|
||||
void CalcStringForValue( wchar_t *str, INT32 iValue, UINT32 uiMax );
|
||||
void CalcStringForValue( STR16 str, INT32 iValue, UINT32 uiMax );
|
||||
void ChangeBodyType( INT8 bOffset ); //+1 or -1 only
|
||||
|
||||
//internal merc variables
|
||||
@@ -264,21 +264,21 @@ BOOLEAN gfShowCivilians = TRUE;
|
||||
|
||||
INT16 sCurBaseDiff = DEFAULT_DIFF;
|
||||
BOOLEAN fAskForBaseDifficulty = TRUE;
|
||||
UINT16 *zDiffNames[NUM_DIFF_LVLS] = { L"Wimp", L"Easy", L"Average", L"Tough", L"Steroid Users Only" };
|
||||
STR16 zDiffNames[NUM_DIFF_LVLS] = { L"Wimp", L"Easy", L"Average", L"Tough", L"Steroid Users Only" };
|
||||
INT16 sBaseStat[NUM_DIFF_LVLS] = { 50, 60, 70, 80, 90 };
|
||||
INT16 sBaseExpLvl[NUM_DIFF_LVLS] = { 1, 3, 5, 7, 9 };
|
||||
|
||||
UINT16 *EditMercStat[12] = { L"Max Health",L"Cur Health",L"Strength",
|
||||
STR16 EditMercStat[12] = { L"Max Health",L"Cur Health",L"Strength",
|
||||
L"Agility",L"Dexterity",L"Charisma",
|
||||
L"Wisdom",L"Marksmanship",L"Explosives",
|
||||
L"Medical",L"Scientific",L"Exp Level" };
|
||||
|
||||
#define NUM_MERC_ORDERS 8
|
||||
UINT16 *EditMercOrders[8] = { L"Stationary",L"On Guard",L"Close Patrol",
|
||||
STR16 EditMercOrders[8] = { L"Stationary",L"On Guard",L"Close Patrol",
|
||||
L"Far Patrol",L"Point Patrol",L"On Call",
|
||||
L"Seek Enemy", L"Random Point Patrol"};
|
||||
|
||||
UINT16 *EditMercAttitudes[6] = { L"Defensive",L"Brave Loner",L"Brave Buddy",
|
||||
STR16 EditMercAttitudes[6] = { L"Defensive",L"Brave Loner",L"Brave Buddy",
|
||||
L"Cunning Loner",L"Cunning Buddy",
|
||||
L"Aggressive" };
|
||||
|
||||
@@ -772,7 +772,7 @@ void DisplayEditMercWindow( void )
|
||||
INT32 iXPos, iYPos, iHeight, iWidth;
|
||||
UINT16 usFillColorBack, usFillColorDark, usFillColorLight, usFillColorTextBk;
|
||||
INT32 x, iXOff;
|
||||
INT16 TempString[30];
|
||||
CHAR16 TempString[30];
|
||||
SOLDIERTYPE *pSoldier;
|
||||
INT8 iEditStat[12];
|
||||
|
||||
@@ -852,7 +852,7 @@ void DisplayEditMercWindow( void )
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 117, iYPos + 111 + (20 * x), iXPos + 116 + 30, iYPos + 111 + (20 * x) + 19, usFillColorLight );
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 117, iYPos + 111 + (20 * x), iXPos + 116 + 29, iYPos + 111 + (20 * x) + 18, usFillColorTextBk );
|
||||
|
||||
swprintf( (wchar_t *)TempString, (wchar_t *)L"%d", iEditStat[x] );
|
||||
swprintf( TempString, L"%d", iEditStat[x] );
|
||||
iXOff = (30 - StringPixLength( TempString, FONT12POINT1 )) / 2;
|
||||
gprintf( iXPos + 118 + iXOff, iYPos + 114 + (20 * x), L"%s", TempString );
|
||||
}
|
||||
@@ -1719,7 +1719,7 @@ void DeleteSelectedMerc()
|
||||
|
||||
void SetupTextInputForMercProfile()
|
||||
{
|
||||
wchar_t str[4];
|
||||
CHAR16 str[4];
|
||||
INT16 sNum;
|
||||
|
||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||
@@ -1735,7 +1735,7 @@ void SetupTextInputForMercProfile()
|
||||
|
||||
void SetupTextInputForMercAttributes()
|
||||
{
|
||||
wchar_t str[4];
|
||||
CHAR16 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( wchar_t *str, INT32 iValue, UINT32 uiMax )
|
||||
void CalcStringForValue( STR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 str[20];
|
||||
switch( gpSelected->pBasicPlacement->bBodyType )
|
||||
{
|
||||
case RANDOM: swprintf( str, L"Random" ); break;
|
||||
@@ -2534,7 +2534,7 @@ void UpdateMercsInfo()
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
SetFontShadow( FONT_NEARBLACK );
|
||||
{ //scope trick
|
||||
UINT16 tempStr[500];
|
||||
CHAR16 tempStr[500];
|
||||
swprintf( tempStr, L"%s%s%s%s%s%d.",
|
||||
L"By specifying a profile index, all of the information will be extracted from the profile ",
|
||||
L"and override any values that you have edited. It will also disable the editing features ",
|
||||
@@ -2583,8 +2583,8 @@ void UpdateMercsInfo()
|
||||
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 439, L"4)" );
|
||||
if( gubScheduleInstructions )
|
||||
{
|
||||
wchar_t str[255];
|
||||
UINT16 keyword[10] = L"";
|
||||
CHAR16 str[255];
|
||||
CHAR16 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 ] )
|
||||
{
|
||||
@@ -2657,7 +2657,7 @@ void RenderSelectedMercsInventory()
|
||||
UINT8 *pSrc, *pDst;
|
||||
INT32 xp, yp;
|
||||
UINT32 uiSrcPitchBYTES, uiDstPitchBYTES;
|
||||
UINT16 pItemName[100];
|
||||
CHAR16 pItemName[100];
|
||||
UINT8 ubFontColor;
|
||||
if( gsSelectedMercID == -1 )
|
||||
return;
|
||||
@@ -3110,9 +3110,9 @@ void RenderMercStrings()
|
||||
SOLDIERTYPE *pSoldier;
|
||||
INT16 sXPos, sYPos;
|
||||
INT16 sX, sY;
|
||||
UINT16 *pStr;
|
||||
STR16 pStr;
|
||||
SOLDIERINITNODE *curr;
|
||||
wchar_t str[50];
|
||||
CHAR16 str[50];
|
||||
|
||||
curr = gSoldierInitHead;
|
||||
while( curr )
|
||||
@@ -3306,7 +3306,7 @@ void CancelCurrentScheduleAction()
|
||||
|
||||
void RegisterCurrentScheduleAction( INT32 iMapIndex )
|
||||
{
|
||||
wchar_t str[6];
|
||||
CHAR16 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;
|
||||
wchar_t str[ 3 ];
|
||||
CHAR16 str[ 3 ];
|
||||
for( i = 0; i < 8; i++ )
|
||||
{
|
||||
if( i % 2 )
|
||||
@@ -3542,7 +3542,7 @@ void UpdateScheduleInfo()
|
||||
{
|
||||
INT32 i;
|
||||
SCHEDULENODE *pSchedule;
|
||||
wchar_t str[6];
|
||||
CHAR16 str[6];
|
||||
if( gpSelected->pSoldier->ubScheduleID )
|
||||
{
|
||||
pSchedule = GetSchedule( gpSelected->pSoldier->ubScheduleID );
|
||||
|
||||
@@ -49,7 +49,7 @@ extern UINT8 gubCurrMercMode, gubPrevMercMode;
|
||||
|
||||
#define NUM_DIFF_LVLS 5
|
||||
|
||||
extern wchar_t *zDiffNames[NUM_DIFF_LVLS];
|
||||
extern STR16 zDiffNames[NUM_DIFF_LVLS];
|
||||
extern INT16 sCurBaseDiff;
|
||||
extern INT16 gsSelectedMercID;
|
||||
extern INT16 gsSelectedMercGridNo;
|
||||
|
||||
+13
-13
@@ -40,7 +40,7 @@ INT32 giSciFiCheckboxButton = -1;
|
||||
INT32 giAlarmTriggerButton = -1;
|
||||
INT32 giOwnershipGroupButton = -1;
|
||||
|
||||
UINT16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ] =
|
||||
CHAR16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ] =
|
||||
{
|
||||
L"Klaxon Mine",
|
||||
L"Flare Mine",
|
||||
@@ -78,7 +78,7 @@ UINT16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ] =
|
||||
L"Big teargas",
|
||||
};
|
||||
|
||||
UINT16* GetActionItemName( OBJECTTYPE *pItem )
|
||||
const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
||||
{
|
||||
if( !pItem || pItem->usItem != ACTION_ITEM )
|
||||
return NULL;
|
||||
@@ -642,7 +642,7 @@ void RemoveGameTypeFlags()
|
||||
|
||||
void SetupGunGUI()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 str[20];
|
||||
INT16 yp;
|
||||
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
|
||||
swprintf( str, L"%d", gpItem->bGunStatus );
|
||||
@@ -788,7 +788,7 @@ void ExtractAndUpdateGunGUI()
|
||||
|
||||
void SetupAmmoGUI()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 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()
|
||||
{
|
||||
wchar_t str[20];
|
||||
CHAR16 str[20];
|
||||
if( gpEditingItemPool )
|
||||
{
|
||||
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||
@@ -1130,8 +1130,8 @@ void RemoveKeysGUI()
|
||||
|
||||
void SetupActionItemsGUI()
|
||||
{
|
||||
wchar_t str[4];
|
||||
UINT16 *pStr;
|
||||
CHAR16 str[4];
|
||||
STR16 pStr;
|
||||
swprintf( str, L"%d", gpItem->bStatus[0] );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->bTrap );
|
||||
@@ -1197,7 +1197,7 @@ void AlarmTriggerCheckboxCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
|
||||
void SetupTriggersGUI()
|
||||
{
|
||||
wchar_t str[4];
|
||||
CHAR16 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 );
|
||||
|
||||
@@ -81,9 +81,9 @@ enum
|
||||
ACTIONITEM_BIG_TEAR_GAS,
|
||||
NUM_ACTIONITEMS
|
||||
};
|
||||
extern UINT16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ];
|
||||
extern CHAR16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ];
|
||||
//Returns a pointer to one of the above string array.
|
||||
extern UINT16* GetActionItemName( OBJECTTYPE *pItem );
|
||||
extern const STR16 GetActionItemName( OBJECTTYPE *pItem );
|
||||
//Called by the popup menu, when a selection is made.
|
||||
extern void UpdateActionItem( INT8 bActionItemIndex );
|
||||
//Changes an action item into the type specified by the ACTIONITEM enumeration.
|
||||
|
||||
+16
-16
@@ -48,7 +48,7 @@
|
||||
//===========================================================================
|
||||
|
||||
BOOLEAN gfErrorCatch = FALSE;
|
||||
UINT16 gzErrorCatchString[ 256 ] = L"";
|
||||
CHAR16 gzErrorCatchString[ 256 ] = L"";
|
||||
INT32 giErrorCatchMessageBox = 0;
|
||||
|
||||
extern void RemoveMercsInSector();
|
||||
@@ -86,7 +86,7 @@ INT32 iCurrFileShown;
|
||||
INT32 iLastFileClicked;
|
||||
INT32 iLastClickTime;
|
||||
|
||||
UINT16 gzFilename[31];
|
||||
CHAR16 gzFilename[31];
|
||||
|
||||
FDLG_LIST *FileList = NULL;
|
||||
|
||||
@@ -101,7 +101,7 @@ BOOLEAN gfIllegalName;
|
||||
BOOLEAN gfDeleteFile;
|
||||
BOOLEAN gfNoFiles;
|
||||
|
||||
UINT16 zOrigName[60];
|
||||
CHAR16 zOrigName[60];
|
||||
GETFILESTRUCT FileInfo;
|
||||
|
||||
BOOLEAN fEnteringLoadSaveScreen = TRUE;
|
||||
@@ -371,7 +371,7 @@ UINT32 LoadSaveScreenHandle(void)
|
||||
sprintf( gszCurrFilename, "MAPS\\%S", gzFilename );
|
||||
if( GetFileFirst(gszCurrFilename, &FileInfo) )
|
||||
{
|
||||
wchar_t str[40];
|
||||
CHAR16 str[40];
|
||||
if( FileInfo.uiFileAttribs & (FILE_IS_READONLY|FILE_IS_HIDDEN|FILE_IS_SYSTEM) )
|
||||
{
|
||||
swprintf( str, L" Delete READ-ONLY file %s? ", gzFilename );
|
||||
@@ -434,7 +434,7 @@ UINT32 LoadSaveScreenHandle(void)
|
||||
}
|
||||
|
||||
|
||||
void CreateFileDialog( UINT16 *zTitle )
|
||||
void CreateFileDialog( STR16 zTitle )
|
||||
{
|
||||
|
||||
iFDlgState = DIALOG_NONE;
|
||||
@@ -511,7 +511,7 @@ void FileDialogModeCallback( UINT8 ubID, BOOLEAN fEntering )
|
||||
if( iCurrFileShown == (x-iTopFileShown) )
|
||||
{
|
||||
FListNode->FileInfo.zFileName[30] = 0;
|
||||
SetInputFieldStringWith8BitString( 0, (UINT8 *)FListNode->FileInfo.zFileName );
|
||||
SetInputFieldStringWith8BitString( 0, FListNode->FileInfo.zFileName );
|
||||
return;
|
||||
}
|
||||
FListNode = FListNode->pNext;
|
||||
@@ -721,7 +721,7 @@ void SetTopFileToLetter( UINT16 usLetter )
|
||||
iTopFileShown = x;
|
||||
if( iTopFileShown > iTotalFiles - 7 )
|
||||
iTopFileShown = iTotalFiles - 7;
|
||||
SetInputFieldStringWith8BitString( 0, (UINT8 *)prev->FileInfo.zFileName );
|
||||
SetInputFieldStringWith8BitString( 0, prev->FileInfo.zFileName );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -814,16 +814,16 @@ void HandleMainKeyEvents( InputAtom *pEvent )
|
||||
}
|
||||
if( curr )
|
||||
{
|
||||
SetInputFieldStringWith8BitString( 0, (UINT8 *)curr->FileInfo.zFileName );
|
||||
SetInputFieldStringWith8BitString( 0, curr->FileInfo.zFileName );
|
||||
swprintf( gzFilename, L"%S", curr->FileInfo.zFileName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//editor doesn't care about the z value. It uses it's own methods.
|
||||
void SetGlobalSectorValues( UINT16 *szFilename )
|
||||
void SetGlobalSectorValues( STR16 szFilename )
|
||||
{
|
||||
UINT16 *pStr;
|
||||
STR16 pStr;
|
||||
if( ValidCoordinate() )
|
||||
{
|
||||
//convert the coordinate string into into the actual global sector coordinates.
|
||||
@@ -869,7 +869,7 @@ void InitErrorCatchDialog()
|
||||
UINT32 ProcessFileIO()
|
||||
{
|
||||
INT16 usStartX, usStartY;
|
||||
UINT8 ubNewFilename[50];
|
||||
CHAR8 ubNewFilename[50];
|
||||
switch( gbCurrentFileIOStatus )
|
||||
{
|
||||
case INITIATE_MAP_SAVE: //draw save message
|
||||
@@ -889,7 +889,7 @@ UINT32 ProcessFileIO()
|
||||
gbCurrentFileIOStatus = SAVING_MAP;
|
||||
return LOADSAVE_SCREEN;
|
||||
case SAVING_MAP: //save map
|
||||
sprintf( (char *)ubNewFilename, "%S", gzFilename );
|
||||
sprintf( ubNewFilename, "%S", gzFilename );
|
||||
RaiseWorldLand();
|
||||
if( gfShowPits )
|
||||
RemoveAllPits();
|
||||
@@ -934,7 +934,7 @@ UINT32 ProcessFileIO()
|
||||
return LOADSAVE_SCREEN;
|
||||
case LOADING_MAP: //load map
|
||||
DisableUndo();
|
||||
sprintf( (char *)ubNewFilename, "%S", gzFilename );
|
||||
sprintf( ubNewFilename, "%S", gzFilename );
|
||||
|
||||
RemoveMercsInSector( );
|
||||
|
||||
@@ -1097,7 +1097,7 @@ BOOLEAN ValidCoordinate()
|
||||
|
||||
BOOLEAN ValidFilename()
|
||||
{
|
||||
UINT16 *pDest;
|
||||
STR16 pDest;
|
||||
if( gzFilename[0] != '\0' )// ; <----- I really think they didn't mean this!! (jonathanl)
|
||||
{
|
||||
pDest = wcsstr( gzFilename, L".dat" );
|
||||
@@ -1109,7 +1109,7 @@ BOOLEAN ValidFilename()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN ExternalLoadMap( UINT16 *szFilename )
|
||||
BOOLEAN ExternalLoadMap( STR16 szFilename )
|
||||
{
|
||||
Assert( szFilename );
|
||||
if( !wcslen( szFilename ) )
|
||||
@@ -1127,7 +1127,7 @@ BOOLEAN ExternalLoadMap( UINT16 *szFilename )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN ExternalSaveMap( UINT16 *szFilename )
|
||||
BOOLEAN ExternalSaveMap( STR16 szFilename )
|
||||
{
|
||||
Assert( szFilename );
|
||||
if( !wcslen( szFilename ) )
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@ extern BOOLEAN gfDestroyFDlg;
|
||||
|
||||
UINT32 WaitForFileName( void );
|
||||
void RemoveFileDialog(void);
|
||||
void CreateFileDialog( wchar_t *zTitle );
|
||||
void CreateFileDialog( STR16 zTitle );
|
||||
|
||||
void SelectFileDialogYPos( UINT16 usRelativeYPos );
|
||||
|
||||
@@ -37,11 +37,11 @@ BOOLEAN ExtractFilenameFromFields();
|
||||
BOOLEAN ValidCoordinate();
|
||||
BOOLEAN ValidFilename();
|
||||
|
||||
BOOLEAN ExternalLoadMap( wchar_t *szFilename );
|
||||
BOOLEAN ExternalSaveMap( wchar_t *szFilename );
|
||||
BOOLEAN ExternalLoadMap( STR16 szFilename );
|
||||
BOOLEAN ExternalSaveMap( STR16 szFilename );
|
||||
|
||||
extern BOOLEAN gfErrorCatch;
|
||||
extern UINT16 gzErrorCatchString[ 256 ];
|
||||
extern CHAR16 gzErrorCatchString[ 256 ];
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+78
-78
@@ -54,7 +54,7 @@ enum{
|
||||
BETA,
|
||||
RELEASE
|
||||
};
|
||||
UINT16 gszVersionType[5][10] = { L"Pre-Alpha", L"Alpha", L"Demo", L"Beta", L"Release" };
|
||||
CHAR16 gszVersionType[5][10] = { L"Pre-Alpha", L"Alpha", L"Demo", L"Beta", L"Release" };
|
||||
#define GLOBAL_SUMMARY_STATE RELEASE
|
||||
|
||||
//Regular masks
|
||||
@@ -85,7 +85,7 @@ BOOLEAN gfMustForceUpdateAllMaps = FALSE;
|
||||
UINT16 gusNumberOfMapsToBeForceUpdated = 0;
|
||||
BOOLEAN gfMajorUpdate = FALSE;
|
||||
|
||||
void LoadSummary( UINT8 *pSector, UINT8 ubLevel, FLOAT dMajorMapVersion );
|
||||
void LoadSummary( STR8 pSector, UINT8 ubLevel, FLOAT dMajorMapVersion );
|
||||
void RegenerateSummaryInfoForAllOutdatedMaps();
|
||||
|
||||
void SetupItemDetailsMode( BOOLEAN fAllowRecursion );
|
||||
@@ -214,9 +214,9 @@ extern INT16 gsSelSectorY; // symbol already declared globally in AI Viewer.cpp
|
||||
//summary is going to be persistant or not.
|
||||
UINT32 giInitTimer;
|
||||
|
||||
UINT16 gszFilename[40];
|
||||
UINT16 gszTempFilename[21];
|
||||
UINT16 gszDisplayName[21];
|
||||
CHAR16 gszFilename[40];
|
||||
CHAR16 gszTempFilename[21];
|
||||
CHAR16 gszDisplayName[21];
|
||||
|
||||
void CalculateOverrideStatus();
|
||||
|
||||
@@ -499,7 +499,7 @@ void DestroySummaryWindow()
|
||||
|
||||
void RenderSectorInformation()
|
||||
{
|
||||
//wchar_t str[ 100 ];
|
||||
//CHAR16 str[ 100 ];
|
||||
MAPCREATE_STRUCT *m;
|
||||
SUMMARYFILE *s;
|
||||
UINT8 ePoints = 0;
|
||||
@@ -677,7 +677,7 @@ void RenderItemDetails()
|
||||
FLOAT dAvgExistChance, dAvgStatus;
|
||||
OBJECTTYPE *pItem;
|
||||
INT32 index, i;
|
||||
wchar_t str[100];
|
||||
CHAR16 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 )
|
||||
{
|
||||
wchar_t str[100];
|
||||
CHAR16 str[100];
|
||||
BOOLEAN fSectorSummaryExists = FALSE;
|
||||
if( gusNumEntriesWithOutdatedOrNoSummaryInfo && !gfOutdatedDenied )
|
||||
{
|
||||
@@ -1379,7 +1379,7 @@ void RenderSummaryWindow()
|
||||
}
|
||||
for( x = 1; x <= 16; x++ )
|
||||
{
|
||||
wchar_t str[3];
|
||||
CHAR16 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;
|
||||
wchar_t str[2];
|
||||
CHAR16 str[2];
|
||||
for( y = 0; y < 16; y++ )
|
||||
{
|
||||
ClipRect.iTop = MAP_TOP + y*13;
|
||||
@@ -1526,11 +1526,11 @@ void RenderSummaryWindow()
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateSectorSummary( UINT16 *gszFilename, BOOLEAN fUpdate )
|
||||
void UpdateSectorSummary( STR16 gszFilename, BOOLEAN fUpdate )
|
||||
{
|
||||
wchar_t str[50];
|
||||
UINT8 szCoord[40];
|
||||
UINT16 *ptr;
|
||||
CHAR16 str[50];
|
||||
CHAR8 szCoord[40];
|
||||
STR16 ptr;
|
||||
INT16 x, y;
|
||||
|
||||
gfRenderSummary = TRUE;
|
||||
@@ -1637,7 +1637,7 @@ void UpdateSectorSummary( UINT16 *gszFilename, BOOLEAN fUpdate )
|
||||
CreateProgressBar( 0, iScreenWidthOffset + 250, iScreenHeightOffset + 200, iScreenWidthOffset + 390, iScreenHeightOffset + 210 );
|
||||
}
|
||||
|
||||
sprintf( (char *)szCoord, "%S", gszFilename );
|
||||
sprintf( szCoord, "%S", gszFilename );
|
||||
if( gsSectorX > 9 )
|
||||
szCoord[3] = '\0';
|
||||
else
|
||||
@@ -2088,8 +2088,8 @@ void SummaryLoadMapCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
UINT16 *ptr;
|
||||
wchar_t str[ 50 ];
|
||||
STR16 ptr;
|
||||
CHAR16 str[ 50 ];
|
||||
gfRenderSummary = TRUE;
|
||||
|
||||
SetFont( FONT10ARIAL );
|
||||
@@ -2145,9 +2145,9 @@ void SummarySaveMapCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
if( gubOverrideStatus == READONLY )
|
||||
{
|
||||
UINT8 filename[40];
|
||||
sprintf( (char *)filename, "MAPS\\%S", gszDisplayName );
|
||||
FileClearAttributes( (STR)filename );
|
||||
CHAR8 filename[40];
|
||||
sprintf( filename, "MAPS\\%S", gszDisplayName );
|
||||
FileClearAttributes( filename );
|
||||
}
|
||||
if( ExternalSaveMap( gszDisplayName ) )
|
||||
{
|
||||
@@ -2232,8 +2232,8 @@ void LoadGlobalSummary()
|
||||
UINT32 uiNumBytesRead;
|
||||
FLOAT dMajorVersion;
|
||||
INT32 x,y;
|
||||
UINT8 szFilename[40];
|
||||
UINT8 szSector[6];
|
||||
CHAR8 szFilename[40];
|
||||
CHAR8 szSector[6];
|
||||
|
||||
OutputDebugString( "Executing LoadGlobalSummary()...\n" );
|
||||
|
||||
@@ -2269,12 +2269,12 @@ void LoadGlobalSummary()
|
||||
for( x = 0; x < 16; x++ )
|
||||
{
|
||||
gbSectorLevels[x][y] = 0;
|
||||
sprintf( (char *)szSector, "%c%d", 'A' + y, x + 1 );
|
||||
sprintf( szSector, "%c%d", 'A' + y, x + 1 );
|
||||
|
||||
//main ground level
|
||||
sprintf( (char *)szFilename, "%c%d.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2285,13 +2285,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//main B1 level
|
||||
sprintf( (char *)szFilename, "%c%d_b1.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_b1.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2302,13 +2302,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_b1.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_b1.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//main B2 level
|
||||
sprintf( (char *)szFilename, "%c%d_b2.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_b2.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2319,13 +2319,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_b2.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_b2.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//main B3 level
|
||||
sprintf( (char *)szFilename, "%c%d_b3.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_b3.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2336,13 +2336,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_b3.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_b3.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//alternate ground level
|
||||
sprintf( (char *)szFilename, "%c%d_a.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_a.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2353,13 +2353,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_a.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_a.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//alternate B1 level
|
||||
sprintf( (char *)szFilename, "%c%d_b1_a.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_b1_a.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2370,13 +2370,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_b1_a.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_b1_a.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//alternate B2 level
|
||||
sprintf( (char *)szFilename, "%c%d_b2_a.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_b2_a.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2387,13 +2387,13 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_b2_a.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_b2_a.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
//alternate B3 level
|
||||
sprintf( (char *)szFilename, "%c%d_b3_a.dat", 'A' + y, x + 1 );
|
||||
sprintf( szFilename, "%c%d_b3_a.dat", 'A' + y, x + 1 );
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2404,8 +2404,8 @@ void LoadGlobalSummary()
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( (char *)szFilename, "%s_b3_a.sum", szSector );
|
||||
FileDelete( (STR)szFilename );
|
||||
sprintf( szFilename, "%s_b3_a.sum", szSector );
|
||||
FileDelete( szFilename );
|
||||
}
|
||||
}
|
||||
OutputDebugString( (LPCSTR)String("Sector Row %c complete... \n", y + 'A') );
|
||||
@@ -2462,7 +2462,7 @@ void GenerateSummaryList()
|
||||
//SetFileManCurrentDirectory( Dir );
|
||||
}
|
||||
|
||||
void WriteSectorSummaryUpdate( UINT8 *puiFilename, UINT8 ubLevel, SUMMARYFILE *pSummaryFileInfo )
|
||||
void WriteSectorSummaryUpdate( STR8 puiFilename, UINT8 ubLevel, SUMMARYFILE *pSummaryFileInfo )
|
||||
{
|
||||
FILE *fp;
|
||||
STRING512 DataDir;
|
||||
@@ -2486,7 +2486,7 @@ void WriteSectorSummaryUpdate( UINT8 *puiFilename, UINT8 ubLevel, SUMMARYFILE *p
|
||||
sprintf( ptr, ".sum" );
|
||||
|
||||
//write the summary information
|
||||
fp = fopen( (const char *)puiFilename, "wb" );
|
||||
fp = fopen( puiFilename, "wb" );
|
||||
Assert( fp );
|
||||
fwrite( pSummaryFileInfo, 1, sizeof( SUMMARYFILE ), fp );
|
||||
fclose( fp );
|
||||
@@ -2546,17 +2546,17 @@ void SummaryNewCaveLevelCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
}
|
||||
}
|
||||
|
||||
void LoadSummary( UINT8 *pSector, UINT8 ubLevel, FLOAT dMajorMapVersion )
|
||||
void LoadSummary( STR8 pSector, UINT8 ubLevel, FLOAT dMajorMapVersion )
|
||||
{
|
||||
UINT8 filename[40];
|
||||
CHAR8 filename[40];
|
||||
SUMMARYFILE temp;
|
||||
INT32 x, y;
|
||||
FILE *fp;
|
||||
sprintf( (char *)filename, (const char *)pSector );
|
||||
sprintf( filename, pSector );
|
||||
if( ubLevel % 4 )
|
||||
{
|
||||
UINT8 str[4];
|
||||
sprintf( (char *)str, "_b%d", ubLevel % 4 );
|
||||
CHAR8 str[4];
|
||||
sprintf( str, "_b%d", ubLevel % 4 );
|
||||
strcat( filename, str );
|
||||
}
|
||||
if( ubLevel >= 4 )
|
||||
@@ -2565,7 +2565,7 @@ void LoadSummary( UINT8 *pSector, UINT8 ubLevel, FLOAT dMajorMapVersion )
|
||||
}
|
||||
strcat( filename, ".sum" );
|
||||
|
||||
fp = fopen( (const char *)filename, "rb" );
|
||||
fp = fopen( filename, "rb" );
|
||||
if( !fp )
|
||||
{
|
||||
gusNumEntriesWithOutdatedOrNoSummaryInfo++;
|
||||
@@ -2620,11 +2620,11 @@ void UpdateMasterProgress()
|
||||
}
|
||||
}
|
||||
|
||||
void ReportError( UINT8 *pSector, UINT8 ubLevel )
|
||||
void ReportError( STR8 pSector, UINT8 ubLevel )
|
||||
{
|
||||
static INT32 yp = iScreenHeightOffset + 180;
|
||||
wchar_t str[40];
|
||||
UINT16 temp[10];
|
||||
CHAR16 str[40];
|
||||
CHAR16 temp[10];
|
||||
|
||||
//Make sure the file exists... if not, then return false
|
||||
swprintf( str, L"%S", pSector );
|
||||
@@ -2642,7 +2642,7 @@ void ReportError( UINT8 *pSector, UINT8 ubLevel )
|
||||
void RegenerateSummaryInfoForAllOutdatedMaps()
|
||||
{
|
||||
INT32 x, y;
|
||||
UINT8 str[40];
|
||||
CHAR8 str[40];
|
||||
SUMMARYFILE *pSF;
|
||||
//CreateProgressBar( 0, 20, 120, 300, 132 ); //slave (individual)
|
||||
//CreateProgressBar( 1, 20, 100, 300, 112 ); //master (total)
|
||||
@@ -2659,7 +2659,7 @@ void RegenerateSummaryInfoForAllOutdatedMaps()
|
||||
|
||||
for( y = 0; y < 16; y++ ) for( x = 0; x < 16; x++ )
|
||||
{
|
||||
sprintf( (char *)str, "%c%d", y + 'A', x + 1 );
|
||||
sprintf( str, "%c%d", y + 'A', x + 1 );
|
||||
if( gbSectorLevels[x][y] & GROUND_LEVEL_MASK )
|
||||
{
|
||||
pSF = gpSectorSummary[x][y][0];
|
||||
@@ -2726,7 +2726,7 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
UINT8 str[40];
|
||||
CHAR8 str[40];
|
||||
CreateProgressBar( 0, iScreenWidthOffset + 20, iScreenHeightOffset + 100, iScreenWidthOffset + 300, iScreenHeightOffset + 112 ); //slave (individual)
|
||||
DefineProgressBarPanel( 0, 65, 79, 94, iScreenWidthOffset + 10, iScreenHeightOffset + 80, iScreenWidthOffset + 310, iScreenHeightOffset + 132 );
|
||||
SetProgressBarTitle( 0, L"Generating map summary", BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
|
||||
@@ -2738,7 +2738,7 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
gpCurrentSectorSummary = NULL;
|
||||
}
|
||||
|
||||
sprintf( (char *)str, "%c%d", gsSelSectorY + 'A' - 1, gsSelSectorX );
|
||||
sprintf( str, "%c%d", gsSelSectorY + 'A' - 1, gsSelSectorX );
|
||||
EvaluateWorld( str, (UINT8)giCurrLevel );
|
||||
|
||||
gpSectorSummary[ gsSelSectorX ][ gsSelSectorY ][ giCurrLevel ] = gpCurrentSectorSummary;
|
||||
@@ -2751,7 +2751,7 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
|
||||
void ExtractTempFilename()
|
||||
{
|
||||
wchar_t str[40];
|
||||
CHAR16 str[40];
|
||||
Get16BitStringFromField( 1, str );
|
||||
if( wcscmp( gszTempFilename, str ) )
|
||||
{
|
||||
@@ -2766,8 +2766,8 @@ void ExtractTempFilename()
|
||||
void ApologizeOverrideAndForceUpdateEverything()
|
||||
{
|
||||
INT32 x, y;
|
||||
wchar_t str[ 50 ];
|
||||
UINT8 name[50];
|
||||
CHAR16 str[ 50 ];
|
||||
CHAR8 name[50];
|
||||
SUMMARYFILE *pSF;
|
||||
//Create one huge assed button
|
||||
gfMajorUpdate = TRUE;
|
||||
@@ -2801,7 +2801,7 @@ void ApologizeOverrideAndForceUpdateEverything()
|
||||
|
||||
for( y = 0; y < 16; y++ ) for( x = 0; x < 16; x++ )
|
||||
{
|
||||
sprintf( (char *)name, "%c%d", y + 'A', x + 1 );
|
||||
sprintf( name, "%c%d", y + 'A', x + 1 );
|
||||
if( gbSectorLevels[x][y] & GROUND_LEVEL_MASK )
|
||||
{
|
||||
pSF = gpSectorSummary[x][y][0];
|
||||
@@ -2884,7 +2884,7 @@ void ApologizeOverrideAndForceUpdateEverything()
|
||||
}
|
||||
}
|
||||
|
||||
EvaluateWorld( (UINT8 *)"p3_m.dat", 0 );
|
||||
EvaluateWorld( "p3_m.dat", 0 );
|
||||
|
||||
RemoveProgressBar( 2 );
|
||||
gfUpdatingNow = FALSE;
|
||||
@@ -2901,7 +2901,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
||||
HWFILE hfile;
|
||||
UINT32 uiNumBytesRead;
|
||||
UINT32 uiNumItems;
|
||||
UINT8 szFilename[40];
|
||||
CHAR8 szFilename[40];
|
||||
BASIC_SOLDIERCREATE_STRUCT basic;
|
||||
SOLDIERCREATE_STRUCT priority;
|
||||
INT32 i, j;
|
||||
@@ -2937,8 +2937,8 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
||||
gpCurrentSectorSummary = gpSectorSummary[ gsSelSectorX - 1 ][ gsSelSectorY - 1 ][ giCurrLevel ];
|
||||
}
|
||||
//Open the original map for the sector
|
||||
sprintf( (char *)szFilename, "MAPS\\%S", gszFilename );
|
||||
hfile = FileOpen( (STR)szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
sprintf( szFilename, "MAPS\\%S", gszFilename );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
if( !hfile )
|
||||
{ //The file couldn't be found!
|
||||
return;
|
||||
|
||||
@@ -14,7 +14,7 @@ void DestroySummaryWindow();
|
||||
void RenderSummaryWindow();
|
||||
void LoadWorldInfo();
|
||||
|
||||
void UpdateSectorSummary( wchar_t *gszFilename, BOOLEAN fUpdate );
|
||||
void UpdateSectorSummary( STR16 gszFilename, BOOLEAN fUpdate );
|
||||
|
||||
void SaveGlobalSummary();
|
||||
void LoadGlobalSummary();
|
||||
|
||||
@@ -97,9 +97,9 @@ typedef struct SUMMARYFILE
|
||||
|
||||
extern BOOLEAN gfAutoLoadA9;
|
||||
|
||||
extern BOOLEAN EvaluateWorld( UINT8 * pSector, UINT8 ubLevel );
|
||||
extern BOOLEAN EvaluateWorld( STR8 pSector, UINT8 ubLevel );
|
||||
|
||||
extern void WriteSectorSummaryUpdate( UINT8 *puiFilename, UINT8 ubLevel, SUMMARYFILE *pSummaryFileInfo );
|
||||
extern void WriteSectorSummaryUpdate( STR8 puiFilename, UINT8 ubLevel, SUMMARYFILE *pSummaryFileInfo );
|
||||
|
||||
extern BOOLEAN gfMustForceUpdateAllMaps;
|
||||
extern BOOLEAN gfMajorUpdate;
|
||||
|
||||
@@ -119,7 +119,7 @@ BOOLEAN gfConfirmExitPending = FALSE;
|
||||
BOOLEAN gfIntendOnEnteringEditor = FALSE;
|
||||
|
||||
//original
|
||||
extern UINT8 gubFilename[ 200 ];
|
||||
extern CHAR8 gubFilename[ 200 ];
|
||||
INT16 gsBanksSubIndex = 0;
|
||||
INT16 gsOldBanksSubIndex = 1;
|
||||
INT16 gsCliffsSubIndex = 0;
|
||||
@@ -3540,7 +3540,7 @@ void ProcessAreaSelection( BOOLEAN fWithLeftButton )
|
||||
gubMaxRoomNumber++;
|
||||
if( iCurrentTaskbar == TASK_BUILDINGS && TextInputMode() )
|
||||
{
|
||||
wchar_t str[4];
|
||||
CHAR16 str[4];
|
||||
swprintf( str, L"%d", gubCurrRoomNumber );
|
||||
SetInputFieldStringWith16BitString( 1, str );
|
||||
SetActiveField( 0 );
|
||||
@@ -3816,7 +3816,7 @@ void UpdateLastActionBeforeLeaving()
|
||||
|
||||
void ReloadMap()
|
||||
{
|
||||
UINT16 szFilename[30];
|
||||
CHAR16 szFilename[30];
|
||||
swprintf( szFilename, L"%S", gubFilename );
|
||||
ExternalLoadMap( szFilename );
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ UINT8 gubMessageBoxStatus = MESSAGEBOX_NONE;
|
||||
void MsgBoxOkClkCallback( GUI_BUTTON *butn, INT32 reason );
|
||||
void MsgBoxCnclClkCallback( GUI_BUTTON *butn, INT32 reason );
|
||||
|
||||
void CreateMessageBox( UINT16 *wzString )
|
||||
void CreateMessageBox( STR16 wzString )
|
||||
{
|
||||
INT16 sPixLen;
|
||||
INT16 sStartX, sStartY;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ enum
|
||||
extern UINT8 gubMessageBoxStatus;
|
||||
extern BOOLEAN gfMessageBoxResult;
|
||||
|
||||
void CreateMessageBox( wchar_t *wzString );
|
||||
void CreateMessageBox( STR16 wzString );
|
||||
BOOLEAN MessageBoxHandled();
|
||||
void RemoveMessageBox();
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ MOUSE_REGION popupRegion;
|
||||
UINT16 gusEntryHeight;
|
||||
BOOLEAN fWaitingForLButtonRelease = FALSE;
|
||||
|
||||
extern UINT16 gszScheduleActions[ NUM_SCHEDULE_ACTIONS ][20];
|
||||
extern CHAR16 gszScheduleActions[ NUM_SCHEDULE_ACTIONS ][20];
|
||||
|
||||
//Finds the string for any popup menu in JA2 -- the strings are stored
|
||||
//in different ways in each instance.
|
||||
INT16* GetPopupMenuString( UINT8 ubIndex )
|
||||
STR16 GetPopupMenuString( UINT8 ubIndex )
|
||||
{
|
||||
switch( gPopup.ubPopupMenuID )
|
||||
{
|
||||
@@ -58,11 +58,11 @@ INT16* GetPopupMenuString( UINT8 ubIndex )
|
||||
return gTilesets[ ubIndex ].zName;
|
||||
case OWNERSHIPGROUP_POPUP: //civilian groups
|
||||
case CHANGECIVGROUP_POPUP: //civilian groups
|
||||
return (INT16 *)gszCivGroupNames[ ubIndex ];
|
||||
return gszCivGroupNames[ ubIndex ];
|
||||
case SCHEDULEACTION_POPUP: //setting scheduling actions
|
||||
return (INT16 *)gszScheduleActions[ ubIndex ];
|
||||
return gszScheduleActions[ ubIndex ];
|
||||
case ACTIONITEM_POPUP:
|
||||
return (INT16 *)gszActionItemDesc[ ubIndex ];
|
||||
return gszActionItemDesc[ ubIndex ];
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ typedef struct currentPopupMenuInformation{
|
||||
|
||||
//A global var that keeps the popup menu information.
|
||||
extern CurrentPopupMenuInformation gPopup;
|
||||
extern wchar_t *popupMenuStrings[5];
|
||||
extern STR16 popupMenuStrings[5];
|
||||
|
||||
//These are the two main functions that outside users would call.
|
||||
void InitPopupMenu( INT32 iButtonID, UINT8 ubPopupMenuID, UINT8 ubDirection );
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ typedef struct
|
||||
};
|
||||
struct
|
||||
{
|
||||
wchar_t * pString;
|
||||
STR16 pString;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ void DoneFadeOutForExitGameInitOptionScreen( void );
|
||||
void DoneFadeInForExitGameInitOptionScreen( void );
|
||||
// JA2Gold: no more timed turns setting
|
||||
//UINT8 GetCurrentTimedTurnsButtonSetting();
|
||||
BOOLEAN DoGioMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
BOOLEAN DoGioMessageBox( UINT8 ubStyle, const STR16 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, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
BOOLEAN DoGioMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
||||
|
||||
|
||||
+5
-5
@@ -13,23 +13,23 @@
|
||||
#ifdef JA2BETAVERSION
|
||||
|
||||
//BETA/TEST BUILD VERSION
|
||||
wchar_t zVersionLabel[256] = { L"Map Editor v1.13.857" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.857" };
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
wchar_t zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
wchar_t zVersionLabel[256] = { L"Release v1.13.870" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.871" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
INT8 czVersionNumber[16] = { "Build 07.04.19" }; //YY.MM.DD
|
||||
wchar_t zTrackingNumber[16] = { L"Z" };
|
||||
CHAR8 czVersionNumber[16] = { "Build 07.04.19" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
//
|
||||
|
||||
+3
-3
@@ -11,9 +11,9 @@ extern "C" {
|
||||
// Keeps track of the game version
|
||||
//
|
||||
|
||||
extern wchar_t zVersionLabel[256];
|
||||
extern INT8 czVersionNumber[16];
|
||||
extern wchar_t zTrackingNumber[16];
|
||||
extern CHAR16 zVersionLabel[256];
|
||||
extern CHAR8 czVersionNumber[16];
|
||||
extern CHAR16 zTrackingNumber[16];
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ UINT32 InitializeJA2(void)
|
||||
#endif
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
if( ProcessIfMultilingualCmdLineArgDetected( (UINT8 *)gzCommandLine ) )
|
||||
if( ProcessIfMultilingualCmdLineArgDetected( gzCommandLine ) )
|
||||
{ //If the multilingual text code generator has activated, quit now.
|
||||
gfProgramIsRunning = FALSE;
|
||||
return( INIT_SCREEN );
|
||||
@@ -539,7 +539,7 @@ UINT32 InitializeJA2(void)
|
||||
{
|
||||
OutputDebugString( "Beginning JA2 using -EDITORAUTO commandline argument...\n" );
|
||||
//For editor purposes, need to know the default map file.
|
||||
sprintf( (char *)gubFilename, "none");
|
||||
sprintf( gubFilename, "none");
|
||||
//also set the sector
|
||||
gWorldSectorX = 0;
|
||||
gWorldSectorY = 0;
|
||||
@@ -553,7 +553,7 @@ UINT32 InitializeJA2(void)
|
||||
{
|
||||
OutputDebugString( "Beginning JA2 using -EDITOR commandline argument...\n" );
|
||||
//For editor purposes, need to know the default map file.
|
||||
sprintf( (char *)gubFilename, "none");
|
||||
sprintf( gubFilename, "none");
|
||||
//also set the sector
|
||||
gWorldSectorX = 0;
|
||||
gWorldSectorY = 0;
|
||||
|
||||
+1
-1
@@ -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.870_EN.exe"
|
||||
OutputFile="D:\games\Jagged Alliance 2 v1.13\JA2 v1.13.871_EN.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||
|
||||
@@ -284,7 +284,7 @@ void RenderAimArchives()
|
||||
UINT16 usPosX, usPosY,x,y,i=0;
|
||||
UINT8 ubNumRows=0;
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
|
||||
|
||||
DrawAimDefaults();
|
||||
@@ -486,8 +486,8 @@ void DisplayAlumniOldMercPopUp()
|
||||
HVOBJECT hFaceHandle;
|
||||
// WRAPPED_STRING *pFirstWrappedString, *pTempWrappedString;
|
||||
UINT16 usHeight = GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
||||
wchar_t sName[AIM_ALUMNI_NAME_SIZE];
|
||||
wchar_t sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
||||
CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
||||
CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
||||
UINT32 uiStartLoc;
|
||||
UINT16 usStringPixLength;
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ void HandleAimFacialIndex()
|
||||
BOOLEAN RenderAimFacialIndex()
|
||||
{
|
||||
UINT16 usPosX, usPosY, x,y;
|
||||
wchar_t sString[150];
|
||||
CHAR16 sString[150];
|
||||
UINT8 i;
|
||||
|
||||
DrawAimDefaults();
|
||||
|
||||
@@ -170,7 +170,7 @@ void HandleAimHistory()
|
||||
|
||||
void RenderAimHistory()
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usPosY;
|
||||
|
||||
@@ -359,7 +359,7 @@ void SelectHistoryMenuButtonsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReaso
|
||||
|
||||
BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usPosY=0;
|
||||
UINT16 usNumPixels=0;
|
||||
@@ -408,7 +408,7 @@ BOOLEAN InitTocMenu()
|
||||
UINT16 usHeight;
|
||||
UINT16 usWidth=0;
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT8 ubLocInFile[]=
|
||||
{IN_THE_BEGINNING,
|
||||
THE_ISLAND_METAVIRA,
|
||||
|
||||
+15
-15
@@ -382,7 +382,7 @@ extern UINT8 gubContractLength; // symbol already declared globally in Merc Cont
|
||||
BOOLEAN gfBuyEquipment;
|
||||
INT32 giContractAmount=0;
|
||||
INT32 giMercFaceIndex;
|
||||
wchar_t gsTalkingMercText[ TEXT_POPUP_STRING_SIZE ];
|
||||
CHAR16 gsTalkingMercText[ TEXT_POPUP_STRING_SIZE ];
|
||||
UINT32 guiTimeThatMercStartedTalking;
|
||||
UINT32 guiLastHandleMercTime;
|
||||
BOOLEAN gfFirstTimeInContactScreen;
|
||||
@@ -881,7 +881,7 @@ BOOLEAN RenderAIMMembers()
|
||||
HVOBJECT hPriceHandle;
|
||||
HVOBJECT hWeaponBoxHandle;
|
||||
UINT16 x, uiPosX;
|
||||
wchar_t wTemp[50];
|
||||
CHAR16 wTemp[50];
|
||||
|
||||
DrawAimDefaults();
|
||||
|
||||
@@ -979,7 +979,7 @@ BOOLEAN RenderAIMMembers()
|
||||
|
||||
BOOLEAN DrawNumeralsToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 usLocY, UINT32 ulFont, UINT8 ubColor)
|
||||
{
|
||||
wchar_t sStr[10];
|
||||
CHAR16 sStr[10];
|
||||
|
||||
swprintf(sStr, L"%d", iNumber);
|
||||
|
||||
@@ -990,7 +990,7 @@ BOOLEAN DrawNumeralsToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 u
|
||||
|
||||
BOOLEAN DrawMoneyToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 usLocY, UINT32 ulFont, UINT8 ubColor)
|
||||
{
|
||||
wchar_t sStr[10];
|
||||
CHAR16 sStr[10];
|
||||
|
||||
swprintf(sStr, L"%d",iNumber);
|
||||
InsertCommasForDollarFigure( sStr );
|
||||
@@ -1045,8 +1045,8 @@ void SelectFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
BOOLEAN UpdateMercInfo(void)
|
||||
{
|
||||
//UINT16 PosY = 300;
|
||||
wchar_t MercInfoString[ SIZE_MERC_BIO_INFO ];
|
||||
wchar_t AdditionalInfoString[ SIZE_MERC_BIO_INFO ];
|
||||
CHAR16 MercInfoString[ SIZE_MERC_BIO_INFO ];
|
||||
CHAR16 AdditionalInfoString[ SIZE_MERC_BIO_INFO ];
|
||||
|
||||
//Display the salaries
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH, FEE_X, HEALTH_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||
@@ -1056,8 +1056,8 @@ BOOLEAN UpdateMercInfo(void)
|
||||
//if medical deposit is required
|
||||
if( gMercProfiles[gbCurrentSoldier].bMedicalDeposit )
|
||||
{
|
||||
wchar_t zTemp[40];
|
||||
wchar_t sMedicalString[40];
|
||||
CHAR16 zTemp[40];
|
||||
CHAR16 sMedicalString[40];
|
||||
|
||||
// Display the medical cost
|
||||
swprintf( zTemp, L"%d", gMercProfiles[ gbCurrentSoldier ].sMedicalDepositAmount );
|
||||
@@ -1210,7 +1210,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
HVOBJECT hVObject;
|
||||
UINT32 usHeight, usWidth;
|
||||
ETRLEObject *pTrav;
|
||||
wchar_t gzItemName[ SIZE_ITEM_NAME ];
|
||||
CHAR16 gzItemName[ SIZE_ITEM_NAME ];
|
||||
UINT8 ubItemCount=0;
|
||||
// UINT16 gzTempItemName[ SIZE_ITEM_INFO ];
|
||||
|
||||
@@ -1250,7 +1250,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
//if there are more then 1 piece of equipment in the current slot, display how many there are
|
||||
if( gMercProfiles[ubMercID].bInvNumber[ i ] > 1 )
|
||||
{
|
||||
wchar_t zTempStr[ 32 ];
|
||||
CHAR16 zTempStr[ 32 ];
|
||||
// UINT16 usWidthOfNumber;
|
||||
|
||||
swprintf( zTempStr, L"x%d", gMercProfiles[ ubMercID ].bInvNumber[ i ] );
|
||||
@@ -1818,7 +1818,7 @@ INT8 AimMemberHireMerc()
|
||||
|
||||
BOOLEAN DisplayVideoConferencingDisplay()
|
||||
{
|
||||
wchar_t sMercName[128];
|
||||
CHAR16 sMercName[128];
|
||||
|
||||
if( ( gubVideoConferencingMode == AIM_VIDEO_NOT_DISPLAYED_MODE ) || ( gubVideoConferencingMode == AIM_VIDEO_POPUP_MODE ) )
|
||||
return(FALSE);
|
||||
@@ -1955,8 +1955,8 @@ void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
||||
|
||||
UINT32 DisplayMercChargeAmount()
|
||||
{
|
||||
wchar_t wTemp[50];
|
||||
wchar_t wDollarTemp[50];
|
||||
CHAR16 wTemp[50];
|
||||
CHAR16 wDollarTemp[50];
|
||||
HVOBJECT hImageHandle;
|
||||
|
||||
|
||||
@@ -2021,7 +2021,7 @@ BOOLEAN InitCreateDeleteAimPopUpBox(UINT8 ubFlag, STR16 sString1, STR16 sString2
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
HVOBJECT hPopupBoxHandle;
|
||||
static UINT16 usPopUpBoxPosX, usPopUpBoxPosY;
|
||||
static wchar_t sPopUpString1[400], sPopUpString2[400];
|
||||
static CHAR16 sPopUpString1[400], sPopUpString2[400];
|
||||
static BOOLEAN fPopUpBoxActive = FALSE;;
|
||||
|
||||
switch( ubFlag )
|
||||
@@ -2432,7 +2432,7 @@ BOOLEAN DisplayTalkingMercFaceForVideoPopUp(INT32 iFaceIndex)
|
||||
return(fIsTheMercTalking);
|
||||
}
|
||||
|
||||
void DisplayTextForMercFaceVideoPopUp(wchar_t * pString)
|
||||
void DisplayTextForMercFaceVideoPopUp(STR16 pString)
|
||||
{
|
||||
|
||||
#ifdef TAIWANESE
|
||||
|
||||
+1
-1
@@ -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(wchar_t * pString);
|
||||
void DisplayTextForMercFaceVideoPopUp(STR16 pString);
|
||||
|
||||
BOOLEAN DisplayTalkingMercFaceForVideoPopUp(INT32 iFaceIndex);
|
||||
void EnterInitAimMembers();
|
||||
|
||||
@@ -459,7 +459,7 @@ BOOLEAN DrawAimPolicyMenu()
|
||||
UINT16 i, usPosY;
|
||||
UINT16 usHeight;
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
HVOBJECT hContentButtonHandle;
|
||||
UINT8 ubLocInFile[]=
|
||||
{ DEFINITIONS,
|
||||
@@ -558,7 +558,7 @@ void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
BOOLEAN DisplayAimPolicyTitleText(void)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
|
||||
//Load anfd display title
|
||||
@@ -576,7 +576,7 @@ BOOLEAN DisplayAimPolicyTitleText(void)
|
||||
|
||||
BOOLEAN DisplayAimPolicyStatement(void)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
UINT16 usNumPixels;
|
||||
|
||||
@@ -651,7 +651,7 @@ BOOLEAN ExitAgreementButton(void)
|
||||
|
||||
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
|
||||
//Load and display title
|
||||
@@ -665,8 +665,8 @@ BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
|
||||
UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sText[400];
|
||||
CHAR16 sTemp[20];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usNumPixels;
|
||||
|
||||
@@ -688,8 +688,8 @@ UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
|
||||
UINT16 DisplayAimPolicySubParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sText[400];
|
||||
CHAR16 sTemp[20];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usNumPixels;
|
||||
|
||||
|
||||
+28
-28
@@ -1312,8 +1312,8 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
||||
UINT16 PosY, usTextPosY;
|
||||
UINT16 ubFirstIndex=0;
|
||||
UINT16 usItemIndex;
|
||||
wchar_t sDollarTemp[60];
|
||||
wchar_t sTemp[60];
|
||||
CHAR16 sDollarTemp[60];
|
||||
CHAR16 sTemp[60];
|
||||
INT16 pItemNumbers[ BOBBYR_NUM_WEAPONS_ON_PAGE ];
|
||||
BOOLEAN bAddItem = FALSE;
|
||||
|
||||
@@ -1809,7 +1809,7 @@ BOOLEAN DisplayMiscInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16
|
||||
|
||||
UINT16 DisplayCostAndQty(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight, UINT16 usBobbyIndex, BOOLEAN fUsed)
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
// UINT8 ubPurchaseNumber;
|
||||
|
||||
//
|
||||
@@ -1871,7 +1871,7 @@ UINT16 DisplayCostAndQty(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight, UIN
|
||||
|
||||
UINT16 DisplayRof(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
|
||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_ROF], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
@@ -1888,7 +1888,7 @@ UINT16 DisplayRof(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
|
||||
UINT16 DisplayDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
UINT16 gunDamage = 0;
|
||||
|
||||
if ( Item[ usIndex ].usItemClass == IC_GUN || Item[ usIndex ].usItemClass == IC_LAUNCHER )
|
||||
@@ -1910,7 +1910,7 @@ UINT16 DisplayDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
|
||||
UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
|
||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_RANGE], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
swprintf(sTemp, L"%3d %s", Weapon[ usIndex ].usRange, pMessageStrings[ MSG_METER_ABBREVIATION ] );
|
||||
@@ -1921,7 +1921,7 @@ UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
|
||||
UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
|
||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_MAGAZINE], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
swprintf(sTemp, L"%3d %s", Weapon[usIndex].ubMagSize, pMessageStrings[ MSG_ROUNDS_ABBREVIATION ] );
|
||||
@@ -1963,7 +1963,7 @@ UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
|
||||
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
|
||||
//display the 'weight' string
|
||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_WEIGHT], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
@@ -1977,8 +1977,8 @@ UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||
|
||||
void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sText[400];
|
||||
CHAR16 sTemp[20];
|
||||
UINT32 uiStartLoc=0;
|
||||
|
||||
UINT8 ubPurchaseNumber;
|
||||
@@ -2280,7 +2280,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
UINT8 i;
|
||||
CHAR16 zItemName[ SIZE_ITEM_NAME ];
|
||||
UINT8 ubItemCount=0;
|
||||
wchar_t pStr[ 250 ];
|
||||
CHAR16 pStr[ 250 ];
|
||||
|
||||
if( gfBigImageMouseRegionCreated )
|
||||
return;
|
||||
@@ -2308,11 +2308,11 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
// INT16 apStr2[20];
|
||||
// UINT8 ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject );
|
||||
|
||||
// swprintf( (wchar_t *)apStr, L"%d", ubAttackAPs );
|
||||
// swprintf( apStr, L"%d", ubAttackAPs );
|
||||
|
||||
// if (GetShotsPerBurst(pObject) > 0)
|
||||
// {
|
||||
// swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
// swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
// wcscat( apStr, apStr2 );
|
||||
// }
|
||||
// else
|
||||
@@ -2322,7 +2322,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
|
||||
// if (GetAutofireShotsPerFiveAPs(pObject) > 0)
|
||||
// {
|
||||
// swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
// swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
// wcscat( apStr, apStr2 );
|
||||
// }
|
||||
// else
|
||||
@@ -2332,7 +2332,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// swprintf( (wchar_t *)apStr, L"" );
|
||||
// swprintf( apStr, L"" );
|
||||
//}
|
||||
|
||||
//Info for weapons
|
||||
@@ -2340,7 +2340,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
{
|
||||
UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
AmmoCaliber[ Weapon[ pItemNumbers[ i ] ].ubCalibre ],
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
@@ -2370,11 +2370,11 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
// INT16 apStr2[20];
|
||||
// UINT8 ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject );
|
||||
|
||||
// swprintf( (wchar_t *)apStr, L"%d", ubAttackAPs );
|
||||
// swprintf( apStr, L"%d", ubAttackAPs );
|
||||
|
||||
// if (GetShotsPerBurst(pObject) > 0)
|
||||
// {
|
||||
// swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
// swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
// wcscat( apStr, apStr2 );
|
||||
// }
|
||||
// else
|
||||
@@ -2384,7 +2384,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
|
||||
// if (GetAutofireShotsPerFiveAPs(pObject) > 0)
|
||||
// {
|
||||
// swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
// swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
// wcscat( apStr, apStr2 );
|
||||
// }
|
||||
// else
|
||||
@@ -2394,7 +2394,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// swprintf( (wchar_t *)apStr, L"" );
|
||||
// swprintf( apStr, L"" );
|
||||
//}
|
||||
|
||||
//Info for weapons
|
||||
@@ -2402,7 +2402,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
{
|
||||
UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
Weapon[ pItemNumbers[ i ] ].bAccuracy, //Accuracy
|
||||
@@ -2426,7 +2426,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
{
|
||||
UINT16 meleeDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubMeleeDamageMultiplier );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s\n%s %d\n%s %s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s\n%s %d\n%s %s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
meleeDamage, //Melee damage
|
||||
@@ -2442,7 +2442,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
|
||||
case IC_AMMO:
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ], //Item long name
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
@@ -2450,7 +2450,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
);
|
||||
|
||||
//Lal: do not delete, commented out for next version
|
||||
//swprintf( (wchar_t *)pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s",
|
||||
//swprintf( pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s",
|
||||
// AmmoCaliber[ Magazine[ Item[usItem].ubClassIndex ].ubCalibre ], //Ammo calibre
|
||||
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
||||
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
||||
@@ -2467,7 +2467,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
if( ubItemCount != 0 )
|
||||
{
|
||||
swprintf( zItemName, L"\n%s %d %s",BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_1], ubItemCount, BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_2] );
|
||||
wcscat( (wchar_t *) pStr, zItemName );
|
||||
wcscat( pStr, zItemName );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2480,7 +2480,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
UINT16 explDamage = (UINT16)( Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubDamage + ( (double) Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier );
|
||||
UINT16 explStunDamage = (UINT16)( Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubStunDamage + ( (double) Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubStunDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
explDamage, //Expl damage
|
||||
@@ -2518,7 +2518,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
break;
|
||||
}
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s\n%s %d%% (%d)\n%s %d%%\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s\n%s %d%% (%d)\n%s %d%%\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ], //Item long name
|
||||
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||
iProtection, //Protection rating in % based on best armor
|
||||
@@ -2539,7 +2539,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
default:
|
||||
// The final, and typical case, is that of an item with a percent status
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ], //Item long name
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
|
||||
@@ -774,7 +774,7 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
}
|
||||
else
|
||||
{
|
||||
wchar_t zTemp[ 128 ];
|
||||
CHAR16 zTemp[ 128 ];
|
||||
|
||||
//if the city is Drassen, and the airport sector is player controlled
|
||||
if( gbSelectedCity == BR_DRASSEN && !StrategicMap[ SECTOR_INFO_TO_STRATEGIC_INDEX( SEC_B13 ) ].fEnemyControlled )
|
||||
@@ -902,15 +902,15 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16 usGridY, BobbyRayPurchaseStruct *pBobbyRayPurchase, BOOLEAN fJustDisplayTitles, INT32 iOrderNum )
|
||||
{
|
||||
UINT16 i,j;
|
||||
wchar_t sText[400];
|
||||
wchar_t sBack[400];
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sText[400];
|
||||
CHAR16 sBack[400];
|
||||
CHAR16 sTemp[20];
|
||||
UINT16 usPosY;
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT32 uiTotal;
|
||||
UINT16 usStringLength;
|
||||
UINT16 usPixLength;
|
||||
wchar_t OneChar[2];
|
||||
CHAR16 OneChar[2];
|
||||
INT32 iGrandTotal;
|
||||
INT32 iSubTotal;
|
||||
|
||||
@@ -1056,7 +1056,7 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
||||
|
||||
void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16 usGridX, UINT16 usGridY, INT32 iOrderNum )
|
||||
{
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
HVOBJECT hPixHandle;
|
||||
INT32 iShippingCost = 0;
|
||||
// INT32 iTotal;
|
||||
@@ -1584,7 +1584,7 @@ void DrawSelectedCity( UINT8 ubCityNumber )
|
||||
|
||||
void DisplayShippingLocationCity()
|
||||
{
|
||||
wchar_t sTemp[40];
|
||||
CHAR16 sTemp[40];
|
||||
UINT16 usPosY;
|
||||
|
||||
//display the name on the title bar
|
||||
|
||||
@@ -741,7 +741,7 @@ BOOLEAN ImpExists ( STR nickName )
|
||||
strcpy(zFileName,nickName);
|
||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %s", (STR) zFileName));
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %s", zFileName));
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %d", FileExistsNoDB(zFileName) ));
|
||||
|
||||
return FileExistsNoDB(zFileName);
|
||||
|
||||
+3
-3
@@ -540,7 +540,7 @@ void SelectAimLogoRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
BOOLEAN DisplayAimSlogan()
|
||||
{
|
||||
wchar_t sSlogan[400];
|
||||
CHAR16 sSlogan[400];
|
||||
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, 0, AIM_HISTORY_LINE_SIZE);
|
||||
//Display Aim Text under the logo
|
||||
@@ -553,7 +553,7 @@ BOOLEAN DisplayAimSlogan()
|
||||
|
||||
BOOLEAN DisplayAimCopyright()
|
||||
{
|
||||
wchar_t sSlogan[400];
|
||||
CHAR16 sSlogan[400];
|
||||
UINT32 uiStartLoc=0;
|
||||
|
||||
//Load and Display the copyright notice
|
||||
@@ -854,7 +854,7 @@ BOOLEAN DrawWarningBox( BOOLEAN fInit, BOOLEAN fRedraw )
|
||||
|
||||
if( fInit || fRedraw)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usLocY = AIM_WARNING_TEXT_Y + (GetFontHeight(AIM_WARNING_FONT) + 2) * 2;
|
||||
HVOBJECT hWarningHandle;
|
||||
|
||||
+21
-21
@@ -657,10 +657,10 @@ void RenderEmail( void )
|
||||
|
||||
void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iFirstData, UINT32 uiSecondData )
|
||||
{
|
||||
wchar_t pSubject[320];
|
||||
CHAR16 pSubject[320];
|
||||
//MessagePtr pMessageList;
|
||||
//MessagePtr pMessage;
|
||||
//wchar_t pMessageString[320];
|
||||
//CHAR16 pMessageString[320];
|
||||
INT32 iPosition=0;
|
||||
INT32 iCounter=1;
|
||||
Email FakeEmail;
|
||||
@@ -692,10 +692,10 @@ void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 u
|
||||
|
||||
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition)
|
||||
{
|
||||
wchar_t pSubject[320];
|
||||
CHAR16 pSubject[320];
|
||||
//MessagePtr pMessageList;
|
||||
//MessagePtr pMessage;
|
||||
//wchar_t pMessageString[320];
|
||||
//CHAR16 pMessageString[320];
|
||||
INT32 iPosition=0;
|
||||
INT32 iCounter=1;
|
||||
|
||||
@@ -719,10 +719,10 @@ void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32
|
||||
|
||||
void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate)
|
||||
{
|
||||
wchar_t pSubject[320];
|
||||
CHAR16 pSubject[320];
|
||||
//MessagePtr pMessageList;
|
||||
//MessagePtr pMessage;
|
||||
//wchar_t pMessageString[320];
|
||||
//CHAR16 pMessageString[320];
|
||||
INT32 iPosition=0;
|
||||
INT32 iCounter=1;
|
||||
|
||||
@@ -786,7 +786,7 @@ void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject,
|
||||
//pTempEmail->pText[iCounter]=NULL;
|
||||
|
||||
// copy subject
|
||||
pTempEmail->pSubject = (STR16) MemAlloc( 128 * 2 );
|
||||
pTempEmail->pSubject = (STR16) MemAlloc( 128 * sizeof(CHAR16) );
|
||||
memset( pTempEmail->pSubject, 0, sizeof( CHAR16 ) * 128 );
|
||||
wcscpy(pTempEmail->pSubject,pSubject);
|
||||
|
||||
@@ -1224,7 +1224,7 @@ void SwapMessages(INT32 iIdA, INT32 iIdB)
|
||||
EmailPtr pA=pEmailList;
|
||||
EmailPtr pB=pEmailList;
|
||||
EmailPtr pTemp= (EmailPtr) MemAlloc(sizeof(Email) );
|
||||
pTemp->pSubject = (STR16) MemAlloc( 128 * 2 );
|
||||
pTemp->pSubject = (STR16) MemAlloc( 128 * sizeof(CHAR16) );
|
||||
|
||||
memset( pTemp->pSubject, 0, sizeof( CHAR16 ) * 128 );
|
||||
|
||||
@@ -1347,7 +1347,7 @@ void DrawLetterIcon(INT32 iCounter, BOOLEAN fRead)
|
||||
|
||||
void DrawSubject(INT32 iCounter, STR16 pSubject, BOOLEAN fRead)
|
||||
{
|
||||
wchar_t pTempSubject[320];
|
||||
CHAR16 pTempSubject[320];
|
||||
|
||||
|
||||
// draw subject line of mail being viewed in viewer
|
||||
@@ -1419,7 +1419,7 @@ void DrawSender(INT32 iCounter, UINT8 ubSender, BOOLEAN fRead)
|
||||
|
||||
void DrawDate(INT32 iCounter, INT32 iDate, BOOLEAN fRead)
|
||||
{
|
||||
wchar_t sString[20];
|
||||
CHAR16 sString[20];
|
||||
|
||||
SetFontShadow(NO_SHADOW);
|
||||
SetFontForeground( FONT_BLACK );
|
||||
@@ -1711,8 +1711,8 @@ INT32 DisplayEmailMessage(EmailPtr pMail)
|
||||
INT32 iCnt=0;
|
||||
INT32 iHeight=0;
|
||||
INT32 iCounter=1;
|
||||
// wchar_t pString[MAIL_STRING_SIZE/2 + 1];
|
||||
wchar_t pString[MAIL_STRING_SIZE];
|
||||
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
||||
CHAR16 pString[MAIL_STRING_SIZE];
|
||||
INT32 iOffSet=0;
|
||||
INT32 iHeightTemp=0;
|
||||
INT32 iHeightSoFar = 0;
|
||||
@@ -2938,8 +2938,8 @@ void DisplayEmailMessageSubjectDateFromLines( EmailPtr pMail , INT32 iViewerY)
|
||||
{
|
||||
// this procedure will draw the title/headers to From, Subject, Date fields in the display
|
||||
// message box
|
||||
UINT16 usX, usY;
|
||||
wchar_t sString[100];
|
||||
INT16 usX, usY;
|
||||
CHAR16 sString[100];
|
||||
|
||||
// font stuff
|
||||
SetFont(MESSAGE_FONT);
|
||||
@@ -3333,8 +3333,8 @@ void HandleIMPCharProfileResultsMessage( void)
|
||||
INT32 iCnt=0;
|
||||
INT32 iHeight=0;
|
||||
INT32 iCounter=0;
|
||||
// wchar_t pString[MAIL_STRING_SIZE/2 + 1];
|
||||
wchar_t pString[MAIL_STRING_SIZE];
|
||||
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
||||
CHAR16 pString[MAIL_STRING_SIZE];
|
||||
INT32 iOffSet=0;
|
||||
INT32 iViewerY=0;
|
||||
INT32 iHeightTemp=0;
|
||||
@@ -3370,7 +3370,7 @@ void HandleIMPCharProfileResultsMessage( void)
|
||||
// have to place players name into string for first record
|
||||
if( iCounter == 0)
|
||||
{
|
||||
wchar_t zTemp[512];
|
||||
CHAR16 zTemp[512];
|
||||
|
||||
iCurrentIMPSlot = giCurrentIMPSlot;
|
||||
|
||||
@@ -4995,8 +4995,8 @@ void ModifyInsuranceEmails( UINT16 usMessageId, INT32 *iResults, EmailPtr pMail,
|
||||
{
|
||||
INT32 iHeight=0;
|
||||
RecordPtr pTempRecord;
|
||||
// wchar_t pString[MAIL_STRING_SIZE/2 + 1];
|
||||
wchar_t pString[MAIL_STRING_SIZE];
|
||||
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
||||
CHAR16 pString[MAIL_STRING_SIZE];
|
||||
UINT8 ubCnt;
|
||||
|
||||
|
||||
@@ -5030,8 +5030,8 @@ void ModifyInsuranceEmails( UINT16 usMessageId, INT32 *iResults, EmailPtr pMail,
|
||||
|
||||
BOOLEAN ReplaceMercNameAndAmountWithProperData( CHAR16 *pFinishedString, EmailPtr pMail )
|
||||
{
|
||||
// wchar_t pTempString[MAIL_STRING_SIZE/2 + 1];
|
||||
wchar_t pTempString[MAIL_STRING_SIZE];
|
||||
// CHAR16 pTempString[MAIL_STRING_SIZE/2 + 1];
|
||||
CHAR16 pTempString[MAIL_STRING_SIZE];
|
||||
INT32 iLength=0;
|
||||
INT32 iCurLocInSourceString=0;
|
||||
INT32 iLengthOfSourceString = wcslen( pFinishedString ); //Get the length of the source string
|
||||
|
||||
+3
-3
@@ -816,7 +816,7 @@ BOOLEAN DisplayFormattedText( void )
|
||||
INT32 iHeight=0;
|
||||
INT32 iOffSet=0;
|
||||
INT32 iMessageCode;
|
||||
wchar_t sString[2048];
|
||||
CHAR16 sString[2048];
|
||||
HVOBJECT hHandle;
|
||||
UINT32 uiFirstTempPicture;
|
||||
UINT32 uiSecondTempPicture;
|
||||
@@ -1013,7 +1013,7 @@ BOOLEAN DisplayFormattedText( void )
|
||||
BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
wchar_t sString[2048];
|
||||
CHAR16 sString[2048];
|
||||
FileStringPtr pTempString = NULL ;
|
||||
FileStringPtr pLocatorString = NULL;
|
||||
INT32 iTotalYPosition = 0;
|
||||
@@ -1640,7 +1640,7 @@ BOOLEAN HandleSpecialTerroristFile( INT32 iFileNumber, STR sPictureName )
|
||||
{
|
||||
|
||||
INT32 iCounter = 0;
|
||||
wchar_t sString[2048];
|
||||
CHAR16 sString[2048];
|
||||
FileStringPtr pTempString = NULL ;
|
||||
FileStringPtr pLocatorString = NULL;
|
||||
INT32 iTotalYPosition = 0;
|
||||
|
||||
+8
-12
@@ -691,7 +691,7 @@ void DrawRecordsBackGround( void )
|
||||
void DrawRecordsColumnHeadersText( void )
|
||||
{
|
||||
// write the headers text for each column
|
||||
UINT16 usX, usY;
|
||||
INT16 usX, usY;
|
||||
|
||||
// font stuff
|
||||
SetFont(FINANCE_TEXT_FONT);
|
||||
@@ -728,9 +728,9 @@ void DrawRecordsText( void )
|
||||
// draws the text of the records
|
||||
FinanceUnitPtr pCurFinance=pCurrentFinance;
|
||||
FinanceUnitPtr pTempFinance=pFinanceListHead;
|
||||
wchar_t sString[512];
|
||||
CHAR16 sString[512];
|
||||
INT32 iCounter=0;
|
||||
UINT16 usX, usY;
|
||||
INT16 usX, usY;
|
||||
INT32 iBalance=0;
|
||||
|
||||
// setup the font stuff
|
||||
@@ -885,7 +885,7 @@ void InvalidateLapTopScreen( void )
|
||||
void DrawSummaryText( void )
|
||||
{
|
||||
INT16 usX, usY;
|
||||
wchar_t pString[100];
|
||||
CHAR16 pString[100];
|
||||
INT32 iBalance = 0;
|
||||
|
||||
|
||||
@@ -1514,7 +1514,7 @@ void ProcessTransactionString(STR16 pString, FinanceUnitPtr pFinance)
|
||||
break;
|
||||
case( TRAIN_TOWN_MILITIA ):
|
||||
{
|
||||
wchar_t str[ 128 ];
|
||||
CHAR16 str[ 128 ];
|
||||
UINT8 ubSectorX;
|
||||
UINT8 ubSectorY;
|
||||
ubSectorX = (UINT8)SECTORX( pFinance->ubSecondCode );
|
||||
@@ -1550,7 +1550,7 @@ void DisplayFinancePageNumberAndDateRange( void )
|
||||
INT32 iCounter=0;
|
||||
UINT32 uiLastDate;
|
||||
FinanceUnitPtr pTempFinance=pFinanceListHead;
|
||||
wchar_t sString[50];
|
||||
CHAR16 sString[50];
|
||||
|
||||
|
||||
// setup the font stuff
|
||||
@@ -1916,9 +1916,7 @@ BOOLEAN LoadInRecords( UINT32 uiPage )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
template void InsertCommasForDollarFigure<short *>(short *);
|
||||
template <typename string1>
|
||||
void InsertCommasForDollarFigure( string1 pString )
|
||||
void InsertCommasForDollarFigure( STR16 pString )
|
||||
{
|
||||
INT16 sCounter =0;
|
||||
INT16 sZeroCount =0;
|
||||
@@ -1984,9 +1982,7 @@ void InsertCommasForDollarFigure( string1 pString )
|
||||
|
||||
}
|
||||
|
||||
template void InsertDollarSignInToString<short *>(short *);
|
||||
template <typename string1>
|
||||
void InsertDollarSignInToString( string1 pString )
|
||||
void InsertDollarSignInToString( STR16 pString )
|
||||
{
|
||||
// run to end of string, copy everything in string 2 places right, insert a space at pString[ 1 ] and a L'$' at pString[ 0 ]
|
||||
|
||||
|
||||
+2
-4
@@ -60,10 +60,8 @@ typedef struct finance *FinanceUnitPtr;
|
||||
extern FinanceUnitPtr pFinanceListHead;
|
||||
//extern INT32 iCurrentBalance;
|
||||
UINT32 AddTransactionToPlayersBook(UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiDate, INT32 iAmount);
|
||||
template <typename string1>
|
||||
void InsertDollarSignInToString( string1 pString );
|
||||
template <typename string1>
|
||||
void InsertCommasForDollarFigure( string1 pString );
|
||||
void InsertDollarSignInToString( STR16 pString );
|
||||
void InsertCommasForDollarFigure( STR16 pString );
|
||||
INT32 GetTodaysDaysIncome( void );
|
||||
INT32 GetProjectedTotalDailyIncome( void );
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ void RenderFloristCards()
|
||||
{
|
||||
UINT8 i,j, ubCount;
|
||||
UINT16 usPosX, usPosY;
|
||||
wchar_t sTemp[ 640 ];
|
||||
CHAR16 sTemp[ 640 ];
|
||||
UINT32 uiStartLoc=0;
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 usHeightOffset;
|
||||
|
||||
@@ -359,7 +359,7 @@ void DeleteFlowerButtons()
|
||||
|
||||
BOOLEAN DisplayFloralDescriptions()
|
||||
{
|
||||
wchar_t sTemp[ 640 ];
|
||||
CHAR16 sTemp[ 640 ];
|
||||
UINT32 uiStartLoc=0, i;
|
||||
UINT16 usPosY, usPrice;
|
||||
|
||||
|
||||
@@ -199,8 +199,8 @@ UINT8 gubFlowerDestDropDownMode;
|
||||
UINT8 gubCurrentlySelectedFlowerLocation;
|
||||
|
||||
|
||||
wchar_t gsSentimentTextField[ FLOWER_ORDER_PERSONEL_SENTIMENT_NUM_CHARS ] = {0} ;
|
||||
wchar_t gsNameTextField[ FLOWER_ORDER_NAME_FIELD_NUM_CHARS ] = {0};
|
||||
CHAR16 gsSentimentTextField[ FLOWER_ORDER_PERSONEL_SENTIMENT_NUM_CHARS ] = {0} ;
|
||||
CHAR16 gsNameTextField[ FLOWER_ORDER_NAME_FIELD_NUM_CHARS ] = {0};
|
||||
|
||||
|
||||
//buttons
|
||||
@@ -508,7 +508,7 @@ void RenderFloristOrderForm()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 usPosX;
|
||||
wchar_t sTemp[ 640 ];
|
||||
CHAR16 sTemp[ 640 ];
|
||||
UINT32 uiStartLoc=0;
|
||||
|
||||
DisplayFloristDefaults();
|
||||
@@ -874,8 +874,8 @@ void DisplayFlowerDynamicItems()
|
||||
{
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usPosX;
|
||||
wchar_t sTemp[ 640 ];
|
||||
// wchar_t sText[ 640 ];
|
||||
CHAR16 sTemp[ 640 ];
|
||||
// CHAR16 sText[ 640 ];
|
||||
UINT16 usPrice;
|
||||
/*
|
||||
//display the card saying
|
||||
@@ -1200,8 +1200,8 @@ void FlowerOrderDisplayShippingLocationCity()
|
||||
void InitFlowerOrderTextInputBoxes()
|
||||
{
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sTemp[ 640 ];
|
||||
wchar_t sText[ 640 ];
|
||||
CHAR16 sTemp[ 640 ];
|
||||
CHAR16 sText[ 640 ];
|
||||
|
||||
|
||||
InitTextInputMode();
|
||||
|
||||
+4
-4
@@ -768,7 +768,7 @@ void ClearHistoryList( void )
|
||||
void DisplayHistoryListHeaders( void )
|
||||
{
|
||||
// this procedure will display the headers to each column in History
|
||||
UINT16 usX, usY;
|
||||
INT16 usX, usY;
|
||||
|
||||
// font stuff
|
||||
SetFont(HISTORY_TEXT_FONT);
|
||||
@@ -823,9 +823,9 @@ void DrawHistoryRecordsText( void )
|
||||
// draws the text of the records
|
||||
HistoryUnitPtr pCurHistory=pHistoryListHead;
|
||||
HistoryUnitPtr pTempHistory=pHistoryListHead;
|
||||
wchar_t sString[512];
|
||||
CHAR16 sString[512];
|
||||
INT32 iCounter=0;
|
||||
UINT16 usX, usY;
|
||||
INT16 usX, usY;
|
||||
INT32 iBalance=0;
|
||||
INT16 sX =0, sY =0;
|
||||
|
||||
@@ -945,7 +945,7 @@ void DisplayPageNumberAndDateRange( void )
|
||||
INT32 iCounter=0;
|
||||
UINT32 uiLastDate;
|
||||
HistoryUnitPtr pTempHistory=pHistoryListHead;
|
||||
wchar_t sString[50];
|
||||
CHAR16 sString[50];
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ void HandleInsuranceComments()
|
||||
void RenderInsuranceComments()
|
||||
{
|
||||
// HVOBJECT hPixHandle;
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usPosX, usPosY;
|
||||
|
||||
SetFontShadow( INS_FONT_SHADOW );
|
||||
@@ -190,7 +190,7 @@ void SelectInsuranceCommentLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iRea
|
||||
|
||||
BOOLEAN DisplayComment( UINT8 ubCommentorsName, UINT8 ubComment, UINT16 usPosY )
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 sNumPixels=0;
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ void GameInitInsuranceContract()
|
||||
|
||||
void EnterLaptopInitInsuranceContract()
|
||||
{
|
||||
wchar_t zTextField[14];
|
||||
CHAR16 zTextField[14];
|
||||
|
||||
swprintf( zTextField, L"%d", 0 );
|
||||
SetInputFieldStringWith16BitString( 1, zTextField );
|
||||
@@ -328,7 +328,7 @@ void HandleInsuranceContract()
|
||||
void RenderInsuranceContract()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT8 ubCount=0;
|
||||
INT16 sMercID;
|
||||
INT16 sNextMercID;
|
||||
@@ -501,7 +501,7 @@ BOOLEAN DisplayOrderGrid( UINT8 ubGridNumber, UINT8 ubMercID )
|
||||
UINT32 uiInsMercFaceImage;
|
||||
INT32 iCostOfContract=0;
|
||||
char sTemp[100];
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
BOOLEAN fDisplayMercContractStateTextColorInRed = FALSE;
|
||||
|
||||
SOLDIERTYPE *pSoldier;
|
||||
@@ -1619,7 +1619,7 @@ void PurchaseOrExtendInsuranceForSoldier( SOLDIERTYPE *pSoldier, UINT32 uiInsura
|
||||
//if the player doesnt have enough money, tell him
|
||||
if( LaptopSaveInfo.iCurrentBalance < iAmountOfMoneyTransfer )
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
|
||||
GetInsuranceText( INS_MLTI_NOT_ENOUGH_FUNDS, sText );
|
||||
if( guiCurrentScreen == LAPTOP_SCREEN )
|
||||
|
||||
@@ -182,7 +182,7 @@ void HandleInsuranceInfo()
|
||||
|
||||
void RenderInsuranceInfo()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usNewLineOffset = 0;
|
||||
UINT16 usPosX;
|
||||
|
||||
@@ -332,7 +332,7 @@ void SelectInsuranceInfoHomeLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iRe
|
||||
|
||||
void DisplaySubmitClaimPage()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usNewLineOffset = 0;
|
||||
UINT16 usPosX;
|
||||
|
||||
@@ -371,7 +371,7 @@ void DisplaySubmitClaimPage()
|
||||
|
||||
void DisplayPremiumPage()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usNewLineOffset = 0;
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
@@ -417,7 +417,7 @@ void DisplayPremiumPage()
|
||||
|
||||
void DisplayRenewingPremiumPage()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usNewLineOffset = 0;
|
||||
// HVOBJECT hPixHandle;
|
||||
|
||||
@@ -456,7 +456,7 @@ void DisplayRenewingPremiumPage()
|
||||
|
||||
void DisplayCancelationPagePage()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usNewLineOffset = 0;
|
||||
|
||||
usNewLineOffset = INS_INFO_FIRST_PARAGRAPH_Y;
|
||||
@@ -513,7 +513,7 @@ void ChangingInsuranceInfoSubPage( UINT8 ubSubPageNumber )
|
||||
|
||||
void DisplayInfoTocPage()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
UINT16 usNewLineOffset = 0;
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 usPosY;
|
||||
|
||||
@@ -148,7 +148,7 @@ void HandleInsurance()
|
||||
|
||||
void RenderInsurance()
|
||||
{
|
||||
wchar_t sText[800];
|
||||
CHAR16 sText[800];
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
DisplayInsuranceDefaults();
|
||||
|
||||
+3
-8
@@ -4439,12 +4439,7 @@ 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>
|
||||
BOOLEAN DoLapTopMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
BOOLEAN DoLapTopMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect pCenteringRect= {LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_LR_Y };
|
||||
|
||||
@@ -4464,7 +4459,7 @@ BOOLEAN DoLapTopMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
{
|
||||
// reset exit mode
|
||||
fExitDueToMessageBox = TRUE;
|
||||
@@ -4476,7 +4471,7 @@ BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT3
|
||||
return( ( iLaptopMessageBox != -1 ) );
|
||||
}
|
||||
|
||||
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {iScreenWidthOffset, iScreenHeightOffset,
|
||||
iScreenWidthOffset + 640, INV_INTERFACE_START_Y };
|
||||
|
||||
+2
-3
@@ -29,15 +29,14 @@ UINT32 DrawLapTopIcons( );
|
||||
void LapTopScreenCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
void HandleRightButtonUpEvent( void );
|
||||
|
||||
template <typename string2>
|
||||
BOOLEAN DoLapTopMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
BOOLEAN DoLapTopMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
void GoToWebPage(INT32 iPageId);
|
||||
BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16 usHeight, UINT32 uiBackGround);
|
||||
void BlitTitleBarIcons( void );
|
||||
void HandleKeyBoardShortCutsForLapTop( UINT16 usEvent, UINT32 usParam, UINT16 usKeyState );
|
||||
BOOLEAN RenderWWWProgramTitleBar( void );
|
||||
void DisplayProgramBoundingBox( BOOLEAN fMarkButtons );
|
||||
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
BOOLEAN DoLapTopSystemMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
BOOLEAN RemoveBookMark( INT32 iBookId );
|
||||
void CreateFileAndNewEmailIconFastHelpText( UINT32 uiHelpTextID, BOOLEAN fClearHelpText );
|
||||
BOOLEAN InitLaptopAndLaptopScreens();
|
||||
|
||||
@@ -351,7 +351,7 @@ void HandleMercsAccount()
|
||||
|
||||
void RenderMercsAccount()
|
||||
{
|
||||
wchar_t sText[100];
|
||||
CHAR16 sText[100];
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
DrawMecBackGround();
|
||||
@@ -470,7 +470,7 @@ void DisplayHiredMercs()
|
||||
{
|
||||
UINT16 usPosY;
|
||||
UINT32 uiContractCharge;
|
||||
wchar_t sTemp[20];
|
||||
CHAR16 sTemp[20];
|
||||
UINT8 i, usMercID;
|
||||
UINT8 ubFontColor;
|
||||
UINT8 usMercIDStart;
|
||||
|
||||
@@ -506,7 +506,7 @@ BOOLEAN DisplayMercFace( UINT8 ubMercID)
|
||||
|
||||
void LoadAndDisplayMercBio( UINT8 ubMercID )
|
||||
{
|
||||
wchar_t sText[400];
|
||||
CHAR16 sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
|
||||
//load and display the merc bio
|
||||
@@ -528,7 +528,7 @@ void LoadAndDisplayMercBio( UINT8 ubMercID )
|
||||
void DisplayMercsStats( UINT8 ubMercID )
|
||||
{
|
||||
UINT16 usPosY, usPosX;
|
||||
wchar_t sString[128];
|
||||
CHAR16 sString[128];
|
||||
|
||||
usPosY = MERC_HEALTH_Y;
|
||||
|
||||
|
||||
+2
-2
@@ -182,7 +182,7 @@ UINT8 gubCurMercIndex;
|
||||
INT32 iMercPopUpBox = -1;
|
||||
|
||||
UINT16 gusPositionOfSpecksDialogBox_X;
|
||||
wchar_t gsSpeckDialogueTextPopUp[ 900 ];
|
||||
CHAR16 gsSpeckDialogueTextPopUp[ 900 ];
|
||||
UINT16 gusSpeckDialogueX;
|
||||
UINT16 gusSpeckDialogueActualWidth;
|
||||
|
||||
@@ -1537,7 +1537,7 @@ void HandleTalkingSpeck()
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayTextForSpeckVideoPopUp(wchar_t * pString)
|
||||
void DisplayTextForSpeckVideoPopUp(STR16 pString)
|
||||
{
|
||||
UINT16 usActualHeight;
|
||||
INT32 iOldMercPopUpBoxId = iMercPopUpBox;
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ BOOLEAN RemoveMercBackGround();
|
||||
void DailyUpdateOfMercSite( UINT16 usDate);
|
||||
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID);
|
||||
|
||||
void DisplayTextForSpeckVideoPopUp(wchar_t * pString);
|
||||
void DisplayTextForSpeckVideoPopUp(STR16 pString);
|
||||
|
||||
BOOLEAN IsMercMercAvailable( UINT8 ubMercID );
|
||||
|
||||
|
||||
@@ -1501,8 +1501,8 @@ Moved so the name of the town will be in the same line as the name
|
||||
void DisplayCharStats(INT32 iId, INT32 iSlot)
|
||||
{
|
||||
INT32 iCounter=0;
|
||||
wchar_t sString[50];
|
||||
// wchar_t sStringA[ 50 ];
|
||||
CHAR16 sString[50];
|
||||
// CHAR16 sStringA[ 50 ];
|
||||
INT16 sX, sY;
|
||||
UINT32 uiHits = 0;
|
||||
SOLDIERTYPE *pSoldier = &Menptr[iId];
|
||||
@@ -1967,7 +1967,7 @@ void DrawPageNumber( void )
|
||||
{
|
||||
// draws the page number
|
||||
|
||||
wchar_t sString[10];
|
||||
CHAR16 sString[10];
|
||||
INT16 sX, sY;
|
||||
INT32 iPageNumber, iLastPage;
|
||||
|
||||
@@ -5124,7 +5124,7 @@ BOOLEAN DisplayPortraitOfPastMerc( INT32 iId , INT32 iCounter, BOOLEAN fDead, BO
|
||||
void DisplayDepartedCharStats(INT32 iId, INT32 iSlot, INT32 iState)
|
||||
{
|
||||
INT32 iCounter=0;
|
||||
wchar_t sString[50];
|
||||
CHAR16 sString[50];
|
||||
INT16 sX, sY;
|
||||
UINT32 uiHits = 0;
|
||||
|
||||
@@ -6877,8 +6877,8 @@ BOOLEAN IsPastMercOther( INT32 iId )
|
||||
void DisplayEmploymentinformation( INT32 iId, INT32 iSlot )
|
||||
{
|
||||
INT32 iCounter=0;
|
||||
wchar_t sString[50];
|
||||
wchar_t sStringA[ 50 ];
|
||||
CHAR16 sString[50];
|
||||
CHAR16 sStringA[ 50 ];
|
||||
INT16 sX, sY;
|
||||
UINT32 uiHits = 0;
|
||||
|
||||
|
||||
+7
-17
@@ -74,12 +74,7 @@ extern STR16 pUpdatePanelButtons[];
|
||||
CHAR16 gzUserDefinedButton1[ 128 ];
|
||||
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 )
|
||||
INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
{
|
||||
VSURFACE_DESC vs_desc;
|
||||
UINT16 usTextBoxWidth;
|
||||
@@ -217,7 +212,7 @@ INT32 DoMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT16
|
||||
gMsgBox.bHandled = 0;
|
||||
|
||||
// Init message box
|
||||
gMsgBox.iBoxId = PrepareMercPopupBox( iId, ubMercBoxBackground, ubMercBoxBorder, (STR16)zString, MSGBOX_DEFAULT_WIDTH, 40, 10, 30, &usTextBoxWidth, &usTextBoxHeight );
|
||||
gMsgBox.iBoxId = PrepareMercPopupBox( iId, ubMercBoxBackground, ubMercBoxBorder, zString, MSGBOX_DEFAULT_WIDTH, 40, 10, 30, &usTextBoxWidth, &usTextBoxHeight );
|
||||
|
||||
if( gMsgBox.iBoxId == -1 )
|
||||
{
|
||||
@@ -1198,33 +1193,28 @@ 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 )
|
||||
void DoScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y };
|
||||
DoScreenIndependantMessageBoxWithRect( (wchar_t *) zString, usFlags, ReturnCallback, &CenteringRect );
|
||||
DoScreenIndependantMessageBoxWithRect( zString, usFlags, ReturnCallback, &CenteringRect );
|
||||
}
|
||||
|
||||
// a basic box that don't care what screen we came from
|
||||
void DoUpperScreenIndependantMessageBox( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
void DoUpperScreenIndependantMessageBox( const STR16 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( wchar_t * zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
void DoLowerScreenIndependantMessageBox( STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {0, INV_INTERFACE_START_Y / 2, SCREEN_WIDTH, INV_INTERFACE_START_Y };
|
||||
DoScreenIndependantMessageBoxWithRect( zString, usFlags, ReturnCallback, &CenteringRect );
|
||||
}
|
||||
|
||||
|
||||
void DoScreenIndependantMessageBoxWithRect( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
void DoScreenIndependantMessageBoxWithRect( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
{
|
||||
|
||||
/// which screen are we in?
|
||||
|
||||
+9
-11
@@ -89,20 +89,18 @@ extern BOOLEAN gfDontOverRideSaveBuffer;
|
||||
// pCenteringRect Rect to send if MSG_BOX_FLAG_USE_CENTERING_RECT set. Can be NULL
|
||||
////////////////////////////////
|
||||
|
||||
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( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
void DoScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
void DoUpperScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
|
||||
void DoLowerScreenIndependantMessageBox( wchar_t * zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
void DoScreenIndependantMessageBoxWithRect( wchar_t *zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
void DoLowerScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
void DoScreenIndependantMessageBoxWithRect( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
|
||||
//wrappers for other screens
|
||||
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 );
|
||||
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||
|
||||
|
||||
#endif
|
||||
+3
-3
@@ -221,7 +221,7 @@ void SetOptionsExitScreen( UINT32 uiExitScreen );
|
||||
void SoundFXSliderChangeCallBack( INT32 iNewValue );
|
||||
void SpeechSliderChangeCallBack( INT32 iNewValue );
|
||||
void MusicSliderChangeCallBack( INT32 iNewValue );
|
||||
//BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
//BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, STR16zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
void ConfirmQuitToMainMenuMessageBoxCallBack( UINT8 bExitValue );
|
||||
void HandleSliderBarMovementSounds();
|
||||
void HandleOptionToggle( UINT8 ubButton, BOOLEAN fState, BOOLEAN fDown, BOOLEAN fPlaySound );
|
||||
@@ -1136,7 +1136,7 @@ void MusicSliderChangeCallBack( INT32 iNewValue )
|
||||
MusicSetVolume( iNewValue );
|
||||
}
|
||||
|
||||
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
{
|
||||
// reset exit mode
|
||||
gfExitOptionsDueToMessageBox = TRUE;
|
||||
@@ -1148,7 +1148,7 @@ BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiE
|
||||
return( ( giOptionsMessageBox != -1 ) );
|
||||
}
|
||||
|
||||
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ void SetOptionsScreenToggleBoxes();
|
||||
void GetOptionsScreenToggleBoxes();
|
||||
|
||||
|
||||
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+4
-4
@@ -477,7 +477,7 @@ BOOLEAN InitSaveDir()
|
||||
|
||||
// The locale-specific save dir location is of the form L"..\\SavedGames"
|
||||
// This has not changed; instead, we strip the ".." at the beginning
|
||||
sprintf( (char *) gSaveDir, "%s%S", dataDir.c_str(), pMessageStrings[ MSG_SAVEDIRECTORY ] + 2 );
|
||||
sprintf( gSaveDir, "%s%S", dataDir.c_str(), pMessageStrings[ MSG_SAVEDIRECTORY ] + 2 );
|
||||
|
||||
// This was moved here from SaveGame
|
||||
//Check to see if the save directory exists
|
||||
@@ -509,7 +509,7 @@ BOOLEAN SaveGame( UINT8 ubSaveGameID, STR16 pGameDesc )
|
||||
BOOLEAN fWePausedIt = FALSE;
|
||||
|
||||
|
||||
//sprintf( (char *) saveDir, "%S", pMessageStrings[ MSG_SAVEDIRECTORY ] );
|
||||
//sprintf( saveDir, "%S", pMessageStrings[ MSG_SAVEDIRECTORY ] );
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
#ifndef CRIPPLED_VERSION
|
||||
@@ -3632,10 +3632,10 @@ BOOLEAN LoadEmailFromSavedGame( HWFILE hFile )
|
||||
}
|
||||
|
||||
//allocate space for the subject
|
||||
pData = (UINT8 *) MemAlloc( EMAIL_SUBJECT_LENGTH * sizeof( wchar_t ) );
|
||||
pData = (UINT8 *) MemAlloc( EMAIL_SUBJECT_LENGTH * sizeof( CHAR16 ) );
|
||||
if( pData == NULL )
|
||||
return( FALSE );
|
||||
memset( pData, 0, EMAIL_SUBJECT_LENGTH * sizeof( wchar_t ) );
|
||||
memset( pData, 0, EMAIL_SUBJECT_LENGTH * sizeof( CHAR16 ) );
|
||||
|
||||
//Get the subject
|
||||
FileRead( hFile, pData, uiSizeOfSubject, &uiNumBytesRead );
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
typedef struct
|
||||
{
|
||||
UINT32 uiSavedGameVersion;
|
||||
INT8 zGameVersionNumber[ GAME_VERSION_LENGTH ];
|
||||
CHAR8 zGameVersionNumber[ GAME_VERSION_LENGTH ];
|
||||
|
||||
CHAR16 sSavedGameDesc[ SIZE_OF_SAVE_GAME_DESC ];
|
||||
|
||||
|
||||
+4
-5
@@ -175,7 +175,7 @@ UINT32 guiBackGroundAddOns;
|
||||
|
||||
|
||||
// The string that will contain the game desc text
|
||||
wchar_t gzGameDescTextField[ SIZE_OF_SAVE_GAME_DESC ] = {0} ;
|
||||
CHAR16 gzGameDescTextField[ SIZE_OF_SAVE_GAME_DESC ] = {0} ;
|
||||
|
||||
|
||||
BOOLEAN gfUserInTextInputMode = FALSE;
|
||||
@@ -1114,7 +1114,7 @@ void SaveLoadGameNumber( INT8 bSaveGameID )
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect )
|
||||
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, const STR16 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 );
|
||||
@@ -1123,8 +1123,7 @@ BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, wchar_t *zString, UINT32 ui
|
||||
return( ( giSaveLoadMessageBox != -1 ) );
|
||||
}
|
||||
|
||||
template <typename string2>
|
||||
BOOLEAN DoSaveLoadMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
BOOLEAN DoSaveLoadMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
||||
|
||||
@@ -2051,7 +2050,7 @@ void DeleteSaveGameNumber( UINT8 ubSaveGameSlotID )
|
||||
|
||||
void DisplayOnScreenNumber( BOOLEAN fErase )
|
||||
{
|
||||
wchar_t zTempString[16];
|
||||
CHAR16 zTempString[16];
|
||||
UINT16 usPosX = 6;
|
||||
UINT16 usPosY;
|
||||
INT8 bLoopNum;
|
||||
|
||||
+1
-2
@@ -23,9 +23,8 @@ UINT32 SaveLoadScreenShutdown( void );
|
||||
UINT32 SaveLoadScreenHandle( void );
|
||||
UINT32 SaveLoadScreenInit( void );
|
||||
|
||||
template <typename string2>
|
||||
//Kaiden : Trying to get Editor to work
|
||||
extern BOOLEAN DoSaveLoadMessageBox( UINT8 ubStyle, string2 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
extern BOOLEAN DoSaveLoadMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
|
||||
BOOLEAN InitSaveGameArray();
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
#define GUI_BTN_EXTERNAL_VOBJ 2
|
||||
|
||||
|
||||
UINT8 str[128];
|
||||
CHAR8 str[128];
|
||||
|
||||
//Kris: December 2, 1997
|
||||
//Special internal debugging utilities that will ensure that you don't attempt to delete
|
||||
@@ -108,7 +108,7 @@ void AssertFailIfIdenticalButtonAttributesFound( GUI_BUTTON *b )
|
||||
//if we get this far, it is reasonably safe to assume that the newly created
|
||||
//button already exists. Placing a break point on the following assert will
|
||||
//allow the coder to easily isolate the case!
|
||||
sprintf( (char *)str, "Attempting to create a button that has already been created (existing buttonID %d).", c->IDNum );
|
||||
sprintf( str, "Attempting to create a button that has already been created (existing buttonID %d).", c->IDNum );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
}
|
||||
@@ -203,10 +203,7 @@ INT32 FindFreeButtonSlot(void)
|
||||
//
|
||||
// Load images for use with QuickButtons.
|
||||
//
|
||||
template INT32 LoadButtonImage<unsigned char *>(unsigned char *, INT32, INT32, INT32, INT32, INT32);
|
||||
template INT32 LoadButtonImage<char *>(char *, INT32, INT32, INT32, INT32, INT32);
|
||||
template <typename type1>
|
||||
INT32 LoadButtonImage(type1 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite)
|
||||
INT32 LoadButtonImage(const STR8 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite)
|
||||
{
|
||||
VOBJECT_DESC vo_desc;
|
||||
UINT32 UseSlot;
|
||||
@@ -594,7 +591,7 @@ void UnloadButtonImage(INT32 Index)
|
||||
|
||||
if( Index < 0 || Index >= MAX_BUTTON_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to UnloadButtonImage with out of range index %d.", Index );
|
||||
sprintf( str, "Attempting to UnloadButtonImage with out of range index %d.", Index );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -662,7 +659,7 @@ BOOLEAN EnableButton( INT32 iButtonID )
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to EnableButton with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to EnableButton with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -700,7 +697,7 @@ BOOLEAN DisableButton(INT32 iButtonID )
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to DisableButton with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to DisableButton with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -876,10 +873,7 @@ INT16 FindFreeIconSlot(void)
|
||||
//
|
||||
// Loads an image file for use as a button icon.
|
||||
//
|
||||
template INT16 LoadGenericButtonIcon<char *>(char *);
|
||||
template INT16 LoadGenericButtonIcon<char const *>(char const *);
|
||||
template <typename string1>
|
||||
INT16 LoadGenericButtonIcon(string1 filename)
|
||||
INT16 LoadGenericButtonIcon(const STR8 filename)
|
||||
{
|
||||
INT16 ImgSlot;
|
||||
VOBJECT_DESC vo_desc;
|
||||
@@ -916,7 +910,7 @@ BOOLEAN UnloadGenericButtonIcon(INT16 GenImg)
|
||||
{
|
||||
if( GenImg < 0 || GenImg >= MAX_BUTTON_ICONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to UnloadGenericButtonIcon with out of range index %d.", GenImg );
|
||||
sprintf( str, "Attempting to UnloadGenericButtonIcon with out of range index %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -947,7 +941,7 @@ BOOLEAN UnloadGenericButtonImage(INT16 GenImg)
|
||||
BOOLEAN fDeletedSomething = FALSE;
|
||||
if( GenImg < 0 || GenImg >= MAX_GENERIC_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to UnloadGenericButtonImage with out of range index %d.", GenImg );
|
||||
sprintf( str, "Attempting to UnloadGenericButtonImage with out of range index %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1016,7 +1010,7 @@ BOOLEAN UnloadGenericButtonImage(INT16 GenImg)
|
||||
//
|
||||
// Loads the image files required for displaying a generic button.
|
||||
//
|
||||
INT16 LoadGenericButtonImages(UINT8 *GrayName,UINT8 *OffNormName,UINT8 *OffHiliteName,UINT8 *OnNormName,UINT8 *OnHiliteName,UINT8 *BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY)
|
||||
INT16 LoadGenericButtonImages(STR8 GrayName,STR8 OffNormName,STR8 OffHiliteName,STR8 OnNormName,STR8 OnHiliteName, STR8 BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY)
|
||||
{
|
||||
INT16 ImgSlot;
|
||||
VOBJECT_DESC vo_desc;
|
||||
@@ -1294,7 +1288,7 @@ void RemoveButton(INT32 iButtonID)
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to RemoveButton with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to RemoveButton with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1390,7 +1384,7 @@ void ResizeButton(INT32 iButtonID,INT16 w, INT16 h)
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to resize button with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to resize button with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1404,7 +1398,7 @@ void ResizeButton(INT32 iButtonID,INT16 w, INT16 h)
|
||||
|
||||
if( !b )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to resize deleted button with buttonID %d", iButtonID );
|
||||
sprintf( str, "Attempting to resize deleted button with buttonID %d", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1449,7 +1443,7 @@ void SetButtonPosition( INT32 iButtonID ,INT16 x, INT16 y)
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button position with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to set button position with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1457,7 +1451,7 @@ void SetButtonPosition( INT32 iButtonID ,INT16 x, INT16 y)
|
||||
|
||||
if( !b )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button position with buttonID %d", iButtonID );
|
||||
sprintf( str, "Attempting to set button position with buttonID %d", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1502,13 +1496,13 @@ INT32 SetButtonIcon( INT32 iButtonID, INT16 Icon, INT16 IconIndex )
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button icon with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to set button icon with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
return -1;
|
||||
}
|
||||
if( Icon < 0 || Icon >= MAX_BUTTON_ICONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button[%d] icon with out of range icon index %d.", iButtonID, Icon );
|
||||
sprintf( str, "Attempting to set button[%d] icon with out of range icon index %d.", iButtonID, Icon );
|
||||
AssertMsg( 0, str );
|
||||
return -1;
|
||||
}
|
||||
@@ -1517,7 +1511,7 @@ INT32 SetButtonIcon( INT32 iButtonID, INT16 Icon, INT16 IconIndex )
|
||||
|
||||
if( !b )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set deleted button icon with buttonID %d", iButtonID );
|
||||
sprintf( str, "Attempting to set deleted button icon with buttonID %d", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
return -1;
|
||||
}
|
||||
@@ -1552,12 +1546,12 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateIconButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to CreateIconButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( GenImg < -1 || GenImg >= MAX_GENERIC_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateIconButton with out of range iconID %d.", GenImg );
|
||||
sprintf( str, "Attempting to CreateIconButton with out of range iconID %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1672,7 +1666,7 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
|
||||
}
|
||||
|
||||
//Creates a generic button with text on it.
|
||||
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)
|
||||
INT32 CreateTextButton(STR16 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;
|
||||
@@ -1680,12 +1674,12 @@ INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 s
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to CreateTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( GenImg < -1 || GenImg >= MAX_GENERIC_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateTextButton with out of range iconID %d.", GenImg );
|
||||
sprintf( str, "Attempting to CreateTextButton with out of range iconID %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1716,7 +1710,7 @@ INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 s
|
||||
b->string = NULL;
|
||||
if ( string && wcslen( string ) )
|
||||
{
|
||||
b->string = (wchar_t*)MemAlloc( (wcslen(string)+1)*sizeof(wchar_t) );
|
||||
b->string = (STR16) MemAlloc( (wcslen(string)+1)*sizeof(CHAR16) );
|
||||
AssertMsg( b->string, "Out of memory error: Couldn't allocate string in CreateTextButton." );
|
||||
wcscpy( b->string, string );
|
||||
}
|
||||
@@ -1821,7 +1815,7 @@ INT32 CreateHotSpot(INT16 xloc, INT16 yloc, INT16 Width, INT16 Height,INT16 Prio
|
||||
|
||||
if( xloc < 0 || yloc < 0 || Width < 0 || Height < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateHotSpot with invalid coordinates: %d,%d, width: %d, and height: %d.",
|
||||
sprintf( str, "Attempting to CreateHotSpot with invalid coordinates: %d,%d, width: %d, and height: %d.",
|
||||
xloc, yloc, Width, Height );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
@@ -1928,12 +1922,12 @@ INT32 QuickCreateButton(UINT32 Image,INT16 xloc,INT16 yloc,INT32 Type,INT16 Prio
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to QuickCreateButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to QuickCreateButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( Image < 0 || Image >= MAX_BUTTON_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to QuickCreateButton with out of range ImageID %d.", Image );
|
||||
sprintf( str, "Attempting to QuickCreateButton with out of range ImageID %d.", Image );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -2063,43 +2057,29 @@ INT32 QuickCreateButton(UINT32 Image,INT16 xloc,INT16 yloc,INT32 Type,INT16 Prio
|
||||
//loading, and deleting of the image. The size of the image determines the size of the button. It also uses
|
||||
//the default move callback which emulates Win95. Finally, it sets the priority to normal. The function you
|
||||
//choose also determines the type of button (toggle, notoggle, or newtoggle)
|
||||
template INT32 CreateEasyNoToggleButton<char *>(INT32, INT32, char *, GUI_CALLBACK);
|
||||
template INT32 CreateEasyNoToggleButton<char const *>(INT32, INT32, char const *, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, const STR8 filename, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
template INT32 CreateEasyToggleButton<char *>(INT32, INT32, char *, GUI_CALLBACK);
|
||||
template INT32 CreateEasyToggleButton<char const *>(INT32, INT32, char const *, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, const STR8 filename, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
template INT32 CreateEasyNewToggleButton<char const *>(INT32, INT32, char const *, GUI_CALLBACK);
|
||||
template INT32 CreateEasyNewToggleButton<short *>(INT32, INT32, short *, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, const STR8 filename, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, BUTTON_NEWTOGGLE, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
//Same as above, but accepts specify toggle type
|
||||
template INT32 CreateEasyButton<short *>(INT32, INT32, short *, INT32, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, string3 filename, INT32 Type, GUI_CALLBACK ClickCallback)
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, const STR8 filename, INT32 Type, GUI_CALLBACK ClickCallback)
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, Type, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
//Same as above, but accepts priority specification.
|
||||
template INT32 CreateSimpleButton<char *>(INT32, INT32, char *, INT32, INT16, GUI_CALLBACK);
|
||||
template INT32 CreateSimpleButton<char const *>(INT32, INT32, char const *, INT32, INT16, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, string3 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, const STR8 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
INT32 ButPic,ButNum;
|
||||
|
||||
@@ -2123,13 +2103,7 @@ 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);
|
||||
template <typename string2>
|
||||
INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
INT32 CreateIconAndTextButton( INT32 Image, const STR16 string, UINT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown,
|
||||
INT8 bJustification,
|
||||
@@ -2142,12 +2116,12 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateIconAndTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to CreateIconAndTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( Image < 0 || Image >= MAX_BUTTON_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attemting to CreateIconAndTextButton with out of range ImageID %d.", Image );
|
||||
sprintf( str, "Attemting to CreateIconAndTextButton with out of range ImageID %d.", Image );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -2192,7 +2166,7 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
b->string = NULL;
|
||||
if ( string )
|
||||
{
|
||||
b->string = (wchar_t*)MemAlloc( (wcslen((wchar_t *)string)+1)*sizeof(wchar_t) );
|
||||
b->string = (STR16) MemAlloc( (wcslen(string)+1)*sizeof(CHAR16) );
|
||||
AssertMsg( b->string, "Out of memory error: Couldn't allocate string in CreateIconAndTextButton." );
|
||||
wcscpy( b->string, string );
|
||||
}
|
||||
@@ -2265,7 +2239,7 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
}
|
||||
|
||||
//New functions
|
||||
void SpecifyButtonText( INT32 iButtonID, wchar_t * string )
|
||||
void SpecifyButtonText( INT32 iButtonID, STR16 string )
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
|
||||
@@ -2282,7 +2256,7 @@ void SpecifyButtonText( INT32 iButtonID, wchar_t * string )
|
||||
if( string && wcslen( string ) )
|
||||
{
|
||||
//allocate memory for the new string
|
||||
b->string = (wchar_t*)MemAlloc( (wcslen(string)+1)*sizeof(wchar_t) );
|
||||
b->string = (STR16) MemAlloc( (wcslen(string)+1)*sizeof(CHAR16) );
|
||||
Assert( b->string );
|
||||
//copy the string to the button
|
||||
wcscpy( b->string, string );
|
||||
@@ -2362,7 +2336,7 @@ void SpecifyButtonTextJustification( INT32 iButtonID, INT8 bJustification )
|
||||
b->uiFlags |= BUTTON_DIRTY ;
|
||||
}
|
||||
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown, INT8 bJustification )
|
||||
{
|
||||
@@ -2385,7 +2359,7 @@ void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 ui
|
||||
b->uiFlags |= BUTTON_DIRTY ;
|
||||
}
|
||||
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor )
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
@@ -2542,7 +2516,7 @@ void AllowDisabledButtonFastHelp( INT32 iButtonID, BOOLEAN fAllow )
|
||||
//
|
||||
// Set the text that will be displayed as the FastHelp
|
||||
//
|
||||
void SetButtonFastHelpText(INT32 iButton, wchar_t * Text)
|
||||
void SetButtonFastHelpText(INT32 iButton, STR16 Text)
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
if(iButton<0 || iButton>MAX_BUTTONS)
|
||||
@@ -2579,7 +2553,7 @@ void QuickButtonCallbackMMove(MOUSE_REGION *reg,INT32 reason)
|
||||
|
||||
iButtonID = MSYS_GetRegionUserData(reg,0);
|
||||
|
||||
sprintf( (char *)str, "QuickButtonCallbackMMove: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
sprintf( str, "QuickButtonCallbackMMove: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
reg->IDNumber, reg->RegionTopLeftX, reg->RegionTopLeftY, reg->RegionBottomRightX, reg->RegionBottomRightY, iButtonID );
|
||||
|
||||
AssertMsg( iButtonID >= 0, str );
|
||||
@@ -2684,7 +2658,7 @@ void QuickButtonCallbackMButn( MOUSE_REGION *reg, INT32 reason )
|
||||
|
||||
iButtonID = MSYS_GetRegionUserData(reg,0);
|
||||
|
||||
sprintf( (char *)str, "QuickButtonCallbackMButn: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
sprintf( str, "QuickButtonCallbackMButn: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
reg->IDNumber, reg->RegionTopLeftX, reg->RegionTopLeftY, reg->RegionBottomRightX, reg->RegionBottomRightY, iButtonID );
|
||||
|
||||
AssertMsg( iButtonID >= 0, str );
|
||||
@@ -3949,7 +3923,7 @@ BOOLEAN SetDialogAttributes( CreateDlgInfo *pDlgInfo, INT32 iAttrib, ... )
|
||||
{
|
||||
va_list arg;
|
||||
INT32 iFont,iFontOptions;
|
||||
wchar_t *zString;
|
||||
STR16 zString;
|
||||
INT32 iX,iY,iW,iH;
|
||||
INT32 iIndex;
|
||||
HVOBJECT hVObj;
|
||||
@@ -4000,7 +3974,7 @@ BOOLEAN SetDialogAttributes( CreateDlgInfo *pDlgInfo, INT32 iAttrib, ... )
|
||||
iFont = va_arg( arg, INT32 );
|
||||
pDlgInfo->iTextFont = iFont;
|
||||
|
||||
zString = (wchar_t *)va_arg( arg, UINT32 );
|
||||
zString = va_arg( arg, STR16 );
|
||||
|
||||
if ( pDlgInfo->zDlgText != NULL )
|
||||
MemFree( pDlgInfo->zDlgText );
|
||||
@@ -4096,15 +4070,7 @@ void DrawDialogBox( INT32 iDlgBox )
|
||||
|
||||
|
||||
|
||||
// Kaiden: Added for VC6 compatibility
|
||||
|
||||
#if _MSC_VER <= 1200
|
||||
template INT32 CreateCheckBoxButton<char const *>(INT16, INT16, char *, INT16, GUI_CALLBACK);
|
||||
#endif
|
||||
|
||||
template INT32 CreateCheckBoxButton<char const *>(INT16, INT16, char const *, INT16, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, string3 filename, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, const STR8 filename, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
INT32 ButPic, iButtonID;
|
||||
|
||||
@@ -116,7 +116,7 @@ typedef struct _GUI_BUTTON {
|
||||
//Button disabled style
|
||||
INT8 bDisabledStyle;
|
||||
//For buttons with text
|
||||
wchar_t *string; //the string
|
||||
CHAR16 *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, wchar_t * Text);
|
||||
void SetButtonFastHelpText(INT32 iButton, STR16 Text);
|
||||
|
||||
#ifdef _JA2_RENDER_DIRTY
|
||||
void SetBtnHelpEndCallback( INT32 iButton, MOUSE_HELPTEXT_DONE_CALLBACK CallbackFxn );
|
||||
@@ -198,17 +198,15 @@ void FreeButtonSavedRect( INT32 iButton );
|
||||
|
||||
#endif
|
||||
|
||||
template <typename string1>
|
||||
INT16 LoadGenericButtonIcon(string1 filename);
|
||||
INT16 LoadGenericButtonIcon(STR8 filename);
|
||||
|
||||
BOOLEAN UnloadGenericButtonIcon(INT16 GenImg);
|
||||
|
||||
template <typename type1>
|
||||
INT32 LoadButtonImage(type1 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
INT32 LoadButtonImage(STR8 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
INT32 UseLoadedButtonImage(INT32 LoadedImg, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
INT32 UseVObjAsButtonImage(HVOBJECT hVObject, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
void UnloadButtonImage(INT32 Index);
|
||||
INT16 LoadGenericButtonImages(UINT8 *GrayName,UINT8 *OffNormName,UINT8 *OffHiliteName,UINT8 *OnNormName,UINT8 *OnHiliteName,UINT8 *BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY);
|
||||
INT16 LoadGenericButtonImages(STR8 GrayName,STR8 OffNormName, STR8 OffHiliteName, STR8 OnNormName,STR8 OnHiliteName,STR8 BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY);
|
||||
BOOLEAN UnloadGenericButtonImage(INT16 GenImg);
|
||||
|
||||
BOOLEAN SetButtonDestBuffer(UINT32 DestBuffer);
|
||||
@@ -243,31 +241,24 @@ INT32 QuickCreateButton(UINT32 Image, INT16 xloc, INT16 yloc, INT32 Type,INT16 P
|
||||
//loading, and deleting of the image. The size of the image determines the size of the button. It also uses
|
||||
//the default move callback which emulates Win95. Finally, it sets the priority to normal. The function you
|
||||
//choose also determines the type of button (toggle, notoggle, or newtoggle)
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, STR8 filename, GUI_CALLBACK ClickCallback );
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, STR8 filename, GUI_CALLBACK ClickCallback );
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, STR8 filename, GUI_CALLBACK ClickCallback );
|
||||
//Same as above, but accepts specify toggle type
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, string3 filename, INT32 Type, GUI_CALLBACK ClickCallback);
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, STR8 filename, INT32 Type, GUI_CALLBACK ClickCallback);
|
||||
//Same as above, but accepts priority specification.
|
||||
template <typename string3>
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, string3 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, STR8 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, string3 filename, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, STR8 filename, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
|
||||
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(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,
|
||||
INT32 CreateTextButton(STR16 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 CreateIconAndTextButton( INT32 Image, const STR16 string, UINT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown,
|
||||
INT8 bJustification,
|
||||
@@ -275,19 +266,19 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
|
||||
|
||||
//New functions
|
||||
void SpecifyButtonText( INT32 iButtonID, wchar_t * string );
|
||||
void SpecifyButtonText( INT32 iButtonID, STR16 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, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor );
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown, INT8 bJustification );
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, STR16 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 );
|
||||
|
||||
@@ -76,8 +76,8 @@ typedef struct OrdHeaderTag
|
||||
{
|
||||
UINT32 me;
|
||||
long you;
|
||||
char *k;
|
||||
char *p;
|
||||
STR8 k;
|
||||
STR8 p;
|
||||
|
||||
} TEST;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ extern INT32 giProfileCount;
|
||||
_RPT3(_CRT_WARN, "*** PROFILE REPORT: %d executions took %dms, average of %.2fms per iteration.\n", guiExecutions, guiProfileTime, (FLOAT)guiProfileTime/guiExecutions);
|
||||
|
||||
extern void _Null(void);
|
||||
extern UINT8 *String(const char *String, ...);
|
||||
extern STR8 String(const STR8 String, ...);
|
||||
|
||||
|
||||
|
||||
@@ -64,13 +64,12 @@ extern UINT8 *String(const char *String, ...);
|
||||
//Assert( pointer, "This pointer is null and you tried to access it in function A ");
|
||||
//It'll make debugging a little simpler. In anal cases, you could build the string first, then assert
|
||||
//with it.
|
||||
template <typename type1, typename type2>
|
||||
extern void _FailMessage(type1 pString, UINT32 uiLineNum, type2 pSourceFile );
|
||||
extern void _FailMessage(STR8 pString, UINT32 uiLineNum, STR8 pSourceFile );
|
||||
|
||||
#define Assert(a) (a) ? _Null() : _FailMessage( NULL, __LINE__, __FILE__ )
|
||||
#define AssertMsg(a,b) (a) ? _Null() : _FailMessage( b, __LINE__, __FILE__ )
|
||||
|
||||
extern UINT8 gubAssertString[128];
|
||||
extern CHAR8 gubAssertString[128];
|
||||
|
||||
|
||||
#else
|
||||
@@ -84,7 +83,7 @@ extern UINT8 gubAssertString[128];
|
||||
|
||||
// Kaiden: Added this for Map Editor
|
||||
#ifdef JA2BETAVERSION
|
||||
extern UINT8 gubAssertString[128];
|
||||
extern CHAR8 gubAssertString[128];
|
||||
#endif
|
||||
|
||||
// Moved these out of the defines - debug mgr always initialized
|
||||
@@ -130,11 +129,10 @@ extern BOOLEAN gfDebugTopics[MAX_TOPICS_ALLOTED];
|
||||
#endif
|
||||
|
||||
// public interface to debug methods:
|
||||
template <typename type4>
|
||||
extern void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, type4 strMessage);
|
||||
extern void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, STR8 strMessage);
|
||||
|
||||
extern BOOLEAN DbgSetDebugLevel(UINT16 TopicId, UINT8 uiDebugLevel);
|
||||
extern void DbgFailedAssertion( BOOLEAN fExpression, char *szFile, int nLine );
|
||||
extern void DbgFailedAssertion( BOOLEAN fExpression, STR8 szFile, int nLine );
|
||||
#if _MSC_VER <= 1200
|
||||
extern void _FailMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile );
|
||||
#endif
|
||||
|
||||
@@ -68,10 +68,10 @@ INT32 giProfileCount;
|
||||
// they are required for the String() function, which is NOT a
|
||||
// debug-mode only function, it's used in release-mode as well! -- DB
|
||||
|
||||
UINT8 gubAssertString[128];
|
||||
CHAR8 gubAssertString[128];
|
||||
|
||||
#define MAX_MSG_LENGTH2 512
|
||||
UINT8 gbTmpDebugString[8][MAX_MSG_LENGTH2];
|
||||
CHAR8 gbTmpDebugString[8][MAX_MSG_LENGTH2];
|
||||
UINT8 gubStringIndex = 0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -357,9 +357,7 @@ void DbgClearAllTopics( void )
|
||||
// xxnov96:HJH -> creation
|
||||
//
|
||||
//**************************************************************************
|
||||
template void DbgMessageReal<unsigned char *>(UINT16, UINT8, UINT8, unsigned char *);
|
||||
template <typename type4>
|
||||
void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, type4 strMessage)
|
||||
void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, STR8 strMessage)
|
||||
{
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
FILE *OutFile;
|
||||
@@ -368,7 +366,7 @@ void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, type4
|
||||
// Check for a registered topic ID
|
||||
if ( uiTopicId < MAX_TOPICS_ALLOTED )//&& gfDebugTopics[uiTopicId] )
|
||||
{
|
||||
OutputDebugString ( (LPCSTR) strMessage );
|
||||
OutputDebugString ( strMessage );
|
||||
OutputDebugString ( "\n" );
|
||||
|
||||
//add _NO_DEBUG_TXT to your SGP preprocessor definitions to avoid this f**king huge file from
|
||||
@@ -417,7 +415,7 @@ BOOLEAN DbgSetDebugLevel(UINT16 uiTopicId, UINT8 uiDebugLevel)
|
||||
//
|
||||
//**************************************************************************
|
||||
|
||||
void DbgFailedAssertion( BOOLEAN fExpression, char *szFile, int nLine )
|
||||
void DbgFailedAssertion( BOOLEAN fExpression, STR8 szFile, int nLine )
|
||||
{
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
FILE *OutFile;
|
||||
@@ -454,7 +452,7 @@ void _DebugRecordToDebugger(BOOLEAN gfState)
|
||||
|
||||
void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
{
|
||||
UINT8 ubOutputString[512];
|
||||
CHAR8 ubOutputString[512];
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
FILE *DebugFile;
|
||||
#endif
|
||||
@@ -463,7 +461,7 @@ void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
// Build the output string
|
||||
//
|
||||
|
||||
sprintf( (char *) ubOutputString, "{ %ld } %s [Line %d in %s]\n", GetTickCount(), pString, uiLineNum, pSourceFile );
|
||||
sprintf( ubOutputString, "{ %ld } %s [Line %d in %s]\n", GetTickCount(), pString, uiLineNum, pSourceFile );
|
||||
|
||||
//
|
||||
// Output to debugger
|
||||
@@ -483,7 +481,7 @@ void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
{
|
||||
if ((DebugFile = fopen( gpcDebugLogFileName, "a+t" )) != NULL)
|
||||
{
|
||||
fputs( (const char *)ubOutputString, DebugFile );
|
||||
fputs( ubOutputString, DebugFile );
|
||||
fclose( DebugFile );
|
||||
}
|
||||
}
|
||||
@@ -501,34 +499,24 @@ void _Null(void)
|
||||
extern HVOBJECT FontObjs[25];
|
||||
|
||||
#ifdef JA2 //JAGGED ALLIANCE 2 VERSION ONLY
|
||||
template void _FailMessage<char *, char const *>(char *, unsigned int, char const *);
|
||||
template void _FailMessage<char const *, char const *>(char const *, unsigned int, char const *);
|
||||
template void _FailMessage<int, char const *>(int, unsigned int, char const *);
|
||||
template void _FailMessage<int, char *>(int, unsigned int, char *);
|
||||
template void _FailMessage<char *, char *>(char *, unsigned int, char *);
|
||||
#if _MSC_VER <= 1200
|
||||
template void _FailMessage<char *, char *>(unsigned char *, unsigned int, char *);
|
||||
#endif
|
||||
template void _FailMessage<unsigned char *, char const *>(unsigned char *, unsigned int, char const *);
|
||||
template <typename type1, typename type2>
|
||||
void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
void _FailMessage( STR8 pString, UINT32 uiLineNum, STR8 pSourceFile )
|
||||
{
|
||||
UINT8 ubOutputString[512];
|
||||
CHAR8 ubOutputString[512];
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
MSG Message;
|
||||
FILE *DebugFile;
|
||||
#endif
|
||||
BOOLEAN fDone = FALSE;
|
||||
//Build the output strings
|
||||
sprintf( (char *)ubOutputString, "{ %ld } Assertion Failure [Line %d in %s]\n", GetTickCount(), uiLineNum, pSourceFile );
|
||||
sprintf( ubOutputString, "{ %ld } Assertion Failure [Line %d in %s]\n", GetTickCount(), uiLineNum, pSourceFile );
|
||||
if( pString )
|
||||
sprintf( (char *)gubAssertString, (const char *)pString );
|
||||
sprintf( gubAssertString, pString );
|
||||
else
|
||||
sprintf( (char *)gubAssertString, "" );
|
||||
sprintf( gubAssertString, "" );
|
||||
|
||||
//Output to debugger
|
||||
if (gfRecordToDebugger)
|
||||
OutputDebugString( (LPCSTR)ubOutputString );
|
||||
OutputDebugString( ubOutputString );
|
||||
|
||||
//Record to file if required
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
@@ -536,7 +524,7 @@ void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
{
|
||||
if ((DebugFile = fopen( gpcDebugLogFileName, "a+t" )) != NULL)
|
||||
{
|
||||
fputs( (const char *)ubOutputString, DebugFile );
|
||||
fputs( ubOutputString, DebugFile );
|
||||
fclose( DebugFile );
|
||||
}
|
||||
}
|
||||
@@ -555,7 +543,7 @@ void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
//NASTY HACK, THE GAME IS GOING TO DIE ANYWAY, SO WHO CARES WHAT WE DO.
|
||||
//This will actually bring up a screen that prints out the assert message
|
||||
//until the user hits esc or alt-x.
|
||||
sprintf( (char *)gubErrorText, "Assertion Failure -- Line %d in %s", uiLineNum, pSourceFile );
|
||||
sprintf( gubErrorText, "Assertion Failure -- Line %d in %s", uiLineNum, pSourceFile );
|
||||
SetPendingNewScreen( ERROR_SCREEN );
|
||||
SetCurrentScreen( ERROR_SCREEN );
|
||||
while (gfProgramIsRunning)
|
||||
@@ -582,9 +570,9 @@ void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
|
||||
#else //NOT JAGGED ALLIANCE 2
|
||||
|
||||
void _FailMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
void _FailMessage(STR8 pString, UINT32 uiLineNum, STR8 pSourceFile)
|
||||
{
|
||||
UINT8 ubOutputString[512];
|
||||
CHAR8 ubOutputString[512];
|
||||
BOOLEAN fDone = FALSE;
|
||||
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
@@ -632,7 +620,7 @@ void DbgShutdown(void) {};
|
||||
|
||||
// This is NOT a _DEBUG only function! It is also needed in
|
||||
// release mode builds. -- DB
|
||||
UINT8 *String(const char *String, ...)
|
||||
STR8 String(const STR8 String, ...)
|
||||
{
|
||||
|
||||
va_list ArgPtr;
|
||||
@@ -647,7 +635,7 @@ UINT8 *String(const char *String, ...)
|
||||
}
|
||||
|
||||
va_start(ArgPtr, String);
|
||||
vsprintf((char *) gbTmpDebugString[usIndex], String, ArgPtr);
|
||||
vsprintf( gbTmpDebugString[usIndex], String, ArgPtr);
|
||||
va_end(ArgPtr);
|
||||
|
||||
return gbTmpDebugString[usIndex];
|
||||
|
||||
@@ -975,10 +975,10 @@ BOOLEAN LoadBucket( CHAR cFirstLetter )
|
||||
|
||||
CHECKF(uiNumEntries);
|
||||
|
||||
gdb.bucket.pstrFilenames = (CHAR *)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
gdb.bucket.pstrFilenames = (STR8)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
CHECKF(gdb.bucket.pstrFilenames);
|
||||
|
||||
gdb.bucket.pstrDatabasenames = (CHAR *)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
gdb.bucket.pstrDatabasenames = (STR8)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
if ( !gdb.bucket.pstrDatabasenames )
|
||||
{
|
||||
MemFree(gdb.bucket.pstrFilenames);
|
||||
|
||||
@@ -20,7 +20,7 @@ void DirectXZeroMem ( void* pMemory, int nSize )
|
||||
}
|
||||
|
||||
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, char *szFilename )
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, STR8 szFilename )
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if ( iErrorCode != DD_OK )
|
||||
@@ -31,7 +31,7 @@ void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, char *szFilename )
|
||||
#endif
|
||||
}
|
||||
|
||||
char* DirectXErrorDescription ( INT32 iDXReturn )
|
||||
STR8 DirectXErrorDescription ( INT32 iDXReturn )
|
||||
{
|
||||
switch( iDXReturn )
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// local functions
|
||||
char* DirectXErrorDescription ( INT32 iDXReturn );
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, char *szFilename );
|
||||
void DirectXAssert ( BOOLEAN fValue, INT32 nLine, char *szFilename );
|
||||
STR8 DirectXErrorDescription ( INT32 iDXReturn );
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, STR8 szFilename );
|
||||
void DirectXAssert ( BOOLEAN fValue, INT32 nLine, STR8 szFilename );
|
||||
void DirectXZeroMem ( void* pMemory, int nSize );
|
||||
|
||||
#undef ATTEMPT
|
||||
|
||||
@@ -42,13 +42,13 @@ const int StackColumns = 8; // Number of columns in stack dump.
|
||||
|
||||
|
||||
//ppp
|
||||
void ErrorLog(HWFILE LogFile, char* Format, ...);
|
||||
void ErrorLog(HWFILE LogFile, STR8 Format, ...);
|
||||
STR GetExceptionString( DWORD uiExceptionCode );
|
||||
void DisplayRegisters( HWFILE hFile, CONTEXT *pContext );
|
||||
BOOLEAN GetAndDisplayModuleAndSystemInfo( HWFILE hFile, CONTEXT *pContext );
|
||||
BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext );
|
||||
void RecordModuleList(HWFILE hFile );
|
||||
void PrintTime(char *output, FILETIME TimeToPrint);
|
||||
void PrintTime(STR8 output, FILETIME TimeToPrint);
|
||||
static void ShowModuleInfo(HWFILE hFile, HINSTANCE ModuleHandle);
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ INT32 RecordExceptionInfo( EXCEPTION_POINTERS *pExceptInfo )
|
||||
|
||||
|
||||
|
||||
void ErrorLog( HWFILE hFile, char* Format, ...)
|
||||
void ErrorLog( HWFILE hFile, STR8 Format, ...)
|
||||
{
|
||||
char buffer[2000]; // wvsprintf never prints more than one K.
|
||||
UINT32 uiNumBytesWritten=0;
|
||||
@@ -359,8 +359,8 @@ BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext )
|
||||
int Count = 0;
|
||||
char buffer[1000] = "";
|
||||
const int safetyzone = 50;
|
||||
char* nearend = buffer + sizeof(buffer) - safetyzone;
|
||||
char* output = buffer;
|
||||
STR8 nearend = buffer + sizeof(buffer) - safetyzone;
|
||||
STR8 output = buffer;
|
||||
|
||||
// Time to print part or all of the stack to the error log. This allows
|
||||
// us to figure out the call stack, parameters, local variables, etc.
|
||||
@@ -391,7 +391,7 @@ BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext )
|
||||
|
||||
while (pStack + 1 <= pStackTop)
|
||||
{
|
||||
char *Suffix = " ";
|
||||
STR8 Suffix = " ";
|
||||
|
||||
if ((Count % StackColumns) == 0)
|
||||
output += wsprintf(output, "%08x: ", pStack);
|
||||
@@ -428,7 +428,7 @@ BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext )
|
||||
// Print the specified FILETIME to output in a human readable format,
|
||||
// without using the C run time.
|
||||
|
||||
void PrintTime(char *output, FILETIME TimeToPrint)
|
||||
void PrintTime(STR8 output, FILETIME TimeToPrint)
|
||||
{
|
||||
WORD Date, Time;
|
||||
if (FileTimeToLocalFileTime(&TimeToPrint, &TimeToPrint) &&
|
||||
@@ -521,7 +521,7 @@ static void ShowModuleInfo(HWFILE hFile, HINSTANCE ModuleHandle)
|
||||
IMAGE_DOS_HEADER *DosHeader = (IMAGE_DOS_HEADER*)ModuleHandle;
|
||||
if (IMAGE_DOS_SIGNATURE != DosHeader->e_magic)
|
||||
return;
|
||||
IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((char *)DosHeader
|
||||
IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((STR8 )DosHeader
|
||||
+ DosHeader->e_lfanew);
|
||||
if (IMAGE_NT_SIGNATURE != NTHeader->Signature)
|
||||
return;
|
||||
|
||||
@@ -232,7 +232,7 @@ BOOLEAN FileExists( STR strFilename )
|
||||
{
|
||||
// First check to see if it's in a library (most files should be there)
|
||||
if ( gFileDataBase.fInitialized &&
|
||||
CheckIfFileExistInLibrary( (STR) strFilename ) ) return TRUE;
|
||||
CheckIfFileExistInLibrary( strFilename ) ) return TRUE;
|
||||
|
||||
// ... then check if it's in the custom Data directory
|
||||
if ( gCustomDataCat.FindFile(strFilename) ) return TRUE;
|
||||
@@ -427,7 +427,7 @@ HWFILE FileOpen( STR strFilename, UINT32 uiOptions, BOOLEAN fDeleteOnClose )
|
||||
else
|
||||
{
|
||||
//If the file is in the library, get a handle to it.
|
||||
hLibFile = OpenFileFromLibrary( (STR) strFilename );
|
||||
hLibFile = OpenFileFromLibrary( strFilename );
|
||||
|
||||
//tried to open a file that wasnt in the database
|
||||
if( !hLibFile )
|
||||
@@ -777,9 +777,9 @@ BOOLEAN FileLoad( STR strFilename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiB
|
||||
// 9 Feb 98 DEF - modified to work with the library system
|
||||
//
|
||||
//**************************************************************************
|
||||
BOOLEAN _cdecl FilePrintf( HWFILE hFile, char * strFormatted, ... )
|
||||
BOOLEAN _cdecl FilePrintf( HWFILE hFile, STR8 strFormatted, ... )
|
||||
{
|
||||
UINT8 strToSend[80];
|
||||
CHAR8 strToSend[80];
|
||||
va_list argptr;
|
||||
BOOLEAN fRetVal = FALSE;
|
||||
|
||||
@@ -792,7 +792,7 @@ BOOLEAN _cdecl FilePrintf( HWFILE hFile, char * strFormatted, ... )
|
||||
if( sLibraryID == REAL_FILE_LIBRARY_ID )
|
||||
{
|
||||
va_start(argptr, strFormatted);
|
||||
vsprintf( (char *)strToSend, (char *)strFormatted, argptr );
|
||||
vsprintf( strToSend, strFormatted, argptr );
|
||||
va_end(argptr);
|
||||
|
||||
fRetVal = FileWrite( hFile, strToSend, strlen(strToSend), NULL );
|
||||
@@ -1226,7 +1226,7 @@ void BuildFileDirectory( void )
|
||||
//
|
||||
gfs.uiNumFilesInDirectory = iNumFiles;
|
||||
|
||||
gfs.pcFileNames = (CHAR *)MemAlloc( iNumFiles * FILENAME_LENGTH );
|
||||
gfs.pcFileNames = (STR8)MemAlloc( iNumFiles * FILENAME_LENGTH );
|
||||
|
||||
if ( gfs.pcFileNames )
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ extern BOOLEAN FileRead( HWFILE hFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *
|
||||
extern BOOLEAN FileWrite( HWFILE hFile, PTR pDest, UINT32 uiBytesToWrite, UINT32 *puiBytesWritten );
|
||||
extern BOOLEAN FileLoad( STR filename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead );
|
||||
|
||||
extern BOOLEAN _cdecl FilePrintf( HWFILE hFile, char * strFormatted, ... );
|
||||
extern BOOLEAN _cdecl FilePrintf( HWFILE hFile, STR8 strFormatted, ... );
|
||||
|
||||
extern BOOLEAN FileSeek( HWFILE, UINT32 uiDistance, UINT8 uiHow );
|
||||
extern INT32 FileGetPos( HWFILE );
|
||||
|
||||
@@ -333,10 +333,7 @@ int count;
|
||||
// This function returns (-1) if it fails, and debug msgs for a reason.
|
||||
// Otherwise the font number is returned.
|
||||
//*****************************************************************************
|
||||
template INT32 LoadFontFile<char *>(char *);
|
||||
template INT32 LoadFontFile<char const *>(char const *);
|
||||
template <typename string1>
|
||||
INT32 LoadFontFile(string1 filename)
|
||||
INT32 LoadFontFile(const STR8 filename)
|
||||
{
|
||||
VOBJECT_DESC vo_desc;
|
||||
UINT32 LoadIndex;
|
||||
@@ -419,10 +416,10 @@ 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, wchar_t *pFontString, ...)
|
||||
INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
@@ -457,12 +454,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, wchar_t *pFontString )
|
||||
INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, STR16 pFontString )
|
||||
{
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 i, index;
|
||||
INT16 sBoldDiff = 0;
|
||||
wchar_t str[2];
|
||||
CHAR16 str[2];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
@@ -518,10 +515,11 @@ INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCha
|
||||
// Created on: 12/1/99
|
||||
//
|
||||
//*****************************************************************************************
|
||||
INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont)
|
||||
INT16 StringNPixLength(STR16 string, UINT32 uiMaxCount, INT32 UseFont)
|
||||
{
|
||||
UINT32 Cur, uiCharCount;
|
||||
wchar_t *curletter,transletter;
|
||||
STR16 curletter;
|
||||
UINT16 transletter;
|
||||
|
||||
Cur = 0;
|
||||
uiCharCount = 0;
|
||||
@@ -543,11 +541,7 @@ INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont)
|
||||
// Returns the length of a string in pixels, depending on the font given.
|
||||
//
|
||||
//*****************************************************************************
|
||||
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)
|
||||
INT16 StringPixLength(const STR16 string, INT32 UseFont)
|
||||
{
|
||||
UINT32 Cur;
|
||||
UINT16 *curletter,transletter;
|
||||
@@ -657,7 +651,7 @@ UINT16 GetFontHeight(INT32 FontNum)
|
||||
// CreateEnglishTransTable()
|
||||
//
|
||||
//*****************************************************************************
|
||||
INT16 GetIndex(UINT16 siChar)
|
||||
INT16 GetIndex(CHAR16 siChar)
|
||||
{
|
||||
UINT16 *pTrav;
|
||||
UINT16 ssCount=0;
|
||||
@@ -731,25 +725,19 @@ 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 *, ...);
|
||||
template <typename type3>
|
||||
UINT32 mprintf(INT32 x, INT32 y, type3 pFontString, ...)
|
||||
UINT32 mprintf(INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
curletter=string;
|
||||
@@ -788,49 +776,31 @@ UINT8 *pDestBuf;
|
||||
return(0);
|
||||
}
|
||||
|
||||
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, ... )
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... )
|
||||
{
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
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*, ...);
|
||||
template <typename type8>
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... )
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... )
|
||||
{
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
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 )
|
||||
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY )
|
||||
{
|
||||
INT16 xp,yp;
|
||||
|
||||
@@ -842,14 +812,7 @@ 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 )
|
||||
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY )
|
||||
{
|
||||
INT16 xp,yp;
|
||||
|
||||
@@ -869,12 +832,12 @@ 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, wchar_t *pFontString, ...)
|
||||
UINT32 gprintf(INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
@@ -920,12 +883,12 @@ UINT8 *pDestBuf;
|
||||
return(0);
|
||||
}
|
||||
|
||||
UINT32 gprintfDirty(INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 gprintfDirty(INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
@@ -989,12 +952,12 @@ 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, wchar_t *pFontString, ...)
|
||||
UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
@@ -1033,23 +996,17 @@ wchar_t string[512];
|
||||
return(0);
|
||||
}
|
||||
|
||||
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, ...)
|
||||
UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
curletter=string;
|
||||
@@ -1082,20 +1039,18 @@ wchar_t string[512];
|
||||
return(0);
|
||||
}
|
||||
|
||||
template UINT32 mprintf_buffer_coded<short *>(UINT8 *, UINT32, UINT32, INT32, INT32, short *, ...);
|
||||
template <typename string6>
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...)
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT16 usOldForeColor;
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
curletter=string;
|
||||
@@ -1144,12 +1099,12 @@ UINT16 usOldForeColor;
|
||||
}
|
||||
|
||||
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT16 usOldForeColor;
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
@@ -123,28 +123,24 @@ UINT16 *GetFontObjectPalette16BPP(INT32 iFont);
|
||||
void DestroyEnglishTransTable( void );
|
||||
|
||||
extern HVOBJECT GetFontObject(INT32 iFont);
|
||||
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, wchar_t *pFontString, ...);
|
||||
template <typename string6>
|
||||
extern UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...);
|
||||
extern UINT32 gprintf(INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 gprintfDirty(INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 mprintf(INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
|
||||
// Function for displaying coded test. Since it's slower to do this, it's separate from the normal fuctions
|
||||
#define FONT_CODE_BEGINCOLOR 180
|
||||
#define FONT_CODE_RESETCOLOR 181
|
||||
|
||||
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, wchar_t *pFontString, ...);
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
|
||||
|
||||
extern BOOLEAN SetFontDestBuffer(UINT32 DestBuffer, INT32 x1, INT32 y1, INT32 x2, INT32 y2, BOOLEAN wrap);
|
||||
extern BOOLEAN SetFont(INT32 iFontIndex);
|
||||
|
||||
template <typename string1>
|
||||
extern INT32 LoadFontFile(string1 pFileName);
|
||||
extern INT32 LoadFontFile(const STR8 pFileName);
|
||||
extern UINT16 GetFontHeight(INT32 FontNum);
|
||||
extern BOOLEAN InitializeFontManager(UINT16 usDefaultPixDepth, FontTranslationTable *pTransTable);
|
||||
extern void ShutdownFontManager(void);
|
||||
@@ -152,37 +148,32 @@ extern void UnloadFont(UINT32 FontIndex);
|
||||
|
||||
extern FontTranslationTable *CreateEnglishTransTable( );
|
||||
|
||||
extern INT16 GetIndex(UINT16 siChar);
|
||||
extern INT16 GetIndex(CHAR16 siChar);
|
||||
extern UINT32 GetWidth(HVOBJECT hSrcVObject, INT16 ssIndex);
|
||||
|
||||
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 StringPixLengthArgFastHelp( INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, STR16 pFontString );
|
||||
extern INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, STR16 pFontString, ...);
|
||||
extern INT16 StringPixLength(const STR16 string,INT32 UseFont);
|
||||
|
||||
extern INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont);
|
||||
extern INT16 StringNPixLength(STR16 string, UINT32 uiMaxCount, INT32 UseFont);
|
||||
extern void SaveFontSettings(void);
|
||||
extern void RestoreFontSettings(void);
|
||||
|
||||
template <typename type8>
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... );
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... );
|
||||
|
||||
template <typename type8>
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... );
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... );
|
||||
|
||||
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 );
|
||||
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY );
|
||||
|
||||
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 );
|
||||
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY );
|
||||
|
||||
//extern FontBase *LoadFontFile(UINT8 *pFileName);
|
||||
//extern UINT8 *GetFontPalette(UINT8 *pFileName);
|
||||
//extern FontBase *LoadFontFile(CHAR8 *pFileName);
|
||||
//extern UINT8 *GetFontPalette(CHAR8 *pFileName);
|
||||
//extern UINT16 GetMaxFontWidth(FontBase *pBase);
|
||||
//extern void UnloadFont(FontBase *pBase);
|
||||
//extern BOOLEAN SetFontPalette(FontBase *pFont, UINT16 siDepthPix, SGPPaletteEntry *pNewPalette);
|
||||
// make sure the pFontString is terminated by 0
|
||||
//extern BOOLEAN PrintFontString(UINT16 *pFontString, UINT8 *pDestBuffer, UINT16 siDestWidth, UINT16 siDestPixelDepth, UINT16 siDestPitch, UINT16 siDestHeight, UINT16 siX, UINT16 siY, UINT16 siTotalWidth, UINT16 siTotalHeight, BOOLEAN MultiLine, FontBase *pFontBase);
|
||||
//extern BOOLEAN PrintFontString(STR16 pFontString, UINT8 *pDestBuffer, UINT16 siDestWidth, UINT16 siDestPixelDepth, UINT16 siDestPitch, UINT16 siDestHeight, UINT16 siX, UINT16 siY, UINT16 siTotalWidth, UINT16 siTotalHeight, BOOLEAN MultiLine, FontBase *pFontBase);
|
||||
//extern BOOLEAN SetFont16BitData(FontBase *pFontBase, UINT16 *pData16);
|
||||
|
||||
/*
|
||||
|
||||
@@ -539,7 +539,7 @@ BOOLEAN GetFileHeaderFromLibrary( INT16 sLibraryID, STR pstrFileName, FileHeader
|
||||
gsCurrentLibrary = sLibraryID;
|
||||
|
||||
/* try to find the filename using a binary search algorithm: */
|
||||
ppFileHeader = (FileHeaderStruct **) bsearch( (char *) &sFileNameWithPath, (FileHeaderStruct *) gFileDataBase.pLibraries[ sLibraryID ].pFileHeader, gFileDataBase.pLibraries[ sLibraryID ].usNumberOfEntries,
|
||||
ppFileHeader = (FileHeaderStruct **) bsearch( &sFileNameWithPath, (FileHeaderStruct *) gFileDataBase.pLibraries[ sLibraryID ].pFileHeader, gFileDataBase.pLibraries[ sLibraryID ].usNumberOfEntries,
|
||||
sizeof( FileHeaderStruct ), (int (*)(const void*, const void*))CompareFileNames );
|
||||
|
||||
if( ppFileHeader )
|
||||
|
||||
@@ -240,7 +240,7 @@ void ShutdownMemoryManager( void )
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
PTR MemAllocReal( UINT32 uiSize, const char *pcFile, INT32 iLine )
|
||||
PTR MemAllocReal( UINT32 uiSize, const STR8 pcFile, INT32 iLine )
|
||||
{
|
||||
PTR ptr;
|
||||
|
||||
@@ -273,7 +273,7 @@ PTR MemAllocReal( UINT32 uiSize, const char *pcFile, INT32 iLine )
|
||||
}
|
||||
|
||||
|
||||
void MemFreeReal( PTR ptr, const char *pcFile, INT32 iLine )
|
||||
void MemFreeReal( PTR ptr, const STR8 pcFile, INT32 iLine )
|
||||
{
|
||||
UINT32 uiSize;
|
||||
|
||||
@@ -303,7 +303,7 @@ void MemFreeReal( PTR ptr, const char *pcFile, INT32 iLine )
|
||||
}
|
||||
|
||||
|
||||
PTR MemReallocReal( PTR ptr, UINT32 uiSize, const char *pcFile, INT32 iLine )
|
||||
PTR MemReallocReal( PTR ptr, UINT32 uiSize, const STR8 pcFile, INT32 iLine )
|
||||
{
|
||||
PTR ptrNew;
|
||||
UINT32 uiOldSize;
|
||||
@@ -491,7 +491,7 @@ BOOLEAN MemCheckPool( void )
|
||||
|
||||
#ifdef EXTREME_MEMORY_DEBUGGING
|
||||
|
||||
PTR MemAllocXDebug( UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
PTR MemAllocXDebug( UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
{
|
||||
PTR ptr;
|
||||
UINT16 usLength;
|
||||
@@ -552,7 +552,7 @@ PTR MemAllocXDebug( UINT32 size, const char *szCodeString, INT32 iLineNum, void
|
||||
return( ptr );
|
||||
}
|
||||
|
||||
void MemFreeXDebug( PTR ptr, const char *szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
void MemFreeXDebug( PTR ptr, const STR8 szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
{
|
||||
MEMORY_NODE *curr;
|
||||
|
||||
@@ -597,7 +597,7 @@ void MemFreeXDebug( PTR ptr, const char *szCodeString, INT32 iLineNum, void *pSp
|
||||
}
|
||||
}
|
||||
|
||||
PTR MemReallocXDebug( PTR ptr, UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
PTR MemReallocXDebug( PTR ptr, UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
{
|
||||
MEMORY_NODE *curr;
|
||||
PTR ptrNew;
|
||||
|
||||
@@ -63,9 +63,9 @@ extern void ShutdownMemoryManager( void );
|
||||
#define MemAlloc( size ) MemAllocXDebug( (size), __FILE__, __LINE__, NULL )
|
||||
#define MemFree( ptr ) MemFreeXDebug( (ptr), __FILE__, __LINE__, NULL )
|
||||
#define MemRealloc( ptr, size ) MemReallocXDebug( (ptr), (size), __FILE__, __LINE__, NULL )
|
||||
extern PTR MemAllocXDebug( UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern void MemFreeXDebug( PTR ptr, const char *szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern PTR MemReallocXDebug( PTR ptr, UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern PTR MemAllocXDebug( UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern void MemFreeXDebug( PTR ptr, const STR8 szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern PTR MemReallocXDebug( PTR ptr, UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
#else
|
||||
#ifdef _DEBUG
|
||||
//This is another debug feature. Not as sophistocated, but definately not the pig the extreme system is.
|
||||
@@ -73,9 +73,9 @@ extern void ShutdownMemoryManager( void );
|
||||
#define MemAlloc( size ) MemAllocReal( (size), __FILE__, __LINE__ )
|
||||
#define MemFree( ptr ) MemFreeReal( (ptr), __FILE__, __LINE__ )
|
||||
#define MemRealloc( ptr, size ) MemReallocReal( (ptr), (size), __FILE__, __LINE__ )
|
||||
extern PTR MemAllocReal( UINT32 size, const char *, INT32 );
|
||||
extern void MemFreeReal( PTR ptr, const char *, INT32 );
|
||||
extern PTR MemReallocReal( PTR ptr, UINT32 size, const char *, INT32 );
|
||||
extern PTR MemAllocReal( UINT32 size, const STR8 , INT32 );
|
||||
extern void MemFreeReal( PTR ptr, const STR8 , INT32 );
|
||||
extern PTR MemReallocReal( PTR ptr, UINT32 size, const STR8 , INT32 );
|
||||
#else
|
||||
//Release build verison
|
||||
#include <malloc.h>
|
||||
|
||||
@@ -103,7 +103,7 @@ BOOLEAN DeleteMutex(UINT32 uiMutexIndex)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
switch (WaitForSingleObject(MutexTable[uiMutexIndex], INFINITE))
|
||||
{
|
||||
@@ -118,7 +118,7 @@ BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
switch (WaitForSingleObject(MutexTable[uiMutexIndex], uiTimeout))
|
||||
{
|
||||
@@ -132,7 +132,7 @@ BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
if (ReleaseMutex(MutexTable[uiMutexIndex]) == FALSE)
|
||||
{
|
||||
@@ -201,19 +201,19 @@ BOOLEAN DeleteMutex(UINT32 uiMutexIndex)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
EnterCriticalSection(&MutexTable[uiMutexIndex]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
EnterCriticalSection(&MutexTable[uiMutexIndex]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
LeaveCriticalSection(&MutexTable[uiMutexIndex]);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ extern BOOLEAN InitializeMutexManager(void);
|
||||
extern void ShutdownMutexManager(void);
|
||||
extern BOOLEAN InitializeMutex(UINT32 uiMutexIndex, UINT8 *ubMutexName);
|
||||
extern BOOLEAN DeleteMutex(UINT32 uiMutexIndex);
|
||||
extern BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename);
|
||||
extern BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, char *szFilename);
|
||||
extern BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename);
|
||||
extern BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename);
|
||||
extern BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename);
|
||||
extern BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename);
|
||||
|
||||
//
|
||||
// Use defines to allocate slots in the mutex manager. Put these defines in LOCAL.H
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
BOOLEAN SetPcxPalette( PcxObject *pCurrentPcxObject, HIMAGE hImage );
|
||||
BOOLEAN BlitPcxToBuffer( PcxObject *pCurrentPcxObject, UINT8 *pBuffer, UINT16 usBufferWidth, UINT16 usBufferHeight, UINT16 usX, UINT16 usY, BOOLEAN fTransp);
|
||||
PcxObject *LoadPcx(UINT8 *pFilename);
|
||||
PcxObject *LoadPcx(STR8 pFilename);
|
||||
|
||||
|
||||
BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents )
|
||||
@@ -38,7 +38,7 @@ BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents )
|
||||
PcxObject *pPcxObject;
|
||||
|
||||
// First Load a PCX Image
|
||||
pPcxObject = LoadPcx( (UINT8 *)hImage->ImageFile );
|
||||
pPcxObject = LoadPcx( hImage->ImageFile );
|
||||
|
||||
if ( pPcxObject == NULL )
|
||||
{
|
||||
@@ -81,7 +81,7 @@ BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents )
|
||||
}
|
||||
|
||||
|
||||
PcxObject *LoadPcx(UINT8 *pFilename)
|
||||
PcxObject *LoadPcx(STR8 pFilename)
|
||||
{
|
||||
PcxHeader Header;
|
||||
PcxObject *pCurrentPcxObject;
|
||||
@@ -90,7 +90,7 @@ PcxObject *LoadPcx(UINT8 *pFilename)
|
||||
UINT8 *pPcxBuffer;
|
||||
|
||||
// Open and read in the file
|
||||
if ((hFileHandle = FileOpen((STR)pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE)) == 0)
|
||||
if ((hFileHandle = FileOpen(pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE)) == 0)
|
||||
{ // damn we failed to open the file
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -287,11 +287,11 @@ BOOLEAN STCILoadIndexed( HIMAGE hImage, UINT16 fContents, HWFILE hFile, STCIHead
|
||||
if (FileSeek( hFile, pHeader->uiStoredSize, FILE_SEEK_FROM_CURRENT) == FALSE)
|
||||
{
|
||||
DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_3, "Problem seeking past image data!" );
|
||||
FileClose( hFile );
|
||||
FileClose( hFile );
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fContents & IMAGE_APPDATA && pHeader->uiAppDataSize > 0)
|
||||
{
|
||||
// load application-specific data
|
||||
|
||||
@@ -48,11 +48,11 @@ typedef signed short INT16;
|
||||
typedef float FLOAT;
|
||||
typedef double DOUBLE;
|
||||
// strings
|
||||
typedef char CHAR8;
|
||||
typedef char CHAR8;
|
||||
typedef wchar_t CHAR16;
|
||||
typedef char * STR;
|
||||
typedef char * STR8;
|
||||
typedef wchar_t * STR16;
|
||||
typedef CHAR8 * STR;
|
||||
typedef CHAR8 * STR8;
|
||||
typedef CHAR16 * STR16;
|
||||
// flags (individual bits used)
|
||||
typedef unsigned char FLAGS8;
|
||||
typedef unsigned short FLAGS16;
|
||||
|
||||
@@ -47,10 +47,10 @@ HWINFONT WinFonts[ MAX_WIN_FONTS ];
|
||||
void Convert16BitStringTo8BitChineseBig5String( UINT8 *dst, UINT16 *src )
|
||||
{
|
||||
INT32 i, j;
|
||||
char *ptr;
|
||||
STR8 ptr;
|
||||
|
||||
i = j = 0;
|
||||
ptr = (char*)src;
|
||||
ptr = (STR8 )src;
|
||||
while( ptr[j] || ptr[j + 1] )
|
||||
{
|
||||
if( ptr[j] )
|
||||
@@ -108,14 +108,14 @@ HWINFONT *GetWinFont( INT32 iFont )
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t gzFontName[32];
|
||||
CHAR16 gzFontName[32];
|
||||
|
||||
INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
|
||||
INT32 iWeight, BOOLEAN fItalic, BOOLEAN fUnderline, BOOLEAN fStrikeOut, STR16 szFontName, INT32 iCharSet )
|
||||
{
|
||||
INT32 iFont;
|
||||
HFONT hFont;
|
||||
UINT8 szCharFontName[32]; //32 characters including null terminator (matches max font name length)
|
||||
CHAR8 szCharFontName[32]; //32 characters including null terminator (matches max font name length)
|
||||
// Find free slot
|
||||
iFont = FindFreeWinFont( );
|
||||
|
||||
@@ -128,7 +128,7 @@ INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
|
||||
wcscpy( gzFontName, szFontName );
|
||||
|
||||
//ATTEMPT TO LOAD THE FONT NOW
|
||||
sprintf( (char *) szCharFontName, "%S", szFontName );
|
||||
sprintf( szCharFontName, "%S", szFontName );
|
||||
if( DoesWinFontExistOnSystem( szFontName, iCharSet ) )
|
||||
{
|
||||
gLogFont.lfHeight = iHeight;
|
||||
@@ -191,11 +191,11 @@ void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor )
|
||||
}
|
||||
|
||||
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string2[512];
|
||||
char string[512];
|
||||
CHAR16 string2[512];
|
||||
CHAR8 string[512];
|
||||
HVSURFACE hVSurface;
|
||||
LPDIRECTDRAWSURFACE2 pDDSurface;
|
||||
HDC hdc;
|
||||
@@ -240,12 +240,12 @@ void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFo
|
||||
|
||||
}
|
||||
|
||||
INT16 WinFontStringPixLength( wchar_t *string2, INT32 iFont )
|
||||
INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
|
||||
{
|
||||
HWINFONT *pWinFont;
|
||||
HDC hdc;
|
||||
SIZE RectSize;
|
||||
char string[512];
|
||||
CHAR8 string[512];
|
||||
|
||||
pWinFont = GetWinFont( iFont );
|
||||
|
||||
@@ -269,12 +269,12 @@ INT16 WinFontStringPixLength( wchar_t *string2, INT32 iFont )
|
||||
}
|
||||
|
||||
|
||||
INT16 GetWinFontHeight( wchar_t *string2, INT32 iFont )
|
||||
INT16 GetWinFontHeight( STR16 string2, INT32 iFont )
|
||||
{
|
||||
HWINFONT *pWinFont;
|
||||
HDC hdc;
|
||||
SIZE RectSize;
|
||||
char string[512];
|
||||
CHAR8 string[512];
|
||||
|
||||
pWinFont = GetWinFont( iFont );
|
||||
|
||||
@@ -297,10 +297,10 @@ INT16 GetWinFontHeight( wchar_t *string2, INT32 iFont )
|
||||
return( (INT16)RectSize.cy );
|
||||
}
|
||||
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
@@ -322,10 +322,10 @@ int CALLBACK EnumFontFamProc( CONST LOGFONT *lplf, CONST TEXTMETRIC *lptm, DWO
|
||||
|
||||
int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, int FontType, LPARAM lParam )
|
||||
{
|
||||
UINT8 szFontName[32];
|
||||
CHAR8 szFontName[32];
|
||||
|
||||
sprintf( (char *)szFontName, "%S", gzFontName );
|
||||
if( !strcmp( (const char *) szFontName, (const char *)lpelfe->elfFullName ) )
|
||||
sprintf( szFontName, "%S", gzFontName );
|
||||
if( !strcmp( szFontName, (STR8) lpelfe->elfFullName ) )
|
||||
{
|
||||
gfEnumSucceed = TRUE;
|
||||
memcpy( &gLogFont, &(lpelfe->elfLogFont), sizeof( LOGFONT ) );
|
||||
|
||||
@@ -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, wchar_t *pFontString, ...);
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 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, ...);
|
||||
INT16 WinFontStringPixLength( STR16 string, INT32 iFont );
|
||||
INT16 GetWinFontHeight( STR16 string, INT32 iFont );
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...);
|
||||
|
||||
BOOLEAN DoesWinFontExistOnSystem( STR16 pTypeFaceName, INT32 iCharSet );
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ typedef struct FMUSIC_MODULE FMUSIC_MODULE;
|
||||
/*
|
||||
Callback types
|
||||
*/
|
||||
typedef void * (F_CALLBACKAPI *FSOUND_OPENCALLBACK) (const char *name);
|
||||
typedef void * (F_CALLBACKAPI *FSOUND_OPENCALLBACK) (const STR8 name);
|
||||
typedef void (F_CALLBACKAPI *FSOUND_CLOSECALLBACK) (void *handle);
|
||||
typedef int (F_CALLBACKAPI *FSOUND_READCALLBACK) (void *buffer, int size, void *handle);
|
||||
typedef int (F_CALLBACKAPI *FSOUND_SEEKCALLBACK) (void *handle, int pos, signed char mode);
|
||||
@@ -62,7 +62,7 @@ typedef void (F_CALLBACKAPI *FSOUND_FREECALLBACK) (void *ptr);
|
||||
|
||||
typedef void * (F_CALLBACKAPI *FSOUND_DSPCALLBACK) (void *originalbuffer, void *newbuffer, int length, void *userdata);
|
||||
typedef signed char (F_CALLBACKAPI *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, void *userdata);
|
||||
typedef signed char (F_CALLBACKAPI *FSOUND_METADATACALLBACK)(char *name, char *value, void *userdata);
|
||||
typedef signed char (F_CALLBACKAPI *FSOUND_METADATACALLBACK)(STR8 name, STR8 value, void *userdata);
|
||||
typedef void (F_CALLBACKAPI *FMUSIC_CALLBACK) (FMUSIC_MODULE *mod, unsigned char param);
|
||||
|
||||
|
||||
@@ -831,7 +831,7 @@ DLL_API void * F_API FSOUND_GetOutputHandle();
|
||||
DLL_API int F_API FSOUND_GetDriver();
|
||||
DLL_API int F_API FSOUND_GetMixer();
|
||||
DLL_API int F_API FSOUND_GetNumDrivers();
|
||||
DLL_API const char * F_API FSOUND_GetDriverName(int id);
|
||||
DLL_API const STR8 F_API FSOUND_GetDriverName(int id);
|
||||
DLL_API signed char F_API FSOUND_GetDriverCaps(int id, unsigned int *caps);
|
||||
DLL_API int F_API FSOUND_GetOutputRate();
|
||||
DLL_API int F_API FSOUND_GetMaxChannels();
|
||||
@@ -853,7 +853,7 @@ DLL_API void F_API FSOUND_GetMemoryStats(unsigned int *currentalloced
|
||||
Use FSOUND_LOADRAW flag with FSOUND_Sample_Load to treat as as raw pcm data.
|
||||
*/
|
||||
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const STR8 name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri);
|
||||
DLL_API void F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr);
|
||||
DLL_API signed char F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode);
|
||||
@@ -876,7 +876,7 @@ DLL_API signed char F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr,
|
||||
*/
|
||||
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
|
||||
DLL_API const char * F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
|
||||
DLL_API const STR8 F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
|
||||
DLL_API unsigned int F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr);
|
||||
DLL_API signed char F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend);
|
||||
DLL_API signed char F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri);
|
||||
@@ -1000,7 +1000,7 @@ DLL_API signed char F_API FSOUND_FX_SetWavesReverb(int fxid, float InGain, f
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_SetBufferSize(int ms); /* call this before opening streams, not after */
|
||||
|
||||
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Open(const STR8 name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, void *userdata);
|
||||
DLL_API signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream);
|
||||
|
||||
@@ -1026,27 +1026,27 @@ DLL_API FSOUND_DSPUNIT * F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream,
|
||||
DLL_API signed char F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata);
|
||||
DLL_API signed char F_API FSOUND_Stream_SetSyncCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata);
|
||||
|
||||
DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_AddSyncPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, const char *name);
|
||||
DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_AddSyncPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, const STR8 name);
|
||||
DLL_API signed char F_API FSOUND_Stream_DeleteSyncPoint(FSOUND_SYNCPOINT *point);
|
||||
DLL_API int F_API FSOUND_Stream_GetNumSyncPoints(FSOUND_STREAM *stream);
|
||||
DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_GetSyncPoint(FSOUND_STREAM *stream, int index);
|
||||
DLL_API char * F_API FSOUND_Stream_GetSyncPointInfo(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset);
|
||||
DLL_API STR8 F_API FSOUND_Stream_GetSyncPointInfo(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset);
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_SetSubStream(FSOUND_STREAM *stream, int index); /* For FMOD .FSB bank files. */
|
||||
DLL_API int F_API FSOUND_Stream_GetNumSubStreams(FSOUND_STREAM *stream); /* For FMOD .FSB bank files. */
|
||||
DLL_API signed char F_API FSOUND_Stream_SetSubStreamSentence(FSOUND_STREAM *stream, const int *sentencelist, int numitems);
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_GetNumTagFields(FSOUND_STREAM *stream, int *num);
|
||||
DLL_API signed char F_API FSOUND_Stream_GetTagField(FSOUND_STREAM *stream, int num, int *type, char **name, void **value, int *length);
|
||||
DLL_API signed char F_API FSOUND_Stream_FindTagField(FSOUND_STREAM *stream, int type, const char *name, void **value, int *length);
|
||||
DLL_API signed char F_API FSOUND_Stream_GetTagField(FSOUND_STREAM *stream, int num, int *type, STR8 *name, void **value, int *length);
|
||||
DLL_API signed char F_API FSOUND_Stream_FindTagField(FSOUND_STREAM *stream, int type, const STR8 name, void **value, int *length);
|
||||
|
||||
/*
|
||||
Internet streaming functions
|
||||
*/
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetProxy(const char *proxy);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetProxy(const STR8 proxy);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetTimeout(int timeout);
|
||||
DLL_API char * F_API FSOUND_Stream_Net_GetLastServerStatus();
|
||||
DLL_API STR8 F_API FSOUND_Stream_Net_GetLastServerStatus();
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetBufferProperties(int buffersize, int prebuffer_percent, int rebuffer_percent);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_GetBufferProperties(int *buffersize, int *prebuffer_percent, int *rebuffer_percent);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetMetadataCallback(FSOUND_STREAM *stream, FSOUND_METADATACALLBACK callback, void *userdata);
|
||||
@@ -1137,7 +1137,7 @@ DLL_API signed char F_API FSOUND_Reverb_GetChannelProperties(int channel, FS
|
||||
|
||||
DLL_API signed char F_API FSOUND_Record_SetDriver(int outputtype);
|
||||
DLL_API int F_API FSOUND_Record_GetNumDrivers();
|
||||
DLL_API const char * F_API FSOUND_Record_GetDriverName(int id);
|
||||
DLL_API const STR8 F_API FSOUND_Record_GetDriverName(int id);
|
||||
DLL_API int F_API FSOUND_Record_GetDriver();
|
||||
|
||||
/*
|
||||
@@ -1156,8 +1156,8 @@ DLL_API int F_API FSOUND_Record_GetPosition();
|
||||
Song management / playback functions.
|
||||
*/
|
||||
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name);
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const char *name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum);
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const STR8 name);
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const STR8 name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum);
|
||||
DLL_API int F_API FMUSIC_GetOpenState(FMUSIC_MODULE *mod);
|
||||
DLL_API signed char F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod);
|
||||
DLL_API signed char F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod);
|
||||
@@ -1189,7 +1189,7 @@ DLL_API signed char F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float
|
||||
Static song information functions.
|
||||
*/
|
||||
|
||||
DLL_API const char * F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
|
||||
DLL_API const STR8 F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
|
||||
DLL_API int F_API FMUSIC_GetType(FMUSIC_MODULE *mod);
|
||||
DLL_API int F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod);
|
||||
DLL_API int F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _FMOD_ERRORS_H
|
||||
#define _FMOD_ERRORS_H
|
||||
|
||||
static char *FMOD_ErrorString(int errcode)
|
||||
static STR8 FMOD_ErrorString(int errcode)
|
||||
{
|
||||
switch (errcode)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ HIMAGE CreateImage( SGPFILENAME ImageFile, UINT16 fContents )
|
||||
|
||||
// Depending on extension of filename, use different image readers
|
||||
// Get extension
|
||||
StrPtr = strstr( (char *)ImageFile, (const char *)ExtensionSep );
|
||||
StrPtr = strstr( ImageFile, ExtensionSep );
|
||||
|
||||
if ( StrPtr == NULL )
|
||||
{
|
||||
|
||||
@@ -31,14 +31,14 @@ int giClipXMax=0;
|
||||
int giClipYMin=0;
|
||||
int giClipYMax=0;
|
||||
|
||||
void DrawHorizontalRun(char **ScreenPtr, int XAdvance, int RunLength,
|
||||
void DrawHorizontalRun(UINT8 **ScreenPtr, int XAdvance, int RunLength,
|
||||
int Color, int ScreenWidth);
|
||||
void DrawVerticalRun(char **ScreenPtr, int XAdvance, int RunLength,
|
||||
void DrawVerticalRun(UINT8 **ScreenPtr, int XAdvance, int RunLength,
|
||||
int Color, int ScreenWidth);
|
||||
|
||||
void DrawHorizontalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawHorizontalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth);
|
||||
void DrawVerticalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawVerticalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth);
|
||||
|
||||
|
||||
@@ -147,14 +147,7 @@ BOOL Clip2D( int *ix0, int *iy0, int *ix1, int *iy1 )
|
||||
return( visible );
|
||||
}
|
||||
|
||||
// (jonathanl) to save me having to cast all the previous code
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
LineDraw( fClip, XStart, YStart, XEnd, YEnd, Color, (char *)ScreenPtr);
|
||||
}
|
||||
|
||||
/* Draws a line between the specified endpoints in color Color. */
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr)
|
||||
{
|
||||
int Temp, AdjUp, AdjDown, ErrorTerm, XAdvance, XDelta, YDelta;
|
||||
int WholeStep, InitialPixelCount, FinalPixelCount, i, RunLength;
|
||||
@@ -357,7 +350,7 @@ void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Col
|
||||
}
|
||||
|
||||
//Draws a pixel in the specified color
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, INT8 *pScreen )
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, UINT8 *pScreen )
|
||||
{
|
||||
INT8 col2 = sColor >> 8;
|
||||
INT8 col1 = sColor & 0x00ff;
|
||||
@@ -377,13 +370,13 @@ void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, INT8 *pScreen )
|
||||
|
||||
/* Draws a horizontal run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawHorizontalRun(char **ScreenPtr, int XAdvance,
|
||||
void DrawHorizontalRun(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
@@ -398,13 +391,13 @@ void DrawHorizontalRun(char **ScreenPtr, int XAdvance,
|
||||
|
||||
/* Draws a vertical run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawVerticalRun(char **ScreenPtr, int XAdvance,
|
||||
void DrawVerticalRun(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
@@ -419,9 +412,7 @@ void DrawVerticalRun(char **ScreenPtr, int XAdvance,
|
||||
|
||||
|
||||
/* Draws a rectangle between the specified endpoints in color Color. */
|
||||
template void RectangleDraw<unsigned char *>(BOOL, int, int, int, int, short, unsigned char *);
|
||||
template <typename string7>
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr)
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
LineDraw( fClip, XStart, YStart, XEnd, YStart, Color, ScreenPtr);
|
||||
LineDraw( fClip, XStart, YEnd, XEnd, YEnd, Color, ScreenPtr);
|
||||
@@ -438,24 +429,22 @@ void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, shor
|
||||
***********************************************************************************/
|
||||
|
||||
/* Draws a rectangle between the specified endpoints in color Color. */
|
||||
template void RectangleDraw8<unsigned char *>(BOOL, int, int ,int ,int, short, unsigned char *);
|
||||
template <typename string7>
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr)
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
LineDraw8( fClip, XStart, YStart, XEnd, YStart, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YEnd, XEnd, YEnd, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YStart, XStart, YEnd, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XEnd, YStart, XEnd, YEnd, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YStart, XEnd, YStart, Color, ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YEnd, XEnd, YEnd, Color, ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YStart, XStart, YEnd, Color, ScreenPtr);
|
||||
LineDraw8( fClip, XEnd, YStart, XEnd, YEnd, Color, ScreenPtr);
|
||||
}
|
||||
|
||||
/* Draws a line between the specified endpoints in color Color. */
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr)
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
int Temp, AdjUp, AdjDown, ErrorTerm, XAdvance, XDelta, YDelta;
|
||||
int WholeStep, InitialPixelCount, FinalPixelCount, i, RunLength;
|
||||
int ScreenWidth = giImageWidth;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
if ( fClip )
|
||||
{
|
||||
@@ -651,13 +640,13 @@ void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Co
|
||||
|
||||
/* Draws a horizontal run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawHorizontalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawHorizontalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
@@ -671,13 +660,13 @@ void DrawHorizontalRun8(char **ScreenPtr, int XAdvance,
|
||||
|
||||
/* Draws a vertical run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawVerticalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawVerticalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
|
||||
@@ -56,16 +56,12 @@ void SetClippingRegionAndImageWidth(
|
||||
// Don't send fClip==TRUE to LineDraw if you don't have to. So if you know
|
||||
// that your line will be within the region you want it to be in, set
|
||||
// fClip == FALSE.
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, INT8 *pScreen );
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr);
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, UINT8 *pScreen );
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr);
|
||||
|
||||
template <typename string7>
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr);
|
||||
|
||||
template <typename string7>
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr);
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ UINT32 guiRegionLastLButtonDownTime = 0;
|
||||
extern void ReleaseAnchorMode(); //private function used here (implemented in Button System.c)
|
||||
|
||||
// number of lines in height help text will be
|
||||
INT16 GetNumberOfLinesInHeight( STR16 pStringA );
|
||||
INT16 GetWidthOfString( STR16 pStringA );
|
||||
void DisplayHelpTokenizedString( STR16 pStringA, INT16 sX, INT16 sY );
|
||||
INT16 GetNumberOfLinesInHeight( const STR16 pStringA );
|
||||
INT16 GetWidthOfString( const STR16 pStringA );
|
||||
void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY );
|
||||
|
||||
|
||||
|
||||
@@ -1098,12 +1098,12 @@ void MSYS_SetRegionUserData(MOUSE_REGION *region,INT32 index,INT32 userdata)
|
||||
{
|
||||
if(index < 0 || index > 3)
|
||||
{
|
||||
UINT8 str[80];
|
||||
CHAR8 str[80];
|
||||
#ifdef MOUSESYSTEM_DEBUGGING
|
||||
if( gfIgnoreShutdownAssertions )
|
||||
#endif
|
||||
return;
|
||||
sprintf( (char *)str, "Attempting MSYS_SetRegionUserData() with out of range index %d.", index );
|
||||
sprintf( str, "Attempting MSYS_SetRegionUserData() with out of range index %d.", index );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
region->UserData[index]=userdata;
|
||||
@@ -1120,12 +1120,12 @@ INT32 MSYS_GetRegionUserData(MOUSE_REGION *region,INT32 index)
|
||||
{
|
||||
if(index < 0 || index > 3)
|
||||
{
|
||||
UINT8 str[80];
|
||||
CHAR8 str[80];
|
||||
#ifdef MOUSESYSTEM_DEBUGGING
|
||||
if( gfIgnoreShutdownAssertions )
|
||||
#endif
|
||||
return 0;
|
||||
sprintf( (char *)str, "Attempting MSYS_GetRegionUserData() with out of range index %d", index );
|
||||
sprintf( str, "Attempting MSYS_GetRegionUserData() with out of range index %d", index );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
return(region->UserData[index]);
|
||||
@@ -1234,13 +1234,7 @@ 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*);
|
||||
template <typename type2>
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, const STR16 szText )
|
||||
{
|
||||
Assert( region );
|
||||
|
||||
@@ -1255,11 +1249,11 @@ void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
|
||||
//AssertMsg( 0, String( "Attempting to set fast help text, \"%S\" to an inactive region.", szText ) );
|
||||
}
|
||||
|
||||
if( !szText || !wcslen( (wchar_t *)szText ) )
|
||||
if( !szText || !wcslen( szText ) )
|
||||
return; //blank (or clear)
|
||||
|
||||
// Allocate memory for the button's FastHelp text string...
|
||||
region->FastHelpText = (wchar_t*)MemAlloc( (wcslen( (wchar_t *)szText ) + 1) * sizeof(wchar_t) );
|
||||
region->FastHelpText = (STR16) MemAlloc( (wcslen( szText ) + 1) * sizeof(CHAR16) );
|
||||
Assert( region->FastHelpText );
|
||||
|
||||
wcscpy( region->FastHelpText, szText );
|
||||
@@ -1287,7 +1281,7 @@ void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
|
||||
//region->FastHelpTimer = gsFastHelpDelay;
|
||||
}
|
||||
|
||||
INT16 GetNumberOfLinesInHeight( STR16 pStringA )
|
||||
INT16 GetNumberOfLinesInHeight( const STR16 pStringA )
|
||||
{
|
||||
STR16 pToken;
|
||||
INT16 sCounter = 0;
|
||||
@@ -1370,7 +1364,7 @@ void DisplayFastHelp( MOUSE_REGION *region )
|
||||
}
|
||||
|
||||
|
||||
INT16 GetWidthOfString( STR16 pStringA )
|
||||
INT16 GetWidthOfString( const STR16 pStringA )
|
||||
{
|
||||
CHAR16 pString[ 512 ];
|
||||
STR16 pToken;
|
||||
@@ -1394,7 +1388,7 @@ INT16 GetWidthOfString( STR16 pStringA )
|
||||
|
||||
}
|
||||
|
||||
void DisplayHelpTokenizedString( STR16 pStringA, INT16 sX, INT16 sY )
|
||||
void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY )
|
||||
{
|
||||
STR16 pToken;
|
||||
INT32 iCounter = 0, i;
|
||||
@@ -1485,7 +1479,7 @@ void RenderFastHelp()
|
||||
|
||||
// **********Wiz8 Versions**************************************************************************
|
||||
|
||||
INT16 GetWidthOfString( STR16 pStringA )
|
||||
INT16 GetWidthOfString( const STR16 pStringA )
|
||||
{
|
||||
CHAR16 pString[ 512 ];
|
||||
STR16 pToken;
|
||||
@@ -1539,7 +1533,7 @@ void DisplayFastHelp( MOUSE_REGION *region )
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayHelpTokenizedString( STR16 pStringA, INT16 sX, INT16 sY )
|
||||
void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY )
|
||||
{
|
||||
STR16 pToken;
|
||||
INT32 iCounter = 0, i;
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct _MOUSE_REGION {
|
||||
|
||||
//Fast help vars.
|
||||
INT16 FastHelpTimer; // Countdown timer for FastHelp text
|
||||
wchar_t *FastHelpText; // Text string for the FastHelp (describes buttons if left there a while)
|
||||
CHAR16 *FastHelpText; // Text string for the FastHelp (describes buttons if left there a while)
|
||||
INT32 FastHelpRect;
|
||||
MOUSE_HELPTEXT_DONE_CALLBACK HelpDoneCallback;
|
||||
|
||||
@@ -199,8 +199,7 @@ void MSYS_AllowDisabledRegionFastHelp( MOUSE_REGION *region, BOOLEAN fAllow );
|
||||
// Usually used to force change of mouse cursor if panels switch, etc
|
||||
void RefreshMouseRegions( );
|
||||
|
||||
template <typename type2>
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText );
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, const STR16 szText );
|
||||
|
||||
void SetRegionHelpEndCallback( MOUSE_REGION *region, MOUSE_HELPTEXT_DONE_CALLBACK CallbackFxn );
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct
|
||||
} PcxObject;
|
||||
|
||||
BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents );
|
||||
PcxObject *LoadPcx(UINT8 *pFilename);
|
||||
PcxObject *LoadPcx(STR8 pFilename);
|
||||
BOOLEAN BlitPcxToBuffer( PcxObject *pCurrentPcxObject, UINT8 *pBuffer, UINT16 usBufferWidth, UINT16 usBufferHeight, UINT16 usX, UINT16 usY, BOOLEAN fTransp);
|
||||
|
||||
#endif
|
||||
@@ -106,7 +106,7 @@ UINT32 SoundGetFreeChannel(void);
|
||||
UINT32 SoundGetUniqueID(void);
|
||||
|
||||
// Callbacks
|
||||
void * F_CALLBACKAPI SoundFileOpen (const CHAR8 *pName);
|
||||
void * F_CALLBACKAPI SoundFileOpen (const STR8 pName);
|
||||
void F_CALLBACKAPI SoundFileClose(void *uiHandle);
|
||||
INT F_CALLBACKAPI SoundFileRead (void *pBuffer, INT iSize, void *uiHandle);
|
||||
INT F_CALLBACKAPI SoundFileSeek (void *uiHandle, INT iPos, signed char cMode);
|
||||
@@ -1459,7 +1459,7 @@ UINT32 uiSoundID;
|
||||
FSOUND_Stream_SetBufferSize(STREAM_BUFFER_LEN);
|
||||
|
||||
// Creating stream
|
||||
pSoundList[uiChannel].hStream=FSOUND_Stream_Open((char *)pSampleList[uiSample].pData, FSOUND_LOADMEMORY|FSOUND_LOOP_NORMAL|FSOUND_2D, 0, pSampleList[uiSample].uiSize);
|
||||
pSoundList[uiChannel].hStream=FSOUND_Stream_Open((STR8) pSampleList[uiSample].pData, FSOUND_LOADMEMORY|FSOUND_LOOP_NORMAL|FSOUND_2D, 0, pSampleList[uiSample].uiSize);
|
||||
if(pSoundList[uiChannel].hStream==NULL)
|
||||
{
|
||||
SoundLog((CHAR8 *)String(" ERROR in SoundStartSample(): %s", FMOD_ErrorString(FSOUND_GetError()) ));
|
||||
@@ -1630,9 +1630,9 @@ UINT32 uiSoundID;
|
||||
// ------------------------
|
||||
// Callbacks implementation
|
||||
// ========================
|
||||
static void * F_CALLBACKAPI SoundFileOpen(const CHAR8 *pName)
|
||||
static void * F_CALLBACKAPI SoundFileOpen(const STR8 pName)
|
||||
{
|
||||
return((void*)FileOpen((STR)pName, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE));
|
||||
return((void*)FileOpen(pName, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE));
|
||||
}
|
||||
|
||||
static void F_CALLBACKAPI SoundFileClose(void *uiHandle)
|
||||
|
||||
@@ -1777,7 +1777,7 @@ void RefreshScreen(void *DummyVariable)
|
||||
LPDIRECTDRAWSURFACE2 pTmpBuffer;
|
||||
DDSURFACEDESC SurfaceDescription;
|
||||
FILE *OutputFile;
|
||||
UINT8 FileName[64];
|
||||
CHAR8 FileName[64];
|
||||
INT32 iIndex;
|
||||
STRING512 DataDir;
|
||||
STRING512 ExecDir;
|
||||
@@ -1835,11 +1835,11 @@ void RefreshScreen(void *DummyVariable)
|
||||
|
||||
do
|
||||
{
|
||||
sprintf((char *) FileName, "SCREEN%03d.TGA", guiPrintFrameBufferIndex++);
|
||||
sprintf( FileName, "SCREEN%03d.TGA", guiPrintFrameBufferIndex++);
|
||||
}
|
||||
while( (_access( (const char *)FileName, 0 )) != -1 );
|
||||
while( (_access( FileName, 0 )) != -1 );
|
||||
|
||||
if ((OutputFile = fopen((const char *) FileName, "wb")) != NULL)
|
||||
if ((OutputFile = fopen( FileName, "wb")) != NULL)
|
||||
{
|
||||
fprintf(OutputFile, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, LOBYTE(SCREEN_WIDTH), HIBYTE(SCREEN_WIDTH), LOBYTE(SCREEN_HEIGHT), HIBYTE(SCREEN_HEIGHT), 0x10, 0);
|
||||
|
||||
@@ -2789,7 +2789,7 @@ BOOLEAN HideMouseCursor(void)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BOOLEAN LoadCursorFile(PTR pFilename)
|
||||
BOOLEAN LoadCursorFile(STR8 pFilename)
|
||||
{
|
||||
VOBJECT_DESC VideoObjectDescription;
|
||||
|
||||
@@ -2944,14 +2944,7 @@ HRESULT ReturnCode;
|
||||
}
|
||||
|
||||
|
||||
//Kaiden - Added for VC6 Compatibility
|
||||
#if _MSC_VER <= 1200
|
||||
template void FatalError<char const *>(char *, ...);
|
||||
#endif
|
||||
|
||||
template void FatalError<char const *>(char const *, ...);
|
||||
template <typename string1>
|
||||
void FatalError( string1 pError, ...)
|
||||
void FatalError( const STR8 pError, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ extern BOOLEAN GetRGBDistribution(void);
|
||||
extern BOOLEAN GetPrimaryRGBDistributionMasks(UINT32 *RedBitMask, UINT32 *GreenBitMask, UINT32 *BblueBitMask);
|
||||
extern BOOLEAN SetMouseCursorFromObject(UINT32 uiVideoObjectHandle, UINT16 usVideoObjectSubIndex, UINT16 usOffsetX, UINT16 usOffsetY );
|
||||
extern BOOLEAN HideMouseCursor(void);
|
||||
extern BOOLEAN LoadCursorFile(PTR pFilename);
|
||||
extern BOOLEAN LoadCursorFile(STR8 pFilename);
|
||||
extern BOOLEAN SetCurrentCursor(UINT16 usVideoObjectSubIndex, UINT16 usOffsetX, UINT16 usOffsetY );
|
||||
extern void StartFrameBufferRender(void);
|
||||
extern void EndFrameBufferRender(void);
|
||||
@@ -85,8 +85,7 @@ void InvalidateRegionEx(INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UI
|
||||
void RefreshScreen(void *DummyVariable);
|
||||
|
||||
|
||||
template <typename string1>
|
||||
void FatalError( string1 pError, ...);
|
||||
void FatalError( const STR8 pError, ...);
|
||||
|
||||
|
||||
extern SGPPaletteEntry gSgpPalette[256];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user