From 7c84a2cea634c29d935d1fa6219e826a01b0950a Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Sun, 5 Jan 2025 17:43:41 -0300 Subject: [PATCH] Get rid of comments with language preprocessor symbols on them for cleanup --- Ja2/Init.cpp | 5 -- Ja2/JA2 Splash.cpp | 2 +- Laptop/AimMembers.cpp | 64 ------------- TacticalAI/NPC.h | 9 -- Utils/Encrypted File.cpp | 133 --------------------------- sgp/Font.cpp | 188 --------------------------------------- 6 files changed, 1 insertion(+), 400 deletions(-) diff --git a/Ja2/Init.cpp b/Ja2/Init.cpp index bf74dbf3c..2747b0c6c 100644 --- a/Ja2/Init.cpp +++ b/Ja2/Init.cpp @@ -97,11 +97,6 @@ extern BOOLEAN GetCDromDriveLetter( STR8 pString ); extern BOOLEAN gfUseConsecutiveQuickSaveSlots; #endif -#if defined( GERMAN ) && !defined( _DEBUG ) - //#define LASERLOCK_ENABLED -#endif - - #ifdef LASERLOCK_ENABLED int LASERLOK_Init( HINSTANCE hInstance ); int LASERLOK_Run(); diff --git a/Ja2/JA2 Splash.cpp b/Ja2/JA2 Splash.cpp index c7d9634da..fa0a08e60 100644 --- a/Ja2/JA2 Splash.cpp +++ b/Ja2/JA2 Splash.cpp @@ -70,7 +70,7 @@ if( g_lang == i18n::Lang::en ) { GetVideoSurface( &hVSurface, uiLogoID ); BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, iScreenWidthOffset, iScreenHeightOffset, 0, NULL ); DeleteVideoSurfaceFromIndex( uiLogoID ); -} // ENGLISH +} InvalidateScreen(); RefreshScreen( NULL ); diff --git a/Laptop/AimMembers.cpp b/Laptop/AimMembers.cpp index 490d0a633..dbc6234ab 100644 --- a/Laptop/AimMembers.cpp +++ b/Laptop/AimMembers.cpp @@ -1475,38 +1475,6 @@ BOOLEAN LoadMercBioInfo(UINT8 ubIndex, STR16 pInfoString, STR16 pAddInfo) return( FALSE ); } - //// Decrement, by 1, any value > 32 - //for(i=0; (i 33 ) - // pInfoString[i] -= 1; - // #ifdef POLISH - // switch( pInfoString[ i ] ) - // { - // case 260: pInfoString[ i ] = 165; break; - // case 262: pInfoString[ i ] = 198; break; - // case 280: pInfoString[ i ] = 202; break; - // case 321: pInfoString[ i ] = 163; break; - // case 323: pInfoString[ i ] = 209; break; - // case 211: pInfoString[ i ] = 211; break; - - // case 346: pInfoString[ i ] = 338; break; - // case 379: pInfoString[ i ] = 175; break; - // case 377: pInfoString[ i ] = 143; break; - // case 261: pInfoString[ i ] = 185; break; - // case 263: pInfoString[ i ] = 230; break; - // case 281: pInfoString[ i ] = 234; break; - - // case 322: pInfoString[ i ] = 179; break; - // case 324: pInfoString[ i ] = 241; break; - // case 243: pInfoString[ i ] = 243; break; - // case 347: pInfoString[ i ] = 339; break; - // case 380: pInfoString[ i ] = 191; break; - // case 378: pInfoString[ i ] = 376; break; - // } - // #endif - //} - DecodeString(pInfoString, SIZE_MERC_BIO_INFO); // Get the additional info @@ -1521,38 +1489,6 @@ BOOLEAN LoadMercBioInfo(UINT8 ubIndex, STR16 pInfoString, STR16 pAddInfo) return( FALSE ); } - //// Decrement, by 1, any value > 32 - //for(i=0; (i 33 ) - // pAddInfo[i] -= 1; - // #ifdef POLISH - // switch( pAddInfo[ i ] ) - // { - // case 260: pAddInfo[ i ] = 165; break; - // case 262: pAddInfo[ i ] = 198; break; - // case 280: pAddInfo[ i ] = 202; break; - // case 321: pAddInfo[ i ] = 163; break; - // case 323: pAddInfo[ i ] = 209; break; - // case 211: pAddInfo[ i ] = 211; break; - - // case 346: pAddInfo[ i ] = 338; break; - // case 379: pAddInfo[ i ] = 175; break; - // case 377: pAddInfo[ i ] = 143; break; - // case 261: pAddInfo[ i ] = 185; break; - // case 263: pAddInfo[ i ] = 230; break; - // case 281: pAddInfo[ i ] = 234; break; - - // case 322: pAddInfo[ i ] = 179; break; - // case 324: pAddInfo[ i ] = 241; break; - // case 243: pAddInfo[ i ] = 243; break; - // case 347: pAddInfo[ i ] = 339; break; - // case 380: pAddInfo[ i ] = 191; break; - // case 378: pAddInfo[ i ] = 376; break; - // } - // #endif - //} - DecodeString(pAddInfo, SIZE_MERC_BIO_INFO); FileClose(hFile); diff --git a/TacticalAI/NPC.h b/TacticalAI/NPC.h index a52cb3e86..bf3f2bdde 100644 --- a/TacticalAI/NPC.h +++ b/TacticalAI/NPC.h @@ -37,11 +37,6 @@ //WANNE - BMP: DONE! typedef struct { -//SB: unify structure for all versions -// #if defined( CRIPPLED_VERSION ) || defined( RUSSIAN ) -// UINT8 ubIdentifier[4]; -// #endif - UINT16 fFlags; // conditions @@ -73,11 +68,7 @@ typedef struct UINT16 usGoToGridno; INT16 sActionData; // special action value -//SB: unify structure for all versions -//#if !defined( CRIPPLED_VERSION ) && !defined( RUSSIAN ) UINT8 ubUnused[4]; -//#endif - } _old_NPCQuoteInfo; // 32 bytes //dnl ch46 021009 diff --git a/Utils/Encrypted File.cpp b/Utils/Encrypted File.cpp index 20fba5448..1838fca14 100644 --- a/Utils/Encrypted File.cpp +++ b/Utils/Encrypted File.cpp @@ -95,138 +95,5 @@ void DecodeString(STR16 pDestString, UINT32 uiSeekAmount) { if( pDestString[i] > 33 ) pDestString[i] -= 1; - - //#ifdef GERMAN - // //switch( pDestString[ i ] ) - // //{ - // // // ü - // // case 252: pDestString[i] = 252; break; - // // // Ü - // // case 220: pDestString[i] = 220; break; - // // // ä - // // case 228: pDestString[i] = 228; break; - // // // Ä - // // case 196: pDestString[i] = 196; break; - // // // ö - // // case 246: pDestString[i] = 246; break; - // // // Ö - // // case 214: pDestString[i] = 214; break; - // // // ß - // // case 223: pDestString[i] = 223; break; - // //} - //#endif - - //#ifdef RUSSIAN - // switch( pDestString[ i ] ) - // { - // //capital letters - // case 168: pDestString[ i ] = 1025; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - // case 192: pDestString[ i ] = 1040; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - // case 193: pDestString[ i ] = 1041; break; - // case 194: pDestString[ i ] = 1042; break; - // case 195: pDestString[ i ] = 1043; break; - // case 196: pDestString[ i ] = 1044; break; - // case 197: pDestString[ i ] = 1045; break; - // case 198: pDestString[ i ] = 1046; break; - // case 199: pDestString[ i ] = 1047; break; - // case 200: pDestString[ i ] = 1048; break; - // case 201: pDestString[ i ] = 1049; break; - // case 202: pDestString[ i ] = 1050; break; - // case 203: pDestString[ i ] = 1051; break; - // case 204: pDestString[ i ] = 1052; break; - // case 205: pDestString[ i ] = 1053; break; - // case 206: pDestString[ i ] = 1054; break; - // case 207: pDestString[ i ] = 1055; break; - // case 208: pDestString[ i ] = 1056; break; - // case 209: pDestString[ i ] = 1057; break; - // case 210: pDestString[ i ] = 1058; break; - // case 211: pDestString[ i ] = 1059; break; - // case 212: pDestString[ i ] = 1060; break; - // case 213: pDestString[ i ] = 1061; break; - // case 214: pDestString[ i ] = 1062; break; - // case 215: pDestString[ i ] = 1063; break; - // case 216: pDestString[ i ] = 1064; break; - // case 217: pDestString[ i ] = 1065; break; - // case 218: pDestString[ i ] = 1066; break; - // case 219: pDestString[ i ] = 1067; break; - // case 220: pDestString[ i ] = 1068; break; - // case 221: pDestString[ i ] = 1069; break; - // case 222: pDestString[ i ] = 1070; break; - // case 223: pDestString[ i ] = 1071; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - // //small letters - // case 184: pDestString[ i ] = 1105; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - //case 185: pDestString[ i ] = 8470; break; // ? - //case 178: pDestString[ i ] = 1030; break; // ? - //case 161: pDestString[ i ] = 1038; break; // í - //case 179: pDestString[ i ] = 1110; break; // ? - //case 162: pDestString[ i ] = 1118; break; // ó - //case 165: pDestString[ i ] = 1168; break; // Ñ - //case 170: pDestString[ i ] = 1028; break; // ¬ - //case 175: pDestString[ i ] = 1031; break; // » - //case 180: pDestString[ i ] = 1169; break; // ? - //case 186: pDestString[ i ] = 1108; break; // ? - //case 191: pDestString[ i ] = 1111; break; // ? - // case 224: pDestString[ i ] = 1072; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - // case 225: pDestString[ i ] = 1073; break; - // case 226: pDestString[ i ] = 1074; break; - // case 227: pDestString[ i ] = 1075; break; - // case 228: pDestString[ i ] = 1076; break; - // case 229: pDestString[ i ] = 1077; break; - // case 230: pDestString[ i ] = 1078; break; - // case 231: pDestString[ i ] = 1079; break; - // case 232: pDestString[ i ] = 1080; break; - // case 233: pDestString[ i ] = 1081; break; - // case 234: pDestString[ i ] = 1082; break; - // case 235: pDestString[ i ] = 1083; break; - // case 236: pDestString[ i ] = 1084; break; - // case 237: pDestString[ i ] = 1085; break; - // case 238: pDestString[ i ] = 1086; break; - // case 239: pDestString[ i ] = 1087; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - // case 240: pDestString[ i ] = 1088; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - // case 241: pDestString[ i ] = 1089; break; - // case 242: pDestString[ i ] = 1090; break; - // case 243: pDestString[ i ] = 1091; break; - // case 244: pDestString[ i ] = 1092; break; - // case 245: pDestString[ i ] = 1093; break; - // case 246: pDestString[ i ] = 1094; break; - // case 247: pDestString[ i ] = 1095; break; - // case 248: pDestString[ i ] = 1096; break; - // case 249: pDestString[ i ] = 1097; break; - // case 250: pDestString[ i ] = 1098; break; - // case 251: pDestString[ i ] = 1099; break; - // case 252: pDestString[ i ] = 1100; break; - // case 253: pDestString[ i ] = 1101; break; - // case 254: pDestString[ i ] = 1102; break; - // case 255: pDestString[ i ] = 1103; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - - // } - //#endif - - //#ifdef POLISH - // switch( pDestString[ i ] ) - // { - // case 165: pDestString[ i ] = 260; break; - // case 198: pDestString[ i ] = 262; break; - // case 202: pDestString[ i ] = 280; break; - // case 163: pDestString[ i ] = 321; break; - // case 209: pDestString[ i ] = 323; break; - // case 211: pDestString[ i ] = 211; break; - - // case 338: pDestString[ i ] = 346; break; - // case 175: pDestString[ i ] = 379; break; - // case 143: pDestString[ i ] = 377; break; - // case 185: pDestString[ i ] = 261; break; - // case 230: pDestString[ i ] = 263; break; - // case 234: pDestString[ i ] = 281; break; - - // case 179: pDestString[ i ] = 322; break; - // case 241: pDestString[ i ] = 324; break; - // case 243: pDestString[ i ] = 243; break; - // case 339: pDestString[ i ] = 347; break; - // case 191: pDestString[ i ] = 380; break; - // case 376: pDestString[ i ] = 378; break; - // } - //#endif } } diff --git a/sgp/Font.cpp b/sgp/Font.cpp index 5caa433b7..3d1851040 100644 --- a/sgp/Font.cpp +++ b/sgp/Font.cpp @@ -763,194 +763,6 @@ INT16 GetIndex(CHAR16 siChar) return 0; } -//inshy: We don't need anymore ANSI convertation to UNICODE. -/* -CHAR16 GetUnicodeChar(CHAR16 siChar) -{ - #ifdef GERMAN - //switch( siChar ) - //{ - // // ? - // case 252: siChar = 252; break; - // // ? - // case 220: siChar = 220; break; - // // ? - // case 228: siChar = 228; break; - // // ? - // case 196: siChar = 196; break; - // // ? - // case 246: siChar = 246; break; - // // ? - // case 214: siChar = 214; break; - // // ? - // case 223: siChar = 223; break; - //} - #endif - - #ifdef RUSSIAN - switch( siChar ) - { - //capital letters - case 168: siChar = 1025; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - case 192: siChar = 1040; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - case 193: siChar = 1041; break; - case 194: siChar = 1042; break; - case 195: siChar = 1043; break; - case 196: siChar = 1044; break; - case 197: siChar = 1045; break; - case 198: siChar = 1046; break; - case 199: siChar = 1047; break; - case 200: siChar = 1048; break; - case 201: siChar = 1049; break; - case 202: siChar = 1050; break; - case 203: siChar = 1051; break; - case 204: siChar = 1052; break; - case 205: siChar = 1053; break; - case 206: siChar = 1054; break; - case 207: siChar = 1055; break; - case 208: siChar = 1056; break; - case 209: siChar = 1057; break; - case 210: siChar = 1058; break; - case 211: siChar = 1059; break; - case 212: siChar = 1060; break; - case 213: siChar = 1061; break; - case 214: siChar = 1062; break; - case 215: siChar = 1063; break; - case 216: siChar = 1064; break; - case 217: siChar = 1065; break; - case 218: siChar = 1066; break; - case 219: siChar = 1067; break; - case 220: siChar = 1068; break; - case 221: siChar = 1069; break; - case 222: siChar = 1070; break; - case 223: siChar = 1071; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - //small letters - case 185: siChar = 8470; break; // ? - case 178: siChar = 1030; break; // ? - case 161: siChar = 1038; break; // ? - case 179: siChar = 1110; break; // ? - case 162: siChar = 1118; break; // ? - case 165: siChar = 1168; break; // ? - case 170: siChar = 1028; break; // ? - case 175: siChar = 1031; break; // ? - case 180: siChar = 1169; break; // ? - case 186: siChar = 1108; break; // ? - case 191: siChar = 1111; break; // ? - - case 184: siChar = 1105; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - case 224: siChar = 1072; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - case 225: siChar = 1073; break; - case 226: siChar = 1074; break; - case 227: siChar = 1075; break; - case 228: siChar = 1076; break; - case 229: siChar = 1077; break; - case 230: siChar = 1078; break; - case 231: siChar = 1079; break; - case 232: siChar = 1080; break; - case 233: siChar = 1081; break; - case 234: siChar = 1082; break; - case 235: siChar = 1083; break; - case 236: siChar = 1084; break; - case 237: siChar = 1085; break; - case 238: siChar = 1086; break; - case 239: siChar = 1087; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - case 240: siChar = 1088; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - case 241: siChar = 1089; break; - case 242: siChar = 1090; break; - case 243: siChar = 1091; break; - case 244: siChar = 1092; break; - case 245: siChar = 1093; break; - case 246: siChar = 1094; break; - case 247: siChar = 1095; break; - case 248: siChar = 1096; break; - case 249: siChar = 1097; break; - case 250: siChar = 1098; break; - case 251: siChar = 1099; break; - case 252: siChar = 1100; break; - case 253: siChar = 1101; break; - case 254: siChar = 1102; break; - case 255: siChar = 1103; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - } - #endif - - #ifdef POLISH - switch( siChar ) - { - case 165: siChar = 260; break; - case 198: siChar = 262; break; - case 202: siChar = 280; break; - case 163: siChar = 321; break; - case 209: siChar = 323; break; - case 211: siChar = 211; break; - - case 140: siChar = 346; break; - case 175: siChar = 379; break; - case 143: siChar = 377; break; - case 185: siChar = 261; break; - case 230: siChar = 263; break; - case 234: siChar = 281; break; - - case 179: siChar = 322; break; - case 241: siChar = 324; break; - case 243: siChar = 243; break; - case 156: siChar = 347; break; - case 191: siChar = 380; break; - case 159: siChar = 378; break; - } - #endif - - #ifdef FRENCH - switch( siChar ) - { - //capital letters - //case 192: siChar = 192; break; //? - //case 194: siChar = 194; break; //? - //case 199: siChar = 199; break; //? - //case 200: siChar = 200; break; //? - //case 201: siChar = 201; break; //? - //case 202: siChar = 202; break; //? - //case 203: siChar = 203; break; //? - //case 206: siChar = 206; break; //? - //case 207: siChar = 207; break; //? - //case 212: siChar = 212; break; //? - //case 217: siChar = 217; break; //? - //case 219: siChar = 219; break; //? - case 143: siChar = 376; break; //? - - //small letters - //case 224: siChar = 224; break; //? - //case 226: siChar = 226; break; //? - //case 231: siChar = 231; break; //? - //case 232: siChar = 232; break; //? - //case 233: siChar = 233; break; //? - //case 234: siChar = 234; break; //? - //case 235: siChar = 235; break; //? - //case 238: siChar = 238; break; //? - //case 239: siChar = 239; break; //? - //case 244: siChar = 244; break; //? - //case 249: siChar = 249; break; //? - //case 251: siChar = 251; break; //? - //case 255: siChar = 255; break; //ÿ -//inshy: italian letters - //case 204: siChar = 204; break; //I' - //case 236: siChar = 236; break; //i' - //case 210: siChar = 210; break; //O' - //case 242: siChar = 242; break; //o' -//inshy: French ligatures - //Ligature - //case 198: siChar = 198; break; //? - //case 140: siChar = 338; break; //? - //case 230: siChar = 230; break; //? - //case 156: siChar = 339; break; //? - - } - #endif - - return siChar; -} -*/ - //***************************************************************************** // SetFont //