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