IceDragon200

IEO001 - YGG Patch

Jun 16th, 2011
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.43 KB | None | 0 0
  1. class Sprite_Character < Sprite_Base
  2.  
  3.   #--------------------------------------------------------------------------#
  4.   # * overwrite method :animation_set_sprites
  5.   #--------------------------------------------------------------------------#
  6.   def animation_set_sprites( frame )
  7.     cell_data = frame.cell_data
  8.     for i in 0...@cell_count
  9.       sprite = @animation_sprites[i]
  10.       next if sprite == nil
  11.       pattern = cell_data[i, 0]
  12.       if pattern == nil or pattern == -1
  13.         sprite.visible = false
  14.         next
  15.       end
  16.       unless @character.nil?
  17.         if @character.out_of_screen?()
  18.           sprite.visible = false
  19.           next  
  20.         end if Game_System::ANIMATIONALG
  21.       end  
  22.       if pattern < 100
  23.         sprite.bitmap = @animation_bitmap1
  24.       else
  25.         sprite.bitmap = @animation_bitmap2
  26.       end
  27.       sprite.visible = true
  28.       sprite.src_rect.set(pattern % 5 * 192,
  29.         pattern % 100 / 5 * 192, 192, 192)
  30.       if @animation_mirror
  31.         sprite.x = @animation_ox - cell_data[i, 1]
  32.         sprite.y = @animation_oy + cell_data[i, 2]
  33.         sprite.angle = (360 - cell_data[i, 4])
  34.         sprite.mirror = (cell_data[i, 5] == 0)
  35.       else
  36.         sprite.x = @animation_ox + cell_data[i, 1]
  37.         sprite.y = @animation_oy + cell_data[i, 2]
  38.         sprite.angle = cell_data[i, 4]
  39.         sprite.mirror = (cell_data[i, 5] == 1)
  40.       end
  41.       sprite.z = self.z + 300 + i
  42.       sprite.ox = 96
  43.       sprite.oy = 96
  44.       sprite.zoom_x = cell_data[i, 3] / 100.0
  45.       sprite.zoom_y = cell_data[i, 3] / 100.0
  46.       sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
  47.       sprite.blend_type = cell_data[i, 7]
  48.       if @character.abs_useing_atk_anim
  49.         adding_angle = IEX::YGGDRASIL::DEFAULT_ANIM_ANGLE
  50.         unless @character.iex_anim_lock_direc          
  51.           direc = @character.direction
  52.         else
  53.           direc = @iex_started_direction
  54.         end  
  55.         case direc
  56.         when 2; adding_angle += @character.abs_reverse_blade_anim ? -90 : 90
  57.         when 4; adding_angle += @character.abs_reverse_blade_anim ? 180 : 0
  58.         when 6; adding_angle += @character.abs_reverse_blade_anim ? 0 : 180
  59.         when 8; adding_angle += @character.abs_reverse_blade_anim ? 90 : -90  
  60.         end
  61.         if @character.abs_reverse_blade_anim
  62.           sprite.mirror = true
  63.         end  
  64.         sprite.angle += adding_angle
  65.       end  
  66.     end
  67.   end
  68.  
  69. end
Advertisement
Add Comment
Please, Sign In to add comment