[Scummvm-git-logs] scummvm master -> ac7a9224fe9c66219583dd28e8e3c4fbfe714703

dreammaster dreammaster at scummvm.org
Tue Mar 13 23:17:53 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ac7a9224fe XEEN: Fix text colors during intro/exit cutscenes


Commit: ac7a9224fe9c66219583dd28e8e3c4fbfe714703
    https://github.com/scummvm/scummvm/commit/ac7a9224fe9c66219583dd28e8e3c4fbfe714703
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-13T18:17:02-04:00

Commit Message:
XEEN: Fix text colors during intro/exit cutscenes

Changed paths:
    devtools/create_xeen/constants.cpp
    devtools/create_xeen/map.cpp
    dists/engine-data/xeen.ccs
    engines/xeen/combat.cpp
    engines/xeen/combat.h
    engines/xeen/dialogs/dialogs_party.cpp
    engines/xeen/dialogs/please_wait.cpp
    engines/xeen/font.cpp
    engines/xeen/resources.cpp
    engines/xeen/resources.h
    engines/xeen/scripts.cpp
    engines/xeen/xeen.cpp
    engines/xeen/xeen.h


diff --git a/devtools/create_xeen/constants.cpp b/devtools/create_xeen/constants.cpp
index a0cdb18..e895949 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 7e38cd7..6ca1987 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 6a1e106..3c7bcbc 100644
Binary files a/dists/engine-data/xeen.ccs and b/dists/engine-data/xeen.ccs differ
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 0c0836a..603b6ae 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 f081add..938845b 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 33e138b..c3d6843 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 749c6a8..9186910 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 ccdcbf4..58381e1 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 14c87d6..c2732a9 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 6dff6a7..0659de4 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 ffe4e2d..8777cdc 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 d4c6fa0..c8fb40d 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 d26ffde..c79b240 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,





More information about the Scummvm-git-logs mailing list