[Scummvm-git-logs] scummvm master -> 09051b940d4eb5cb0238b823fa4f83c48d4ca086
phcoder
noreply at scummvm.org
Sun Apr 30 18:01:16 UTC 2023
This automated email contains information about 13 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
eb50099856 KYRA: Use titlechi.cps and CHARCHI.CPS in Chinese LoL
32f7e1d34e KYRA: Import LoL Chinese resources
359ea56e7e KYRA: Load Chinese font in Chinese LoL
230803ec2b KYRA: Use FID_CHINESE_FNT in Chinese LoL
6e057cb76a KYRA: Add screen dimensions for Chinese LoL
c2cc3387ee KYRA: Fix layout for Chinese LoL
7124f18a91 KYRA: Use separate GUI settings for Chinese LoL
2a070142f1 KYRA: Adjust console scrolling layout
852faa144f KYRA: Adjust dialog buttons for Chinese LoL
babd08c35a KYRA: Fix detection entry for Chinese LoL
7068487d79 KYRA: Change font height in gui_printCharacterStats
5975cae234 KYRA: Change menu layouts in Chinese LoL
09051b940d KYRA: Adjust layout of exit button in Chinese LoL
Commit: eb50099856ae2cb7207a55409ee385d23c8c0ff7
https://github.com/scummvm/scummvm/commit/eb50099856ae2cb7207a55409ee385d23c8c0ff7
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Use titlechi.cps and CHARCHI.CPS in Chinese LoL
Changed paths:
engines/kyra/sequence/sequences_lol.cpp
diff --git a/engines/kyra/sequence/sequences_lol.cpp b/engines/kyra/sequence/sequences_lol.cpp
index 77248eba583..3f16d782b0c 100644
--- a/engines/kyra/sequence/sequences_lol.cpp
+++ b/engines/kyra/sequence/sequences_lol.cpp
@@ -67,7 +67,7 @@ int LoLEngine::processPrologue() {
int processSelection = -1;
while (!shouldQuit() && processSelection == -1) {
- _screen->loadBitmap("TITLE.CPS", 2, 2, &_screen->getPalette(0));
+ _screen->loadBitmap(gameFlags().lang == Common::Language::ZH_TWN ? "TITLECHI.CPS" : "TITLE.CPS", 2, 2, &_screen->getPalette(0));
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
_screen->setFont(Screen::FID_6_FNT);
Commit: 32f7e1d34eaf76f78346d9bc39ddf080e298b0ae
https://github.com/scummvm/scummvm/commit/32f7e1d34eaf76f78346d9bc39ddf080e298b0ae
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Import LoL Chinese resources
Changed paths:
A devtools/create_kyradat/resources/lol_dos_chinese.h
devtools/create_kyradat/games.cpp
devtools/create_kyradat/resources.cpp
dists/engine-data/kyra.dat
diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp
index 649d584e1b1..faf3fa6d06f 100644
--- a/devtools/create_kyradat/games.cpp
+++ b/devtools/create_kyradat/games.cpp
@@ -158,6 +158,7 @@ const Game lolGames[] = {
{ kLoL, kPlatformDOS, kNoSpecial, DE_DEU },
{ kLoL, kPlatformDOS, kNoSpecial, FR_FRA },
{ kLoL, kPlatformDOS, kNoSpecial, ES_ESP },
+ { kLoL, kPlatformDOS, kNoSpecial, ZH_TWN },
{ kLoL, kPlatformDOS, kTalkieVersion, EN_ANY },
{ kLoL, kPlatformDOS, kTalkieVersion, FR_FRA },
@@ -1088,6 +1089,8 @@ const int lolFloppyNeed[] = {
kLoLLightningDefs,
kLoLFireballCoords,
+ k2FontData,
+
-1
};
diff --git a/devtools/create_kyradat/resources.cpp b/devtools/create_kyradat/resources.cpp
index 179ff4d2913..9ecba81861c 100644
--- a/devtools/create_kyradat/resources.cpp
+++ b/devtools/create_kyradat/resources.cpp
@@ -152,6 +152,7 @@
#include "resources/lol_dos.h"
#include "resources/lol_dos_english.h"
+#include "resources/lol_dos_chinese.h"
#include "resources/lol_dos_french.h"
#include "resources/lol_dos_german.h"
#include "resources/lol_dos_russian.h"
@@ -4923,6 +4924,13 @@ static const ResourceProvider resourceProviders[] = {
{ kLoLCharacterDefs, kLoL, kPlatformDOS, kNoSpecial, DE_DEU, &kLoLCharacterDefsDOSGermanProvider },
{ kLoLCharacterDefs, kLoL, kPlatformDOS, kNoSpecial, FR_FRA, &kLoLCharacterDefsDOSFrenchProvider },
{ kLoLCharacterDefs, kLoL, kPlatformDOS, kNoSpecial, ES_ESP, &kLoLCharacterDefsDOSSpanishProvider },
+ { kLoLCharacterDefs, kLoL, kPlatformDOS, kNoSpecial, ZH_TWN, &kLoLCharacterDefsDOSChineseProvider },
+ { k2FontData, kLoL, kPlatformDOS, kNoSpecial, EN_ANY, &k2FontDataDOSDummyProvider },
+ { k2FontData, kLoL, kPlatformDOS, kNoSpecial, RU_RUS, &k2FontDataDOSDummyProvider },
+ { k2FontData, kLoL, kPlatformDOS, kNoSpecial, DE_DEU, &k2FontDataDOSDummyProvider },
+ { k2FontData, kLoL, kPlatformDOS, kNoSpecial, FR_FRA, &k2FontDataDOSDummyProvider },
+ { k2FontData, kLoL, kPlatformDOS, kNoSpecial, ES_ESP, &k2FontDataDOSDummyProvider },
+ { k2FontData, kLoL, kPlatformDOS, kNoSpecial, ZH_TWN, &kLoLASCIIFontDOSChineseProvider },
{ kLoLIngamePakFiles, kLoL, kPlatformPC98, kNoSpecial, UNK_LANG, &kLoLIngamePakFilesPC98Provider },
{ kLoLCharacterDefs, kLoL, kPlatformPC98, kNoSpecial, JA_JPN, &kLoLCharacterDefsPC98JapaneseProvider },
{ kLoLIngameSfxFiles, kLoL, kPlatformPC98, kNoSpecial, UNK_LANG, &kLoLIngameSfxFilesPC98Provider },
diff --git a/devtools/create_kyradat/resources/lol_dos_chinese.h b/devtools/create_kyradat/resources/lol_dos_chinese.h
new file mode 100644
index 00000000000..52a5506d87f
--- /dev/null
+++ b/devtools/create_kyradat/resources/lol_dos_chinese.h
@@ -0,0 +1,185 @@
+static const LoLCharacter kLoLCharacterDefsDOSChinese[9] = {
+ { 0x0001, "Michael", 0, -1, 0, 0, 17,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 20, 20, 6, 6, 0, 0, 0, 384, 320, 5, 2, 0,
+ { 44, 0, 0, 0, 0, 138, 0, 0, 162, 0, 0 },
+ { 1, 1, 1 }, { 0, 0, 0 }, { 1, 1, 1 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Timothy", 0, 2, 0, 0, 22,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 27, 27, 5, 5, 0, 0, 0, 256, 256, 0, 0, 0,
+ { 93, 131, 0, 0, 0, 153, 0, 0, 162, 0, 0 },
+ { 3, 2, 1 }, { 0, 0, 0 }, { 2500, 1000, 250 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Baccata", 3, 3, 0, 0, 23,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 22, 22, 18, 18, 0, 0, 0, 256, 256, 0, 0, 0,
+ { 108, 149, 0, 0, 145, 153, 0, 0, 129, 0, 0 },
+ { 1, 1, 3 }, { 0, 0, 0 }, { 1, 1, 4000 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Lora", 1, 4, 0, 0, 24,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 25, 48, 5, 5, 0, 0, 0, 256, 256, 0, 0, 0,
+ { 0, 0, 0, 0, 0, 137, 0, 0, 162, 0, 0 },
+ { 1, 4, 1 }, { 0, 0, 0 }, { 1, 15001, 1 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Conrad", 0, -5, 0, 0, 26,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 23, 23, 10, 10, 0, 0, 0, 366, 358, 2, 3, 0,
+ { 44, 0, 0, 0, 0, 138, 0, 0, 162, 0, 0 },
+ { 1, 1, 1 }, { 0, 0, 0 }, { 1, 1, 1 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Paulson", 0, 6, 0, 0, 25,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 105, 105, 45, 45, 0, 0, 0, 256, 256, 0, 0, 0,
+ { 0, 0, 0, 0, 0, 138, 0, 0, 129, 0, 0 },
+ { 5, 2, 3 }, { 0, 0, 0 }, { 40000, 501, 3500 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Dawn", 1, 7, 0, 0, 24,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 50, 50, 80, 80, 0, 0, 0, 256, 256, 0, 0, 0,
+ { 0, 0, 0, 0, 0, 138, 0, 0, 129, 0, 0 },
+ { 1, 2, 10 }, { 1, 254, 177 }, { 1, 501, 1 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Kieran", 2, -8, 0, 0, 21,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 23, 23, 8, 8, 0, 0, 0, 422, 332, 5, 1, 0,
+ { 44, 0, 0, 0, 0, 138, 0, 0, 162, 0, 0 },
+ { 1, 1, 1 }, { 0, 0, 0 }, { 1, 1, 1 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } },
+ { 0x0001, "Ak'shel", 4, -9, 0, 0, 20,
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 256, 256, 256, 256, 256, 256, 256, 256 },
+ 0, 28, 28, 32, 32, 0, 0, 0, 320, 256, 1, 1, 0,
+ { 44, 0, 0, 0, 0, 138, 0, 0, 162, 0, 0 },
+ { 1, 1, 1 }, { 0, 0, 0 }, { 1, 1, 1 },
+ { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } }
+};
+
+static const LoLCharacterProvider kLoLCharacterDefsDOSChineseProvider = { ARRAYSIZE(kLoLCharacterDefsDOSChinese), kLoLCharacterDefsDOSChinese };
+
+static const uint8 kLoLASCIIFontDOSChinese[128 * 14] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41,
+ 0x41, 0x55, 0x55, 0x41, 0x63, 0x5d, 0x41, 0x41, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x7f, 0x7f, 0x6b,
+ 0x6b, 0x7f, 0x5d, 0x63, 0x7f, 0x7f, 0x3e, 0x00, 0x00, 0x00, 0x22, 0x77, 0x77, 0x7f, 0x7f, 0x3e,
+ 0x3e, 0x1c, 0x1c, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08, 0x1c, 0x1c, 0x3e, 0x7f, 0x3e, 0x1c,
+ 0x1c, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x3e, 0x1c, 0x2a, 0x7f, 0x7f, 0x2a, 0x08, 0x08,
+ 0x1c, 0x00, 0x00, 0x00, 0x08, 0x08, 0x1c, 0x3e, 0x3e, 0x7f, 0x7f, 0x7f, 0x2a, 0x08, 0x1c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xe7, 0xdb, 0xdb, 0xdb, 0xe7, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0x03, 0x05, 0x09, 0x10, 0x20,
+ 0x3c, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x22, 0x22, 0x1c, 0x08, 0x08, 0x3e,
+ 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x10, 0x18, 0x14, 0x14, 0x12, 0x10, 0x10, 0x10, 0x30, 0x70,
+ 0x60, 0x00, 0x00, 0x00, 0x18, 0x14, 0x12, 0x19, 0x15, 0x13, 0x31, 0x71, 0x63, 0x07, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x08, 0x5d, 0x22, 0x63, 0x22, 0x5d, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x30, 0x38, 0x3c, 0x3e, 0x3f, 0x3e, 0x3c, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x02, 0x06,
+ 0x0e, 0x1e, 0x3e, 0x7e, 0x3e, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x3e, 0x7f,
+ 0x1c, 0x1c, 0x1c, 0x7f, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24,
+ 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x1f, 0x29, 0x49, 0x49, 0x59, 0x29, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x20, 0x1c, 0x22, 0x22, 0x22, 0x1c, 0x02, 0x22,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x1c, 0x3e, 0x1c, 0x1c, 0x1c, 0x3e, 0x1c, 0x08, 0x00, 0x7f, 0x00, 0x00, 0x00,
+ 0x08, 0x1c, 0x3e, 0x7f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x1c,
+ 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x7f, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0c,
+ 0x06, 0x7f, 0x06, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0x30, 0x7f,
+ 0x30, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+ 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x63, 0x7f, 0x63, 0x22, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x1c, 0x1c, 0x1c, 0x3e, 0x3e, 0x3e, 0x7f, 0x7f, 0x7f, 0x00,
+ 0x00, 0x00, 0x7f, 0x7f, 0x7f, 0x3e, 0x3e, 0x3e, 0x1c, 0x1c, 0x1c, 0x08, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x33, 0x33, 0x11, 0x22,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x7f, 0x22, 0x22,
+ 0x22, 0x7f, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x08, 0x08, 0x3e, 0x41, 0x40, 0x3e, 0x01, 0x41,
+ 0x3e, 0x08, 0x08, 0x00, 0x00, 0x00, 0x31, 0x4a, 0x4a, 0x4c, 0x34, 0x08, 0x16, 0x19, 0x29, 0x29,
+ 0x46, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x28, 0x10, 0x28, 0x48, 0x45, 0x42, 0x42, 0x3d, 0x00,
+ 0x00, 0x00, 0x0c, 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x04, 0x02, 0x00, 0x40, 0x20,
+ 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0x00, 0x00, 0x41, 0x22, 0x14,
+ 0x08, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x7f,
+ 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00,
+ 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x00,
+ 0x3c, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x18,
+ 0x28, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3e, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x02,
+ 0x04, 0x08, 0x10, 0x20, 0x42, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x02, 0x1c,
+ 0x02, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x14, 0x14, 0x24, 0x24, 0x44, 0x7f,
+ 0x04, 0x04, 0x0e, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x02, 0x02, 0x02, 0x42,
+ 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00,
+ 0x00, 0x00, 0x7f, 0x41, 0x41, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
+ 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x42,
+ 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x10, 0x08,
+ 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x42, 0x42, 0x04, 0x04, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00,
+ 0x1c, 0x22, 0x42, 0x4e, 0x52, 0x52, 0x52, 0x4c, 0x40, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x08, 0x08,
+ 0x14, 0x14, 0x14, 0x22, 0x22, 0x3e, 0x41, 0x41, 0x41, 0x00, 0x00, 0x00, 0x7c, 0x22, 0x22, 0x22,
+ 0x22, 0x3c, 0x22, 0x22, 0x22, 0x22, 0x7c, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x40, 0x40, 0x40, 0x40,
+ 0x40, 0x40, 0x40, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x78, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+ 0x22, 0x24, 0x78, 0x00, 0x00, 0x00, 0x7f, 0x21, 0x20, 0x20, 0x24, 0x3c, 0x24, 0x20, 0x20, 0x21,
+ 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x21, 0x20, 0x20, 0x24, 0x3c, 0x24, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x00, 0x00, 0x1c, 0x22, 0x40, 0x40, 0x40, 0x4f, 0x42, 0x42, 0x42, 0x26, 0x1a, 0x00, 0x00, 0x00,
+ 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x1c, 0x08,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x73, 0x22, 0x24, 0x24, 0x28, 0x28,
+ 0x34, 0x24, 0x22, 0x22, 0x73, 0x00, 0x00, 0x00, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x21, 0x21, 0x7f, 0x00, 0x00, 0x00, 0x41, 0x41, 0x63, 0x63, 0x55, 0x55, 0x49, 0x49, 0x41, 0x41,
+ 0x41, 0x00, 0x00, 0x00, 0x42, 0x42, 0x62, 0x62, 0x52, 0x52, 0x4a, 0x4a, 0x46, 0x42, 0x42, 0x00,
+ 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00,
+ 0x7e, 0x21, 0x21, 0x21, 0x21, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, 0x00, 0x3c, 0x42,
+ 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x52, 0x4a, 0x3c, 0x02, 0x00, 0x00, 0x7e, 0x21, 0x21, 0x21,
+ 0x21, 0x3e, 0x24, 0x22, 0x22, 0x21, 0x71, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x40, 0x40, 0x3c,
+ 0x02, 0x02, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x7f, 0x49, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
+ 0x3c, 0x00, 0x00, 0x00, 0x41, 0x41, 0x41, 0x22, 0x22, 0x22, 0x14, 0x14, 0x14, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x49, 0x49, 0x49, 0x55, 0x22, 0x00, 0x00, 0x00,
+ 0x41, 0x22, 0x22, 0x14, 0x14, 0x08, 0x14, 0x14, 0x22, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x41,
+ 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x02, 0x04,
+ 0x08, 0x08, 0x10, 0x20, 0x40, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x08, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0e, 0x00, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08,
+ 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x70, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40,
+ 0x5c, 0x62, 0x42, 0x42, 0x42, 0x62, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42,
+ 0x40, 0x40, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x3a, 0x46, 0x42, 0x42,
+ 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x40, 0x42,
+ 0x3c, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x10, 0x10, 0x7e, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x42, 0x3c, 0x10, 0x2e, 0x41, 0x41, 0x3e, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x08, 0x08,
+ 0x00, 0x00, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,
+ 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x38, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x42, 0x44,
+ 0x48, 0x50, 0x68, 0x44, 0x42, 0x00, 0x00, 0x00, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x49, 0x49, 0x49, 0x49, 0x49,
+ 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x62, 0x5c, 0x40, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3a, 0x46, 0x42, 0x42, 0x42, 0x46, 0x3a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x5c, 0x22, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42,
+ 0x40, 0x3c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x7e, 0x10, 0x10, 0x10,
+ 0x10, 0x12, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x4c,
+ 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x49, 0x49, 0x49, 0x49, 0x55, 0x22, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x42, 0x42, 0x22, 0x24, 0x14, 0x08, 0x08, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x7e, 0x04, 0x08, 0x10, 0x20, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x02, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x40, 0x00, 0x31, 0x49, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x08, 0x14, 0x14, 0x22, 0x22, 0x41, 0x41, 0x41, 0x7f, 0x00, 0x00, 0x00,
+};
+
+static const ByteProvider kLoLASCIIFontDOSChineseProvider = { ARRAYSIZE(kLoLASCIIFontDOSChinese), kLoLASCIIFontDOSChinese };
+
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index e1859eb636e..4f26b70277e 100644
Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ
Commit: 359ea56e7e46340c53a04970afcabd253f9e0fc2
https://github.com/scummvm/scummvm/commit/359ea56e7e46340c53a04970afcabd253f9e0fc2
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Load Chinese font in Chinese LoL
This is the same font format as kyra3 but spacing around symbols is different.
Changed paths:
engines/kyra/engine/lol.cpp
engines/kyra/graphics/screen.cpp
engines/kyra/graphics/screen.h
engines/kyra/graphics/screen_lol.cpp
diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index 0d6bfb789bf..b4d122e021d 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -388,6 +388,10 @@ Common::Error LoLEngine::init() {
assert(_gui);
_gui->initStaticData();
+ if (_res->exists("LANDS.PAK")) {
+ _screen->loadFont(Screen::FID_CHINESE_FNT, "LANDS.PAK");
+ }
+
_txt = new TextDisplayer_LoL(this, _screen);
_screen->setAnimBlockPtr(10000);
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 024d6def606..9222ef1d480 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -1398,6 +1398,10 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
if (_vm->game() == GI_KYRA2) {
fn1 = new ChineseOneByteFontHOF(SCREEN_W);
fn2 = new ChineseTwoByteFontHOF(SCREEN_W);
+ } else if (_vm->game() == GI_LOL) {
+ // Same as next one but with different spacing
+ fn1 = new ChineseOneByteFontLoL(SCREEN_W);
+ fn2 = new ChineseTwoByteFontLoL(SCREEN_W);
} else {
fn1 = new ChineseOneByteFontMR(SCREEN_W);
fn2 = new ChineseTwoByteFontMR(SCREEN_W);
diff --git a/engines/kyra/graphics/screen.h b/engines/kyra/graphics/screen.h
index dcf694628a7..43aa8ef0131 100644
--- a/engines/kyra/graphics/screen.h
+++ b/engines/kyra/graphics/screen.h
@@ -271,6 +271,7 @@ public:
void drawChar(uint16 c, byte *dst, int pitch, int) const override;
protected:
+ uint32 getGlyphDataSize() const { return _glyphDataSize; }
uint16 _textColor[2];
bool _pixelColorShading;
const uint8 *_colorMap;
@@ -364,6 +365,28 @@ private:
void processColorMap() override;
};
+class ChineseOneByteFontLoL final : public ChineseFont {
+public:
+ ChineseOneByteFontLoL(int pitch) : ChineseFont(pitch, 8, 14, 8, 16, 0, 0) { _pixelColorShading = false; }
+ void setStyles(int styles) override {}
+
+private:
+ bool hasGlyphForCharacter(uint16 c) const override { return !(c & 0x80); }
+ uint32 getFontOffset(uint16 c) const override { return (c & 0x7F) * 14; }
+ void processColorMap() override;
+};
+
+class ChineseTwoByteFontLoL final : public ChineseFont {
+public:
+ ChineseTwoByteFontLoL(int pitch) : ChineseFont(pitch, 16, 14, 16, 16, 0, 0) { _pixelColorShading = false; }
+ void setStyles(int styles) override {}
+
+private:
+ bool hasGlyphForCharacter(uint16 c) const override { return (c & 0x80) && getFontOffset(c) < getGlyphDataSize(); }
+ uint32 getFontOffset(uint16 c) const override;
+ void processColorMap() override;
+};
+
class ChineseOneByteFontHOF final : public ChineseFont {
public:
ChineseOneByteFontHOF(int pitch) : ChineseFont(pitch, 8, 14, 9, 15, 0, 0) {}
diff --git a/engines/kyra/graphics/screen_lol.cpp b/engines/kyra/graphics/screen_lol.cpp
index f4f5cb05544..287e691318f 100644
--- a/engines/kyra/graphics/screen_lol.cpp
+++ b/engines/kyra/graphics/screen_lol.cpp
@@ -884,6 +884,21 @@ void Screen_LoL::postProcessCursor(uint8 *data, int w, int h, int pitch) {
}
}
+void ChineseOneByteFontLoL::processColorMap() {
+ _textColor[0] = _colorMap[1];
+ _textColor[1] = _colorMap[0];
+}
+
+uint32 ChineseTwoByteFontLoL::getFontOffset(uint16 c) const {
+ c = ((c & 0x7F00) >> 2) | (c & 0x3F);
+ return c * 28;
+}
+
+void ChineseTwoByteFontLoL::processColorMap() {
+ _textColor[0] = _colorMap[1];
+ _textColor[1] = _colorMap[0];
+}
+
} // End of namespace Kyra
#endif // ENABLE_LOL
Commit: 230803ec2b050e6dfd072d4d0d39bf7acb8481b7
https://github.com/scummvm/scummvm/commit/230803ec2b050e6dfd072d4d0d39bf7acb8481b7
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Use FID_CHINESE_FNT in Chinese LoL
Changed paths:
engines/kyra/engine/kyra_rpg.cpp
engines/kyra/engine/lol.cpp
engines/kyra/gui/gui_lol.cpp
engines/kyra/gui/gui_v2.cpp
engines/kyra/script/script_lol.cpp
engines/kyra/script/script_tim.cpp
engines/kyra/sequence/sequences_lol.cpp
engines/kyra/text/text.cpp
engines/kyra/text/text_lol.cpp
engines/kyra/text/text_rpg.cpp
diff --git a/engines/kyra/engine/kyra_rpg.cpp b/engines/kyra/engine/kyra_rpg.cpp
index 7cfc33aa7d9..011e6fda42a 100644
--- a/engines/kyra/engine/kyra_rpg.cpp
+++ b/engines/kyra/engine/kyra_rpg.cpp
@@ -147,6 +147,8 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_buttonFont = _flags.gameID == GI_LOL ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_SJIS_FNT;
else if (_flags.gameID == GI_EOB2 && _flags.platform == Common::kPlatformFMTowns)
_buttonFont = Screen::FID_8_FNT;
+ else if (_flags.lang == Common::Language::ZH_TWN && _flags.gameID == GI_LOL)
+ _buttonFont = Screen::FID_CHINESE_FNT;
}
KyraRpgEngine::~KyraRpgEngine() {
diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index b4d122e021d..c2edad2eb99 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -515,7 +515,8 @@ Common::Error LoLEngine::go() {
// the prologue code we need to setup them manually here.
if (_gameToLoad != -1 && action != 3) {
preInit();
- _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
+ _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
}
// We have three sound.dat files, one for the intro, one for the
@@ -691,10 +692,17 @@ int LoLEngine::mainMenu() {
{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0xC1, 0xE1 },
{ 0xCC, 0xDD, 0xDD, 0xDD }, 0,
Screen::FID_SJIS_TEXTMODE_FNT, 1, 1
- }
+ },
+ // 256 color Chinese mode
+ {
+ { 0, 0, 0, 0, 0 },
+ { 0x01, 0x04, 0x0C, 0x04, 0x00, 0x3D, 0x9F },
+ { 0x2C, 0x19, 0x48, 0x2C }, 0,
+ Screen::FID_CHINESE_FNT, 0, 1
+ },
};
- int dataIndex = _flags.use16ColorMode ? 1 : 0;
+ int dataIndex = _flags.use16ColorMode ? 1 : _flags.lang == Common::Language::ZH_TWN ? 2 : 0;
if (!_flags.isTalkie)
--data[dataIndex].menuTable[3];
@@ -3135,7 +3143,8 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
_screen->copyRegion(112, 16, 12, h + 15, 87, 14, 2, 2, Screen::CR_NO_P_CHECK);
int y = 15;
- Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ Screen::FID_9_FNT);
for (int ii = 0; ii < 7; ii++) {
if (_availableSpells[ii] == -1)
continue;
@@ -4214,7 +4223,8 @@ void LoLEngine::drawMapPage(int pageNum) {
_screen->copyRegion(236, 16, 236 + xOffset, 16, -xOffset, 1, pageNum, pageNum, Screen::CR_NO_P_CHECK);
int cp = _screen->setCurPage(pageNum);
- Screen::FontId of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
_screen->printText(getLangString(_autoMapStrings[_currentMapLevel]), 236 + xOffset, 8, 1, 0);
uint16 blX = mapGetStartPosX();
uint16 bl = (mapGetStartPosY() << 5) + blX;
@@ -4274,7 +4284,8 @@ void LoLEngine::drawMapPage(int pageNum) {
_screen->setFont(of);
_screen->setCurPage(cp);
- of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_6_FNT);
+ of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_6_FNT);
int tY = 0;
sx = mapGetStartPosX();
@@ -4523,7 +4534,8 @@ void LoLEngine::printMapText(uint16 stringId, int x, int y) {
void LoLEngine::printMapExitButtonText() {
int cp = _screen->setCurPage(2);
- Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ?
+ Screen::FID_CHINESE_FNT : Screen::FID_9_FNT);
_screen->fprintString("%s", 295, 182, _flags.use16ColorMode ? 0xBB : 172, 0, 5, getLangString(0x4033));
_screen->setFont(of);
_screen->setCurPage(cp);
diff --git a/engines/kyra/gui/gui_lol.cpp b/engines/kyra/gui/gui_lol.cpp
index f30d6624a44..0cd90b2bf89 100644
--- a/engines/kyra/gui/gui_lol.cpp
+++ b/engines/kyra/gui/gui_lol.cpp
@@ -103,7 +103,7 @@ void LoLEngine::gui_drawInventoryItem(int index) {
void LoLEngine::gui_drawScroll() {
_screen->copyRegion(112, 0, 12, 0, 87, 15, 2, 2, Screen::CR_NO_P_CHECK);
- Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_9_FNT);
int h = 0;
for (int i = 0; i < 7; i++) {
@@ -135,7 +135,7 @@ void LoLEngine::gui_drawScroll() {
void LoLEngine::gui_highlightSelectedSpell(bool mode) {
int y = 15;
- Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_9_FNT);
for (int i = 0; i < 7; i++) {
if (_availableSpells[i] == -1)
continue;
@@ -178,7 +178,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
for (int i = 0; i < 11; i++)
gui_drawCharInventoryItem(i);
- Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_9_FNT);
_screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xBB : 172, 0, 5, getLangString(0x4033));
_screen->setFont(of);
@@ -2219,7 +2219,7 @@ int GUI_LoL::runMenu(Menu &menu) {
const ScreenDim *d = _screen->getScreenDim(8);
uint32 textCursorTimer = 0;
uint8 textCursorStatus = 1;
- Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_9_FNT);
int wW = _screen->getCharWidth('W');
_screen->setFont(of);
diff --git a/engines/kyra/gui/gui_v2.cpp b/engines/kyra/gui/gui_v2.cpp
index 2ea706002f9..ce180447d24 100644
--- a/engines/kyra/gui/gui_v2.cpp
+++ b/engines/kyra/gui/gui_v2.cpp
@@ -55,6 +55,11 @@ GUI_v2::GUI_v2(KyraEngine_v2 *vm) : GUI_v1(vm), _vm(vm), _screen(vm->screen_v2()
_saveMenuCursor = Common::Rect(0, 0, 8, 14);
_saveLoadNumSlots = 4;
}
+
+ if (vm->gameFlags().lang == Common::Language::ZH_TWN && vm->game() == GI_LOL) {
+ _saveMenuFont = Screen::FID_CHINESE_FNT;
+ }
+
}
Button *GUI_v2::addButtonToList(Button *list, Button *newButton) {
diff --git a/engines/kyra/script/script_lol.cpp b/engines/kyra/script/script_lol.cpp
index 3b7a1561c44..acb561e8287 100644
--- a/engines/kyra/script/script_lol.cpp
+++ b/engines/kyra/script/script_lol.cpp
@@ -1308,7 +1308,7 @@ int LoLEngine::olol_drawExitButton(EMCState *script) {
static const uint8 printPara[] = { 0x90, 0x78, 0x0C, 0x9F, 0x80, 0x1E };
int cp = _screen->setCurPage(0);
- Screen::FontId cf = _screen->setFont(Screen::FID_6_FNT);
+ Screen::FontId cf = _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_6_FNT);
int x = printPara[3 * stackPos(0)] << 1;
int y = printPara[3 * stackPos(0) + 1];
int offs = printPara[3 * stackPos(0) + 2];
diff --git a/engines/kyra/script/script_tim.cpp b/engines/kyra/script/script_tim.cpp
index 186aa4ac781..cf691840224 100644
--- a/engines/kyra/script/script_tim.cpp
+++ b/engines/kyra/script/script_tim.cpp
@@ -314,7 +314,8 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) {
if (flags < 0) {
static const uint8 colorMap[] = { 0x00, 0xF0, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- _screen->setFont(sjisMode ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_8_FNT);
+ _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN && _vm->gameFlags().gameID == GI_LOL ? Screen::FID_CHINESE_FNT :
+ sjisMode ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_8_FNT);
_screen->setTextColorMap(colorMap);
_screen->_charSpacing = -2;
}
@@ -363,7 +364,8 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) {
if (flags < 0) {
static const uint8 colorMap[] = { 0x00, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0x00, 0x00, 0x00, 0x00 };
- _screen->setFont(sjisMode ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_INTRO_FNT);
+ _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN && _vm->gameFlags().gameID == GI_LOL ? Screen::FID_CHINESE_FNT :
+ sjisMode ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_INTRO_FNT);
_screen->setTextColorMap(colorMap);
_screen->_charSpacing = 0;
}
@@ -381,7 +383,8 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags, uint8 color) {
if (flags == 255)
return;
- _screen->setFont((_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_INTRO_FNT);
+ _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN && _vm->gameFlags().gameID == GI_LOL ? Screen::FID_CHINESE_FNT :
+ (_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_INTRO_FNT);
static const uint8 colorMap[] = { 0x00, 0xA0, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
_screen->setTextColorMap(colorMap);
diff --git a/engines/kyra/sequence/sequences_lol.cpp b/engines/kyra/sequence/sequences_lol.cpp
index 3f16d782b0c..0c891a86ee1 100644
--- a/engines/kyra/sequence/sequences_lol.cpp
+++ b/engines/kyra/sequence/sequences_lol.cpp
@@ -74,7 +74,8 @@ int LoLEngine::processPrologue() {
// Original version: (260|193) "V CD1.02 D"
const int width = _screen->getTextWidth(versionString.c_str());
_screen->fprintString("%s", 320 - width, 193, 0x67, 0x00, 0x04, versionString.c_str());
- _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
+ _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
_screen->fadePalette(_screen->getPalette(0), 0x1E);
_screen->updateScreen();
@@ -247,7 +248,9 @@ void LoLEngine::showIntro() {
_screen->loadFont(Screen::FID_8_FNT, "NEW8P.FNT");
_screen->loadFont(Screen::FID_INTRO_FNT, "INTRO.FNT");
- _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_8_FNT);
+
+ _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_8_FNT);
_tim->resetFinishedFlag();
_tim->setLangData("LOLINTRO.DIP");
@@ -317,7 +320,8 @@ int LoLEngine::chooseCharacter() {
_chargenWSA->displayFrame(0, 2, 113, 0, 0, 0, 0);
- _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
+ _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT :
+ (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
_screen->_curPage = 2;
if (_flags.platform == Common::kPlatformPC98 && _flags.use16ColorMode) {
@@ -803,7 +807,7 @@ void HistoryPlayer::play() {
_screen->updateScreen();
pal.fill(0, 256, 0);
- _screen->setFont(Screen::FID_9_FNT);
+ _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_9_FNT);
char tempWsaFilename[16];
char voiceFilename[13];
@@ -1342,7 +1346,7 @@ void LoLEngine::processCredits(char *t, int dimState, int page, int delayTime) {
if (*curString == 3 || *curString == 4)
s.alignment = *curString++;
- _screen->setFont(Screen::FID_6_FNT);
+ _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_6_FNT);
if (*curString == 1 || *curString == 2)
++curString;
@@ -1481,7 +1485,7 @@ void LoLEngine::processCredits(char *t, int dimState, int page, int delayTime) {
if (y < _screen->_curDim->h) {
_screen->_curPage = page;
- _screen->setFont(Screen::FID_6_FNT);
+ _screen->setFont(_flags.lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_6_FNT);
if (_flags.use16ColorMode) {
_screen->printText(s.str, (_screen->_curDim->sx << 3) + x + 1, _screen->_curDim->sy + y + 1, 0x44, 0x00);
_screen->printText(s.str, (_screen->_curDim->sx << 3) + x, _screen->_curDim->sy + y, 0x33, 0x00);
diff --git a/engines/kyra/text/text.cpp b/engines/kyra/text/text.cpp
index d6e9c10468f..cf1f9c44303 100644
--- a/engines/kyra/text/text.cpp
+++ b/engines/kyra/text/text.cpp
@@ -109,7 +109,8 @@ char *TextDisplayer::preprocessString(const char *str) {
static const uint16 limKor[2] = { 240, 480 };
const uint16 *lim = (_vm->gameFlags().lang == Common::KO_KOR) ? limKor : limDef;
- Screen::FontId curFont = _screen->setFont(_vm->gameFlags().lang == Common::KO_KOR ? Screen::FID_KOREAN_FNT : Screen::FID_8_FNT);
+ Screen::FontId curFont = _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN && _vm->gameFlags().gameID == GI_LOL ? Screen::FID_CHINESE_FNT :
+ _vm->gameFlags().lang == Common::KO_KOR ? Screen::FID_KOREAN_FNT : Screen::FID_8_FNT);
_screen->_charSpacing = -2;
int textWidth = _screen->getTextWidth(p);
_screen->_charSpacing = 0;
diff --git a/engines/kyra/text/text_lol.cpp b/engines/kyra/text/text_lol.cpp
index a997b094faa..d1c870c86ee 100644
--- a/engines/kyra/text/text_lol.cpp
+++ b/engines/kyra/text/text_lol.cpp
@@ -160,7 +160,7 @@ void TextDisplayer_LoL::printDialogueText2(int dim, const char *str, EMCState *s
}
int cp = _screen->setCurPage(0);
- Screen::FontId of = _screen->setFont(_pc98TextMode ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont(_vm->gameFlags().lang == Common::Language::ZH_TWN ? Screen::FID_CHINESE_FNT : _pc98TextMode ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
preprocessString(str, script, paramList, paramIndex);
_numCharsTotal = Common::strnlen(_dialogueBuffer, 2559);
diff --git a/engines/kyra/text/text_rpg.cpp b/engines/kyra/text/text_rpg.cpp
index 576d47b2319..1fa054e23da 100644
--- a/engines/kyra/text/text_rpg.cpp
+++ b/engines/kyra/text/text_rpg.cpp
@@ -52,6 +52,8 @@ TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(e
_waitButtonFont = Screen::FID_8_FNT;
else if ((_vm->game() == GI_EOB1 && _vm->gameFlags().platform == Common::kPlatformPC98))
_waitButtonFont = Screen::FID_SJIS_FNT;
+ else if ((_vm->game() == GI_LOL && _vm->gameFlags().lang == Common::Language::ZH_TWN))
+ _waitButtonFont = Screen::FID_CHINESE_FNT;
_textDimData = new TextDimData[_screen->screenDimTableCount()];
Commit: 6e057cb76acb4da8c3f9a56538717694a62ed486
https://github.com/scummvm/scummvm/commit/6e057cb76acb4da8c3f9a56538717694a62ed486
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Add screen dimensions for Chinese LoL
Changed paths:
engines/kyra/graphics/screen_lol.cpp
engines/kyra/graphics/screen_lol.h
engines/kyra/resource/staticres_lol.cpp
diff --git a/engines/kyra/graphics/screen_lol.cpp b/engines/kyra/graphics/screen_lol.cpp
index 287e691318f..36e56d21d2c 100644
--- a/engines/kyra/graphics/screen_lol.cpp
+++ b/engines/kyra/graphics/screen_lol.cpp
@@ -30,7 +30,7 @@
namespace Kyra {
-Screen_LoL::Screen_LoL(LoLEngine *vm, OSystem *system) : Screen_v2(vm, system, vm->gameFlags().use16ColorMode ? _screenDimTable16C : _screenDimTable256C, _screenDimTableCount) {
+Screen_LoL::Screen_LoL(LoLEngine *vm, OSystem *system) : Screen_v2(vm, system, vm->gameFlags().use16ColorMode ? _screenDimTable16C : vm->gameFlags().lang == Common::Language::ZH_TWN ? _screenDimTableZH : _screenDimTable256C, _screenDimTableCount) {
_paletteOverlay1 = new uint8[0x100]();
_paletteOverlay2 = new uint8[0x100]();
_grayOverlay = new uint8[0x100]();
diff --git a/engines/kyra/graphics/screen_lol.h b/engines/kyra/graphics/screen_lol.h
index be3b72fe98b..639ee657983 100644
--- a/engines/kyra/graphics/screen_lol.h
+++ b/engines/kyra/graphics/screen_lol.h
@@ -89,6 +89,7 @@ public:
private:
static const ScreenDim _screenDimTable256C[];
static const ScreenDim _screenDimTable16C[];
+ static const ScreenDim _screenDimTableZH[];
static const int _screenDimTableCount;
uint8 *_levelOverlays[8];
diff --git a/engines/kyra/resource/staticres_lol.cpp b/engines/kyra/resource/staticres_lol.cpp
index 2a60525e14f..387a8a43f47 100644
--- a/engines/kyra/resource/staticres_lol.cpp
+++ b/engines/kyra/resource/staticres_lol.cpp
@@ -606,6 +606,35 @@ const ScreenDim Screen_LoL::_screenDimTable256C[] = {
{ 0x01, 0x02, 0x26, 0x14, 0x00, 0x0F, 0x0E, 0x00 },
};
+const ScreenDim Screen_LoL::_screenDimTableZH[] = {
+ { 0x00, 0x00, 0x28, 0xC8, 0xC7, 0xCF, 0x00, 0x00 }, // Taken from Intro // Fuul screen // Looks good
+ { 0x08, 0x48, 0x18, 0x38, 0xFE, 0x01, 0x00, 0x00 }, // Not checked
+ { 0x0E, 0x00, 0x16, 0x78, 0xFE, 0x01, 0x00, 0x00 }, // Not checked
+ { 0x0B, 0x7B, 0x1C, 0x12, 0xFE, 0xFC, 0x00, 0x00 }, // Not checked
+ { 0x0B, 0x7B, 0x1C, 0x2D, 0xFE, 0xFC, 0x00, 0x00 }, // Not checked
+ { 0x55, 0x7B, 0xE9, 0x37, 0xFE, 0xFC, 0x00, 0x00 }, // Not checked
+ { 0x0B, 0x7B, 0x10, 0x47, 0x3D, 0x01, 0x00, 0x00 }, // Main menu box (4 entries) // Looks good
+ { 0x04, 0x59, 0x20, 0x3C, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x05, 0x6E, 0x1E, 0x0C, 0xFE, 0x01, 0x00, 0x00 }, // Not checked
+ { 0x07, 0x19, 0x1A, 0x97, 0x00, 0x00, 0x00, 0x00 }, // Ingame main menu box CD version // Unused as Chinese version is floppy
+ { 0x03, 0x1E, 0x22, 0x8C, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x02, 0x48, 0x24, 0x34, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x0E, 0x00, 0x16, 0x78, 0xFE, 0x01, 0x00, 0x00 }, // Not checked
+ { 0x0D, 0xA2, 0x18, 0x0C, 0xFE, 0x01, 0x00, 0x00 }, // Not checked
+ { 0x0F, 0x06, 0x14, 0x6E, 0x01, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x1A, 0xBE, 0x0A, 0x07, 0xFE, 0x01, 0x00, 0x00 }, // Not checked
+ { 0x07, 0x14, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00 }, // Ingame main menu box floppy version // Looks good
+ { 0x03, 0x32, 0x22, 0x62, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x0B, 0x8C, 0x10, 0x33, 0x3D, 0x01, 0x00, 0x00 }, // Main menu box (5 entries, CD version only) // Unused as Chinese version is floppy
+ { 0x0B, 0x82, 0x10, 0x39, 0x3D, 0x01, 0x00, 0x00 }, // Main menu box (3 entries, floppy version only) // Looks good
+
+ { 0x01, 0x20, 0x26, 0x80, 0xDC, 0xFD, 0x00, 0x00 }, // Credits // Not checked
+ { 0x09, 0x29, 0x08, 0x2C, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x19, 0x29, 0x08, 0x2C, 0x00, 0x00, 0x00, 0x00 }, // Not checked
+ { 0x01, 0x02, 0x26, 0x14, 0x00, 0x0F, 0x0E, 0x00 }, // Not checked
+};
+
const ScreenDim Screen_LoL::_screenDimTable16C[] = {
{ 0x00, 0x00, 0x28, 0xC8, 0x33, 0x44, 0x00, 0x00 }, // Taken from Intro
{ 0x08, 0x48, 0x18, 0x38, 0x33, 0x44, 0x00, 0x00 },
Commit: c2cc3387ee2f7c76871f047b50dc4add513f12a3
https://github.com/scummvm/scummvm/commit/c2cc3387ee2f7c76871f047b50dc4add513f12a3
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Fix layout for Chinese LoL
Changed paths:
engines/kyra/sequence/sequences_lol.cpp
diff --git a/engines/kyra/sequence/sequences_lol.cpp b/engines/kyra/sequence/sequences_lol.cpp
index 0c891a86ee1..bbe793e1015 100644
--- a/engines/kyra/sequence/sequences_lol.cpp
+++ b/engines/kyra/sequence/sequences_lol.cpp
@@ -349,7 +349,7 @@ int LoLEngine::chooseCharacter() {
_screen->printText(_tim->getCTableEntry(51), 72, 176, 0x81, 0x00);
_screen->printText(_tim->getCTableEntry(53), 72, 184, 0x81, 0x00);
_screen->printText(_tim->getCTableEntry(55), 72, 192, 0x81, 0x00);
- } else {
+ } else if (_flags.lang != Common::ZH_TWN) { // Chinese puts everything on the background layer
const char *const *previewNames = (_flags.lang == Common::RU_RUS && !_flags.isTalkie) ? _charPreviewNamesRussianFloppy : (_flags.lang == Common::JA_JPN ? _charNamesJapanese : _charPreviewNamesDefault);
for (int i = 0; i < 4; ++i) {
_screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, previewNames[i]);
@@ -424,14 +424,15 @@ int LoLEngine::chooseCharacter() {
void LoLEngine::kingSelectionIntro() {
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
- int y = 38;
if (_flags.platform == Common::kPlatformPC98) {
for (int i = 0; i < 5; ++i)
_screen->printText(_tim->getCTableEntry(57 + i), 16, 32 + i * 8, 0xC1, 0x00);
} else {
+ int fh = _flags.lang == Common::Language::ZH_TWN ? 16 : 10;
+ int y = _flags.lang == Common::Language::ZH_TWN ? 28 : 38;
for (int i = 0; i < 5; ++i)
- _screen->fprintStringIntro("%s", 8, y + i * 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(57 + i));
+ _screen->fprintStringIntro("%s", 8, y + i * fh, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(57 + i));
}
if (_flags.isTalkie)
@@ -469,14 +470,15 @@ void LoLEngine::kingSelectionIntro() {
void LoLEngine::kingSelectionReminder() {
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
- int y = 48;
if (_flags.platform == Common::kPlatformPC98) {
_screen->printText(_tim->getCTableEntry(62), 16, 32, 0xC1, 0x00);
_screen->printText(_tim->getCTableEntry(63), 16, 40, 0xC1, 0x00);
} else {
+ int fh = _flags.lang == Common::Language::ZH_TWN ? 16 : 10;
+ int y = 48;
_screen->fprintStringIntro("%s", 8, y, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(62));
- _screen->fprintStringIntro("%s", 8, y + 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(63));
+ _screen->fprintStringIntro("%s", 8, y + fh, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(63));
}
if (_flags.isTalkie)
@@ -618,10 +620,17 @@ int LoLEngine::selectionCharInfo(int character) {
_screen->printText(_tim->getCTableEntry(69), 112, 168, 0x01, 0x00);
} else {
+ int fh = _flags.lang == Common::Language::ZH_TWN ? 16 : 10;
+ int y = 127;
for (int i = 0; i < 5; ++i)
- _screen->fprintStringIntro("%s", 50, 127 + i * 10, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx + i));
+ _screen->fprintStringIntro("%s", 50, y + i * fh, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx + i));
- _screen->fprintStringIntro("%s", 100, 168, 0x32, 0x00, 0xCF, 0x20, _tim->getCTableEntry(69));
+ if (_flags.lang == Common::Language::ZH_TWN)
+ _screen->fprintStringIntro("%s", 125, 177,
+ 0x32, 0x00, 0xCF, 0x20, _tim->getCTableEntry(70));
+ else
+ _screen->fprintStringIntro("%s", 100, 168,
+ 0x32, 0x00, 0xCF, 0x20, _tim->getCTableEntry(69));
}
selectionCharInfoIntro(vocFilename);
@@ -648,8 +657,9 @@ int LoLEngine::selectionCharInfo(int character) {
for (int i = 0; i < 5; ++i)
_screen->printText(_tim->getCTableEntry(64 + i), 16, 32 + i * 8, 0xC1, 0x00);
} else {
+ int fh = _flags.lang == Common::Language::ZH_TWN ? 16 : 10;
for (int i = 0; i < 5; ++i)
- _screen->fprintStringIntro("%s", 3, 28 + i * 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(64 + i));
+ _screen->fprintStringIntro("%s", 3, 28 + i * fh, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(64 + i));
}
resetSkipFlag();
@@ -714,10 +724,17 @@ int LoLEngine::selectionCharAccept() {
removeInputTop();
if (inputFlag == 200) {
- if (88 <= _mouseX && _mouseX <= 128 && 180 <= _mouseY && _mouseY <= 194)
- return 1;
- if (196 <= _mouseX && _mouseX <= 236 && 180 <= _mouseY && _mouseY <= 194)
- return 0;
+ if (_flags.lang == Common::Language::ZH_TWN) {
+ if (223 <= _mouseX && _mouseX <= 264 && 176 <= _mouseY && _mouseY <= 192)
+ return 1;
+ if (271 <= _mouseX && _mouseX <= 313 && 176 <= _mouseY && _mouseY <= 192)
+ return 0;
+ } else {
+ if (88 <= _mouseX && _mouseX <= 128 && 180 <= _mouseY && _mouseY <= 194)
+ return 1;
+ if (196 <= _mouseX && _mouseX <= 236 && 180 <= _mouseY && _mouseY <= 194)
+ return 0;
+ }
}
return -1;
Commit: 7124f18a91ccf0fffb1bf833c56ba8d0bf1fdb2c
https://github.com/scummvm/scummvm/commit/7124f18a91ccf0fffb1bf833c56ba8d0bf1fdb2c
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Use separate GUI settings for Chinese LoL
Changed paths:
engines/kyra/engine/lol.cpp
engines/kyra/engine/lol.h
engines/kyra/resource/staticres_lol.cpp
diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index c2edad2eb99..03a7a6fe27b 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -2016,7 +2016,7 @@ void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
}
const KyraRpgGUISettings *LoLEngine::guiSettings() const {
- return &_guiSettings;
+ return _flags.lang == Common::Language::ZH_TWN ? &_guiSettingsZH : &_guiSettings;
}
// spells
diff --git a/engines/kyra/engine/lol.h b/engines/kyra/engine/lol.h
index d35a00023f7..46e10c3f06d 100644
--- a/engines/kyra/engine/lol.h
+++ b/engines/kyra/engine/lol.h
@@ -1167,6 +1167,7 @@ private:
uint8 *_pageBuffer2;
static const KyraRpgGUISettings _guiSettings;
+ static const KyraRpgGUISettings _guiSettingsZH;
// spells
typedef Common::Functor1Mem<ActiveSpell *, int, LoLEngine> SpellProc;
diff --git a/engines/kyra/resource/staticres_lol.cpp b/engines/kyra/resource/staticres_lol.cpp
index 387a8a43f47..d79a93c4029 100644
--- a/engines/kyra/resource/staticres_lol.cpp
+++ b/engines/kyra/resource/staticres_lol.cpp
@@ -817,6 +817,17 @@ const KyraRpgGUISettings LoLEngine::_guiSettings = {
}
};
+const KyraRpgGUISettings LoLEngine::_guiSettingsZH = {
+ { _dlgButtonPosX_Def, _dlgButtonPosY_Def, 144, 254, 60, 18, 2, 66, { 0, 0 }, { 0, 0 }, { 0, 0 } },
+ { 136, 251, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { { 0, 0, 0 }, { 0, 0, 0 }, 0, 0,
+ { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
+ { 0, 0, 0 }, { 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0 }, { 0, 0, 0 }, 0, 0, { 0, 0, 0 }, { 0, 0, 0 }, 0, 0,
+ 0, 0
+ }
+};
+
const MistOfDoomAnimData LoLEngine::_mistAnimData[] = {
{ 0, 7, 7, 13, 155 },
{ 0, 16, 16, 17, 155 },
Commit: 2a070142f19f77c50cd2f800149d7c9216fdceb2
https://github.com/scummvm/scummvm/commit/2a070142f19f77c50cd2f800149d7c9216fdceb2
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Adjust console scrolling layout
Changed paths:
engines/kyra/text/text_rpg.cpp
diff --git a/engines/kyra/text/text_rpg.cpp b/engines/kyra/text/text_rpg.cpp
index 1fa054e23da..5d3f0765208 100644
--- a/engines/kyra/text/text_rpg.cpp
+++ b/engines/kyra/text/text_rpg.cpp
@@ -673,7 +673,9 @@ void TextDisplayer_rpg::textPageBreak() {
int w = _vm->_dialogueButtonWidth;
if (_vm->game() == GI_LOL) {
- if (_vm->_needSceneRestore && (_vm->_updateFlags & 2)) {
+ if (_vm->gameFlags().lang == Common::Language::ZH_TWN) {
+ y = dim->sy + dim->h - 15;
+ } else if (_vm->_needSceneRestore && (_vm->_updateFlags & 2)) {
if (_vm->_currentControlMode || !(_vm->_updateFlags & 2)) {
y = dim->sy + dim->h - 5;
} else {
@@ -728,7 +730,7 @@ void TextDisplayer_rpg::textPageBreak() {
if (inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
loop = false;
} else if (inputFlag == 199 || inputFlag == 201) {
- if (_vm->posWithinRect(_vm->_mouseX, _vm->_mouseY, x, y, x + w, y + 9)) {
+ if (_vm->posWithinRect(_vm->_mouseX, _vm->_mouseY, x, y, x + w, y + _vm->guiSettings()->buttons.height)) {
if (_vm->game() == GI_LOL)
target = true;
else
@@ -742,7 +744,7 @@ void TextDisplayer_rpg::textPageBreak() {
_screen->set16bitShadingLevel(4);
if (_vm->game() == GI_LOL && _vm->gameFlags().use16ColorMode)
- _screen->fillRect(x + 8, y, x + 57, y + 9, _textDimData[_screen->curDimIndex()].color2);
+ _screen->fillRect(x + 8, y, x + 57, y + _vm->guiSettings()->buttons.height, _textDimData[_screen->curDimIndex()].color2);
else
_screen->fillRect(x, y, x + w - 1, y + _vm->guiSettings()->buttons.height - 1, _textDimData[_screen->curDimIndex()].color2);
Commit: 852faa144f4aaf8f29d4ea3f453a0787976ac795
https://github.com/scummvm/scummvm/commit/852faa144f4aaf8f29d4ea3f453a0787976ac795
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Adjust dialog buttons for Chinese LoL
Changed paths:
engines/kyra/engine/lol.cpp
diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index 03a7a6fe27b..67fe4eb36a6 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -1975,6 +1975,12 @@ void LoLEngine::setupDialogueButtons(int numStr, const char *s1, const char *s2,
posX[2] = posX[1] + xOffs;
}
+ if (_flags.lang == Common::Language::ZH_TWN) {
+ posY[0] -= 10;
+ posY[1] -= 10;
+ posY[2] -= 10;
+ }
+
drawDialogueButtons();
}
Commit: babd08c35a0618634640d39e9c610cc1e57ec912
https://github.com/scummvm/scummvm/commit/babd08c35a0618634640d39e9c610cc1e57ec912
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Fix detection entry for Chinese LoL
Changed paths:
engines/kyra/detection_tables.h
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 3667fa1b4d7..ce573c75888 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -1733,12 +1733,12 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY2s("GENERAL.PAK", "f2c305bfb10c08371e947ab4d0a2f5f5", -1,
"CHAPTER7.PAK", "f3cbab6d945ceda35149a5c9a324a8fe", -1),
- Common::ZH_CHN,
+ Common::ZH_TWN,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO9(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS, GAMEOPTION_LOL_SAVENAMES)
},
- LOL_FLOPPY_FLAGS
+ LOL_FLOPPY_FAN_FLAGS(Common::ZH_TWN, Common::EN_ANY)
},
{ // German version - Bug 9557
Commit: 7068487d79fa742f1158eebc5eb73a80c26671c9
https://github.com/scummvm/scummvm/commit/7068487d79fa742f1158eebc5eb73a80c26671c9
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Change font height in gui_printCharacterStats
Changed paths:
engines/kyra/gui/gui_lol.cpp
diff --git a/engines/kyra/gui/gui_lol.cpp b/engines/kyra/gui/gui_lol.cpp
index 0cd90b2bf89..ea0bee78ac2 100644
--- a/engines/kyra/gui/gui_lol.cpp
+++ b/engines/kyra/gui/gui_lol.cpp
@@ -236,6 +236,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
uint32 offs = _screen->_curPage ? 0 : 112;
int y = 0;
int col = 0;
+ int fh = _flags.lang == Common::Language::ZH_TWN ? 16 : 10;
if (index < 2) {
// might
@@ -246,7 +247,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
if (redraw)
_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
} else {
- y = index * 10 + 22;
+ y = index * fh + 22;
col = 158;
if (redraw)
_screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
@@ -254,14 +255,14 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
} else {
//skills
int s = index - 2;
- y = s * 10 + 62;
+ y = s * fh + 62;
if (_flags.use16ColorMode) {
y = (s + 8) << 3;
col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xE1 : 0x81;
if (redraw)
_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
} else {
- y = s * 10 + 62;
+ y = s * fh + 62;
col = _characters[_selectedCharacter].flags & (0x200 << s) ? 254 : 180;
if (redraw)
_screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
Commit: 5975cae2345258bd8d41d185d1602fcbeff7f13d
https://github.com/scummvm/scummvm/commit/5975cae2345258bd8d41d185d1602fcbeff7f13d
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Change menu layouts in Chinese LoL
Changed paths:
engines/kyra/resource/staticres_lol.cpp
diff --git a/engines/kyra/resource/staticres_lol.cpp b/engines/kyra/resource/staticres_lol.cpp
index d79a93c4029..7323c00c50b 100644
--- a/engines/kyra/resource/staticres_lol.cpp
+++ b/engines/kyra/resource/staticres_lol.cpp
@@ -478,76 +478,74 @@ void GUI_LoL::initStaticData() {
else
GUI_LOL_MENU(_mainMenu, 17, 0x4000, 0, 6, -1, -1, -1, -1);
- GUI_LOL_MENU_ITEM(_mainMenu.item[0], 0x4001, 16, 23, 176, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_mainMenu.item[1], 0x4002, 16, 40, 176, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_mainMenu.item[2], 0x4003, 16, 57, 176, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_mainMenu.item[3], 0x4004, 16, 74, 176, 15, 0, 0);
+ int buttonHeight = _vm->gameFlags().lang == Common::Language::ZH_TWN ? 20 : 15;
+ int buttonStep = _vm->gameFlags().lang == Common::Language::ZH_TWN ? 21 : 17;
+ int titleSkip = _vm->gameFlags().lang == Common::Language::ZH_TWN ? 26 : 22;
+ int saveListYStart = _vm->gameFlags().lang == Common::Language::ZH_TWN ? 44 : 39;
+ int saveListYOK = _vm->gameFlags().lang == Common::Language::ZH_TWN ? 114 : 118;
+
+ int row = 0;
+
+ for (row = 0; row < 4; row++)
+ GUI_LOL_MENU_ITEM(_mainMenu.item[row], 0x4001 + row, 16, titleSkip + 1 + row * buttonStep, 176, buttonHeight, 0, 0);
if (_vm->gameFlags().isTalkie) {
- GUI_LOL_MENU_ITEM(_mainMenu.item[4], 0x42D9, 16, 91, 176, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_mainMenu.item[5], 0x4006, 16, 108, 176, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_mainMenu.item[6], 0x4005, 88, 127, 104, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
- } else {
- GUI_LOL_MENU_ITEM(_mainMenu.item[4], 0x4006, 16, 91, 176, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_mainMenu.item[5], 0x4005, 88, 110, 104, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ GUI_LOL_MENU_ITEM(_mainMenu.item[row], 0x42D9, 16, titleSkip + 1 + row * buttonStep, 176, buttonHeight, 0, 0);
+ row++;
}
+ GUI_LOL_MENU_ITEM(_mainMenu.item[row], 0x4006, 16, titleSkip + 1 + row * buttonStep, 176, buttonHeight, 0, 0); row++;
+ GUI_LOL_MENU_ITEM(_mainMenu.item[row], 0x4005, 88, titleSkip + 1 + row * buttonStep + 2, 104, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]); row++;
Button::Callback mainMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedMainMenu);
for (int i = 0; i < _mainMenu.numberOfItems; ++i)
_mainMenu.item[i].callback = mainMenuFunctor;
GUI_LOL_MENU(_loadMenu, 10, 0x400E, 1, 5, 128, 20, 128, 118);
- GUI_LOL_MENU_ITEM(_loadMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ for (row = 0; row < 4; row++)
+ GUI_LOL_MENU_ITEM(_loadMenu.item[row], 0xFFFE - row, 8, saveListYStart + row * buttonStep, 256, buttonHeight, 0, 0);
+ GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, saveListYOK, 96, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback loadMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedLoadMenu);
for (int i = 0; i < 5; ++i)
_loadMenu.item[i].callback = loadMenuFunctor;
GUI_LOL_MENU(_saveMenu, 10, 0x400D, 1, 5, 128, 20, 128, 118);
- GUI_LOL_MENU_ITEM(_saveMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ for (row = 0; row < 4; row++)
+ GUI_LOL_MENU_ITEM(_saveMenu.item[row], 0xFFFE - row, 8, saveListYStart + row * buttonStep, 256, buttonHeight, 0, 0);
+ GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, saveListYOK, 96, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback saveMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSaveMenu);
for (int i = 0; i < 5; ++i)
_saveMenu.item[i].callback = saveMenuFunctor;
GUI_LOL_MENU(_deleteMenu, 10, 0x400F, 1, 5, 128, 20, 128, 118);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ for (row = 0; row < 4; row++)
+ GUI_LOL_MENU_ITEM(_deleteMenu.item[row], 0xFFFE - row, 8, saveListYStart + row * buttonStep, 256, buttonHeight, 0, 0);
+ GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, saveListYOK, 96, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback deleteMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeleteMenu);
for (int i = 0; i < 5; ++i)
_deleteMenu.item[i].callback = deleteMenuFunctor;
GUI_LOL_MENU(_gameOptions, 17, 0x400C, 0, 6, -1, -1, -1, -1);
+ row = 0;
+ if (!_vm->gameFlags().isTalkie) {
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF9, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x406A, 0); row++;
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF8, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x406B, 0); row++;
+ }
+
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF7, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x406E, 0); row++;
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF6, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x406C, 0); row++;
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF5, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x406D, 0); row++;
+
if (_vm->gameFlags().isTalkie) {
- GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xFFF7, 120, 22, 80, 15, 0x406E, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xFFF6, 120, 39, 80, 15, 0x406C, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xFFF5, 120, 56, 80, 15, 0x406D, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xFFF4, 120, 73, 80, 15, 0x42D5, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xFFF3, 120, 90, 80, 15, 0x42D2, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
- } else {
- GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xFFF9, 120, 22, 80, 15, 0x406A, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xFFF8, 120, 39, 80, 15, 0x406B, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xFFF7, 120, 56, 80, 15, 0x406E, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xFFF6, 120, 73, 80, 15, 0x406C, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xFFF5, 120, 90, 80, 15, 0x406D, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF4, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x42D5, 0); row++;
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0xFFF3, 120, titleSkip + row * buttonStep, 80, buttonHeight, 0x42D2, 0); row++;
}
+ GUI_LOL_MENU_ITEM(_gameOptions.item[row], 0x4072, 104, titleSkip + row * buttonStep + 3, 96, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback optionsMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedOptionsMenu);
for (int i = 0; i < _gameOptions.numberOfItems; ++i)
_gameOptions.item[i].callback = optionsMenuFunctor;
GUI_LOL_MENU(_audioOptions, 18, 0x42D9, 2, 1, -1, -1, -1, -1);
- GUI_LOL_MENU_ITEM(_audioOptions.item[0], 0x4072, 152, 76, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ GUI_LOL_MENU_ITEM(_audioOptions.item[0], 0x4072, 152, 76, 96, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
GUI_LOL_MENU_ITEM(_audioOptions.item[1], 3, 128, 22, 114, 14, 0x42DB, 0);
GUI_LOL_MENU_ITEM(_audioOptions.item[2], 4, 128, 39, 114, 14, 0x42DA, 0);
GUI_LOL_MENU_ITEM(_audioOptions.item[3], 5, 128, 56, 114, 14, 0x42DC, 0);
@@ -556,22 +554,22 @@ void GUI_LoL::initStaticData() {
_audioOptions.item[i].callback = audioMenuFunctor;
GUI_LOL_MENU(_deathMenu, 11, 0x4013, 0, 2, -1, -1, -1, -1);
- GUI_LOL_MENU_ITEM(_deathMenu.item[0], 0x4006, 8, 30, 104, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deathMenu.item[1], 0x4001, 176, 30, 104, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_deathMenu.item[0], 0x4006, 8, 30, 104, buttonHeight, 0, 0);
+ GUI_LOL_MENU_ITEM(_deathMenu.item[1], 0x4001, 176, 30, 104, buttonHeight, 0, 0);
Button::Callback deathMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeathMenu);
for (int i = 0; i < 2; ++i)
_deathMenu.item[i].callback = deathMenuFunctor;
GUI_LOL_MENU(_savenameMenu, 7, 0x4053, 0, 2, -1, -1, -1, -1);
- GUI_LOL_MENU_ITEM(_savenameMenu.item[0], 0x4012, 8, 38, 72, 15, 0, _vm->_keyMap[Common::KEYCODE_RETURN]);
- GUI_LOL_MENU_ITEM(_savenameMenu.item[1], 0x4011, 176, 38, 72, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
+ GUI_LOL_MENU_ITEM(_savenameMenu.item[0], 0x4012, 8, 38, 72, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_RETURN]);
+ GUI_LOL_MENU_ITEM(_savenameMenu.item[1], 0x4011, 176, 38, 72, buttonHeight, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback savenameMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSavenameMenu);
for (int i = 0; i < 2; ++i)
_savenameMenu.item[i].callback = savenameMenuFunctor;
GUI_LOL_MENU(_choiceMenu, 11, 0, 0, 2, -1, -1, -1, -1);
- GUI_LOL_MENU_ITEM(_choiceMenu.item[0], 0x4007, 8, 30, 72, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_choiceMenu.item[1], 0x4008, 208, 30, 72, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_choiceMenu.item[0], 0x4007, 8, 30, 72, buttonHeight, 0, 0);
+ GUI_LOL_MENU_ITEM(_choiceMenu.item[1], 0x4008, 208, 30, 72, buttonHeight, 0, 0);
Button::Callback choiceMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedChoiceMenu);
for (int i = 0; i < 2; ++i)
_choiceMenu.item[i].callback = choiceMenuFunctor;
Commit: 09051b940d4eb5cb0238b823fa4f83c48d4ca086
https://github.com/scummvm/scummvm/commit/09051b940d4eb5cb0238b823fa4f83c48d4ca086
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-04-30T20:01:06+02:00
Commit Message:
KYRA: Adjust layout of exit button in Chinese LoL
Changed paths:
engines/kyra/script/script_lol.cpp
diff --git a/engines/kyra/script/script_lol.cpp b/engines/kyra/script/script_lol.cpp
index acb561e8287..83493ac0120 100644
--- a/engines/kyra/script/script_lol.cpp
+++ b/engines/kyra/script/script_lol.cpp
@@ -1315,17 +1315,18 @@ int LoLEngine::olol_drawExitButton(EMCState *script) {
const char *str = getLangString(0x4033);
int w = _screen->getTextWidth(str);
+ int hButton = _screen->getFontHeight() + 3;
if (_flags.use16ColorMode) {
- gui_drawBox(x - offs - w, y - 9, w + offs, 9, 0xEE, 0xCC, 0x11);
- _screen->printText(str, x - (offs >> 1) - w, y - 7, 0xBB, 0);
+ gui_drawBox(x - offs - w, y - hButton, w + offs, hButton, 0xEE, 0xCC, 0x11);
+ _screen->printText(str, x - (offs >> 1) - w, y - hButton + 2, 0xBB, 0);
} else {
- gui_drawBox(x - offs - w, y - 9, w + offs, 9, 136, 251, 252);
- _screen->printText(str, x - (offs >> 1) - w, y - 7, 144, 0);
+ gui_drawBox(x - offs - w, y - hButton, w + offs, hButton, 136, 251, 252);
+ _screen->printText(str, x - (offs >> 1) - w, y - hButton + 2, 144, 0);
}
if (stackPos(1))
- _screen->drawGridBox(x - offs - w + 1, y - 8, w + offs - 2, 7, 1);
+ _screen->drawGridBox(x - offs - w + 1, y - hButton + 1, w + offs - 2, hButton - 2, 1);
_screen->setFont(cf);
_screen->setCurPage(cp);
More information about the Scummvm-git-logs
mailing list