2012-09-07 12:20:05 +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 HOPKINS_H
|
|
|
|
#define HOPKINS_H
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
#include "common/system.h"
|
|
|
|
#include "common/error.h"
|
|
|
|
#include "common/random.h"
|
2012-09-07 23:09:09 +00:00
|
|
|
#include "common/hash-str.h"
|
2012-09-07 12:20:05 +00:00
|
|
|
#include "common/util.h"
|
|
|
|
#include "engines/engine.h"
|
2012-09-08 08:45:22 +00:00
|
|
|
#include "graphics/surface.h"
|
2012-09-15 00:27:15 +00:00
|
|
|
#include "hopkins/anim.h"
|
2012-09-08 08:45:22 +00:00
|
|
|
#include "hopkins/events.h"
|
2012-10-06 13:21:10 +00:00
|
|
|
#include "hopkins/files.h"
|
2012-09-19 11:34:23 +00:00
|
|
|
#include "hopkins/font.h"
|
2012-09-07 12:20:05 +00:00
|
|
|
#include "hopkins/globals.h"
|
2012-09-08 13:43:35 +00:00
|
|
|
#include "hopkins/graphics.h"
|
2012-10-02 11:44:23 +00:00
|
|
|
#include "hopkins/lines.h"
|
2012-09-17 08:03:25 +00:00
|
|
|
#include "hopkins/menu.h"
|
|
|
|
#include "hopkins/objects.h"
|
2012-09-15 00:27:15 +00:00
|
|
|
#include "hopkins/sound.h"
|
2012-09-26 13:34:10 +00:00
|
|
|
#include "hopkins/talk.h"
|
2012-09-07 12:20:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is the namespace of the Hopkins engine.
|
|
|
|
*
|
|
|
|
* Status of this engine: In Development
|
|
|
|
*
|
|
|
|
* Games using this engine:
|
|
|
|
* - Hopkins FBI
|
|
|
|
*/
|
|
|
|
namespace Hopkins {
|
|
|
|
|
|
|
|
enum {
|
|
|
|
kHopkinsDebugAnimations = 1 << 0,
|
|
|
|
kHopkinsDebugActions = 1 << 1,
|
|
|
|
kHopkinsDebugSound = 1 << 2,
|
|
|
|
kHopkinsDebugMusic = 1 << 3,
|
|
|
|
kHopkinsDebugScripts = 1 << 4
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DEBUG_BASIC 1
|
|
|
|
#define DEBUG_INTERMEDIATE 2
|
|
|
|
#define DEBUG_DETAILED 3
|
|
|
|
|
2012-09-09 09:55:05 +00:00
|
|
|
#define SCREEN_WIDTH 640
|
|
|
|
#define SCREEN_HEIGHT 480
|
|
|
|
|
2012-09-07 12:20:05 +00:00
|
|
|
struct HopkinsGameDescription;
|
|
|
|
|
|
|
|
class HopkinsEngine : public Engine {
|
|
|
|
private:
|
|
|
|
const HopkinsGameDescription *_gameDescription;
|
|
|
|
Common::RandomSource _randomSource;
|
|
|
|
|
2012-09-08 00:08:12 +00:00
|
|
|
/**
|
|
|
|
* Processes the loaded list of ini file parameters
|
|
|
|
*/
|
2012-09-07 23:09:09 +00:00
|
|
|
void processIniParams(Common::StringMap &iniParams);
|
2012-09-08 08:45:22 +00:00
|
|
|
|
|
|
|
void INIT_SYSTEM();
|
2012-09-15 03:23:46 +00:00
|
|
|
|
2012-09-17 06:53:21 +00:00
|
|
|
void PASS();
|
|
|
|
void REST_SYSTEM();
|
|
|
|
void PUBQUIT();
|
|
|
|
void ENDEMO();
|
|
|
|
void BOOM();
|
2012-09-07 12:20:05 +00:00
|
|
|
protected:
|
|
|
|
// Engine APIs
|
|
|
|
virtual Common::Error run();
|
|
|
|
virtual bool hasFeature(EngineFeature f) const;
|
|
|
|
|
|
|
|
public:
|
2012-09-17 08:03:25 +00:00
|
|
|
AnimationManager _animationManager;
|
2012-09-15 00:27:15 +00:00
|
|
|
EventsManager _eventsManager;
|
2012-09-19 11:34:23 +00:00
|
|
|
FontManager _fontManager;
|
2012-09-17 08:03:25 +00:00
|
|
|
Globals _globals;
|
2012-10-06 13:21:10 +00:00
|
|
|
FileManager _fileManager;
|
2012-09-15 00:27:15 +00:00
|
|
|
GraphicsManager _graphicsManager;
|
2012-10-02 11:44:23 +00:00
|
|
|
LinesManager _linesManager;
|
2012-09-17 08:03:25 +00:00
|
|
|
MenuManager _menuManager;
|
|
|
|
ObjectsManager _objectsManager;
|
2012-09-15 00:27:15 +00:00
|
|
|
SoundManager _soundManager;
|
2012-09-26 13:34:10 +00:00
|
|
|
TalkManager _talkManager;
|
2012-09-07 12:20:05 +00:00
|
|
|
public:
|
|
|
|
HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc);
|
|
|
|
virtual ~HopkinsEngine();
|
|
|
|
void GUIError(const Common::String &msg);
|
|
|
|
|
|
|
|
uint32 getFeatures() const;
|
|
|
|
Common::Language getLanguage() const;
|
|
|
|
uint16 getVersion() const;
|
|
|
|
bool getIsDemo() const;
|
2012-09-23 11:05:55 +00:00
|
|
|
bool shouldQuit() const;
|
2012-09-07 12:20:05 +00:00
|
|
|
|
|
|
|
int getRandomNumber(int maxNumber);
|
2012-09-17 08:03:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the introduction sequence
|
|
|
|
*/
|
|
|
|
void INTRORUN();
|
2012-09-07 12:20:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Global reference to the HopkinsEngine object
|
|
|
|
extern HopkinsEngine *g_vm;
|
|
|
|
|
|
|
|
#define GLOBALS g_vm->_globals
|
|
|
|
|
|
|
|
} // End of namespace Hopkins
|
|
|
|
|
|
|
|
#endif /* HOPKINS_H */
|