#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# [BlizzABS/XAS] Smooth Scroller
# Version: 1.01
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#==============================================================================
# ** Game_Player / BlizzABS::Controller
#------------------------------------------------------------------------------
# This class handles the party leader. Its functions include event starting
# determinants and map scrolling. Some input is processed instantly,
# while some is converted into commands to be given to the player character
#==============================================================================
name = $BlizzABS ? "BlizzABS::Controller" : "Game_Player < Game_Character"
Cache = BlizzABS::Cache if $BlizzABS
eval_text = "
class #{name}
unless $BlizzABS
attr_accessor :real_x,:real_y
def player() $game_player end
end
#--------------------------------------------------------------------------
# update_moving
#--------------------------------------------------------------------------
def update_moving(data)
if data != nil
moved, x, y = data
scroll_map_update(player.real_x,player.real_y)
unless player.moving?
if moved && !check_event_trigger_here(Cache::TouchTrigger) &&
!($DEBUG &&
Input.press?(Input::CTRL)) && @encounter_count > 0
@encounter_count -= 2 ** (5 - $game_system.pixel_rate)
@encounter_count = 0 if @encounter_count < 0
end
if Input.trigger?(Input::C)
check_event_trigger_here(Cache::PressTrigger)
check_event_trigger_there(Cache::BasicTrigger)
end
end
end
($BlizzABS.battlers - [player]).each {|actor| actor.update}
end
#--------------------------------------------------------------------------
# Scroll Map Update | Hirasu : i think here but i dont know which number i have to change :O
#------------------------------------f--------------------------------------
def scroll_map_update(last_real_x,last_real_y)
if player.real_y - $game_map.display_y > 15*128 - 240*4
$game_map.scroll_down(player.real_y > $game_map.height*128 - 240*4 ?
(($game_map.height - 15)*128 - $game_map.display_y)/32.0 :
((player.real_y - $game_map.display_y - 15*128 + 240*4)/32.0))
end
if player.real_x - $game_map.display_x < 480*4
$game_map.scroll_left(player.real_x < 480*4 ? $game_map.display_x/32.0 :
(($game_map.display_x + 480*4 - player.real_x)/32.0))
end
if player.real_x - $game_map.display_x > 20*128 - 480*4
$game_map.scroll_right(player.real_x > $game_map.width*128 - 480*4 ?
(($game_map.width - 20)*128 - $game_map.display_x)/32.0 :
(player.real_x - $game_map.display_x - 20*128 + 480*4 )/32.0)
end
if player.real_y - $game_map.display_y < 240*4
$game_map.scroll_up(player.real_y < 240*4 ? $game_map.display_y/32.0 :
(($game_map.display_y+240*4-player.real_y)/32.0))
end
end
end"
eval(eval_text)