diff --git a/Laptop/IMP Begin Screen.cpp b/Laptop/IMP Begin Screen.cpp index c140ee92..846666ec 100644 --- a/Laptop/IMP Begin Screen.cpp +++ b/Laptop/IMP Begin Screen.cpp @@ -577,7 +577,6 @@ void HandleBeginScreenTextEvent( UINT32 uiKey ) if( uiKey != '#') #else - #ifndef USE_CODE_PAGE if( uiKey >= 'A' && uiKey <= 'Z' || uiKey >= 'a' && uiKey <= 'z' || uiKey >= '0' && uiKey <= '9' || @@ -585,9 +584,6 @@ void HandleBeginScreenTextEvent( UINT32 uiKey ) uiKey == ' ' || uiKey == '"' || 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 { // if the current string position is at max or great, do nothing diff --git a/Utils/Text Input.cpp b/Utils/Text Input.cpp index 3efcb415..7f403388 100644 --- a/Utils/Text Input.cpp +++ b/Utils/Text Input.cpp @@ -937,11 +937,7 @@ BOOLEAN HandleTextInput( InputAtom *Event ) UINT32 key = Event->usParam; UINT16 type = gpActive->usInputType; //Handle space key -#ifndef USE_CODE_PAGE if( key == SPACE && type & INPUTTYPE_SPACES ) -#else - if( charSet::IsFromSet(key, charSet::CS_SPACE) && type & INPUTTYPE_SPACES ) -#endif { AddChar( key ); return TRUE; @@ -953,11 +949,7 @@ BOOLEAN HandleTextInput( InputAtom *Event ) return TRUE; } //Handle numerics -#ifndef USE_CODE_PAGE if( key >= '0' && key <= '9' && type & INPUTTYPE_NUMERICSTRICT ) -#else - if( charSet::IsFromSet(key, charSet::CS_NUMERIC) && type & INPUTTYPE_NUMERICSTRICT ) -#endif { AddChar( key ); return TRUE; @@ -965,22 +957,14 @@ BOOLEAN HandleTextInput( InputAtom *Event ) //Handle alphas if( type & INPUTTYPE_ALPHA ) { -#ifndef USE_CODE_PAGE if( key >= 'A' && key <= 'Z' ) -#else - if( charSet::IsFromSet(key, charSet::CS_ALPHA_UC) ) -#endif { if( type & INPUTTYPE_LOWERCASE ) key -= 32; // won't work for non-ascii alpha characters AddChar( key ); return TRUE; } -#ifndef USE_CODE_PAGE if( key >= 'a' && key <= 'z' ) -#else - if( charSet::IsFromSet(key, charSet::CS_ALPHA_LC) ) -#endif { if( type & INPUTTYPE_UPPERCASE ) key += 32; // won't work for non-ascii alpha characters @@ -992,14 +976,10 @@ BOOLEAN HandleTextInput( InputAtom *Event ) if( type & INPUTTYPE_SPECIAL ) { //More can be added, but not all of the fonts support these -#ifndef USE_CODE_PAGE if( key >= 0x21 && key <= 0x2f || // ! " # $ % & ' ( ) * + , - . / key >= 0x3a && key <= 0x40 || // : ; < = > ? @ key >= 0x5b && key <= 0x5f || // [ \ ] ^ _ key >= 0x7b && key <= 0x7d ) // { | } -#else - if( charSet::IsFromSet(key, charSet::CS_SPECIAL_ALPHA|charSet::CS_SPECIAL_NON_CHAR) ) -#endif { AddChar( key ); return TRUE; diff --git a/sgp/sgp.cpp b/sgp/sgp.cpp index 6686d637..de26331d 100644 --- a/sgp/sgp.cpp +++ b/sgp/sgp.cpp @@ -367,14 +367,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP case WM_SYSKEYDOWN: 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); gfSGPInputReceived = TRUE; 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) { @@ -1255,10 +1229,6 @@ void GetRuntimeSettings( ) // haydent: mouse scrolling 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) // get timer/clock initialization state