[Scummvm-cvs-logs] scummvm master -> cffa31c72ecee279cd77b3b2a0d4a6511843d090
dreammaster
dreammaster at scummvm.org
Mon Jun 8 05:30:43 CEST 2015
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:
cffa31c72e SHERLOCK: Beginnings of Map descendent classes
Commit: cffa31c72ecee279cd77b3b2a0d4a6511843d090
https://github.com/scummvm/scummvm/commit/cffa31c72ecee279cd77b3b2a0d4a6511843d090
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-07T23:29:36-04:00
Commit Message:
SHERLOCK: Beginnings of Map descendent classes
Changed paths:
A engines/sherlock/scalpel/scalpel_map.cpp
A engines/sherlock/scalpel/scalpel_map.h
A engines/sherlock/tattoo/tattoo_map.cpp
A engines/sherlock/tattoo/tattoo_map.h
engines/sherlock/map.cpp
engines/sherlock/map.h
engines/sherlock/module.mk
engines/sherlock/sherlock.cpp
engines/sherlock/tattoo/tattoo.cpp
engines/sherlock/tattoo/tattoo_scene.h
diff --git a/engines/sherlock/map.cpp b/engines/sherlock/map.cpp
index 028b387..3f9c9f5 100644
--- a/engines/sherlock/map.cpp
+++ b/engines/sherlock/map.cpp
@@ -20,9 +20,11 @@
*
*/
+#include "common/system.h"
#include "sherlock/map.h"
#include "sherlock/sherlock.h"
-#include "common/system.h"
+#include "sherlock/scalpel/scalpel_map.h"
+#include "sherlock/tattoo/tattoo_map.h"
namespace Sherlock {
@@ -51,6 +53,13 @@ const byte *MapPaths::getPath(int srcLocation, int destLocation) {
/*----------------------------------------------------------------*/
+Map *Map::init(SherlockEngine *vm) {
+ if (vm->getGameID() == GType_SerratedScalpel)
+ return new Scalpel::ScalpelMap(vm);
+ else
+ return new Tattoo::TattooMap(vm);
+}
+
Map::Map(SherlockEngine *vm): _vm(vm), _topLine(g_system->getWidth(), 12, vm->getPlatform()) {
_active = false;
_mapCursors = nullptr;
diff --git a/engines/sherlock/map.h b/engines/sherlock/map.h
index 2f789d2..d47edb2 100644
--- a/engines/sherlock/map.h
+++ b/engines/sherlock/map.h
@@ -64,7 +64,7 @@ public:
};
class Map {
-private:
+protected:
SherlockEngine *_vm;
Common::Array<MapEntry> _points; // Map locations for each scene
Common::StringArray _locationNames;
@@ -83,7 +83,9 @@ private:
int _cursorIndex;
bool _drawMap;
Surface _iconSave;
-private:
+protected:
+ Map(SherlockEngine *vm);
+
/**
* Load data needed for the map
*/
@@ -150,7 +152,7 @@ public:
int _charPoint, _oldCharPoint;
bool _frameChangeFlag;
public:
- Map(SherlockEngine *vm);
+ static Map *init(SherlockEngine *vm);
const MapEntry &operator[](int idx) { return _points[idx]; }
diff --git a/engines/sherlock/module.mk b/engines/sherlock/module.mk
index e429990..55c1ea7 100644
--- a/engines/sherlock/module.mk
+++ b/engines/sherlock/module.mk
@@ -8,12 +8,14 @@ MODULE_OBJS = \
scalpel/drivers/mt32.o \
scalpel/tsage/logo.o \
scalpel/tsage/resources.o \
+ scalpel/scalpel_map.o \
scalpel/scalpel_people.o \
scalpel/scalpel_scene.o \
scalpel/scalpel_talk.o \
scalpel/scalpel_user_interface.o \
scalpel/settings.o \
tattoo/tattoo.o \
+ tattoo/tattoo_map.o \
tattoo/tattoo_people.o \
tattoo/tattoo_resources.o \
tattoo/tattoo_scene.o \
diff --git a/engines/sherlock/scalpel/scalpel_map.cpp b/engines/sherlock/scalpel/scalpel_map.cpp
new file mode 100644
index 0000000..5c45302
--- /dev/null
+++ b/engines/sherlock/scalpel/scalpel_map.cpp
@@ -0,0 +1,32 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "sherlock/scalpel/scalpel_map.h"
+
+namespace Sherlock {
+
+namespace Scalpel {
+
+
+} // End of namespace Scalpel
+
+} // End of namespace Sherlock
diff --git a/engines/sherlock/scalpel/scalpel_map.h b/engines/sherlock/scalpel/scalpel_map.h
new file mode 100644
index 0000000..4fb4142
--- /dev/null
+++ b/engines/sherlock/scalpel/scalpel_map.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SHERLOCK_SCALPEL_MAP_H
+#define SHERLOCK_SCALPEL_MAP_H
+
+#include "common/scummsys.h"
+#include "sherlock/map.h"
+
+namespace Sherlock {
+
+class SherlockEngine;
+
+namespace Scalpel {
+
+class ScalpelMap: public Map {
+public:
+ ScalpelMap(SherlockEngine *vm) : Map(vm) {}
+};
+
+} // End of namespace Scalpel
+
+} // End of namespace Sherlock
+
+#endif
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index 27778db..5e2e25f 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -94,7 +94,7 @@ void SherlockEngine::initialize() {
_debugger = new Debugger(this);
_events = new Events(this);
_inventory = new Inventory(this);
- _map = new Map(this);
+ _map = Map::init(this);
_music = new Music(this, _mixer);
_journal = new Journal(this);
_people = People::init(this);
diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp
index ea96a49..13bffbb 100644
--- a/engines/sherlock/tattoo/tattoo.cpp
+++ b/engines/sherlock/tattoo/tattoo.cpp
@@ -65,6 +65,15 @@ void TattooEngine::initialize() {
}
void TattooEngine::startScene() {
+ if (_scene->_goToScene == OVERHEAD_MAP || _scene->_goToScene == OVERHEAD_MAP2) {
+ // Show the map
+ _scene->_currentScene = OVERHEAD_MAP;
+ _scene->_goToScene = _map->show();
+
+ _people->_hSavedPos = Common::Point(-1, -1);
+ _people->_hSavedFacing = -1;
+ }
+
// TODO
}
diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp
new file mode 100644
index 0000000..9dd35a9
--- /dev/null
+++ b/engines/sherlock/tattoo/tattoo_map.cpp
@@ -0,0 +1,32 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "sherlock/tattoo/tattoo_map.h"
+
+namespace Sherlock {
+
+namespace Tattoo {
+
+
+} // End of namespace Tattoo
+
+} // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_map.h b/engines/sherlock/tattoo/tattoo_map.h
new file mode 100644
index 0000000..97a330a
--- /dev/null
+++ b/engines/sherlock/tattoo/tattoo_map.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SHERLOCK_TATTOO_MAP_H
+#define SHERLOCK_TATTOO_MAP_H
+
+#include "common/scummsys.h"
+#include "sherlock/map.h"
+
+namespace Sherlock {
+
+class SherlockEngine;
+
+namespace Tattoo {
+
+class TattooMap : public Map {
+public:
+ TattooMap(SherlockEngine *vm) : Map(vm) {}
+};
+
+} // End of namespace Tattoo
+
+} // End of namespace Sherlock
+
+#endif
diff --git a/engines/sherlock/tattoo/tattoo_scene.h b/engines/sherlock/tattoo/tattoo_scene.h
index fc97984..78ab1e6 100644
--- a/engines/sherlock/tattoo/tattoo_scene.h
+++ b/engines/sherlock/tattoo/tattoo_scene.h
@@ -31,7 +31,7 @@ namespace Sherlock {
namespace Tattoo {
enum {
- STARTING_INTRO_SCENE = 91
+ STARTING_INTRO_SCENE = 91, OVERHEAD_MAP2 = 99, OVERHEAD_MAP = 100
};
class TattooScene : public Scene {
More information about the Scummvm-git-logs
mailing list