aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-11-25 14:56:29 +0100
committerPaul Gilbert2014-12-12 22:45:17 -0500
commit2ea4601589196ba91d2e87582cb5f9325e0b1f95 (patch)
tree8b3d113774416cf6381bd66273da8b3efbdd32b2 /engines
parent7a691f38cf866c43222ce7d555f6bc953de49017 (diff)
downloadscummvm-rg350-2ea4601589196ba91d2e87582cb5f9325e0b1f95.tar.gz
scummvm-rg350-2ea4601589196ba91d2e87582cb5f9325e0b1f95.tar.bz2
scummvm-rg350-2ea4601589196ba91d2e87582cb5f9325e0b1f95.zip
ACCESS: Implement helpTitle
Diffstat (limited to 'engines')
-rw-r--r--engines/access/amazon/amazon_game.cpp48
-rw-r--r--engines/access/amazon/amazon_game.h4
-rw-r--r--engines/access/amazon/amazon_resources.cpp17
-rw-r--r--engines/access/amazon/amazon_resources.h3
4 files changed, 67 insertions, 5 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index e864a921f7..c12af5e339 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -624,8 +624,50 @@ void AmazonEngine::updateSummary(int chap) {
}
}
-void AmazonEngine::HELPTITLE() {
- warning("TODO: HELPTITLE");
+void AmazonEngine::CALCIQ() {
+ warning("TODO: CALCIQ");
+}
+
+void AmazonEngine::helpTitle() {
+ int width = _fonts._font2.stringWidth(_bubbleBox->_bubbleTitle);
+ int posX = 160 - (width / 2);
+ _fonts._font2._fontColors[0] = 0;
+ _fonts._font2._fontColors[1] = 33;
+ _fonts._font2._fontColors[2] = 34;
+ _fonts._font2._fontColors[3] = 35;
+ _fonts._font2.drawString(_screen, _bubbleBox->_bubbleTitle, Common::Point(posX, 24));
+
+ width = _fonts._font2.stringWidth(HELPLVLTXT[_helpLevel]);
+ posX = 160 - (width / 2);
+ _fonts._font2._fontColors[0] = 0;
+ _fonts._font2._fontColors[1] = 10;
+ _fonts._font2._fontColors[2] = 11;
+ _fonts._font2._fontColors[3] = 12;
+ _fonts._font2.drawString(_screen, HELPLVLTXT[_helpLevel], Common::Point(posX, 36));
+
+ Common::String iqText = "IQ: ";
+ CALCIQ();
+ Common::String IQSCORE = Common::String::format("d", _iqValue);
+ while (IQSCORE.size() != 4)
+ IQSCORE = " " + IQSCORE;
+
+ iqText += IQSCORE;
+ int index = _iqValue;
+ if (index == 170)
+ index = 169;
+
+ index /= 20;
+
+ iqText += " ";
+ iqText += IQLABELS[index];
+
+ width = _fonts._font2.stringWidth(iqText);
+ posX = 160 - (width / 2);
+ _fonts._font2._fontColors[0] = 0;
+ _fonts._font2._fontColors[1] = 10;
+ _fonts._font2._fontColors[2] = 11;
+ _fonts._font2._fontColors[3] = 12;
+ _fonts._font2.drawString(_screen, iqText, Common::Point(posX, 44));
}
void AmazonEngine::drawHelpText(const Common::String &msg) {
@@ -686,7 +728,7 @@ void AmazonEngine::drawHelp() {
if ((_useItem == 0) && (_screen->_vesaMode == 0))
_screen->fadeIn();
- HELPTITLE();
+ helpTitle();
drawHelpText("TODO: WHICH BUFFER?");
}
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index 0aea43575f..89d15d36e2 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -83,7 +83,8 @@ private:
*/
void setupGame();
- void HELPTITLE();
+ void CALCIQ();
+ void helpTitle();
void drawHelpText(const Common::String &msg);
void doCredit();
void scrollTitle();
@@ -164,6 +165,7 @@ public:
bool _antEatFl;
bool _stabFl;
Common::Point _pitPos;
+ int _iqValue;
public:
AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc);
diff --git a/engines/access/amazon/amazon_resources.cpp b/engines/access/amazon/amazon_resources.cpp
index e03750fd52..08ecfff467 100644
--- a/engines/access/amazon/amazon_resources.cpp
+++ b/engines/access/amazon/amazon_resources.cpp
@@ -1226,6 +1226,23 @@ const char *const NO_HINTS_MESSAGE = "THE HELP SYSTEM HAS BEEN TURNED OFF FOR TH
const char *const HIT1 = "YOU HIT THE ROCKS AND THE CANOE BEGINS TO LEAK.";
const char *const HIT2 = "YOU HIT THE ROCKS AND THE CANOE DEVELOPS SERIOUS LEAKS.";
const char *const BAR_MESSAGE = "YOU ARE TOO BUSY TRYING TO KEEP FROM SINKING TO DO THAT";
+const char *const HELPLVLTXT[3] = {
+ " LEVEL 1 ",
+ " LEVEL 2 ",
+ " LEVEL 3 "
+};
+
+const char *const IQLABELS[9] = {
+ "VEGETABLE",
+ "NEANDERTHAL",
+ "LOBOTOMIZED",
+ "DENSE",
+ "AVERAGE",
+ "INTELLIGENT",
+ "MURPHYITE",
+ "BRILLIANT",
+ "GENIUS"
+};
const byte DEATH_SCREENS[58] = {
0, 1, 0, 0, 0, 0, 0, 0, 2, 0,
diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h
index 4229522f44..37b12d26cf 100644
--- a/engines/access/amazon/amazon_resources.h
+++ b/engines/access/amazon/amazon_resources.h
@@ -78,7 +78,8 @@ extern const char *const NO_HINTS_MESSAGE;
extern const char *const HIT1;
extern const char *const HIT2;
extern const char *const BAR_MESSAGE;
-
+extern const char *const HELPLVLTXT[3];
+extern const char *const IQLABELS[9];
extern const byte DEATH_SCREENS[58];
extern const char *const DEATH_TEXT[58];