mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- added VS2005 compability fix from Space Viking
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@766 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+12
-12
@@ -32,7 +32,7 @@ void AddChar( UINT32 uiKey );
|
||||
void RemoveChar( UINT8 ubArrayIndex );
|
||||
void DeleteHilitedText();
|
||||
|
||||
void DoublePercentileCharacterFromStringIntoString( UINT16 *pSrcString, UINT16 *pDstString );
|
||||
void DoublePercentileCharacterFromStringIntoString( wchar_t *pSrcString, wchar_t *pDstString );
|
||||
|
||||
//All exclusive input types are handled in this function.
|
||||
void HandleExclusiveInput( UINT32 uiKey );
|
||||
@@ -63,7 +63,7 @@ typedef struct TEXTINPUTNODE{
|
||||
UINT8 ubID;
|
||||
UINT16 usInputType;
|
||||
UINT8 ubMaxChars;
|
||||
UINT16 *szString;
|
||||
wchar_t *szString;
|
||||
UINT8 ubStrLen;
|
||||
BOOLEAN fEnabled;
|
||||
BOOLEAN fUserField;
|
||||
@@ -238,7 +238,7 @@ void KillAllTextInputModes()
|
||||
//of calls to this function dictate the TAB order from traversing from one field to the next. This
|
||||
//function adds mouse regions and processes them for you, as well as deleting them when you are done.
|
||||
void AddTextInputField( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, INT8 bPriority,
|
||||
UINT16 *szInitText, UINT8 ubMaxChars, UINT16 usInputType )
|
||||
wchar_t *szInitText, UINT8 ubMaxChars, UINT16 usInputType )
|
||||
{
|
||||
TEXTINPUTNODE *pNode;
|
||||
pNode = (TEXTINPUTNODE*)MemAlloc(sizeof(TEXTINPUTNODE));
|
||||
@@ -266,7 +266,7 @@ void AddTextInputField( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, IN
|
||||
if( usInputType == INPUTTYPE_EXCLUSIVE_24HOURCLOCK )
|
||||
ubMaxChars = 6;
|
||||
//Allocate and copy the string.
|
||||
pNode->szString = (UINT16*)MemAlloc( (ubMaxChars+1)*sizeof(UINT16) );
|
||||
pNode->szString = (wchar_t*)MemAlloc( (ubMaxChars+1)*sizeof(wchar_t) );
|
||||
Assert( pNode->szString );
|
||||
if( szInitText )
|
||||
{
|
||||
@@ -383,7 +383,7 @@ INT16 GetActiveFieldID()
|
||||
//This is a useful call made from an external user input field. Using the previous file dialog example, this
|
||||
//call would be made when the user selected a different filename in the list via clicking or scrolling with
|
||||
//the arrows, or even using alpha chars to jump to the appropriate filename.
|
||||
void SetInputFieldStringWith16BitString( UINT8 ubField, UINT16 *szNewText )
|
||||
void SetInputFieldStringWith16BitString( UINT8 ubField, wchar_t *szNewText )
|
||||
{
|
||||
TEXTINPUTNODE *curr;
|
||||
curr = gpTextInputHead;
|
||||
@@ -458,7 +458,7 @@ void Get8BitStringFromField( UINT8 ubField, UINT8 *szString )
|
||||
szString[0] = '\0';
|
||||
}
|
||||
|
||||
void Get16BitStringFromField( UINT8 ubField, UINT16 *szString )
|
||||
void Get16BitStringFromField( UINT8 ubField, wchar_t *szString )
|
||||
{
|
||||
TEXTINPUTNODE *curr;
|
||||
curr = gpTextInputHead;
|
||||
@@ -478,8 +478,8 @@ void Get16BitStringFromField( UINT8 ubField, UINT16 *szString )
|
||||
//returns -1 if blank or invalid. Only works for positive numbers.
|
||||
INT32 GetNumericStrictValueFromField( UINT8 ubField )
|
||||
{
|
||||
UINT16 *ptr;
|
||||
UINT16 str[20];
|
||||
wchar_t *ptr;
|
||||
wchar_t str[20];
|
||||
INT32 total;
|
||||
Get16BitStringFromField( ubField, str );
|
||||
//Blank string, so return -1
|
||||
@@ -1242,7 +1242,7 @@ void RenderActiveTextField()
|
||||
{
|
||||
UINT32 uiCursorXPos;
|
||||
UINT16 usOffset;
|
||||
UINT16 str[ 256 ];
|
||||
wchar_t str[ 256 ];
|
||||
if( !gpActive || !gpActive->szString )
|
||||
return;
|
||||
|
||||
@@ -1320,7 +1320,7 @@ void RenderInactiveTextField( UINT8 ubID )
|
||||
{
|
||||
UINT16 usOffset;
|
||||
TEXTINPUTNODE* pNode, *curr;
|
||||
UINT16 str[ 256 ];
|
||||
wchar_t str[ 256 ];
|
||||
curr = gpTextInputHead;
|
||||
pNode = NULL;
|
||||
while( curr )
|
||||
@@ -1348,7 +1348,7 @@ void RenderInactiveTextField( UINT8 ubID )
|
||||
void RenderInactiveTextFieldNode( TEXTINPUTNODE *pNode )
|
||||
{
|
||||
UINT16 usOffset;
|
||||
UINT16 str[ 256 ];
|
||||
wchar_t str[ 256 ];
|
||||
if( !pNode || !pNode->szString )
|
||||
return;
|
||||
SaveFontSettings();
|
||||
@@ -1747,7 +1747,7 @@ void SetExclusive24HourTimeValue( UINT8 ubField, UINT16 usTime )
|
||||
}
|
||||
}
|
||||
|
||||
void DoublePercentileCharacterFromStringIntoString( UINT16 *pSrcString, UINT16 *pDstString )
|
||||
void DoublePercentileCharacterFromStringIntoString( wchar_t *pSrcString, wchar_t *pDstString )
|
||||
{
|
||||
INT32 iSrcIndex = 0, iDstIndex = 0;
|
||||
while( pSrcString[ iSrcIndex ] != 0 )
|
||||
|
||||
Reference in New Issue
Block a user