2010-01-03 23:58:59 +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.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
|
|
|
|
#include "common/config-manager.h"
|
|
|
|
#include "common/EventRecorder.h"
|
|
|
|
#include "common/file.h"
|
|
|
|
#include "common/fs.h"
|
|
|
|
|
|
|
|
#include "wage/wage.h"
|
2010-01-07 23:52:31 +02:00
|
|
|
#include "wage/macresman.h"
|
2010-01-11 00:44:27 +02:00
|
|
|
#include "wage/entities.h"
|
2010-01-07 23:52:31 +02:00
|
|
|
#include "wage/world.h"
|
2010-01-03 23:58:59 +02:00
|
|
|
|
|
|
|
namespace Wage {
|
|
|
|
|
|
|
|
WageEngine::WageEngine(OSystem *syst, const ADGameDescription *desc) : Engine(syst), _gameDescription(desc) {
|
|
|
|
// Don't forget to register your random source
|
|
|
|
g_eventRec.registerRandomSource(_rnd, "wage");
|
|
|
|
|
|
|
|
printf("WageEngine::WageEngine\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
WageEngine::~WageEngine() {
|
|
|
|
// Dispose your resources here
|
|
|
|
printf("WageEngine::~WageEngine\n");
|
|
|
|
|
|
|
|
// Remove all of our debug levels here
|
|
|
|
Common::clearAllDebugChannels();
|
|
|
|
}
|
|
|
|
|
|
|
|
Common::Error WageEngine::run() {
|
|
|
|
// Initialize graphics using following:
|
|
|
|
initGraphics(320, 200, false);
|
|
|
|
|
|
|
|
// Create debugger console. It requires GFX to be initialized
|
|
|
|
_console = new Console(this);
|
|
|
|
|
|
|
|
// Additional setup.
|
|
|
|
printf("WageEngine::init\n");
|
|
|
|
|
|
|
|
// Your main even loop should be (invoked from) here.
|
2010-01-07 23:52:31 +02:00
|
|
|
_resManager = new MacResManager(getGameFile());
|
|
|
|
|
|
|
|
_world = new World();
|
|
|
|
|
|
|
|
if (!_world->loadWorld(_resManager))
|
|
|
|
return Common::kNoGameDataFoundError;
|
2010-01-03 23:58:59 +02:00
|
|
|
|
|
|
|
return Common::kNoError;
|
|
|
|
}
|
2010-01-07 23:52:31 +02:00
|
|
|
|
2010-01-03 23:58:59 +02:00
|
|
|
} // End of namespace Wage
|