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