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-01-22 03:34:34
|
Author: mkrose Date: 2006-01-21 19:34:27 -0800 (Sat, 21 Jan 2006) New Revision: 1828 Added: trunk/CSP/csp/cspsim/f16/MasterModes.cpp trunk/CSP/csp/cspsim/f16/MasterModes.h Log: Create a dedicated channel class for f16 master mode selection. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1828 Added: trunk/CSP/csp/cspsim/f16/MasterModes.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/MasterModes.cpp 2006-01-22 03:32:43 UTC (rev 1827) +++ trunk/CSP/csp/cspsim/f16/MasterModes.cpp 2006-01-22 03:34:27 UTC (rev 1828) @@ -0,0 +1,60 @@ +// Combat Simulator Project +// Copyright (C) 2006 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file f16/MasterModes.cpp + * + **/ + +#include <csp/cspsim/f16/MasterModes.h> + +CSP_NAMESPACE + +namespace f16 { + +const Enumeration MasterModes("NAV AA AG MSL DGFT S-J E-J"); + +const MasterMode NAV("NAV"); +const MasterMode AA("AA"); +const MasterMode AG("AG"); +const MasterMode MSL("MSL"); +const MasterMode DGFT("DGFT"); +const MasterMode SJ("S-J"); +const MasterMode EJ("E-J"); + +void MasterModeSelection::updateMode() { + const MasterMode old = m_Mode; + if (m_EmergencyJettison) { + m_Mode = EJ; + } else if (m_Missile) { + m_Mode = MSL; + } else if (m_Dogfight) { + m_Mode = DGFT; + } else if (m_SelectiveJettison) { + m_Mode = SJ; + } else { + m_Mode = m_Base; + } + if (old != m_Mode) m_ChangeSignal.emit(m_Mode); +} + +} // namespace f16 + +CSP_NAMESPACE_END + Added: trunk/CSP/csp/cspsim/f16/MasterModes.h =================================================================== --- trunk/CSP/csp/cspsim/f16/MasterModes.h 2006-01-22 03:32:43 UTC (rev 1827) +++ trunk/CSP/csp/cspsim/f16/MasterModes.h 2006-01-22 03:34:27 UTC (rev 1828) @@ -0,0 +1,133 @@ +// Combat Simulator Project +// Copyright (C) 2006 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file MasterMode.h + * + **/ + + +#ifndef __CSPSIM_F16_MASTERMODE_H__ +#define __CSPSIM_F16_MASTERMODE_H__ + +#include <csp/csplib/data/Enum.h> +#include <csp/cspsim/Bus.h> + +CSP_NAMESPACE + +namespace f16 { + +extern const Enumeration MasterModes; +typedef Enum<MasterModes> MasterMode; + +extern const MasterMode NAV; +extern const MasterMode AA; +extern const MasterMode AG; +extern const MasterMode MSL; +extern const MasterMode DGFT; +extern const MasterMode SJ; +extern const MasterMode EJ; + +class MasterModeSelection: public ChannelBase { + typedef sigc::signal<void, MasterMode const&> CallbackSignal; + +public: + typedef Ref<MasterModeSelection> RefT; + typedef Ref<const MasterModeSelection> CRefT; + + MasterModeSelection(): ChannelBase("MasterMode", ACCESS_SHARED), m_Base(NAV), m_Mode(NAV), m_SelectiveJettison(false), m_EmergencyJettison(false), m_Dogfight(false), m_Missile(false) { } + + MasterMode const &mode() const { return m_Mode; } + + void setBaseMode(MasterMode const &mode) { + if (mode == NAV || mode == AG || mode == AA) { + m_Base = mode; + updateMode(); + } + } + + void setNAV() { + m_Base = NAV; + updateMode(); + } + + void setAA() { + m_Base = AA; + updateMode(); + } + + void setAG() { + m_Base = AG; + updateMode(); + } + + void setDogfight(bool on) { + m_Dogfight = on; + m_Missile = false; + updateMode(); + } + + void setSelectiveJettison(bool on) { + m_SelectiveJettison = on; + updateMode(); + } + + bool getSelectiveJettision() const { + return m_SelectiveJettison; + } + + bool getEmegencyJettision() const { + return m_EmergencyJettison; + } + + void setEmergencyJettison(bool on) { + m_EmergencyJettison = on; + updateMode(); + } + + void reset() { + m_SelectiveJettison = false; + m_EmergencyJettison = false; + m_Dogfight = false; + m_Missile = false; + updateMode(); + } + + sigc::connection registerCallback(CallbackSignal::slot_type const &slot) const { + return m_ChangeSignal.connect(slot); + } + +private: + void updateMode(); + + MasterMode m_Base; + MasterMode m_Mode; + bool m_SelectiveJettison; + bool m_EmergencyJettison; + bool m_Dogfight; + bool m_Missile; + mutable CallbackSignal m_ChangeSignal; +}; + +} // namespace f16 + +CSP_NAMESPACE_END + +#endif // __CSPSIM_F16_STORESMANAGEMENTPAGES_H__ + |
From: <sv...@ww...> - 2006-01-22 03:32:50
|
Author: mkrose Date: 2006-01-21 19:32:43 -0800 (Sat, 21 Jan 2006) New Revision: 1827 Modified: trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.cpp trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.h Log: Clean up ground-avoidance-advisory logic and convert the advisory states to push channels. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1827 Modified: trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.cpp 2006-01-22 03:32:15 UTC (rev 1826) +++ trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.cpp 2006-01-22 03:32:43 UTC (rev 1827) @@ -46,9 +46,9 @@ } void GroundAvoidanceAdvisory::registerChannels(Bus* bus) { - b_AltitudeAdvisory = bus->registerLocalDataChannel<bool>("F16.GroundAvoidance.AltitudeAdvisory", false); + b_AltitudeAdvisory = bus->registerLocalPushChannel<bool>("F16.GroundAvoidance.AltitudeAdvisory", false); b_AdvanceAltitudeAdvisory = bus->registerLocalDataChannel<bool>("F16.GroundAvoidance.AdvanceAdvisory", false); - b_DescentWarningAfterTakeoff = bus->registerLocalDataChannel<bool>("F16.GroundAvoidance.DescentWarningAfterTakeoff", false); + b_DescentWarningAfterTakeoff = bus->registerLocalPushChannel<bool>("F16.GroundAvoidance.DescentWarningAfterTakeoff", false); b_PullupAnticipation = bus->registerLocalDataChannel<double>("F16.GroundAvoidance.PullupAnticipation", 0.0); } @@ -66,18 +66,30 @@ double GroundAvoidanceAdvisory::onUpdate(double dt) { updateTakeoff(dt); - b_AltitudeAdvisory->value() = false; - b_AdvanceAltitudeAdvisory->value() = false; - b_PullupAnticipation->value() = 0.0; - if (!b_GearHandleUp->value()) return 0.5; + if (!b_GearHandleUp->value()) { + reset(); + return 0.5; + } const double descent_velocity = -b_Velocity->value().z(); updateDescentWarning(descent_velocity); - if (descent_velocity < m_MinimumDescentRate * 0.5) return 0.5; - if (descent_velocity < m_MinimumDescentRate) return 0.2; + if (descent_velocity < m_MinimumDescentRate * 0.5) { + reset(); + return 0.5; + } + if (descent_velocity < m_MinimumDescentRate) { + reset(); + return 0.2; + } updateAltitudeAdvisories(descent_velocity); return (b_PullupAnticipation->value() > 0.0) ? 0.0 : 0.2; } +void GroundAvoidanceAdvisory::reset() { + b_AltitudeAdvisory->pushOnChange(false); + b_AdvanceAltitudeAdvisory->value() = false; + b_PullupAnticipation->value() = 0.0; +} + void GroundAvoidanceAdvisory::updateAltitudeAdvisories(const double descent_velocity) { const double advance_altitude_loss = descent_velocity * 2.0; const double reaction_altitude_loss = descent_velocity * 1.0; // TODO 0.45 in A-G mode @@ -91,7 +103,7 @@ const double alow = convert::ft_m(b_CaraAlow->value()); const double maximum_loss = b_Position->value().z() - b_GroundZ->value() - buffer - alow; const double advance_alert_loss = std::max(maximum_loss - (predicted_altitude_loss - advance_altitude_loss), 0.0); - b_AltitudeAdvisory->value() = maximum_loss < (predicted_altitude_loss - advance_altitude_loss); + b_AltitudeAdvisory->pushOnChange(maximum_loss < (predicted_altitude_loss - advance_altitude_loss)); b_AdvanceAltitudeAdvisory->value() = maximum_loss < predicted_altitude_loss; b_PullupAnticipation->value() = 1.0 - clampTo(advance_alert_loss / descent_velocity * 0.125, 0.0, 1.000001); } @@ -101,7 +113,7 @@ m_RunwayAltitude = b_Position->value().z(); m_TakeoffElapsedTime = 0.0; m_DescentWarningState = ENABLED; - b_DescentWarningAfterTakeoff->value() = false; + b_DescentWarningAfterTakeoff->pushOnChange(false); } else if (m_DescentWarningState != DISARMED) { m_TakeoffElapsedTime += dt; const double msl_above_runway = b_Position->value().z() - m_RunwayAltitude; @@ -119,16 +131,16 @@ const double msl_above_runway = b_Position->value().z() - m_RunwayAltitude; const double impact_time = msl_above_runway / descent_velocity; if (impact_time < 30.0) { - b_DescentWarningAfterTakeoff->value() = true; + b_DescentWarningAfterTakeoff->pushOnChange(true); } else if (impact_time > 35.0) { // hysteresis (may not be corrrect) if (b_DescentWarningAfterTakeoff->value()) { - b_DescentWarningAfterTakeoff->value() = false; + b_DescentWarningAfterTakeoff->pushOnChange(false); m_DescentWarningState = DISARMED; } } } else { if (b_DescentWarningAfterTakeoff->value()) { - b_DescentWarningAfterTakeoff->value() = false; + b_DescentWarningAfterTakeoff->pushOnChange(false); m_DescentWarningState = DISARMED; } } Modified: trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.h =================================================================== --- trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.h 2006-01-22 03:32:15 UTC (rev 1826) +++ trunk/CSP/csp/cspsim/f16/GroundAvoidanceAdvisory.h 2006-01-22 03:32:43 UTC (rev 1827) @@ -93,6 +93,7 @@ void updateAltitudeAdvisories(const double descent_velocity); void updateTakeoff(const double dt); void updateDescentWarning(const double descent_velocity); + void reset(); DataChannel<bool>::RefT b_AltitudeAdvisory; DataChannel<bool>::RefT b_AdvanceAltitudeAdvisory; |
From: <sv...@ww...> - 2006-01-22 03:32:25
|
Author: mkrose Date: 2006-01-21 19:32:15 -0800 (Sat, 21 Jan 2006) New Revision: 1826 Modified: trunk/CSP/csp/cspsim/f16/F16INS.cpp Log: Fix an unused variable warning. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1826 Modified: trunk/CSP/csp/cspsim/f16/F16INS.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/F16INS.cpp 2006-01-22 03:05:27 UTC (rev 1825) +++ trunk/CSP/csp/cspsim/f16/F16INS.cpp 2006-01-22 03:32:15 UTC (rev 1826) @@ -55,7 +55,6 @@ // Inertial Navigation," http://www.fas.org/spp/military/program/nav/basicnav.pdf). virtual double onUpdate(double dt) { double f = 1.0 - m_ResponseTime / (dt + m_ResponseTime); - double g = 1.0 - f; Quat &a0 = b_INSAttitude->value(); Quat const &a1 = b_Attitude->value(); a0.slerp(f, a0, a1); |
From: <sv...@ww...> - 2006-01-22 03:05:37
|
Author: mkrose Date: 2006-01-21 19:05:27 -0800 (Sat, 21 Jan 2006) New Revision: 1825 Modified: trunk/CSP/csp/cspsim/EventMapIndex.cpp trunk/CSP/csp/cspsim/GameScreen.cpp trunk/CSP/csp/cspsim/views/ExternalViews.cpp Log: Minor cleanups. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1825 Modified: trunk/CSP/csp/cspsim/EventMapIndex.cpp =================================================================== --- trunk/CSP/csp/cspsim/EventMapIndex.cpp 2006-01-22 03:01:34 UTC (rev 1824) +++ trunk/CSP/csp/cspsim/EventMapIndex.cpp 2006-01-22 03:05:27 UTC (rev 1825) @@ -64,11 +64,11 @@ std::string path = getConfigPath("InputMapPath"); CSPLOG(INFO, APP) << "Looking for human interface device mappings in '" << path << "'"; ospath::DirectoryContents dc = ospath::getDirectoryContents(path); - CSPLOG(INFO, APP) << "Found " << dc.size() << " files"; for (ospath::DirectoryContents::const_iterator file = dc.begin(); file != dc.end(); ++file) { std::string fn = ospath::join(path, *file); - CSPLOG(INFO, APP) << "File: " << *file << ", " << fn << ", " << ospath::getFileExtension(fn); - if (ospath::getFileExtension(fn) == "hid") load(fn); + if (ospath::getFileExtension(fn) == "hid") { + load(fn); + } } } Modified: trunk/CSP/csp/cspsim/GameScreen.cpp =================================================================== --- trunk/CSP/csp/cspsim/GameScreen.cpp 2006-01-22 03:01:34 UTC (rev 1824) +++ trunk/CSP/csp/cspsim/GameScreen.cpp 2006-01-22 03:05:27 UTC (rev 1825) @@ -286,13 +286,11 @@ void GameScreen::on_View0() { } -void GameScreen::on_Quit() -{ +void GameScreen::on_Quit() { CSPSim::theSim->quit(); } -void GameScreen::on_Pause() -{ +void GameScreen::on_Pause() { CSPSim::theSim->togglePause(); m_ScreenInfoManager->setStatus("PAUSE", !m_ScreenInfoManager->getStatus("PAUSE")); } Modified: trunk/CSP/csp/cspsim/views/ExternalViews.cpp =================================================================== --- trunk/CSP/csp/cspsim/views/ExternalViews.cpp 2006-01-22 03:01:34 UTC (rev 1824) +++ trunk/CSP/csp/cspsim/views/ExternalViews.cpp 2006-01-22 03:05:27 UTC (rev 1825) @@ -29,8 +29,6 @@ #include <csp/cspsim/CSPSim.h> #include <csp/cspsim/DynamicObject.h> -// FIXME: why ObjetModel class definition is needed here (vc++ error) -#include <csp/cspsim/ObjectModel.h> #include <csp/csplib/util/Noise.h> |
From: <sv...@ww...> - 2006-01-22 03:01:41
|
Author: mkrose Date: 2006-01-21 19:01:34 -0800 (Sat, 21 Jan 2006) New Revision: 1824 Modified: trunk/CSP/csp/cspsim/InputEventChannel.h Log: Add another InputEventChannel convenience constructor taking a sigc::slot callback. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1824 Modified: trunk/CSP/csp/cspsim/InputEventChannel.h =================================================================== --- trunk/CSP/csp/cspsim/InputEventChannel.h 2006-01-22 01:39:15 UTC (rev 1823) +++ trunk/CSP/csp/cspsim/InputEventChannel.h 2006-01-22 03:01:34 UTC (rev 1824) @@ -63,6 +63,7 @@ InputEventChannel(std::string const &name, InputInterface *input_interface): ChannelBase(name, ACCESS_SHARED) { input_interface->bindActionEvent(name, sigc::mem_fun(*this, &InputEventChannel::onInputEvent)); } + /** A convenience method to construct an InputEventChannel and bind a callback * method in one step. Useful when the System creating and registering the * channel does not need to retain a private reference. Note that the instance @@ -74,6 +75,15 @@ instance->bindActionEvent(name, sigc::mem_fun(*this, &InputEventChannel::onInputEvent)); } + /** Another convenience method to construct an InputEventChannel and bind a + * callback in one step. Useful when the System creating and registering the + * channel does not need to retain a private reference. + */ + InputEventChannel(std::string const &name, InputInterface *input_interface, sigc::slot<void> const &functor): ChannelBase(name, ACCESS_SHARED) { + connect(functor); + input_interface->bindActionEvent(name, sigc::mem_fun(*this, &InputEventChannel::onInputEvent)); + } + /** Connect a new signal handler to the channel. The handler will be called * whenever the corresponding input event is received, and when the signal() * method is called. |
From: <sv...@ww...> - 2006-01-22 01:39:29
|
Author: mkrose Date: 2006-01-21 17:39:15 -0800 (Sat, 21 Jan 2006) New Revision: 1823 Added: trunk/CSP/csp/cspsim/ResourceBundle.cpp trunk/CSP/csp/cspsim/ResourceBundle.h trunk/CSP/csp/cspsim/SoundEffect.cpp trunk/CSP/csp/cspsim/SoundEffect.h trunk/CSP/csp/cspsim/SoundEngine.cpp trunk/CSP/csp/cspsim/SoundEngine.h trunk/CSP/csp/cspsim/SoundModel.cpp trunk/CSP/csp/cspsim/SoundModel.h Modified: trunk/CSP/csp/cspsim/SConscript Log: More sound support code, this time in cspsim. Adds four classes for managing sounds and adding them to the scene: ResourceBundle, SoundModel, SoundEffect, and SoundEngine. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1823 Diff omitted (23938 bytes). |
From: <sv...@ww...> - 2006-01-22 00:18:12
|
Author: mkrose Date: 2006-01-21 16:18:05 -0800 (Sat, 21 Jan 2006) New Revision: 1822 Added: trunk/CSP/csp/csplib/sound/ trunk/CSP/csp/csplib/sound/Loader.cpp trunk/CSP/csp/csplib/sound/Loader.h trunk/CSP/csp/csplib/sound/OggLoader.cpp trunk/CSP/csp/csplib/sound/Sample.cpp trunk/CSP/csp/csplib/sound/Sample.h Modified: trunk/CSP/csp/SConstruct trunk/CSP/csp/csplib/SConscript Log: Add basic sound utilities to csplib. Requires openal, openalpp (0.2), osgAL (0.3), and libvorbis (1.1.0). Rerun 'scons config' to pick up the new dependencies before building. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1822 Diff omitted (17986 bytes). |
From: <sv...@ww...> - 2006-01-17 00:26:07
|
Author: mkrose Date: 2006-01-16 16:25:55 -0800 (Mon, 16 Jan 2006) New Revision: 1821 Modified: trunk/CSP/csp/csplib/util/TimeStamp.h Log: Add missing cmath include to TimeStamp.h. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1821 Modified: trunk/CSP/csp/csplib/util/TimeStamp.h =================================================================== --- trunk/CSP/csp/csplib/util/TimeStamp.h 2006-01-16 21:19:11 UTC (rev 1820) +++ trunk/CSP/csp/csplib/util/TimeStamp.h 2006-01-17 00:25:55 UTC (rev 1821) @@ -29,6 +29,7 @@ #include <csp/csplib/util/Namespace.h> #include <csp/csplib/util/Uniform.h> #include <csp/csplib/data/Date.h> +#include <cmath> CSP_NAMESPACE |
From: <sv...@ww...> - 2006-01-16 21:19:18
|
Author: mkrose Date: 2006-01-16 13:19:11 -0800 (Mon, 16 Jan 2006) New Revision: 1820 Modified: trunk/CSP/csp/modules/chunklod/SConscript Log: Remove a misplaced user32 library dependency. Rerun 'scons config' to pick up the correct dependency under Windows. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1820 Modified: trunk/CSP/csp/modules/chunklod/SConscript =================================================================== --- trunk/CSP/csp/modules/chunklod/SConscript 2006-01-16 21:17:12 UTC (rev 1819) +++ trunk/CSP/csp/modules/chunklod/SConscript 2006-01-16 21:19:11 UTC (rev 1820) @@ -38,7 +38,6 @@ 'Version.cpp', ], deps = ['cspsim', 'jpeg'], - LIBS=['user32'], aliases = 'all') |
From: <sv...@ww...> - 2006-01-16 21:17:22
|
Author: mkrose Date: 2006-01-16 13:17:12 -0800 (Mon, 16 Jan 2006) New Revision: 1819 Modified: trunk/CSP/csp/cspsim/swig/CSPSim.i Log: Add missing iostream include. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1819 Modified: trunk/CSP/csp/cspsim/swig/CSPSim.i =================================================================== --- trunk/CSP/csp/cspsim/swig/CSPSim.i 2006-01-14 16:46:30 UTC (rev 1818) +++ trunk/CSP/csp/cspsim/swig/CSPSim.i 2006-01-16 21:17:12 UTC (rev 1819) @@ -25,6 +25,7 @@ #include <csp/cspsim/battlefield/LocalBattlefield.h> #include <csp/csplib/data/DataManager.h> #include <csp/csplib/util/Math.h> +#include <iostream> void _createVehicleHelper(csp::CSPSim *self, const char *path, csp::Vector3 position, csp::Vector3 velocity, csp::Vector3 attitude) { |
From: <sv...@ww...> - 2006-01-14 16:46:38
|
Author: mkrose Date: 2006-01-14 08:46:30 -0800 (Sat, 14 Jan 2006) New Revision: 1818 Modified: trunk/CSP/csp/SConstruct Log: libjpeg apparently depends on user32.dll under Windows. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1818 Modified: trunk/CSP/csp/SConstruct =================================================================== --- trunk/CSP/csp/SConstruct 2006-01-14 13:07:31 UTC (rev 1817) +++ trunk/CSP/csp/SConstruct 2006-01-14 16:46:30 UTC (rev 1818) @@ -64,6 +64,7 @@ name = 'jpeg', config = [ build.WindowsLibConfig('libjpeg'), + build.WindowsLibConfig('user32'), ]) build.ExternalLibrary( |
From: <sv...@ww...> - 2006-01-14 13:07:45
|
Author: stormbringer Date: 2006-01-14 05:07:31 -0800 (Sat, 14 Jan 2006) New Revision: 1817 Modified: trunk/CSP/csp/modules/chunklod/SConscript Log: Make chunklod build on Windows Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1817 Modified: trunk/CSP/csp/modules/chunklod/SConscript =================================================================== --- trunk/CSP/csp/modules/chunklod/SConscript 2006-01-14 03:29:36 UTC (rev 1816) +++ trunk/CSP/csp/modules/chunklod/SConscript 2006-01-14 13:07:31 UTC (rev 1817) @@ -24,6 +24,9 @@ # cspchunklod generates lots of warnings; feel free to clean it up and then remove this line env.RemoveFlags(CXXFLAGS=Split('-pedantic -W /W3')) +# to remove conflicts with MSVCRT +env.AppendUnique(SHLINKFLAGS=Split('/NODEFAULTLIB:LIBC')) + build.SharedLibrary(env, name = 'chunklod', sources = [ @@ -35,6 +38,7 @@ 'Version.cpp', ], deps = ['cspsim', 'jpeg'], + LIBS=['user32'], aliases = 'all') |
From: <sv...@ww...> - 2006-01-14 03:29:44
|
Author: mkrose Date: 2006-01-13 19:29:36 -0800 (Fri, 13 Jan 2006) New Revision: 1816 Modified: trunk/CSP/csp/cspsim/f16/F16HUD.cpp Log: Temporary workaround for segv related to special fonts. This partially breaks DED rendering in the HUD. The full (correct) fix will be made in a subsequent change. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1816 Modified: trunk/CSP/csp/cspsim/f16/F16HUD.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/F16HUD.cpp 2006-01-13 08:32:20 UTC (rev 1815) +++ trunk/CSP/csp/cspsim/f16/F16HUD.cpp 2006-01-14 03:29:36 UTC (rev 1816) @@ -69,7 +69,8 @@ public: F16HUDFont(float height, osg::Vec4 const &color): m_Height(height), m_Color(color), m_Font(NULL) { //m_Font = new ReverseAltFont(osgText::readFontFile("hud.ttf")); // FIXME LEAKS! - m_Font = new ScaledAltFont(osgText::readFontFile("hud.ttf"), 1.2); // FIXME LEAKS! + //m_Font = new ScaledAltFont(osgText::readFontFile("hud.ttf"), 1.2); // FIXME LEAKS! + m_Font = osgText::readFontFile("hud.ttf"); // FIXME LEAKS! } virtual void apply(osgText::Text *text) { text->setFont(m_Font); |
From: <sv...@ww...> - 2006-01-13 08:32:32
|
Author: mkrose Date: 2006-01-13 00:32:20 -0800 (Fri, 13 Jan 2006) New Revision: 1815 Modified: trunk/CSP/csp/modules/demeter/DemeterTerrain.cpp Log: Clear Windows macros. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1815 Modified: trunk/CSP/csp/modules/demeter/DemeterTerrain.cpp =================================================================== --- trunk/CSP/csp/modules/demeter/DemeterTerrain.cpp 2006-01-13 08:28:53 UTC (rev 1814) +++ trunk/CSP/csp/modules/demeter/DemeterTerrain.cpp 2006-01-13 08:32:20 UTC (rev 1815) @@ -34,6 +34,7 @@ #include <csp/modules/demeter/Terrain.h> #include <csp/modules/demeter/DemeterDrawable.h> #include <csp/modules/demeter/TerrainTextureFactory.h> +#include <csp/csplib/util/undef.h> #include <osg/Geode> #include <osg/StateSet> |
From: <sv...@ww...> - 2006-01-13 08:29:03
|
Author: mkrose Date: 2006-01-13 00:28:53 -0800 (Fri, 13 Jan 2006) New Revision: 1814 Modified: trunk/CSP/csp/csplib/util/StringTools.cpp trunk/CSP/csp/csplib/util/StringTools.h Log: Add a couple missing CSPLIB_EXPORTS tags and a new sprintf-like function for strings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1814 Diff omitted (13744 bytes). |
From: <sv...@ww...> - 2006-01-13 04:38:54
|
Author: mkrose Date: 2006-01-12 20:38:44 -0800 (Thu, 12 Jan 2006) New Revision: 1813 Modified: trunk/CSP/csp/tools/build.py Log: Build fixes: - Report an error if swig isn't found. - Fix a bug under windows that caused swig wrappers to be written to the wrong filename. - Fix an incompatibility with scons version 0.96.91. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1813 Modified: trunk/CSP/csp/tools/build.py =================================================================== --- trunk/CSP/csp/tools/build.py 2006-01-08 16:53:46 UTC (rev 1812) +++ trunk/CSP/csp/tools/build.py 2006-01-13 04:38:44 UTC (rev 1813) @@ -94,7 +94,11 @@ return os.path.splitext(fn)[1] def GetCurrentScript(): - return SCons.Script.SConscript.stack[-1].sconscript + try: + call_stack = SCons.Script.call_stack + except AttributeError: + call_stack = SCons.Script.SConscript.stack # pre 0.96.91 + return call_stack[-1].sconscript class SourceList(object): _header_ext = ('.h', '.hh', '.hpp', '.hxx') @@ -777,9 +781,14 @@ SWIG = 'swig' -def AddSwigSupport(env): +def AddSwigSupport(env, required=1): global SWIG SWIG = SCons.Util.WhereIs('swig') + if not SWIG: + print 'WARNING: swig not found in path' + if required: + print >>sys.stderr, 'Cannot continue without swig.' + sys.exit(1) env['SWIG'] = SWIG AddSwigDep(env) AddSwigBuild(env) @@ -1178,7 +1187,8 @@ for file in self._sources: if isinstance(file, SCons.Node.FS.File): if file.get_suffix() == '.i': - self._objects += self._env.SwigWrapper(file, **self._options) + wrapper, module = self._env.Swig(file, **self._options) + self._objects += self._env.SwigWrapper(wrapper, **self._options) elif file.get_suffix() != '.h': self._objects.append(self._env.SharedObject(file, **self._options)) else: |
From: <sv...@ww...> - 2006-01-08 16:53:55
|
Author: mkrose Date: 2006-01-08 08:53:46 -0800 (Sun, 08 Jan 2006) New Revision: 1812 Modified: trunk/CSP/csp/csplib/util/Timing.cpp Log: Fix namespace pollution from Windows.h. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1812 Modified: trunk/CSP/csp/csplib/util/Timing.cpp =================================================================== --- trunk/CSP/csp/csplib/util/Timing.cpp 2005-12-31 17:24:12 UTC (rev 1811) +++ trunk/CSP/csp/csplib/util/Timing.cpp 2006-01-08 16:53:46 UTC (rev 1812) @@ -28,6 +28,7 @@ // for platform-specific fast timing routines #ifdef _WIN32 #include <Windows.h> + #include <csp/csplib/util/undef.h> #else #include <sys/time.h> #include <unistd.h> |
From: <sv...@ww...> - 2005-12-31 17:24:20
|
Author: mkrose Date: 2005-12-31 09:24:12 -0800 (Sat, 31 Dec 2005) New Revision: 1811 Modified: trunk/CSP/csp/SConstruct Log: Oops, the previous update to SConstruct included more than I intended. Removing the sound libraries for now. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1811 Modified: trunk/CSP/csp/SConstruct =================================================================== --- trunk/CSP/csp/SConstruct 2005-12-31 16:39:16 UTC (rev 1810) +++ trunk/CSP/csp/SConstruct 2005-12-31 17:24:12 UTC (rev 1811) @@ -82,15 +82,6 @@ ]) build.ExternalLibrary( - name = 'sound', - config = [ - build.PkgConfig(package='openalpp', version='0.2'), - build.PkgConfig(package='vorbis', version='1.1.0'), - build.DevpackConfig(dlls='openalpp', headers=[('openalpp', 'sounddata.h')]), - build.DevpackConfig(dlls='vorbis', headers=[('vorbis', 'vorbisfile.h')]), - ]) - -build.ExternalLibrary( name = 'gnucc2', config = [ build.PkgConfig(package='libccgnu2', version='1.3.19', label='commoncpp'), @@ -110,8 +101,6 @@ build.PkgConfig(package='openscenegraph', version='0.9.8'), build.PkgConfig(package='openthreads', version='0.9.8'), build.PkgConfig(package='producer', version='0.9.8'), - build.PkgConfig(package='osgal', version='0.3'), - build.DevpackConfig(dlls='osgal', headers=[('osgAL', 'SoundNode')]), build.DevpackConfig(dlls=['osg', 'osgDB', 'osgFX', 'osgGA', 'osgParticle', 'osgProducer', 'osgText', 'osgUtil', 'OpenThreadsWin32'], headers=[('osg', 'Depth'), ('osgText', 'Font')]), ]) |
From: <sv...@ww...> - 2005-12-31 16:39:28
|
Author: mkrose Date: 2005-12-31 08:39:16 -0800 (Sat, 31 Dec 2005) New Revision: 1810 Modified: trunk/CSP/csp/SConstruct Log: Add a flag to prevent shared libraries from linking against LIBCMT under windows, which eliminates some warnings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1810 Modified: trunk/CSP/csp/SConstruct =================================================================== --- trunk/CSP/csp/SConstruct 2005-12-30 03:27:24 UTC (rev 1809) +++ trunk/CSP/csp/SConstruct 2005-12-31 16:39:16 UTC (rev 1810) @@ -82,6 +82,15 @@ ]) build.ExternalLibrary( + name = 'sound', + config = [ + build.PkgConfig(package='openalpp', version='0.2'), + build.PkgConfig(package='vorbis', version='1.1.0'), + build.DevpackConfig(dlls='openalpp', headers=[('openalpp', 'sounddata.h')]), + build.DevpackConfig(dlls='vorbis', headers=[('vorbis', 'vorbisfile.h')]), + ]) + +build.ExternalLibrary( name = 'gnucc2', config = [ build.PkgConfig(package='libccgnu2', version='1.3.19', label='commoncpp'), @@ -101,6 +110,8 @@ build.PkgConfig(package='openscenegraph', version='0.9.8'), build.PkgConfig(package='openthreads', version='0.9.8'), build.PkgConfig(package='producer', version='0.9.8'), + build.PkgConfig(package='osgal', version='0.3'), + build.DevpackConfig(dlls='osgal', headers=[('osgAL', 'SoundNode')]), build.DevpackConfig(dlls=['osg', 'osgDB', 'osgFX', 'osgGA', 'osgParticle', 'osgProducer', 'osgText', 'osgUtil', 'OpenThreadsWin32'], headers=[('osg', 'Depth'), ('osgText', 'Font')]), ]) @@ -143,7 +154,7 @@ env['CXXFLAGS'] = Split('/GR /MT /O2 /EHsc /nologo') env.AppendUnique(CPPDEFINES=Split('WIN32 __WIN32__ _USRDLL _DLL NDEBUG')) env.AppendUnique(LINKFLAGS=Split('/INCREMENTAL:NO /RELEASE /nologo')) - env.AppendUnique(SHLINKFLAGS=Split('/INCREMENTAL:NO /RELEASE /nologo')) + env.AppendUnique(SHLINKFLAGS=Split('/INCREMENTAL:NO /NODEFAULTLIB:LIBCMT /RELEASE /nologo')) env.CopyEnvironment(Split('PATH INCLUDE LIB')) # FIXME def customize_linux(self, env): |
From: <sv...@ww...> - 2005-12-30 03:27:37
|
Author: mkrose Date: 2005-12-29 19:27:24 -0800 (Thu, 29 Dec 2005) New Revision: 1809 Added: trunk/CSP/csp/csplib/util/undef.h Modified: trunk/CSP/csp/csplib/net/NetworkInterface.cpp trunk/CSP/csp/csplib/net/NetworkNode.h trunk/CSP/csp/csplib/net/Sockets.h trunk/CSP/csp/csplib/thread/AtomicCounter.h trunk/CSP/csp/csplib/thread/Synchronization.h trunk/CSP/csp/csplib/thread/Thread.h trunk/CSP/csp/csplib/util/LogConstants.h trunk/CSP/csp/csplib/util/Modules.cpp trunk/CSP/csp/csplib/util/Testing.cpp Log: Forcibly undefine symbols that external headers have dumped into the global namespace. These symbols are used as shorthand arguments to logging macros, but not directly defined in csplib. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1809 Modified: trunk/CSP/csp/csplib/net/NetworkInterface.cpp =================================================================== --- trunk/CSP/csp/csplib/net/NetworkInterface.cpp 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/net/NetworkInterface.cpp 2005-12-30 03:27:24 UTC (rev 1809) @@ -41,18 +41,11 @@ #ifdef _WIN32 // use this to fix compile problems with mulitple includes of windows and winsock headers. #define _WINSOCKAPI_ -#define NOMINMAX #endif + #include <cc++/network.h> #include <cc++/thread.h> -#ifdef _WIN32 -# ifdef min -# undef min -# endif -# ifdef max -# undef max -# endif -#endif +#include <csp/csplib/util/undef.h> #include <string.h> #include <sys/types.h> Modified: trunk/CSP/csp/csplib/net/NetworkNode.h =================================================================== --- trunk/CSP/csp/csplib/net/NetworkNode.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/net/NetworkNode.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -31,21 +31,15 @@ #include <csp/csplib/util/Uniform.h> #ifdef _WIN32 -# define NOMINMAX # pragma warning(push) # pragma warning(disable: 4100 4996) #endif #include <cc++/socket.h> +#include <csp/csplib/util/undef.h> #ifdef _WIN32 # pragma warning(pop) -# ifdef min -# undef min -# endif -# ifdef max -# undef max -# endif #endif #include <string> Modified: trunk/CSP/csp/csplib/net/Sockets.h =================================================================== --- trunk/CSP/csp/csplib/net/Sockets.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/net/Sockets.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -28,21 +28,15 @@ #ifdef _WIN32 // use this to fix compile problems with mulitple includes of windows and winsock headers. # define _WINSOCKAPI_ -# define NOMINMAX # pragma warning(push) # pragma warning(disable: 4100) #endif #include <cc++/network.h> +#include <csp/csplib/util/undef.h> #ifdef _WIN32 # pragma warning(pop) -# ifdef min -# undef min -# endif -# ifdef max -# undef max -# endif #endif CSP_NAMESPACE Modified: trunk/CSP/csp/csplib/thread/AtomicCounter.h =================================================================== --- trunk/CSP/csp/csplib/thread/AtomicCounter.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/thread/AtomicCounter.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -31,10 +31,8 @@ #include <csp/csplib/util/Namespace.h> #include <csp/csplib/util/Properties.h> -#ifdef WIN32 -#define NOMINMAX -#endif #include <cc++/thread.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE Modified: trunk/CSP/csp/csplib/thread/Synchronization.h =================================================================== --- trunk/CSP/csp/csplib/thread/Synchronization.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/thread/Synchronization.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -29,10 +29,9 @@ #include <csp/csplib/util/Namespace.h> #include <csp/csplib/util/Properties.h> -#ifdef WIN32 -#define NOMINMAX -#endif #include <cc++/thread.h> +#include <csp/csplib/util/undef.h> + #include <algorithm> #include <cerrno> #include <cmath> @@ -268,12 +267,9 @@ */ Semaphore(size_t count): m_semaphore(count) { } - /** Wait for an available resource, or until the specified timeout expires. - * - * @param timeout The maximum time (in seconds) to wait, or zero for no limit. - * @return true if a resource is available, false if the timeout expired first. + /** Wait for an available resource. */ - bool wait(double timeout=0) { return m_semaphore.wait(makeMilliTimeout(timeout)); } + void wait() { m_semaphore.wait(); } /** Release a resource so that other waiting threads can use it. Should only * be called after wait() has succeeded. Modified: trunk/CSP/csp/csplib/thread/Thread.h =================================================================== --- trunk/CSP/csp/csplib/thread/Thread.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/thread/Thread.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -33,10 +33,8 @@ #include <csp/csplib/thread/AtomicCounter.h> #include <csp/csplib/thread/Synchronization.h> -#ifdef WIN32 -#define NOMINMAX -#endif #include <cc++/thread.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE Modified: trunk/CSP/csp/csplib/util/LogConstants.h =================================================================== --- trunk/CSP/csp/csplib/util/LogConstants.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/util/LogConstants.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -27,26 +27,6 @@ #include <csp/csplib/util/Namespace.h> -// the following symbols are used in the logging macros, so -// previous macro declarations must be deleted. note that we -// do *not* redefine these macros, the symbols are ## joined -// with cLogPriority_ to construct the priority constants below. -#ifdef DEBUG -#undef DEBUG -#endif -#ifdef INFO -#undef INFO -#endif -#ifdef WARNING -#undef WARNING -#endif -#ifdef ERROR -#undef ERROR -#endif -#ifdef FATAL -#undef FATAL -#endif - CSP_NAMESPACE /** Log message priorities @@ -73,14 +53,13 @@ cLogCategory_REGISTRY = 0x00000004, cLogCategory_THREAD = 0x00000008, cLogCategory_TIME = 0x00000010, - cLogCategory_FILE = 0x00000020, - cLogCategory_NETWORK = 0x00000040, - cLogCategory_AUDIO = 0x00000080, - cLogCategory_OPENGL = 0x00000100, - cLogCategory_INPUT = 0x00000200, - cLogCategory_NUMERIC = 0x00000400, - cLogCategory_PHYSICS = 0x00000400, // same as NUMERIC - cLogCategory_TESTING = 0x00000800, + cLogCategory_NETWORK = 0x00000020, + cLogCategory_AUDIO = 0x00000040, + cLogCategory_OPENGL = 0x00000080, + cLogCategory_INPUT = 0x00000100, + cLogCategory_NUMERIC = 0x00000200, + cLogCategory_PHYSICS = 0x00000200, // same as NUMERIC + cLogCategory_TESTING = 0x00000400, // net cLogCategory_TIMING = 0x00001000, Modified: trunk/CSP/csp/csplib/util/Modules.cpp =================================================================== --- trunk/CSP/csp/csplib/util/Modules.cpp 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/util/Modules.cpp 2005-12-30 03:27:24 UTC (rev 1809) @@ -26,11 +26,9 @@ #include <csp/csplib/util/Ref.h> #include <csp/csplib/util/ScopedPointer.h> -#ifdef WIN32 -#define NOMINMAX -#endif -#include <cc++/file.h> #include <map> +#include <cc++/file.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE Modified: trunk/CSP/csp/csplib/util/Testing.cpp =================================================================== --- trunk/CSP/csp/csplib/util/Testing.cpp 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/util/Testing.cpp 2005-12-30 03:27:24 UTC (rev 1809) @@ -26,11 +26,9 @@ #include <csp/csplib/util/Testing.h> #include <csp/csplib/util/Timing.h> -#ifdef WIN32 -#define NOMINMAX -#endif -#include <cc++/file.h> #include <vector> +#include <cc++/file.h> +#include <csp/csplib/util/undef.h> CSP_NAMESPACE Added: trunk/CSP/csp/csplib/util/undef.h =================================================================== --- trunk/CSP/csp/csplib/util/undef.h 2005-12-28 02:53:24 UTC (rev 1808) +++ trunk/CSP/csp/csplib/util/undef.h 2005-12-30 03:27:24 UTC (rev 1809) @@ -0,0 +1,117 @@ +/** @file undef.h + * + * This header should be included immediately after including external + * headers that may define any of the symbols below as macros. + */ + +// the following symbols are used in the logging macros, so previous macro +// declarations must be deleted. note that csplib does *not* redefine these +// macros (see LogConstants.h for details). +#ifdef DEBUG +#undef DEBUG +#endif +#ifdef INFO +#undef INFO +#endif +#ifdef WARNING +#undef WARNING +#endif +#ifdef ERROR +#undef ERROR +#endif +#ifdef FATAL +#undef FATAL +#endif + +// logging categories (see LogConstants.h) +#ifdef DATA +#undef DATA +#endif +#ifdef ARCHIVE +#undef ARCHIVE +#endif +#ifdef REGISTRY +#undef REGISTRY +#endif +#ifdef THREAD +#undef THREAD +#endif +#ifdef TIME +#undef TIME +#endif +#ifdef NETWORK +#undef NETWORK +#endif +#ifdef AUDIO +#undef AUDIO +#endif +#ifdef OPENGL +#undef OPENGL +#endif +#ifdef INPUT +#undef INPUT +#endif +#ifdef NUMERIC +#undef NUMERIC +#endif +#ifdef PHYSICS +#undef PHYSICS +#endif +#ifdef TESTING +#undef TESTING +#endif +#ifdef TIMING +#undef TIMING +#endif +#ifdef HANDSHAKE +#undef HANDSHAKE +#endif +#ifdef BALANCING +#undef BALANCING +#endif +#ifdef PACKET +#undef PACKET +#endif +#ifdef PEER +#undef PEER +#endif +#ifdef MESSAGE +#undef MESSAGE +#endif +#ifdef TERRAIN +#undef TERRAIN +#endif +#ifdef SCENE +#undef SCENE +#endif +#ifdef BATTLEFIELD +#undef BATTLEFIELD +#endif +#ifdef OBJECT +#undef OBJECT +#endif +#ifdef APP +#undef APP +#endif +#ifdef VIEW +#undef VIEW +#endif +#ifdef THEATER +#undef THEATER +#endif +#ifdef NONE +#undef NONE +#endif +#ifdef ALL +#undef ALL +#endif + +// some external headers define min and max as macros. we use the standard +// inline functions (std::min and std::max) instead. +#ifdef min +#undef min +#endif +#ifdef max +#undef max +#endif + |
From: <sv...@ww...> - 2005-12-28 02:53:33
|
Author: mkrose Date: 2005-12-27 18:53:24 -0800 (Tue, 27 Dec 2005) New Revision: 1808 Modified: trunk/CSP/csp/tools/build.py Log: Fix an incompatibility with scons 0.96.91, and a seemingly strange bug with list concatenation that does not appear when using scons 0.96.1. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1808 Modified: trunk/CSP/csp/tools/build.py =================================================================== --- trunk/CSP/csp/tools/build.py 2005-12-23 19:58:06 UTC (rev 1807) +++ trunk/CSP/csp/tools/build.py 2005-12-28 02:53:24 UTC (rev 1808) @@ -590,7 +590,7 @@ def CustomizeForPlatform(env, settings): if hasattr(settings, '__bases__'): settings = settings() - script = GetCurrentScript() + #script = GetCurrentScript() platform = sys.platform.lower() configs = [] @@ -1187,11 +1187,11 @@ def _addSettings(self, settings, bdeps): self._makeObjects() settings.merge(self._settings) - bdeps += self._bdeps + bdeps.extend(self._bdeps) def add(self, objects, settings, bdeps): self._makeObjects() - objects += self._objects + objects.extend(self._objects) self._addSettings(settings, bdeps) _header_ext = ('.h', '.hh', '.hpp', '.hxx') |
From: <sv...@ww...> - 2005-12-23 19:58:15
|
Author: mkrose Date: 2005-12-23 11:58:06 -0800 (Fri, 23 Dec 2005) New Revision: 1807 Modified: trunk/CSP/csp/csplib/util/SimpleConfig.cpp trunk/CSP/csp/cspsim/f16/FuelSystem.cpp Log: Fix a comment typo and some commented logging code. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1807 Modified: trunk/CSP/csp/csplib/util/SimpleConfig.cpp =================================================================== --- trunk/CSP/csp/csplib/util/SimpleConfig.cpp 2005-12-23 19:56:36 UTC (rev 1806) +++ trunk/CSP/csp/csplib/util/SimpleConfig.cpp 2005-12-23 19:58:06 UTC (rev 1807) @@ -447,7 +447,7 @@ } -// This is a rather ugly and slow way to delete a section. It can leave stay +// This is a rather ugly and slow way to delete a section. It can leave stray // comments in the middle of sections, but will remove the section entirely, // even if it is multiply declared. This whole function was a bit of an // afterthought, since it isn't very likely to be used in the application this Modified: trunk/CSP/csp/cspsim/f16/FuelSystem.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/FuelSystem.cpp 2005-12-23 19:56:36 UTC (rev 1806) +++ trunk/CSP/csp/cspsim/f16/FuelSystem.cpp 2005-12-23 19:58:06 UTC (rev 1807) @@ -118,7 +118,7 @@ const double fwd_fuel = m_FwdReservoir->quantity() + m_FwdFuselage->quantity(); const double fwd_heavy = fwd_fuel - aft_fuel; - //static double XXX = 0.0; XXX += dt; if (XXX > 5) { XXX = 0; std::cout << "*** " << b_EngineFeedSwitch->state().getToken() << "; fwd heavy: " << fwd_heavy << " " << m_AFFTActive << "\n"; } + //if (m_AFFTActive) { static double XXX = 0.0; XXX += dt; if (XXX > 5) { XXX = 0; std::cout << "*** " << b_EngineFeedSwitch->state().getToken() << "; fwd heavy: " << fwd_heavy << " " << m_AFFTActive << "\n"; } } if (b_MasterFuelSwitch->state() == master) { switch (b_EngineFeedSwitch->state().getValue()) { |
From: <sv...@ww...> - 2005-12-23 19:56:42
|
Author: mkrose Date: 2005-12-23 11:56:36 -0800 (Fri, 23 Dec 2005) New Revision: 1806 Modified: trunk/CSP/csp/cspsim/f16/F16INS.cpp Log: Small tweak to the f16 ins system to reduce jitter during long frames. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1806 Modified: trunk/CSP/csp/cspsim/f16/F16INS.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/F16INS.cpp 2005-12-23 19:55:36 UTC (rev 1805) +++ trunk/CSP/csp/cspsim/f16/F16INS.cpp 2005-12-23 19:56:36 UTC (rev 1806) @@ -51,15 +51,14 @@ } protected: + // TODO implement an INS error model (for background, see NAWCWPNS TM 8128, "Basic + // Inertial Navigation," http://www.fas.org/spp/military/program/nav/basicnav.pdf). virtual double onUpdate(double dt) { - double f = dt / (dt + m_ResponseTime); + double f = 1.0 - m_ResponseTime / (dt + m_ResponseTime); double g = 1.0 - f; Quat &a0 = b_INSAttitude->value(); Quat const &a1 = b_Attitude->value(); - a0.w() = a0.w() * g + a1.w() * f; - a0.x() = a0.x() * g + a1.x() * f; - a0.y() = a0.y() * g + a1.y() * f; - a0.z() = a0.z() * g + a1.z() * f; + a0.slerp(f, a0, a1); return 0.0; } |
From: <sv...@ww...> - 2005-12-23 19:55:45
|
Author: mkrose Date: 2005-12-23 11:55:36 -0800 (Fri, 23 Dec 2005) New Revision: 1805 Modified: trunk/CSP/csp/cspsim/InputInterface.cpp Log: Small bugfix for handling input events when a runtime dispatch handler exists. Events that aren't handled by the runtime handler will now be passed to the static handler. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1805 Modified: trunk/CSP/csp/cspsim/InputInterface.cpp =================================================================== --- trunk/CSP/csp/cspsim/InputInterface.cpp 2005-12-23 19:53:51 UTC (rev 1804) +++ trunk/CSP/csp/cspsim/InputInterface.cpp 2005-12-23 19:55:36 UTC (rev 1805) @@ -45,8 +45,8 @@ } bool InputInterface::onMapEvent(MapEvent const &event) { - if (m_RuntimeDispatch) { - return m_RuntimeDispatch->onMapEvent(event); + if (m_RuntimeDispatch && m_RuntimeDispatch->onMapEvent(event)) { + return true; } InputInterfaceDispatch *map = _getInputInterfaceDispatch(); return map ? map->callHandler(this, event) : false; |
From: <sv...@ww...> - 2005-12-23 19:53:57
|
Author: mkrose Date: 2005-12-23 11:53:51 -0800 (Fri, 23 Dec 2005) New Revision: 1804 Modified: trunk/CSP/csp/cspsim/f16/F16Engine.cpp trunk/CSP/csp/cspsim/f16/F16Engine.h Log: Minor refactoring of the f16 engine spooling model. No change to the behavior. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1804 Modified: trunk/CSP/csp/cspsim/f16/F16Engine.cpp =================================================================== --- trunk/CSP/csp/cspsim/f16/F16Engine.cpp 2005-12-23 19:52:58 UTC (rev 1803) +++ trunk/CSP/csp/cspsim/f16/F16Engine.cpp 2005-12-23 19:53:51 UTC (rev 1804) @@ -89,6 +89,7 @@ m_StartElapsedTime(0.0), m_HangTime(0.0), m_Blend(0.0), + m_Power(0.0), m_NormalStart(true) { // TODO set defaults @@ -201,31 +202,30 @@ } void F16Engine::update(double dt) { - double fdt = static_cast<double>(dt); // jfs->update(fdt); - updateTemperature(fdt); + updateTemperature(dt); switch (m_Status) { case STATUS_OFF: - updateOff(fdt); + updateOff(dt); break; case STATUS_PRESTART: - updatePrestart(fdt); + updatePrestart(dt); break; case STATUS_RUNNING: - updateRunning(fdt); + updateRunning(dt); break; case STATUS_STALL: - //updateStall(fdt); + //updateStall(dt); break; case STATUS_FIRE: - //updateFire(fdt); + //updateFire(dt); break; case STATUS_FAIL: - //updateFail(fdt); + //updateFail(dt); break; } - updateNozzle(fdt); - updateFuel(fdt); + updateNozzle(dt); + updateFuel(dt); updateThrust(); } @@ -332,50 +332,39 @@ const double effective_thrust = (thrust - getIdleThrust()) * thrust_scale; updateFuelConsumption(m_IdleFuelConsumption + std::max(0.0, effective_thrust * m_ThrustSpecificFuelConsumption), dt); } - const double throttle = getEffectiveThrottle(); - /* - double target = 1.0; - if (throttle <= 0.95) { - const double f = throttle / 0.95; - target = m_IdleRPM * (1.0 - f) + f; - if (rpm <= m_AfterburnerCutoffRPM) setAfterburner(false); - } else if (!m_AfterburnerFailure) { - const double f = (throttle - 0.95) * 20.0; - if (m_Afterburner) { - target = (1.0 - f) + f * m_AfterburnerRPM; - } else { - if (rpm >= m_AfterburnerMinRPM) { - if (m_AfterburnerTime <= 0.0) m_AfterburnerTime = m_AfterburnerDelay; - m_AfterburnerTime -= dt; - if (m_AfterburnerTime <= 0.0) setAfterburner(true); - } - } - } else { - setAfterburner(false); - } + spoolEngine(dt); updateTemperatureTargets(); - b_RPM->value() = rpm + (target - rpm) * m_SpoolRate * dt; - */ - double p1 = throttle * (0.625) + std::max(0.0, (throttle - 0.8) * 1.875); - static double p3 = 0.0; // XXX +} + +// Engine spooling simulation based on fig. 66 of NASA 1979. +void F16Engine::spoolEngine(double dt) { + const double throttle = getEffectiveThrottle(); + // Fig. 66(b) commanded power versus throttle position, taking the military + // setting at 80 percent rather than roughly 76 percent. + double power = throttle * (0.625) + std::max(0.0, (throttle - 0.8) * 1.875); + // TODO externalize the rate constants double r = 0.0; - if (p1 < 0.5) { - if (p3 < 0.5) { - r = (p1 - p3) * clampTo(2.0 - (p1-p3)*4.0, 0.1, 1.0); + if (power < 0.5) { + if (m_Power < 0.5) { + r = (power - m_Power) * clampTo(2.0 - (power - m_Power)*4.0, 0.1, 1.0); } else { - r = 5.0 * (0.4 - p3); + r = 5.0 * (0.4 - m_Power); } } else { - if (p3 < 0.5) { - r = (0.6 - p3) * clampTo(2.0 - (0.6-p3)*4.0, 0.1, 1.0); + if (m_Power < 0.5) { + r = (0.6 - m_Power) * clampTo(2.0 - (0.6-m_Power)*4.0, 0.1, 1.0); } else { - r = 5.0 * (p1 - p3); + r = 5.0 * (power - m_Power); } } - p3 += r * dt; - setAfterburner(p3 >= 0.5); - updateTemperatureTargets(); - b_RPM->value() = (p3 < 0.5) ? m_IdleRPM * (1.0 - 2*p3) + 2*p3 : (1.0 - p3)*2 + m_AfterburnerRPM * (2*p3 - 1.0); + m_Power = clampTo(m_Power + r * dt, 0.0, 1.0); + if (m_Power < 0.5) { // non-AB + setAfterburner(false); + b_RPM->value() = m_IdleRPM * (1.0 - 2*m_Power) + 2*m_Power; + } else { // AB + setAfterburner(true); + b_RPM->value() = (1.0 - m_Power)*2 + m_AfterburnerRPM * (2*m_Power - 1.0); + } } void F16Engine::driveEngine(double drive, double dt) { Modified: trunk/CSP/csp/cspsim/f16/F16Engine.h =================================================================== --- trunk/CSP/csp/cspsim/f16/F16Engine.h 2005-12-23 19:52:58 UTC (rev 1803) +++ trunk/CSP/csp/cspsim/f16/F16Engine.h 2005-12-23 19:53:51 UTC (rev 1804) @@ -65,6 +65,7 @@ void setAfterburner(bool on); void updateFuel(double dt); void updateNozzle(double dt); + void spoolEngine(double dt); double getEffectiveThrottle(); bool isFuelPressurized(); bool isFuelDepressurized(); @@ -94,13 +95,12 @@ double m_StartElapsedTime; double m_HangTime; double m_Blend; + double m_Power; bool m_NormalStart; DataChannel< Ref<FuelManagementSystem> >::CRefT b_FuelManagementSystem; DataChannel<double>::RefT b_FuelFlow; - // TODO add Link<jfs> - void regen(); Real m_WindSpin; Real m_DragRate; |