VX 스크립트

#==============================================================================
# ■ VX-RGSS2-7 Change Battle Background [Ver.1.0.0]     by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# Changes the battle background.
#==============================================================================


module BattleBack
  #   Select Battle Background Type
  #   0:Current map with wave effect for battle background (Default VX Style).
  #   1:Current map used as battle background. 
  #   2:Uses a picture for battle background. 
  BB_TYPE = 0
  
  # Display Battle Floor
  BT_FLOOR = false

  # Picture (Only required if BB_TYPE = 2)
  M_B_BACK = {
    # Map ID => "Picture File Name(Graphics/System)"
    1 => "001-Grassland01"
  }
end


#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
  #--------------------------------------------------------------------------
  # ● Creating Battle Back Sprite
  #--------------------------------------------------------------------------
  def create_battleback
    case BattleBack::BB_TYPE
    when 0
      source = $game_temp.background_bitmap
      bitmap = Bitmap.new(640, 480)
      bitmap.stretch_blt(bitmap.rect, source, source.rect)
      bitmap.radial_blur(90, 12)
      @battleback_sprite = Sprite.new(@viewport1)
      @battleback_sprite.bitmap = bitmap
      @battleback_sprite.ox = 320
      @battleback_sprite.oy = 240
      @battleback_sprite.x = 272
      @battleback_sprite.y = 176
      @battleback_sprite.wave_amp = 8
      @battleback_sprite.wave_length = 240
      @battleback_sprite.wave_speed = 120
    when 1
      source = $game_temp.background_bitmap
      bitmap = Bitmap.new(640, 480)
      bitmap.stretch_blt(bitmap.rect, source, source.rect)
      @battleback_sprite = Sprite.new(@viewport1)
      @battleback_sprite.bitmap = bitmap
      @battleback_sprite.ox = 320
      @battleback_sprite.oy = 240
      @battleback_sprite.x = 272
      @battleback_sprite.y = 176
    when 2
      @battleback_sprite = BattleBackSprite.new(@viewport1)
    end
  end
  #--------------------------------------------------------------------------
  # ● Creating Battle Floor Sprite
  #--------------------------------------------------------------------------
  alias create_battlefloor_mbb create_battlefloor
  def create_battlefloor
    create_battlefloor_mbb if BattleBack::BT_FLOOR
  end
  #--------------------------------------------------------------------------
  # ● Delete Battle Floor Sprite
  #--------------------------------------------------------------------------
  alias dispose_battlefloor_mbb dispose_battlefloor
  def dispose_battlefloor
    dispose_battlefloor_mbb if BattleBack::BT_FLOOR
  end
  #--------------------------------------------------------------------------
  # ● Update Battle Floor Sprite
  #--------------------------------------------------------------------------
  alias update_battlefloor_mbb update_battlefloor
  def update_battlefloor
    update_battlefloor_mbb if BattleBack::BT_FLOOR
  end
end


#==============================================================================
# ■ BattleBackSprite
#==============================================================================
class BattleBackSprite < Sprite
  # Background Screen Size
  WIDTH  = 544.00
  HEIGHT = 288.00
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #     viewport : viewport
  #--------------------------------------------------------------------------
  def initialize(viewport = nil)
    super(viewport)
    self.bitmap = Cache.system(BattleBack::M_B_BACK[$game_map.map_id])
    # Zoom is carried out according to picture size.
    @x_zoom = WIDTH / self.bitmap.width
    @y_zoom = HEIGHT / self.bitmap.height
    @zoom = @x_zoom > @y_zoom ? @x_zoom : @y_zoom
    # Zoom is carried out.
    self.zoom_x = @zoom
    self.zoom_y = @zoom
    # Made into central display.
    self.ox = self.bitmap.width / 2
    self.oy = self.bitmap.height / 2
    self.x = (self.bitmap.width / 2)  * @zoom
    self.y = (self.bitmap.height / 2) * @zoom
  end
end

Comment '45'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
117 전투 새로운 전투돌입효과 29 file RPGbooster 2008.10.08 5079
116 타이틀/게임오버 심플한 게임오버화면 28 file RPGbooster 2008.10.08 3328
115 fog[안개] 효과 43 file RPGbooster 2008.10.08 4196
114 아이템 아이템입수 화면 16 file RPGbooster 2008.10.08 4526
113 전투 PRABS 2.0 액션배틀시스템 58 file RPGbooster 2008.10.08 7575
112 전투 Crissaegrim ABS 2.0.5 최신 48 file RPGbooster 2008.10.08 8768
111 전투 GTBS_VX 1.0 택틱컬rpg 14 file RPGbooster 2008.10.08 3352
110 케릭터 텍스트박스 18 file RPGbooster 2008.10.08 4709
109 파티 파티 체인저 3.4 최신 13 file RPGbooster 2008.10.08 3864
108 무기에 초필살기를 장착! 19 file RPGbooster 2008.10.08 4131
107 물반사 효과 32 file RPGbooster 2008.10.08 3723
106 Tankentai SBS 2.8 업데이트 [사이드뷰 배틀시스템 ] 42 file RPGbooster 2008.10.08 5140
105 이름입력 MOG 이름바꾸기 11 file RPGbooster 2008.10.08 3285
104 MOG 스토리 씬 22 file RPGbooster 2008.10.08 3345
103 레벨업시 자세한 능력치화면 31 file RPGbooster 2008.10.08 4181
102 타이틀/게임오버 타이틀에 스토리맵을 달자 26 file RPGbooster 2008.10.08 4829
101 메시지 네오 메시지 시스템 최신 17 file RPGbooster 2008.10.08 4251
100 심플하게 메뉴 띄우기 25 file RPGbooster 2008.10.08 3864
99 탈것을 소환 12 file RPGbooster 2008.10.08 2713
98 깔끔한 링메뉴 45 file RPGbooster 2008.10.08 5000
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32