示例#1
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;
}
示例#2
0
static void update_motion_sensor(
	short time_elapsed)
{
	if(!(GET_GAME_OPTIONS() & _motion_sensor_does_not_work))
	{
		if (time_elapsed==NONE)
		{
			reset_motion_sensor(current_player_index);
		}

		motion_sensor_scan(time_elapsed);
		
		if (motion_sensor_has_changed())
		{
			screen_rectangle *destination= get_interface_rectangle(_motion_sensor_rect);

			_draw_screen_shape_at_x_y(BUILD_DESCRIPTOR(_collection_interface, 
				_motion_sensor_mount), destination->left, destination->top);
		}
	}
		
	return;
}