Skip to content

Commit

Permalink
make Jumbo Ray render
Browse files Browse the repository at this point in the history
defaults to face right, renders Jumbo Ray facing left with corrected offset if FlyLeft is checked. The image I extracted has the Jumbo Ray facing left so I actually had to mirror the image to get default image.
  • Loading branch information
JasonP27 committed Nov 14, 2012
1 parent f2506f5 commit 2bdcbec
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions sprites.py
Expand Up @@ -1136,6 +1136,19 @@ def InitSpringBlock(sprite): # 223

return (0,0,16,16)

def InitJumboRay(sprite): # 224
global ImageCache
if 'JumboRay' not in ImageCache:
Ray = QtGui.QImage('reggiedata/sprites/jumbo_ray.png')
ImageCache['JumboRayL'] = QtGui.QPixmap.fromImage(Ray)
ImageCache['JumboRayR'] = QtGui.QPixmap.fromImage(Ray.mirrored(True, False))

sprite.dynamicSize = True
sprite.dynSizer = SizeJumboRay
sprite.customPaint = True
sprite.customPainter = PaintGenericObject
return (0,0,171,79)

def InitExtendShroom(sprite): # 228
global ImageCache
if 'ExtendShroomL' not in ImageCache:
Expand Down Expand Up @@ -2209,6 +2222,7 @@ def InitSuperGuideBlock(sprite): # 477
212: InitRollingHill,
221: InitBlock,
223: InitSpringBlock,
224: InitJumboRay,
228: InitExtendShroom,
230: InitBramball,
231: InitWiggleShroom,
Expand Down Expand Up @@ -2865,6 +2879,18 @@ def SizeSpringBlock(sprite): # 223
else:
sprite.image = ImageCache['SpringBlock2']

def SizeJumboRay(sprite): # 224
flyleft = ord(sprite.spritedata[4]) & 15

if flyleft == 1:
sprite.image = ImageCache['JumboRayL']
else:
sprite.xoffset = -152
sprite.yoffset = 0
sprite.xsize = 171
sprite.ysize = 79
sprite.image = ImageCache['JumboRayR']

def SizeExtendShroom(sprite): # 228
props = ord(sprite.spritedata[5])

Expand Down

0 comments on commit 2bdcbec

Please sign in to comment.