scaleXA = pygame.image.load("scale.png").convert() scaleXB = pygame.image.load("scale2.png").convert() scaleX = scaleXA shadow = pygame.image.load("shadowdepth1.png").convert_alpha() pygame.display.update() engtimer = pygame.time.Clock() while True: scalesurf.blit(scaleX, (0, -75)) rectx = anglescan.verticalanglescan(scaleX, scalesurf, 75, 75, 0.6, 0.6, 2, 1, 1, 0, backprop=0, siderepeat=0) pygame.transform.scale(scalesurf, (800, 600), screensurf) #screensurf.blit(scaledest, (0, 0)) screensurf.blit(shadow, (0, 0)) pygame.display.update() pygame.event.pump() key = pygame.key.get_pressed() if key[pygame.K_ESCAPE]: sys.exit() if key[pygame.K_LEFT]: scaleX = anglescan.hscroll(7, scaleX)
sys.exit() if key[pygame.K_SPACE]: #scaleXA=anglescan.vscroll(5, scaleXA) scaleXA = anglescan.rotoscroll(scaleXA, rotdeg, 10) #scaleXA=anglescan.rotoscroll(scaleXA, rotdeg, 5) #scalesurf.blit(bg, (0, -75)) #arguments in order: texture, blit surface, effect height, effect y position, # width scale, height scale, rescale skip (numbers greater than 1 are faster but are increasingly distorted.), # scale factor of horizon (height and surface width are multiplied by this to create starting width and height) rectx = anglescan.verticalanglescan(scaleX, scalesurf, 60 // 2, 90 // 2, wscale, hscale, 1, originscale, 1, 0, backprop=20, lpane=lpane, rpane=rpane, siderepeat=1) screensurf.blit(pygame.transform.scale(scalesurf, (800, 600)), (0, 0)) rectx.w *= 4 rectx.h *= 8 rectx.x *= 4 rectx.y *= 8 pygame.display.update(rectx) pygame.event.pump() if key[pygame.K_LEFT]:
screensurf = pygame.display.set_mode((800, 600)) scalesurf = pygame.Surface((150, 150), flags=pygame.SRCALPHA) screensurf.blit(bg, (0, 0)) pygame.display.update() engtimer = pygame.time.Clock() while True: #scalesurf.blit(scaleX, (0, -75)) rectx = anglescan.verticalanglescan(scaleXROT, scalesurf, 70, 125, 1.0, 1.0, 2, 1, 1, 0, backprop=25, siderepeat=1) rectx = anglescan.horizontalanglescan(scaleX, scalesurf, 35, 165, 1.3, 1.3, 1, 1, 1, 0,
scaleXB = pygame.image.load("scale2.png") scaleX = scaleXA polar = 1 bg = pygame.image.load("bg.png") pygame.display.init() screensurf = pygame.display.set_mode((800, 600)) scalesurf = pygame.Surface((200, 150), pygame.SRCALPHA) screensurf.blit(bg, (0, 0)) pygame.display.update() engtimer = pygame.time.Clock() while True: #scalesurf.blit(scaleX, (0, -75)) rectx = anglescan.verticalanglescan(scaleX, scalesurf, 75, 75, 1.5, 0.6, 2, 1, 1, 0) screensurf.blit(pygame.transform.scale(scalesurf, (800, 600)), (0, 0)) rectx.w *= 4 rectx.h *= 4 rectx.x *= 4 rectx.y *= 4 pygame.display.update() pygame.event.pump() key = pygame.key.get_pressed() if key[pygame.K_ESCAPE]: sys.exit() if key[pygame.K_LEFT]: scaleX = anglescan.hscroll(3, scaleX) elif key[pygame.K_RIGHT]: scaleX = anglescan.hscroll(-3, scaleX) if key[pygame.K_UP]:
pygame.display.init() screensurf = pygame.display.set_mode((800, 600)) scalesurf = pygame.Surface((200, 150)) screensurf.blit(bg, (0, 0)) pygame.display.update() ypos = 75 yposdef = ypos yposjump = 95 jump = 0 engtimer = pygame.time.Clock() while True: scalesurf.fill((185, 218, 226)) rectx = anglescan.verticalanglescan(scaleX, scalesurf, int(ypos), int(ypos), 1.5, 0.6, 2, 1, 1, 0) screensurf.blit(pygame.transform.scale(scalesurf, (800, 600)), (0, 0)) rectx.w *= 4 rectx.h *= 4 rectx.x *= 4 rectx.y *= 4 pygame.display.update() pygame.event.pump() key = pygame.key.get_pressed() if key[pygame.K_ESCAPE]: sys.exit() if key[pygame.K_SPACE]: jump = 1 if jump == 1: print "up" + str(ypos) ypos += 4
while True: #scalesurf.blit(scaleX, (0, -75)) #scalesurf.blit(bg, (0, -75)) #arguments in order: texture, blit surface, effect height (use negative values to flip projection), effect y position, # width scale, height scale, rescale skip (numbers greater than 1 are faster but are increasingly distorted.), # scale factor of horizon (height and surface width are multiplied by this to create starting width and height), # antialiasing (slower) [bool] # flip texture on negative height [bool] scalesurf.fill((172, 221, 225)) #note on backprop: when using verticalanglescan, set siderepeat to either 1 or 2 for tileable textures. rectx = anglescan.verticalanglescan(scaleX, scalesurf, 35 // 2, 120 // 2, 0.9, 0.9, 1, 1, 1, 0, backprop=45 // 2, siderepeat=1) #rectx=anglescan.verticalanglescan(scaleX, scalesurf, -75, 75, 0.6, 0.6, 3, 1, 1, 0, 0, colorfill=0) #screensurf.blit(pygame.transform.scale(scalesurf, (800, 600)), (0, 0)) pygame.transform.scale(scalesurf, (800, 600), screensurf) rectx.w *= 2 rectx.h *= 8 rectx.x *= 2 rectx.y *= 8 pygame.display.update() pygame.event.pump()
screensurf.blit(bg, (0, 0)) pygame.display.update() engtimer=pygame.time.Clock() while True: #scalesurf.blit(scaleX, (0, -75)) #scalesurf.blit(bg, (0, -75)) #arguments in order: texture, blit surface, effect height (use negative values to flip projection), effect y position, # width scale, height scale, rescale skip (numbers greater than 1 are faster but are increasingly distorted.), # scale factor of horizon (height and surface width are multiplied by this to create starting width and height), # antialiasing (slower) [bool] # flip texture on negative height [bool] rectx=anglescan.verticalanglescan(scaleX, scalesurf, 75, 75, 1.5, 0.6, 3, 1, 1, 0) rectx=anglescan.verticalanglescan(scaleX, scalesurf, -75, 75, 0.6, 0.6, 3, 1, 1, 0, 0, colorfill=0) #screensurf.blit(pygame.transform.scale(scalesurf, (800, 600)), (0, 0)) pygame.transform.scale(scalesurf, (800, 600), screensurf) rectx.w *= 4 rectx.h *= 4 rectx.x *= 4 rectx.y *= 4 pygame.display.update() pygame.event.pump() key=pygame.key.get_pressed() if key[pygame.K_ESCAPE]: sys.exit() if key[pygame.K_LEFT]: scaleX=anglescan.hscroll(3, scaleX) elif key[pygame.K_RIGHT]: