aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-13 18:17:02 -0400
committerPaul Gilbert2018-03-13 18:17:02 -0400
commitac7a9224fe9c66219583dd28e8e3c4fbfe714703 (patch)
treefa12fa1f6006c4fec084d4dde2c2b070c1387c09
parent654ef04f82de0e05bee0ab07734f39eef3877069 (diff)
downloadscummvm-rg350-ac7a9224fe9c66219583dd28e8e3c4fbfe714703.tar.gz
scummvm-rg350-ac7a9224fe9c66219583dd28e8e3c4fbfe714703.tar.bz2
scummvm-rg350-ac7a9224fe9c66219583dd28e8e3c4fbfe714703.zip
XEEN: Fix text colors during intro/exit cutscenes
-rw-r--r--devtools/create_xeen/constants.cpp44
-rw-r--r--devtools/create_xeen/map.cpp21
-rw-r--r--dists/engine-data/xeen.ccsbin43101 -> 43490 bytes
-rw-r--r--engines/xeen/combat.cpp2
-rw-r--r--engines/xeen/combat.h2
-rw-r--r--engines/xeen/dialogs/dialogs_party.cpp2
-rw-r--r--engines/xeen/dialogs/please_wait.cpp2
-rw-r--r--engines/xeen/font.cpp3
-rw-r--r--engines/xeen/resources.cpp1
-rw-r--r--engines/xeen/resources.h1
-rw-r--r--engines/xeen/scripts.cpp3
-rw-r--r--engines/xeen/xeen.cpp8
-rw-r--r--engines/xeen/xeen.h2
13 files changed, 73 insertions, 18 deletions
diff --git a/devtools/create_xeen/constants.cpp b/devtools/create_xeen/constants.cpp
index a0cdb18669..e895949509 100644
--- a/devtools/create_xeen/constants.cpp
+++ b/devtools/create_xeen/constants.cpp
@@ -376,6 +376,49 @@ const byte TEXT_COLORS[40][4] = {
{ 0x00, 0xDB, 0xDB, 0xDB },
};
+const byte TEXT_COLORS_STARTUP[40][4] = {
+ { 0x00, 0x19, 0x19, 0x19 },
+ { 0x00, 0x08, 0x08, 0x08 },
+ { 0x00, 0x0F, 0x0F, 0x0F },
+ { 0x00, 0x15, 0x15, 0x15 },
+ { 0x00, 0x01, 0x01, 0x01 },
+ { 0x00, 0x1F, 0x1F, 0x1F },
+ { 0x00, 0x26, 0x26, 0x26 },
+ { 0x00, 0x2B, 0x2B, 0x2B },
+ { 0x00, 0x31, 0x31, 0x31 },
+ { 0x00, 0x36, 0x36, 0x36 },
+ { 0x00, 0x3D, 0x3D, 0x3D },
+ { 0x00, 0x42, 0x42, 0x42 },
+ { 0x00, 0x46, 0x46, 0x46 },
+ { 0x00, 0x4C, 0x4C, 0x4C },
+ { 0x00, 0x50, 0x50, 0x50 },
+ { 0x00, 0x55, 0x55, 0x55 },
+ { 0x00, 0x5D, 0x5D, 0x5D },
+ { 0x00, 0x60, 0x60, 0x60 },
+ { 0x00, 0x65, 0x65, 0x65 },
+ { 0x00, 0x6C, 0x6C, 0x6C },
+ { 0x00, 0x70, 0x70, 0x70 },
+ { 0x00, 0x75, 0x75, 0x75 },
+ { 0x00, 0x7B, 0x7B, 0x7B },
+ { 0x00, 0x80, 0x80, 0x80 },
+ { 0x00, 0x85, 0x85, 0x85 },
+ { 0x00, 0x8D, 0x8D, 0x8D },
+ { 0x00, 0x90, 0x90, 0x90 },
+ { 0x00, 0x97, 0x97, 0x97 },
+ { 0x00, 0x9D, 0x9D, 0x9D },
+ { 0x00, 0xA4, 0xA4, 0xA4 },
+ { 0x00, 0xAB, 0xAB, 0xAB },
+ { 0x00, 0xB0, 0xB0, 0xB0 },
+ { 0x00, 0xB6, 0xB6, 0xB6 },
+ { 0x00, 0xBD, 0xBD, 0xBD },
+ { 0x00, 0xC0, 0xC0, 0xC0 },
+ { 0x00, 0xC6, 0xC6, 0xC6 },
+ { 0x00, 0xCD, 0xCD, 0xCD },
+ { 0x00, 0xD0, 0xD0, 0xD0 },
+ { 0x00, 0x19, 0x19, 0x19 },
+ { 0x00, 0x31, 0x31, 0x31 }
+};
+
const char *const DIRECTION_TEXT_UPPER[4] = { "NORTH", "EAST", "SOUTH", "WEST" };
const char *const DIRECTION_TEXT[4] = { "North", "East", "South", "West" };
@@ -1858,6 +1901,7 @@ void writeConstants(CCArchive &cc) {
file.syncStrings(WHO_WILL_ACTIONS, 4);
file.syncBytes2D((const byte *)SYMBOLS, 20, 64);
file.syncBytes2D((const byte *)TEXT_COLORS, 40, 4);
+ file.syncBytes2D((const byte *)TEXT_COLORS_STARTUP, 40, 4);
file.syncStrings(DIRECTION_TEXT_UPPER, 4);
file.syncStrings(DIRECTION_TEXT, 4);
file.syncStrings(RACE_NAMES, 5);
diff --git a/devtools/create_xeen/map.cpp b/devtools/create_xeen/map.cpp
index 7e38cd7407..6ca1987a7a 100644
--- a/devtools/create_xeen/map.cpp
+++ b/devtools/create_xeen/map.cpp
@@ -145,16 +145,18 @@ void writeMazeEvents(CCArchive &cc) {
f.write(MIRROR_EVENTS, 32);
// Bench 1 events
- const byte BENCH1_EVENTS[21] = {
- 14, 7, 8, 0, 0, 20, 34, 10000 % 256, 10000 / 256, 0, 0, 0, 0, 0, 0, // Give gold
- 5, 7, 8, 0, 1, 18 // Exit
+ const byte BENCH1_EVENTS[32] = {
+ 10, 7, 8, 0, 0, 5, 1, 2, 3, 1, 2, // NPC
+ 14, 7, 8, 0, 1, 20, 34, 10000 % 256, 10000 / 256, 0, 0, 0, 0, 0, 0, // Give gold
+ 5, 7, 8, 0, 2, 18 // Exit
};
- const byte BENCH2_EVENTS[19] = {
- 14, 8, 8, 0, 0, 20, 35, 1000 % 256, 1000 / 256, 0, 0, 0, 0, // Give gems
- 5, 8, 8, 0, 1, 18 // Exit
+ const byte BENCH2_EVENTS[30] = {
+ 10, 8, 8, 0, 0, 5, 1, 3, 3, 1, 2, // NPC
+ 14, 8, 8, 0, 1, 20, 35, 1000 % 256, 1000 / 256, 0, 0, 0, 0, // Give gems
+ 5, 8, 8, 0, 2, 18 // Exit
};
- f.write(BENCH1_EVENTS, 21);
- f.write(BENCH2_EVENTS, 19);
+ f.write(BENCH1_EVENTS, 32);
+ f.write(BENCH2_EVENTS, 30);
cc.add("mazex255.evt", f);
}
@@ -166,6 +168,9 @@ void writeMazeText(CCArchive &cc) {
Common::MemFile f;
f.writeString("Where to?");
+ f.writeString("Isle of ScummVM");
+ f.writeString("You have done well to find this ancient isle. This will aid you on your journey.");
+ f.writeString("It is my hope that this isle will be but the first of many such new destinations the mirror may take you.");
cc.add("aazex255.txt", f);
}
diff --git a/dists/engine-data/xeen.ccs b/dists/engine-data/xeen.ccs
index 6a1e1060d1..3c7bcbc2cf 100644
--- a/dists/engine-data/xeen.ccs
+++ b/dists/engine-data/xeen.ccs
Binary files differ
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 0c0836af66..603b6aef71 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -103,7 +103,7 @@ Combat::Combat(XeenEngine *vm): _vm(vm), _missVoc("miss.voc") {
_whosTurn = -1;
_itemFlag = false;
_monstersAttacking = false;
- _combatMode = COMBATMODE_0;
+ _combatMode = COMBATMODE_STARTUP;
_attackDurationCtr = 0;
_partyRan = false;
_monster2Attack = -1;
diff --git a/engines/xeen/combat.h b/engines/xeen/combat.h
index f081add8c3..938845b022 100644
--- a/engines/xeen/combat.h
+++ b/engines/xeen/combat.h
@@ -58,7 +58,7 @@ enum ShootType {
};
enum CombatMode {
- COMBATMODE_0 = 0, COMBATMODE_1 = 1, COMBATMODE_2 = 2
+ COMBATMODE_STARTUP = 0, COMBATMODE_1 = 1, COMBATMODE_2 = 2
};
enum PowType {
diff --git a/engines/xeen/dialogs/dialogs_party.cpp b/engines/xeen/dialogs/dialogs_party.cpp
index 33e138b6ac..c3d6843ffd 100644
--- a/engines/xeen/dialogs/dialogs_party.cpp
+++ b/engines/xeen/dialogs/dialogs_party.cpp
@@ -121,7 +121,7 @@ void PartyDialog::execute() {
if (party._activeParty.size() == 0) {
ErrorScroll::show(_vm, Res.NO_ONE_TO_ADVENTURE_WITH);
} else {
- if (_vm->_mode != MODE_0) {
+ if (_vm->_mode != MODE_STARTUP) {
for (int idx = OBSCURITY_NONE; idx >= OBSCURITY_BLACK; --idx) {
events.updateGameCounter();
intf.obscureScene((Obscurity)idx);
diff --git a/engines/xeen/dialogs/please_wait.cpp b/engines/xeen/dialogs/please_wait.cpp
index 749c6a850a..9186910f07 100644
--- a/engines/xeen/dialogs/please_wait.cpp
+++ b/engines/xeen/dialogs/please_wait.cpp
@@ -40,7 +40,7 @@ void PleaseWait::show() {
Windows &windows = *g_vm->_windows;
Window &w = windows[9];
- if (g_vm->_mode != MODE_0) {
+ if (g_vm->_mode != MODE_STARTUP) {
w.open();
w.writeString(_msg);
w.update();
diff --git a/engines/xeen/font.cpp b/engines/xeen/font.cpp
index ccdcbf4627..58381e1516 100644
--- a/engines/xeen/font.cpp
+++ b/engines/xeen/font.cpp
@@ -23,6 +23,7 @@
#include "common/endian.h"
#include "xeen/font.h"
#include "xeen/resources.h"
+#include "xeen/xeen.h"
namespace Xeen {
@@ -320,7 +321,7 @@ int FontSurface::fontAtoi(int len) {
}
void FontSurface::setTextColor(int idx) {
- const byte *colP = &Res.TEXT_COLORS[idx][0];
+ const byte *colP = (g_vm->_mode == MODE_STARTUP) ? &Res.TEXT_COLORS_STARTUP[idx][0] : &Res.TEXT_COLORS[idx][0];
Common::copy(colP, colP + 4, &_textColors[0]);
}
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index 14c87d6a1a..c2732a9bf9 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -81,6 +81,7 @@ void Resources::loadData() {
file.syncStrings(WHO_WILL_ACTIONS, 4);
file.syncBytes2D((byte *)SYMBOLS, 20, 64);
file.syncBytes2D((byte *)TEXT_COLORS, 40, 4);
+ file.syncBytes2D((byte *)TEXT_COLORS_STARTUP, 40, 4);
file.syncStrings(DIRECTION_TEXT_UPPER, 4);
file.syncStrings(DIRECTION_TEXT, 4);
file.syncStrings(RACE_NAMES, 5);
diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h
index 6dff6a7de9..0659de45c9 100644
--- a/engines/xeen/resources.h
+++ b/engines/xeen/resources.h
@@ -135,6 +135,7 @@ public:
const char *WHO_WILL_ACTIONS[4];
byte SYMBOLS[20][64];
byte TEXT_COLORS[40][4];
+ byte TEXT_COLORS_STARTUP[40][4];
const char *DIRECTION_TEXT_UPPER[4];
const char *DIRECTION_TEXT[4];
const char *RACE_NAMES[5];
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index ffe4e2dfe9..8777cdc6e0 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -435,7 +435,7 @@ bool Scripts::cmdSignText(ParamsIterator &params) {
bool Scripts::cmdNPC(ParamsIterator &params) {
Map &map = *_vm->_map;
- params.readByte();
+ params.readByte(); // _message already holds title
int textNum = params.readByte();
int portrait = params.readByte();
int confirm = params.readByte();
@@ -1479,6 +1479,7 @@ void Scripts::doEnding(const Common::String &endStr) {
// Get the current total score
uint finalScore = party.getScore();
+ g_vm->_mode = MODE_STARTUP;
g_vm->showCutscene(endStr, state, finalScore);
g_vm->_gameMode = GMODE_MENU;
}
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp
index d4c6fa045b..c8fb40d2a0 100644
--- a/engines/xeen/xeen.cpp
+++ b/engines/xeen/xeen.cpp
@@ -59,7 +59,7 @@ XeenEngine::XeenEngine(OSystem *syst, const XeenGameDescription *gameDesc)
_noDirectionSense = false;
_startupWindowActive = false;
_gameMode = GMODE_STARTUP;
- _mode = MODE_0;
+ _mode = MODE_STARTUP;
_endingScore = 0;
_loadSaveSlot = -1;
_gameWon[0] = _gameWon[1] = _gameWon[2] = false;
@@ -220,7 +220,7 @@ void XeenEngine::play() {
}
_interface->startup();
- if (_mode == MODE_0) {
+ if (_mode == MODE_STARTUP) {
// _screen->fadeOut();
}
@@ -230,7 +230,7 @@ void XeenEngine::play() {
_events->setCursor(0);
_combat->_moveMonsters = true;
- if (_mode == MODE_0) {
+ if (_mode == MODE_STARTUP) {
_mode = MODE_1;
_screen->fadeIn();
}
@@ -241,6 +241,8 @@ void XeenEngine::play() {
if (_party->_dead)
death();
+
+ _mode = MODE_STARTUP;
}
void XeenEngine::gameLoop() {
diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h
index d26ffdebab..c79b240388 100644
--- a/engines/xeen/xeen.h
+++ b/engines/xeen/xeen.h
@@ -76,7 +76,7 @@ enum XeenDebugChannels {
enum Mode {
MODE_FF = -1,
- MODE_0 = 0,
+ MODE_STARTUP = 0,
MODE_1 = 1,
MODE_COMBAT = 2,
MODE_3 = 3,