2008-04-20 14:43:56 +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.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MADE_H
|
|
|
|
#define MADE_H
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
#include "common/endian.h"
|
|
|
|
#include "common/util.h"
|
|
|
|
#include "common/file.h"
|
|
|
|
#include "common/savefile.h"
|
|
|
|
#include "common/system.h"
|
|
|
|
#include "common/hash-str.h"
|
|
|
|
#include "common/events.h"
|
|
|
|
#include "common/keyboard.h"
|
|
|
|
|
|
|
|
#include "graphics/surface.h"
|
|
|
|
|
|
|
|
#include "sound/audiostream.h"
|
|
|
|
#include "sound/mixer.h"
|
|
|
|
#include "sound/voc.h"
|
|
|
|
#include "sound/audiocd.h"
|
|
|
|
|
|
|
|
#include "engines/engine.h"
|
|
|
|
|
|
|
|
namespace Made {
|
|
|
|
|
2008-05-02 12:08:06 +00:00
|
|
|
enum MadeGameID {
|
2008-06-12 11:09:04 +00:00
|
|
|
GID_RTZ = 0,
|
|
|
|
GID_MANHOLE = 1,
|
|
|
|
GID_LGOP2 = 2,
|
|
|
|
GID_RODNEY = 3
|
2008-05-02 12:08:06 +00:00
|
|
|
};
|
|
|
|
|
2008-04-20 14:43:56 +00:00
|
|
|
enum MadeGameFeatures {
|
2008-06-12 11:09:04 +00:00
|
|
|
GF_DEMO = 1 << 0,
|
|
|
|
GF_CD = 1 << 1,
|
|
|
|
GF_CD_COMPRESSED = 1 << 2,
|
|
|
|
GF_FLOPPY = 1 << 3
|
2008-04-20 14:43:56 +00:00
|
|
|
};
|
|
|
|
|
2008-05-12 16:10:13 +00:00
|
|
|
const uint32 kTimerResolution = 40;
|
|
|
|
|
2008-04-20 14:43:56 +00:00
|
|
|
struct MadeGameDescription;
|
|
|
|
|
|
|
|
class ProjectReader;
|
|
|
|
class PmvPlayer;
|
|
|
|
class Screen;
|
|
|
|
class ScriptInterpreter;
|
|
|
|
class GameDatabase;
|
2008-04-24 14:12:08 +00:00
|
|
|
class MusicPlayer;
|
2008-04-20 14:43:56 +00:00
|
|
|
|
|
|
|
class MadeEngine : public ::Engine {
|
|
|
|
int _gameId;
|
|
|
|
Common::KeyState _keyPressed;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
int init();
|
|
|
|
int go();
|
|
|
|
|
|
|
|
public:
|
|
|
|
MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc);
|
|
|
|
virtual ~MadeEngine();
|
|
|
|
int getGameId() {
|
|
|
|
return _gameId;
|
|
|
|
}
|
|
|
|
|
|
|
|
Common::RandomSource *_rnd;
|
|
|
|
const MadeGameDescription *_gameDescription;
|
|
|
|
uint32 getGameID() const;
|
|
|
|
uint32 getFeatures() const;
|
|
|
|
uint16 getVersion() const;
|
|
|
|
Common::Platform getPlatform() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
public:
|
|
|
|
PmvPlayer *_pmvPlayer;
|
|
|
|
ProjectReader *_res;
|
|
|
|
Screen *_screen;
|
|
|
|
GameDatabase *_dat;
|
|
|
|
ScriptInterpreter *_script;
|
2008-04-24 14:12:08 +00:00
|
|
|
MusicPlayer *_music;
|
2008-04-20 14:43:56 +00:00
|
|
|
|
2008-05-07 08:25:13 +00:00
|
|
|
bool _quit;
|
|
|
|
|
2008-05-21 10:07:33 +00:00
|
|
|
uint16 _eventNum;
|
2008-04-20 14:43:56 +00:00
|
|
|
int _eventMouseX, _eventMouseY;
|
2008-04-22 08:08:07 +00:00
|
|
|
uint16 _eventKey;
|
2008-05-28 22:15:10 +00:00
|
|
|
|
2008-04-23 23:22:02 +00:00
|
|
|
int _soundRate;
|
2008-05-28 22:15:10 +00:00
|
|
|
bool _autoStopSound;
|
|
|
|
|
2008-04-23 23:22:02 +00:00
|
|
|
int _musicVolume;
|
2008-05-05 10:45:11 +00:00
|
|
|
|
|
|
|
// 2 = LGOP2, Manhole N&E
|
|
|
|
// 3 = Return to Zork
|
|
|
|
int _engineVersion;
|
2008-04-20 14:43:56 +00:00
|
|
|
|
|
|
|
int32 _timers[50];
|
2008-06-18 11:01:51 +00:00
|
|
|
int16 getTicks();
|
2008-04-20 14:43:56 +00:00
|
|
|
int16 getTimer(int16 timerNum);
|
|
|
|
void setTimer(int16 timerNum, int16 value);
|
|
|
|
void resetTimer(int16 timerNum);
|
|
|
|
int16 allocTimer();
|
|
|
|
void freeTimer(int16 timerNum);
|
|
|
|
|
2008-05-07 08:25:13 +00:00
|
|
|
const Common::String getTargetName() { return _targetName; }
|
|
|
|
Common::String getSavegameFilename(int16 saveNum);
|
2008-05-21 10:07:33 +00:00
|
|
|
|
|
|
|
void handleEvents();
|
|
|
|
|
2008-04-20 14:43:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Made
|
|
|
|
|
|
|
|
#endif /* MADE_H */
|