void HUD_SW_Class::update_motion_sensor(short time_elapsed)
{
	if (!(GET_GAME_OPTIONS() & _motion_sensor_does_not_work) && MotionSensorActive) {
		if (motion_sensor_has_changed() || time_elapsed == NONE) {
			render_motion_sensor(time_elapsed);
			ForceUpdate = true;
			screen_rectangle *r = get_interface_rectangle(_motion_sensor_rect);
			DrawShapeAtXY(BUILD_DESCRIPTOR(_collection_interface, _motion_sensor_mount), r->left, r->top);
		}
	}
}
示例#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;
}