note description: "[ A GAME_HAPTIC_EFFECT that can use a left and right motor. May be use also for Low and High frequency motors. ]" author: "Louis Marchand" date: "Tue, 03 Mar 2015 21:22:50 +0000" revision: "2.0" class GAME_HAPTIC_LEFT_RIGHT_EFFECT inherit GAME_HAPTIC_EFFECT_INFINITE_LENGTH redefine make end create make feature -- Initialization make -- Initialization of Current do Precursor set_type ({GAME_SDL_EXTERNAL}.sdl_haptic_leftright.as_natural_16) end feature -- Access length: NATURAL_32 assign set_length -- Duration of Current (in millisecond) do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_leftright_length (specific_item) end set_length (a_length: NATURAL_32) -- Assign length with the value of a_length do {GAME_SDL_EXTERNAL}.set_sdl_haptic_leftright_length (specific_item, a_length) end left_level: NATURAL_16 assign set_left_level -- Strength of the left motor of Current require exists: exists do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_leftright_large_magnitude (specific_item) end set_left_level (a_level: NATURAL_16) -- Assign start_level with the value of a_level require exists: exists level_valid: a_level <= 32767 do {GAME_SDL_EXTERNAL}.set_sdl_haptic_leftright_large_magnitude (specific_item, a_level) ensure is_assign: left_level = a_level end right_level: NATURAL_16 assign set_right_level -- Strength of the right motor of Current require exists: exists do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_leftright_small_magnitude (specific_item) end set_right_level (a_level: NATURAL_16) -- Assign right_level with the value of a_level require exists: exists level_valid: a_level <= 32767 do {GAME_SDL_EXTERNAL}.set_sdl_haptic_leftright_small_magnitude (specific_item, a_level) ensure is_assign: right_level = a_level end feature {NONE} -- Implementation specific_item: POINTER -- Internal pointer that is specific to a certain type of Current -- Note that item only point to a C union. do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_effect_leftright (item) end end -- class GAME_HAPTIC_LEFT_RIGHT_EFFECT
Generated by ISE EiffelStudio