note description: "A GAME_HAPTIC_EFFECT that have a linear ramp effect." author: "Louis Marchand" date: "Tue, 03 Mar 2015 21:22:50 +0000" revision: "2.0" class GAME_HAPTIC_RAMP_EFFECT inherit GAME_HAPTIC_EFFECT_ENVELOPE redefine make end create make feature -- Initialization make -- Initialization of Current do Precursor set_type ({GAME_SDL_EXTERNAL}.sdl_haptic_ramp.as_natural_16) end feature -- Access direction: GAME_HAPTIC_DIRECTION assign set_direction -- The orientation that the force of Current come from require exists: exists do create Result.make_by_pointer ({GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_direction (specific_item)) end set_direction (a_direction: GAME_HAPTIC_DIRECTION) -- assign direction with the values of a_direction require exists: exists do direction.copy (a_direction) ensure is_assign: direction ~ a_direction end length: NATURAL_32 assign set_length -- Duration of Current (in millisecond) do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_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_ramp_length (specific_item, a_length) end delay: NATURAL_16 assign set_delay -- delay before starting Current (in millisecond) do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_delay (specific_item) end set_delay (a_delay: NATURAL_16) -- Assign delay with the value of a_delay do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_delay (specific_item, a_delay) end interval: NATURAL_16 assign set_interval -- how soon before effect can be triggered again (in millisecond) do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_interval (specific_item) end set_interval (a_interval: NATURAL_16) -- Assign interval with the value of a_interval do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_interval (specific_item, a_interval) end start_level: INTEGER_16 assign set_start_level -- Strength of Current at the start require exists: exists do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_start (specific_item) end set_start_level (a_level: INTEGER_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_ramp_start (specific_item, a_level) ensure is_assign: start_level = a_level end end_level: INTEGER_16 assign set_end_level -- Strength of Current at the end require exists: exists do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_end (specific_item) end set_end_level (a_level: INTEGER_16) -- Assign end_level with the value of a_level require exists: exists level_valid: a_level <= 32767 do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_end (specific_item, a_level) ensure is_assign: end_level = a_level end fade_in_level: NATURAL_16 assign set_fade_in_level -- level at the start of the fade in do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_attack_level (specific_item) end set_fade_in_level (a_fade_in_level: NATURAL_16) -- Assign fade_in_level with the value of a_fade_in_level do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_attack_level (specific_item, a_fade_in_level) end fade_in_length: NATURAL_16 assign set_fade_in_length -- length of the fade in do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_attack_length (specific_item) end set_fade_in_length (a_fade_in_length: NATURAL_16) -- Assign fade_in_length with the value of a_fade_in_length do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_attack_length (specific_item, a_fade_in_length) end fade_out_level: NATURAL_16 assign set_fade_out_level -- level at the start of the fade out do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_fade_level (specific_item) end set_fade_out_level (a_fade_out_level: NATURAL_16) -- Assign fade_out_level with the value of a_fade_out_level do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_fade_level (specific_item, a_fade_out_level) end fade_out_length: NATURAL_16 assign set_fade_out_length -- length of the fade out do Result := {GAME_SDL_EXTERNAL}.get_sdl_haptic_ramp_fade_length (specific_item) end set_fade_out_length (a_fade_out_length: NATURAL_16) -- Assign fade_out_length with the value of a_fade_out_length do {GAME_SDL_EXTERNAL}.set_sdl_haptic_ramp_fade_length (specific_item, a_fade_out_length) 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_ramp (item) end end -- class GAME_HAPTIC_RAMP_EFFECT
Generated by ISE EiffelStudio