Exemple #1
0
int theMain(int argc, char **argv){
	obj.screenLog = TEMP_EN_LOG; //initially disable logging to screen.
		
	//Define the quit handler;
	signal(SIGTERM,exitHandle);
	initSDL();


	//JS_Init(); //SETUP SPIDERMONKEY -> NEW VERSION!!

	if(!(runtime = JS_NewRuntime(8L *1024*1024L * 8,JS_USE_HELPER_THREADS /*JS_NO_HELPER_THREADS*/ ))){
		fprint(stderr,"Could not setup runtime\n");
		exit(EXIT_FAILURE);
	}
	
	init_video_libraries(&argc,&argv);
	
	while(1){
		char *appPath = NULL;
		appPath = launchApp(MENU_SCRIPT,1);
		if(appPath == NULL)
			continue;
		loadApp(appPath);
	}
	return EXIT_SUCCESS;
}
//---------
void appWrapper::keyReleased(int key) {
    if (key ==  ' ')
        loadApp();

    if (this->checkValid())
        this->app->keyReleased(key);
}
Exemple #3
0
bool initStandardMode(){
	loadApp(g_tileNum);
}
Exemple #4
0
bool initDebugMode(){
	loadApp(g_tileNum);
	gc_simNum = 0;
	g_simExtNum = 0;
}
Exemple #5
0
void onInit(){
	loadApp(&_app, 5);
	// 只有在html的環境中有效果!
	callJs("onInitOK()");
}