mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
we don't use USE_CODE_PAGE anymore
This commit is contained in:
committed by
majcosta
parent
4ed7b1fb98
commit
6b9997b9c5
@@ -577,7 +577,6 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
|||||||
|
|
||||||
if( uiKey != '#')
|
if( uiKey != '#')
|
||||||
#else
|
#else
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( uiKey >= 'A' && uiKey <= 'Z' ||
|
if( uiKey >= 'A' && uiKey <= 'Z' ||
|
||||||
uiKey >= 'a' && uiKey <= 'z' ||
|
uiKey >= 'a' && uiKey <= 'z' ||
|
||||||
uiKey >= '0' && uiKey <= '9' ||
|
uiKey >= '0' && uiKey <= '9' ||
|
||||||
@@ -585,9 +584,6 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
|||||||
uiKey == ' ' || uiKey == '"' ||
|
uiKey == ' ' || uiKey == '"' ||
|
||||||
uiKey == 39 // This is ' which cannot be written explicitly here of course
|
uiKey == 39 // This is ' which cannot be written explicitly here of course
|
||||||
)
|
)
|
||||||
#else
|
|
||||||
if( charSet::IsFromSet( uiKey, charSet::CS_SPACE|charSet::CS_ALPHA_NUM|charSet::CS_SPECIAL_ALPHA ) )
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// if the current string position is at max or great, do nothing
|
// if the current string position is at max or great, do nothing
|
||||||
|
|||||||
@@ -937,11 +937,7 @@ BOOLEAN HandleTextInput( InputAtom *Event )
|
|||||||
UINT32 key = Event->usParam;
|
UINT32 key = Event->usParam;
|
||||||
UINT16 type = gpActive->usInputType;
|
UINT16 type = gpActive->usInputType;
|
||||||
//Handle space key
|
//Handle space key
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( key == SPACE && type & INPUTTYPE_SPACES )
|
if( key == SPACE && type & INPUTTYPE_SPACES )
|
||||||
#else
|
|
||||||
if( charSet::IsFromSet(key, charSet::CS_SPACE) && type & INPUTTYPE_SPACES )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
AddChar( key );
|
AddChar( key );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -953,11 +949,7 @@ BOOLEAN HandleTextInput( InputAtom *Event )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
//Handle numerics
|
//Handle numerics
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( key >= '0' && key <= '9' && type & INPUTTYPE_NUMERICSTRICT )
|
if( key >= '0' && key <= '9' && type & INPUTTYPE_NUMERICSTRICT )
|
||||||
#else
|
|
||||||
if( charSet::IsFromSet(key, charSet::CS_NUMERIC) && type & INPUTTYPE_NUMERICSTRICT )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
AddChar( key );
|
AddChar( key );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -965,22 +957,14 @@ BOOLEAN HandleTextInput( InputAtom *Event )
|
|||||||
//Handle alphas
|
//Handle alphas
|
||||||
if( type & INPUTTYPE_ALPHA )
|
if( type & INPUTTYPE_ALPHA )
|
||||||
{
|
{
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( key >= 'A' && key <= 'Z' )
|
if( key >= 'A' && key <= 'Z' )
|
||||||
#else
|
|
||||||
if( charSet::IsFromSet(key, charSet::CS_ALPHA_UC) )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if( type & INPUTTYPE_LOWERCASE )
|
if( type & INPUTTYPE_LOWERCASE )
|
||||||
key -= 32; // won't work for non-ascii alpha characters
|
key -= 32; // won't work for non-ascii alpha characters
|
||||||
AddChar( key );
|
AddChar( key );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( key >= 'a' && key <= 'z' )
|
if( key >= 'a' && key <= 'z' )
|
||||||
#else
|
|
||||||
if( charSet::IsFromSet(key, charSet::CS_ALPHA_LC) )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if( type & INPUTTYPE_UPPERCASE )
|
if( type & INPUTTYPE_UPPERCASE )
|
||||||
key += 32; // won't work for non-ascii alpha characters
|
key += 32; // won't work for non-ascii alpha characters
|
||||||
@@ -992,14 +976,10 @@ BOOLEAN HandleTextInput( InputAtom *Event )
|
|||||||
if( type & INPUTTYPE_SPECIAL )
|
if( type & INPUTTYPE_SPECIAL )
|
||||||
{
|
{
|
||||||
//More can be added, but not all of the fonts support these
|
//More can be added, but not all of the fonts support these
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( key >= 0x21 && key <= 0x2f || // ! " # $ % & ' ( ) * + , - . /
|
if( key >= 0x21 && key <= 0x2f || // ! " # $ % & ' ( ) * + , - . /
|
||||||
key >= 0x3a && key <= 0x40 || // : ; < = > ? @
|
key >= 0x3a && key <= 0x40 || // : ; < = > ? @
|
||||||
key >= 0x5b && key <= 0x5f || // [ \ ] ^ _
|
key >= 0x5b && key <= 0x5f || // [ \ ] ^ _
|
||||||
key >= 0x7b && key <= 0x7d ) // { | }
|
key >= 0x7b && key <= 0x7d ) // { | }
|
||||||
#else
|
|
||||||
if( charSet::IsFromSet(key, charSet::CS_SPECIAL_ALPHA|charSet::CS_SPECIAL_NON_CHAR) )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
AddChar( key );
|
AddChar( key );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
-30
@@ -367,14 +367,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
|
|||||||
|
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
#ifdef USE_CODE_PAGE
|
|
||||||
if(s_DebugKeyboardInput)
|
|
||||||
{
|
|
||||||
static vfs::Log& debugKeys = *vfs::Log::Create(L"DebugKeys.txt");
|
|
||||||
static int input_counter = 1;
|
|
||||||
debugKeys << (input_counter++) << " : " << (int)wParam << vfs::Log::endl;
|
|
||||||
}
|
|
||||||
#endif // USE_CODE_PAGE
|
|
||||||
KeyDown(wParam, lParam);
|
KeyDown(wParam, lParam);
|
||||||
gfSGPInputReceived = TRUE;
|
gfSGPInputReceived = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -514,24 +506,6 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_CODE_PAGE
|
|
||||||
charSet::InitializeCharSets();
|
|
||||||
|
|
||||||
if(!s_CodePage.empty())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
CodePageReader cpr;
|
|
||||||
cpr.ReadCodePage(s_CodePage);
|
|
||||||
}
|
|
||||||
catch(std::exception& ex)
|
|
||||||
{
|
|
||||||
std::wstringstream wss;
|
|
||||||
wss << L"Could not process codepage file \"" << s_CodePage() << L"\"";
|
|
||||||
SGP_RETHROW(wss.str().c_str(), ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // USE_CODE_PAGE
|
|
||||||
|
|
||||||
if(g_bUseXML_Strings)
|
if(g_bUseXML_Strings)
|
||||||
{
|
{
|
||||||
@@ -1255,10 +1229,6 @@ void GetRuntimeSettings( )
|
|||||||
// haydent: mouse scrolling
|
// haydent: mouse scrolling
|
||||||
iDisableMouseScrolling = (int)oProps.getIntProperty("Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling);
|
iDisableMouseScrolling = (int)oProps.getIntProperty("Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling);
|
||||||
|
|
||||||
#ifdef USE_CODE_PAGE
|
|
||||||
s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false);
|
|
||||||
s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE");
|
|
||||||
#endif // USE_CODE_PAGE
|
|
||||||
|
|
||||||
// WANNE: Highspeed Timer always ON (no more optional in the ja2.ini)
|
// WANNE: Highspeed Timer always ON (no more optional in the ja2.ini)
|
||||||
// get timer/clock initialization state
|
// get timer/clock initialization state
|
||||||
|
|||||||
Reference in New Issue
Block a user