コード例 #1
0
ファイル: MiniDungeon.c プロジェクト: glebm/MiniDungeon
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();
}
コード例 #2
0
ファイル: MiniDungeon.c プロジェクト: BlackLamb/MiniDungeon
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);
}
コード例 #3
0
ファイル: UILayers.c プロジェクト: glebm/MiniDungeon
void ExitWindow_SelectSingleClickHandler(ClickRecognizerRef recognizer, Window *window)
{
	ShowAdventureWindow();
}