2014-02-26 00:52:35 +00:00
|
|
|
/* 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 MADS_GAME_DATA_H
|
|
|
|
#define MADS_GAME_DATA_H
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
#include "common/array.h"
|
2014-05-02 02:36:36 +00:00
|
|
|
#include "mads/resources.h"
|
2014-02-26 00:52:35 +00:00
|
|
|
|
|
|
|
namespace MADS {
|
|
|
|
|
|
|
|
class MADSEngine;
|
|
|
|
class Game;
|
|
|
|
|
2014-05-26 22:58:25 +00:00
|
|
|
class VisitedScenes : public SynchronizedList {
|
2014-02-26 00:52:35 +00:00
|
|
|
public:
|
2014-03-15 21:38:44 +00:00
|
|
|
/**
|
|
|
|
* Stores true when a previously visited scene is revisited
|
|
|
|
*/
|
|
|
|
bool _sceneRevisited;
|
|
|
|
|
2014-02-26 00:52:35 +00:00
|
|
|
/**
|
|
|
|
* Returns true if a given Scene Id exists in the listed of previously visited scenes.
|
|
|
|
*/
|
|
|
|
bool exists(int sceneId);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds a scene Id to the list of previously visited scenes, if it doesn't already exist
|
|
|
|
*/
|
|
|
|
void add(int sceneId);
|
2014-04-26 15:01:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Synchronizes the list
|
|
|
|
*/
|
2014-06-01 12:01:17 +00:00
|
|
|
void synchronize(Common::Serializer &s, int sceneId);
|
2014-02-26 00:52:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SectionHandler {
|
|
|
|
protected:
|
|
|
|
MADSEngine *_vm;
|
|
|
|
public:
|
2014-05-26 22:58:25 +00:00
|
|
|
SectionHandler(MADSEngine *vm) : _vm(vm) {}
|
2014-02-26 00:52:35 +00:00
|
|
|
virtual ~SectionHandler() {}
|
|
|
|
|
|
|
|
virtual void preLoadSection() = 0;
|
|
|
|
virtual void sectionPtr2() = 0;
|
|
|
|
virtual void postLoadSection() = 0;
|
2014-03-21 13:27:22 +00:00
|
|
|
virtual void step() {}
|
2014-02-26 00:52:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace MADS
|
|
|
|
|
|
|
|
#endif /* MADS_GAME_DATA_H */
|