aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2007-09-23 16:43:43 +0000
committerEugene Sandulenko2007-09-23 16:43:43 +0000
commit38d8105e4e7c29f0794dee87f908081e77aa0962 (patch)
tree28f49dcda1e2e9861b989c68457694ca3b1f8a90 /engines
parentb138ff45fc716aefc58bcd402919a2d5e53fefdf (diff)
downloadscummvm-rg350-38d8105e4e7c29f0794dee87f908081e77aa0962.tar.gz
scummvm-rg350-38d8105e4e7c29f0794dee87f908081e77aa0962.tar.bz2
scummvm-rg350-38d8105e4e7c29f0794dee87f908081e77aa0962.zip
Add support for Russian versions of AGI games
svn-id: r29056
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi.h1
-rw-r--r--engines/agi/detection.cpp105
-rw-r--r--engines/agi/graphics.cpp2
-rw-r--r--engines/agi/graphics.h2
-rw-r--r--engines/agi/inv.cpp53
-rw-r--r--engines/agi/op_cmd.cpp11
-rw-r--r--engines/agi/text.cpp12
7 files changed, 175 insertions, 11 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index eac80ac9a3..03965681f1 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -682,6 +682,7 @@ public:
uint32 getFeatures() const;
uint16 getVersion() const;
uint16 getGameType() const;
+ Common::Language getLanguage() const;
Common::Platform getPlatform() const;
};
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index c43e1052a3..f57a2b2650 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -59,6 +59,10 @@ Common::Platform AgiBase::getPlatform() const {
return _gameDescription->desc.platform;
}
+Common::Language AgiBase::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
uint16 AgiBase::getVersion() const {
return _gameDescription->version;
}
@@ -288,6 +292,23 @@ static const AGIGameDescription gameDescriptions[] = {
{
+ // Black Cauldron (Russian)
+ {
+ "bc",
+ "",
+ AD_ENTRY1s("logdir", "b7de782dfdf8ea7dde8064f09804bcf5", 357),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GID_BC,
+ GType_V2,
+ 0,
+ 0x2440,
+ },
+
+
+ {
// Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
{
"bc",
@@ -641,6 +662,23 @@ static const AGIGameDescription gameDescriptions[] = {
{
+ // King's Quest 2 (Russian)
+ {
+ "kq2",
+ "",
+ AD_ENTRY1s("logdir", "35211c574ececebdc723b23e35f99275", 543),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GID_KQ2,
+ GType_V2,
+ 0,
+ 0x2917,
+ },
+
+
+ {
// King's Quest 3 (Amiga) 1.01 11/8/86
// The original game did not have menus, they are enabled under ScummVM
{
@@ -746,6 +784,23 @@ static const AGIGameDescription gameDescriptions[] = {
{
+ // King's Quest 3 (Russian)
+ {
+ "kq3",
+ "",
+ AD_ENTRY1s("logdir", "5856dec6ccb9c4b70aee21044a19270a", 390),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GID_KQ3,
+ GType_V2,
+ GF_ESCPAUSE,
+ 0x2272,
+ },
+
+
+ {
// King's Quest 3 (PC 5.25") 2.00 5/25/87 [AGI 2.435]
{
"kq3",
@@ -1317,6 +1372,23 @@ static const AGIGameDescription gameDescriptions[] = {
{
+ // Police Quest 1 (Russian)
+ {
+ "pq1",
+ "",
+ AD_ENTRY1s("logdir", "604cc8041d24c4c7e5fa8baf386ef76e", 360),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GID_PQ1,
+ GType_V2,
+ 0,
+ 0x2917,
+ },
+
+
+ {
// Police Quest 1 (Mac) 2.0G 12/3/87
{
"pq1",
@@ -1456,6 +1528,22 @@ static const AGIGameDescription gameDescriptions[] = {
},
+ {
+ // Space Quest 1 (Russian)
+ {
+ "sq1",
+ "",
+ AD_ENTRY1s("logdir", "a279eb8ddbdefdb1ea6adc827a1d632a", 372),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GID_SQ1,
+ GType_V2,
+ GF_ESCPAUSE,
+ 0x2089,
+ },
+
{
// Space Quest 1 (PC 5.25"/3.5") 2.2 [AGI 2.426/2.917]
@@ -1566,6 +1654,23 @@ static const AGIGameDescription gameDescriptions[] = {
{
+ // Space Quest 2 (Russian)
+ {
+ "sq2",
+ "",
+ AD_ENTRY1s("logdir", "ba21c8934caf28e3ba45ce7d1cd6b041", 423),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GID_SQ2,
+ GType_V2,
+ 0,
+ 0x2917,
+ },
+
+
+ {
// Space Quest 2 (PC 3.5") 2.0A [AGI 2.912]
{
"sq2",
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index 378080fcc9..ce988ac2ba 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -613,7 +613,7 @@ void GfxMgr::shakeEnd() {
free(_shakeH);
}
-void GfxMgr::putTextCharacter(int l, int x, int y, unsigned int c, int fg, int bg, bool checkerboard, const uint8 *font) {
+void GfxMgr::putTextCharacter(int l, int x, int y, unsigned char c, int fg, int bg, bool checkerboard, const uint8 *font) {
int x1, y1, xx, yy, cc;
const uint8 *p;
diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h
index 6dfe168362..da6acf6774 100644
--- a/engines/agi/graphics.h
+++ b/engines/agi/graphics.h
@@ -60,7 +60,7 @@ public:
void gfxPutBlock(int x1, int y1, int x2, int y2);
- void putTextCharacter(int, int, int, unsigned int, int, int, bool checkerboard = false, const uint8 *font = curFont);
+ void putTextCharacter(int, int, int, unsigned char, int, int, bool checkerboard = false, const uint8 *font = curFont);
void shakeScreen(int);
void shakeStart();
void shakeEnd();
diff --git a/engines/agi/inv.cpp b/engines/agi/inv.cpp
index eb4917c322..e1b864c2b5 100644
--- a/engines/agi/inv.cpp
+++ b/engines/agi/inv.cpp
@@ -52,6 +52,22 @@ namespace Agi {
#define SELECT_Y 24
#define SELECT_MSG "Press ENTER to select, ESC to cancel"
+#define NOTHING_X_RU 16
+#define NOTHING_Y_RU 3
+#define NOTHING_MSG_RU "\xad\xa8\xe7\xa5\xa3\xae"
+
+#define ANY_KEY_X_RU 4
+#define ANY_KEY_Y_RU 24
+#define ANY_KEY_MSG_RU "\x8b\xee\xa1\xa0\xef \xaa\xab\xa0\xa2\xa8\xe8\xa0 - \xa2\xae\xa7\xa2\xe0\xa0\xe2 \xa2 \xa8\xa3\xe0\xe3."
+
+#define YOUHAVE_X_RU 11
+#define YOUHAVE_Y_RU 0
+#define YOUHAVE_MSG_RU " \x93 \xa2\xa0\xe1 \xa5\xe1\xe2\xec: "
+
+#define SELECT_X_RU 2
+#define SELECT_Y_RU 24
+#define SELECT_MSG_RU "ENTER - \xa2\xeb\xa1\xe0\xa0\xe2\xec, ESC - \xae\xe2\xac\xa5\xad\xa8\xe2\xec."
+
void AgiEngine::printItem(int n, int fg, int bg) {
printText(objectName(_intobj[n]), 0, n % 2 ? 39 - strlen(objectName(_intobj[n])) : 1,
(n / 2) + 2, 40, fg, bg);
@@ -84,7 +100,14 @@ int AgiEngine::showItems() {
}
if (i == 0) {
- printText(NOTHING_MSG, 0, NOTHING_X, NOTHING_Y, 40, STATUS_FG, STATUS_BG);
+ switch (getLanguage()) {
+ case Common::RU_RUS:
+ printText(NOTHING_MSG_RU, 0, NOTHING_X_RU, NOTHING_Y_RU, 40, STATUS_FG, STATUS_BG);
+ break;
+ default:
+ printText(NOTHING_MSG, 0, NOTHING_X, NOTHING_Y, 40, STATUS_FG, STATUS_BG);
+ break;
+ }
}
return i;
@@ -166,7 +189,14 @@ void AgiEngine::inventory() {
_game.colorBg = 15;
_gfx->clearScreen(_game.colorBg);
- printText(YOUHAVE_MSG, 0, YOUHAVE_X, YOUHAVE_Y, 40, STATUS_FG, STATUS_BG);
+ switch (getLanguage()) {
+ case Common::RU_RUS:
+ printText(YOUHAVE_MSG_RU, 0, YOUHAVE_X_RU, YOUHAVE_Y_RU, 40, STATUS_FG, STATUS_BG);
+ break;
+ default:
+ printText(YOUHAVE_MSG, 0, YOUHAVE_X, YOUHAVE_Y, 40, STATUS_FG, STATUS_BG);
+ break;
+ }
/* FIXME: doesn't check if objects overflow off screen... */
@@ -175,10 +205,21 @@ void AgiEngine::inventory() {
n = showItems();
- if (getflag(fStatusSelectsItems)) {
- printText(SELECT_MSG, 0, SELECT_X, SELECT_Y, 40, STATUS_FG, STATUS_BG);
- } else {
- printText(ANY_KEY_MSG, 0, ANY_KEY_X, ANY_KEY_Y, 40, STATUS_FG, STATUS_BG);
+ switch (getLanguage()) {
+ case Common::RU_RUS:
+ if (getflag(fStatusSelectsItems)) {
+ printText(SELECT_MSG_RU, 0, SELECT_X_RU, SELECT_Y_RU, 40, STATUS_FG, STATUS_BG);
+ } else {
+ printText(ANY_KEY_MSG_RU, 0, ANY_KEY_X_RU, ANY_KEY_Y_RU, 40, STATUS_FG, STATUS_BG);
+ }
+ break;
+ default:
+ if (getflag(fStatusSelectsItems)) {
+ printText(SELECT_MSG, 0, SELECT_X, SELECT_Y, 40, STATUS_FG, STATUS_BG);
+ } else {
+ printText(ANY_KEY_MSG, 0, ANY_KEY_X, ANY_KEY_Y, 40, STATUS_FG, STATUS_BG);
+ }
+ break;
}
_gfx->flushScreen();
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 05d5d91572..7418d043be 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -947,9 +947,18 @@ cmd(set_game_id) {
cmd(pause) {
int tmp = game.clockEnabled;
const char *b[] = { "Continue", NULL };
+ const char *b_ru[] = { "\x8f\xe0\xae\xa4\xae\xab\xa6\xa8\xe2\xec", NULL };
game.clockEnabled = false;
- g_agi->selectionBox(" Game is paused. \n\n\n", b);
+
+ switch (g_agi->getLanguage()) {
+ case Common::RU_RUS:
+ g_agi->selectionBox(" \x88\xa3\xe0\xa0 \xae\xe1\xe2\xa0\xad\xae\xa2\xab\xa5\xad\xa0. \n\n\n", b_ru);
+ break;
+ default:
+ g_agi->selectionBox(" Game is paused. \n\n\n", b);
+ break;
+ }
game.clockEnabled = tmp;
}
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index bb334d0401..aea1468dcb 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -606,8 +606,16 @@ void AgiEngine::writeStatus() {
return;
}
- sprintf(x, " Score:%i of %-3i", _game.vars[vScore], _game.vars[vMaxScore]);
- printStatus("%-17s Sound:%s ", x, getflag(fSoundOn) ? "on " : "off");
+ switch (getLanguage()) {
+ case Common::RU_RUS:
+ sprintf(x, " \x91\xe7\xa5\xe2: %i \xa8\xa7 %-3i", _game.vars[vScore], _game.vars[vMaxScore]);
+ printStatus("%-17s \x87\xa2\xe3\xaa:%s", x, getflag(fSoundOn) ? "\xa2\xaa\xab " : "\xa2\xeb\xaa\xab");
+ break;
+ default:
+ sprintf(x, " Score:%i of %-3i", _game.vars[vScore], _game.vars[vMaxScore]);
+ printStatus("%-17s Sound:%s ", x, getflag(fSoundOn) ? "on " : "off");
+ break;
+ }
}
/**