[Scummvm-git-logs] scummvm master -> 63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5

dreammaster dreammaster at scummvm.org
Fri Nov 24 00:56:26 CET 2017


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:
63b0b417bb XEEN: Fix switching characters within town actions


Commit: 63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5
    https://github.com/scummvm/scummvm/commit/63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-11-23T18:56:18-05:00

Commit Message:
XEEN: Fix switching characters within town actions

Changed paths:
    engines/xeen/town.cpp
    engines/xeen/town.h


diff --git a/engines/xeen/town.cpp b/engines/xeen/town.cpp
index 842317a..0f6726c 100644
--- a/engines/xeen/town.cpp
+++ b/engines/xeen/town.cpp
@@ -72,7 +72,7 @@ int Town::townAction(TownAction actionId) {
 	Sound &sound = *_vm->_sound;
 	bool isDarkCc = _vm->_files->_isDarkCc;
 
-	if (actionId == 12) {
+	if (actionId == ACTION12) {
 		pyramidEvent();
 		return 0;
 	}
@@ -220,7 +220,7 @@ int Town::townAction(TownAction actionId) {
 	intf._levitateUIFrame = 0;
 
 	_townSprites[_drawFrameIndex / 8].draw(screen, _drawFrameIndex % 8, _townPos);
-	if (actionId == 0 && isDarkCc) {
+	if (actionId == BANK && isDarkCc) {
 		_townSprites[4].draw(screen, _vm->getRandomNumber(13, 18),
 			Common::Point(8, 30));
 	}
@@ -236,7 +236,7 @@ int Town::townAction(TownAction actionId) {
 	intf.highlightChar(0);
 	drawTownAnim(1);
 
-	if (actionId == 0)
+	if (actionId == BANK)
 		intf._overallFrame = 2;
 
 	sound.playSound(vocName, 1);
@@ -244,12 +244,13 @@ int Town::townAction(TownAction actionId) {
 	do {
 		townWait();
 		charP = doTownOptions(charP);
+		title = createTownText(*charP);
 		screen._windows[10].writeString(title);
 		drawButtons(&screen);
 	} while (!_vm->shouldQuit() && _buttonValue != Common::KEYCODE_ESCAPE);
 
 	switch (actionId) {
-	case 1:
+	case BLACKSMITH:
 		// Leave blacksmith
 		if (isDarkCc) {
 			sound.stopSound();
@@ -257,7 +258,7 @@ int Town::townAction(TownAction actionId) {
 		}
 		break;
 
-	case 3: {
+	case TAVERN: {
 		// Leave Tavern
 		sound.stopSound();
 		sound.playSound(isDarkCc ? "gdluck1.voc" : "goodbye.voc", 1);
diff --git a/engines/xeen/town.h b/engines/xeen/town.h
index 88bd368..618c4c5 100644
--- a/engines/xeen/town.h
+++ b/engines/xeen/town.h
@@ -34,7 +34,7 @@ namespace Xeen {
 enum TownAction {
 	BANK = 0, BLACKSMITH = 1, GUILD = 2, TAVERN = 3, TEMPLE = 4,
 	TRAINING = 5, ARENA = 6, NO_ACTION = 7, REAPER = 8, GOLEM = 9,
-	DWARF1 = 10, SPHINX = 11, DWARF2 = 13
+	DWARF1 = 10, SPHINX = 11, ACTION12 = 12, DWARF2 = 13
 };
 
 class XeenEngine;





More information about the Scummvm-git-logs mailing list