You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2006-04-08 20:58:14
|
Author: mkrose Date: 2006-04-08 13:58:06 -0700 (Sat, 08 Apr 2006) New Revision: 1878 Removed: trunk/csp/csplib/net/NetLog.h Modified: trunk/csp/bin/sim.ini trunk/csp/csplib/util/Log.h trunk/csp/csplib/util/LogStream.cpp trunk/csp/csplib/util/LogStream.h trunk/csp/cspsim/CSPSim.cpp trunk/csp/cspsim/battlefield/LocalBattlefield.cpp Log: Move csp logstream static variable out of the inline log() method. The new implementation provides the same performance but allows the log to be shared across modules without being initialized multiple times. Remove NetLog and all remaining calls to SIMNET_LOG and netlog(). Remove the log filename configuration from the .ini file. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1878 Diff omitted (12873 bytes). |
From: <sv...@ww...> - 2006-04-08 20:49:03
|
Author: mkrose Date: 2006-04-08 13:48:54 -0700 (Sat, 08 Apr 2006) New Revision: 1877 Modified: trunk/csp/csplib/data/Date.cpp Log: Workaround for a date formatting bug in msvc runtime libraries. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1877 Modified: trunk/csp/csplib/data/Date.cpp =================================================================== --- trunk/csp/csplib/data/Date.cpp 2006-04-08 20:41:34 UTC (rev 1876) +++ trunk/csp/csplib/data/Date.cpp 2006-04-08 20:48:54 UTC (rev 1877) @@ -298,6 +298,7 @@ tm->tm_mday = getDay(); tm->tm_mon = getMonth() - 1; /* 0-11 goes in tm */ tm->tm_year = getYear() - 1900; /* X/Open says tm_year can be negative */ + tm->tm_year = std::max(0, tm->tm_year); /* but msvcrt's strftime can't handle negative years! */ weekday_t day = getWeekday(); if (day == 7) day = 0; /* struct tm wants days since Sunday, so Sunday is 0 */ |
From: <sv...@ww...> - 2006-04-08 20:41:40
|
Author: mkrose Date: 2006-04-08 13:41:34 -0700 (Sat, 08 Apr 2006) New Revision: 1876 Modified: trunk/csp/csplib/net/ClientServer.cpp trunk/csp/csplib/net/ClientServer.h trunk/csp/csplib/net/DispatchHandler.cpp trunk/csp/csplib/net/DispatchManager.cpp trunk/csp/csplib/net/MessageQueue.h trunk/csp/csplib/net/NetworkInterface.cpp trunk/csp/csplib/net/PeerInfo.cpp trunk/csp/csplib/net/PeerInfo.h trunk/csp/csplib/net/RecordCodec.cpp trunk/csp/csplib/net/ReliablePacket.h trunk/csp/csplib/net/RoutingHandler.cpp trunk/csp/csplib/net/StopWatch.h Log: Replace SIMNET_LOG with CSPLOG to unify log streams. NetLog.h will be removed in a subsequent change. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1876 Diff omitted (30797 bytes). |
From: <sv...@ww...> - 2006-04-08 20:38:50
|
Author: mkrose Date: 2006-04-08 13:38:41 -0700 (Sat, 08 Apr 2006) New Revision: 1875 Modified: trunk/csp/__init__.py trunk/csp/csplib/__init__.py trunk/csp/cspsim/__init__.py Log: Revert __init__ modules to use __path__ to access .bin. This method is much cleaner and can be made to work with py2exe. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1875 Modified: trunk/csp/__init__.py =================================================================== --- trunk/csp/__init__.py 2006-04-08 20:36:55 UTC (rev 1874) +++ trunk/csp/__init__.py 2006-04-08 20:38:41 UTC (rev 1875) @@ -44,3 +44,4 @@ os.environ['PATH'] = os.pathsep.join(path) _configureModules() + Modified: trunk/csp/csplib/__init__.py =================================================================== --- trunk/csp/csplib/__init__.py 2006-04-08 20:36:55 UTC (rev 1874) +++ trunk/csp/csplib/__init__.py 2006-04-08 20:38:41 UTC (rev 1875) @@ -15,14 +15,16 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - import exceptions import os.path import sys import types +# this path hack allows the csplib extension module to be loaded +# transparently from the .bin directory. extending rather than +# replacing __path__ is necessary for py2exe imports to work. bin = os.path.join(os.path.dirname(__file__), '.bin') -sys.path.insert(0, bin) +__path__.append(bin) try: import csplib as _csplib @@ -31,14 +33,13 @@ sys.stderr.write( """ Unable to import csplib.py from csp/csplib/.bin. This file and -and others needed by cspsim are generatedd during the build. +and others needed by cspsim are generated during the build. Check that all targets have been built successfully. See the README file for build instructions. """) sys.exit(1) from csplib import * -sys.path = sys.path[1:] version = _csplib.getVersion() Modified: trunk/csp/cspsim/__init__.py =================================================================== --- trunk/csp/cspsim/__init__.py 2006-04-08 20:36:55 UTC (rev 1874) +++ trunk/csp/cspsim/__init__.py 2006-04-08 20:38:41 UTC (rev 1875) @@ -4,8 +4,11 @@ import os import sys +# this path hack allows the cspsim extension module to be loaded +# transparently from the .bin directory. extending rather than +# replacing __path__ is necessary for py2exe imports to work. bin = os.path.join(os.path.dirname(__file__), '.bin') -sys.path.insert(0, bin) +__path__.append(bin) try: from cspsim import * @@ -14,11 +17,9 @@ sys.stderr.write( """ Unable to import cspsim.py from csp/cspsim/.bin. This file and -and others needed by cspsim are generatedd during the build. +and others needed by cspsim are generated during the build. Check that all targets have been built successfully. See the README file for build instructions. """) sys.exit(1) -sys.path = sys.path[1:] - |
From: <sv...@ww...> - 2006-04-08 20:37:02
|
Author: mkrose Date: 2006-04-08 13:36:55 -0700 (Sat, 08 Apr 2006) New Revision: 1874 Modified: trunk/csp/tools/hid/maps/gamescreen-core.map Log: Add keyboard support for changing the field of view (using SHIFT+KEYPAD_PLUS and SHIFT+KEYPAD_MINUS). Previously this could only be done with the mouse wheel. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1874 Modified: trunk/csp/tools/hid/maps/gamescreen-core.map =================================================================== --- trunk/csp/tools/hid/maps/gamescreen-core.map 2006-04-08 20:35:24 UTC (rev 1873) +++ trunk/csp/tools/hid/maps/gamescreen-core.map 2006-04-08 20:36:55 UTC (rev 1874) @@ -27,8 +27,6 @@ map key:CTRL-KP2 press CAMERA_PAN_DOWN map key:CTRL-KP2 release CAMERA_PAN_DOWN_STOP -map key:KP_PLUS press CAMERA_ZOOM_IN -map key:KP_PLUS release CAMERA_ZOOM_STOP map key:ESCAPE press QUIT map key:p press PAUSE map key:r press TOGGLE_RECORDER @@ -36,9 +34,15 @@ map key:F12 press STATS map key:HOME press CONSOLE map key:SPACE press CHANGE_VEHICLE + +map key:KP_PLUS press CAMERA_ZOOM_IN +map key:KP_PLUS release CAMERA_ZOOM_STOP map key:KP_MINUS press CAMERA_ZOOM_OUT map key:KP_MINUS release CAMERA_ZOOM_STOP +map key:SHIFT-KP_PLUS press CAMERA_FOV_STEP_DEC +map key:SHIFT-KP_MINUS press CAMERA_FOV_STEP_INC + map key:F1 press SPIN_THE_WORLD/B|SPIN_THE_WORLD_STOP/B map key:F2 press RESET_SPIN map key:o press PRINT_SCREEN |
From: <sv...@ww...> - 2006-04-08 20:35:32
|
Author: mkrose Date: 2006-04-08 13:35:24 -0700 (Sat, 08 Apr 2006) New Revision: 1873 Modified: trunk/csp/tools/build.py Log: Fix a bug in the external library configuration test that leaked library configuration settings into the build environment. Add explicit support for .lib testing in the devpack configuration. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1873 Modified: trunk/csp/tools/build.py =================================================================== --- trunk/csp/tools/build.py 2006-04-03 06:58:13 UTC (rev 1872) +++ trunk/csp/tools/build.py 2006-04-08 20:35:24 UTC (rev 1873) @@ -1042,6 +1042,7 @@ settings.merge(ExternalLibrary._save(conf.env, oldenv)) global_settings.merge(settings) self._settings = settings + conf.env = oldenv return valid def _addSettings(self, settings, bdeps): @@ -1137,10 +1138,13 @@ DevpackConfig.DEVPACK = path _Find = staticmethod(_Find) - def __init__(self, dlls, headers=[]): + def __init__(self, dlls=[], libs=[], headers=[]): if isinstance(dlls, str): dlls = [dlls] + if isinstance(libs, str): + libs = [libs] self._dlls = dlls + self._libs = libs self._headers = headers def configure(self, conf): @@ -1150,13 +1154,15 @@ for dll in self._dlls: self._checkPath(dp, 'usr', 'bin', dll + '.dll') self._checkPath(dp, 'usr', 'lib', dll + '.lib') + for lib in self._libs: + self._checkPath(dp, 'usr', 'lib', lib + '.lib') for header in self._headers: if isinstance(header, tuple): header = os.path.join(*header) self._checkPath(os.path.join(dp, 'usr', 'include', header)) conf.env.AppendUnique(CPPPATH=[os.path.join(dp, 'usr', 'include')]) conf.env.AppendUnique(LIBPATH=[os.path.join(dp, 'usr', 'lib')]) - conf.env.AppendUnique(LIBS=self._dlls) + conf.env.AppendUnique(LIBS=self._dlls + self._libs) return 1 |
From: <sv...@ww...> - 2006-04-03 06:58:21
|
Author: mkrose Date: 2006-04-02 23:58:13 -0700 (Sun, 02 Apr 2006) New Revision: 1872 Added: trunk/csp/cspsim/__init__.py Modified: trunk/csp/__init__.py trunk/csp/csplib/__init__.py Log: Clean up the module paths for generated modules, making them more consistent and hopefully more compatible with tools like modulefinder. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1872 Modified: trunk/csp/__init__.py =================================================================== --- trunk/csp/__init__.py 2006-04-02 08:08:21 UTC (rev 1871) +++ trunk/csp/__init__.py 2006-04-03 06:58:13 UTC (rev 1872) @@ -16,20 +16,31 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - import sys import os dir = os.path.abspath(__path__[0]) -# bring compiled modules into the csp package -__path__.insert(0, os.path.join(dir, 'cspsim', '.bin')) - -def initDynamicLoading(): - """Enable lazy loading of shared library modules if available""" +def _configureModules(): if os.name == 'posix': - import dl - sys.setdlopenflags(dl.RTLD_GLOBAL|dl.RTLD_LAZY) + try: + import dl + # enable lazy loading of shared library modules if available. + sys.setdlopenflags(dl.RTLD_GLOBAL|dl.RTLD_LAZY) + except ImportError: + sys.stderr.write('import dl failed; lazy module loading not enabled.\n') + else: + # if CSPDEVPACK is defined in the environment, add the devpack bin + # directory to the execution path. this ensures that devpack libraries + # will be found before other (potentially incompatible) versions of the + # same libraries. note that windows is currently the only system with + # a devpack. + devpack = os.environ.get('CSPDEVPACK') + if devpack: + bin = os.path.join(devpack, 'usr', 'bin') + path = [bin] + if 'PATH' in os.environ: + path.append(os.environ.get('PATH')) + os.environ['PATH'] = os.pathsep.join(path) -initDynamicLoading() - +_configureModules() Modified: trunk/csp/csplib/__init__.py =================================================================== --- trunk/csp/csplib/__init__.py 2006-04-02 08:08:21 UTC (rev 1871) +++ trunk/csp/csplib/__init__.py 2006-04-03 06:58:13 UTC (rev 1872) @@ -24,8 +24,21 @@ bin = os.path.join(os.path.dirname(__file__), '.bin') sys.path.insert(0, bin) -import csplib as _csplib +try: + import csplib as _csplib +except ImportError, e: + sys.stderr.write(str(e)) + sys.stderr.write( +""" +Unable to import csplib.py from csp/csplib/.bin. This file and +and others needed by cspsim are generatedd during the build. +Check that all targets have been built successfully. See the +README file for build instructions. +""") + sys.exit(1) + from csplib import * +sys.path = sys.path[1:] version = _csplib.getVersion() Added: trunk/csp/cspsim/__init__.py =================================================================== --- trunk/csp/cspsim/__init__.py 2006-04-02 08:08:21 UTC (rev 1871) +++ trunk/csp/cspsim/__init__.py 2006-04-03 06:58:13 UTC (rev 1872) @@ -0,0 +1,24 @@ +# Wrapper for csp/cspsim/.bin/cspsim.py, which is generated by +# SWIG during the build. + +import os +import sys + +bin = os.path.join(os.path.dirname(__file__), '.bin') +sys.path.insert(0, bin) + +try: + from cspsim import * +except ImportError, e: + sys.stderr.write(str(e)) + sys.stderr.write( +""" +Unable to import cspsim.py from csp/cspsim/.bin. This file and +and others needed by cspsim are generatedd during the build. +Check that all targets have been built successfully. See the +README file for build instructions. +""") + sys.exit(1) + +sys.path = sys.path[1:] + |
From: <sv...@ww...> - 2006-04-02 08:08:29
|
Author: mkrose Date: 2006-04-02 00:08:21 -0800 (Sun, 02 Apr 2006) New Revision: 1871 Modified: trunk/csp/data/models/airbase/lightpylon/lightpylon.osg Log: Fix lighting under OSG 1.0 caused by a stray light node in one of the airbase models. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1871 Modified: trunk/csp/data/models/airbase/lightpylon/lightpylon.osg =================================================================== --- trunk/csp/data/models/airbase/lightpylon/lightpylon.osg 2006-04-02 08:06:15 UTC (rev 1870) +++ trunk/csp/data/models/airbase/lightpylon/lightpylon.osg 2006-04-02 08:08:21 UTC (rev 1871) @@ -9,7 +9,7 @@ rendering_hint DEFAULT_BIN renderBinMode INHERIT GL_LIGHTING ON - GL_LIGHT0 ON + GL_LIGHT2 ON } referenceFrame RELATIVE Matrix { @@ -15465,12 +15465,12 @@ DataVariance STATIC rendering_hint DEFAULT_BIN renderBinMode INHERIT - GL_LIGHT0 ON + GL_LIGHT2 ON } referenceFrame RELATIVE Light { DataVariance STATIC - light_num 0 + light_num 2 ambient 0.05 0.05 0.05 1 diffuse 4.90196 4.92157 4.33333 1 specular 4.90196 4.92157 4.33333 1 |
From: <sv...@ww...> - 2006-04-02 08:06:22
|
Author: mkrose Date: 2006-04-02 00:06:15 -0800 (Sun, 02 Apr 2006) New Revision: 1870 Modified: trunk/csp/csplib/util/StringTools.h Log: Fix compiler warning under vc++. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1870 Modified: trunk/csp/csplib/util/StringTools.h =================================================================== --- trunk/csp/csplib/util/StringTools.h 2006-04-02 08:04:49 UTC (rev 1869) +++ trunk/csp/csplib/util/StringTools.h 2006-04-02 08:06:15 UTC (rev 1870) @@ -85,7 +85,7 @@ class CSPLIB_EXPORT FormatArg { public: class stringbuf; - class formatspec; + struct formatspec; FormatArg(int x): x_type(TYPE_INT) { x_val.i = x; } FormatArg(unsigned x): x_type(TYPE_UINT) { x_val.ui = x; } |
From: <sv...@ww...> - 2006-04-02 08:04:57
|
Author: mkrose Date: 2006-04-02 00:04:49 -0800 (Sun, 02 Apr 2006) New Revision: 1869 Modified: trunk/csp/csplib/data/LUT.cpp trunk/csp/csplib/data/LUT.h Log: Fix memory corruption in LUT code under GCC 3.4/4.0 related to const reference initialization from temporary objects. Both the bug and the fix are disturbingly subtle, although the impact on the flight model was quite noticeable. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1869 Modified: trunk/csp/csplib/data/LUT.cpp =================================================================== --- trunk/csp/csplib/data/LUT.cpp 2006-04-02 05:57:19 UTC (rev 1868) +++ trunk/csp/csplib/data/LUT.cpp 2006-04-02 08:04:49 UTC (rev 1869) @@ -22,6 +22,7 @@ */ #include <csp/csplib/data/LUT.h> +#include <csp/csplib/util/Log.h> #include <sstream> @@ -29,6 +30,21 @@ CSP_NAMESPACE +// GCC 3.4 and up require a copy constructor for const references to temporaries, +// even if the constructor is optimized away. In fact we want this ctor to always +// be optimized away since the copying the vector elements is expensive. Worse, +// the correct implementation of the copy constructor isn't obvious because of the +// way m_Vp is shared. So we punt and log a fatal error if this ctor is called. +template <int N, typename T> +VEC<N,T>::VEC(VEC const &other): m_Vp(other.m_Vp), m_N(other.m_N) { + CSPLOG(FATAL, NUMERIC) << "VEC copy constructor called\n"; + // best effort implementation, not correct in all cases: + //if (other.m_Vp == other.m_Vec) { + // for (int i = 0; i < m_N; ++i) m_Vec[i] = other.m_Vec[i]; + //} +} + + /** * Second derivative calculation for natural cubic spline * Modified: trunk/csp/csplib/data/LUT.h =================================================================== --- trunk/csp/csplib/data/LUT.h 2006-04-02 05:57:19 UTC (rev 1868) +++ trunk/csp/csplib/data/LUT.h 2006-04-02 08:04:49 UTC (rev 1869) @@ -82,6 +82,11 @@ } } + // GCC 3.4 and up require a copy constructor for const references to temporaries, + // even if the constructor is optimized away. This optimization should occur in + // all cases, so this ctor simply aborts if called. + VEC(VEC const &other); + /** Partial constructor. See operator() for details. */ template <class Y> @@ -448,6 +453,8 @@ public: /** An integer array type for dimensioning the table */ typedef VEC<N, int> Dim; + /** An integer array type for dimensioning a child table */ + typedef VEC<N-1, int> ChildDim; /** A floating point array for specifying table coordinates */ typedef VEC<N, X> Vec; /** An array of breakpoint sets for specifying the input data coordinates */ @@ -508,7 +515,6 @@ return getValue(Vec(x)); } - /** Lookup the value at a given point in the table. * * This method returns a WRAP instance which allows further coordinates to |
From: <sv...@ww...> - 2006-04-02 05:57:28
|
Author: mkrose Date: 2006-04-01 21:57:19 -0800 (Sat, 01 Apr 2006) New Revision: 1868 Modified: trunk/csp/cspsim/f16/MultiFunctionDisplay.cpp trunk/csp/cspsim/f16/MultiFunctionDisplay.h trunk/csp/modules/demeter/DemeterDrawable.h Log: Add missing include in demeter. Fix compiler warnings in cspsim/f16. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1868 Modified: trunk/csp/cspsim/f16/MultiFunctionDisplay.cpp =================================================================== --- trunk/csp/cspsim/f16/MultiFunctionDisplay.cpp 2006-03-16 08:13:58 UTC (rev 1867) +++ trunk/csp/cspsim/f16/MultiFunctionDisplay.cpp 2006-04-02 05:57:19 UTC (rev 1868) @@ -356,6 +356,9 @@ } +TextPlacement::~TextPlacement() { +} + BasePage::BasePage(DisplayLayout *layout): m_Layout(layout), m_Group(new osg::Group) { CSP_VERIFY(layout); } Modified: trunk/csp/cspsim/f16/MultiFunctionDisplay.h =================================================================== --- trunk/csp/cspsim/f16/MultiFunctionDisplay.h 2006-03-16 08:13:58 UTC (rev 1867) +++ trunk/csp/cspsim/f16/MultiFunctionDisplay.h 2006-04-02 05:57:19 UTC (rev 1868) @@ -103,6 +103,7 @@ class TextPlacement { public: virtual void get(DisplayLayout *layout, double &x, double &y, osgText::Text::AlignmentType &alignment) const = 0; + virtual ~TextPlacement(); }; class PlaceOSB: public TextPlacement { Modified: trunk/csp/modules/demeter/DemeterDrawable.h =================================================================== --- trunk/csp/modules/demeter/DemeterDrawable.h 2006-03-16 08:13:58 UTC (rev 1867) +++ trunk/csp/modules/demeter/DemeterDrawable.h 2006-04-02 05:57:19 UTC (rev 1868) @@ -24,6 +24,7 @@ #include <osg/Drawable> +#include <osg/Geode> #include <osg/Version> // OSG_VERSION_MAJOR was first defined in 0.9.9. |
From: <sv...@ww...> - 2006-03-16 08:14:09
|
Author: mkrose Date: 2006-03-16 00:13:58 -0800 (Thu, 16 Mar 2006) New Revision: 1867 Modified: trunk/csp/cspsim/SceneConstants.h trunk/csp/cspsim/VirtualScene.cpp trunk/csp/cspsim/VirtualScene.h Log: Add scene mask bits for the near and far sceneviews to allow the canopy model to be switched from pit reflections in the internal view to scene reflections in external views. This is a simple solution, but a better approach would probably use an Animation subclass to switch nodes on or off depending on bus channels. This would allow the visible model to be specialized for different stations. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1867 Modified: trunk/csp/cspsim/SceneConstants.h =================================================================== --- trunk/csp/cspsim/SceneConstants.h 2006-03-09 05:34:49 UTC (rev 1866) +++ trunk/csp/cspsim/SceneConstants.h 2006-03-16 08:13:58 UTC (rev 1867) @@ -29,13 +29,34 @@ CSP_NAMESPACE +/** NodeVisitor traversal mask bits that are set when rendering the scene. + * + * UPDATE_ONLY - set during the update traversal. + * CULL_ONLY - set during the cull traversal. + * LABELS - set only if labels are turned on. + * NEAR - set for traversals of the near scene graph. + * FAR - set for traversals of all far scene graphs. + * + * For example, the NEAR mask bit is used to enable rendering of canopy + * reflections in internal views by setting the node mask of a canopy model + * with a cockpit reflection texture map to NEAR. That node is culled in + * external views, and a second canopy model with node mask FAR and an + * environmental reflection texture map is rendered instead. + * + * Note that the OSG enables a node if there is any overlap between the node + * mask and the traversal mask. So for example, there is no way to set a node + * mask such that a node is only enabled for update traversals (UPDATE_ONLY) + * that occur in the near scene graph (NEAR). + */ class SceneMasks { public: typedef enum { UPDATE_ONLY = 0x0001, CULL_ONLY = 0x0002, NORMAL = 0x0003, - LABELS = 0x0100 + LABELS = 0x0100, + NEAR = 0x200, + FAR = 0x400 } NodeMask; }; Modified: trunk/csp/cspsim/VirtualScene.cpp =================================================================== --- trunk/csp/cspsim/VirtualScene.cpp 2006-03-09 05:34:49 UTC (rev 1866) +++ trunk/csp/cspsim/VirtualScene.cpp 2006-03-16 08:13:58 UTC (rev 1867) @@ -292,7 +292,7 @@ createInfoView(); } -osgUtil::SceneView *VirtualScene::makeSceneView() { +osgUtil::SceneView *VirtualScene::makeSceneView(unsigned mask) { osgUtil::SceneView *sv = new osgUtil::SceneView(m_DisplaySettings.get()); sv->setDefaults(osgUtil::SceneView::COMPILE_GLOBJECTS_AT_INIT); sv->setViewport(0, 0, m_ScreenWidth, m_ScreenHeight); @@ -307,21 +307,21 @@ sv->getCullVisitor()->setImpostorsActive(true); sv->getCullVisitor()->setComputeNearFarMode(osgUtil::CullVisitor::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES); sv->getCullVisitor()->setCullingMode(osgUtil::CullVisitor::ENABLE_ALL_CULLING); - sv->setCullMask(SceneMasks::CULL_ONLY | SceneMasks::NORMAL); + sv->setCullMask(SceneMasks::CULL_ONLY | SceneMasks::NORMAL | mask); // default update settings - sv->getUpdateVisitor()->setTraversalMask(SceneMasks::UPDATE_ONLY | SceneMasks::NORMAL); + sv->getUpdateVisitor()->setTraversalMask(SceneMasks::UPDATE_ONLY | SceneMasks::NORMAL | mask); return sv; } void VirtualScene::createVeryFarView() { - m_VeryFarView = makeSceneView(); + m_VeryFarView = makeSceneView(SceneMasks::FAR); m_VeryFarGroup = new osg::Group; m_VeryFarGroup->setName("very_far_group"); m_VeryFarView->setSceneData(m_VeryFarGroup.get()); } void VirtualScene::createFarView() { - m_FarView = makeSceneView(); + m_FarView = makeSceneView(SceneMasks::FAR); // clear the depth buffer (but not the color buffer) m_FarView->getRenderStage()->setClearMask(GL_DEPTH_BUFFER_BIT); m_FarGroup = new osg::Group; @@ -330,7 +330,7 @@ } void VirtualScene::createNearView() { - m_NearView = makeSceneView(); + m_NearView = makeSceneView(SceneMasks::NEAR); // clear the depth buffer (but not the color buffer) m_NearView->getRenderStage()->setClearMask(GL_DEPTH_BUFFER_BIT); m_NearView->getCullVisitor()->setImpostorsActive(false); @@ -340,7 +340,7 @@ } void VirtualScene::createInfoView() { - m_InfoView = makeSceneView(); + m_InfoView = makeSceneView(0); // clear the depth buffer (but not the color buffer) m_InfoView->getRenderStage()->setClearMask(GL_DEPTH_BUFFER_BIT); Modified: trunk/csp/cspsim/VirtualScene.h =================================================================== --- trunk/csp/cspsim/VirtualScene.h 2006-03-09 05:34:49 UTC (rev 1866) +++ trunk/csp/cspsim/VirtualScene.h 2006-03-16 08:13:58 UTC (rev 1867) @@ -167,7 +167,7 @@ int _getFeatureTileIndex(Ref<FeatureGroup> feature) const; void _updateOrigin(Vector3 const &origin); - osgUtil::SceneView *makeSceneView(); + osgUtil::SceneView *makeSceneView(unsigned mask); void init(); void createSceneViews(); |
From: <sv...@ww...> - 2006-03-09 05:34:56
|
Author: mkrose Date: 2006-03-08 21:34:49 -0800 (Wed, 08 Mar 2006) New Revision: 1866 Removed: trunk/csp/modules/chunklod/RegisterCombinerDetails.cpp Modified: trunk/csp/modules/chunklod/ChunkLod trunk/csp/modules/chunklod/ChunkLod.cpp trunk/csp/modules/chunklod/ChunkLodDrawable trunk/csp/modules/chunklod/ChunkLodDrawable.cpp trunk/csp/modules/chunklod/ChunkLodLoader trunk/csp/modules/chunklod/ChunkLodLoader.cpp trunk/csp/modules/chunklod/MmapFile trunk/csp/modules/chunklod/MultiTextureDetails trunk/csp/modules/chunklod/RayStrip trunk/csp/modules/chunklod/RayStrip.cpp trunk/csp/modules/chunklod/SConscript trunk/csp/modules/chunklod/TextureQuadTree trunk/csp/modules/chunklod/TextureQuadTree.cpp Log: Cleanup chunklod code and fix a few warnings. Add some (very rough) code to test glsl vertex and fragment shaders. More to come. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1866 Diff omitted (131138 bytes). |
From: <sv...@ww...> - 2006-02-19 04:03:51
|
Author: mkrose Date: 2006-02-18 20:03:43 -0800 (Sat, 18 Feb 2006) New Revision: 1865 Modified: trunk/csp/demo/win/makedemo.py Log: Update makedemo.py for the new directory layout. The changes are untested, and some tweaking of the module search paths will probably be needed to make py2exe work. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1865 Modified: trunk/csp/demo/win/makedemo.py =================================================================== --- trunk/csp/demo/win/makedemo.py 2006-02-19 03:57:11 UTC (rev 1864) +++ trunk/csp/demo/win/makedemo.py 2006-02-19 04:03:43 UTC (rev 1865) @@ -21,23 +21,30 @@ named %(DEMO)s.zip. """ -import CSP -import CSP.SimData -import CSP.CSPSim +# redirect csp log output if not otherwise specified. +os.environ.setdefault('CSPLOG_FILE', 'makedemo.log') -BASE = os.path.dirname(CSP.__file__) -CSPSIM_DATA = os.path.join(BASE, 'CSPSim', 'Data') -CSPSIM_BIN = os.path.join(BASE, 'CSPSim', 'Bin') -CSPSIM_BIN_SOURCE = os.path.join(BASE, 'CSPSim', '.bin', 'Source') -SIMDATA = os.path.join(BASE, 'SimData') +import csp +import csp.csplib +import csp.cspsim -sys.path.append(CSPSIM_BIN) +BASE = os.path.dirname(csp.__file__) +DATA = os.path.join(BASE, 'data') +BIN = os.path.join(BASE, 'bin') +# not sure which if any of these and the AddPackagePath statements below are +# needed for the new directory structure. some experimentation will probably +# be necessary. + +#CSPLIB = os.path.join(BASE, 'csplib') +#CSPSIM_BIN = os.path.join(BASE, 'cspsim', '.bin') +#sys.path.append(CSPSIM_BIN) + try: import modulefinder - modulefinder.AddPackagePath('CSP.CSPSim', CSPSIM_BIN) - modulefinder.AddPackagePath('CSP.CSPSim', CSPSIM_BIN_SOURCE) - modulefinder.AddPackagePath('CSP', SIMDATA) + #modulefinder.AddPackagePath('csp.cspsim', BIN) + #modulefinder.AddPackagePath('csp.cspsim', CSPSIM_BIN) + #modulefinder.AddPackagePath('csp', CSPLIB) except ImportError: print 'WARNING: unable to import modulefinder' @@ -76,8 +83,8 @@ def make_demo(version): - TEMPLATE = 'CSPSim-Demo' - DEMO = 'CSPSim-Demo-%s' % version + TEMPLATE = 'template' + DEMO = 'cspsim-demo-%s' % version if not os.path.exists(TEMPLATE): error('%s not found!' % TEMPLATE) @@ -88,25 +95,25 @@ print 'Copying data from %s to %s' % (TEMPLATE, DEMO) copy_tree(TEMPLATE, DEMO, exclude=r'^\.svn$') - DIST_DIR = os.path.join(DEMO, 'Bin') + DIST_DIR = os.path.join(DEMO, 'bin') print 'Running py2exe to create %s' % DIST_DIR opts = { 'py2exe': { - 'excludes': ['SimData', 'dl'], + 'excludes': ['dl'], 'dist_dir': DIST_DIR } } - TARGET = os.path.join(CSPSIM_BIN, 'CSPSim.py') - CONFIG = os.path.join(CSPSIM_DATA, 'CSPSim.ini') + TARGET = os.path.join(BIN, 'sim.py') + CONFIG = os.path.join(BIN, 'sim.ini') setup(options=opts, console=[TARGET], data_files=[CONFIG]) - DATA_TARGET = os.path.join(DEMO, 'Data') + DATA_TARGET = os.path.join(DEMO, 'data') if not os.path.exists(DATA_TARGET): - print 'Copying data from %s to %s' % (CSPSIM_DATA, DATA_TARGET) - copy_tree(CSPSIM_DATA, DATA_TARGET, exclude=r'^\.svn$') + print 'Copying data from %s to %s' % (DATA, DATA_TARGET) + copy_tree(DATA, DATA_TARGET, exclude=r'^\.svn$') print 'Writing README header' README = os.path.join(DEMO, 'README') |
From: <sv...@ww...> - 2006-02-19 03:57:17
|
Author: mkrose Date: 2006-02-18 19:57:11 -0800 (Sat, 18 Feb 2006) New Revision: 1864 Added: trunk/csp/demo/win/template/ Log: Copy branches/unrefactored/CSP/CSPSim/Demo/Win/CSPSim-Demo to trunk. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1864 Copied: trunk/csp/demo/win/template (from rev 1863, branches/unrefactored/CSP/CSPSim/Demo/Win/CSPSim-Demo) |
From: <sv...@ww...> - 2006-02-19 03:56:19
|
Author: mkrose Date: 2006-02-18 19:56:12 -0800 (Sat, 18 Feb 2006) New Revision: 1863 Removed: trunk/csp/demo/win/template/ Log: Actually, remove template directory so that it can be copied directly from branches/unrefactored. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1863 |
From: <sv...@ww...> - 2006-02-19 03:54:10
|
Author: mkrose Date: 2006-02-18 19:54:01 -0800 (Sat, 18 Feb 2006) New Revision: 1862 Added: trunk/csp/demo/win/template/ Log: Add demo template directory for windows. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1862 |
From: <sv...@ww...> - 2006-02-19 03:41:15
|
Author: mkrose Date: 2006-02-18 19:41:08 -0800 (Sat, 18 Feb 2006) New Revision: 1861 Added: trunk/csp/demo/win/makedemo.py Log: Initial copy of makedemo.py to the new directory layout. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1861 Copied: trunk/csp/demo/win/makedemo.py (from rev 1860, branches/unrefactored/CSP/CSPSim/Demo/Win/makedemo.py) |
From: <sv...@ww...> - 2006-02-19 03:39:50
|
Author: mkrose Date: 2006-02-18 19:39:42 -0800 (Sat, 18 Feb 2006) New Revision: 1860 Added: trunk/csp/demo/ trunk/csp/demo/win/ Log: Setup directories to port demo scripts and data from csp/branches/unrefactored/. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1860 |
From: <sv...@ww...> - 2006-01-30 21:37:02
|
Author: stormbringer Date: 2006-01-30 13:36:55 -0800 (Mon, 30 Jan 2006) New Revision: 1859 Modified: trunk/csp/cspsim/sound/SoundEffect.cpp Log: Added a header to make code compile under Windows Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1859 Modified: trunk/csp/cspsim/sound/SoundEffect.cpp =================================================================== --- trunk/csp/cspsim/sound/SoundEffect.cpp 2006-01-30 21:35:06 UTC (rev 1858) +++ trunk/csp/cspsim/sound/SoundEffect.cpp 2006-01-30 21:36:55 UTC (rev 1859) @@ -29,6 +29,7 @@ #include <csp/csplib/util/Log.h> #include <osgAL/SoundState> +#include <csp/csplib/util/undef.h> #include <cassert> |
From: <sv...@ww...> - 2006-01-30 21:35:20
|
Author: stormbringer Date: 2006-01-30 13:35:06 -0800 (Mon, 30 Jan 2006) New Revision: 1858 Modified: trunk/csp/cspsim/f16/StoresManagementPages.cpp Log: Small change to make code compile with Windows' math.h Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1858 Modified: trunk/csp/cspsim/f16/StoresManagementPages.cpp =================================================================== --- trunk/csp/cspsim/f16/StoresManagementPages.cpp 2006-01-29 22:36:33 UTC (rev 1857) +++ trunk/csp/cspsim/f16/StoresManagementPages.cpp 2006-01-30 21:35:06 UTC (rev 1858) @@ -622,7 +622,7 @@ if (index == 1) { if (!m_Current.empty()) { double value = std::min(entry.high, std::max<unsigned>(entry.low, atoi(m_Current.c_str()))); - entry.value = value / pow(10.0, entry.decimal); + entry.value = value / pow(10.0, (double)entry.decimal); m_Current = ""; formatOutput(m_Index); } |
From: <sv...@ww...> - 2006-01-29 22:37:10
|
Author: mkrose Date: 2006-01-29 14:36:33 -0800 (Sun, 29 Jan 2006) New Revision: 1857 Modified: trunk/csp/cspsim/CSPSim.cpp trunk/csp/cspsim/Engine.cpp trunk/csp/cspsim/sound/Sample.cpp trunk/csp/cspsim/sound/SoundEngine.cpp trunk/csp/cspsim/sound/SoundModel.cpp Log: Add undef.h includes to eliminate Windows.h macro pollution when including osgAL and openalpp headers. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1857 Modified: trunk/csp/cspsim/CSPSim.cpp =================================================================== --- trunk/csp/cspsim/CSPSim.cpp 2006-01-29 21:50:06 UTC (rev 1856) +++ trunk/csp/cspsim/CSPSim.cpp 2006-01-29 22:36:33 UTC (rev 1857) @@ -85,6 +85,7 @@ #include <SDL/SDL.h> #include <SDL/SDL_joystick.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE Modified: trunk/csp/cspsim/Engine.cpp =================================================================== --- trunk/csp/cspsim/Engine.cpp 2006-01-29 21:50:06 UTC (rev 1856) +++ trunk/csp/cspsim/Engine.cpp 2006-01-29 22:36:33 UTC (rev 1857) @@ -37,6 +37,7 @@ #include <csp/csplib/data/ObjectInterface.h> #include <osgAL/SoundState> +#include <csp/csplib/util/undef.h> #include <iomanip> #include <sstream> Modified: trunk/csp/cspsim/sound/Sample.cpp =================================================================== --- trunk/csp/cspsim/sound/Sample.cpp 2006-01-29 21:50:06 UTC (rev 1856) +++ trunk/csp/cspsim/sound/Sample.cpp 2006-01-29 22:36:33 UTC (rev 1857) @@ -31,6 +31,7 @@ #include <osgAL/SoundState> #include <openalpp/sample.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE Modified: trunk/csp/cspsim/sound/SoundEngine.cpp =================================================================== --- trunk/csp/cspsim/sound/SoundEngine.cpp 2006-01-29 21:50:06 UTC (rev 1856) +++ trunk/csp/cspsim/sound/SoundEngine.cpp 2006-01-29 22:36:33 UTC (rev 1857) @@ -27,6 +27,7 @@ #include <osgAL/SoundManager> #include <osgAL/SoundRoot> +#include <csp/csplib/util/undef.h> #include <cassert> Modified: trunk/csp/cspsim/sound/SoundModel.cpp =================================================================== --- trunk/csp/cspsim/sound/SoundModel.cpp 2006-01-29 21:50:06 UTC (rev 1856) +++ trunk/csp/cspsim/sound/SoundModel.cpp 2006-01-29 22:36:33 UTC (rev 1857) @@ -33,6 +33,7 @@ #include <osg/MatrixTransform> #include <osgAL/SoundNode> #include <osgAL/SoundState> +#include <csp/csplib/util/undef.h> #include <cassert> |
From: <sv...@ww...> - 2006-01-29 21:50:15
|
Author: mkrose Date: 2006-01-29 13:50:06 -0800 (Sun, 29 Jan 2006) New Revision: 1856 Added: trunk/csp/cspsim/sound/ trunk/csp/cspsim/sound/Loader.cpp trunk/csp/cspsim/sound/Loader.h trunk/csp/cspsim/sound/OggLoader.cpp trunk/csp/cspsim/sound/Sample.cpp trunk/csp/cspsim/sound/Sample.h trunk/csp/cspsim/sound/SoundEffect.cpp trunk/csp/cspsim/sound/SoundEffect.h trunk/csp/cspsim/sound/SoundEngine.cpp trunk/csp/cspsim/sound/SoundEngine.h trunk/csp/cspsim/sound/SoundModel.cpp trunk/csp/cspsim/sound/SoundModel.h Removed: trunk/csp/csplib/sound/ trunk/csp/cspsim/SoundEffect.cpp trunk/csp/cspsim/SoundEffect.h trunk/csp/cspsim/SoundEngine.cpp trunk/csp/cspsim/SoundEngine.h trunk/csp/cspsim/SoundModel.cpp trunk/csp/cspsim/SoundModel.h trunk/csp/cspsim/sound/Loader.cpp trunk/csp/cspsim/sound/Loader.h trunk/csp/cspsim/sound/OggLoader.cpp trunk/csp/cspsim/sound/Sample.cpp trunk/csp/cspsim/sound/Sample.h Modified: trunk/csp/csplib/SConscript trunk/csp/cspsim/CSPSim.cpp trunk/csp/cspsim/Engine.cpp trunk/csp/cspsim/ObjectModel.h trunk/csp/cspsim/ResourceBundle.cpp trunk/csp/cspsim/SConscript trunk/csp/cspsim/System.cpp trunk/csp/cspsim/System.h trunk/csp/cspsim/SystemsModel.cpp trunk/csp/cspsim/VirtualScene.cpp trunk/csp/cspsim/f16/F16System.cpp Log: Move sound functions from csplib to cspsim. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1856 Diff omitted (69887 bytes). |
From: <sv...@ww...> - 2006-01-29 20:54:18
|
Author: mkrose Date: 2006-01-29 12:54:09 -0800 (Sun, 29 Jan 2006) New Revision: 1855 Modified: trunk/csp/__init__.py trunk/csp/tools/csp.bootstrap Log: Bootstrap loader improvements. Eliminates sys.path hacks that were used to detect import failures. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1855 Modified: trunk/csp/__init__.py =================================================================== --- trunk/csp/__init__.py 2006-01-22 22:16:05 UTC (rev 1854) +++ trunk/csp/__init__.py 2006-01-29 20:54:09 UTC (rev 1855) @@ -19,15 +19,7 @@ import sys import os -import os.path -# ugly kludge to allow us to import dl. the bootstrap loader removes the -# original contents of sys.path, and stashes the full path in sys.CSP_PATH. -# if it has been set we restore the path here and clear the sys attribute. -if len(sys.path) == 1 and hasattr(sys, 'CSP_PATH'): - sys.path = sys.CSP_PATH - del sys.CSP_PATH - dir = os.path.abspath(__path__[0]) # bring compiled modules into the csp package Modified: trunk/csp/tools/csp.bootstrap =================================================================== --- trunk/csp/tools/csp.bootstrap 2006-01-22 22:16:05 UTC (rev 1854) +++ trunk/csp/tools/csp.bootstrap 2006-01-29 20:54:09 UTC (rev 1855) @@ -28,60 +28,44 @@ import os import sys -BOOTSTRAP_VERSION = 2 +BOOTSTRAP_VERSION = 3 -# save the path -old_path = sys.path[:] +# prevent recursive imports if the real csp module isn't found. +if not sys.modules.get('csp_bootstrap'): -# remove this module from sys.modules -self = sys.modules['csp'] -del sys.modules['csp'] + # rename this module to 'csp_bootstrap' in sys.modules, making room for the real csp module. + self = sys.modules['csp'] + del sys.modules['csp'] + sys.modules['csp_bootstrap'] = self -# note that we use os.sep and normal string splitting/joining instead -# of os.path.split/join since the latter behaves a bit strangely under -# windows. for example, os.path.split('c:\\csp') gives ['c:\\csp'] -# rather than ['c:', 'csp']. actually, neither one is ideal ;-) + # note that we use os.sep and normal string splitting/joining instead + # of os.path.split/join since the latter behaves a bit strangely under + # windows. for example, os.path.split('c:\\csp') gives ['c:\\csp'] + # rather than ['c:', 'csp']. actually, neither one is ideal ;-) -# look for the root of the current workspace (first 'csp' directory -# above cwd). -cwd = os.getcwd() -parts = cwd.split(os.sep) -if not 'csp' in parts: - print - print 'Error: trying to import csp from outside of a workspace.' - print 'Current working directory is %s' % cwd - sys.exit(1) -while parts[-1].lower() != 'csp': - parts = parts[:-1] + # look for the root of the current workspace (first 'csp' directory + # above cwd). + cwd = os.getcwd() + parts = cwd.split(os.sep) + if not 'csp' in parts: + raise ImportError, 'Trying to import csp from outside of a workspace (current working directory is "%s")' % cwd + while parts[-1].lower() != 'csp': + parts = parts[:-1] -CSP_PATH = os.sep.join(parts[:-1]) -ROOT = os.sep.join([CSP_PATH, 'csp']) + CSP_PATH = os.sep.join(parts[:-1]) + ROOT = os.sep.join([CSP_PATH, 'csp']) -if not os.path.exists(os.sep.join([ROOT, '.svn'])): - print - print 'Warning: %s does not contain .svn and may not be a valid CSP workspace.' % ROOT + if not os.path.exists(os.sep.join([ROOT, '.svn'])): + print 'Warning: %s does not contain .svn.' % ROOT -# load the real csp package. we strip away the original sys.path to -# prevent this module from being loaded recursively on failure. the -# only problem is that the real csp package __init__ needs to the -# full path to import dl. the expedient (but ugly, ugly) workaround -# is to cache the full path in sys.CSP_PATH, which the csp module -# uses to restore the full path (after which it deletes sys.CSP_PATH). -sys.path = [CSP_PATH] -sys.CSP_PATH = [CSP_PATH] + old_path + if not os.path.exists(os.sep.join([ROOT, '__init__.py'])): + print 'Warning: %s does not contain __init__.py' % ROOT -try: + sys.path.insert(0, CSP_PATH) + import csp -except ImportError, e: - # cleanup, notify, and pass the error along. - del sys.CSP_PATH - sys.path = old_path - print - print 'Unable to bootstrap a csp module space from the current working directory.' - raise + if hasattr(csp, 'BOOTSTRAP_VERSION'): + raise ImportError, 'Unable to bootstrap a csp module space from the current working directory.' -csp.BOOTSTRAP_VERSION = BOOTSTRAP_VERSION + csp.BOOTSTRAP_VERSION = BOOTSTRAP_VERSION -# restore the path -sys.path = [CSP_PATH] + old_path - |
From: <sv...@ww...> - 2006-01-22 22:16:14
|
Author: stormbringer Date: 2006-01-22 14:16:05 -0800 (Sun, 22 Jan 2006) New Revision: 1854 Modified: trunk/csp/csplib/sound/Loader.cpp trunk/csp/csplib/sound/OggLoader.cpp Log: Minor changes to make sound related code build on Windows Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1854 Modified: trunk/csp/csplib/sound/Loader.cpp =================================================================== --- trunk/csp/csplib/sound/Loader.cpp 2006-01-22 21:32:41 UTC (rev 1853) +++ trunk/csp/csplib/sound/Loader.cpp 2006-01-22 22:16:05 UTC (rev 1854) @@ -31,6 +31,8 @@ #include <map> #include <cassert> +#include <csp/csplib/util/undef.h> + CSP_NAMESPACE namespace { Modified: trunk/csp/csplib/sound/OggLoader.cpp =================================================================== --- trunk/csp/csplib/sound/OggLoader.cpp 2006-01-22 21:32:41 UTC (rev 1853) +++ trunk/csp/csplib/sound/OggLoader.cpp 2006-01-22 22:16:05 UTC (rev 1854) @@ -30,6 +30,7 @@ #include <openalpp/sample.h> #include <vorbis/vorbisfile.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE |