1 from __future__
import division
2 from config
import config
3 from client
import client
4 from pyglet
.gl
.gl
import *
15 # default configuration settings
16 defaults
= { 'window.fullscreen' : 'true',
20 'action.right' : 'D' }
22 cfg
= config ('data/config.xml', defaults
)
26 glEnable (GL_TEXTURE_2D
)
27 glBlendFunc (GL_SRC_ALPHA
, GL_ONE_MINUS_SRC_ALPHA
)
30 win
.lvl
.load ('data/grammar.lvl')
31 win
.lvl
.view
.size
.x
= win
.width
/ 2
32 win
.lvl
.view
.size
.y
= win
.height
/ 2
33 win
.push_handlers (win
.lvl
.keys
)
36 from geom
import vector
37 from client
import client
39 dude
.tex
= pyglet
.image
.load ('data/egg.png').texture
40 dude
.oval
.pos
= vector (500, 385)
41 dude
.oval
.size
= vector (12, 15)
42 dude
.vel
= vector (-10, 0)
43 thing
= ball (win
.lvl
, dude
)
44 thing
.oval
.pos
= vector (300, 400)
45 win
.lvl
.actors
.append (dude
)
46 win
.lvl
.actors
.append (thing
)
48 cli
= client (win
.lvl
, dude
)
60 pyglet
.clock
.schedule (update
)
68 if __name__
== '__main__':