Advertisement
Vendily

Auto Shadow Shading

Jun 26th, 2017
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.89 KB | None | 0 0
  1. #Put under PSystem_Utilities
  2. def drawShadowPoke(bitmap)
  3.   colorsheet=Bitmap.new(bitmap.width,bitmap.height)
  4.   color=Color.new(67,0,255)
  5.   colorsheet.fill_rect(colorsheet.rect,color)
  6.   bitmap.blt(0,0,colorsheet,colorsheet.rect,113)
  7.   color.alpha=113
  8.   blankcolor=Color.new(0,0,0,0)
  9.   for x in 0...bitmap.width
  10.      for y in 0...bitmap.height
  11.        if bitmap.get_pixel(x,y) == color
  12.          bitmap.set_pixel(x,y,blankcolor)
  13.        end
  14.      end
  15.   end
  16. end
  17.  
  18. alias _shadow_pbLoadPokemonBitmapSpecies pbLoadPokemonBitmapSpecies
  19. def pbLoadPokemonBitmapSpecies(pokemon, species, back=false)
  20.   ret=_shadow_pbLoadPokemonBitmapSpecies(pokemon, species, back)
  21.   if (pokemon.isShadow? rescue false)
  22.     animatedBitmap=ret
  23.     copiedBitmap=animatedBitmap.copy
  24.     animatedBitmap.dispose
  25.     copiedBitmap.each {|bitmap|
  26.        drawShadowPoke(bitmap)
  27.     }
  28.     ret=copiedBitmap
  29.   end
  30.   return ret
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement