15 |
|
|
16 |
class Scene: |
class Scene: |
17 |
def __init__(self): |
def __init__(self): |
18 |
self.mem = MemoryPartitioner(4 * 1024 * 1024) |
self.mem = MemoryPartitioner(32 * 1024 * 1024) |
19 |
self.files = [] |
self.files = [] |
20 |
self.tex = [] |
self.tex = [] |
21 |
for f in glob.glob("../mstmpimg/*.mipzip")[0:5]: |
for f in glob.glob("../mstmpimg/*.mipzip"): |
22 |
ml = MipzipLoader(File(f)) |
ml = MipzipLoader(File(f)) |
23 |
# ml.loadToBaseLevelSynch(0) |
# ml.loadToBaseLevelSynch(0) |
24 |
mc = MipzipMemoryConsumer(self.mem, ml) |
mc = MipzipMemoryConsumer(self.mem, ml) |
44 |
TexCoord %(x1)s %(y0)s |
TexCoord %(x1)s %(y0)s |
45 |
Vertex 1 0 |
Vertex 1 0 |
46 |
End |
End |
47 |
""" % { "x0" : .25, "y0" : .25, "x1": .5, "y1":.5 }) |
""" % { "x0" : .25, "y0" : .25, "x1": .3, "y1":.3 }) |
48 |
def scene(self, vs): |
def scene(self, vs): |
49 |
vs.map.put(background((.3,.7,.8))) |
vs.map.put(background((.3,.7,.8))) |
50 |
AbstractUpdateManager.setNoAnimation() |
AbstractUpdateManager.setNoAnimation() |
|
w = vs.size.width / self.nrows |
|
51 |
h = vs.size.height / self.nrows |
h = vs.size.height / self.nrows |
52 |
|
w = h |
53 |
|
print "S" |
54 |
# print "Sc:",len(self.files) |
# print "Sc:",len(self.files) |
55 |
for x in range(0, self.nrows): |
for x in range(0, self.nrows): |
56 |
for y in range(0, self.nrows): |
for y in range(0, self.nrows): |
72 |
self.x = ev.getX() |
self.x = ev.getX() |
73 |
self.y = ev.getY() |
self.y = ev.getY() |
74 |
print self.x, self.y |
print self.x, self.y |
75 |
|
AbstractUpdateManager.chg() |
76 |
|
|
77 |
def key(self, key): |
def key(self, key): |
78 |
return |
return |