[Scummvm-git-logs] scummvm master -> cdfe8c89f7671a09a418617d059524b88fff2d4c
dreammaster
dreammaster at scummvm.org
Mon Apr 16 17:20:58 CEST 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:
cdfe8c89f7 XEEN: Fix loading Swords blacksmiths
Commit: cdfe8c89f7671a09a418617d059524b88fff2d4c
https://github.com/scummvm/scummvm/commit/cdfe8c89f7671a09a418617d059524b88fff2d4c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-16T11:20:51-04:00
Commit Message:
XEEN: Fix loading Swords blacksmiths
Changed paths:
engines/xeen/locations.cpp
engines/xeen/locations.h
engines/xeen/scripts.cpp
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 00e7c0e..e2359df 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -2240,9 +2240,12 @@ int PyramidLocation::show() {
LocationManager::LocationManager() : _location(nullptr) {
}
-int LocationManager::doAction(LocationAction actionId) {
+int LocationManager::doAction(int actionId) {
+ LocationAction action = (g_vm->getGameID() == GType_Swords && actionId > 13 && actionId < 18) ?
+ BLACKSMITH : (LocationAction)actionId;
+
// Create the desired location
- switch (actionId) {
+ switch (action) {
case BANK:
_location = new Locations::BankLocation();
break;
diff --git a/engines/xeen/locations.h b/engines/xeen/locations.h
index d3b2794..ad0a8e2 100644
--- a/engines/xeen/locations.h
+++ b/engines/xeen/locations.h
@@ -364,7 +364,7 @@ public:
/**
* Show a given location, and return any result
*/
- int doAction(LocationAction actionId);
+ int doAction(int actionId);
/**
* Returns true if a town location (bank, blacksmith, etc.) is currently active
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 81ba0ca..f126a65 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -854,7 +854,7 @@ bool Scripts::cmdSpawn(ParamsIterator ¶ms) {
}
bool Scripts::cmdDoTownEvent(ParamsIterator ¶ms) {
- _scriptResult = _vm->_locations->doAction((LocationAction)params.readByte());
+ _scriptResult = _vm->_locations->doAction(params.readByte());
_vm->_party->_stepped = true;
_refreshIcons = true;
More information about the Scummvm-git-logs
mailing list