def initct(mem=16384): global ctu, cts, ctss ctu = tiles.CollisionTable(mem, safetyval='unsafe') cts = tiles.CollisionTable(mem, safetyval='safe') ctss = tiles.CollisionTable(mem, safetyval='super safe')
ints) == tl: sametl.append(newfloats) if fancytiles.exptiles(numtilings, memct, newfloats, ints) == te: samete.append(newfloats) data = [samet, samets, sametd, sametbd, sametdm, sametl, samete] return data def showtiles(numtilings, memct, floats, ints=[], title="Tile Display", \ start=0.0, end=5.0, intervals=10): w = TileDisplay(2.0, 2.0, numtilings, memct, title=title, start=start, \ end=end, intervals=intervals, gdViewport=(0, 20, 600, 620)) # should really have one for each type of tiling for test? ctu = tiles.CollisionTable(4096, 'unsafe') cts = tiles.CollisionTable(4096, 'safe') ctss = tiles.CollisionTable(4096, 'super safe') gAddMenu(GMENU, 'Tile Window', \ [['1 tiling, memory 1024', lambda: showtiles(1, 1024, [1.0, 2.0], title="Tile Display, memory 1024")], \ ['2 tilings, memory 1024', lambda: showtiles(2, 1024, [1.0, 2.0], title="Tile Display, memory 1024")], \ ['4 tilings, memory 1024', lambda: showtiles(4, 1024, [1.0, 2.0], title="Tile Display, memory 1024")], \ ['8 tilings, memory 1024', lambda: showtiles(8, 1024, [1.0, 2.0], title="Tile Display, memory 1024")], \ ['16 tilings, memory 1024', lambda: showtiles(16, 1024, [1.0, 2.0], title="Tile Display, memory 1024")], \ '---', \ ['1 tiling, memory 2048', lambda: showtiles(1, 2048, [1.0, 2.0], title="Tile Display, memory 2048")], \ ['2 tilings, memory 2048', lambda: showtiles(2, 2048, [1.0, 2.0], title="Tile Display, memory 2048")], \ ['4 tilings, memory 2048', lambda: showtiles(4, 2048, [1.0, 2.0], title="Tile Display, memory 2048")], \ ['8 tilings, memory 2048', lambda: showtiles(8, 2048, [1.0, 2.0], title="Tile Display, memory 2048")], \ ['16 tilings, memory 2048', lambda: showtiles(16, 2048, [1.0, 2.0], title="Tile Display, memory 2048")], \