Example #1
0
File: jump.c Project: Bediko/r0ket
void ram(void) {

	splash_scene();

	long frame_count = 0;
	init_game();

	while(1) {
		frame_count++;

		lcdFill(0);
		update_platforms(frame_count);
		move_player(frame_count);
		draw_platforms();
		draw_player();
		draw_hud();
		blink_led();
		lcdDisplay();

		if(!game.running) {
			if(!gameover_scene()){
                delayms_queue_plus(10,1);
				return;
            }
			init_game();
		}
        delayms_queue_plus(24,0);
	}
}
Example #2
0
// ZZZ: split out from update_world()'s loop.
static int
update_world_elements_one_tick()
{
	if (m1_solo_player_in_terminal()) 
	{
		update_m1_solo_player_in_terminal(GameQueue);
	} 
	else
	{
		L_Call_Idle();
		
		update_lights();
		update_medias();
		update_platforms();
		
		update_control_panels(); // don't put after update_players
		update_players(GameQueue, false);
		move_projectiles();
		move_monsters();
		update_effects();
		recreate_objects();
		
		handle_random_sound_image();
		animate_scenery();
		
		// LP additions:
		if (film_profile.animate_items)
		{
			animate_items();
		}
		
		AnimTxtr_Update();
		ChaseCam_Update();
		motion_sensor_scan();
		check_m1_exploration();
		
#if !defined(DISABLE_NETWORKING)
		update_net_game();
#endif // !defined(DISABLE_NETWORKING)
	}

        if(check_level_change()) 
        {
                return kUpdateChangeLevel;
        }

#if !defined(DISABLE_NETWORKING)
        if(game_is_over())
        {
                return kUpdateGameOver;
        }
#endif // !defined(DISABLE_NETWORKING)

        dynamic_world->tick_count+= 1;
        dynamic_world->game_information.game_time_remaining-= 1;
        
        return kUpdateNormalCompletion;
}