[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/test gfxtest.py, NONE, 1.1 Makefile.a
From: |
Alexandre Courbot <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/test gfxtest.py, NONE, 1.1 Makefile.am, 1.1.1.1, 1.2 inputtest.cc, 1.1.1.1, 1.2 inputtest.py, 1.1.1.1, 1.2 |
Date: |
Sun, 27 Jul 2003 10:08:23 -0400 |
Update of /cvsroot/adonthell/adonthell/test
In directory subversions:/tmp/cvs-serv28382/test
Modified Files:
Makefile.am inputtest.cc inputtest.py
Added Files:
gfxtest.py
Log Message:
Added a surface abstraction for the screen surface
Added gfxtest (which might unveil a bug somewhere)
--- NEW FILE ---
from adonthell import gfx, input
import time
if __name__ == '__main__':
def key_callback(ev):
global letsexit
print "In callback!"
if ev.type() == input.keyboard_event.KEY_PUSHED:
if ev.key() == input.keyboard_event.ESCAPE_KEY: letsexit = 1
if not gfx.init("sdl"): raise "Can't load gfx backend!"
if not input.init("sdl"): raise " Can't load input backend!"
gfx.screen.set_video_mode(640, 480)
li = input.listener()
li.connect_keyboard_function(key_callback)
input.manager.add(li)
letsexit = 0
while not letsexit:
ssurface = gfx.screen.get_surface()
ssurface.lock()
input.manager.update()
ssurface.fillrect(10, 10, 50, 50, 0xffffff)
ssurface.unlock()
gfx.screen.update()
input.cleanup()
gfx.cleanup()
Index: Makefile.am
===================================================================
RCS file: /cvsroot/adonthell/adonthell/test/Makefile.am,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Makefile.am 18 Jul 2003 15:16:08 -0000 1.1.1.1
--- Makefile.am 27 Jul 2003 14:08:20 -0000 1.2
***************
*** 1,5 ****
CXXFLAGS += -I$(top_srcdir)/src/
! EXTRA_DIST = inputtest.py
noinst_PROGRAMS = callbacktest inputtest
--- 1,5 ----
CXXFLAGS += -I$(top_srcdir)/src/
! EXTRA_DIST = gfxtest.py inputtest.py
noinst_PROGRAMS = callbacktest inputtest
Index: inputtest.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/test/inputtest.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** inputtest.cc 18 Jul 2003 15:16:08 -0000 1.1.1.1
--- inputtest.cc 27 Jul 2003 14:08:21 -0000 1.2
***************
*** 66,70 ****
while (!myObject.letsexit)
input::manager::update();
!
// Do some cleanup, and we're ready to exit!
input::cleanup();
--- 66,70 ----
while (!myObject.letsexit)
input::manager::update();
!
// Do some cleanup, and we're ready to exit!
input::cleanup();
Index: inputtest.py
===================================================================
RCS file: /cvsroot/adonthell/adonthell/test/inputtest.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** inputtest.py 18 Jul 2003 15:16:08 -0000 1.1.1.1
--- inputtest.py 27 Jul 2003 14:08:21 -0000 1.2
***************
*** 1,4 ****
from adonthell import gfx, input
! import sys
## Our exit variable
--- 1,4 ----
from adonthell import gfx, input
! import sys, time
## Our exit variable
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/test gfxtest.py, NONE, 1.1 Makefile.am, 1.1.1.1, 1.2 inputtest.cc, 1.1.1.1, 1.2 inputtest.py, 1.1.1.1, 1.2,
Alexandre Courbot <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src/gfx drawing_area.cc,1.3,1.4
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/gfx/sdl screen_sdl.cc, 1.1.1.1, 1.2 screen_sdl.h, 1.1.1.1, 1.2 surface_sdl.cc, 1.2, 1.3 surface_sdl.h, 1.2, 1.3
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src/gfx drawing_area.cc,1.3,1.4
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/gfx/sdl screen_sdl.cc, 1.1.1.1, 1.2 screen_sdl.h, 1.1.1.1, 1.2 surface_sdl.cc, 1.2, 1.3 surface_sdl.h, 1.2, 1.3
- Index(es):