|
From: <mk...@us...> - 2003-04-18 12:07:04
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin
In directory sc8-pr-cvs1:/tmp/cvs-serv16051
Modified Files:
CSPSim.py
Added Files:
TestObjects.py
Log Message:
see CHANGES.current
--- NEW FILE: TestObjects.py ---
import SimData
def create(app):
v = SimData.Vector3
vehicle = app.createVehicle
vehicle("sim:vehicles.aircraft.m2k", v(483010, 499010, 190.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0))
vehicle("sim:vehicles.aircraft.m2k", v(483025, 499015, 190.2), v(0, 100.0, 0), v(5.0, 0.0, 240.0))
vehicle("sim:vehicles.aircraft.m2k", v(483040, 499020, 190.2), v(0, 100.0, 0), v(8.0, 1.0, 240.0))
vehicle("sim:vehicles.aircraft.m2k", v(483055, 499025, 190.2), v(0, 100.0, 0), v(12.0, 3.0, 240.0))
Index: CSPSim.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/CSPSim.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CSPSim.py 11 Apr 2003 18:59:18 -0000 1.2
--- CSPSim.py 18 Apr 2003 12:07:00 -0000 1.3
***************
*** 1,5 ****
#!/usr/bin/python -O
! import sys, os.path
#import Shell
--- 1,5 ----
#!/usr/bin/python -O
! import sys, os, os.path
#import Shell
***************
*** 10,13 ****
--- 10,18 ----
sys.setdlopenflags(0x101)
+ # is the SDL joystick environment variable isn't set, try a standard value
+ if not os.environ.has_key("SDL_JOYSTICK_DEVICE"):
+ # try a reasonable default for linux
+ if os.path.exists("/dev/input/js0"):
+ os.environ["SDL_JOYSTICK_DEVICE"]="/dev/input/js0"
def printUsage():
***************
*** 36,39 ****
--- 41,53 ----
app = CSP.CSPSim()
app.init()
+
+ try:
+ import TestObjects
+ TestObjects.create(app)
+ except ImportError:
+ pass
+ except Exception, e:
+ print "Error in TestObjects.py:", e
+
app.setShell(Shell.Shell())
app.run()
|