2007-05-30 21:56:52 +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.
|
2005-11-27 02:35:57 +00: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 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
|
2005-12-04 08:49:08 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-11-27 02:35:57 +00:00
|
|
|
*
|
2006-02-11 12:47:47 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2005-11-27 02:35:57 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
|
2006-01-06 12:48:48 +00:00
|
|
|
#include "common/config-manager.h"
|
2005-11-27 02:35:57 +00:00
|
|
|
|
2006-04-02 00:08:22 +00:00
|
|
|
#include "base/main.h"
|
|
|
|
|
2006-07-14 16:11:30 +00:00
|
|
|
#include "gp32std.h"
|
|
|
|
#include "gp32std_grap.h"
|
2005-11-27 02:35:57 +00:00
|
|
|
|
2006-07-14 16:11:30 +00:00
|
|
|
#include "gp32_launcher.h"
|
|
|
|
#include "gp32_osys.h"
|
|
|
|
#include "globals.h"
|
2005-11-27 02:35:57 +00:00
|
|
|
|
2006-01-06 12:48:48 +00:00
|
|
|
GlobalVars g_vars;
|
2005-11-27 02:35:57 +00:00
|
|
|
|
|
|
|
void init() {
|
2006-01-06 12:48:48 +00:00
|
|
|
gp_setCpuSpeed(40); // Default CPU Speed
|
2005-11-27 02:35:57 +00:00
|
|
|
|
|
|
|
GpGraphicModeSet(16, NULL);
|
|
|
|
|
|
|
|
//if (type == NLU || type == FLU || type == BLU)
|
|
|
|
// gp_initFramebuffer(frameBuffer, 16, 85);
|
|
|
|
//else if (type == BLUPLUS)
|
|
|
|
// gp_initFramebufferBP(frameBuffer, 16, 85);
|
|
|
|
// else
|
|
|
|
// error("Invalid Console");
|
|
|
|
gp_initFrameBuffer();
|
|
|
|
|
|
|
|
GpFatInit();
|
|
|
|
GpRelativePathSet("gp:\\gpmm");
|
|
|
|
}
|
|
|
|
|
|
|
|
void GpMain(void *arg) {
|
2006-06-29 13:18:20 +00:00
|
|
|
extern void memBlockInit();
|
|
|
|
memBlockInit();
|
2006-06-29 09:17:04 +00:00
|
|
|
|
2005-11-27 02:35:57 +00:00
|
|
|
init();
|
|
|
|
|
2006-01-06 12:48:48 +00:00
|
|
|
readConfigVars();
|
|
|
|
|
2005-11-27 02:35:57 +00:00
|
|
|
splashScreen();
|
2006-01-06 12:48:48 +00:00
|
|
|
|
2005-11-27 02:35:57 +00:00
|
|
|
//doConfig
|
2006-01-06 12:48:48 +00:00
|
|
|
gp_initGammaTable((float)g_vars.gammaRamp / 10000);
|
|
|
|
gp_setCpuSpeed(g_vars.cpuSpeed);
|
2006-09-13 07:32:54 +00:00
|
|
|
GPDEBUG("Set CPU Speed: %d", g_vars.cpuSpeed);
|
2005-11-27 02:35:57 +00:00
|
|
|
|
|
|
|
// FOR DEBUG PURPOSE!
|
2006-06-03 15:07:26 +00:00
|
|
|
//int argc = 4;
|
2005-11-27 02:35:57 +00:00
|
|
|
//char *argv[] = { "scummvm", "-enull", "-pgp:\\game\\dott\\", "tentacle" };
|
2006-06-03 15:07:26 +00:00
|
|
|
//int argc = 2;
|
|
|
|
//char *argv[] = { "scummvm", "-d5" };
|
2005-11-27 02:35:57 +00:00
|
|
|
|
2006-04-07 11:37:46 +00:00
|
|
|
extern OSystem *OSystem_GP32_create();
|
|
|
|
g_system = OSystem_GP32_create();
|
2006-04-02 14:16:31 +00:00
|
|
|
assert(g_system);
|
|
|
|
|
2006-04-02 14:31:23 +00:00
|
|
|
// Invoke the actual ScummVM main entry point:
|
2006-04-07 10:38:06 +00:00
|
|
|
//int res = scummvm_main(argc, argv);
|
2006-04-02 14:31:23 +00:00
|
|
|
int res = scummvm_main(1, NULL);
|
2006-06-29 05:15:45 +00:00
|
|
|
|
2006-06-29 13:18:20 +00:00
|
|
|
extern void memBlockDeinit();
|
|
|
|
memBlockDeinit();
|
2006-06-29 09:17:04 +00:00
|
|
|
|
2006-04-02 14:31:23 +00:00
|
|
|
g_system->quit(); // TODO: Consider removing / replacing this!
|
2006-04-07 11:37:46 +00:00
|
|
|
|
|
|
|
//return res;
|
2005-11-27 02:35:57 +00:00
|
|
|
}
|