[Plib-cvs] plib/demos/simon/src simon_api.cxx,NONE,1.1 Makefile,1.1,1.2 simon.cxx,1.1,1.2
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-09-14 20:52:45
|
Update of /cvsroot/plib/plib/demos/simon/src In directory usw-pr-cvs1:/tmp/cvs-serv22648/plib/demos/simon/src Modified Files: Makefile simon.cxx Added Files: simon_api.cxx Log Message: Fixed bug in PSL expression handler. --- NEW FILE: simon_api.cxx --- #include "simon.h" #include <plib/js.h> class siEntity ; static int siNextModel = 0 ; static bool siInitialised = false ; static ssgRoot *siScene = NULL ; static siEntity *siModels [ SI_MAX_MODELS ] ; class siEntity { protected: int handle ; char *name ; sgCoord pos ; sgCoord vel ; [...302 lines suppressed...] int siLoad ( char *filename ) { if ( ! siInitialised ) siInit () ; siModel *m = new siModel ( filename ) ; return m -> getHandle () ; } void siRun () { if ( ! siInitialised ) siInit () ; glutMainLoop () ; } Index: Makefile =================================================================== RCS file: /cvsroot/plib/plib/demos/simon/src/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 14 Sep 2002 19:50:29 -0000 1.1 +++ Makefile 14 Sep 2002 20:52:42 -0000 1.2 @@ -1,21 +1,28 @@ -SIMON = libsimon.a +SIMON = libsimon.a simon +LIBS = -lplibpsl -lplibssg -lplibsg -lplibul -lglut -lGLU -lGL -lpthread -L/usr/X11/lib -lX11 -lm all: ${SIMON} +simon : libsimon.a simon.o /usr/lib/libplibpsl.a + g++ -o simon simon.o libsimon.a ${LIBS} + simon.o : simon.cxx simon.h - g++ -o simon.o -c simon.cxx + g++ -I. -o simon.o -c simon.cxx -libsimon.a : simon.o - ar cru libsimon.a simon.o +simon_api.o : simon_api.cxx simon.h + g++ -o simon_api.o -c simon_api.cxx + +libsimon.a : simon_api.o + ar cru libsimon.a simon_api.o -install: libsimon.a simon.h +install: libsimon.a simon.h simon mkdir -p /usr/local/simon - cp libsimon.a simon.h /usr/local/simon + cp simon libsimon.a simon.h /usr/local/simon uninstall: rm -r /usr/local/simon clean: - rm -f libsimon.a *.o + rm -f simon libsimon.a *.o Index: simon.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/simon/src/simon.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- simon.cxx 14 Sep 2002 19:50:29 -0000 1.1 +++ simon.cxx 14 Sep 2002 20:52:42 -0000 1.2 @@ -1,341 +1,90 @@ -#include "simon.h" -#include <plib/js.h> - -class siEntity ; - -static int siNextModel = 0 ; -static bool siInitialised = false ; -static ssgRoot *siScene = NULL ; -static siEntity *siModels [ SI_MAX_MODELS ] ; - [...361 lines suppressed...] - return m -> getHandle () ; -} + pslResult res ; + do + { + res = prog -> step () ; -void siRun () -{ - if ( ! siInitialised ) - siInit () ; + } while ( res == PSL_PROGRAM_CONTINUE ) ; - glutMainLoop () ; + if ( res == PSL_PROGRAM_END ) + exit ( 0 ) ; } + |