Update of /cvsroot/plib/plib/demos/simon/src
In directory usw-pr-cvs1:/tmp/cvs-serv7115/plib/demos/simon/src
Modified Files:
simon.cxx
Log Message:
Added the AstroPong demo. Fixed up a couple of bugs in PSL.
Index: simon.cxx
===================================================================
RCS file: /cvsroot/plib/plib/demos/simon/src/simon.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- simon.cxx 14 Sep 2002 20:52:42 -0000 1.2
+++ simon.cxx 15 Sep 2002 00:02:51 -0000 1.3
@@ -2,6 +2,70 @@
#include <simon.h>
#include <plib/psl.h>
+pslValue my_siJoystickUD ( int, pslValue *, pslProgram * )
+{
+ pslValue ret ;
+ ret . set ( siJoystickUD () ) ;
+ return ret ;
+}
+
+
[...120 lines suppressed...]
{
res = prog -> step () ;
@@ -85,6 +171,17 @@
if ( res == PSL_PROGRAM_END )
exit ( 0 ) ;
+
+ ck.update () ;
+ total_time += ck.getDeltaTime () ;
+ nframes++ ;
+
+ if ( nframes == 100 )
+ {
+ fprintf ( stderr, "Avg PSL Interp time = %fs.\n", total_time / nframes ) ;
+ nframes = 0 ;
+ total_time = 0.0 ;
+ }
}
|