StCooler
Mayst thou thy peace discover.
- 9,796
- Posts
- 5
- Years
- Seen today
242 301
I have a lot of fruit flies too in my apartment, it's getting annoying! 😡
I have a lot of fruit flies too in my apartment, it's getting annoying! 😡
Here's the code, you can generate a whole PC of Spindas :)You people should do a Spinda living dex. Get all the patterns! :D
Spoiler:
Code:
def drawSpot(bitmap,spotpattern,x,y,red,green,blue)
height = spotpattern.length
width = spotpattern[0].length
for yy in 0...height
spot = spotpattern[yy]
for xx in 0...width
if spot[xx]==1
xOrg = (x+xx)<<1
yOrg = (y+yy)<<1
color = bitmap.get_pixel(xOrg,yOrg)
r = color.red+red
g = color.green+green
b = color.blue+blue
color.red = [[r,0].max,255].min
color.green = [[g,0].max,255].min
color.blue = [[b,0].max,255].min
bitmap.set_pixel(xOrg,yOrg,color)
bitmap.set_pixel(xOrg+1,yOrg,color)
bitmap.set_pixel(xOrg,yOrg+1,color)
bitmap.set_pixel(xOrg+1,yOrg+1,color)
end
end
end
end
def pbSpindaSpots(pkmn,bitmap)
spot1 = [
[0,0,1,1,1,1,0,0],
[0,1,1,1,1,1,1,0],
[1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1],
[0,1,1,1,1,1,1,0],
[0,0,1,1,1,1,0,0]
]
spot2 = [
[0,0,1,1,1,0,0],
[0,1,1,1,1,1,0],
[1,1,1,1,1,1,1],
[1,1,1,1,1,1,1],
[1,1,1,1,1,1,1],
[1,1,1,1,1,1,1],
[1,1,1,1,1,1,1],
[0,1,1,1,1,1,0],
[0,0,1,1,1,0,0]
]
spot3 = [
[0,0,0,0,0,1,1,1,1,0,0,0,0],
[0,0,0,1,1,1,1,1,1,1,0,0,0],
[0,0,1,1,1,1,1,1,1,1,1,0,0],
[0,1,1,1,1,1,1,1,1,1,1,1,0],
[0,1,1,1,1,1,1,1,1,1,1,1,0],
[1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1],
[0,1,1,1,1,1,1,1,1,1,1,1,0],
[0,1,1,1,1,1,1,1,1,1,1,1,0],
[0,0,1,1,1,1,1,1,1,1,1,0,0],
[0,0,0,1,1,1,1,1,1,1,0,0,0],
[0,0,0,0,0,1,1,1,0,0,0,0,0]
]
spot4 = [
[0,0,0,0,1,1,1,0,0,0,0,0],
[0,0,1,1,1,1,1,1,1,0,0,0],
[0,1,1,1,1,1,1,1,1,1,0,0],
[0,1,1,1,1,1,1,1,1,1,1,0],
[1,1,1,1,1,1,1,1,1,1,1,0],
[1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,0],
[0,1,1,1,1,1,1,1,1,1,1,0],
[0,0,1,1,1,1,1,1,1,1,0,0],
[0,0,0,0,1,1,1,1,1,0,0,0]
]
id = pkmn.personalID
h = (id>>28)&15
g = (id>>24)&15
f = (id>>20)&15
e = (id>>16)&15
d = (id>>12)&15
c = (id>>8)&15
b = (id>>4)&15
a = (id)&15
if pkmn.shiny?
drawSpot(bitmap,spot1,b+33,a+25,-75,-10,-150)
drawSpot(bitmap,spot2,d+21,c+24,-75,-10,-150)
drawSpot(bitmap,spot3,f+39,e+7,-75,-10,-150)
drawSpot(bitmap,spot4,h+15,g+6,-75,-10,-150)
else
drawSpot(bitmap,spot1,b+33,a+25,0,-115,-75)
drawSpot(bitmap,spot2,d+21,c+24,0,-115,-75)
drawSpot(bitmap,spot3,f+39,e+7,0,-115,-75)
drawSpot(bitmap,spot4,h+15,g+6,0,-115,-75)
end
end