u
This commit is contained in:
parent
fca089fcda
commit
51f0a2e421
1 changed files with 21 additions and 6 deletions
27
vis2.py
27
vis2.py
|
@ -2,16 +2,31 @@
|
|||
import pygame
|
||||
# pygame setup
|
||||
pygame.init()
|
||||
screen = pygame.display.set_mode((1920, 1080), flags=pygame.FULLSCREEN)
|
||||
display = pygame.display.Info()
|
||||
screen = pygame.display.set_mode((display.current_w, display.current_h), flags=pygame.FULLSCREEN)
|
||||
clock = pygame.time.Clock()
|
||||
running = True
|
||||
|
||||
screen.fill("black")
|
||||
X=128
|
||||
Y=8
|
||||
maps = [(x%X)+1920*(x//X) for x in range(X*Y)]
|
||||
maps += [x+1*X for x in maps]
|
||||
it = iter(maps)
|
||||
import sys
|
||||
if len(sys.argv[1:3]) == 2:
|
||||
XSTRIPE, YSTRIPE = [int(i) for i in sys.argv[1:3]]
|
||||
else:
|
||||
XSTRIPE = 128
|
||||
YSTRIPE = 8
|
||||
def mapsf(width=display.current_w, height=display.current_w):
|
||||
for i in range(width*height):
|
||||
sno = i // (XSTRIPE * YSTRIPE)
|
||||
ord = i % (XSTRIPE * YSTRIPE)
|
||||
base_x = sno % (width // XSTRIPE) * XSTRIPE
|
||||
base_y = sno // (width // XSTRIPE) * YSTRIPE
|
||||
sx = ord % XSTRIPE + base_x
|
||||
sy = ord // XSTRIPE + base_y
|
||||
yield sy * width + sx
|
||||
|
||||
maps = [(x%XSTRIPE)+1920*(x//XSTRIPE) for x in range(XSTRIPE*YSTRIPE)]
|
||||
maps += [x+1*XSTRIPE for x in maps]
|
||||
it = iter(mapsf())
|
||||
#for _ in range(8*8*16*16*(15*8)+18000*5):
|
||||
# next(it)
|
||||
#for _ in range(8*8*16*16*(15*8)):
|
||||
|
|
Loading…
Reference in a new issue