Beispiel #1
0
void intro_tick()
{
	if (blanktimer > 0)
	{
		ClearScreen(BLACK);
		
		if (--blanktimer == 0)
			game.setmode(GM_TITLE);
		return;
	}
	
	game_tick_normal();
	player->y = 0;
	
	// when script ends with WAI9999, detect it and move on to title screen
	ScriptInstance *script = GetCurrentScriptInstance();
	if ((script && script->delaytimer == 9999) || buttonjustpushed() || VJoy::ModeAware::wasTap())
	{
		StopScripts();
		blanktimer = EXIT_DELAY;
	}
	
	// lower time for startup
	if (script && script->delaytimer && script->ip == 5)
	{
		game.showmapnametime = 0;
		if (script->delaytimer > 20)
			script->delaytimer = 20;
	}
}
Beispiel #2
0
void Credits::Tick()
{
	/*debug("scroll_y: %d", scroll_y>>CSF);
	debug("spawn_y: %d", spawn_y);
	debug("scr_spawn_y: %d", SCREEN_Y(spawn_y));
	debug("trigger: %d", SCREEN_HEIGHT+MARGIN);
	debug("");*/
	/*debug("imgno: %d", bigimage.imgno);
	debug("state: %d", bigimage.state);
	debug("imagex: %d", bigimage.imagex);*/
	
	if (roll_running || SCREEN_Y(spawn_y) >= (SCREEN_HEIGHT + 8))
	{
		scroll_y += 0x100;
	}
	
	while(roll_running && SCREEN_Y(spawn_y) < (SCREEN_HEIGHT + MARGIN))
	{
		RunNextCommand();
	}
	
	if (player)
	{
		player->hide = true;
		player->dead = true;	// should pretty much completely disable HandlePlayer()
	}
	
	game_tick_normal();
	bigimage.Draw();
	Draw();
}