Three points:
-
The position 0,0 is in the upper left corner and not in the center
-
Maybe
displayWidth
anddisplayHeight
get defined only aftersize()
orfullscreen()
? So iswidth
andheight
by the way. -
I wouldn’t use
size
andfullscreen
together. Just use the latter (one or the other).