scummvm/engines/cge/cge.cpp

69 lines
2.0 KiB
C++
Raw Normal View History

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.
*
*/
#include "common/scummsys.h"
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/debug-channels.h"
#include "common/error.h"
#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/fs.h"
#include "engines/util.h"
#include "cge/cge.h"
#include "cge/cge_main.h"
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
namespace CGE {
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription)
2011-06-13 11:57:24 +02:00
: Engine(syst), _gameDescription(gameDescription) {
2011-06-08 00:01:44 +02:00
DebugMan.addDebugChannel(kCGEDebug, "general", "CGE general debug channel");
2011-06-13 11:57:24 +02:00
_console = new CGEConsole(this);
2011-06-08 00:01:44 +02:00
debug("CGEEngine::CGEEngine");
}
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
CGEEngine::~CGEEngine() {
debug("CGEEngine::~CGEEngine");
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
// Remove all of our debug levels here
DebugMan.clearAllDebugChannels();
}
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
Common::Error CGEEngine::run() {
// Initialize graphics using following:
initGraphics(320, 200, false);
2011-06-13 11:57:24 +02:00
// Create debugger console. It requires GFX to be initialized
2011-06-08 00:01:44 +02:00
_console = new CGEConsole(this);
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
// Additional setup.
debug("CGEEngine::init");
2011-06-13 11:57:24 +02:00
cge_main();
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
return Common::kNoError;
}
2011-06-13 11:57:24 +02:00
2011-06-08 00:01:44 +02:00
} // End of namespace CGE