示例#1
0
	#scalesurf.blit(bgx, (0, 0))
	#note: terms are slightly different for horizontal version. most notably, the width and height scaling values are reversed in argument order, and sevral argument names are different.
	rectx=anglescan.horizontalanglescan(scaleX, scalesurf, (50-viewskew)//3, (120+viewskew)//3, 1.0, 1.0, 1, 1, 1, 0, backprop=25//3, colorfill=0, siderepeat=1)
	rectx=anglescan.horizontalanglescan(scaleX, scalesurf, -(50+viewskew)//3, (30+viewskew)//3, 1.0, 1.0, 1, 1, 1, 0, 1, colorfill=0, backprop=25//3, siderepeat=1)
	#screensurf.blit(pygame.transform.scale(scalesurf, (800, 600)), (0, 0))
	scalesurf.blit(fogx, ((0+viewskew)//3, 0))
	
	pygame.transform.scale(scalesurf, (800, 600), screensurf)
	pygame.display.update()
	pygame.event.pump()
	key=pygame.key.get_pressed()
	if key[pygame.K_ESCAPE]:
		sys.exit()
	if key[pygame.K_PAGEUP]:
		scaleX=anglescan.hscroll(12, scaleX)
	elif key[pygame.K_PAGEDOWN]:
		scaleX=anglescan.hscroll(-12, scaleX)
	else:
		scaleX=anglescan.hscroll(6, scaleX)
	if key[pygame.K_UP]:
		scaleX=anglescan.vscroll(10, scaleX)
	elif key[pygame.K_DOWN]:
		scaleX=anglescan.vscroll(-10, scaleX)
	if key[pygame.K_LEFT]:
		viewskew+=4
	elif key[pygame.K_RIGHT]:
		viewskew-=4
	#print time.time()
	engtimer.tick(30)
	print engtimer.get_fps()
	
示例#2
0
                                          1,
                                          1,
                                          1,
                                          0,
                                          backprop=38,
                                          siderepeat=0,
                                          colorfill=0)
    #rectx=anglescan.horizontalanglescan(scaleX, scalesurf, 30, 125, 1.0, 1.0, 1, 1, 1, 0, backprop=45, siderepeat=0, colorfill=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_UP]:
        scaleX = anglescan.hscroll(-7, scaleX)
        scaleXROT = anglescan.vscroll(-5, scaleXROT)
    elif key[pygame.K_DOWN]:
        scaleX = anglescan.hscroll(7, scaleX)
        scaleXROT = anglescan.vscroll(5, scaleXROT)
    else:
        scaleX = anglescan.hscroll(-3, scaleX)
        scaleXROT = anglescan.vscroll(-2, scaleXROT)
    #print time.time()
    engtimer.tick(30)
    print engtimer.get_fps()
示例#3
0
                                        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)
    elif key[pygame.K_RIGHT]:
        scaleX = anglescan.hscroll(-7, scaleX)
    else:
        scaleX = anglescan.hscroll(-1, scaleX)
    if key[pygame.K_UP]:
        scaleX = anglescan.vscroll(7, scaleX)
    elif key[pygame.K_DOWN]:
        scaleX = anglescan.vscroll(-7, scaleX)
    #else:
    #	scaleX=vscroll(-1, scaleX)

    #print time.time()
    engtimer.tick(30)
    print engtimer.get_fps()
示例#4
0
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]:
        scaleX = anglescan.vscroll(5, scaleX)
    elif key[pygame.K_DOWN]:
        scaleX = anglescan.vscroll(-5, scaleX)
    #print time.time()
    engtimer.tick(30)
    print engtimer.get_fps()