Mithran

VXA Sprite Show picture leak fix

Mar 12th, 2012
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. class Sprite_Picture
  2. def update_bitmap
  3. if @picture.name != @pic_name
  4. self.bitmap = Cache.picture(@picture.name)
  5. end
  6. @pic_name = @picture.name
  7. end
  8.  
  9. end
  10.  
  11.  
  12. class Spriteset_Map
  13.  
  14. def update_pictures
  15. $game_map.screen.pictures.each do |pic|
  16. @picture_sprites[pic.number] ||= Sprite_Picture.new(@viewport2, pic)
  17. @picture_sprites[pic.number].update
  18. if pic.name == ""
  19. $game_map.screen.pictures.remove(pic.number)
  20. @picture_sprites[pic.number].dispose
  21. @picture_sprites[pic.number] = nil
  22. end
  23. end
  24. end
  25.  
  26. end
  27.  
  28. class Game_Pictures
  29.  
  30. def remove(index)
  31. @data[index] = nil
  32. end
  33.  
  34. end
Advertisement
Add Comment
Please, Sign In to add comment