[Scummvm-cvs-logs] SF.net SVN: scummvm: [29056] scummvm/trunk/engines/agi
sev at users.sourceforge.net
sev at users.sourceforge.net
Sun Sep 23 18:43:43 CEST 2007
Revision: 29056
http://scummvm.svn.sourceforge.net/scummvm/?rev=29056&view=rev
Author: sev
Date: 2007-09-23 09:43:43 -0700 (Sun, 23 Sep 2007)
Log Message:
-----------
Add support for Russian versions of AGI games
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.h
scummvm/trunk/engines/agi/detection.cpp
scummvm/trunk/engines/agi/graphics.cpp
scummvm/trunk/engines/agi/graphics.h
scummvm/trunk/engines/agi/inv.cpp
scummvm/trunk/engines/agi/op_cmd.cpp
scummvm/trunk/engines/agi/text.cpp
Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/agi.h 2007-09-23 16:43:43 UTC (rev 29056)
@@ -682,6 +682,7 @@
uint32 getFeatures() const;
uint16 getVersion() const;
uint16 getGameType() const;
+ Common::Language getLanguage() const;
Common::Platform getPlatform() const;
};
Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/detection.cpp 2007-09-23 16:43:43 UTC (rev 29056)
@@ -59,6 +59,10 @@
return _gameDescription->desc.platform;
}
+Common::Language AgiBase::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
uint16 AgiBase::getVersion() const {
return _gameDescription->version;
}
@@ -288,6 +292,23 @@
{
+ // 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 @@
{
+ // 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 @@
{
+ // 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 @@
{
+ // 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,7 +1528,23 @@
},
+ {
+ // 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 @@
{
+ // 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",
Modified: scummvm/trunk/engines/agi/graphics.cpp
===================================================================
--- scummvm/trunk/engines/agi/graphics.cpp 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/graphics.cpp 2007-09-23 16:43:43 UTC (rev 29056)
@@ -613,7 +613,7 @@
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;
Modified: scummvm/trunk/engines/agi/graphics.h
===================================================================
--- scummvm/trunk/engines/agi/graphics.h 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/graphics.h 2007-09-23 16:43:43 UTC (rev 29056)
@@ -60,7 +60,7 @@
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();
Modified: scummvm/trunk/engines/agi/inv.cpp
===================================================================
--- scummvm/trunk/engines/agi/inv.cpp 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/inv.cpp 2007-09-23 16:43:43 UTC (rev 29056)
@@ -52,6 +52,22 @@
#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 @@
}
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 @@
_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 @@
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();
Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/op_cmd.cpp 2007-09-23 16:43:43 UTC (rev 29056)
@@ -947,9 +947,18 @@
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;
}
Modified: scummvm/trunk/engines/agi/text.cpp
===================================================================
--- scummvm/trunk/engines/agi/text.cpp 2007-09-23 16:41:15 UTC (rev 29055)
+++ scummvm/trunk/engines/agi/text.cpp 2007-09-23 16:43:43 UTC (rev 29056)
@@ -606,8 +606,16 @@
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;
+ }
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list