we don't use USE_CODE_PAGE anymore

This commit is contained in:
Marco Antonio J. Costa
2024-12-26 11:51:31 -03:00
committed by majcosta
parent 4ed7b1fb98
commit 6b9997b9c5
3 changed files with 0 additions and 54 deletions
-4
View File
@@ -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
-20
View File
@@ -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;
-30
View File
@@ -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