forked from bedohswe/p3he
Slow down a bit.
This commit is contained in:
parent
d54377e3d6
commit
9ebde906c2
@ -3,6 +3,6 @@ from cmath import exp
|
|||||||
I = complex(0,1)
|
I = complex(0,1)
|
||||||
WHITE = (255,255,255)
|
WHITE = (255,255,255)
|
||||||
BLACK = (0,0,0)
|
BLACK = (0,0,0)
|
||||||
OFFSET = 0.015625
|
OFFSET = 0.0078125
|
||||||
ROT = cNorm(exp(deg2rad(2)*I))
|
ROT = cNorm(exp(deg2rad(2)*I))
|
||||||
IROT = 1/ROT
|
IROT = 1/ROT
|
||||||
|
6
main.py
6
main.py
@ -32,7 +32,9 @@ def renderDebugInfo(gPlayer, clock, fontSize = 18):
|
|||||||
|
|
||||||
return fps_surf, cPos_surf, cRot_surf
|
return fps_surf, cPos_surf, cRot_surf
|
||||||
|
|
||||||
|
def nonzerocap(n):
|
||||||
|
if n <= 0: return 1
|
||||||
|
return n
|
||||||
|
|
||||||
def mainLoop():
|
def mainLoop():
|
||||||
gPlayer = GyroVector(0,1)
|
gPlayer = GyroVector(0,1)
|
||||||
@ -90,7 +92,7 @@ def mainLoop():
|
|||||||
pygame.draw.rect(display,GROUND, (0,360,1280,360))
|
pygame.draw.rect(display,GROUND, (0,360,1280,360))
|
||||||
n = 0
|
n = 0
|
||||||
for i in drawn:
|
for i in drawn:
|
||||||
pygame.draw.rect(display,i.color, (n,int((cap(i.dist)) * 360),8,int(cap(1 - i.dist) * 1280)))
|
pygame.draw.rect(display,i.color, (n,int((nonzerocap(i.dist)) * 360),8,int((1 -nonzerocap(i.dist)) * 1280)))
|
||||||
n += 4
|
n += 4
|
||||||
gPlayer.normalize()
|
gPlayer.normalize()
|
||||||
if debugInfo:
|
if debugInfo:
|
||||||
|
Loading…
Reference in New Issue
Block a user