2011-06-08 00:01:44 +02: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 CGE_H
|
|
|
|
#define CGE_H
|
2011-06-13 11:57:24 +02:00
|
|
|
|
2011-06-27 01:03:47 +02:00
|
|
|
#include "cge/general.h"
|
2011-06-08 00:01:44 +02:00
|
|
|
#include "common/random.h"
|
|
|
|
#include "engines/engine.h"
|
|
|
|
#include "gui/debugger.h"
|
|
|
|
#include "graphics/surface.h"
|
|
|
|
#include "engines/advancedDetector.h"
|
|
|
|
#include "cge/console.h"
|
|
|
|
|
|
|
|
#define CGE_SAVEGAME_VERSION 1
|
|
|
|
|
|
|
|
namespace CGE {
|
2011-06-13 11:57:24 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
class Console;
|
2011-06-13 11:57:24 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
// our engine debug channels
|
|
|
|
enum {
|
2011-06-13 11:57:24 +02:00
|
|
|
kCGEDebug = 1 << 0
|
2011-06-08 00:01:44 +02:00
|
|
|
};
|
2011-06-09 08:20:53 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
class CGEEngine : public Engine {
|
|
|
|
public:
|
|
|
|
CGEEngine(OSystem *syst, const ADGameDescription *gameDescription);
|
|
|
|
~CGEEngine();
|
|
|
|
|
|
|
|
const ADGameDescription *_gameDescription;
|
2011-06-27 01:03:47 +02:00
|
|
|
bool _isDemo;
|
2011-06-08 00:01:44 +02:00
|
|
|
|
|
|
|
virtual Common::Error run();
|
2011-06-13 11:57:24 +02:00
|
|
|
GUI::Debugger *getDebugger() {
|
|
|
|
return _console;
|
|
|
|
}
|
|
|
|
|
2011-06-27 01:03:47 +02:00
|
|
|
void cge_main();
|
2011-07-01 08:37:40 +02:00
|
|
|
void switchCave(int cav);
|
|
|
|
void startCountDown();
|
|
|
|
void quit();
|
|
|
|
void resetQSwitch();
|
|
|
|
void optionTouch(int opt, uint16 mask);
|
|
|
|
void loadGame(XFile &file, bool tiny);
|
|
|
|
void setMapBrick(int x, int z);
|
|
|
|
void switchMapping();
|
|
|
|
void loadSprite(const char *fname, int ref, int cav, int col, int row, int pos);
|
|
|
|
void loadScript(const char *fname);
|
|
|
|
void loadUser();
|
|
|
|
void runGame();
|
|
|
|
bool showTitle(const char *name);
|
|
|
|
void movie(const char *ext);
|
|
|
|
void takeName();
|
|
|
|
void inf(const char *txt);
|
|
|
|
void selectSound();
|
2011-06-27 01:03:47 +02:00
|
|
|
void SNSelect();
|
|
|
|
void dummy() {}
|
|
|
|
void NONE();
|
|
|
|
void SB();
|
2011-07-01 08:37:40 +02:00
|
|
|
void caveDown();
|
|
|
|
void xCave();
|
|
|
|
void qGame();
|
2011-06-27 01:03:47 +02:00
|
|
|
void SBM();
|
|
|
|
void GUS();
|
|
|
|
void GUSM();
|
|
|
|
void MIDI();
|
|
|
|
void AUTO();
|
2011-07-01 08:37:40 +02:00
|
|
|
void setPortD();
|
|
|
|
void setPortM();
|
|
|
|
void setIRQ();
|
|
|
|
void setDMA();
|
|
|
|
void mainLoop();
|
2011-06-27 01:03:47 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
private:
|
|
|
|
CGEConsole *_console;
|
2011-06-26 17:53:55 +10:00
|
|
|
void setup();
|
2011-06-08 00:01:44 +02:00
|
|
|
};
|
2011-06-13 11:57:24 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
// Example console class
|
|
|
|
class Console : public GUI::Debugger {
|
|
|
|
public:
|
|
|
|
Console(CGEEngine *vm) {}
|
|
|
|
virtual ~Console(void) {}
|
|
|
|
};
|
2011-06-13 11:57:24 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
} // End of namespace CGE
|
2011-06-13 11:57:24 +02:00
|
|
|
|
2011-06-08 00:01:44 +02:00
|
|
|
#endif
|