2011-06-27 17:09:55 +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.
|
2014-02-18 01:34:22 +00:00
|
|
|
*
|
2011-06-27 17:09:55 +00:00
|
|
|
* 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.
|
2014-02-18 01:34:22 +00:00
|
|
|
*
|
2011-06-27 17:09:55 +00:00
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TODO: I couldn't come up with a better name than 'Module' so far
|
|
|
|
|
|
|
|
#ifndef NEVERHOOD_MODULE_H
|
|
|
|
#define NEVERHOOD_MODULE_H
|
|
|
|
|
|
|
|
#include "neverhood/neverhood.h"
|
2011-07-03 19:26:27 +00:00
|
|
|
#include "neverhood/background.h"
|
2011-06-27 17:09:55 +00:00
|
|
|
#include "neverhood/entity.h"
|
2011-07-03 12:09:48 +00:00
|
|
|
#include "neverhood/graphics.h"
|
2011-07-11 12:21:56 +00:00
|
|
|
#include "neverhood/mouse.h"
|
2011-07-03 12:09:48 +00:00
|
|
|
#include "neverhood/palette.h"
|
|
|
|
#include "neverhood/screen.h"
|
2011-06-27 17:09:55 +00:00
|
|
|
|
|
|
|
namespace Neverhood {
|
|
|
|
|
2011-07-29 21:12:59 +00:00
|
|
|
class NavigationScene;
|
|
|
|
|
2011-09-19 13:00:54 +00:00
|
|
|
enum SceneType {
|
|
|
|
kSceneTypeNormal,
|
|
|
|
kSceneTypeSmacker,
|
|
|
|
kSceneTypeNavigation
|
|
|
|
};
|
|
|
|
|
2011-06-27 17:09:55 +00:00
|
|
|
class Module : public Entity {
|
|
|
|
public:
|
|
|
|
Module(NeverhoodEngine *vm, Module *parentModule);
|
|
|
|
virtual ~Module();
|
|
|
|
virtual void draw();
|
2013-09-14 09:39:12 +00:00
|
|
|
SceneType getSceneType() { return _sceneType; }
|
2013-06-09 14:13:23 +00:00
|
|
|
|
|
|
|
Entity *_childObject;
|
2011-06-27 17:09:55 +00:00
|
|
|
protected:
|
|
|
|
Module *_parentModule;
|
|
|
|
bool _done;
|
2011-09-16 20:37:24 +00:00
|
|
|
uint32 _moduleResult;
|
2011-09-19 13:00:54 +00:00
|
|
|
SceneType _sceneType;
|
|
|
|
int _navigationAreaType;
|
2011-06-27 17:09:55 +00:00
|
|
|
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
2011-07-29 21:12:59 +00:00
|
|
|
NavigationScene *navigationScene();
|
2011-07-29 08:22:46 +00:00
|
|
|
void createNavigationScene(uint32 navigationListId, int navigationIndex, const byte *itemsTypes = NULL);
|
2013-01-18 08:44:38 +00:00
|
|
|
void createSmackerScene(uint32 fileHash, bool doubleSurface, bool canSkip, bool canAbort);
|
|
|
|
void createSmackerScene(const uint32 *fileHashList, bool doubleSurface, bool canSkip, bool canAbort);
|
2012-10-08 07:40:39 +00:00
|
|
|
void createStaticScene(uint32 backgroundFileHash, uint32 cursorFileHash);
|
2013-01-06 22:41:04 +00:00
|
|
|
void createDemoScene();
|
2011-09-16 20:02:07 +00:00
|
|
|
bool updateChild();
|
2011-09-23 15:21:24 +00:00
|
|
|
void leaveModule(uint32 result);
|
2011-06-27 17:09:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Neverhood
|
|
|
|
|
|
|
|
#endif /* NEVERHOOD_MODULE_H */
|