From 7042d95cfee6cb2eead81fce497eeaf0da28d297 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 14 Feb 2011 20:37:27 +1100 Subject: TSAGE: Added the engine in a separate branch --- engines/tsage/globals.h | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 engines/tsage/globals.h (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h new file mode 100644 index 0000000000..30c295a7ab --- /dev/null +++ b/engines/tsage/globals.h @@ -0,0 +1,99 @@ +/* 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. + * + * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/globals.h $ + * $Id: globals.h 229 2011-02-12 06:50:14Z dreammaster $ + * + */ + +#ifndef TSAGE_GLOBALS_H +#define TSAGE_GLOBALS_H + +#include "common/random.h" +#include "tsage/core.h" +#include "tsage/dialogs.h" +#include "tsage/scenes.h" +#include "tsage/events.h" +#include "tsage/saveload.h" + +namespace tSage { + +class Globals: public SavedObject { +public: + GfxSurface _screenSurface; + GfxManager _gfxManagerInstance; + List _gfxManagers; + SceneHandler _sceneHandler; + Game _game; + EventsClass _events; + SceneManager _sceneManager; + ScenePalette _scenePalette; + SceneRegions _sceneRegions; + SceneItemList _sceneItems; + SceneObjectList _sceneObjectsInstance; + SceneObjectList *_sceneObjects; + List _sceneObjects_queue; + SceneText _sceneText; + int _gfxFontNumber; + GfxColours _gfxColours; + GfxColours _fontColours; + SoundManager _soundManager; + Common::Point _dialogCentre; + WalkRegions _walkRegions; + List _sceneListeners; + bool _flags[256]; + Player _player; + SoundHandler _soundHandler; + InvObjectList _inventory; + Region _paneRegions[2]; + int _paneRefreshFlag[2]; + Common::Point _sceneOffset; + Common::Point _stru_4642E; + SceneObject *_scrollFollower; + SequenceManager _sequenceManager; + Common::RandomSource _randomSource; + int _stripNum; +public: + Globals(); + + void reset(); + void setFlag(int flagNum) { + assert((flagNum > 0) && (flagNum < MAX_FLAGS)); + _flags[flagNum] = true; + } + void clearFlag(int flagNum) { + assert((flagNum > 0) && (flagNum < MAX_FLAGS)); + _flags[flagNum] = false; + } + bool getFlag(int flagNum) const { + assert((flagNum > 0) && (flagNum < MAX_FLAGS)); + return _flags[flagNum]; + } + + GfxManager &gfxManager() { return **_gfxManagers.begin(); } + virtual Common::String getClassName() { return "Globals"; } + virtual void synchronise(Serialiser &s); +}; + +extern Globals *_globals; + +} // End of namespace tSage + +#endif -- cgit v1.2.3 From 3c454685c21a7e2f659c13899959f1cf56e93285 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 18 Feb 2011 00:02:21 +1100 Subject: TSAGE: Started fleshing out the SoundHandler class --- engines/tsage/globals.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 30c295a7ab..17cfa4eb4b 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -72,6 +72,7 @@ public: int _stripNum; public: Globals(); + ~Globals(); void reset(); void setFlag(int flagNum) { -- cgit v1.2.3 From 814678b24ef5da11da5f043ec1227f311658a7a6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 22 Feb 2011 23:06:07 +1100 Subject: TSAGE: Initial implementation of more game scenes and support classes --- engines/tsage/globals.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 17cfa4eb4b..243fb1eae9 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -70,6 +70,7 @@ public: SequenceManager _sequenceManager; Common::RandomSource _randomSource; int _stripNum; + FloatSet _floatSet; public: Globals(); ~Globals(); -- cgit v1.2.3 From 9dad957454f2d4f7e8c7949e46d252346fbdd66b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 18 Mar 2011 22:58:36 +1100 Subject: TSAGE: Corrected background scrolling on wide-screen scenes --- engines/tsage/globals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 243fb1eae9..c06c073691 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -65,7 +65,7 @@ public: Region _paneRegions[2]; int _paneRefreshFlag[2]; Common::Point _sceneOffset; - Common::Point _stru_4642E; + Common::Point _prevSceneOffset; SceneObject *_scrollFollower; SequenceManager _sequenceManager; Common::RandomSource _randomSource; -- cgit v1.2.3 From 747295e9b452cc906821c275bea948560438d03e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 9 Apr 2011 21:27:25 +1000 Subject: TSAGE: Fixing memory leaks --- engines/tsage/globals.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index c06c073691..1696ae300d 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -70,7 +70,6 @@ public: SequenceManager _sequenceManager; Common::RandomSource _randomSource; int _stripNum; - FloatSet _floatSet; public: Globals(); ~Globals(); -- cgit v1.2.3 From 6db40e0c6c6c575696a7eaaa44b68c7579664d36 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Apr 2011 17:08:16 +0200 Subject: TSAGE: Cleanup custom List usage. This makes the code use Common::List for all cases where synchronization can not be done with tSage::List::synchronise. Furthermore I renamed the custom List class to SynchronisedList to stress its purpose. I also removed clear2, contains and forEach and replaced them with algorithm usage from Common:: or in the case of "contains" replaced them with a simple inline function which uses Common::find. --- engines/tsage/globals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 1696ae300d..b102fdf913 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -39,7 +39,7 @@ class Globals: public SavedObject { public: GfxSurface _screenSurface; GfxManager _gfxManagerInstance; - List _gfxManagers; + Common::List _gfxManagers; SceneHandler _sceneHandler; Game _game; EventsClass _events; @@ -49,7 +49,7 @@ public: SceneItemList _sceneItems; SceneObjectList _sceneObjectsInstance; SceneObjectList *_sceneObjects; - List _sceneObjects_queue; + SynchronisedList _sceneObjects_queue; SceneText _sceneText; int _gfxFontNumber; GfxColours _gfxColours; @@ -57,7 +57,7 @@ public: SoundManager _soundManager; Common::Point _dialogCentre; WalkRegions _walkRegions; - List _sceneListeners; + SynchronisedList _sceneListeners; bool _flags[256]; Player _player; SoundHandler _soundHandler; -- cgit v1.2.3 From 66b43f2312578f35e0718d0699de207a7bf77f1a Mon Sep 17 00:00:00 2001 From: strangerke Date: Wed, 13 Apr 2011 21:27:46 +0200 Subject: TSAGE: "Cosmetic" cleanups --- engines/tsage/globals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/tsage/globals.h') diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index b102fdf913..59afe140a0 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/globals.h $ - * $Id: globals.h 229 2011-02-12 06:50:14Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -35,7 +35,7 @@ namespace tSage { -class Globals: public SavedObject { +class Globals : public SavedObject { public: GfxSurface _screenSurface; GfxManager _gfxManagerInstance; -- cgit v1.2.3