Vendily

auto hue

Aug 3rd, 2017
161
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def drawShadowPoke(bitmap)
  2.   colorlayer=Bitmap.new(bitmap.width,bitmap.height)
  3.   shadowcolor=Color.new(67,0,255)
  4.   colorlayer.fill_rect(colorlayer.rect, shadowcolor)
  5.   bitmap.blt(0,0,colorlayer,colorlayer.rect,113)
  6.   shadowcolor.alpha=113
  7.   blankcolor=Color.new(0,0,0,0)
  8.   for x in 0...bitmap.width
  9.     for y in 0...bitmap.height
  10.       if bitmap.get_pixel(x,y)==shadowcolor
  11.         bitmap.set_pixel(x,y,blankcolor)
  12.       end
  13.     end
  14.   end
  15. end
  16.  
  17. alias _shadow_pbLoadPokemonBitmapSpecies pbLoadPokemonBitmapSpecies
  18. def pbLoadPokemonBitmapSpecies(pokemon, species, back=false)
  19.   ret=_shadow_pbLoadPokemonBitmapSpecies(pokemon, species, back)
  20.   if (pokemon.isShadow? rescue false)
  21.     animatedBitmap=ret
  22.     copiedBitmap=animatedBitmap.copy
  23.     animatedBitmap.dispose
  24.     copiedBitmap.each {|bitmap|
  25.        drawShadowPoke(bitmap)
  26.     }
  27.     ret=copiedBitmap
  28.   end
  29.   return ret
  30. end
RAW Paste Data