mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +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:
@@ -70,7 +70,7 @@
|
||||
#define GUI_BTN_EXTERNAL_VOBJ 2
|
||||
|
||||
|
||||
UINT8 str[128];
|
||||
CHAR8 str[128];
|
||||
|
||||
//Kris: December 2, 1997
|
||||
//Special internal debugging utilities that will ensure that you don't attempt to delete
|
||||
@@ -108,7 +108,7 @@ void AssertFailIfIdenticalButtonAttributesFound( GUI_BUTTON *b )
|
||||
//if we get this far, it is reasonably safe to assume that the newly created
|
||||
//button already exists. Placing a break point on the following assert will
|
||||
//allow the coder to easily isolate the case!
|
||||
sprintf( (char *)str, "Attempting to create a button that has already been created (existing buttonID %d).", c->IDNum );
|
||||
sprintf( str, "Attempting to create a button that has already been created (existing buttonID %d).", c->IDNum );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
}
|
||||
@@ -203,10 +203,7 @@ INT32 FindFreeButtonSlot(void)
|
||||
//
|
||||
// Load images for use with QuickButtons.
|
||||
//
|
||||
template INT32 LoadButtonImage<unsigned char *>(unsigned char *, INT32, INT32, INT32, INT32, INT32);
|
||||
template INT32 LoadButtonImage<char *>(char *, INT32, INT32, INT32, INT32, INT32);
|
||||
template <typename type1>
|
||||
INT32 LoadButtonImage(type1 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite)
|
||||
INT32 LoadButtonImage(const STR8 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite)
|
||||
{
|
||||
VOBJECT_DESC vo_desc;
|
||||
UINT32 UseSlot;
|
||||
@@ -594,7 +591,7 @@ void UnloadButtonImage(INT32 Index)
|
||||
|
||||
if( Index < 0 || Index >= MAX_BUTTON_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to UnloadButtonImage with out of range index %d.", Index );
|
||||
sprintf( str, "Attempting to UnloadButtonImage with out of range index %d.", Index );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -662,7 +659,7 @@ BOOLEAN EnableButton( INT32 iButtonID )
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to EnableButton with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to EnableButton with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -700,7 +697,7 @@ BOOLEAN DisableButton(INT32 iButtonID )
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to DisableButton with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to DisableButton with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -876,10 +873,7 @@ INT16 FindFreeIconSlot(void)
|
||||
//
|
||||
// Loads an image file for use as a button icon.
|
||||
//
|
||||
template INT16 LoadGenericButtonIcon<char *>(char *);
|
||||
template INT16 LoadGenericButtonIcon<char const *>(char const *);
|
||||
template <typename string1>
|
||||
INT16 LoadGenericButtonIcon(string1 filename)
|
||||
INT16 LoadGenericButtonIcon(const STR8 filename)
|
||||
{
|
||||
INT16 ImgSlot;
|
||||
VOBJECT_DESC vo_desc;
|
||||
@@ -916,7 +910,7 @@ BOOLEAN UnloadGenericButtonIcon(INT16 GenImg)
|
||||
{
|
||||
if( GenImg < 0 || GenImg >= MAX_BUTTON_ICONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to UnloadGenericButtonIcon with out of range index %d.", GenImg );
|
||||
sprintf( str, "Attempting to UnloadGenericButtonIcon with out of range index %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -947,7 +941,7 @@ BOOLEAN UnloadGenericButtonImage(INT16 GenImg)
|
||||
BOOLEAN fDeletedSomething = FALSE;
|
||||
if( GenImg < 0 || GenImg >= MAX_GENERIC_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to UnloadGenericButtonImage with out of range index %d.", GenImg );
|
||||
sprintf( str, "Attempting to UnloadGenericButtonImage with out of range index %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1016,7 +1010,7 @@ BOOLEAN UnloadGenericButtonImage(INT16 GenImg)
|
||||
//
|
||||
// Loads the image files required for displaying a generic button.
|
||||
//
|
||||
INT16 LoadGenericButtonImages(UINT8 *GrayName,UINT8 *OffNormName,UINT8 *OffHiliteName,UINT8 *OnNormName,UINT8 *OnHiliteName,UINT8 *BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY)
|
||||
INT16 LoadGenericButtonImages(STR8 GrayName,STR8 OffNormName,STR8 OffHiliteName,STR8 OnNormName,STR8 OnHiliteName, STR8 BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY)
|
||||
{
|
||||
INT16 ImgSlot;
|
||||
VOBJECT_DESC vo_desc;
|
||||
@@ -1294,7 +1288,7 @@ void RemoveButton(INT32 iButtonID)
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to RemoveButton with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to RemoveButton with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1390,7 +1384,7 @@ void ResizeButton(INT32 iButtonID,INT16 w, INT16 h)
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to resize button with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to resize button with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1404,7 +1398,7 @@ void ResizeButton(INT32 iButtonID,INT16 w, INT16 h)
|
||||
|
||||
if( !b )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to resize deleted button with buttonID %d", iButtonID );
|
||||
sprintf( str, "Attempting to resize deleted button with buttonID %d", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1449,7 +1443,7 @@ void SetButtonPosition( INT32 iButtonID ,INT16 x, INT16 y)
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button position with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to set button position with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1457,7 +1451,7 @@ void SetButtonPosition( INT32 iButtonID ,INT16 x, INT16 y)
|
||||
|
||||
if( !b )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button position with buttonID %d", iButtonID );
|
||||
sprintf( str, "Attempting to set button position with buttonID %d", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1502,13 +1496,13 @@ INT32 SetButtonIcon( INT32 iButtonID, INT16 Icon, INT16 IconIndex )
|
||||
|
||||
if( iButtonID < 0 || iButtonID >= MAX_BUTTONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button icon with out of range buttonID %d.", iButtonID );
|
||||
sprintf( str, "Attempting to set button icon with out of range buttonID %d.", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
return -1;
|
||||
}
|
||||
if( Icon < 0 || Icon >= MAX_BUTTON_ICONS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set button[%d] icon with out of range icon index %d.", iButtonID, Icon );
|
||||
sprintf( str, "Attempting to set button[%d] icon with out of range icon index %d.", iButtonID, Icon );
|
||||
AssertMsg( 0, str );
|
||||
return -1;
|
||||
}
|
||||
@@ -1517,7 +1511,7 @@ INT32 SetButtonIcon( INT32 iButtonID, INT16 Icon, INT16 IconIndex )
|
||||
|
||||
if( !b )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to set deleted button icon with buttonID %d", iButtonID );
|
||||
sprintf( str, "Attempting to set deleted button icon with buttonID %d", iButtonID );
|
||||
AssertMsg( 0, str );
|
||||
return -1;
|
||||
}
|
||||
@@ -1552,12 +1546,12 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateIconButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to CreateIconButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( GenImg < -1 || GenImg >= MAX_GENERIC_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateIconButton with out of range iconID %d.", GenImg );
|
||||
sprintf( str, "Attempting to CreateIconButton with out of range iconID %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1672,7 +1666,7 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
|
||||
}
|
||||
|
||||
//Creates a generic button with text on it.
|
||||
INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback)
|
||||
INT32 CreateTextButton(STR16 string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback)
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
INT32 ButtonNum;
|
||||
@@ -1680,12 +1674,12 @@ INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 s
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to CreateTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( GenImg < -1 || GenImg >= MAX_GENERIC_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateTextButton with out of range iconID %d.", GenImg );
|
||||
sprintf( str, "Attempting to CreateTextButton with out of range iconID %d.", GenImg );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -1716,7 +1710,7 @@ INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 s
|
||||
b->string = NULL;
|
||||
if ( string && wcslen( string ) )
|
||||
{
|
||||
b->string = (wchar_t*)MemAlloc( (wcslen(string)+1)*sizeof(wchar_t) );
|
||||
b->string = (STR16) MemAlloc( (wcslen(string)+1)*sizeof(CHAR16) );
|
||||
AssertMsg( b->string, "Out of memory error: Couldn't allocate string in CreateTextButton." );
|
||||
wcscpy( b->string, string );
|
||||
}
|
||||
@@ -1821,7 +1815,7 @@ INT32 CreateHotSpot(INT16 xloc, INT16 yloc, INT16 Width, INT16 Height,INT16 Prio
|
||||
|
||||
if( xloc < 0 || yloc < 0 || Width < 0 || Height < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateHotSpot with invalid coordinates: %d,%d, width: %d, and height: %d.",
|
||||
sprintf( str, "Attempting to CreateHotSpot with invalid coordinates: %d,%d, width: %d, and height: %d.",
|
||||
xloc, yloc, Width, Height );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
@@ -1928,12 +1922,12 @@ INT32 QuickCreateButton(UINT32 Image,INT16 xloc,INT16 yloc,INT32 Type,INT16 Prio
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to QuickCreateButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to QuickCreateButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( Image < 0 || Image >= MAX_BUTTON_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to QuickCreateButton with out of range ImageID %d.", Image );
|
||||
sprintf( str, "Attempting to QuickCreateButton with out of range ImageID %d.", Image );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -2063,43 +2057,29 @@ INT32 QuickCreateButton(UINT32 Image,INT16 xloc,INT16 yloc,INT32 Type,INT16 Prio
|
||||
//loading, and deleting of the image. The size of the image determines the size of the button. It also uses
|
||||
//the default move callback which emulates Win95. Finally, it sets the priority to normal. The function you
|
||||
//choose also determines the type of button (toggle, notoggle, or newtoggle)
|
||||
template INT32 CreateEasyNoToggleButton<char *>(INT32, INT32, char *, GUI_CALLBACK);
|
||||
template INT32 CreateEasyNoToggleButton<char const *>(INT32, INT32, char const *, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, const STR8 filename, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
template INT32 CreateEasyToggleButton<char *>(INT32, INT32, char *, GUI_CALLBACK);
|
||||
template INT32 CreateEasyToggleButton<char const *>(INT32, INT32, char const *, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, const STR8 filename, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
template INT32 CreateEasyNewToggleButton<char const *>(INT32, INT32, char const *, GUI_CALLBACK);
|
||||
template INT32 CreateEasyNewToggleButton<short *>(INT32, INT32, short *, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, const STR8 filename, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, BUTTON_NEWTOGGLE, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
//Same as above, but accepts specify toggle type
|
||||
template INT32 CreateEasyButton<short *>(INT32, INT32, short *, INT32, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, string3 filename, INT32 Type, GUI_CALLBACK ClickCallback)
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, const STR8 filename, INT32 Type, GUI_CALLBACK ClickCallback)
|
||||
{
|
||||
return CreateSimpleButton( x, y, filename, Type, MSYS_PRIORITY_NORMAL, ClickCallback );
|
||||
}
|
||||
|
||||
//Same as above, but accepts priority specification.
|
||||
template INT32 CreateSimpleButton<char *>(INT32, INT32, char *, INT32, INT16, GUI_CALLBACK);
|
||||
template INT32 CreateSimpleButton<char const *>(INT32, INT32, char const *, INT32, INT16, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, string3 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, const STR8 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
INT32 ButPic,ButNum;
|
||||
|
||||
@@ -2123,13 +2103,7 @@ INT32 CreateSimpleButton( INT32 x, INT32 y, string3 filename, INT32 Type, INT16
|
||||
return( ButNum );
|
||||
}
|
||||
|
||||
template INT32 CreateIconAndTextButton<wchar_t const *>(INT32, wchar_t const *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
|
||||
template INT32 CreateIconAndTextButton<wchar_t *>(INT32, wchar_t *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
|
||||
template INT32 CreateIconAndTextButton<unsigned short const *>(INT32, unsigned short const *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
|
||||
template INT32 CreateIconAndTextButton<unsigned short *>(INT32, unsigned short *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
|
||||
template INT32 CreateIconAndTextButton<short *>(INT32, short *, UINT32, INT16, INT16, INT16, INT16, INT8, INT16, INT16, INT32, INT16, GUI_CALLBACK, GUI_CALLBACK);
|
||||
template <typename string2>
|
||||
INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
INT32 CreateIconAndTextButton( INT32 Image, const STR16 string, UINT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown,
|
||||
INT8 bJustification,
|
||||
@@ -2142,12 +2116,12 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
|
||||
if( xloc < 0 || yloc < 0 )
|
||||
{
|
||||
sprintf( (char *)str, "Attempting to CreateIconAndTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
sprintf( str, "Attempting to CreateIconAndTextButton with invalid position of %d,%d", xloc, yloc );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
if( Image < 0 || Image >= MAX_BUTTON_PICS )
|
||||
{
|
||||
sprintf( (char *)str, "Attemting to CreateIconAndTextButton with out of range ImageID %d.", Image );
|
||||
sprintf( str, "Attemting to CreateIconAndTextButton with out of range ImageID %d.", Image );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
|
||||
@@ -2192,7 +2166,7 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
b->string = NULL;
|
||||
if ( string )
|
||||
{
|
||||
b->string = (wchar_t*)MemAlloc( (wcslen((wchar_t *)string)+1)*sizeof(wchar_t) );
|
||||
b->string = (STR16) MemAlloc( (wcslen(string)+1)*sizeof(CHAR16) );
|
||||
AssertMsg( b->string, "Out of memory error: Couldn't allocate string in CreateIconAndTextButton." );
|
||||
wcscpy( b->string, string );
|
||||
}
|
||||
@@ -2265,7 +2239,7 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
}
|
||||
|
||||
//New functions
|
||||
void SpecifyButtonText( INT32 iButtonID, wchar_t * string )
|
||||
void SpecifyButtonText( INT32 iButtonID, STR16 string )
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
|
||||
@@ -2282,7 +2256,7 @@ void SpecifyButtonText( INT32 iButtonID, wchar_t * string )
|
||||
if( string && wcslen( string ) )
|
||||
{
|
||||
//allocate memory for the new string
|
||||
b->string = (wchar_t*)MemAlloc( (wcslen(string)+1)*sizeof(wchar_t) );
|
||||
b->string = (STR16) MemAlloc( (wcslen(string)+1)*sizeof(CHAR16) );
|
||||
Assert( b->string );
|
||||
//copy the string to the button
|
||||
wcscpy( b->string, string );
|
||||
@@ -2362,7 +2336,7 @@ void SpecifyButtonTextJustification( INT32 iButtonID, INT8 bJustification )
|
||||
b->uiFlags |= BUTTON_DIRTY ;
|
||||
}
|
||||
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown, INT8 bJustification )
|
||||
{
|
||||
@@ -2385,7 +2359,7 @@ void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 ui
|
||||
b->uiFlags |= BUTTON_DIRTY ;
|
||||
}
|
||||
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor )
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
@@ -2542,7 +2516,7 @@ void AllowDisabledButtonFastHelp( INT32 iButtonID, BOOLEAN fAllow )
|
||||
//
|
||||
// Set the text that will be displayed as the FastHelp
|
||||
//
|
||||
void SetButtonFastHelpText(INT32 iButton, wchar_t * Text)
|
||||
void SetButtonFastHelpText(INT32 iButton, STR16 Text)
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
if(iButton<0 || iButton>MAX_BUTTONS)
|
||||
@@ -2579,7 +2553,7 @@ void QuickButtonCallbackMMove(MOUSE_REGION *reg,INT32 reason)
|
||||
|
||||
iButtonID = MSYS_GetRegionUserData(reg,0);
|
||||
|
||||
sprintf( (char *)str, "QuickButtonCallbackMMove: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
sprintf( str, "QuickButtonCallbackMMove: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
reg->IDNumber, reg->RegionTopLeftX, reg->RegionTopLeftY, reg->RegionBottomRightX, reg->RegionBottomRightY, iButtonID );
|
||||
|
||||
AssertMsg( iButtonID >= 0, str );
|
||||
@@ -2684,7 +2658,7 @@ void QuickButtonCallbackMButn( MOUSE_REGION *reg, INT32 reason )
|
||||
|
||||
iButtonID = MSYS_GetRegionUserData(reg,0);
|
||||
|
||||
sprintf( (char *)str, "QuickButtonCallbackMButn: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
sprintf( str, "QuickButtonCallbackMButn: Mouse Region #%d (%d,%d to %d,%d) has invalid buttonID %d",
|
||||
reg->IDNumber, reg->RegionTopLeftX, reg->RegionTopLeftY, reg->RegionBottomRightX, reg->RegionBottomRightY, iButtonID );
|
||||
|
||||
AssertMsg( iButtonID >= 0, str );
|
||||
@@ -3949,7 +3923,7 @@ BOOLEAN SetDialogAttributes( CreateDlgInfo *pDlgInfo, INT32 iAttrib, ... )
|
||||
{
|
||||
va_list arg;
|
||||
INT32 iFont,iFontOptions;
|
||||
wchar_t *zString;
|
||||
STR16 zString;
|
||||
INT32 iX,iY,iW,iH;
|
||||
INT32 iIndex;
|
||||
HVOBJECT hVObj;
|
||||
@@ -4000,7 +3974,7 @@ BOOLEAN SetDialogAttributes( CreateDlgInfo *pDlgInfo, INT32 iAttrib, ... )
|
||||
iFont = va_arg( arg, INT32 );
|
||||
pDlgInfo->iTextFont = iFont;
|
||||
|
||||
zString = (wchar_t *)va_arg( arg, UINT32 );
|
||||
zString = va_arg( arg, STR16 );
|
||||
|
||||
if ( pDlgInfo->zDlgText != NULL )
|
||||
MemFree( pDlgInfo->zDlgText );
|
||||
@@ -4096,15 +4070,7 @@ void DrawDialogBox( INT32 iDlgBox )
|
||||
|
||||
|
||||
|
||||
// Kaiden: Added for VC6 compatibility
|
||||
|
||||
#if _MSC_VER <= 1200
|
||||
template INT32 CreateCheckBoxButton<char const *>(INT16, INT16, char *, INT16, GUI_CALLBACK);
|
||||
#endif
|
||||
|
||||
template INT32 CreateCheckBoxButton<char const *>(INT16, INT16, char const *, INT16, GUI_CALLBACK);
|
||||
template <typename string3>
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, string3 filename, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, const STR8 filename, INT16 Priority, GUI_CALLBACK ClickCallback )
|
||||
{
|
||||
GUI_BUTTON *b;
|
||||
INT32 ButPic, iButtonID;
|
||||
|
||||
@@ -116,7 +116,7 @@ typedef struct _GUI_BUTTON {
|
||||
//Button disabled style
|
||||
INT8 bDisabledStyle;
|
||||
//For buttons with text
|
||||
wchar_t *string; //the string
|
||||
CHAR16 *string; //the string
|
||||
UINT16 usFont; //font for text
|
||||
BOOLEAN fMultiColor; //font is a multi-color font
|
||||
INT16 sForeColor; //text colors if there is text
|
||||
@@ -184,7 +184,7 @@ INT16 FindFreeIconSlot(void);
|
||||
INT32 GetNextButtonNumber(void);
|
||||
|
||||
// Now used by Wizardry -- DB
|
||||
void SetButtonFastHelpText(INT32 iButton, wchar_t * Text);
|
||||
void SetButtonFastHelpText(INT32 iButton, STR16 Text);
|
||||
|
||||
#ifdef _JA2_RENDER_DIRTY
|
||||
void SetBtnHelpEndCallback( INT32 iButton, MOUSE_HELPTEXT_DONE_CALLBACK CallbackFxn );
|
||||
@@ -198,17 +198,15 @@ void FreeButtonSavedRect( INT32 iButton );
|
||||
|
||||
#endif
|
||||
|
||||
template <typename string1>
|
||||
INT16 LoadGenericButtonIcon(string1 filename);
|
||||
INT16 LoadGenericButtonIcon(STR8 filename);
|
||||
|
||||
BOOLEAN UnloadGenericButtonIcon(INT16 GenImg);
|
||||
|
||||
template <typename type1>
|
||||
INT32 LoadButtonImage(type1 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
INT32 LoadButtonImage(STR8 filename, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
INT32 UseLoadedButtonImage(INT32 LoadedImg, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
INT32 UseVObjAsButtonImage(HVOBJECT hVObject, INT32 Grayed, INT32 OffNormal, INT32 OffHilite, INT32 OnNormal, INT32 OnHilite);
|
||||
void UnloadButtonImage(INT32 Index);
|
||||
INT16 LoadGenericButtonImages(UINT8 *GrayName,UINT8 *OffNormName,UINT8 *OffHiliteName,UINT8 *OnNormName,UINT8 *OnHiliteName,UINT8 *BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY);
|
||||
INT16 LoadGenericButtonImages(STR8 GrayName,STR8 OffNormName, STR8 OffHiliteName, STR8 OnNormName,STR8 OnHiliteName,STR8 BkGrndName,INT16 Index,INT16 OffsetX, INT16 OffsetY);
|
||||
BOOLEAN UnloadGenericButtonImage(INT16 GenImg);
|
||||
|
||||
BOOLEAN SetButtonDestBuffer(UINT32 DestBuffer);
|
||||
@@ -243,31 +241,24 @@ INT32 QuickCreateButton(UINT32 Image, INT16 xloc, INT16 yloc, INT32 Type,INT16 P
|
||||
//loading, and deleting of the image. The size of the image determines the size of the button. It also uses
|
||||
//the default move callback which emulates Win95. Finally, it sets the priority to normal. The function you
|
||||
//choose also determines the type of button (toggle, notoggle, or newtoggle)
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateEasyNoToggleButton ( INT32 x, INT32 y, STR8 filename, GUI_CALLBACK ClickCallback );
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateEasyToggleButton ( INT32 x, INT32 y, STR8 filename, GUI_CALLBACK ClickCallback );
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, string3 filename, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateEasyNewToggleButton( INT32 x, INT32 y, STR8 filename, GUI_CALLBACK ClickCallback );
|
||||
//Same as above, but accepts specify toggle type
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, string3 filename, INT32 Type, GUI_CALLBACK ClickCallback);
|
||||
INT32 CreateEasyButton( INT32 x, INT32 y, STR8 filename, INT32 Type, GUI_CALLBACK ClickCallback);
|
||||
//Same as above, but accepts priority specification.
|
||||
template <typename string3>
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, string3 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateSimpleButton( INT32 x, INT32 y, STR8 filename, INT32 Type, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
|
||||
template <typename string3>
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, string3 filename, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
INT32 CreateCheckBoxButton( INT16 x, INT16 y, STR8 filename, INT16 Priority, GUI_CALLBACK ClickCallback );
|
||||
|
||||
INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16 yloc,INT16 w,INT16 h,INT32 Type,INT16 Priority,GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
|
||||
INT32 CreateHotSpot(INT16 xloc, INT16 yloc, INT16 Width, INT16 Height,INT16 Priority,GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
|
||||
|
||||
INT32 CreateTextButton(wchar_t *string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback);
|
||||
template <typename string2>
|
||||
INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
INT32 CreateTextButton(STR16 string, UINT32 uiFont, INT16 sForeColor, INT16 sShadowColor, INT16 GenImg, INT16 xloc, INT16 yloc, INT16 w, INT16 h, INT32 Type, INT16 Priority,GUI_CALLBACK MoveCallback, GUI_CALLBACK ClickCallback);
|
||||
INT32 CreateIconAndTextButton( INT32 Image, const STR16 string, UINT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown,
|
||||
INT8 bJustification,
|
||||
@@ -275,19 +266,19 @@ INT32 CreateIconAndTextButton( INT32 Image, string2 string, UINT32 uiFont,
|
||||
GUI_CALLBACK MoveCallback,GUI_CALLBACK ClickCallback);
|
||||
|
||||
//New functions
|
||||
void SpecifyButtonText( INT32 iButtonID, wchar_t * string );
|
||||
void SpecifyButtonText( INT32 iButtonID, STR16 string );
|
||||
void SpecifyButtonFont( INT32 iButtonID, UINT32 uiFont );
|
||||
void SpecifyButtonMultiColorFont(INT32 iButtonID, BOOLEAN fMultiColor);
|
||||
void SpecifyButtonUpTextColors( INT32 iButtonID, INT16 sForeColor, INT16 sShadowColor );
|
||||
void SpecifyButtonDownTextColors( INT32 iButtonID, INT16 sForeColorDown, INT16 sShadowColorDown );
|
||||
void SpecifyButtonHilitedTextColors( INT32 iButtonID, INT16 sForeColorHilited, INT16 sShadowColorHilited );
|
||||
void SpecifyButtonTextJustification( INT32 iButtonID, INT8 bJustification );
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor );
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyFullButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor,
|
||||
INT16 sForeColorDown, INT16 sShadowColorDown, INT8 bJustification );
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, wchar_t *string, INT32 uiFont,
|
||||
void SpecifyGeneralButtonTextAttributes( INT32 iButtonID, STR16 string, INT32 uiFont,
|
||||
INT16 sForeColor, INT16 sShadowColor );
|
||||
void SpecifyButtonTextOffsets( INT32 iButtonID, INT8 bTextXOffset, INT8 bTextYOffset, BOOLEAN fShiftText );
|
||||
void SpecifyButtonTextSubOffsets( INT32 iButtonID, INT8 bTextXOffset, INT8 bTextYOffset, BOOLEAN fShiftText );
|
||||
|
||||
@@ -76,8 +76,8 @@ typedef struct OrdHeaderTag
|
||||
{
|
||||
UINT32 me;
|
||||
long you;
|
||||
char *k;
|
||||
char *p;
|
||||
STR8 k;
|
||||
STR8 p;
|
||||
|
||||
} TEST;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ extern INT32 giProfileCount;
|
||||
_RPT3(_CRT_WARN, "*** PROFILE REPORT: %d executions took %dms, average of %.2fms per iteration.\n", guiExecutions, guiProfileTime, (FLOAT)guiProfileTime/guiExecutions);
|
||||
|
||||
extern void _Null(void);
|
||||
extern UINT8 *String(const char *String, ...);
|
||||
extern STR8 String(const STR8 String, ...);
|
||||
|
||||
|
||||
|
||||
@@ -64,13 +64,12 @@ extern UINT8 *String(const char *String, ...);
|
||||
//Assert( pointer, "This pointer is null and you tried to access it in function A ");
|
||||
//It'll make debugging a little simpler. In anal cases, you could build the string first, then assert
|
||||
//with it.
|
||||
template <typename type1, typename type2>
|
||||
extern void _FailMessage(type1 pString, UINT32 uiLineNum, type2 pSourceFile );
|
||||
extern void _FailMessage(STR8 pString, UINT32 uiLineNum, STR8 pSourceFile );
|
||||
|
||||
#define Assert(a) (a) ? _Null() : _FailMessage( NULL, __LINE__, __FILE__ )
|
||||
#define AssertMsg(a,b) (a) ? _Null() : _FailMessage( b, __LINE__, __FILE__ )
|
||||
|
||||
extern UINT8 gubAssertString[128];
|
||||
extern CHAR8 gubAssertString[128];
|
||||
|
||||
|
||||
#else
|
||||
@@ -84,7 +83,7 @@ extern UINT8 gubAssertString[128];
|
||||
|
||||
// Kaiden: Added this for Map Editor
|
||||
#ifdef JA2BETAVERSION
|
||||
extern UINT8 gubAssertString[128];
|
||||
extern CHAR8 gubAssertString[128];
|
||||
#endif
|
||||
|
||||
// Moved these out of the defines - debug mgr always initialized
|
||||
@@ -130,11 +129,10 @@ extern BOOLEAN gfDebugTopics[MAX_TOPICS_ALLOTED];
|
||||
#endif
|
||||
|
||||
// public interface to debug methods:
|
||||
template <typename type4>
|
||||
extern void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, type4 strMessage);
|
||||
extern void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, STR8 strMessage);
|
||||
|
||||
extern BOOLEAN DbgSetDebugLevel(UINT16 TopicId, UINT8 uiDebugLevel);
|
||||
extern void DbgFailedAssertion( BOOLEAN fExpression, char *szFile, int nLine );
|
||||
extern void DbgFailedAssertion( BOOLEAN fExpression, STR8 szFile, int nLine );
|
||||
#if _MSC_VER <= 1200
|
||||
extern void _FailMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile );
|
||||
#endif
|
||||
|
||||
@@ -68,10 +68,10 @@ INT32 giProfileCount;
|
||||
// they are required for the String() function, which is NOT a
|
||||
// debug-mode only function, it's used in release-mode as well! -- DB
|
||||
|
||||
UINT8 gubAssertString[128];
|
||||
CHAR8 gubAssertString[128];
|
||||
|
||||
#define MAX_MSG_LENGTH2 512
|
||||
UINT8 gbTmpDebugString[8][MAX_MSG_LENGTH2];
|
||||
CHAR8 gbTmpDebugString[8][MAX_MSG_LENGTH2];
|
||||
UINT8 gubStringIndex = 0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -357,9 +357,7 @@ void DbgClearAllTopics( void )
|
||||
// xxnov96:HJH -> creation
|
||||
//
|
||||
//**************************************************************************
|
||||
template void DbgMessageReal<unsigned char *>(UINT16, UINT8, UINT8, unsigned char *);
|
||||
template <typename type4>
|
||||
void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, type4 strMessage)
|
||||
void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, STR8 strMessage)
|
||||
{
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
FILE *OutFile;
|
||||
@@ -368,7 +366,7 @@ void DbgMessageReal(UINT16 uiTopicId, UINT8 uiCommand, UINT8 uiDebugLevel, type4
|
||||
// Check for a registered topic ID
|
||||
if ( uiTopicId < MAX_TOPICS_ALLOTED )//&& gfDebugTopics[uiTopicId] )
|
||||
{
|
||||
OutputDebugString ( (LPCSTR) strMessage );
|
||||
OutputDebugString ( strMessage );
|
||||
OutputDebugString ( "\n" );
|
||||
|
||||
//add _NO_DEBUG_TXT to your SGP preprocessor definitions to avoid this f**king huge file from
|
||||
@@ -417,7 +415,7 @@ BOOLEAN DbgSetDebugLevel(UINT16 uiTopicId, UINT8 uiDebugLevel)
|
||||
//
|
||||
//**************************************************************************
|
||||
|
||||
void DbgFailedAssertion( BOOLEAN fExpression, char *szFile, int nLine )
|
||||
void DbgFailedAssertion( BOOLEAN fExpression, STR8 szFile, int nLine )
|
||||
{
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
FILE *OutFile;
|
||||
@@ -454,7 +452,7 @@ void _DebugRecordToDebugger(BOOLEAN gfState)
|
||||
|
||||
void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
{
|
||||
UINT8 ubOutputString[512];
|
||||
CHAR8 ubOutputString[512];
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
FILE *DebugFile;
|
||||
#endif
|
||||
@@ -463,7 +461,7 @@ void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
// Build the output string
|
||||
//
|
||||
|
||||
sprintf( (char *) ubOutputString, "{ %ld } %s [Line %d in %s]\n", GetTickCount(), pString, uiLineNum, pSourceFile );
|
||||
sprintf( ubOutputString, "{ %ld } %s [Line %d in %s]\n", GetTickCount(), pString, uiLineNum, pSourceFile );
|
||||
|
||||
//
|
||||
// Output to debugger
|
||||
@@ -483,7 +481,7 @@ void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
{
|
||||
if ((DebugFile = fopen( gpcDebugLogFileName, "a+t" )) != NULL)
|
||||
{
|
||||
fputs( (const char *)ubOutputString, DebugFile );
|
||||
fputs( ubOutputString, DebugFile );
|
||||
fclose( DebugFile );
|
||||
}
|
||||
}
|
||||
@@ -501,34 +499,24 @@ void _Null(void)
|
||||
extern HVOBJECT FontObjs[25];
|
||||
|
||||
#ifdef JA2 //JAGGED ALLIANCE 2 VERSION ONLY
|
||||
template void _FailMessage<char *, char const *>(char *, unsigned int, char const *);
|
||||
template void _FailMessage<char const *, char const *>(char const *, unsigned int, char const *);
|
||||
template void _FailMessage<int, char const *>(int, unsigned int, char const *);
|
||||
template void _FailMessage<int, char *>(int, unsigned int, char *);
|
||||
template void _FailMessage<char *, char *>(char *, unsigned int, char *);
|
||||
#if _MSC_VER <= 1200
|
||||
template void _FailMessage<char *, char *>(unsigned char *, unsigned int, char *);
|
||||
#endif
|
||||
template void _FailMessage<unsigned char *, char const *>(unsigned char *, unsigned int, char const *);
|
||||
template <typename type1, typename type2>
|
||||
void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
void _FailMessage( STR8 pString, UINT32 uiLineNum, STR8 pSourceFile )
|
||||
{
|
||||
UINT8 ubOutputString[512];
|
||||
CHAR8 ubOutputString[512];
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
MSG Message;
|
||||
FILE *DebugFile;
|
||||
#endif
|
||||
BOOLEAN fDone = FALSE;
|
||||
//Build the output strings
|
||||
sprintf( (char *)ubOutputString, "{ %ld } Assertion Failure [Line %d in %s]\n", GetTickCount(), uiLineNum, pSourceFile );
|
||||
sprintf( ubOutputString, "{ %ld } Assertion Failure [Line %d in %s]\n", GetTickCount(), uiLineNum, pSourceFile );
|
||||
if( pString )
|
||||
sprintf( (char *)gubAssertString, (const char *)pString );
|
||||
sprintf( gubAssertString, pString );
|
||||
else
|
||||
sprintf( (char *)gubAssertString, "" );
|
||||
sprintf( gubAssertString, "" );
|
||||
|
||||
//Output to debugger
|
||||
if (gfRecordToDebugger)
|
||||
OutputDebugString( (LPCSTR)ubOutputString );
|
||||
OutputDebugString( ubOutputString );
|
||||
|
||||
//Record to file if required
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
@@ -536,7 +524,7 @@ void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
{
|
||||
if ((DebugFile = fopen( gpcDebugLogFileName, "a+t" )) != NULL)
|
||||
{
|
||||
fputs( (const char *)ubOutputString, DebugFile );
|
||||
fputs( ubOutputString, DebugFile );
|
||||
fclose( DebugFile );
|
||||
}
|
||||
}
|
||||
@@ -555,7 +543,7 @@ void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
//NASTY HACK, THE GAME IS GOING TO DIE ANYWAY, SO WHO CARES WHAT WE DO.
|
||||
//This will actually bring up a screen that prints out the assert message
|
||||
//until the user hits esc or alt-x.
|
||||
sprintf( (char *)gubErrorText, "Assertion Failure -- Line %d in %s", uiLineNum, pSourceFile );
|
||||
sprintf( gubErrorText, "Assertion Failure -- Line %d in %s", uiLineNum, pSourceFile );
|
||||
SetPendingNewScreen( ERROR_SCREEN );
|
||||
SetCurrentScreen( ERROR_SCREEN );
|
||||
while (gfProgramIsRunning)
|
||||
@@ -582,9 +570,9 @@ void _FailMessage( type1 pString, UINT32 uiLineNum, type2 pSourceFile )
|
||||
|
||||
#else //NOT JAGGED ALLIANCE 2
|
||||
|
||||
void _FailMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
|
||||
void _FailMessage(STR8 pString, UINT32 uiLineNum, STR8 pSourceFile)
|
||||
{
|
||||
UINT8 ubOutputString[512];
|
||||
CHAR8 ubOutputString[512];
|
||||
BOOLEAN fDone = FALSE;
|
||||
|
||||
#ifndef _NO_DEBUG_TXT
|
||||
@@ -632,7 +620,7 @@ void DbgShutdown(void) {};
|
||||
|
||||
// This is NOT a _DEBUG only function! It is also needed in
|
||||
// release mode builds. -- DB
|
||||
UINT8 *String(const char *String, ...)
|
||||
STR8 String(const STR8 String, ...)
|
||||
{
|
||||
|
||||
va_list ArgPtr;
|
||||
@@ -647,7 +635,7 @@ UINT8 *String(const char *String, ...)
|
||||
}
|
||||
|
||||
va_start(ArgPtr, String);
|
||||
vsprintf((char *) gbTmpDebugString[usIndex], String, ArgPtr);
|
||||
vsprintf( gbTmpDebugString[usIndex], String, ArgPtr);
|
||||
va_end(ArgPtr);
|
||||
|
||||
return gbTmpDebugString[usIndex];
|
||||
|
||||
@@ -975,10 +975,10 @@ BOOLEAN LoadBucket( CHAR cFirstLetter )
|
||||
|
||||
CHECKF(uiNumEntries);
|
||||
|
||||
gdb.bucket.pstrFilenames = (CHAR *)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
gdb.bucket.pstrFilenames = (STR8)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
CHECKF(gdb.bucket.pstrFilenames);
|
||||
|
||||
gdb.bucket.pstrDatabasenames = (CHAR *)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
gdb.bucket.pstrDatabasenames = (STR8)MemAlloc( uiNumEntries * FILENAME_LENGTH);
|
||||
if ( !gdb.bucket.pstrDatabasenames )
|
||||
{
|
||||
MemFree(gdb.bucket.pstrFilenames);
|
||||
|
||||
@@ -20,7 +20,7 @@ void DirectXZeroMem ( void* pMemory, int nSize )
|
||||
}
|
||||
|
||||
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, char *szFilename )
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, STR8 szFilename )
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if ( iErrorCode != DD_OK )
|
||||
@@ -31,7 +31,7 @@ void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, char *szFilename )
|
||||
#endif
|
||||
}
|
||||
|
||||
char* DirectXErrorDescription ( INT32 iDXReturn )
|
||||
STR8 DirectXErrorDescription ( INT32 iDXReturn )
|
||||
{
|
||||
switch( iDXReturn )
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// local functions
|
||||
char* DirectXErrorDescription ( INT32 iDXReturn );
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, char *szFilename );
|
||||
void DirectXAssert ( BOOLEAN fValue, INT32 nLine, char *szFilename );
|
||||
STR8 DirectXErrorDescription ( INT32 iDXReturn );
|
||||
void DirectXAttempt ( INT32 iErrorCode, INT32 nLine, STR8 szFilename );
|
||||
void DirectXAssert ( BOOLEAN fValue, INT32 nLine, STR8 szFilename );
|
||||
void DirectXZeroMem ( void* pMemory, int nSize );
|
||||
|
||||
#undef ATTEMPT
|
||||
|
||||
@@ -42,13 +42,13 @@ const int StackColumns = 8; // Number of columns in stack dump.
|
||||
|
||||
|
||||
//ppp
|
||||
void ErrorLog(HWFILE LogFile, char* Format, ...);
|
||||
void ErrorLog(HWFILE LogFile, STR8 Format, ...);
|
||||
STR GetExceptionString( DWORD uiExceptionCode );
|
||||
void DisplayRegisters( HWFILE hFile, CONTEXT *pContext );
|
||||
BOOLEAN GetAndDisplayModuleAndSystemInfo( HWFILE hFile, CONTEXT *pContext );
|
||||
BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext );
|
||||
void RecordModuleList(HWFILE hFile );
|
||||
void PrintTime(char *output, FILETIME TimeToPrint);
|
||||
void PrintTime(STR8 output, FILETIME TimeToPrint);
|
||||
static void ShowModuleInfo(HWFILE hFile, HINSTANCE ModuleHandle);
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ INT32 RecordExceptionInfo( EXCEPTION_POINTERS *pExceptInfo )
|
||||
|
||||
|
||||
|
||||
void ErrorLog( HWFILE hFile, char* Format, ...)
|
||||
void ErrorLog( HWFILE hFile, STR8 Format, ...)
|
||||
{
|
||||
char buffer[2000]; // wvsprintf never prints more than one K.
|
||||
UINT32 uiNumBytesWritten=0;
|
||||
@@ -359,8 +359,8 @@ BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext )
|
||||
int Count = 0;
|
||||
char buffer[1000] = "";
|
||||
const int safetyzone = 50;
|
||||
char* nearend = buffer + sizeof(buffer) - safetyzone;
|
||||
char* output = buffer;
|
||||
STR8 nearend = buffer + sizeof(buffer) - safetyzone;
|
||||
STR8 output = buffer;
|
||||
|
||||
// Time to print part or all of the stack to the error log. This allows
|
||||
// us to figure out the call stack, parameters, local variables, etc.
|
||||
@@ -391,7 +391,7 @@ BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext )
|
||||
|
||||
while (pStack + 1 <= pStackTop)
|
||||
{
|
||||
char *Suffix = " ";
|
||||
STR8 Suffix = " ";
|
||||
|
||||
if ((Count % StackColumns) == 0)
|
||||
output += wsprintf(output, "%08x: ", pStack);
|
||||
@@ -428,7 +428,7 @@ BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext )
|
||||
// Print the specified FILETIME to output in a human readable format,
|
||||
// without using the C run time.
|
||||
|
||||
void PrintTime(char *output, FILETIME TimeToPrint)
|
||||
void PrintTime(STR8 output, FILETIME TimeToPrint)
|
||||
{
|
||||
WORD Date, Time;
|
||||
if (FileTimeToLocalFileTime(&TimeToPrint, &TimeToPrint) &&
|
||||
@@ -521,7 +521,7 @@ static void ShowModuleInfo(HWFILE hFile, HINSTANCE ModuleHandle)
|
||||
IMAGE_DOS_HEADER *DosHeader = (IMAGE_DOS_HEADER*)ModuleHandle;
|
||||
if (IMAGE_DOS_SIGNATURE != DosHeader->e_magic)
|
||||
return;
|
||||
IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((char *)DosHeader
|
||||
IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((STR8 )DosHeader
|
||||
+ DosHeader->e_lfanew);
|
||||
if (IMAGE_NT_SIGNATURE != NTHeader->Signature)
|
||||
return;
|
||||
|
||||
@@ -232,7 +232,7 @@ BOOLEAN FileExists( STR strFilename )
|
||||
{
|
||||
// First check to see if it's in a library (most files should be there)
|
||||
if ( gFileDataBase.fInitialized &&
|
||||
CheckIfFileExistInLibrary( (STR) strFilename ) ) return TRUE;
|
||||
CheckIfFileExistInLibrary( strFilename ) ) return TRUE;
|
||||
|
||||
// ... then check if it's in the custom Data directory
|
||||
if ( gCustomDataCat.FindFile(strFilename) ) return TRUE;
|
||||
@@ -427,7 +427,7 @@ HWFILE FileOpen( STR strFilename, UINT32 uiOptions, BOOLEAN fDeleteOnClose )
|
||||
else
|
||||
{
|
||||
//If the file is in the library, get a handle to it.
|
||||
hLibFile = OpenFileFromLibrary( (STR) strFilename );
|
||||
hLibFile = OpenFileFromLibrary( strFilename );
|
||||
|
||||
//tried to open a file that wasnt in the database
|
||||
if( !hLibFile )
|
||||
@@ -777,9 +777,9 @@ BOOLEAN FileLoad( STR strFilename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiB
|
||||
// 9 Feb 98 DEF - modified to work with the library system
|
||||
//
|
||||
//**************************************************************************
|
||||
BOOLEAN _cdecl FilePrintf( HWFILE hFile, char * strFormatted, ... )
|
||||
BOOLEAN _cdecl FilePrintf( HWFILE hFile, STR8 strFormatted, ... )
|
||||
{
|
||||
UINT8 strToSend[80];
|
||||
CHAR8 strToSend[80];
|
||||
va_list argptr;
|
||||
BOOLEAN fRetVal = FALSE;
|
||||
|
||||
@@ -792,7 +792,7 @@ BOOLEAN _cdecl FilePrintf( HWFILE hFile, char * strFormatted, ... )
|
||||
if( sLibraryID == REAL_FILE_LIBRARY_ID )
|
||||
{
|
||||
va_start(argptr, strFormatted);
|
||||
vsprintf( (char *)strToSend, (char *)strFormatted, argptr );
|
||||
vsprintf( strToSend, strFormatted, argptr );
|
||||
va_end(argptr);
|
||||
|
||||
fRetVal = FileWrite( hFile, strToSend, strlen(strToSend), NULL );
|
||||
@@ -1226,7 +1226,7 @@ void BuildFileDirectory( void )
|
||||
//
|
||||
gfs.uiNumFilesInDirectory = iNumFiles;
|
||||
|
||||
gfs.pcFileNames = (CHAR *)MemAlloc( iNumFiles * FILENAME_LENGTH );
|
||||
gfs.pcFileNames = (STR8)MemAlloc( iNumFiles * FILENAME_LENGTH );
|
||||
|
||||
if ( gfs.pcFileNames )
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ extern BOOLEAN FileRead( HWFILE hFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *
|
||||
extern BOOLEAN FileWrite( HWFILE hFile, PTR pDest, UINT32 uiBytesToWrite, UINT32 *puiBytesWritten );
|
||||
extern BOOLEAN FileLoad( STR filename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead );
|
||||
|
||||
extern BOOLEAN _cdecl FilePrintf( HWFILE hFile, char * strFormatted, ... );
|
||||
extern BOOLEAN _cdecl FilePrintf( HWFILE hFile, STR8 strFormatted, ... );
|
||||
|
||||
extern BOOLEAN FileSeek( HWFILE, UINT32 uiDistance, UINT8 uiHow );
|
||||
extern INT32 FileGetPos( HWFILE );
|
||||
|
||||
@@ -333,10 +333,7 @@ int count;
|
||||
// This function returns (-1) if it fails, and debug msgs for a reason.
|
||||
// Otherwise the font number is returned.
|
||||
//*****************************************************************************
|
||||
template INT32 LoadFontFile<char *>(char *);
|
||||
template INT32 LoadFontFile<char const *>(char const *);
|
||||
template <typename string1>
|
||||
INT32 LoadFontFile(string1 filename)
|
||||
INT32 LoadFontFile(const STR8 filename)
|
||||
{
|
||||
VOBJECT_DESC vo_desc;
|
||||
UINT32 LoadIndex;
|
||||
@@ -419,10 +416,10 @@ UINT32 GetWidth(HVOBJECT hSrcVObject, INT16 ssIndex)
|
||||
// evaluate to is 512.
|
||||
// 'uiCharCount' specifies how many characters of the string are counted.
|
||||
//*****************************************************************************
|
||||
INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, wchar_t *pFontString, ...)
|
||||
INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
@@ -457,12 +454,12 @@ wchar_t string[512];
|
||||
// 'uiCharCount' specifies how many characters of the string are counted.
|
||||
// YOU HAVE TO PREBUILD THE FAST HELP STRING!
|
||||
//*****************************************************************************
|
||||
INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, wchar_t *pFontString )
|
||||
INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, STR16 pFontString )
|
||||
{
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 i, index;
|
||||
INT16 sBoldDiff = 0;
|
||||
wchar_t str[2];
|
||||
CHAR16 str[2];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
@@ -518,10 +515,11 @@ INT16 StringPixLengthArgFastHelp(INT32 usUseFont, INT32 usBoldFont, UINT32 uiCha
|
||||
// Created on: 12/1/99
|
||||
//
|
||||
//*****************************************************************************************
|
||||
INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont)
|
||||
INT16 StringNPixLength(STR16 string, UINT32 uiMaxCount, INT32 UseFont)
|
||||
{
|
||||
UINT32 Cur, uiCharCount;
|
||||
wchar_t *curletter,transletter;
|
||||
STR16 curletter;
|
||||
UINT16 transletter;
|
||||
|
||||
Cur = 0;
|
||||
uiCharCount = 0;
|
||||
@@ -543,11 +541,7 @@ INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont)
|
||||
// Returns the length of a string in pixels, depending on the font given.
|
||||
//
|
||||
//*****************************************************************************
|
||||
template INT16 StringPixLength<short *>(short *, INT32);
|
||||
template INT16 StringPixLength<unsigned short const *>(unsigned short const *, INT32);
|
||||
template INT16 StringPixLength<wchar_t const *>(wchar_t const *, INT32);
|
||||
template <typename type1>
|
||||
INT16 StringPixLength(type1 string, INT32 UseFont)
|
||||
INT16 StringPixLength(const STR16 string, INT32 UseFont)
|
||||
{
|
||||
UINT32 Cur;
|
||||
UINT16 *curletter,transletter;
|
||||
@@ -657,7 +651,7 @@ UINT16 GetFontHeight(INT32 FontNum)
|
||||
// CreateEnglishTransTable()
|
||||
//
|
||||
//*****************************************************************************
|
||||
INT16 GetIndex(UINT16 siChar)
|
||||
INT16 GetIndex(CHAR16 siChar)
|
||||
{
|
||||
UINT16 *pTrav;
|
||||
UINT16 ssCount=0;
|
||||
@@ -731,25 +725,19 @@ BOOLEAN SetFontDestBuffer(UINT32 DestBuffer, INT32 x1, INT32 y1, INT32 x2, INT32
|
||||
// the parameters are identical to printf. The resulting string may be no longer
|
||||
// than 512 word-characters. Uses monochrome font color settings
|
||||
//*****************************************************************************
|
||||
template UINT32 mprintf<wchar_t *>(INT32, INT32, wchar_t *, ...);
|
||||
template UINT32 mprintf<wchar_t const *>(INT32, INT32, wchar_t const *, ...);
|
||||
template UINT32 mprintf<short *>(INT32, INT32, short *, ...);
|
||||
template UINT32 mprintf<unsigned short *>(INT32, INT32, unsigned short *, ...);
|
||||
template UINT32 mprintf<unsigned short const *>(INT32, INT32, unsigned short const *, ...);
|
||||
template <typename type3>
|
||||
UINT32 mprintf(INT32 x, INT32 y, type3 pFontString, ...)
|
||||
UINT32 mprintf(INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
curletter=string;
|
||||
@@ -788,49 +776,31 @@ UINT8 *pDestBuf;
|
||||
return(0);
|
||||
}
|
||||
|
||||
template void VarFindFontRightCoordinates<short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, short *, ...);
|
||||
template void VarFindFontRightCoordinates<unsigned short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, unsigned short *, ...);
|
||||
template void VarFindFontRightCoordinates<wchar_t *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t *, ...);
|
||||
template void VarFindFontRightCoordinates<wchar_t const *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t const *, ...);
|
||||
template <typename type8>
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... )
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... )
|
||||
{
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
FindFontRightCoordinates( sLeft, sTop, sWidth, sHeight, string, iFontIndex, psNewX, psNewY );
|
||||
}
|
||||
|
||||
template void VarFindFontCenterCoordinates<wchar_t *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t *, ...);
|
||||
template void VarFindFontCenterCoordinates<wchar_t const *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, wchar_t const*, ...);
|
||||
template void VarFindFontCenterCoordinates<short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, short *, ...);
|
||||
template void VarFindFontCenterCoordinates<unsigned short *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, unsigned short *, ...);
|
||||
template void VarFindFontCenterCoordinates<unsigned short const *>(INT16, INT16, INT16, INT16, INT32, INT16 *, INT16 *, unsigned short const*, ...);
|
||||
template <typename type8>
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... )
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... )
|
||||
{
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
FindFontCenterCoordinates( sLeft, sTop, sWidth, sHeight, string, iFontIndex, psNewX, psNewY );
|
||||
}
|
||||
|
||||
template void FindFontRightCoordinates<wchar_t *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, unsigned short *, unsigned short *);
|
||||
template void FindFontRightCoordinates<short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, short *, INT32, unsigned short *, unsigned short *);
|
||||
template void FindFontRightCoordinates<short *, short *, unsigned short *>(INT16, INT16, INT16, INT16, short *, INT32, short *, unsigned short *);
|
||||
template void FindFontRightCoordinates<unsigned short *, short *, short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, short *, short *);
|
||||
template void FindFontRightCoordinates<unsigned short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, unsigned short *, unsigned short *);
|
||||
template void FindFontRightCoordinates<wchar_t *, wchar_t *, wchar_t *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, wchar_t *, wchar_t *);
|
||||
template <typename string5, typename string7, typename string8>
|
||||
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, string5 pStr, INT32 iFontIndex, string7 psNewX, string8 psNewY )
|
||||
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY )
|
||||
{
|
||||
INT16 xp,yp;
|
||||
|
||||
@@ -842,14 +812,7 @@ void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHei
|
||||
*psNewY = yp;
|
||||
}
|
||||
|
||||
template void FindFontCenterCoordinates<wchar_t *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, unsigned short *, unsigned short *);
|
||||
template void FindFontCenterCoordinates<short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, short *, INT32, unsigned short *, unsigned short *);
|
||||
template void FindFontCenterCoordinates<unsigned short *, unsigned short *, unsigned short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, unsigned short *, unsigned short *);
|
||||
template void FindFontCenterCoordinates<unsigned short *, short *, short *>(INT16, INT16, INT16, INT16, unsigned short *, INT32, short *, short *);
|
||||
template void FindFontCenterCoordinates<short *, short *, short *>(INT16, INT16, INT16, INT16, short *, INT32, short *, short *);
|
||||
template void FindFontCenterCoordinates<wchar_t *, wchar_t *, wchar_t *>(INT16, INT16, INT16, INT16, wchar_t *, INT32, wchar_t *, wchar_t *);
|
||||
template <typename string5, typename string7, typename string8>
|
||||
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, string5 pStr, INT32 iFontIndex, string7 psNewX, string8 psNewY )
|
||||
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY )
|
||||
{
|
||||
INT16 xp,yp;
|
||||
|
||||
@@ -869,12 +832,12 @@ void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHe
|
||||
// the parameters are identical to printf. The resulting string may be no longer
|
||||
// than 512 word-characters.
|
||||
//*****************************************************************************
|
||||
UINT32 gprintf(INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 gprintf(INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
@@ -920,12 +883,12 @@ UINT8 *pDestBuf;
|
||||
return(0);
|
||||
}
|
||||
|
||||
UINT32 gprintfDirty(INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 gprintfDirty(INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
@@ -989,12 +952,12 @@ UINT8 *pDestBuf;
|
||||
// the parameters are identical to printf. The resulting string may be no longer
|
||||
// than 512 word-characters.
|
||||
//*****************************************************************************
|
||||
UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
@@ -1033,23 +996,17 @@ wchar_t string[512];
|
||||
return(0);
|
||||
}
|
||||
|
||||
template UINT32 mprintf_buffer<short *>(UINT8 *, UINT32, UINT32, INT32, INT32, short *, ...);
|
||||
template UINT32 mprintf_buffer<unsigned short *>(UINT8 *, UINT32, UINT32, INT32, INT32, unsigned short *, ...);
|
||||
template UINT32 mprintf_buffer<unsigned short const*>(UINT8 *, UINT32, UINT32, INT32, INT32, unsigned short const*, ...);
|
||||
template UINT32 mprintf_buffer<wchar_t *>(UINT8 *, UINT32, UINT32, INT32, INT32, wchar_t *, ...);
|
||||
template UINT32 mprintf_buffer<wchar_t const*>(UINT8 *, UINT32, UINT32, INT32, INT32, wchar_t const*, ...);
|
||||
template <typename string6>
|
||||
UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...)
|
||||
UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
curletter=string;
|
||||
@@ -1082,20 +1039,18 @@ wchar_t string[512];
|
||||
return(0);
|
||||
}
|
||||
|
||||
template UINT32 mprintf_buffer_coded<short *>(UINT8 *, UINT32, UINT32, INT32, INT32, short *, ...);
|
||||
template <typename string6>
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...)
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT16 usOldForeColor;
|
||||
|
||||
Assert(pFontString!=NULL);
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf((wchar_t *)string, (wchar_t *)pFontString, argptr); // process gprintf string (get output str)
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
curletter=string;
|
||||
@@ -1144,12 +1099,12 @@ UINT16 usOldForeColor;
|
||||
}
|
||||
|
||||
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, const STR16 pFontString, ...)
|
||||
{
|
||||
INT32 destx, desty;
|
||||
wchar_t *curletter, transletter;
|
||||
CHAR16 *curletter, transletter;
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
UINT16 usOldForeColor;
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
|
||||
@@ -123,28 +123,24 @@ UINT16 *GetFontObjectPalette16BPP(INT32 iFont);
|
||||
void DestroyEnglishTransTable( void );
|
||||
|
||||
extern HVOBJECT GetFontObject(INT32 iFont);
|
||||
extern UINT32 gprintf(INT32 x, INT32 y, wchar_t *pFontString, ...);
|
||||
extern UINT32 gprintfDirty(INT32 x, INT32 y, wchar_t *pFontString, ...);
|
||||
template <typename type3>
|
||||
extern UINT32 mprintf(INT32 x, INT32 y, type3 pFontString, ...);
|
||||
extern UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, wchar_t *pFontString, ...);
|
||||
template <typename string6>
|
||||
extern UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...);
|
||||
extern UINT32 gprintf(INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 gprintfDirty(INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 mprintf(INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 gprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
extern UINT32 mprintf_buffer( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
|
||||
// Function for displaying coded test. Since it's slower to do this, it's separate from the normal fuctions
|
||||
#define FONT_CODE_BEGINCOLOR 180
|
||||
#define FONT_CODE_RESETCOLOR 181
|
||||
|
||||
template <typename string6>
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, string6 pFontString, ...);
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, wchar_t *pFontString, ...);
|
||||
UINT32 mprintf_buffer_coded( UINT8 *pDestBuf, UINT32 uiDestPitchBYTES, UINT32 FontType, INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
UINT32 mprintf_coded( INT32 x, INT32 y, const STR16 pFontString, ...);
|
||||
|
||||
|
||||
extern BOOLEAN SetFontDestBuffer(UINT32 DestBuffer, INT32 x1, INT32 y1, INT32 x2, INT32 y2, BOOLEAN wrap);
|
||||
extern BOOLEAN SetFont(INT32 iFontIndex);
|
||||
|
||||
template <typename string1>
|
||||
extern INT32 LoadFontFile(string1 pFileName);
|
||||
extern INT32 LoadFontFile(const STR8 pFileName);
|
||||
extern UINT16 GetFontHeight(INT32 FontNum);
|
||||
extern BOOLEAN InitializeFontManager(UINT16 usDefaultPixDepth, FontTranslationTable *pTransTable);
|
||||
extern void ShutdownFontManager(void);
|
||||
@@ -152,37 +148,32 @@ extern void UnloadFont(UINT32 FontIndex);
|
||||
|
||||
extern FontTranslationTable *CreateEnglishTransTable( );
|
||||
|
||||
extern INT16 GetIndex(UINT16 siChar);
|
||||
extern INT16 GetIndex(CHAR16 siChar);
|
||||
extern UINT32 GetWidth(HVOBJECT hSrcVObject, INT16 ssIndex);
|
||||
|
||||
extern INT16 StringPixLengthArgFastHelp( INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, wchar_t *pFontString );
|
||||
extern INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, wchar_t *pFontString, ...);
|
||||
template <typename type1>
|
||||
extern INT16 StringPixLength(type1 string,INT32 UseFont);
|
||||
extern INT16 StringPixLengthArgFastHelp( INT32 usUseFont, INT32 usBoldFont, UINT32 uiCharCount, STR16 pFontString );
|
||||
extern INT16 StringPixLengthArg(INT32 usUseFont, UINT32 uiCharCount, STR16 pFontString, ...);
|
||||
extern INT16 StringPixLength(const STR16 string,INT32 UseFont);
|
||||
|
||||
extern INT16 StringNPixLength(wchar_t *string, UINT32 uiMaxCount, INT32 UseFont);
|
||||
extern INT16 StringNPixLength(STR16 string, UINT32 uiMaxCount, INT32 UseFont);
|
||||
extern void SaveFontSettings(void);
|
||||
extern void RestoreFontSettings(void);
|
||||
|
||||
template <typename type8>
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... );
|
||||
void VarFindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... );
|
||||
|
||||
template <typename type8>
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, type8 pFontString, ... );
|
||||
void VarFindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY, const STR16 pFontString, ... );
|
||||
|
||||
template <typename string5, typename string7, typename string8>
|
||||
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, string5 pStr, INT32 iFontIndex, string7 psNewX, string8 psNewY );
|
||||
void FindFontRightCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY );
|
||||
|
||||
template <typename string5, typename string7, typename string8>
|
||||
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, string5 pStr, INT32 iFontIndex, string7 psNewX, string8 psNewY );
|
||||
void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, const STR16 pStr, INT32 iFontIndex, INT16 *psNewX, INT16 *psNewY );
|
||||
|
||||
//extern FontBase *LoadFontFile(UINT8 *pFileName);
|
||||
//extern UINT8 *GetFontPalette(UINT8 *pFileName);
|
||||
//extern FontBase *LoadFontFile(CHAR8 *pFileName);
|
||||
//extern UINT8 *GetFontPalette(CHAR8 *pFileName);
|
||||
//extern UINT16 GetMaxFontWidth(FontBase *pBase);
|
||||
//extern void UnloadFont(FontBase *pBase);
|
||||
//extern BOOLEAN SetFontPalette(FontBase *pFont, UINT16 siDepthPix, SGPPaletteEntry *pNewPalette);
|
||||
// make sure the pFontString is terminated by 0
|
||||
//extern BOOLEAN PrintFontString(UINT16 *pFontString, UINT8 *pDestBuffer, UINT16 siDestWidth, UINT16 siDestPixelDepth, UINT16 siDestPitch, UINT16 siDestHeight, UINT16 siX, UINT16 siY, UINT16 siTotalWidth, UINT16 siTotalHeight, BOOLEAN MultiLine, FontBase *pFontBase);
|
||||
//extern BOOLEAN PrintFontString(STR16 pFontString, UINT8 *pDestBuffer, UINT16 siDestWidth, UINT16 siDestPixelDepth, UINT16 siDestPitch, UINT16 siDestHeight, UINT16 siX, UINT16 siY, UINT16 siTotalWidth, UINT16 siTotalHeight, BOOLEAN MultiLine, FontBase *pFontBase);
|
||||
//extern BOOLEAN SetFont16BitData(FontBase *pFontBase, UINT16 *pData16);
|
||||
|
||||
/*
|
||||
|
||||
@@ -539,7 +539,7 @@ BOOLEAN GetFileHeaderFromLibrary( INT16 sLibraryID, STR pstrFileName, FileHeader
|
||||
gsCurrentLibrary = sLibraryID;
|
||||
|
||||
/* try to find the filename using a binary search algorithm: */
|
||||
ppFileHeader = (FileHeaderStruct **) bsearch( (char *) &sFileNameWithPath, (FileHeaderStruct *) gFileDataBase.pLibraries[ sLibraryID ].pFileHeader, gFileDataBase.pLibraries[ sLibraryID ].usNumberOfEntries,
|
||||
ppFileHeader = (FileHeaderStruct **) bsearch( &sFileNameWithPath, (FileHeaderStruct *) gFileDataBase.pLibraries[ sLibraryID ].pFileHeader, gFileDataBase.pLibraries[ sLibraryID ].usNumberOfEntries,
|
||||
sizeof( FileHeaderStruct ), (int (*)(const void*, const void*))CompareFileNames );
|
||||
|
||||
if( ppFileHeader )
|
||||
|
||||
@@ -240,7 +240,7 @@ void ShutdownMemoryManager( void )
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
PTR MemAllocReal( UINT32 uiSize, const char *pcFile, INT32 iLine )
|
||||
PTR MemAllocReal( UINT32 uiSize, const STR8 pcFile, INT32 iLine )
|
||||
{
|
||||
PTR ptr;
|
||||
|
||||
@@ -273,7 +273,7 @@ PTR MemAllocReal( UINT32 uiSize, const char *pcFile, INT32 iLine )
|
||||
}
|
||||
|
||||
|
||||
void MemFreeReal( PTR ptr, const char *pcFile, INT32 iLine )
|
||||
void MemFreeReal( PTR ptr, const STR8 pcFile, INT32 iLine )
|
||||
{
|
||||
UINT32 uiSize;
|
||||
|
||||
@@ -303,7 +303,7 @@ void MemFreeReal( PTR ptr, const char *pcFile, INT32 iLine )
|
||||
}
|
||||
|
||||
|
||||
PTR MemReallocReal( PTR ptr, UINT32 uiSize, const char *pcFile, INT32 iLine )
|
||||
PTR MemReallocReal( PTR ptr, UINT32 uiSize, const STR8 pcFile, INT32 iLine )
|
||||
{
|
||||
PTR ptrNew;
|
||||
UINT32 uiOldSize;
|
||||
@@ -491,7 +491,7 @@ BOOLEAN MemCheckPool( void )
|
||||
|
||||
#ifdef EXTREME_MEMORY_DEBUGGING
|
||||
|
||||
PTR MemAllocXDebug( UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
PTR MemAllocXDebug( UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
{
|
||||
PTR ptr;
|
||||
UINT16 usLength;
|
||||
@@ -552,7 +552,7 @@ PTR MemAllocXDebug( UINT32 size, const char *szCodeString, INT32 iLineNum, void
|
||||
return( ptr );
|
||||
}
|
||||
|
||||
void MemFreeXDebug( PTR ptr, const char *szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
void MemFreeXDebug( PTR ptr, const STR8 szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
{
|
||||
MEMORY_NODE *curr;
|
||||
|
||||
@@ -597,7 +597,7 @@ void MemFreeXDebug( PTR ptr, const char *szCodeString, INT32 iLineNum, void *pSp
|
||||
}
|
||||
}
|
||||
|
||||
PTR MemReallocXDebug( PTR ptr, UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
PTR MemReallocXDebug( PTR ptr, UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial )
|
||||
{
|
||||
MEMORY_NODE *curr;
|
||||
PTR ptrNew;
|
||||
|
||||
@@ -63,9 +63,9 @@ extern void ShutdownMemoryManager( void );
|
||||
#define MemAlloc( size ) MemAllocXDebug( (size), __FILE__, __LINE__, NULL )
|
||||
#define MemFree( ptr ) MemFreeXDebug( (ptr), __FILE__, __LINE__, NULL )
|
||||
#define MemRealloc( ptr, size ) MemReallocXDebug( (ptr), (size), __FILE__, __LINE__, NULL )
|
||||
extern PTR MemAllocXDebug( UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern void MemFreeXDebug( PTR ptr, const char *szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern PTR MemReallocXDebug( PTR ptr, UINT32 size, const char *szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern PTR MemAllocXDebug( UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern void MemFreeXDebug( PTR ptr, const STR8 szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
extern PTR MemReallocXDebug( PTR ptr, UINT32 size, const STR8 szCodeString, INT32 iLineNum, void *pSpecial );
|
||||
#else
|
||||
#ifdef _DEBUG
|
||||
//This is another debug feature. Not as sophistocated, but definately not the pig the extreme system is.
|
||||
@@ -73,9 +73,9 @@ extern void ShutdownMemoryManager( void );
|
||||
#define MemAlloc( size ) MemAllocReal( (size), __FILE__, __LINE__ )
|
||||
#define MemFree( ptr ) MemFreeReal( (ptr), __FILE__, __LINE__ )
|
||||
#define MemRealloc( ptr, size ) MemReallocReal( (ptr), (size), __FILE__, __LINE__ )
|
||||
extern PTR MemAllocReal( UINT32 size, const char *, INT32 );
|
||||
extern void MemFreeReal( PTR ptr, const char *, INT32 );
|
||||
extern PTR MemReallocReal( PTR ptr, UINT32 size, const char *, INT32 );
|
||||
extern PTR MemAllocReal( UINT32 size, const STR8 , INT32 );
|
||||
extern void MemFreeReal( PTR ptr, const STR8 , INT32 );
|
||||
extern PTR MemReallocReal( PTR ptr, UINT32 size, const STR8 , INT32 );
|
||||
#else
|
||||
//Release build verison
|
||||
#include <malloc.h>
|
||||
|
||||
@@ -103,7 +103,7 @@ BOOLEAN DeleteMutex(UINT32 uiMutexIndex)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
switch (WaitForSingleObject(MutexTable[uiMutexIndex], INFINITE))
|
||||
{
|
||||
@@ -118,7 +118,7 @@ BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
switch (WaitForSingleObject(MutexTable[uiMutexIndex], uiTimeout))
|
||||
{
|
||||
@@ -132,7 +132,7 @@ BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
if (ReleaseMutex(MutexTable[uiMutexIndex]) == FALSE)
|
||||
{
|
||||
@@ -201,19 +201,19 @@ BOOLEAN DeleteMutex(UINT32 uiMutexIndex)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
EnterCriticalSection(&MutexTable[uiMutexIndex]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, char *szFilename)
|
||||
BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
EnterCriticalSection(&MutexTable[uiMutexIndex]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename)
|
||||
BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename)
|
||||
{
|
||||
LeaveCriticalSection(&MutexTable[uiMutexIndex]);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ extern BOOLEAN InitializeMutexManager(void);
|
||||
extern void ShutdownMutexManager(void);
|
||||
extern BOOLEAN InitializeMutex(UINT32 uiMutexIndex, UINT8 *ubMutexName);
|
||||
extern BOOLEAN DeleteMutex(UINT32 uiMutexIndex);
|
||||
extern BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename);
|
||||
extern BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, char *szFilename);
|
||||
extern BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, char *szFilename);
|
||||
extern BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename);
|
||||
extern BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename);
|
||||
extern BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename);
|
||||
|
||||
//
|
||||
// Use defines to allocate slots in the mutex manager. Put these defines in LOCAL.H
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
BOOLEAN SetPcxPalette( PcxObject *pCurrentPcxObject, HIMAGE hImage );
|
||||
BOOLEAN BlitPcxToBuffer( PcxObject *pCurrentPcxObject, UINT8 *pBuffer, UINT16 usBufferWidth, UINT16 usBufferHeight, UINT16 usX, UINT16 usY, BOOLEAN fTransp);
|
||||
PcxObject *LoadPcx(UINT8 *pFilename);
|
||||
PcxObject *LoadPcx(STR8 pFilename);
|
||||
|
||||
|
||||
BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents )
|
||||
@@ -38,7 +38,7 @@ BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents )
|
||||
PcxObject *pPcxObject;
|
||||
|
||||
// First Load a PCX Image
|
||||
pPcxObject = LoadPcx( (UINT8 *)hImage->ImageFile );
|
||||
pPcxObject = LoadPcx( hImage->ImageFile );
|
||||
|
||||
if ( pPcxObject == NULL )
|
||||
{
|
||||
@@ -81,7 +81,7 @@ BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents )
|
||||
}
|
||||
|
||||
|
||||
PcxObject *LoadPcx(UINT8 *pFilename)
|
||||
PcxObject *LoadPcx(STR8 pFilename)
|
||||
{
|
||||
PcxHeader Header;
|
||||
PcxObject *pCurrentPcxObject;
|
||||
@@ -90,7 +90,7 @@ PcxObject *LoadPcx(UINT8 *pFilename)
|
||||
UINT8 *pPcxBuffer;
|
||||
|
||||
// Open and read in the file
|
||||
if ((hFileHandle = FileOpen((STR)pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE)) == 0)
|
||||
if ((hFileHandle = FileOpen(pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE)) == 0)
|
||||
{ // damn we failed to open the file
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -287,11 +287,11 @@ BOOLEAN STCILoadIndexed( HIMAGE hImage, UINT16 fContents, HWFILE hFile, STCIHead
|
||||
if (FileSeek( hFile, pHeader->uiStoredSize, FILE_SEEK_FROM_CURRENT) == FALSE)
|
||||
{
|
||||
DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_3, "Problem seeking past image data!" );
|
||||
FileClose( hFile );
|
||||
FileClose( hFile );
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fContents & IMAGE_APPDATA && pHeader->uiAppDataSize > 0)
|
||||
{
|
||||
// load application-specific data
|
||||
|
||||
@@ -48,11 +48,11 @@ typedef signed short INT16;
|
||||
typedef float FLOAT;
|
||||
typedef double DOUBLE;
|
||||
// strings
|
||||
typedef char CHAR8;
|
||||
typedef char CHAR8;
|
||||
typedef wchar_t CHAR16;
|
||||
typedef char * STR;
|
||||
typedef char * STR8;
|
||||
typedef wchar_t * STR16;
|
||||
typedef CHAR8 * STR;
|
||||
typedef CHAR8 * STR8;
|
||||
typedef CHAR16 * STR16;
|
||||
// flags (individual bits used)
|
||||
typedef unsigned char FLAGS8;
|
||||
typedef unsigned short FLAGS16;
|
||||
|
||||
@@ -47,10 +47,10 @@ HWINFONT WinFonts[ MAX_WIN_FONTS ];
|
||||
void Convert16BitStringTo8BitChineseBig5String( UINT8 *dst, UINT16 *src )
|
||||
{
|
||||
INT32 i, j;
|
||||
char *ptr;
|
||||
STR8 ptr;
|
||||
|
||||
i = j = 0;
|
||||
ptr = (char*)src;
|
||||
ptr = (STR8 )src;
|
||||
while( ptr[j] || ptr[j + 1] )
|
||||
{
|
||||
if( ptr[j] )
|
||||
@@ -108,14 +108,14 @@ HWINFONT *GetWinFont( INT32 iFont )
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t gzFontName[32];
|
||||
CHAR16 gzFontName[32];
|
||||
|
||||
INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
|
||||
INT32 iWeight, BOOLEAN fItalic, BOOLEAN fUnderline, BOOLEAN fStrikeOut, STR16 szFontName, INT32 iCharSet )
|
||||
{
|
||||
INT32 iFont;
|
||||
HFONT hFont;
|
||||
UINT8 szCharFontName[32]; //32 characters including null terminator (matches max font name length)
|
||||
CHAR8 szCharFontName[32]; //32 characters including null terminator (matches max font name length)
|
||||
// Find free slot
|
||||
iFont = FindFreeWinFont( );
|
||||
|
||||
@@ -128,7 +128,7 @@ INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
|
||||
wcscpy( gzFontName, szFontName );
|
||||
|
||||
//ATTEMPT TO LOAD THE FONT NOW
|
||||
sprintf( (char *) szCharFontName, "%S", szFontName );
|
||||
sprintf( szCharFontName, "%S", szFontName );
|
||||
if( DoesWinFontExistOnSystem( szFontName, iCharSet ) )
|
||||
{
|
||||
gLogFont.lfHeight = iHeight;
|
||||
@@ -191,11 +191,11 @@ void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor )
|
||||
}
|
||||
|
||||
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string2[512];
|
||||
char string[512];
|
||||
CHAR16 string2[512];
|
||||
CHAR8 string[512];
|
||||
HVSURFACE hVSurface;
|
||||
LPDIRECTDRAWSURFACE2 pDDSurface;
|
||||
HDC hdc;
|
||||
@@ -240,12 +240,12 @@ void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFo
|
||||
|
||||
}
|
||||
|
||||
INT16 WinFontStringPixLength( wchar_t *string2, INT32 iFont )
|
||||
INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
|
||||
{
|
||||
HWINFONT *pWinFont;
|
||||
HDC hdc;
|
||||
SIZE RectSize;
|
||||
char string[512];
|
||||
CHAR8 string[512];
|
||||
|
||||
pWinFont = GetWinFont( iFont );
|
||||
|
||||
@@ -269,12 +269,12 @@ INT16 WinFontStringPixLength( wchar_t *string2, INT32 iFont )
|
||||
}
|
||||
|
||||
|
||||
INT16 GetWinFontHeight( wchar_t *string2, INT32 iFont )
|
||||
INT16 GetWinFontHeight( STR16 string2, INT32 iFont )
|
||||
{
|
||||
HWINFONT *pWinFont;
|
||||
HDC hdc;
|
||||
SIZE RectSize;
|
||||
char string[512];
|
||||
CHAR8 string[512];
|
||||
|
||||
pWinFont = GetWinFont( iFont );
|
||||
|
||||
@@ -297,10 +297,10 @@ INT16 GetWinFontHeight( wchar_t *string2, INT32 iFont )
|
||||
return( (INT16)RectSize.cy );
|
||||
}
|
||||
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...)
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
wchar_t string[512];
|
||||
CHAR16 string[512];
|
||||
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
@@ -322,10 +322,10 @@ int CALLBACK EnumFontFamProc( CONST LOGFONT *lplf, CONST TEXTMETRIC *lptm, DWO
|
||||
|
||||
int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, int FontType, LPARAM lParam )
|
||||
{
|
||||
UINT8 szFontName[32];
|
||||
CHAR8 szFontName[32];
|
||||
|
||||
sprintf( (char *)szFontName, "%S", gzFontName );
|
||||
if( !strcmp( (const char *) szFontName, (const char *)lpelfe->elfFullName ) )
|
||||
sprintf( szFontName, "%S", gzFontName );
|
||||
if( !strcmp( szFontName, (STR8) lpelfe->elfFullName ) )
|
||||
{
|
||||
gfEnumSucceed = TRUE;
|
||||
memcpy( &gLogFont, &(lpelfe->elfLogFont), sizeof( LOGFONT ) );
|
||||
|
||||
@@ -11,11 +11,11 @@ void DeleteWinFont( INT32 iFont );
|
||||
void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor );
|
||||
void SetWinFontForeColor( INT32 iFont, COLORVAL *pColor );
|
||||
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...);
|
||||
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...);
|
||||
|
||||
INT16 WinFontStringPixLength( wchar_t *string, INT32 iFont );
|
||||
INT16 GetWinFontHeight( wchar_t *string, INT32 iFont );
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, wchar_t *pFontString, ...);
|
||||
INT16 WinFontStringPixLength( STR16 string, INT32 iFont );
|
||||
INT16 GetWinFontHeight( STR16 string, INT32 iFont );
|
||||
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...);
|
||||
|
||||
BOOLEAN DoesWinFontExistOnSystem( STR16 pTypeFaceName, INT32 iCharSet );
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ typedef struct FMUSIC_MODULE FMUSIC_MODULE;
|
||||
/*
|
||||
Callback types
|
||||
*/
|
||||
typedef void * (F_CALLBACKAPI *FSOUND_OPENCALLBACK) (const char *name);
|
||||
typedef void * (F_CALLBACKAPI *FSOUND_OPENCALLBACK) (const STR8 name);
|
||||
typedef void (F_CALLBACKAPI *FSOUND_CLOSECALLBACK) (void *handle);
|
||||
typedef int (F_CALLBACKAPI *FSOUND_READCALLBACK) (void *buffer, int size, void *handle);
|
||||
typedef int (F_CALLBACKAPI *FSOUND_SEEKCALLBACK) (void *handle, int pos, signed char mode);
|
||||
@@ -62,7 +62,7 @@ typedef void (F_CALLBACKAPI *FSOUND_FREECALLBACK) (void *ptr);
|
||||
|
||||
typedef void * (F_CALLBACKAPI *FSOUND_DSPCALLBACK) (void *originalbuffer, void *newbuffer, int length, void *userdata);
|
||||
typedef signed char (F_CALLBACKAPI *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, void *userdata);
|
||||
typedef signed char (F_CALLBACKAPI *FSOUND_METADATACALLBACK)(char *name, char *value, void *userdata);
|
||||
typedef signed char (F_CALLBACKAPI *FSOUND_METADATACALLBACK)(STR8 name, STR8 value, void *userdata);
|
||||
typedef void (F_CALLBACKAPI *FMUSIC_CALLBACK) (FMUSIC_MODULE *mod, unsigned char param);
|
||||
|
||||
|
||||
@@ -831,7 +831,7 @@ DLL_API void * F_API FSOUND_GetOutputHandle();
|
||||
DLL_API int F_API FSOUND_GetDriver();
|
||||
DLL_API int F_API FSOUND_GetMixer();
|
||||
DLL_API int F_API FSOUND_GetNumDrivers();
|
||||
DLL_API const char * F_API FSOUND_GetDriverName(int id);
|
||||
DLL_API const STR8 F_API FSOUND_GetDriverName(int id);
|
||||
DLL_API signed char F_API FSOUND_GetDriverCaps(int id, unsigned int *caps);
|
||||
DLL_API int F_API FSOUND_GetOutputRate();
|
||||
DLL_API int F_API FSOUND_GetMaxChannels();
|
||||
@@ -853,7 +853,7 @@ DLL_API void F_API FSOUND_GetMemoryStats(unsigned int *currentalloced
|
||||
Use FSOUND_LOADRAW flag with FSOUND_Sample_Load to treat as as raw pcm data.
|
||||
*/
|
||||
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const STR8 name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri);
|
||||
DLL_API void F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr);
|
||||
DLL_API signed char F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode);
|
||||
@@ -876,7 +876,7 @@ DLL_API signed char F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr,
|
||||
*/
|
||||
|
||||
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
|
||||
DLL_API const char * F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
|
||||
DLL_API const STR8 F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
|
||||
DLL_API unsigned int F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr);
|
||||
DLL_API signed char F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend);
|
||||
DLL_API signed char F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri);
|
||||
@@ -1000,7 +1000,7 @@ DLL_API signed char F_API FSOUND_FX_SetWavesReverb(int fxid, float InGain, f
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_SetBufferSize(int ms); /* call this before opening streams, not after */
|
||||
|
||||
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Open(const STR8 name_or_data, unsigned int mode, int offset, int length);
|
||||
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, void *userdata);
|
||||
DLL_API signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream);
|
||||
|
||||
@@ -1026,27 +1026,27 @@ DLL_API FSOUND_DSPUNIT * F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream,
|
||||
DLL_API signed char F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata);
|
||||
DLL_API signed char F_API FSOUND_Stream_SetSyncCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata);
|
||||
|
||||
DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_AddSyncPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, const char *name);
|
||||
DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_AddSyncPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, const STR8 name);
|
||||
DLL_API signed char F_API FSOUND_Stream_DeleteSyncPoint(FSOUND_SYNCPOINT *point);
|
||||
DLL_API int F_API FSOUND_Stream_GetNumSyncPoints(FSOUND_STREAM *stream);
|
||||
DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_GetSyncPoint(FSOUND_STREAM *stream, int index);
|
||||
DLL_API char * F_API FSOUND_Stream_GetSyncPointInfo(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset);
|
||||
DLL_API STR8 F_API FSOUND_Stream_GetSyncPointInfo(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset);
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_SetSubStream(FSOUND_STREAM *stream, int index); /* For FMOD .FSB bank files. */
|
||||
DLL_API int F_API FSOUND_Stream_GetNumSubStreams(FSOUND_STREAM *stream); /* For FMOD .FSB bank files. */
|
||||
DLL_API signed char F_API FSOUND_Stream_SetSubStreamSentence(FSOUND_STREAM *stream, const int *sentencelist, int numitems);
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_GetNumTagFields(FSOUND_STREAM *stream, int *num);
|
||||
DLL_API signed char F_API FSOUND_Stream_GetTagField(FSOUND_STREAM *stream, int num, int *type, char **name, void **value, int *length);
|
||||
DLL_API signed char F_API FSOUND_Stream_FindTagField(FSOUND_STREAM *stream, int type, const char *name, void **value, int *length);
|
||||
DLL_API signed char F_API FSOUND_Stream_GetTagField(FSOUND_STREAM *stream, int num, int *type, STR8 *name, void **value, int *length);
|
||||
DLL_API signed char F_API FSOUND_Stream_FindTagField(FSOUND_STREAM *stream, int type, const STR8 name, void **value, int *length);
|
||||
|
||||
/*
|
||||
Internet streaming functions
|
||||
*/
|
||||
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetProxy(const char *proxy);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetProxy(const STR8 proxy);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetTimeout(int timeout);
|
||||
DLL_API char * F_API FSOUND_Stream_Net_GetLastServerStatus();
|
||||
DLL_API STR8 F_API FSOUND_Stream_Net_GetLastServerStatus();
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetBufferProperties(int buffersize, int prebuffer_percent, int rebuffer_percent);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_GetBufferProperties(int *buffersize, int *prebuffer_percent, int *rebuffer_percent);
|
||||
DLL_API signed char F_API FSOUND_Stream_Net_SetMetadataCallback(FSOUND_STREAM *stream, FSOUND_METADATACALLBACK callback, void *userdata);
|
||||
@@ -1137,7 +1137,7 @@ DLL_API signed char F_API FSOUND_Reverb_GetChannelProperties(int channel, FS
|
||||
|
||||
DLL_API signed char F_API FSOUND_Record_SetDriver(int outputtype);
|
||||
DLL_API int F_API FSOUND_Record_GetNumDrivers();
|
||||
DLL_API const char * F_API FSOUND_Record_GetDriverName(int id);
|
||||
DLL_API const STR8 F_API FSOUND_Record_GetDriverName(int id);
|
||||
DLL_API int F_API FSOUND_Record_GetDriver();
|
||||
|
||||
/*
|
||||
@@ -1156,8 +1156,8 @@ DLL_API int F_API FSOUND_Record_GetPosition();
|
||||
Song management / playback functions.
|
||||
*/
|
||||
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name);
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const char *name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum);
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const STR8 name);
|
||||
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const STR8 name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum);
|
||||
DLL_API int F_API FMUSIC_GetOpenState(FMUSIC_MODULE *mod);
|
||||
DLL_API signed char F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod);
|
||||
DLL_API signed char F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod);
|
||||
@@ -1189,7 +1189,7 @@ DLL_API signed char F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float
|
||||
Static song information functions.
|
||||
*/
|
||||
|
||||
DLL_API const char * F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
|
||||
DLL_API const STR8 F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
|
||||
DLL_API int F_API FMUSIC_GetType(FMUSIC_MODULE *mod);
|
||||
DLL_API int F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod);
|
||||
DLL_API int F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _FMOD_ERRORS_H
|
||||
#define _FMOD_ERRORS_H
|
||||
|
||||
static char *FMOD_ErrorString(int errcode)
|
||||
static STR8 FMOD_ErrorString(int errcode)
|
||||
{
|
||||
switch (errcode)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ HIMAGE CreateImage( SGPFILENAME ImageFile, UINT16 fContents )
|
||||
|
||||
// Depending on extension of filename, use different image readers
|
||||
// Get extension
|
||||
StrPtr = strstr( (char *)ImageFile, (const char *)ExtensionSep );
|
||||
StrPtr = strstr( ImageFile, ExtensionSep );
|
||||
|
||||
if ( StrPtr == NULL )
|
||||
{
|
||||
|
||||
@@ -31,14 +31,14 @@ int giClipXMax=0;
|
||||
int giClipYMin=0;
|
||||
int giClipYMax=0;
|
||||
|
||||
void DrawHorizontalRun(char **ScreenPtr, int XAdvance, int RunLength,
|
||||
void DrawHorizontalRun(UINT8 **ScreenPtr, int XAdvance, int RunLength,
|
||||
int Color, int ScreenWidth);
|
||||
void DrawVerticalRun(char **ScreenPtr, int XAdvance, int RunLength,
|
||||
void DrawVerticalRun(UINT8 **ScreenPtr, int XAdvance, int RunLength,
|
||||
int Color, int ScreenWidth);
|
||||
|
||||
void DrawHorizontalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawHorizontalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth);
|
||||
void DrawVerticalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawVerticalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth);
|
||||
|
||||
|
||||
@@ -147,14 +147,7 @@ BOOL Clip2D( int *ix0, int *iy0, int *ix1, int *iy1 )
|
||||
return( visible );
|
||||
}
|
||||
|
||||
// (jonathanl) to save me having to cast all the previous code
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
LineDraw( fClip, XStart, YStart, XEnd, YEnd, Color, (char *)ScreenPtr);
|
||||
}
|
||||
|
||||
/* Draws a line between the specified endpoints in color Color. */
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr)
|
||||
{
|
||||
int Temp, AdjUp, AdjDown, ErrorTerm, XAdvance, XDelta, YDelta;
|
||||
int WholeStep, InitialPixelCount, FinalPixelCount, i, RunLength;
|
||||
@@ -357,7 +350,7 @@ void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Col
|
||||
}
|
||||
|
||||
//Draws a pixel in the specified color
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, INT8 *pScreen )
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, UINT8 *pScreen )
|
||||
{
|
||||
INT8 col2 = sColor >> 8;
|
||||
INT8 col1 = sColor & 0x00ff;
|
||||
@@ -377,13 +370,13 @@ void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, INT8 *pScreen )
|
||||
|
||||
/* Draws a horizontal run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawHorizontalRun(char **ScreenPtr, int XAdvance,
|
||||
void DrawHorizontalRun(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
@@ -398,13 +391,13 @@ void DrawHorizontalRun(char **ScreenPtr, int XAdvance,
|
||||
|
||||
/* Draws a vertical run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawVerticalRun(char **ScreenPtr, int XAdvance,
|
||||
void DrawVerticalRun(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
@@ -419,9 +412,7 @@ void DrawVerticalRun(char **ScreenPtr, int XAdvance,
|
||||
|
||||
|
||||
/* Draws a rectangle between the specified endpoints in color Color. */
|
||||
template void RectangleDraw<unsigned char *>(BOOL, int, int, int, int, short, unsigned char *);
|
||||
template <typename string7>
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr)
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
LineDraw( fClip, XStart, YStart, XEnd, YStart, Color, ScreenPtr);
|
||||
LineDraw( fClip, XStart, YEnd, XEnd, YEnd, Color, ScreenPtr);
|
||||
@@ -438,24 +429,22 @@ void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, shor
|
||||
***********************************************************************************/
|
||||
|
||||
/* Draws a rectangle between the specified endpoints in color Color. */
|
||||
template void RectangleDraw8<unsigned char *>(BOOL, int, int ,int ,int, short, unsigned char *);
|
||||
template <typename string7>
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr)
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
LineDraw8( fClip, XStart, YStart, XEnd, YStart, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YEnd, XEnd, YEnd, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YStart, XStart, YEnd, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XEnd, YStart, XEnd, YEnd, Color, (char *)ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YStart, XEnd, YStart, Color, ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YEnd, XEnd, YEnd, Color, ScreenPtr);
|
||||
LineDraw8( fClip, XStart, YStart, XStart, YEnd, Color, ScreenPtr);
|
||||
LineDraw8( fClip, XEnd, YStart, XEnd, YEnd, Color, ScreenPtr);
|
||||
}
|
||||
|
||||
/* Draws a line between the specified endpoints in color Color. */
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr)
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
|
||||
{
|
||||
int Temp, AdjUp, AdjDown, ErrorTerm, XAdvance, XDelta, YDelta;
|
||||
int WholeStep, InitialPixelCount, FinalPixelCount, i, RunLength;
|
||||
int ScreenWidth = giImageWidth;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
if ( fClip )
|
||||
{
|
||||
@@ -651,13 +640,13 @@ void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Co
|
||||
|
||||
/* Draws a horizontal run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawHorizontalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawHorizontalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
@@ -671,13 +660,13 @@ void DrawHorizontalRun8(char **ScreenPtr, int XAdvance,
|
||||
|
||||
/* Draws a vertical run of pixels, then advances the bitmap pointer to
|
||||
the first pixel of the next run. */
|
||||
void DrawVerticalRun8(char **ScreenPtr, int XAdvance,
|
||||
void DrawVerticalRun8(UINT8 **ScreenPtr, int XAdvance,
|
||||
int RunLength, int Color, int ScreenWidth)
|
||||
{
|
||||
int i;
|
||||
char *WorkingScreenPtr = *ScreenPtr;
|
||||
char col2 = Color>>8;
|
||||
char col1 = Color & 0x00FF;
|
||||
UINT8 *WorkingScreenPtr = *ScreenPtr;
|
||||
UINT8 col2 = Color>>8;
|
||||
UINT8 col1 = Color & 0x00FF;
|
||||
|
||||
for (i=0; i<RunLength; i++)
|
||||
{
|
||||
|
||||
@@ -56,16 +56,12 @@ void SetClippingRegionAndImageWidth(
|
||||
// Don't send fClip==TRUE to LineDraw if you don't have to. So if you know
|
||||
// that your line will be within the region you want it to be in, set
|
||||
// fClip == FALSE.
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, INT8 *pScreen );
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr);
|
||||
void PixelDraw( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, UINT8 *pScreen );
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, char *ScreenPtr);
|
||||
|
||||
template <typename string7>
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr);
|
||||
|
||||
template <typename string7>
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, string7 ScreenPtr);
|
||||
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ UINT32 guiRegionLastLButtonDownTime = 0;
|
||||
extern void ReleaseAnchorMode(); //private function used here (implemented in Button System.c)
|
||||
|
||||
// number of lines in height help text will be
|
||||
INT16 GetNumberOfLinesInHeight( STR16 pStringA );
|
||||
INT16 GetWidthOfString( STR16 pStringA );
|
||||
void DisplayHelpTokenizedString( STR16 pStringA, INT16 sX, INT16 sY );
|
||||
INT16 GetNumberOfLinesInHeight( const STR16 pStringA );
|
||||
INT16 GetWidthOfString( const STR16 pStringA );
|
||||
void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY );
|
||||
|
||||
|
||||
|
||||
@@ -1098,12 +1098,12 @@ void MSYS_SetRegionUserData(MOUSE_REGION *region,INT32 index,INT32 userdata)
|
||||
{
|
||||
if(index < 0 || index > 3)
|
||||
{
|
||||
UINT8 str[80];
|
||||
CHAR8 str[80];
|
||||
#ifdef MOUSESYSTEM_DEBUGGING
|
||||
if( gfIgnoreShutdownAssertions )
|
||||
#endif
|
||||
return;
|
||||
sprintf( (char *)str, "Attempting MSYS_SetRegionUserData() with out of range index %d.", index );
|
||||
sprintf( str, "Attempting MSYS_SetRegionUserData() with out of range index %d.", index );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
region->UserData[index]=userdata;
|
||||
@@ -1120,12 +1120,12 @@ INT32 MSYS_GetRegionUserData(MOUSE_REGION *region,INT32 index)
|
||||
{
|
||||
if(index < 0 || index > 3)
|
||||
{
|
||||
UINT8 str[80];
|
||||
CHAR8 str[80];
|
||||
#ifdef MOUSESYSTEM_DEBUGGING
|
||||
if( gfIgnoreShutdownAssertions )
|
||||
#endif
|
||||
return 0;
|
||||
sprintf( (char *)str, "Attempting MSYS_GetRegionUserData() with out of range index %d", index );
|
||||
sprintf( str, "Attempting MSYS_GetRegionUserData() with out of range index %d", index );
|
||||
AssertMsg( 0, str );
|
||||
}
|
||||
return(region->UserData[index]);
|
||||
@@ -1234,13 +1234,7 @@ void RefreshMouseRegions( )
|
||||
|
||||
}
|
||||
|
||||
template void SetRegionFastHelpText<wchar_t *>(MOUSE_REGION *, wchar_t *);
|
||||
template void SetRegionFastHelpText<wchar_t const*>(MOUSE_REGION *, wchar_t const*);
|
||||
template void SetRegionFastHelpText<short *>(MOUSE_REGION *, short *);
|
||||
template void SetRegionFastHelpText<unsigned short *>(MOUSE_REGION *, unsigned short *);
|
||||
template void SetRegionFastHelpText<unsigned short const*>(MOUSE_REGION *, unsigned short const*);
|
||||
template <typename type2>
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, const STR16 szText )
|
||||
{
|
||||
Assert( region );
|
||||
|
||||
@@ -1255,11 +1249,11 @@ void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
|
||||
//AssertMsg( 0, String( "Attempting to set fast help text, \"%S\" to an inactive region.", szText ) );
|
||||
}
|
||||
|
||||
if( !szText || !wcslen( (wchar_t *)szText ) )
|
||||
if( !szText || !wcslen( szText ) )
|
||||
return; //blank (or clear)
|
||||
|
||||
// Allocate memory for the button's FastHelp text string...
|
||||
region->FastHelpText = (wchar_t*)MemAlloc( (wcslen( (wchar_t *)szText ) + 1) * sizeof(wchar_t) );
|
||||
region->FastHelpText = (STR16) MemAlloc( (wcslen( szText ) + 1) * sizeof(CHAR16) );
|
||||
Assert( region->FastHelpText );
|
||||
|
||||
wcscpy( region->FastHelpText, szText );
|
||||
@@ -1287,7 +1281,7 @@ void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText )
|
||||
//region->FastHelpTimer = gsFastHelpDelay;
|
||||
}
|
||||
|
||||
INT16 GetNumberOfLinesInHeight( STR16 pStringA )
|
||||
INT16 GetNumberOfLinesInHeight( const STR16 pStringA )
|
||||
{
|
||||
STR16 pToken;
|
||||
INT16 sCounter = 0;
|
||||
@@ -1370,7 +1364,7 @@ void DisplayFastHelp( MOUSE_REGION *region )
|
||||
}
|
||||
|
||||
|
||||
INT16 GetWidthOfString( STR16 pStringA )
|
||||
INT16 GetWidthOfString( const STR16 pStringA )
|
||||
{
|
||||
CHAR16 pString[ 512 ];
|
||||
STR16 pToken;
|
||||
@@ -1394,7 +1388,7 @@ INT16 GetWidthOfString( STR16 pStringA )
|
||||
|
||||
}
|
||||
|
||||
void DisplayHelpTokenizedString( STR16 pStringA, INT16 sX, INT16 sY )
|
||||
void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY )
|
||||
{
|
||||
STR16 pToken;
|
||||
INT32 iCounter = 0, i;
|
||||
@@ -1485,7 +1479,7 @@ void RenderFastHelp()
|
||||
|
||||
// **********Wiz8 Versions**************************************************************************
|
||||
|
||||
INT16 GetWidthOfString( STR16 pStringA )
|
||||
INT16 GetWidthOfString( const STR16 pStringA )
|
||||
{
|
||||
CHAR16 pString[ 512 ];
|
||||
STR16 pToken;
|
||||
@@ -1539,7 +1533,7 @@ void DisplayFastHelp( MOUSE_REGION *region )
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayHelpTokenizedString( STR16 pStringA, INT16 sX, INT16 sY )
|
||||
void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY )
|
||||
{
|
||||
STR16 pToken;
|
||||
INT32 iCounter = 0, i;
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct _MOUSE_REGION {
|
||||
|
||||
//Fast help vars.
|
||||
INT16 FastHelpTimer; // Countdown timer for FastHelp text
|
||||
wchar_t *FastHelpText; // Text string for the FastHelp (describes buttons if left there a while)
|
||||
CHAR16 *FastHelpText; // Text string for the FastHelp (describes buttons if left there a while)
|
||||
INT32 FastHelpRect;
|
||||
MOUSE_HELPTEXT_DONE_CALLBACK HelpDoneCallback;
|
||||
|
||||
@@ -199,8 +199,7 @@ void MSYS_AllowDisabledRegionFastHelp( MOUSE_REGION *region, BOOLEAN fAllow );
|
||||
// Usually used to force change of mouse cursor if panels switch, etc
|
||||
void RefreshMouseRegions( );
|
||||
|
||||
template <typename type2>
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, type2 szText );
|
||||
void SetRegionFastHelpText( MOUSE_REGION *region, const STR16 szText );
|
||||
|
||||
void SetRegionHelpEndCallback( MOUSE_REGION *region, MOUSE_HELPTEXT_DONE_CALLBACK CallbackFxn );
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct
|
||||
} PcxObject;
|
||||
|
||||
BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents );
|
||||
PcxObject *LoadPcx(UINT8 *pFilename);
|
||||
PcxObject *LoadPcx(STR8 pFilename);
|
||||
BOOLEAN BlitPcxToBuffer( PcxObject *pCurrentPcxObject, UINT8 *pBuffer, UINT16 usBufferWidth, UINT16 usBufferHeight, UINT16 usX, UINT16 usY, BOOLEAN fTransp);
|
||||
|
||||
#endif
|
||||
@@ -106,7 +106,7 @@ UINT32 SoundGetFreeChannel(void);
|
||||
UINT32 SoundGetUniqueID(void);
|
||||
|
||||
// Callbacks
|
||||
void * F_CALLBACKAPI SoundFileOpen (const CHAR8 *pName);
|
||||
void * F_CALLBACKAPI SoundFileOpen (const STR8 pName);
|
||||
void F_CALLBACKAPI SoundFileClose(void *uiHandle);
|
||||
INT F_CALLBACKAPI SoundFileRead (void *pBuffer, INT iSize, void *uiHandle);
|
||||
INT F_CALLBACKAPI SoundFileSeek (void *uiHandle, INT iPos, signed char cMode);
|
||||
@@ -1459,7 +1459,7 @@ UINT32 uiSoundID;
|
||||
FSOUND_Stream_SetBufferSize(STREAM_BUFFER_LEN);
|
||||
|
||||
// Creating stream
|
||||
pSoundList[uiChannel].hStream=FSOUND_Stream_Open((char *)pSampleList[uiSample].pData, FSOUND_LOADMEMORY|FSOUND_LOOP_NORMAL|FSOUND_2D, 0, pSampleList[uiSample].uiSize);
|
||||
pSoundList[uiChannel].hStream=FSOUND_Stream_Open((STR8) pSampleList[uiSample].pData, FSOUND_LOADMEMORY|FSOUND_LOOP_NORMAL|FSOUND_2D, 0, pSampleList[uiSample].uiSize);
|
||||
if(pSoundList[uiChannel].hStream==NULL)
|
||||
{
|
||||
SoundLog((CHAR8 *)String(" ERROR in SoundStartSample(): %s", FMOD_ErrorString(FSOUND_GetError()) ));
|
||||
@@ -1630,9 +1630,9 @@ UINT32 uiSoundID;
|
||||
// ------------------------
|
||||
// Callbacks implementation
|
||||
// ========================
|
||||
static void * F_CALLBACKAPI SoundFileOpen(const CHAR8 *pName)
|
||||
static void * F_CALLBACKAPI SoundFileOpen(const STR8 pName)
|
||||
{
|
||||
return((void*)FileOpen((STR)pName, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE));
|
||||
return((void*)FileOpen(pName, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE));
|
||||
}
|
||||
|
||||
static void F_CALLBACKAPI SoundFileClose(void *uiHandle)
|
||||
|
||||
@@ -1777,7 +1777,7 @@ void RefreshScreen(void *DummyVariable)
|
||||
LPDIRECTDRAWSURFACE2 pTmpBuffer;
|
||||
DDSURFACEDESC SurfaceDescription;
|
||||
FILE *OutputFile;
|
||||
UINT8 FileName[64];
|
||||
CHAR8 FileName[64];
|
||||
INT32 iIndex;
|
||||
STRING512 DataDir;
|
||||
STRING512 ExecDir;
|
||||
@@ -1835,11 +1835,11 @@ void RefreshScreen(void *DummyVariable)
|
||||
|
||||
do
|
||||
{
|
||||
sprintf((char *) FileName, "SCREEN%03d.TGA", guiPrintFrameBufferIndex++);
|
||||
sprintf( FileName, "SCREEN%03d.TGA", guiPrintFrameBufferIndex++);
|
||||
}
|
||||
while( (_access( (const char *)FileName, 0 )) != -1 );
|
||||
while( (_access( FileName, 0 )) != -1 );
|
||||
|
||||
if ((OutputFile = fopen((const char *) FileName, "wb")) != NULL)
|
||||
if ((OutputFile = fopen( FileName, "wb")) != NULL)
|
||||
{
|
||||
fprintf(OutputFile, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, LOBYTE(SCREEN_WIDTH), HIBYTE(SCREEN_WIDTH), LOBYTE(SCREEN_HEIGHT), HIBYTE(SCREEN_HEIGHT), 0x10, 0);
|
||||
|
||||
@@ -2789,7 +2789,7 @@ BOOLEAN HideMouseCursor(void)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BOOLEAN LoadCursorFile(PTR pFilename)
|
||||
BOOLEAN LoadCursorFile(STR8 pFilename)
|
||||
{
|
||||
VOBJECT_DESC VideoObjectDescription;
|
||||
|
||||
@@ -2944,14 +2944,7 @@ HRESULT ReturnCode;
|
||||
}
|
||||
|
||||
|
||||
//Kaiden - Added for VC6 Compatibility
|
||||
#if _MSC_VER <= 1200
|
||||
template void FatalError<char const *>(char *, ...);
|
||||
#endif
|
||||
|
||||
template void FatalError<char const *>(char const *, ...);
|
||||
template <typename string1>
|
||||
void FatalError( string1 pError, ...)
|
||||
void FatalError( const STR8 pError, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ extern BOOLEAN GetRGBDistribution(void);
|
||||
extern BOOLEAN GetPrimaryRGBDistributionMasks(UINT32 *RedBitMask, UINT32 *GreenBitMask, UINT32 *BblueBitMask);
|
||||
extern BOOLEAN SetMouseCursorFromObject(UINT32 uiVideoObjectHandle, UINT16 usVideoObjectSubIndex, UINT16 usOffsetX, UINT16 usOffsetY );
|
||||
extern BOOLEAN HideMouseCursor(void);
|
||||
extern BOOLEAN LoadCursorFile(PTR pFilename);
|
||||
extern BOOLEAN LoadCursorFile(STR8 pFilename);
|
||||
extern BOOLEAN SetCurrentCursor(UINT16 usVideoObjectSubIndex, UINT16 usOffsetX, UINT16 usOffsetY );
|
||||
extern void StartFrameBufferRender(void);
|
||||
extern void EndFrameBufferRender(void);
|
||||
@@ -85,8 +85,7 @@ void InvalidateRegionEx(INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UI
|
||||
void RefreshScreen(void *DummyVariable);
|
||||
|
||||
|
||||
template <typename string1>
|
||||
void FatalError( string1 pError, ...);
|
||||
void FatalError( const STR8 pError, ...);
|
||||
|
||||
|
||||
extern SGPPaletteEntry gSgpPalette[256];
|
||||
|
||||
@@ -71,8 +71,8 @@ typedef struct VOBJECT_NODE
|
||||
struct VOBJECT_NODE *next, *prev;
|
||||
|
||||
#ifdef SGP_VIDEO_DEBUGGING
|
||||
UINT8 *pName;
|
||||
UINT8 *pCode;
|
||||
STR8 pName;
|
||||
STR8 pCode;
|
||||
#endif
|
||||
|
||||
}VOBJECT_NODE;
|
||||
@@ -1436,45 +1436,45 @@ void CheckValidVObjectIndex( UINT32 uiIndex )
|
||||
|
||||
if( fAssertError )
|
||||
{
|
||||
UINT8 str[60];
|
||||
CHAR8 str[60];
|
||||
switch( gubVODebugCode )
|
||||
{
|
||||
case DEBUGSTR_SETVIDEOOBJECTTRANSPARENCY:
|
||||
sprintf( (char *)str, "SetVideoObjectTransparency" );
|
||||
sprintf( str, "SetVideoObjectTransparency" );
|
||||
break;
|
||||
case DEBUGSTR_BLTVIDEOOBJECTFROMINDEX:
|
||||
sprintf( (char *)str, "BltVideoObjectFromIndex" );
|
||||
sprintf( str, "BltVideoObjectFromIndex" );
|
||||
break;
|
||||
case DEBUGSTR_SETOBJECTHANDLESHADE:
|
||||
sprintf( (char *)str, "SetObjectHandleShade" );
|
||||
sprintf( str, "SetObjectHandleShade" );
|
||||
break;
|
||||
case DEBUGSTR_GETVIDEOOBJECTETRLESUBREGIONPROPERTIES:
|
||||
sprintf( (char *)str, "GetVideoObjectETRLESubRegionProperties" );
|
||||
sprintf( str, "GetVideoObjectETRLESubRegionProperties" );
|
||||
break;
|
||||
case DEBUGSTR_GETVIDEOOBJECTETRLEPROPERTIESFROMINDEX:
|
||||
sprintf( (char *)str, "GetVideoObjectETRLEPropertiesFromIndex" );
|
||||
sprintf( str, "GetVideoObjectETRLEPropertiesFromIndex" );
|
||||
break;
|
||||
case DEBUGSTR_SETVIDEOOBJECTPALETTE8BPP:
|
||||
sprintf( (char *)str, "SetVideoObjectPalette8BPP" );
|
||||
sprintf( str, "SetVideoObjectPalette8BPP" );
|
||||
break;
|
||||
case DEBUGSTR_GETVIDEOOBJECTPALETTE16BPP:
|
||||
sprintf( (char *)str, "GetVideoObjectPalette16BPP" );
|
||||
sprintf( str, "GetVideoObjectPalette16BPP" );
|
||||
break;
|
||||
case DEBUGSTR_COPYVIDEOOBJECTPALETTE16BPP:
|
||||
sprintf( (char *)str, "CopyVideoObjectPalette16BPP" );
|
||||
sprintf( str, "CopyVideoObjectPalette16BPP" );
|
||||
break;
|
||||
case DEBUGSTR_BLTVIDEOOBJECTOUTLINEFROMINDEX:
|
||||
sprintf( (char *)str, "BltVideoObjectOutlineFromIndex" );
|
||||
sprintf( str, "BltVideoObjectOutlineFromIndex" );
|
||||
break;
|
||||
case DEBUGSTR_BLTVIDEOOBJECTOUTLINESHADOWFROMINDEX:
|
||||
sprintf( (char *)str, "BltVideoObjectOutlineShadowFromIndex" );
|
||||
sprintf( str, "BltVideoObjectOutlineShadowFromIndex" );
|
||||
break;
|
||||
case DEBUGSTR_DELETEVIDEOOBJECTFROMINDEX:
|
||||
sprintf( (char *)str, "DeleteVideoObjectFromIndex" );
|
||||
sprintf( str, "DeleteVideoObjectFromIndex" );
|
||||
break;
|
||||
case DEBUGSTR_NONE:
|
||||
default:
|
||||
sprintf( (char *)str, "GetVideoObject" );
|
||||
sprintf( str, "GetVideoObject" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1485,17 +1485,17 @@ void CheckValidVObjectIndex( UINT32 uiIndex )
|
||||
|
||||
typedef struct DUMPFILENAME
|
||||
{
|
||||
UINT8 str[256];
|
||||
CHAR8 str[256];
|
||||
}DUMPFILENAME;
|
||||
|
||||
void DumpVObjectInfoIntoFile( UINT8 *filename, BOOLEAN fAppend )
|
||||
void DumpVObjectInfoIntoFile( const STR8 filename, BOOLEAN fAppend )
|
||||
{
|
||||
VOBJECT_NODE *curr;
|
||||
FILE *fp;
|
||||
DUMPFILENAME *pName, *pCode;
|
||||
UINT32 *puiCounter;
|
||||
UINT8 tempName[ 256 ];
|
||||
UINT8 tempCode[ 256 ];
|
||||
CHAR8 tempName[ 256 ];
|
||||
CHAR8 tempCode[ 256 ];
|
||||
UINT32 i, uiUniqueID;
|
||||
BOOLEAN fFound;
|
||||
if( !guiVObjectSize )
|
||||
@@ -1505,11 +1505,11 @@ void DumpVObjectInfoIntoFile( UINT8 *filename, BOOLEAN fAppend )
|
||||
|
||||
if( fAppend )
|
||||
{
|
||||
fp = fopen( (const char *)filename, "a" );
|
||||
fp = fopen( filename, "a" );
|
||||
}
|
||||
else
|
||||
{
|
||||
fp = fopen( (const char *)filename, "w" );
|
||||
fp = fopen( filename, "w" );
|
||||
}
|
||||
Assert( fp );
|
||||
|
||||
@@ -1567,13 +1567,10 @@ void DumpVObjectInfoIntoFile( UINT8 *filename, BOOLEAN fAppend )
|
||||
}
|
||||
|
||||
//Debug wrapper for adding vObjects
|
||||
template BOOLEAN _AddAndRecordVObject<char const *>(VOBJECT_DESC *, UINT32 *, UINT32, char const *);
|
||||
template BOOLEAN _AddAndRecordVObject<char *>(VOBJECT_DESC *, UINT32 *, UINT32, char *);
|
||||
template <typename type4>
|
||||
BOOLEAN _AddAndRecordVObject( VOBJECT_DESC *VObjectDesc, UINT32 *uiIndex, UINT32 uiLineNum, type4 pSourceFile )
|
||||
BOOLEAN _AddAndRecordVObject( VOBJECT_DESC *VObjectDesc, UINT32 *uiIndex, UINT32 uiLineNum, const STR8 pSourceFile )
|
||||
{
|
||||
UINT16 usLength;
|
||||
UINT8 str[256];
|
||||
CHAR8 str[256];
|
||||
if( !AddStandardVideoObject( VObjectDesc, uiIndex ) )
|
||||
{
|
||||
return FALSE;
|
||||
@@ -1581,27 +1578,24 @@ BOOLEAN _AddAndRecordVObject( VOBJECT_DESC *VObjectDesc, UINT32 *uiIndex, UINT32
|
||||
|
||||
//record the filename of the vObject (some are created via memory though)
|
||||
usLength = strlen( VObjectDesc->ImageFile ) + 1;
|
||||
gpVObjectTail->pName = (UINT8*)MemAlloc( usLength );
|
||||
gpVObjectTail->pName = (STR8)MemAlloc( usLength );
|
||||
memset( gpVObjectTail->pName, 0, usLength );
|
||||
strcpy( gpVObjectTail->pName, VObjectDesc->ImageFile );
|
||||
|
||||
//record the code location of the calling creating function.
|
||||
sprintf( (char *)str, "%s -- line(%d)", pSourceFile, uiLineNum );
|
||||
sprintf( str, "%s -- line(%d)", pSourceFile, uiLineNum );
|
||||
usLength = strlen( str ) + 1;
|
||||
gpVObjectTail->pCode = (UINT8*)MemAlloc( usLength );
|
||||
gpVObjectTail->pCode = (STR8)MemAlloc( usLength );
|
||||
memset( gpVObjectTail->pCode, 0, usLength );
|
||||
strcpy( gpVObjectTail->pCode, str );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
template void PerformVideoInfoDumpIntoFile<char *>(char *, BOOLEAN);
|
||||
template void PerformVideoInfoDumpIntoFile<char const *>(char const *, BOOLEAN);
|
||||
template <typename string1>
|
||||
void PerformVideoInfoDumpIntoFile( string1 filename, BOOLEAN fAppend )
|
||||
void PerformVideoInfoDumpIntoFile( const STR8 filename, BOOLEAN fAppend )
|
||||
{
|
||||
DumpVObjectInfoIntoFile( (UINT8 *)filename, fAppend );
|
||||
DumpVSurfaceInfoIntoFile( (UINT8 *)filename, TRUE );
|
||||
DumpVObjectInfoIntoFile( filename, fAppend );
|
||||
DumpVSurfaceInfoIntoFile( filename, TRUE );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -145,11 +145,9 @@ BOOLEAN ShutdownVideoObjectManager( );
|
||||
|
||||
// Creates and adds a video object to list
|
||||
#ifdef SGP_VIDEO_DEBUGGING
|
||||
template <typename string1>
|
||||
void PerformVideoInfoDumpIntoFile( string1 filename, BOOLEAN fAppend );
|
||||
void DumpVObjectInfoIntoFile( UINT8 *filename, BOOLEAN fAppend );
|
||||
template <typename type4>
|
||||
BOOLEAN _AddAndRecordVObject( VOBJECT_DESC *VObjectDesc, UINT32 *uiIndex, UINT32 uiLineNum, type4 pSourceFile );
|
||||
void PerformVideoInfoDumpIntoFile( const STR8 filename, BOOLEAN fAppend );
|
||||
void DumpVObjectInfoIntoFile( const STR8 filename, BOOLEAN fAppend );
|
||||
BOOLEAN _AddAndRecordVObject( VOBJECT_DESC *VObjectDesc, UINT32 *uiIndex, UINT32 uiLineNum, const STR8 pSourceFile );
|
||||
#define AddVideoObject( a, b ) _AddAndRecordVObject( a, b, __LINE__, __FILE__ )
|
||||
#else
|
||||
#define AddVideoObject( a, b ) AddStandardVideoObject( a, b )
|
||||
|
||||
@@ -74,8 +74,8 @@ typedef struct VSURFACE_NODE
|
||||
struct VSURFACE_NODE *next, *prev;
|
||||
|
||||
#ifdef SGP_VIDEO_DEBUGGING
|
||||
UINT8 *pName;
|
||||
UINT8 *pCode;
|
||||
STR8 pName;
|
||||
STR8 pCode;
|
||||
#endif
|
||||
|
||||
}VSURFACE_NODE;
|
||||
@@ -2506,42 +2506,42 @@ void CheckValidVSurfaceIndex( UINT32 uiIndex )
|
||||
|
||||
if( fAssertError )
|
||||
{
|
||||
UINT8 str[60];
|
||||
CHAR8 str[60];
|
||||
switch( gubVSDebugCode )
|
||||
{
|
||||
case DEBUGSTR_SETVIDEOSURFACETRANSPARENCY:
|
||||
sprintf( (char *)str, "SetVideoSurfaceTransparency" );
|
||||
sprintf( str, "SetVideoSurfaceTransparency" );
|
||||
break;
|
||||
case DEBUGSTR_ADDVIDEOSURFACEREGION:
|
||||
sprintf( (char *)str, "AddVideoSurfaceRegion" );
|
||||
sprintf( str, "AddVideoSurfaceRegion" );
|
||||
break;
|
||||
case DEBUGSTR_GETVIDEOSURFACEDESCRIPTION:
|
||||
sprintf( (char *)str, "GetVideoSurfaceDescription" );
|
||||
sprintf( str, "GetVideoSurfaceDescription" );
|
||||
break;
|
||||
case DEBUGSTR_BLTVIDEOSURFACE_DST:
|
||||
sprintf( (char *)str, "BltVideoSurface (dest)" );
|
||||
sprintf( str, "BltVideoSurface (dest)" );
|
||||
break;
|
||||
case DEBUGSTR_BLTVIDEOSURFACE_SRC:
|
||||
sprintf( (char *)str, "BltVideoSurface (src)" );
|
||||
sprintf( str, "BltVideoSurface (src)" );
|
||||
break;
|
||||
case DEBUGSTR_COLORFILLVIDEOSURFACEAREA:
|
||||
sprintf( (char *)str, "ColorFillVideoSurfaceArea" );
|
||||
sprintf( str, "ColorFillVideoSurfaceArea" );
|
||||
break;
|
||||
case DEBUGSTR_SHADOWVIDEOSURFACERECT:
|
||||
sprintf( (char *)str, "ShadowVideoSurfaceRect" );
|
||||
sprintf( str, "ShadowVideoSurfaceRect" );
|
||||
break;
|
||||
case DEBUGSTR_BLTSTRETCHVIDEOSURFACE_DST:
|
||||
sprintf( (char *)str, "BltStretchVideoSurface (dest)" );
|
||||
sprintf( str, "BltStretchVideoSurface (dest)" );
|
||||
break;
|
||||
case DEBUGSTR_BLTSTRETCHVIDEOSURFACE_SRC:
|
||||
sprintf( (char *)str, "BltStretchVideoSurface (src)" );
|
||||
sprintf( str, "BltStretchVideoSurface (src)" );
|
||||
break;
|
||||
case DEBUGSTR_DELETEVIDEOSURFACEFROMINDEX:
|
||||
sprintf( (char *)str, "DeleteVideoSurfaceFromIndex" );
|
||||
sprintf( str, "DeleteVideoSurfaceFromIndex" );
|
||||
break;
|
||||
case DEBUGSTR_NONE:
|
||||
default:
|
||||
sprintf( (char *)str, "GetVideoSurface" );
|
||||
sprintf( str, "GetVideoSurface" );
|
||||
break;
|
||||
}
|
||||
if( uiIndex == 0xffffffff )
|
||||
@@ -2559,16 +2559,16 @@ void CheckValidVSurfaceIndex( UINT32 uiIndex )
|
||||
#ifdef SGP_VIDEO_DEBUGGING
|
||||
typedef struct DUMPFILENAME
|
||||
{
|
||||
UINT8 str[256];
|
||||
CHAR8 str[256];
|
||||
}DUMPFILENAME;
|
||||
void DumpVSurfaceInfoIntoFile( UINT8 *filename, BOOLEAN fAppend )
|
||||
void DumpVSurfaceInfoIntoFile( const STR8 filename, BOOLEAN fAppend )
|
||||
{
|
||||
VSURFACE_NODE *curr;
|
||||
FILE *fp;
|
||||
DUMPFILENAME *pName, *pCode;
|
||||
UINT32 *puiCounter;
|
||||
UINT8 tempName[ 256 ];
|
||||
UINT8 tempCode[ 256 ];
|
||||
CHAR8 tempName[ 256 ];
|
||||
CHAR8 tempCode[ 256 ];
|
||||
UINT32 i, uiUniqueID;
|
||||
BOOLEAN fFound;
|
||||
if( !guiVSurfaceSize )
|
||||
@@ -2578,11 +2578,11 @@ void DumpVSurfaceInfoIntoFile( UINT8 *filename, BOOLEAN fAppend )
|
||||
|
||||
if( fAppend )
|
||||
{
|
||||
fp = fopen( (const char *)filename, "a" );
|
||||
fp = fopen( filename, "a" );
|
||||
}
|
||||
else
|
||||
{
|
||||
fp = fopen( (const char *)filename, "w" );
|
||||
fp = fopen( filename, "w" );
|
||||
}
|
||||
Assert( fp );
|
||||
|
||||
@@ -2640,11 +2640,10 @@ void DumpVSurfaceInfoIntoFile( UINT8 *filename, BOOLEAN fAppend )
|
||||
}
|
||||
|
||||
//Debug wrapper for adding vsurfaces
|
||||
template <typename type4>
|
||||
BOOLEAN _AddAndRecordVSurface( VSURFACE_DESC *VSurfaceDesc, UINT32 *uiIndex, UINT32 uiLineNum, type4 pSourceFile )
|
||||
BOOLEAN _AddAndRecordVSurface( VSURFACE_DESC *VSurfaceDesc, UINT32 *uiIndex, UINT32 uiLineNum, const STR8 pSourceFile )
|
||||
{
|
||||
UINT16 usLength;
|
||||
UINT8 str[256];
|
||||
CHAR8 str[256];
|
||||
if( !AddStandardVideoSurface( VSurfaceDesc, uiIndex ) )
|
||||
{
|
||||
return FALSE;
|
||||
@@ -2652,14 +2651,14 @@ BOOLEAN _AddAndRecordVSurface( VSURFACE_DESC *VSurfaceDesc, UINT32 *uiIndex, UIN
|
||||
|
||||
//record the filename of the vsurface (some are created via memory though)
|
||||
usLength = strlen( VSurfaceDesc->ImageFile ) + 1;
|
||||
gpVSurfaceTail->pName = (UINT8*)MemAlloc( usLength );
|
||||
gpVSurfaceTail->pName = (STR8)MemAlloc( usLength );
|
||||
memset( gpVSurfaceTail->pName, 0, usLength );
|
||||
strcpy( gpVSurfaceTail->pName, VSurfaceDesc->ImageFile );
|
||||
|
||||
//record the code location of the calling creating function.
|
||||
sprintf( (char *) str, "%s -- line(%d)", pSourceFile, uiLineNum );
|
||||
sprintf( str, "%s -- line(%d)", pSourceFile, uiLineNum );
|
||||
usLength = strlen( str ) + 1;
|
||||
gpVSurfaceTail->pCode = (UINT8*)MemAlloc( usLength );
|
||||
gpVSurfaceTail->pCode = (STR8)MemAlloc( usLength );
|
||||
memset( gpVSurfaceTail->pCode, 0, usLength );
|
||||
strcpy( gpVSurfaceTail->pCode, str );
|
||||
|
||||
|
||||
@@ -141,9 +141,8 @@ BOOLEAN RestoreVideoSurfaces( );
|
||||
|
||||
// Creates and adds a video Surface to list
|
||||
#ifdef SGP_VIDEO_DEBUGGING
|
||||
void DumpVSurfaceInfoIntoFile( UINT8 *filename, BOOLEAN fAppend );
|
||||
template <typename type4>
|
||||
extern BOOLEAN _AddAndRecordVSurface( VSURFACE_DESC *VSurfaceDesc, UINT32 *uiIndex, UINT32 uiLineNum, type4 pSourceFile );
|
||||
void DumpVSurfaceInfoIntoFile( const STR8 filename, BOOLEAN fAppend );
|
||||
extern BOOLEAN _AddAndRecordVSurface( VSURFACE_DESC *VSurfaceDesc, UINT32 *uiIndex, UINT32 uiLineNum, const STR8 pSourceFile );
|
||||
#define AddVideoSurface( a, b ) _AddAndRecordVSurface( a, b, __LINE__, __FILE__ )
|
||||
#else
|
||||
#define AddVideoSurface( a, b ) AddStandardVideoSurface( a, b )
|
||||
|
||||
Reference in New Issue
Block a user