2009-06-04 08:30:31 +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.
|
|
|
|
*
|
2021-12-26 18:47:58 +01:00
|
|
|
* 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-02-18 02:34:20 +01:00
|
|
|
*
|
2009-06-04 08:30:31 +00:00
|
|
|
* 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.
|
2014-02-18 02:34:20 +01:00
|
|
|
*
|
2009-06-04 08:30:31 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2021-12-26 18:47:58 +01:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2009-06-04 08:30:31 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-10-03 12:38:42 +01:00
|
|
|
#include "backends/platform/gph/gph.h"
|
2012-07-29 21:11:32 +01:00
|
|
|
#include "backends/plugins/sdl/sdl-provider.h"
|
2009-06-04 08:30:31 +00:00
|
|
|
#include "base/main.h"
|
|
|
|
|
2011-04-11 18:22:58 +01:00
|
|
|
#if defined(GPH_DEVICE)
|
2009-06-04 08:30:31 +00:00
|
|
|
|
2010-08-26 11:24:26 +00:00
|
|
|
int main(int argc, char *argv[]) {
|
2011-03-08 20:26:11 +00:00
|
|
|
|
|
|
|
// Create our OSystem instance
|
2010-09-07 14:17:31 +00:00
|
|
|
g_system = new OSystem_GPH();
|
2010-08-26 11:24:26 +00:00
|
|
|
assert(g_system);
|
2011-03-08 20:26:11 +00:00
|
|
|
|
|
|
|
// Pre initialize the backend
|
2020-08-01 23:43:01 +01:00
|
|
|
g_system->init();
|
2011-03-08 20:26:11 +00:00
|
|
|
|
2010-08-26 11:24:26 +00:00
|
|
|
#ifdef DYNAMIC_MODULES
|
2012-07-29 21:11:32 +01:00
|
|
|
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
|
2010-08-26 11:24:26 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Invoke the actual ScummVM main entry point:
|
|
|
|
int res = scummvm_main(argc, argv);
|
2009-06-04 08:30:31 +00:00
|
|
|
|
2011-03-08 20:26:11 +00:00
|
|
|
// Free OSystem
|
2018-07-07 01:05:54 +01:00
|
|
|
g_system->destroy();
|
2009-06-04 08:30:31 +00:00
|
|
|
|
2011-03-08 20:26:11 +00:00
|
|
|
return res;
|
2009-06-04 08:30:31 +00:00
|
|
|
}
|
|
|
|
|
2011-03-08 20:26:11 +00:00
|
|
|
#endif
|