コード例 #1
0
ファイル: main_SDL.cpp プロジェクト: TeslaRus/OpenTomb
int main(int argc, char **argv)
{
    Engine_Start(argc, argv);
    Engine_MainLoop();
    Engine_Shutdown(EXIT_SUCCESS);

    return(EXIT_SUCCESS);
}
コード例 #2
0
//---
void xmain(int argc, char *argv[])
{
	vc_initBuiltins();
	vc_initLibrary();

	InitGarlick();
	Handle::init();

	strcpy(mapname,"");

	LoadConfig();
	if (argc == 2)
	{
		if (strlen(argv[1]) > 254)
			err("Mapname argument too long!");
		strcpy(mapname, argv[1]);
	}

	InitVideo();

	mouse_Init();
	InitKeyboard();
	joy_Init();
	InitScriptEngine();

	gameWindow->setTitle(APPNAME);

	if (sound) snd_Init(soundengine);

	win_movie_init();
	ResetSprites();
	timer_Init(gamerate);

	LUA *lua;
	se = lua = new LUA();
	
	#ifdef ALLOW_SCRIPT_COMPILATION
	DisplayCompileImage();
	lua->compileSystem();
	CompileMaps("lua", lua);
	#endif
	
	se->ExecAutoexec();

	while (true && strlen(mapname))
		Engine_Start(mapname);
	err("");
}
コード例 #3
0
ファイル: main_SDL.cpp プロジェクト: stltomb/OpenTomb
int main(int /*argc*/, char** /*argv*/)
{
    btScalar time, newtime;
    static btScalar oldtime = 0.0;

    Engine_Start();

    // Entering main loop.
    while(!done)
    {
        newtime = Sys_FloatTime();
        time = newtime - oldtime;
        oldtime = newtime;
        Engine_Frame(time * time_scale);
    }

    // Main loop interrupted; shutting down.
    Engine_Shutdown(EXIT_SUCCESS);
    return(EXIT_SUCCESS);
}