- Added Chinese language support (thx to Noword from TBS)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2424 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2008-11-20 07:43:57 +00:00
parent 55059caf3b
commit 032fd1f353
29 changed files with 6111 additions and 366 deletions
+12
View File
@@ -202,6 +202,9 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
#endif
#ifdef TAIWANESE
strcat(fileName, TAIWANESE_PREFIX); // add Polish. prefix to filename
#endif
#ifdef CHINESE
strcat(fileName, CHINESE_PREFIX); // add Polish. prefix to filename
#endif
strcat(fileName, AMMOFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
@@ -259,6 +262,9 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
#ifdef TAIWANESE
AddLanguagePrefix( fileName, TAIWANESE_PREFIX);
#endif
#ifdef CHINESE
AddLanguagePrefix( fileName, CHINESE_PREFIX);
#endif
#ifndef ENGLISH
if ( FileExists(fileName) )
{
@@ -360,6 +366,9 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
#ifdef TAIWANESE
AddLanguagePrefix( fileName, TAIWANESE_PREFIX);
#endif
#ifdef CHINESE
AddLanguagePrefix( fileName, CHINESE_PREFIX);
#endif
#ifndef ENGLISH
if ( FileExists(fileName) )
{
@@ -504,6 +513,9 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
#ifdef TAIWANESE
AddLanguagePrefix( fileName, TAIWANESE_PREFIX);
#endif
#ifdef CHINESE
AddLanguagePrefix( fileName, TAIWANESE_PREFIX);
#endif
#ifndef ENGLISH
if ( FileExists(fileName) )
{
+2
View File
@@ -16,6 +16,8 @@
# pragma message(" (Language set to ITALIAN, You'll need italian CDs)")
#elif defined(TAIWANESE)
# pragma message(" (Language set to TAIWANESE, You'll need taiwanese CDs)")
#elif defined(CHINESE)
# pragma message(" (Language set to CHINESE, You'll need chinese CDs)")
#else
# error "At least You have to specify a Language somewhere. See comments above."
#endif
+6 -2
View File
@@ -18,7 +18,7 @@
* (2006-10-10, Sergeant_Kolja)
*/
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE)
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE) && !defined(CHINESE)
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
#define ENGLISH
//#define GERMAN
@@ -29,6 +29,10 @@
//#define ITALIAN
//#define TAIWANESE
// If we like to build chinese version, we also have to define WINFONTS
//#define CHINESE
//#define WINFONTS
#endif
@@ -37,7 +41,7 @@
* Regardless of if we did it Workspace wide or by uncommenting above,
* HERE we must see, what language was selected. If one, we
*/
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE)
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE) && !defined(CHINESE)
# error "At least You have to specify a Language somewhere. See comments above."
#endif
+4 -4
View File
@@ -1876,13 +1876,13 @@ BOOLEAN DisplayVideoConferencingDisplay()
UINT16 usActualWidth;
UINT16 usActualHeight;
UINT16 usPosX;
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
//never use it anymore
// SET_USE_WINFONTS( TRUE );
// SET_WINFONT( giSubTitleWinFont );
iAimMembersBoxId = PrepareMercPopupBox( iAimMembersBoxId ,BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gsTalkingMercText, 300, 0, 0, 0, &usActualWidth, &usActualHeight);
SET_USE_WINFONTS( FALSE );
// SET_USE_WINFONTS( FALSE );
usPosX = iScreenWidthOffset + ( 613 - usActualWidth ) / 2 ;
+4 -3
View File
@@ -1594,11 +1594,12 @@ void DisplayTextForSpeckVideoPopUp(STR16 pString)
DrawMercVideoBackGround();
}
//never use it anymore
//SET_USE_WINFONTS( TRUE );
//SET_WINFONT( giSubTitleWinFont );
//Create the popup box
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
iMercPopUpBox = PrepareMercPopupBox( iMercPopUpBox, BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gsSpeckDialogueTextPopUp, 300, 0, 0, 0, &gusSpeckDialogueActualWidth, &usActualHeight);
SET_USE_WINFONTS( FALSE );
//SET_USE_WINFONTS( FALSE );
gusSpeckDialogueX = iScreenWidthOffset + 111 + ((640 - 111) / 2 - (gusSpeckDialogueActualWidth / 2));
+187 -115
View File
@@ -135,7 +135,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
}
void SetFontShadow(UINT8 ubShadow )
@@ -189,6 +195,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
}
@@ -545,7 +558,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 (string == NULL)
{
return(0);
@@ -639,7 +659,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
return((UINT16)GetHeight(FontObjs[FontNum], 0));
}
@@ -684,19 +711,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
@@ -742,12 +769,12 @@ CHAR16 GetUnicodeChar(CHAR16 siChar)
//small letters
case 185: siChar = 8470; break; // ?
case 178: siChar = 1030; break; // ?
case 161: siChar = 1038; 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 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; // ?
@@ -828,7 +855,9 @@ BOOLEAN SetFont(INT32 iFontIndex)
Assert(iFontIndex >= 0);
Assert(iFontIndex <= MAX_FONTS);
Assert(FontObjs[iFontIndex]!=NULL);
#ifdef WINFONTS
SET_WINFONT(WinFontMap[iFontIndex]);
#endif
FontDefault=iFontIndex;
return(TRUE);
}
@@ -880,6 +909,14 @@ 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
curletter=string;
destx=x;
@@ -986,7 +1023,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)
{
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, string);
return(0);
}
#endif
curletter=string;
destx=x;
@@ -1037,7 +1080,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
curletter=string;
destx=x;
@@ -1148,7 +1198,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
curletter=string;
destx=x;
@@ -1192,7 +1250,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
curletter=string;
destx=x;
@@ -1254,7 +1320,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)
{
PrintWinFont(FontDestBuffer, GET_WINFONT(), x, y, pFontString);
return(0);
}
#endif
curletter=string;
destx=x;
@@ -1641,199 +1713,199 @@ 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; // ¥ (îí)
*temp = 260; // ?(îí)
temp++;
*temp = 262; // Æ (öå)
*temp = 262; // ?(öå)
temp++;
*temp = 280; // Ê (ýí)
*temp = 280; // ?(ýí)
temp++;
*temp = 321; // £ (ýëü)
*temp = 321; // ?(ýë?
temp++;
*temp = 323; // Ñ (ýíü)
*temp = 323; // ?(ýí?
temp++;
*temp = 211; // Ó (î êðàòêîå)
*temp = 211; // ?(?êðàòêî?
temp++;
*temp = 346; // Œ (ýñü)
*temp = 346; // ?(ýñ?
temp++;
*temp = 379; // ¯ (æåò)
*temp = 379; // ?(æå?
temp++;
*temp = 377; // (çåò)
*temp = 377; // ?(çå?
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++;
// Font glyphs for spell targeting icons
+5 -2
View File
@@ -4,7 +4,10 @@
#include "Types.h"
#include "himage.h"
#include "vobject.h"
#ifdef WINFONTS
#include "WinFont.h"
#endif
#include "Font Control.h"
#define DEFAULT_SHADOW 2
#define MILITARY_SHADOW 67
@@ -184,4 +187,4 @@ void FindFontCenterCoordinates( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHe
#endif
CHAR16 GetUnicodeChar(CHAR16 siChar);
CHAR16 GetUnicodeChar(CHAR16 siChar);
+284 -126
View File
@@ -20,66 +20,259 @@
#include <ddraw.h>
#include "winfont.h"
#include "font.h"
#include "Font Control.h"
INT32 FindFreeWinFont( void );
BOOLEAN gfEnumSucceed = FALSE;
#define MAX_WIN_FONTS 10
#ifdef CHINESE
#define DEC_INTERNAL_LEADING
#endif
// Private struct not to be exported
// to other modules
typedef struct
{
HFONT hFont;
COLORVAL ForeColor;
COLORVAL BackColor;
UINT8 Height;
UINT8 Width[0x80];
#ifdef DEC_INTERNAL_LEADING
UINT8 InternalLeading;
#endif
} HWINFONT;
LOGFONT gLogFont;
LONG gWinFontAdjust;
HWINFONT WinFonts[WIN_LASTFONT];
HWINFONT WinFonts[ MAX_WIN_FONTS ];
INT32 WinFontMap[MAX_WINFONTMAP];
struct {
char FontName[32]; //the key name
LOGFONT LogFont; //read it from ja2.ini
COLORVAL Color;
} FontInfo[] = {
{"LargeFont1", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(98, 98, 98)},
{"SmallFont1", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(98, 98, 98)},
{"TinyFont1", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(98, 98, 98)},
{"12PointFont1", {-14, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, 0},
{"CompFont", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(0, 255, 0)},
{"SmallCompFont", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(98, 98, 98)},
{"10PointRoman", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(0, 255 , 0)},
{"12PointRoman", {-14, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(0, 255 , 0)},
{"14PointSansSerif", {-16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(0, 255 , 0)},
{"10PointArial", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, 0},
{"14PointArial", {-16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(0, 255 , 0)},
{"12PointArial", {-14, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(222, 222, 222)},
{"BlockyFont", {-12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(217, 217, 217)},
{"BlockyFont2", {-12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(217, 217, 217)},
{"10PointArialBold", {-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, 0},
{"12PointArialFixedFont", {-14, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, 0},
{"16PointArial", {-18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(222, 222, 222)},
{"BlockFontNarrow", {-12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(128, 0 , 0)},
{"14PointHumanist", {-16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(255, 0, 0)},
{"HugeFont", {-20, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH | FF_DONTCARE, "Tahoma"}, FROMRGB(0, 255, 0)}
};
void Convert16BitStringTo8BitChineseBig5String( CHAR8 *dst, CHAR16 *src )
void Convert16BitStringTo8Bit( CHAR8 *dst, CHAR16 *src )
{
INT32 i, j;
STR8 ptr;
//hope 'dst' is big enough
WideCharToMultiByte(CP_ACP, 0, src, -1, dst, 512 ,NULL,NULL);
return;
}
i = j = 0;
ptr = (STR8 )src;
while( ptr[j] || ptr[j + 1] )
void GetWinFontInfo()
{
/*
;default settings, can be changed in ja2.ini
[LargeFont1]
Name=Tahoma
Height=-12
Weight=400
[SmallFont1]
Name=Tahoma
Height=-12
Weight=400
[TinyFont1]
Name=Tahoma
Height=-12
Weight=400
[12PointFont1]
Name=Tahoma
Height=-14
Weight=400
[CompFont]
Name=Tahoma
Height=-12
Weight=400
[SmallCompFont]
Name=Tahoma
Height=-12
Weight=400
[10PointRoman]
Name=Tahoma
Height=-12
Weight=400
[12PointRoman]
Name=Tahoma
Height=-14
Weight=400
[14PointSansSerif]
Name=Tahoma
Height=-16
Weight=400
[10PointArial]
Name=Tahoma
Height=-12
Weight=400
[14PointArial]
Name=Tahoma
Height=-16
Weight=700
[12PointArial]
Name=Tahoma
Height=-14
Weight=400
[BlockyFont]
Name=Tahoma
Height=-12
Weight=700
[BlockyFont2]
Name=Tahoma
Height=-12
Weight=700
[10PointArialBold]
Name=Tahoma
Height=-12
Weight=400
[12PointArialFixedFont]
Name=Tahoma
Height=-14
Weight=400
[16PointArial]
Name=Tahoma
Height=-18
Weight=400
[BlockFontNarrow]
Name=Tahoma
Height=-12
Weight=700
[14PointHumanist]
Name=Tahoma
Height=-16
Weight=400
[HugeFont]
Name=Tahoma
Height=-20
Weight=400
*/
char INIFile[MAX_PATH];
GetExecutableDirectory( INIFile );
strcat(INIFile, "\\Ja2.ini");
gWinFontAdjust = GetPrivateProfileInt("Ja2 Settings", "WIN_FONT_ADJUST", 0, INIFile);
for (UINT16 i=0; i<WIN_LASTFONT; i++)
{
if( ptr[j] )
{
dst[i] = ptr[j];
dst[ i + 1 ] = '\0';
i++;
}
j++;
GetPrivateProfileString(FontInfo[i].FontName, "Name", FontInfo[i].LogFont.lfFaceName, FontInfo[i].LogFont.lfFaceName, LF_FACESIZE, INIFile);
FontInfo[i].LogFont.lfHeight = gWinFontAdjust + GetPrivateProfileInt(FontInfo[i].FontName, "Height", FontInfo[i].LogFont.lfHeight, INIFile);
FontInfo[i].LogFont.lfWeight = GetPrivateProfileInt(FontInfo[i].FontName, "Weight", FontInfo[i].LogFont.lfWeight, INIFile);
}
}
void InitWinFonts( )
{
INT32 FontSlot[WIN_LASTFONT];
memset( WinFonts, 0, sizeof( WinFonts ) );
GetWinFontInfo();
for (int i = 0; i<WIN_LASTFONT; i++)
{
FontSlot[i] = CreateWinFont(FontInfo[i].LogFont);
SetWinFontForeColor(FontSlot[i], &FontInfo[i].Color);
}
//can't use switch here, because FONT12ARIAL, LARGEFONT1... are variables
for (int i=0; i<MAX_WINFONTMAP; i++)
{
if (i == FONT12ARIAL)
{WinFontMap[i] = FontSlot[WIN_12POINTARIAL];}
else if (i == LARGEFONT1)
{WinFontMap[i] = FontSlot[WIN_LARGEFONT1];}
else if (i == SMALLFONT1)
{WinFontMap[i] = FontSlot[WIN_SMALLFONT1];}
else if (i == TINYFONT1)
{WinFontMap[i] = FontSlot[WIN_TINYFONT1];}
else if (i == FONT12POINT1)
{WinFontMap[i] = FontSlot[WIN_12POINTFONT1];}
else if (i == COMPFONT)
{WinFontMap[i] = FontSlot[WIN_COMPFONT];}
else if (i == SMALLCOMPFONT)
{WinFontMap[i] = FontSlot[WIN_SMALLCOMPFONT];}
else if (i == FONT10ROMAN)
{WinFontMap[i] = FontSlot[WIN_10POINTROMAN];}
else if (i == FONT12ROMAN)
{WinFontMap[i] = FontSlot[WIN_12POINTROMAN];}
else if (i == FONT14SANSERIF)
{WinFontMap[i] = FontSlot[WIN_14POINTSANSSERIF];}
else if (i == MILITARYFONT1)
{WinFontMap[i] = FontSlot[WIN_BLOCKYFONT];}
else if (i == FONT10ARIAL)
{WinFontMap[i] = FontSlot[WIN_10POINTARIAL];}
else if (i == FONT14ARIAL)
{WinFontMap[i] = FontSlot[WIN_14POINTARIAL];}
else if (i == FONT10ARIALBOLD)
{WinFontMap[i] = FontSlot[WIN_10POINTARIALBOLD];}
else if (i == BLOCKFONT)
{WinFontMap[i] = FontSlot[WIN_BLOCKYFONT];}
else if (i == BLOCKFONT2)
{WinFontMap[i] = FontSlot[WIN_BLOCKYFONT2];}
else if (i == FONT12ARIALFIXEDWIDTH)
{WinFontMap[i] = FontSlot[WIN_12POINTARIALFIXEDFONT];}
else if (i == FONT16ARIAL)
{WinFontMap[i] = FontSlot[WIN_16POINTARIAL];}
else if (i == BLOCKFONTNARROW)
{WinFontMap[i] = FontSlot[WIN_BLOCKFONTNARROW];}
else if (i == FONT14HUMANIST)
{WinFontMap[i] = FontSlot[WIN_14POINTHUMANIST];}
else {WinFontMap[i] = -1;}
}
}
void ShutdownWinFonts( )
{
for (int i=0; i<MAX_WINFONTMAP; i++)
{DeleteWinFont(i);}
}
INT32 FindFreeWinFont( void )
{
INT32 iCount;
for( iCount = 0; iCount < MAX_WIN_FONTS; iCount++ )
for( iCount = 0; iCount < MAX_WINFONTMAP; iCount++ )
{
if( WinFonts[ iCount ].hFont == NULL )
{
@@ -93,7 +286,7 @@ INT32 FindFreeWinFont( void )
HWINFONT *GetWinFont( INT32 iFont )
{
if ( iFont == -1 )
if ( iFont == -1 || iFont >=WIN_LASTFONT)
{
return( NULL );
}
@@ -108,14 +301,11 @@ HWINFONT *GetWinFont( INT32 iFont )
}
}
CHAR16 gzFontName[32];
INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
INT32 iWeight, BOOLEAN fItalic, BOOLEAN fUnderline, BOOLEAN fStrikeOut, STR16 szFontName, INT32 iCharSet )
INT32 CreateWinFont( LOGFONT &logfont )
{
INT32 iFont;
HFONT hFont;
CHAR8 szCharFontName[32]; //32 characters including null terminator (matches max font name length)
// Find free slot
iFont = FindFreeWinFont( );
@@ -124,35 +314,43 @@ INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
return( iFont );
}
//SET UP FONT WE WANT TO LOAD HERE
wcscpy( gzFontName, szFontName );
//ATTEMPT TO LOAD THE FONT NOW
sprintf( szCharFontName, "%S", szFontName );
if( DoesWinFontExistOnSystem( szFontName, iCharSet ) )
hFont = CreateFontIndirect( &logfont );
if (hFont == NULL)
{
gLogFont.lfHeight = iHeight;
gLogFont.lfWidth = 0;
hFont = CreateFontIndirect( &gLogFont );
}
else
{
FatalError( "Cannot load subtitle Windows Font: %S.", szFontName );
FatalError( "Cannot load subtitle Windows Font: %S.", logfont.lfFaceName);
return( -1 );
}
if ( hFont == NULL )
{
return( -1 );
}
// Set font....
WinFonts[ iFont ].hFont = hFont;
HDC hdc = GetDC(NULL);
SIZE RectSize;
SelectObject(hdc, hFont );
wchar_t str[2]=L"\1";
for (int i = 1; i<0x80; i++)
{
GetTextExtentPoint32W( hdc, str, 1, &RectSize );
WinFonts[iFont].Width[i]=(UINT8)RectSize.cx;
str[0]++;
}
str[0] = L'°¡';
GetTextExtentPoint32W( hdc, str, 1, &RectSize );
WinFonts[iFont].Width[0] = (UINT8)RectSize.cx;
TEXTMETRIC tm;
GetTextMetrics(hdc, &tm);
WinFonts[ iFont ].Height = (UINT8)tm.tmAscent;
#ifdef DEC_INTERNAL_LEADING
WinFonts[ iFont ].InternalLeading = (UINT8)tm.tmInternalLeading;
#endif
ReleaseDC(NULL, hdc);
return( iFont );
}
void DeleteWinFont( INT32 iFont )
void DeleteWinFont( INT32 iFont )
{
HWINFONT *pWinFont;
@@ -160,7 +358,8 @@ void DeleteWinFont( INT32 iFont )
if ( pWinFont != NULL )
{
DeleteObject( pWinFont->hFont );
DeleteObject( pWinFont->hFont );
pWinFont->hFont = NULL;
}
}
@@ -194,15 +393,12 @@ void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor )
void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
{
va_list argptr;
CHAR16 string2[512];
CHAR8 string[512];
CHAR16 string[512];
HVSURFACE hVSurface;
LPDIRECTDRAWSURFACE2 pDDSurface;
HDC hdc;
RECT rc;
HWINFONT *pWinFont;
int len;
SIZE RectSize;
pWinFont = GetWinFont( iFont );
@@ -212,15 +408,9 @@ void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontS
}
va_start(argptr, pFontString); // Set up variable argument pointer
len = vswprintf(string2, pFontString, argptr); // process gprintf string (get output str)
len = vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
va_end(argptr);
#ifdef TAIWANESE
Convert16BitStringTo8BitChineseBig5String( string, string2 );
#else
sprintf( string, "%S", string2 );
#endif
// Get surface...
GetVideoSurface( &hVSurface, uiDestBuf );
@@ -232,10 +422,16 @@ void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontS
SetTextColor( hdc, pWinFont->ForeColor );
SetBkColor(hdc, pWinFont->BackColor );
SetBkMode(hdc, TRANSPARENT);
SetTextAlign(hdc, TA_TOP|TA_LEFT);
#ifdef DEC_INTERNAL_LEADING
if (y - pWinFont->InternalLeading >=0)
{
y -= pWinFont->InternalLeading;
}
#endif
TextOutW( hdc, x, y, string, len );
GetTextExtentPoint32( hdc, string, len, &RectSize );
SetRect(&rc, x, y, x + RectSize.cx, y + RectSize.cy );
ExtTextOut( hdc, x, y, ETO_OPAQUE, &rc, string, len, NULL );
IDirectDrawSurface2_ReleaseDC( pDDSurface, hdc );
}
@@ -243,10 +439,10 @@ void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontS
INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
{
HWINFONT *pWinFont;
#ifndef CHINESE
HDC hdc;
SIZE RectSize;
CHAR8 string[512];
#endif
pWinFont = GetWinFont( iFont );
if ( pWinFont == NULL )
@@ -254,27 +450,37 @@ INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
return( 0 );
}
#ifdef TAIWANESE
Convert16BitStringTo8BitChineseBig5String( string, string2 );
#ifdef CHINESE
wchar_t *p=string2;
UINT32 size = 0;
while (*p!=0)
{
if (*p != L'|')
{
if (*p>0x80)
{size+=pWinFont->Width[0];}
else
{size+=pWinFont->Width[*p];}
}
p++;
}
return size;
#else
sprintf( string, "%S", string2 );
#endif
hdc = GetDC(NULL);
SelectObject(hdc, pWinFont->hFont );
GetTextExtentPoint32( hdc, string, strlen(string), &RectSize );
GetTextExtentPoint32W( hdc, string2, lstrlenW(string2), &RectSize );
ReleaseDC(NULL, hdc);
return( (INT16)RectSize.cx );
#endif
}
INT16 GetWinFontHeight( STR16 string2, INT32 iFont )
{
HWINFONT *pWinFont;
HDC hdc;
SIZE RectSize;
CHAR8 string[512];
// HDC hdc;
// SIZE RectSize;
pWinFont = GetWinFont( iFont );
@@ -282,19 +488,17 @@ INT16 GetWinFontHeight( STR16 string2, INT32 iFont )
{
return( 0 );
}
#ifdef TAIWANESE
Convert16BitStringTo8BitChineseBig5String( string, string2 );
#else
sprintf( string, "%S", string2 );
#endif
else
{
return pWinFont->Height;
}
/*
hdc = GetDC(NULL);
SelectObject(hdc, pWinFont->hFont );
GetTextExtentPoint32( hdc, string, strlen(string), &RectSize );
GetTextExtentPoint32W( hdc, string2, lstrlenW(string2), &RectSize );
ReleaseDC(NULL, hdc);
return( (INT16)RectSize.cy );
return( (INT16)RectSize.cy );*/
}
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
@@ -310,49 +514,3 @@ UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...)
return( 1 );
}
int CALLBACK EnumFontFamProc( CONST LOGFONT *lplf, CONST TEXTMETRIC *lptm, DWORD dwType, LPARAM lpData )
{
gfEnumSucceed = TRUE;
return( TRUE );
}
int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, int FontType, LPARAM lParam )
{
CHAR8 szFontName[32];
sprintf( szFontName, "%S", gzFontName );
if( !strcmp( szFontName, (STR8) lpelfe->elfFullName ) )
{
gfEnumSucceed = TRUE;
memcpy( &gLogFont, &(lpelfe->elfLogFont), sizeof( LOGFONT ) );
}
return TRUE;
}
BOOLEAN DoesWinFontExistOnSystem( STR16 pTypeFaceName, INT32 iCharSet )
{
HDC hdc;
char string[512];
LOGFONT LogFont;
hdc = GetDC(NULL);
gfEnumSucceed = FALSE;
// Copy into 8-bit!
sprintf( string, "%S", pTypeFaceName );
memset( &LogFont, 0, sizeof( LOGFONT ) );
LogFont.lfCharSet = iCharSet;
lstrcpy( (LPSTR)&LogFont.lfFaceName, string );
EnumFontFamiliesEx( hdc, &LogFont, (FONTENUMPROCA) EnumFontFamExProc, 0, 0 );
ReleaseDC(NULL, hdc);
return( gfEnumSucceed );
}
+29 -6
View File
@@ -1,11 +1,11 @@
#ifndef __WINFONT_
#define __WINFONT_
#include <windows.h>
void InitWinFonts( );
void ShutdownWinFonts( );
INT32 CreateWinFont( INT32 iHeight, INT32 iWidth, INT32 iEscapement,
INT32 iWeight, BOOLEAN fItalic, BOOLEAN fUnderline, BOOLEAN fStrikeOut, STR16 szFontName, INT32 iCharSet );
INT32 CreateWinFont( LOGFONT &logfont );
void DeleteWinFont( INT32 iFont );
void SetWinFontBackColor( INT32 iFont, COLORVAL *pColor );
@@ -17,8 +17,31 @@ INT16 WinFontStringPixLength( STR16 string, INT32 iFont );
INT16 GetWinFontHeight( STR16 string, INT32 iFont );
UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...);
BOOLEAN DoesWinFontExistOnSystem( STR16 pTypeFaceName, INT32 iCharSet );
//if you cahnge this enum, you must change FontInfo struct in WinFont.cpp too.
enum {
WIN_LARGEFONT1 = 0,
WIN_SMALLFONT1,
WIN_TINYFONT1,
WIN_12POINTFONT1,
WIN_COMPFONT,
WIN_SMALLCOMPFONT,
WIN_10POINTROMAN,
WIN_12POINTROMAN,
WIN_14POINTSANSSERIF,
WIN_10POINTARIAL,
WIN_14POINTARIAL,
WIN_12POINTARIAL,
WIN_BLOCKYFONT,
WIN_BLOCKYFONT2,
WIN_10POINTARIALBOLD,
WIN_12POINTARIALFIXEDFONT,
WIN_16POINTARIAL,
WIN_BLOCKFONTNARROW,
WIN_14POINTHUMANIST,
WIN_HUGEFONT,
WIN_LASTFONT
};
#define MAX_WINFONTMAP 25
extern INT32 WinFontMap[MAX_WINFONTMAP];
#endif
#endif
+1
View File
@@ -1,3 +1,4 @@
//It make trouble in vs2008, uncomment it if you need it
#define _WIN32_WINNT WINVER//dnl this should be defined globaly on project
#ifdef JA2_PRECOMPILED_HEADERS
#include "JA2 SGP ALL.H"
+8 -2
View File
@@ -111,7 +111,9 @@ static LPDIRECTDRAWSURFACE _gpBackBuffer = NULL;
extern RECT rcWindow;
extern POINT ptWindowSize;
#ifdef WINFONTS
UINT32 CurrentSurface = BACKBUFFER;
#endif
//
// Globals for mouse cursor
//
@@ -2572,8 +2574,12 @@ LPDIRECTDRAWSURFACE2 GetFrameBufferObject(void)
LPDIRECTDRAWSURFACE2 GetMouseBufferObject(void)
{
Assert( gpPrimarySurface != NULL );
#ifdef WINFONTS
//It's a damn bug.
return gpMouseCursorOriginal;
#else
return gpMouseCursor;
#endif
}
+3 -1
View File
@@ -24,7 +24,9 @@
extern HWND ghWindow;
extern UINT32 guiMouseBufferState; // BUFFER_READY, BUFFER_DIRTY, BUFFER_DISABLED
#ifdef WINFONTS
extern UINT32 CurrentSurface;
#endif
/*
#ifdef __cplusplus
extern "C" {
+3
View File
@@ -257,6 +257,9 @@ BYTE *LockVideoSurface( UINT32 uiVSurface, UINT32 *puiPitch )
{
VSURFACE_NODE *curr;
#ifdef WINFONTS
CurrentSurface = uiVSurface;
#endif
//
// Check if given backbuffer or primary buffer
//
+5
View File
@@ -1564,7 +1564,12 @@ void AdjustLoyaltyForCivsEatenByMonsters( INT16 sSectorX, INT16 sSectorY, UINT8
//Report this to player
GetSectorIDString( sSectorX, sSectorY, 0, pSectorString, TRUE );
#ifdef CHINESE
//diffrent order of words in Chinese
swprintf( str, gpStrategicString[ STR_DIALOG_CREATURES_KILL_CIVILIANS ], pSectorString, ubHowMany);
#else
swprintf( str, gpStrategicString[ STR_DIALOG_CREATURES_KILL_CIVILIANS ], ubHowMany, pSectorString );
#endif
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
// use same formula as if it were a civilian "murder" in tactical!!!
+5 -3
View File
@@ -403,11 +403,13 @@ void BeginCivQuote( SOLDIERTYPE *pCiv, UINT8 ubCivQuoteID, UINT8 ubEntryID, INT1
// Create video oeverlay....
memset( &VideoOverlayDesc, 0, sizeof( VIDEO_OVERLAY_DESC ) );
//never use it anymore
//SET_USE_WINFONTS( TRUE );
//SET_WINFONT( giSubTitleWinFont );
// Prepare text box
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
gCivQuoteData.iDialogueBox = PrepareMercPopupBox( gCivQuoteData.iDialogueBox , BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gzCivQuote, DIALOGUE_DEFAULT_WIDTH, 0, 0, 0, &gusCivQuoteBoxWidth, &gusCivQuoteBoxHeight );
SET_USE_WINFONTS( FALSE );
//SET_USE_WINFONTS( FALSE );
// OK, find center for box......
sX = sX - ( gusCivQuoteBoxWidth / 2 );
+4 -3
View File
@@ -2041,11 +2041,12 @@ void ExecuteTacticalTextBox( INT16 sLeftPosition, STR16 pString )
memset( &VideoOverlayDesc, 0, sizeof( VIDEO_OVERLAY_DESC ) );
//never use it anymore
//SET_USE_WINFONTS( TRUE );
//SET_WINFONT( giSubTitleWinFont );
// Prepare text box
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
iDialogueBox = PrepareMercPopupBox( iDialogueBox , BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, pString, DIALOGUE_DEFAULT_SUBTITLE_WIDTH, 0, 0, 0, &gusSubtitleBoxWidth, &gusSubtitleBoxHeight );
SET_USE_WINFONTS( FALSE );
//SET_USE_WINFONTS( FALSE );
VideoOverlayDesc.sLeft = sLeftPosition;
-4
View File
@@ -784,11 +784,7 @@ void RenderTalkingMenu( )
RemoveMercPopupBoxFromIndex( iInterfaceDialogueBox );
iInterfaceDialogueBox = -1;
}
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
iInterfaceDialogueBox = PrepareMercPopupBox( iInterfaceDialogueBox,BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gTalkPanel.zQuoteStr, TALK_PANEL_DEFAULT_SUBTITLE_WIDTH, 0, 0, 0, &usTextBoxWidth, &usTextBoxHeight );
SET_USE_WINFONTS( FALSE );
gTalkPanel.fSetupSubTitles = FALSE;
-5
View File
@@ -4717,13 +4717,8 @@ void InitShopKeeperSubTitledText( STR16 pString )
UINT16 usActualWidth=0;
UINT16 usActualHeight=0;
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
giPopUpBoxId = PrepareMercPopupBox( giPopUpBoxId, BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gsShopKeeperTalkingText, 300, 0, 0, 0, &usActualWidth, &usActualHeight);
SET_USE_WINFONTS( FALSE );
// gusPositionOfSubTitlesX = ( 640 - usActualWidth ) / 2 ;
//position it to start under the guys face
+1
View File
@@ -30,6 +30,7 @@ typedef PARSE_STAGE;
#define FRENCH_PREFIX "French."
#define ITALIAN_PREFIX "Italian."
#define TAIWANESE_PREFIX "Tiawanese."
#define CHINESE_PREFIX "Chinese."
#define ATTACHMENTSFILENAME "Attachments.xml"
#define ATTACHMENTINFOFILENAME "AttachmentInfo.xml"
+3 -2
View File
@@ -4617,8 +4617,9 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier)
DebugAI( tempstr);
#endif
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("DecideActionBlack: Check for GL Bursts, is launcher capable? = %d, rtpcombat? = %d, bestattackaction = %d",IsGunBurstCapable( pSoldier, BestAttack.bWeaponIn, FALSE ),pSoldier->aiData.bRTPCombat,ubBestAttackAction ));
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("DecideActionBlack: Check for GL Bursts, is launcher capable? = %d, rtpcombat? = %d, bestattackaction = %d",IsGunBurstCapable( pSoldier, BestAttack.bWeaponIn, FALSE ),pSoldier->aiData.bRTPCombat,ubBestAttackAction ));
//should be a bug
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("DecideActionBlack: Check for GL Bursts, is launcher capable? = %d, rtpcombat? = %d, bestattackaction = %d",IsGunBurstCapable( &pSoldier->inv[BestAttack.bWeaponIn], FALSE, pSoldier ),pSoldier->aiData.bRTPCombat,ubBestAttackAction ));
if (ubBestAttackAction == AI_ACTION_TOSS_PROJECTILE && (Item[pSoldier->inv[BestAttack.bWeaponIn].usItem].usItemClass == IC_LAUNCHER && IsGunBurstCapable( &pSoldier->inv[BestAttack.bWeaponIn], FALSE, pSoldier )) &&
(pSoldier->bTeam != gbPlayerNum || pSoldier->aiData.bRTPCombat == RTP_COMBAT_AGGRESSIVE) )
{
-8
View File
@@ -758,16 +758,8 @@ INT32 iBack;
vswprintf(string, pFontString, argptr); // process gprintf string (get output str)
va_end(argptr);
if ( USE_WINFONTS( ) )
{
uiStringLength=WinFontStringPixLength( string, GET_WINFONT( ) );
uiStringHeight=GetWinFontHeight( string, GET_WINFONT( ) );
}
else
{
uiStringLength=StringPixLength(string, FontDefault);
uiStringHeight=GetFontHeight(FontDefault);
}
if ( uiStringLength > 0 )
{
+3 -35
View File
@@ -15,7 +15,7 @@
#endif
INT32 giCurWinFont = 0;
BOOLEAN gfUseWinFonts = FALSE;
//BOOLEAN gfUseWinFonts = FALSE;
// Global variables for video objects
@@ -87,7 +87,7 @@ HVOBJECT gvo14PointHumanist;
HVOBJECT gvoHugeFont;
#endif
INT32 giSubTitleWinFont;
//INT32 giSubTitleWinFont;
@@ -221,21 +221,7 @@ BOOLEAN InitializeFonts( )
// ATE: Init WinFont System and any winfonts we wish...
#ifdef WINFONTS
InitWinFonts( );
//giSubTitleWinFont = CreateWinFont( -16, 0, 0, 0, FALSE, FALSE, FALSE, L"¼Ð·¢Åé", CHINESEBIG5_CHARSET );
giSubTitleWinFont = CreateWinFont( -16, 0, 0, 0, FALSE, FALSE, FALSE, L"·s²Ó©úÅé", CHINESEBIG5_CHARSET );
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
Color = FROMRGB( 255, 255, 255 );
SetWinFontForeColor( giSubTitleWinFont, &Color );
PrintWinFont( FRAME_BUFFER, giSubTitleWinFont, 10, 100, L"Font %s initialized", gzFontName );
InvalidateScreen();
RefreshScreen( NULL );
SET_USE_WINFONTS( FALSE );
#endif
return( TRUE );
@@ -265,7 +251,7 @@ void ShutdownFonts( )
// ATE: Shutdown any win fonts
#ifdef WINFONTS
DeleteWinFont( giSubTitleWinFont );
ShutdownWinFonts();
#endif
}
@@ -342,31 +328,13 @@ UINT16 CreateFontPaletteTables(HVOBJECT pObj )
UINT16 WFGetFontHeight( INT32 FontNum )
{
if ( USE_WINFONTS( ) )
{
// return how many Y pixels we used
return( GetWinFontHeight( L"a\0", GET_WINFONT( ) ) );
}
else
{
// return how many Y pixels we used
return( GetFontHeight( FontNum ) );
}
}
INT16 WFStringPixLength( STR16 string,INT32 UseFont )
{
if ( USE_WINFONTS( ) )
{
// return how many Y pixels we used
return( WinFontStringPixLength( string, GET_WINFONT( ) ) );
}
else
{
// return how many Y pixels we used
return( StringPixLength( string, UseFont ) );
}
}
+2 -8
View File
@@ -10,12 +10,6 @@ extern INT32 giCurWinFont;
// ATE: Use this define to enable winfonts in JA2
// #define WINFONTS
#ifdef WINFONTS
#define USE_WINFONTS( ) ( gfUseWinFonts )
#else
#define USE_WINFONTS( ) ( FALSE )
#endif
#define GET_WINFONT( ) ( giCurWinFont )
#define SET_USE_WINFONTS( fSet ) ( gfUseWinFonts = fSet );
#define SET_WINFONT( fFont ) ( giCurWinFont = fFont );
@@ -97,7 +91,7 @@ extern INT32 gpHugeFont;
extern HVOBJECT gvoHugeFont;
#endif
extern INT32 giSubTitleWinFont;
//extern INT32 giSubTitleWinFont;
extern BOOLEAN gfFontsInit;
@@ -191,4 +185,4 @@ void ShutdownFonts( );
BOOLEAN SetFontShade( UINT32 uiFontID, INT8 bColorID );
#endif
#endif
+5 -1
View File
@@ -14,7 +14,7 @@
BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
{
#if defined( ENGLISH ) || defined( TAIWANESE ) || defined( FRENCH )
#if defined( ENGLISH ) || defined( TAIWANESE ) || defined( FRENCH ) || defined (CHINESE)
switch( usMLGGraphicID )
{
case MLG_AIMSYMBOL:
@@ -266,6 +266,10 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
sprintf( (char *)zLanguage, "SPANISH" );
#elif defined( TAIWANESE )
sprintf( (char *)zLanguage, "TAIWANESE" );
#elif defined( CHINESE)
sprintf( (char *)zLangauge, "CHINESE");
#else
# error "At least You have to specify a Language somewhere. See comments above."
#endif
//SB: Also check for russian Gold version, like English
+9 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="Utils_2005Express"
ProjectGUID="{262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}"
RootNamespace="Utils_2005Express"
@@ -430,6 +430,10 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\_ChineseText.cpp"
>
</File>
<File
RelativePath=".\_DutchText.cpp"
>
@@ -450,6 +454,10 @@
RelativePath=".\_ItalianText.cpp"
>
</File>
<File
RelativePath=".\_Ja25ChineseText.cpp"
>
</File>
<File
RelativePath=".\_Ja25DutchText.cpp"
>
+105 -31
View File
@@ -229,7 +229,21 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin
}
if((usCurrentWidthPixels > usLineWidthPixels))//||(DestString[ usDestIndex ]==NEWLINE_CHAR )||(fNewLine))
if((usCurrentWidthPixels > usLineWidthPixels)
#ifdef CHINESE
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L'?'
&& TempString[usCurIndex] != L''
&& TempString[usCurIndex] != L')'
&& TempString[usCurIndex] != L''
#endif
)//||(DestString[ usDestIndex ]==NEWLINE_CHAR )||(fNewLine))
{
//if an error has occured, and the string is too long
@@ -237,7 +251,11 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin
DestString[ usDestIndex ] = L' ';
//Go back to begining of word
while( (DestString[ usDestIndex ] != L' ') && (usCurIndex > 0) )
while( (DestString[ usDestIndex ] != L' ') && (usCurIndex > 0)
#ifdef CHINESE
&& DestString[usDestIndex] < 255
#endif
)
{
OneChar[0] = DestString[ usDestIndex ];
@@ -246,6 +264,26 @@ WRAPPED_STRING *LineWrap(UINT32 ulFont, UINT16 usLineWidthPixels, UINT16 *pusLin
usCurIndex--;
usDestIndex--;
}
#ifdef CHINESE
if (DestString[usDestIndex] > 255)
{
if (DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L','
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L'?'
|| DestString[usDestIndex] == L''
|| DestString[usDestIndex] == L')'
|| DestString[usDestIndex] == L'')
{usDestIndex++;}
else
{usCurIndex--;}
}
#endif
usEndIndex = usDestIndex;
if( usEndIndex < 0 )
@@ -472,34 +510,12 @@ BOOLEAN DrawTextToScreen(STR16 pStr, UINT16 usLocX, UINT16 usLocY, UINT16 usWidt
SetFont(ulFont);
if ( USE_WINFONTS( ) )
{
COLORVAL Color = FROMRGB( 255, 255, 255 );
SetWinFontForeColor( GET_WINFONT( ), &Color );
}
else
{
SetFontForeground(ubColor);
SetFontBackground( ubBackGroundColor );
}
if( ulFlags & TEXT_SHADOWED )
ShadowText( FRAME_BUFFER, pStr, ulFont, (UINT16)(usPosX-1), (UINT16)(usPosY-1 ) );
if ( USE_WINFONTS( ) )
{
if( fDirty )
{
gprintfdirty( usPosX, usPosY, pStr);
WinFont_mprintf( GET_WINFONT( ), usPosX,usPosY,pStr);
}
else
{
WinFont_mprintf( GET_WINFONT( ), usPosX,usPosY,pStr);
}
}
else
{
if( fDirty )
{
gprintfdirty( usPosX, usPosY, pStr);
@@ -509,7 +525,6 @@ BOOLEAN DrawTextToScreen(STR16 pStr, UINT16 usLocX, UINT16 usLocY, UINT16 usWidt
{
mprintf(usPosX,usPosY,pStr);
}
}
if( IAN_WRAP_NO_SHADOW & ulFlags )
{
@@ -555,7 +570,11 @@ UINT16 IanDisplayWrappedString(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UIN
do
{
// each character goes towards building a new word
if (pString[usSourceCounter] != TEXT_SPACE && pString[usSourceCounter] != 0)
if (pString[usSourceCounter] != TEXT_SPACE && pString[usSourceCounter] != 0
#ifdef CHINESE
&& pString[usSourceCounter] < 255
#endif
)
{
zWordString[usDestCounter++] = pString[usSourceCounter];
}
@@ -1348,12 +1367,24 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
}
else // not a special character
{
#ifdef CHINESE
wchar_t currentChar=pString[usSourceCounter];
if (currentChar> 255 )
{
if (usDestCounter == 0)
{zWordString[usDestCounter++] = currentChar;}
else
{usSourceCounter--;}
}
#endif
// terminate the string TEMPORARILY
zWordString[usDestCounter] = 0;
// get the length (in pixels) of this word
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
#ifdef CHINESE
if (currentChar <= 255)
#endif
// add a space (in case we add another word to it)
zWordString[usDestCounter++] = 32;
@@ -1361,7 +1392,22 @@ INT16 IanDisplayWrappedStringToPages(UINT16 usPosX, UINT16 usPosY, UINT16 usWidt
zWordString[usDestCounter] = 0;
// can we fit it onto the length of our "line" ?
if ((usLineLengthPixels + usWordLengthPixels) < usWidth)
if ((usLineLengthPixels + usWordLengthPixels) < usWidth
#ifdef CHINESE
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L','
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L'?'
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L')'
|| pString[usSourceCounter] == L''
#endif
)
{
// yes we can fit this word.
@@ -1446,7 +1492,11 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
do
{
// each character goes towards building a new word
if (pString[usSourceCounter] != TEXT_SPACE && pString[usSourceCounter] != 0)
if (pString[usSourceCounter] != TEXT_SPACE && pString[usSourceCounter] != 0
#ifdef CHINESE
&& pString[usSourceCounter] <= 255
#endif
)
{
zWordString[usDestCounter++] = pString[usSourceCounter];
}
@@ -1659,12 +1709,24 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
}
else // not a special character
{
#ifdef CHINESE
wchar_t currentChar = pString[usSourceCounter];
if (currentChar > 255 )
{
if (usDestCounter == 0)
{zWordString[usDestCounter++] = currentChar;}
else
{usSourceCounter--;}
}
#endif
// terminate the string TEMPORARILY
zWordString[usDestCounter] = 0;
// get the length (in pixels) of this word
usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont);
#ifdef CHINESE
if (currentChar <= 255)
#endif
// add a space (in case we add another word to it)
zWordString[usDestCounter++] = 32;
@@ -1672,7 +1734,19 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT
zWordString[usDestCounter] = 0;
// can we fit it onto the length of our "line" ?
if ((usLineLengthPixels + usWordLengthPixels) <= usWidth)
if ((usLineLengthPixels + usWordLengthPixels) <= usWidth
#ifdef CHINESE
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L','
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L''
|| pString[usSourceCounter] == L')'
|| pString[usSourceCounter] == L''
#endif
)
{
// yes we can fit this word.
File diff suppressed because it is too large Load Diff
+106
View File
@@ -0,0 +1,106 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Englishtext.h"
#else
#include "Language Defines.h"
#ifdef CHINESE
#include "text.h"
#include "Fileman.h"
#endif
#endif
#ifdef CHINESE
// VERY TRUNCATED FILE COPIED FROM JA2.5 FOR ITS FEATURES FOR JA2 GOLD
STR16 zNewTacticalMessages[]=
{
/*
L"Range to target: %d tiles, Brightness: %d/%d",
L"Attaching the transmitter to your laptop computer.",
L"You cannot afford to hire %s",
L"For a limited time, the above fee covers the cost of the entire mission and includes the equipment listed below.",
L"Hire %s now and take advantage of our unprecedented 'one fee covers all' pricing. Also included in this unbelievable offer is the mercenary's personal equipment at no charge.",
*/
L"目标的距离: %d",
L"将发报机装到笔记本电脑上。",
L"你无法支付雇佣%s的费用",
L"在限定时间内,以上的费用包括了整个行动和下列装备的花费。",
L"现在就雇请%s吧。您可以享受我们提供的空前的“一次付费,全部服务”的优惠价格。在这个难以置信的出价里,佣兵的随身装备是免费的哦。",
/*
L"Fee",
L"There is someone else in the sector...",
L"Gun Range: %d tiles, Chance to hit: %d percent",
L"Display Cover",
L"Line of Sight",
*/
L"费用",
L"在本分区发现有人..",
L"枪的射程: %d 目标的距离: %d",
L"显示覆盖物",
L"视距",
/*
L"New Recruits cannot arrive there.",
L"Since your laptop has no transmitter, you won't be able to hire new team members. Perhaps this would be a good time to load a saved game or start over!",
L"%s hears the sound of crumpling metal coming from underneath Jerry's body. It sounds disturbingly like your laptop antenna being crushed.", //the %s is the name of a merc. @@@ Modified
L"After scanning the note left behind by Deputy Commander Morris, %s senses an oppurtinity. The note contains the coordinates for launching missiles against different towns in Arulco. It also gives the coodinates of the origin - the missile facility.",
L"Noticing the control panel, %s figures the numbers can be reveresed, so that the missile might destroy this very facility. %s needs to find an escape route. The elevator appears to offer the fastest solution...",
*/
L"新雇请的佣兵无法到达那里。",
L"由于你的笔记本电脑没有发报机,你无法雇请新的队员。也许你得读取存档或者重新开始游戏!",
L"%s听到了Jerry的身体下面传来金属的破碎的声音。听起来令人不安,似乎你的笔记本电脑的天线被压断了。",
L"看完副指挥官Morris留下的备忘录后,%s觉得有机会了。备忘录里有向Arulco各个城镇发射导弹的基地的坐标。它还给出了这个罪恶计划的发源地的坐标 —— 导弹工厂。",
L"看到了控制面板后, %s发现它正在倒计时,因此导弹会把这个工厂炸毁。%s得找出个脱逃的路线。使用电梯看起来是最快的办法...",
/*
L"This is an IRON MAN game and you cannot save when enemies are around.", // @@@ new text
L"(Cannot save during combat)", //@@@@ new text
L"The current campaign name is greater than 30 characters.", // @@@ new text
L"The current campaign cannot be found.", // @@@ new text
L"Campaign: Default ( %S )", // @@@ new text
*/
L"现在您在铁人模式进行游戏,周围有敌人的时候不能存档。",
L"(不能在战斗时存盘)",
L"当前的战役名称超过了30个字符。",
L"无法找到当前的战役。", // @@@ new text
L"战役: 默认 ( %S )", // @@@ new text
/*
L"Campaign: %S", // @@@ new text
L"You have selected the campaign %S. This campaign is a player-modified version of the original Unfinished Business campaign. Are you sure you wish to play the %S campaign?", // @@@ new text
L"In order to use the editor, please select a campaign other than the default.", ///@@new
*/
L"战役: %S", // @@@ new text
L"你选择了%S战役。 该战役是原版UB战役的玩家自定义游戏版本。你确认你要在 %S 战役下进行游戏吗?",
L"如果你要使用编辑器的话,请选择一个战役,不要用默认战役。",
};
//these strings match up with the defines in IMP Skill trait.cpp
STR16 gzIMPSkillTraitsText[]=
{
L"开锁", //"Lock picking",
L"徒手格斗", //"Hand to hand combat",
L"电子", //"Electronics",
L"夜战", //"Night operations",
L"投掷", //"Throwing",
L"教学", //"Teaching",
L"重武器", //"Heavy Weapons",
L"自动武器", //"Auto Weapons",
L"潜行", //"Stealth",
L"双手武器", //"Ambidextrous",
L"刀技", //"Knifing",
L"神射手", //"Sniper",
L"伪装", //"Camouflage",
L"武术", //"Martial Arts",
L"", //"None",
L"I.M.P 专属技能", //"I.M.P. Specialties",
};
//@@@: New string as of March 3, 2000.
STR16 gzIronManModeWarningText[]=
{
// L"You have chosen IRON MAN mode. This setting makes the game considerably more challenging as you will not be able to save your game when in a sector occupied by enemies. This setting will affect the entire course of the game. Are you sure want to play in IRON MAN mode?",
L"你选择了铁人模式。这将会游戏变得相当有挑战性,因为你无法在敌人占据的分区存档。 这个设置会影响游戏的整个进程。你确认你要在铁人模式下进行游戏吗?",
};
#endif
+4 -4
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="ja2_2005Express"
ProjectGUID="{F44669E7-74AC-444B-B75F-F16F4B9F0265}"
RootNamespace="ja2_2005Express"
@@ -17,7 +17,7 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="\games\jagged alliance 2"
OutputDirectory="C:\games\jagged alliance 2 EN"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\ja2_2005Express.vsprops;.\ja2_2005ExpressDebug.vsprops"
@@ -66,7 +66,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Winmm.lib .\Multiplayer\raknet\RakNetLibStaticDebug.lib ws2_32.lib"
OutputFile="$(OutDir)\ja2_debug_2417_en.exe"
OutputFile="$(OutDir)\ja2_debug_test_en.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
@@ -99,7 +99,7 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="\games\jagged alliance 2"
OutputDirectory="C:\games\jagged alliance 2 EN"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\ja2_2005Express.vsprops"