Exemplo n.º 1
0
void handle_init(AppContextRef ctx) {
	(void)ctx;
	PblTm currentTime;
	unsigned int unixTime;

	resource_init_current_app(&APP_RESOURCES);

	get_time(&currentTime);
	unixTime = GetUnixTime(&currentTime);
	SetRandomSeed(unixTime);

	InitializeExitConfirmationWindow();
	
	handle_minute_tick(ctx, NULL);

	ResetGame();
	ShowAdventureWindow();
}
Exemplo n.º 2
0
void handle_init() {
	
	INFO_LOG("Starting MiniDungeon");
	time_t now = time(NULL);
	
	srand(now);
	DEBUG_LOG("Srand");
	
	handle_minute_tick(NULL, MINUTE_UNIT);
	DEBUG_LOG("First handle second");
	
	InitializeGameData();

#if ALLOW_WORKER_APP
	app_worker_message_subscribe(WorkerMessageHandler);
	AppAwake();
#endif
	DEBUG_LOG("InitializeGameData");
	ShowAdventureWindow();
	tick_timer_service_subscribe(MINUTE_UNIT, &handle_minute_tick);
	app_focus_service_subscribe(focus_handler);
}
Exemplo n.º 3
0
void ExitWindow_SelectSingleClickHandler(ClickRecognizerRef recognizer, Window *window)
{
	ShowAdventureWindow();
}