mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Turned WINFONTS macro into the ja2.ini property (USE_WINFONTS) (by scodec)
- Set USE_WINFONTS = 1, if you play Chinese version of 1.13, otherwise 0 (Default) - This is the first step in a process making only ONE executable file for ALL the different languages git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6488 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
int iResolution; // INI file
|
||||
int iPlayIntro;
|
||||
int iDisableMouseScrolling;
|
||||
int iUseWinFonts;
|
||||
/* WANNE, Sgt.Kolja
|
||||
* INI file (Windowed or Fullscreen)
|
||||
* REPLACE all defines WINDOWED_MODE with this variable
|
||||
|
||||
+247
-246
@@ -142,13 +142,13 @@ UINT32 uiRed, uiGreen, uiBlue;
|
||||
uiBlue=(UINT32)FontObjs[FontDefault]->pPaletteEntry[ubForeground].peBlue;
|
||||
|
||||
FontForeground16=Get16BPPColor(FROMRGB(uiRed, uiGreen, uiBlue));
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
uiRed=FROMRGB(uiRed, uiGreen, uiBlue);
|
||||
SetWinFontForeColor(GET_WINFONT(), &uiRed);
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
uiRed=FROMRGB(uiRed, uiGreen, uiBlue);
|
||||
SetWinFontForeColor(GET_WINFONT(), &uiRed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetFontShadow(UINT8 ubShadow )
|
||||
@@ -207,13 +207,13 @@ UINT32 uiRed, uiGreen, uiBlue;
|
||||
uiBlue=(UINT32)FontObjs[FontDefault]->pPaletteEntry[ubBackground].peBlue;
|
||||
|
||||
FontBackground16=Get16BPPColor(FROMRGB(uiRed, uiGreen, uiBlue));
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
uiRed=FROMRGB(uiRed, uiGreen, uiBlue);
|
||||
SetWinFontBackColor(GET_WINFONT(), &uiRed);
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
uiRed=FROMRGB(uiRed, uiGreen, uiBlue);
|
||||
SetWinFontBackColor(GET_WINFONT(), &uiRed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -570,14 +570,14 @@ INT16 StringPixLength(const STR16 string, INT32 UseFont)
|
||||
{
|
||||
UINT32 Cur;
|
||||
UINT16 *curletter,transletter;
|
||||
#ifdef WINFONTS
|
||||
INT32 MapFont;
|
||||
MapFont = WinFontMap[UseFont];
|
||||
if (MapFont !=-1 )
|
||||
{
|
||||
return(WinFontStringPixLength(string, MapFont));
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
INT32 MapFont;
|
||||
MapFont = WinFontMap[UseFont];
|
||||
if (MapFont !=-1 )
|
||||
{
|
||||
return(WinFontStringPixLength(string, MapFont));
|
||||
}
|
||||
}
|
||||
if (string == NULL)
|
||||
{
|
||||
return(0);
|
||||
@@ -699,14 +699,14 @@ UINT16 GetFontHeight(INT32 FontNum)
|
||||
Assert(FontNum >= 0);
|
||||
Assert(FontNum <= MAX_FONTS);
|
||||
Assert(FontObjs[FontNum]!=NULL);
|
||||
#ifdef WINFONTS
|
||||
INT32 MapFont;
|
||||
MapFont = WinFontMap[FontNum];
|
||||
if (FontNum != -1)
|
||||
{
|
||||
return (GetWinFontHeight(L"A", MapFont));
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
INT32 MapFont;
|
||||
MapFont = WinFontMap[FontNum];
|
||||
if (FontNum != -1)
|
||||
{
|
||||
return (GetWinFontHeight(L"A", MapFont));
|
||||
}
|
||||
}
|
||||
return((UINT16)GetHeight(FontObjs[FontNum], 0));
|
||||
}
|
||||
|
||||
@@ -753,19 +753,19 @@ 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
|
||||
@@ -809,17 +809,17 @@ CHAR16 GetUnicodeChar(CHAR16 siChar)
|
||||
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 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
|
||||
@@ -887,33 +887,33 @@ CHAR16 GetUnicodeChar(CHAR16 siChar)
|
||||
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; //Ÿ
|
||||
//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 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'
|
||||
@@ -922,10 +922,10 @@ CHAR16 GetUnicodeChar(CHAR16 siChar)
|
||||
//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; //œ
|
||||
//case 198: siChar = 198; break; //?
|
||||
//case 140: siChar = 338; break; //?
|
||||
//case 230: siChar = 230; break; //?
|
||||
//case 156: siChar = 339; break; //?
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -948,9 +948,9 @@ BOOLEAN SetFont(INT32 iFontIndex)
|
||||
SGP_THROW_IFFALSE( iFontIndex >= 0 ,"negative font index");
|
||||
SGP_THROW_IFFALSE( iFontIndex <= MAX_FONTS, "font index > MAX_FONTS" );
|
||||
SGP_THROW_IFFALSE( FontObjs[iFontIndex]!=NULL, "font is not initialized" );
|
||||
#ifdef WINFONTS
|
||||
SET_WINFONT(WinFontMap[iFontIndex]);
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
SET_WINFONT(WinFontMap[iFontIndex]);
|
||||
}
|
||||
FontDefault=iFontIndex;
|
||||
return(TRUE);
|
||||
}
|
||||
@@ -1002,13 +1002,13 @@ UINT8 *pDestBuf;
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
curletter=string;
|
||||
|
||||
@@ -1116,13 +1116,14 @@ UINT8 *pDestBuf;
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( iUseWinFonts ) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
curletter=string;
|
||||
|
||||
destx=x;
|
||||
@@ -1173,14 +1174,14 @@ UINT8 *pDestBuf;
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
|
||||
InvalidateRegion(x, y, x + StringPixLength(string, FontDefault), y + GetFontHeight(FontDefault));
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
|
||||
InvalidateRegion(x, y, x + StringPixLength(string, FontDefault), y + GetFontHeight(FontDefault));
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
curletter=string;
|
||||
|
||||
destx=x;
|
||||
@@ -1291,15 +1292,15 @@ CHAR16 string[512];
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
UnLockVideoSurface( CurrentSurface );
|
||||
PrintWinFont(CurrentSurface, GET_WINFONT(), x, y, string);
|
||||
pDestBuf = LockVideoSurface( CurrentSurface, &uiDestPitchBYTES );
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
UnLockVideoSurface( CurrentSurface );
|
||||
PrintWinFont(CurrentSurface, GET_WINFONT(), x, y, string);
|
||||
pDestBuf = LockVideoSurface( CurrentSurface, &uiDestPitchBYTES );
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
curletter=string;
|
||||
|
||||
destx=x;
|
||||
@@ -1343,15 +1344,15 @@ UINT16 usOldForeColor;
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
UnLockVideoSurface( CurrentSurface );
|
||||
PrintWinFont(CurrentSurface, GET_WINFONT(), x, y, pFontString);
|
||||
pDestBuf = LockVideoSurface( CurrentSurface, &uiDestPitchBYTES );
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
UnLockVideoSurface( CurrentSurface );
|
||||
PrintWinFont(CurrentSurface, GET_WINFONT(), x, y, pFontString);
|
||||
pDestBuf = LockVideoSurface( CurrentSurface, &uiDestPitchBYTES );
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
curletter=string;
|
||||
|
||||
destx=x;
|
||||
@@ -1413,13 +1414,13 @@ UINT8 *pDestBuf;
|
||||
va_start(argptr, pFontString); // Set up variable argument pointer
|
||||
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
|
||||
va_end(argptr);
|
||||
#ifdef WINFONTS
|
||||
if (GET_WINFONT() != -1)
|
||||
if ( iUseWinFonts ) {
|
||||
if (GET_WINFONT() != -1)
|
||||
{
|
||||
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, pFontString);
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
curletter=string;
|
||||
|
||||
destx=x;
|
||||
@@ -1814,252 +1815,252 @@ FontTranslationTable *CreateEnglishTransTable( )
|
||||
temp++;
|
||||
|
||||
// RUSSIAN letters in UNICODE
|
||||
*temp = 1040; //À
|
||||
*temp = 1040; //?
|
||||
temp++;
|
||||
*temp = 1041; //Á
|
||||
*temp = 1041; //?
|
||||
temp++;
|
||||
*temp = 1042; //Â
|
||||
*temp = 1042; //?
|
||||
temp++;
|
||||
*temp = 1043; //Ã
|
||||
*temp = 1043; //?
|
||||
temp++;
|
||||
*temp = 1044; //Ä
|
||||
*temp = 1044; //?
|
||||
temp++;
|
||||
*temp = 1045; //Å
|
||||
*temp = 1045; //?
|
||||
temp++;
|
||||
*temp = 1046; //Æ
|
||||
*temp = 1046; //?
|
||||
temp++;
|
||||
*temp = 1047; //Ç
|
||||
*temp = 1047; //?
|
||||
temp++;
|
||||
*temp = 1048; //È
|
||||
*temp = 1048; //?
|
||||
temp++;
|
||||
*temp = 1049; //É
|
||||
*temp = 1049; //?
|
||||
temp++;
|
||||
*temp = 1050; //Ê
|
||||
*temp = 1050; //?
|
||||
temp++;
|
||||
*temp = 1051; //Ë
|
||||
*temp = 1051; //?
|
||||
temp++;
|
||||
*temp = 1052; //Ì
|
||||
*temp = 1052; //?
|
||||
temp++;
|
||||
*temp = 1053; //Í
|
||||
*temp = 1053; //?
|
||||
temp++;
|
||||
*temp = 1054; //Î
|
||||
*temp = 1054; //?
|
||||
temp++;
|
||||
*temp = 1055; //Ï
|
||||
*temp = 1055; //?
|
||||
temp++;
|
||||
*temp = 1056; //Ð
|
||||
*temp = 1056; //?
|
||||
temp++;
|
||||
*temp = 1057; //Ñ
|
||||
*temp = 1057; //?
|
||||
temp++;
|
||||
*temp = 1058; //Ò
|
||||
*temp = 1058; //?
|
||||
temp++;
|
||||
*temp = 1059; //Ó
|
||||
*temp = 1059; //?
|
||||
temp++;
|
||||
*temp = 1060; //Ô
|
||||
*temp = 1060; //?
|
||||
temp++;
|
||||
*temp = 1061; //Õ
|
||||
*temp = 1061; //?
|
||||
temp++;
|
||||
*temp = 1062; //Ö
|
||||
*temp = 1062; //?
|
||||
temp++;
|
||||
*temp = 1063; //×
|
||||
*temp = 1063; //?
|
||||
temp++;
|
||||
*temp = 1064; //Ø
|
||||
*temp = 1064; //?
|
||||
temp++;
|
||||
*temp = 1065; //Ù
|
||||
*temp = 1065; //?
|
||||
temp++;
|
||||
*temp = 1066; //Ú
|
||||
*temp = 1066; //?
|
||||
temp++;
|
||||
*temp = 1067; //Û
|
||||
*temp = 1067; //?
|
||||
temp++;
|
||||
*temp = 1068; //Ü
|
||||
*temp = 1068; //?
|
||||
temp++;
|
||||
*temp = 1069; //Ý
|
||||
*temp = 1069; //?
|
||||
temp++;
|
||||
*temp = 1070; //Þ
|
||||
*temp = 1070; //?
|
||||
temp++;
|
||||
*temp = 1071; //ß
|
||||
*temp = 1071; //?
|
||||
temp++;
|
||||
*temp = 1072; // à
|
||||
*temp = 1072; // ?
|
||||
temp++;
|
||||
*temp = 1073; // á
|
||||
*temp = 1073; // ?
|
||||
temp++;
|
||||
*temp = 1074; // â
|
||||
*temp = 1074; // ?
|
||||
temp++;
|
||||
*temp = 1075; // ã
|
||||
*temp = 1075; // ?
|
||||
temp++;
|
||||
*temp = 1076; // ä
|
||||
*temp = 1076; // ?
|
||||
temp++;
|
||||
*temp = 1077; // å
|
||||
*temp = 1077; // ?
|
||||
temp++;
|
||||
*temp = 1078; // æ
|
||||
*temp = 1078; // ?
|
||||
temp++;
|
||||
*temp = 1079; // ç
|
||||
*temp = 1079; // ?
|
||||
temp++;
|
||||
*temp = 1080; // è
|
||||
*temp = 1080; // ?
|
||||
temp++;
|
||||
*temp = 1081; // é
|
||||
*temp = 1081; // ?
|
||||
temp++;
|
||||
*temp = 1082; // ê
|
||||
*temp = 1082; // ?
|
||||
temp++;
|
||||
*temp = 1083; // ë
|
||||
*temp = 1083; // ?
|
||||
temp++;
|
||||
*temp = 1084; // ì
|
||||
*temp = 1084; // ?
|
||||
temp++;
|
||||
*temp = 1085; // í
|
||||
*temp = 1085; // ?
|
||||
temp++;
|
||||
*temp = 1086; // î
|
||||
*temp = 1086; // ?
|
||||
temp++;
|
||||
*temp = 1087; // ï
|
||||
*temp = 1087; // ?
|
||||
temp++;
|
||||
*temp = 1088; // ð
|
||||
*temp = 1088; // ?
|
||||
temp++;
|
||||
*temp = 1089; // ñ
|
||||
*temp = 1089; // ?
|
||||
temp++;
|
||||
*temp = 1090; // ò
|
||||
*temp = 1090; // ?
|
||||
temp++;
|
||||
*temp = 1091; // ó
|
||||
*temp = 1091; // ?
|
||||
temp++;
|
||||
*temp = 1092; // ô
|
||||
*temp = 1092; // ?
|
||||
temp++;
|
||||
*temp = 1093; // õ
|
||||
*temp = 1093; // ?
|
||||
temp++;
|
||||
*temp = 1094; // ö
|
||||
*temp = 1094; // ?
|
||||
temp++;
|
||||
*temp = 1095; // ÷
|
||||
*temp = 1095; // ?
|
||||
temp++;
|
||||
*temp = 1096; // ø
|
||||
*temp = 1096; // ?
|
||||
temp++;
|
||||
*temp = 1097; // ù
|
||||
*temp = 1097; // ?
|
||||
temp++;
|
||||
*temp = 1098; // ú
|
||||
*temp = 1098; // ?
|
||||
temp++;
|
||||
*temp = 1099; // û
|
||||
*temp = 1099; // ?
|
||||
temp++;
|
||||
*temp = 1100; // ü
|
||||
*temp = 1100; // ?
|
||||
temp++;
|
||||
*temp = 1101; // ý
|
||||
*temp = 1101; // ?
|
||||
temp++;
|
||||
*temp = 1102; // þ
|
||||
*temp = 1102; // ?
|
||||
temp++;
|
||||
*temp = 1103; // ÿ
|
||||
temp++;
|
||||
|
||||
// BELORUSSIAN and UKRAINIAN letters in UNICODE
|
||||
*temp = 8470; // ¹
|
||||
*temp = 8470; // ?
|
||||
temp++;
|
||||
*temp = 1025; // ¨
|
||||
*temp = 1025; // ?
|
||||
temp++;
|
||||
*temp = 1030; // ²
|
||||
*temp = 1030; // ?
|
||||
temp++;
|
||||
*temp = 1038; // ¡
|
||||
*temp = 1038; // ?
|
||||
temp++;
|
||||
*temp = 1105; // ¸
|
||||
*temp = 1105; // ?
|
||||
temp++;
|
||||
*temp = 1110; // ³
|
||||
*temp = 1110; // ?
|
||||
temp++;
|
||||
*temp = 1118; // ¢
|
||||
*temp = 1118; // ?
|
||||
temp++;
|
||||
*temp = 1168; // ¥
|
||||
*temp = 1168; // ?
|
||||
temp++;
|
||||
*temp = 1028; // ª
|
||||
*temp = 1028; // ?
|
||||
temp++;
|
||||
*temp = 1031; // ¯
|
||||
*temp = 1031; // ?
|
||||
temp++;
|
||||
*temp = 1169; // ´
|
||||
*temp = 1169; // ?
|
||||
temp++;
|
||||
*temp = 1108; // º
|
||||
*temp = 1108; // ?
|
||||
temp++;
|
||||
*temp = 1111; // ¿
|
||||
*temp = 1111; // ?
|
||||
temp++;
|
||||
|
||||
// POLISH letters in UNICODE
|
||||
*temp = 260; // ¥ (on)
|
||||
*temp = 260; // ?(on)
|
||||
temp++;
|
||||
*temp = 262; // Æ (tse)
|
||||
*temp = 262; // ?(tse)
|
||||
temp++;
|
||||
*temp = 280; // Ê (en')
|
||||
*temp = 280; // ?(en')
|
||||
temp++;
|
||||
*temp = 321; // £ (el')
|
||||
*temp = 321; // ?(el')
|
||||
temp++;
|
||||
*temp = 323; // Ñ (en)
|
||||
*temp = 323; // ?(en)
|
||||
temp++;
|
||||
*temp = 211; // Ó (o kratkoe)
|
||||
*temp = 211; // ?(o kratkoe)
|
||||
temp++;
|
||||
*temp = 346; // Œ (es')
|
||||
*temp = 346; // ?(es')
|
||||
temp++;
|
||||
*temp = 379; // ¯ (zhet)
|
||||
*temp = 379; // ?(zhet)
|
||||
temp++;
|
||||
*temp = 377; // � (zet)
|
||||
*temp = 377; // ?(zet)
|
||||
temp++;
|
||||
*temp = 261; // ¹ (îí)
|
||||
*temp = 261; // ?(îí)
|
||||
temp++;
|
||||
*temp = 263; // æ (öå)
|
||||
*temp = 263; // ?(öå)
|
||||
temp++;
|
||||
*temp = 281; // ê (ýí)
|
||||
*temp = 281; // ?(ýí)
|
||||
temp++;
|
||||
*temp = 322; // ³ (ýëü)
|
||||
*temp = 322; // ?(ýë?
|
||||
temp++;
|
||||
*temp = 324; // ñ (ýíü)
|
||||
*temp = 324; // ?(ýí?
|
||||
temp++;
|
||||
*temp = 243; // ó (î êðàòêîå)
|
||||
*temp = 243; // ?(?êðàòêî?
|
||||
temp++;
|
||||
*temp = 347; // œ (ýñü)
|
||||
*temp = 347; // ?(ýñ?
|
||||
temp++;
|
||||
*temp = 380; // ¿ (æåò)
|
||||
*temp = 380; // ?(æå?
|
||||
temp++;
|
||||
*temp = 378; // Ÿ (çåò)
|
||||
*temp = 378; // ?(çå?
|
||||
temp++;
|
||||
|
||||
// FRENCH and ITALIAN letters in UNICODE
|
||||
*temp = 192; //À
|
||||
*temp = 192; //?
|
||||
temp++;
|
||||
*temp = 194; //Â
|
||||
*temp = 194; //?
|
||||
temp++;
|
||||
*temp = 199; //Ç
|
||||
*temp = 199; //?
|
||||
temp++;
|
||||
*temp = 200; //È
|
||||
*temp = 200; //?
|
||||
temp++;
|
||||
*temp = 201; //É
|
||||
*temp = 201; //?
|
||||
temp++;
|
||||
*temp = 202; //Ê
|
||||
*temp = 202; //?
|
||||
temp++;
|
||||
*temp = 203; //Ë
|
||||
*temp = 203; //?
|
||||
temp++;
|
||||
*temp = 206; //Î
|
||||
*temp = 206; //?
|
||||
temp++;
|
||||
*temp = 207; //Ï
|
||||
*temp = 207; //?
|
||||
temp++;
|
||||
*temp = 212; //Ô
|
||||
*temp = 212; //?
|
||||
temp++;
|
||||
*temp = 217; //Ù
|
||||
*temp = 217; //?
|
||||
temp++;
|
||||
*temp = 219; //Û
|
||||
*temp = 219; //?
|
||||
temp++;
|
||||
*temp = 376; //Ÿ
|
||||
*temp = 376; //?
|
||||
temp++;
|
||||
//small letters
|
||||
*temp = 224; //à
|
||||
*temp = 224; //?
|
||||
temp++;
|
||||
*temp = 226; //â
|
||||
*temp = 226; //?
|
||||
temp++;
|
||||
*temp = 231; //ç
|
||||
*temp = 231; //?
|
||||
temp++;
|
||||
*temp = 232; //è
|
||||
*temp = 232; //?
|
||||
temp++;
|
||||
*temp = 233; //é
|
||||
*temp = 233; //?
|
||||
temp++;
|
||||
*temp = 234; //ê
|
||||
*temp = 234; //?
|
||||
temp++;
|
||||
*temp = 235; //ë
|
||||
*temp = 235; //?
|
||||
temp++;
|
||||
*temp = 238; //î
|
||||
*temp = 238; //?
|
||||
temp++;
|
||||
*temp = 239; //ï
|
||||
*temp = 239; //?
|
||||
temp++;
|
||||
*temp = 244; //ô
|
||||
*temp = 244; //?
|
||||
temp++;
|
||||
*temp = 249; //ù
|
||||
*temp = 249; //?
|
||||
temp++;
|
||||
*temp = 251; //û
|
||||
*temp = 251; //?
|
||||
temp++;
|
||||
*temp = 255; //ÿ
|
||||
temp++;
|
||||
@@ -2074,13 +2075,13 @@ FontTranslationTable *CreateEnglishTransTable( )
|
||||
temp++;
|
||||
|
||||
//French ligatures
|
||||
*temp = 198; //Æ
|
||||
*temp = 198; //?
|
||||
temp++;
|
||||
*temp = 338; //Œ
|
||||
*temp = 338; //?
|
||||
temp++;
|
||||
*temp = 230; //æ
|
||||
*temp = 230; //?
|
||||
temp++;
|
||||
*temp = 339; //œ
|
||||
*temp = 339; //?
|
||||
temp++;
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#include "Types.h"
|
||||
#include "himage.h"
|
||||
#include "vobject.h"
|
||||
#ifdef WINFONTS
|
||||
//#ifdef WINFONTS
|
||||
#include "WinFont.h"
|
||||
#endif
|
||||
//#endif
|
||||
#include "Font Control.h"
|
||||
|
||||
#define DEFAULT_SHADOW 2
|
||||
|
||||
@@ -1646,7 +1646,7 @@ void GetRuntimeSettings( )
|
||||
|
||||
// WANNE: Should we play the intro?
|
||||
iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile );
|
||||
|
||||
iUseWinFonts = (int) GetPrivateProfileInt( "Ja2 Settings","USE_WINFONTS", iUseWinFonts, INIFile,);
|
||||
|
||||
// haydent: mouse scrolling
|
||||
iDisableMouseScrolling = (int) GetPrivateProfileInt( "Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling, INIFile );
|
||||
@@ -1688,6 +1688,8 @@ void GetRuntimeSettings( )
|
||||
// WANNE: Should we play the intro?
|
||||
iPlayIntro = (int)oProps.getIntProperty("Ja2 Settings","PLAY_INTRO", iPlayIntro);
|
||||
|
||||
iUseWinFonts= (int)oProps.getIntProperty("Ja2 Settings","USE_WINFONTS", iUseWinFonts);
|
||||
|
||||
// haydent: mouse scrolling
|
||||
iDisableMouseScrolling = (int)oProps.getIntProperty("Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling);
|
||||
|
||||
|
||||
@@ -117,9 +117,8 @@ static LPDIRECTDRAWSURFACE _gpBackBuffer = NULL;
|
||||
extern RECT rcWindow;
|
||||
extern POINT ptWindowSize;
|
||||
|
||||
#ifdef WINFONTS
|
||||
UINT32 CurrentSurface = BACKBUFFER;
|
||||
#endif
|
||||
UINT32 CurrentSurface = BACKBUFFER;
|
||||
|
||||
//
|
||||
// Globals for mouse cursor
|
||||
//
|
||||
@@ -2640,12 +2639,12 @@ LPDIRECTDRAWSURFACE2 GetFrameBufferObject(void)
|
||||
LPDIRECTDRAWSURFACE2 GetMouseBufferObject(void)
|
||||
{
|
||||
Assert( gpPrimarySurface != NULL );
|
||||
#ifdef WINFONTS
|
||||
//It's a damn bug.
|
||||
return gpMouseCursorOriginal;
|
||||
#else
|
||||
return gpMouseCursor;
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
//It's a damn bug.
|
||||
return gpMouseCursorOriginal;
|
||||
} else {
|
||||
return gpMouseCursor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
extern HWND ghWindow;
|
||||
extern UINT32 guiMouseBufferState; // BUFFER_READY, BUFFER_DIRTY, BUFFER_DISABLED
|
||||
#ifdef WINFONTS
|
||||
//#ifdef WINFONTS
|
||||
extern UINT32 CurrentSurface;
|
||||
#endif
|
||||
//#endif
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -453,9 +453,9 @@ BYTE *LockVideoSurface( UINT32 uiVSurface, UINT32 *puiPitch )
|
||||
{
|
||||
VSURFACE_NODE *curr;
|
||||
|
||||
#ifdef WINFONTS
|
||||
CurrentSurface = uiVSurface;
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
CurrentSurface = uiVSurface;
|
||||
}
|
||||
//
|
||||
// Check if given backbuffer or primary buffer
|
||||
//
|
||||
|
||||
@@ -225,9 +225,9 @@ BOOLEAN InitializeFonts( )
|
||||
gfFontsInit = TRUE;
|
||||
|
||||
// ATE: Init WinFont System and any winfonts we wish...
|
||||
#ifdef WINFONTS
|
||||
InitWinFonts( );
|
||||
#endif
|
||||
if ( iUseWinFonts ) {
|
||||
InitWinFonts( );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -255,9 +255,9 @@ void ShutdownFonts( )
|
||||
#endif
|
||||
|
||||
// ATE: Shutdown any win fonts
|
||||
#ifdef WINFONTS
|
||||
if ( iUseWinFonts ) {
|
||||
ShutdownWinFonts();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// Set shades for fonts
|
||||
|
||||
Reference in New Issue
Block a user