Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- # XAS Smooth Scroller
- # Version: 1.01
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- class Game_Player
- #--------------------------------------------------------------------------
- # ● Scroll Map Update
- #--------------------------------------------------------------------------
- def scroll_map_update(last_real_x,last_real_y)
- if @real_y - $game_map.display_y > 15*128 - 240*4
- $game_map.scroll_down(@real_y > $game_map.height*128 - 240*4 ?
- (($game_map.height - 15)*128 - $game_map.display_y)/16.0 :
- ((@real_y - $game_map.display_y - 15*128 + 240*4)/16.0))
- end
- if @real_x - $game_map.display_x < 320*4
- $game_map.scroll_left(@real_x < 320*4 ? $game_map.display_x/16.0 :
- (($game_map.display_x + 320*4 - @real_x)/16.0))
- end
- if @real_x - $game_map.display_x > 20*128 - 320*4
- $game_map.scroll_right(@real_x > $game_map.width*128 - 320*4 ?
- (($game_map.width - 20)*128 - $game_map.display_x)/16.0 :
- (@real_x - $game_map.display_x - 20*128 + 320*4 )/16.0)
- end
- if @real_y - $game_map.display_y < 240*4
- $game_map.scroll_up(@real_y < 240*4 ? $game_map.display_y/16.0 :
- (($game_map.display_y+240*4-@real_y)/16.0))
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement