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-28 06:00:10
|
Author: mkrose Date: 2006-04-27 22:59:59 -0700 (Thu, 27 Apr 2006) New Revision: 1928 Modified: trunk/csp/cspsim/sound/SoundModel.cpp trunk/csp/cspsim/sound/SoundModel.h Log: Change sound index in SoundModel to use pointers rather than sample name strings. This allows the same sample to be bound to an object multiple times (e.g., for each wheel or for each engine). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1928 Modified: trunk/csp/cspsim/sound/SoundModel.cpp =================================================================== --- trunk/csp/cspsim/sound/SoundModel.cpp 2006-04-27 21:59:46 UTC (rev 1927) +++ trunk/csp/cspsim/sound/SoundModel.cpp 2006-04-28 05:59:59 UTC (rev 1928) @@ -69,7 +69,7 @@ data.sound_node = new osgAL::SoundNode(sound); data.scene_node = placeNode(data.sound_node, offset, direction); data.mode = EXTERNAL; - const bool duplicate = !m_SoundIndex.insert(std::make_pair(sound->getName(), data)).second; + const bool duplicate = !m_SoundIndex.insert(std::make_pair(sound, data)).second; if (duplicate) CSPLOG(FATAL, AUDIO) << "Duplicate sound " << sound->getName(); m_SoundGroup->addChild(data.scene_node.get()); } @@ -83,7 +83,7 @@ data.sound_node = new osgAL::SoundNode(sound); data.scene_node = placeNode(data.sound_node, offset, direction); data.mode = INTERNAL; - const bool duplicate = !m_SoundIndex.insert(std::make_pair(sound->getName(), data)).second; + const bool duplicate = !m_SoundIndex.insert(std::make_pair(sound, data)).second; if (duplicate) CSPLOG(FATAL, AUDIO) << "Duplicate sound " << sound->getName(); m_SoundGroup->addChild(data.scene_node.get()); } @@ -98,14 +98,14 @@ data.sound_node = new osgAL::SoundNode(sound); data.scene_node = data.sound_node.get(); data.mode = HEADSET; - const bool duplicate = !m_SoundIndex.insert(std::make_pair(sound->getName(), data)).second; + const bool duplicate = !m_SoundIndex.insert(std::make_pair(sound, data)).second; if (duplicate) CSPLOG(FATAL, AUDIO) << "Duplicate sound " << sound->getName(); m_SoundGroup->addChild(data.scene_node.get()); } bool SoundModel::removeSound(osgAL::SoundState *sound) { assert(sound && !sound->getName().empty()); - SoundIndex::iterator iter = m_SoundIndex.find(sound->getName()); + SoundIndex::iterator iter = m_SoundIndex.find(sound); if (iter == m_SoundIndex.end()) { CSPLOG(WARNING, AUDIO) << "Sound node '" << sound->getName() << "' not found"; return false; Modified: trunk/csp/cspsim/sound/SoundModel.h =================================================================== --- trunk/csp/cspsim/sound/SoundModel.h 2006-04-27 21:59:46 UTC (rev 1927) +++ trunk/csp/cspsim/sound/SoundModel.h 2006-04-28 05:59:59 UTC (rev 1928) @@ -88,9 +88,7 @@ Mode mode; }; - // TODO we may need to add an optional name argument to add*Sound so that the same effect/state can be added - // more than once (e.g. left engine and right engine). - typedef std::map<std::string, SoundData> SoundIndex; + typedef std::map<osgAL::SoundState*, SoundData> SoundIndex; SoundIndex m_SoundIndex; osg::ref_ptr<osg::Group> m_SoundGroup; |
From: <sv...@ww...> - 2006-04-27 21:59:53
|
Author: stormbringer Date: 2006-04-27 14:59:46 -0700 (Thu, 27 Apr 2006) New Revision: 1927 Modified: trunk/csp/cspsim/LandingGear.cpp trunk/csp/cspsim/LandingGear.h Log: Moved parts of sound related code to from GearDynamics to LandingGear Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1927 Modified: trunk/csp/cspsim/LandingGear.cpp =================================================================== --- trunk/csp/cspsim/LandingGear.cpp 2006-04-27 07:15:14 UTC (rev 1926) +++ trunk/csp/cspsim/LandingGear.cpp 2006-04-27 21:59:46 UTC (rev 1927) @@ -645,9 +645,7 @@ b_SteeringCommand = bus->getChannel(bus::LandingGear::selectSteeringCommand(getName()), false); } -DEFINE_INPUT_INTERFACE(GearDynamics) - -void GearDynamics::bindSounds(SoundModel *model, ResourceBundle *bundle) { +void LandingGear::bindSounds(SoundModel *model, ResourceBundle *bundle) { assert(model); CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds"; if (bundle) { @@ -656,17 +654,17 @@ m_TouchdownSound = SoundEffect::ExternalSound(sample, model); if (m_TouchdownSound.valid()) { CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds have sound"; - m_TouchdownSound->state()->setPosition(toOSG(m_Gear[0]->getPosition())); - m_TouchdownSound->state()->setDirection(toOSG(m_Gear[0]->getPosition())); - CSPLOG(DEBUG, AUDIO) << "gear touchdown sound position " << m_Gear[0]->getPosition(); - CSPLOG(DEBUG, AUDIO) << "gear touchdown sound direction " << m_Gear[0]->getPosition(); + m_TouchdownSound->state()->setPosition(toOSG(getPosition())); + m_TouchdownSound->state()->setDirection(toOSG(getPosition())); + CSPLOG(DEBUG, AUDIO) << "gear touchdown sound position " << getPosition(); + CSPLOG(DEBUG, AUDIO) << "gear touchdown sound direction " << getPosition(); m_TouchdownSound->state()->apply(); - //m_TouchdownSound->play(); } } CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds exit"; } +DEFINE_INPUT_INTERFACE(GearDynamics) void GearDynamics::doComplexPhysics(double) { if (b_FullyRetracted->value() && !isGearExtendSelected()) return; @@ -710,10 +708,10 @@ b_GearExtendSelected = bus->registerLocalDataChannel<bool>(bus::LandingGear::GearExtendSelected, true); for (unsigned i = 0; i < m_Gear.size(); ++i) { m_Gear[i]->registerChannels(bus); + if (sound_model) { + m_Gear[i]->bindSounds(sound_model, getResourceBundle()); + } } - if (sound_model) { - bindSounds(sound_model, getResourceBundle()); - } } void GearDynamics::importChannels(Bus *bus) { @@ -780,7 +778,7 @@ if (m_Gear[i]->getWOW()) b_WOW->value() = true; if (m_Gear[i]->getTouchdown()) { if (m_Gear[i]->getTouchdownSkid()) { - if (m_TouchdownSound.valid()) m_TouchdownSound->play(); + if (m_Gear[i]->m_TouchdownSound.valid()) m_Gear[i]->m_TouchdownSound->play(); } m_Gear[i]->resetTouchdown(); } Modified: trunk/csp/cspsim/LandingGear.h =================================================================== --- trunk/csp/cspsim/LandingGear.h 2006-04-27 07:15:14 UTC (rev 1926) +++ trunk/csp/cspsim/LandingGear.h 2006-04-27 21:59:46 UTC (rev 1927) @@ -163,6 +163,11 @@ // Returns the gear extension from 0.0 when fully retracted to 1.0 when fully extended. double getExtension() const; + void bindSounds(SoundModel *model, ResourceBundle *bundle=0); + + // Sounds + Ref<SoundEffect> m_TouchdownSound; + protected: void resetForces(); void updateWOW(Vector3 const &origin, Quat const &q, Vector3 const &vBody, Vector3 const &normalGroundBody); @@ -183,7 +188,6 @@ void updateTireRotation(double dt); void updateSteeringAngle(double dt); - protected: Vector3 m_MaxPosition; Vector3 m_Motion; @@ -312,11 +316,7 @@ Vector3 m_WindVelocityBody; double m_Height; - // Sounds - Ref<SoundEffect> m_TouchdownSound; - virtual double onUpdate(double dt); - void bindSounds(SoundModel *model, ResourceBundle *bundle=0); private: void doComplexPhysics(double x); |
From: <sv...@ww...> - 2006-04-27 07:15:21
|
Author: mkrose Date: 2006-04-27 00:15:14 -0700 (Thu, 27 Apr 2006) New Revision: 1926 Modified: trunk/csp/data/sounds/f16_touchdown.ogg Log: Trim a short blip of noise from the end of the touchdown sample. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1926 Modified: trunk/csp/data/sounds/f16_touchdown.ogg =================================================================== (Binary files differ) |
From: <sv...@ww...> - 2006-04-27 07:14:42
|
Author: mkrose Date: 2006-04-27 00:14:31 -0700 (Thu, 27 Apr 2006) New Revision: 1925 Modified: trunk/csp/cspsim/LandingGear.cpp trunk/csp/cspsim/LandingGear.h Log: Track vertical velocity and relative wheel speed on touchdown to cue sounds correctly. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1925 Modified: trunk/csp/cspsim/LandingGear.cpp =================================================================== --- trunk/csp/cspsim/LandingGear.cpp 2006-04-26 21:56:10 UTC (rev 1924) +++ trunk/csp/cspsim/LandingGear.cpp 2006-04-27 07:14:31 UTC (rev 1925) @@ -216,12 +216,15 @@ /** * Update Weight-On-Wheels flag and record touchdown point */ -void LandingGear::updateWOW(Vector3 const &origin, Quat const &q) { +void LandingGear::updateWOW(Vector3 const &origin, Quat const &q, Vector3 const &vBody, Vector3 const &normalGroundBody) { if (m_Compression > 0.02) { // first contact? - if (!b_WOW->value()) { + if (!b_WOW->value() && !m_Touchdown) { // yes, flag the touchdown m_Touchdown = true; + m_TouchdownVerticalVelocity = std::max(0.0, -dot(vBody, normalGroundBody)); + Vector3 vGroundBody = vBody - m_TouchdownVerticalVelocity * normalGroundBody; + m_TouchdownSkid = fabs(vGroundBody.length() - getWheelSpeed()) > 10.0 * (1.0 - m_TouchdownVerticalVelocity); m_TouchdownPoint = origin + q.rotate(m_Position); b_WOW->value() = true; } @@ -363,7 +366,7 @@ // update order matters updateBraking(dt); updateSuspension(dt, origin, vBody, q, height, normalGroundBody); - updateWOW(origin, q); + updateWOW(origin, q, vBody, normalGroundBody); updateWheel(dt, origin, vBody, q, normalGroundBody, true); updateTireRotation(dt); updateSteeringAngle(dt); @@ -775,8 +778,12 @@ m_Gear[i]->postSimulationStep(dt, model_origin_local, vBody, *m_Attitude, m_Height, m_GroundNormalBody); // generic WOW signal (any gear in contact with the ground triggers it) if (m_Gear[i]->getWOW()) b_WOW->value() = true; - if (m_Gear[i]->getTouchdown()) - if(m_TouchdownSound.valid()) m_TouchdownSound->play(); + if (m_Gear[i]->getTouchdown()) { + if (m_Gear[i]->getTouchdownSkid()) { + if (m_TouchdownSound.valid()) m_TouchdownSound->play(); + } + m_Gear[i]->resetTouchdown(); + } } } Modified: trunk/csp/cspsim/LandingGear.h =================================================================== --- trunk/csp/cspsim/LandingGear.h 2006-04-26 21:56:10 UTC (rev 1924) +++ trunk/csp/cspsim/LandingGear.h 2006-04-27 07:14:31 UTC (rev 1925) @@ -81,6 +81,16 @@ // Returns true if WOW has been true since the last call to resetTouchdown. bool getTouchdown() const { return m_Touchdown; } + // If getTouchdown() is true, returns a flag that indicates if the wheel + // skidded on touchdown. Skidding is assumed to happen if the wheel speed + // is significantly different from the ground speed, or if the vertical + // velocity at touchdown was high. + bool getTouchdownSkid() const { return m_TouchdownSkid; } + + // If getTouchdown() is true, returns the vertical velocity at touchdown + // in m/s. + double getTouchdownVerticalVelocity() const { return m_TouchdownVerticalVelocity; } + // Get the position of the wheel in world coordinates at the first touch // down since resetTouchdown was last called. Vector3 const &getTouchdownPoint() const { return m_TouchdownPoint; } @@ -155,7 +165,7 @@ protected: void resetForces(); - void updateWOW(Vector3 const &origin, Quat const &q); + void updateWOW(Vector3 const &origin, Quat const &q, Vector3 const &vBody, Vector3 const &normalGroundBody); void updateBraking(double dt); void updateBrakeTemperature(double dt, double dissipation, double airspeed); void updateWheel(double dt, @@ -233,6 +243,8 @@ Vector3 m_TangentForce; bool m_Touchdown; + bool m_TouchdownSkid; + double m_TouchdownVerticalVelocity; Vector3 m_TouchdownPoint; std::string m_Name; |
From: <sv...@ww...> - 2006-04-26 21:56:17
|
Author: stormbringer Date: 2006-04-26 14:56:10 -0700 (Wed, 26 Apr 2006) New Revision: 1924 Added: trunk/csp/data/sounds/f16_touchdown.ogg Log: touchdown sound Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1924 Added: trunk/csp/data/sounds/f16_touchdown.ogg =================================================================== (Binary files differ) Property changes on: trunk/csp/data/sounds/f16_touchdown.ogg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <sv...@ww...> - 2006-04-26 21:55:48
|
Author: stormbringer Date: 2006-04-26 14:55:41 -0700 (Wed, 26 Apr 2006) New Revision: 1923 Modified: trunk/csp/cspsim/LandingGear.cpp trunk/csp/cspsim/LandingGear.h Log: added touchdown sound Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1923 Modified: trunk/csp/cspsim/LandingGear.cpp =================================================================== --- trunk/csp/cspsim/LandingGear.cpp 2006-04-26 21:53:53 UTC (rev 1922) +++ trunk/csp/cspsim/LandingGear.cpp 2006-04-26 21:55:41 UTC (rev 1923) @@ -42,10 +42,18 @@ #include <csp/cspsim/GearAnimation.h> #include <csp/cspsim/KineticsChannels.h> #include <csp/cspsim/LandingGearChannels.h> +#include <csp/cspsim/SystemsModel.h> +#include <csp/cspsim/ResourceBundle.h> +#include <csp/cspsim/sound/Sample.h> +#include <csp/cspsim/sound/SoundModel.h> #include <csp/csplib/util/Math.h> #include <csp/csplib/data/ObjectInterface.h> +#include <csp/csplib/util/osg.h> +#include <osgAL/SoundState> +#include <csp/csplib/util/undef.h> + #include <cstdio> #include <iostream> #include <iomanip> @@ -636,6 +644,27 @@ DEFINE_INPUT_INTERFACE(GearDynamics) +void GearDynamics::bindSounds(SoundModel *model, ResourceBundle *bundle) { + assert(model); + CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds"; + if (bundle) { + CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds have bundle"; + Ref<const SoundSample> sample(bundle->getSoundSample("wheel_touchdown")); + m_TouchdownSound = SoundEffect::ExternalSound(sample, model); + if (m_TouchdownSound.valid()) { + CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds have sound"; + m_TouchdownSound->state()->setPosition(toOSG(m_Gear[0]->getPosition())); + m_TouchdownSound->state()->setDirection(toOSG(m_Gear[0]->getPosition())); + CSPLOG(DEBUG, AUDIO) << "gear touchdown sound position " << m_Gear[0]->getPosition(); + CSPLOG(DEBUG, AUDIO) << "gear touchdown sound direction " << m_Gear[0]->getPosition(); + m_TouchdownSound->state()->apply(); + //m_TouchdownSound->play(); + } + } + CSPLOG(DEBUG, AUDIO) << "GearDynamics::bindSounds exit"; +} + + void GearDynamics::doComplexPhysics(double) { if (b_FullyRetracted->value() && !isGearExtendSelected()) return; m_Force = m_Moment = Vector3::ZERO; @@ -671,6 +700,7 @@ void GearDynamics::registerChannels(Bus *bus) { assert(bus!=0); + SoundModel *sound_model = getModel()->getSoundModel(); b_WOW = bus->registerLocalDataChannel<bool>(bus::LandingGear::WOW, false); b_FullyRetracted = bus->registerLocalDataChannel<bool>(bus::LandingGear::FullyRetracted, false); b_FullyExtended = bus->registerLocalDataChannel<bool>(bus::LandingGear::FullyExtended, true); @@ -678,6 +708,9 @@ for (unsigned i = 0; i < m_Gear.size(); ++i) { m_Gear[i]->registerChannels(bus); } + if (sound_model) { + bindSounds(sound_model, getResourceBundle()); + } } void GearDynamics::importChannels(Bus *bus) { @@ -742,6 +775,8 @@ m_Gear[i]->postSimulationStep(dt, model_origin_local, vBody, *m_Attitude, m_Height, m_GroundNormalBody); // generic WOW signal (any gear in contact with the ground triggers it) if (m_Gear[i]->getWOW()) b_WOW->value() = true; + if (m_Gear[i]->getTouchdown()) + if(m_TouchdownSound.valid()) m_TouchdownSound->play(); } } Modified: trunk/csp/cspsim/LandingGear.h =================================================================== --- trunk/csp/cspsim/LandingGear.h 2006-04-26 21:53:53 UTC (rev 1922) +++ trunk/csp/cspsim/LandingGear.h 2006-04-26 21:55:41 UTC (rev 1923) @@ -300,7 +300,11 @@ Vector3 m_WindVelocityBody; double m_Height; + // Sounds + Ref<SoundEffect> m_TouchdownSound; + virtual double onUpdate(double dt); + void bindSounds(SoundModel *model, ResourceBundle *bundle=0); private: void doComplexPhysics(double x); |
From: <sv...@ww...> - 2006-04-26 21:54:00
|
Author: stormbringer Date: 2006-04-26 14:53:53 -0700 (Wed, 26 Apr 2006) New Revision: 1922 Modified: trunk/csp/data/xml/vehicles/aircraft/f16/gear.xml trunk/csp/data/xml/vehicles/aircraft/f16/resources.xml Log: added touchdown sound to XML Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1922 Modified: trunk/csp/data/xml/vehicles/aircraft/f16/gear.xml =================================================================== --- trunk/csp/data/xml/vehicles/aircraft/f16/gear.xml 2006-04-24 16:29:17 UTC (rev 1921) +++ trunk/csp/data/xml/vehicles/aircraft/f16/gear.xml 2006-04-26 21:53:53 UTC (rev 1922) @@ -106,4 +106,5 @@ </Object> </Object> </List> + <Path name="resources">resources</Path> </Object> Modified: trunk/csp/data/xml/vehicles/aircraft/f16/resources.xml =================================================================== --- trunk/csp/data/xml/vehicles/aircraft/f16/resources.xml 2006-04-24 16:29:17 UTC (rev 1921) +++ trunk/csp/data/xml/vehicles/aircraft/f16/resources.xml 2006-04-26 21:53:53 UTC (rev 1922) @@ -1,26 +1,34 @@ -<Object class="ResourceBundle"> - <List name="sounds"> - <Object class="SoundSample"> - <String name="name">low_speed_warning_sound</String> - <External name="filename">../data/sounds/f16_low_speed_warning_tone.ogg</External> - <Bool name="looping">true</Bool> - </Object> - <Object class="SoundSample"> - <String name="name">configuration_warning_sound</String> - <External name="filename">../data/sounds/f16_configuration_warning_tone.ogg</External> - <Bool name="looping">true</Bool> - </Object> - <Object class="SoundSample"> - <String name="name">altitude_warning_sample</String> - <External name="filename">../data/sounds/f16_betty_altitude.ogg</External> - </Object> - <Object class="SoundSample"> - <String name="name">engine</String> - <External name="filename">../data/sounds/engine03.ogg</External> - <Bool name="looping">true</Bool> - <Float name="reference_distance">70.0</Float> - <Float name="max_distance">40000.0</Float> - <Int name="priority">10</Int> - </Object> - </List> -</Object> +<Object class="ResourceBundle"> + <List name="sounds"> + <Object class="SoundSample"> + <String name="name">low_speed_warning_sound</String> + <External name="filename">../data/sounds/f16_low_speed_warning_tone.ogg</External> + <Bool name="looping">true</Bool> + </Object> + <Object class="SoundSample"> + <String name="name">configuration_warning_sound</String> + <External name="filename">../data/sounds/f16_configuration_warning_tone.ogg</External> + <Bool name="looping">true</Bool> + </Object> + <Object class="SoundSample"> + <String name="name">altitude_warning_sample</String> + <External name="filename">../data/sounds/f16_betty_altitude.ogg</External> + </Object> + <Object class="SoundSample"> + <String name="name">engine</String> + <External name="filename">../data/sounds/engine03.ogg</External> + <Bool name="looping">true</Bool> + <Float name="reference_distance">70.0</Float> + <Float name="max_distance">40000.0</Float> + <Int name="priority">10</Int> + </Object> + <Object class="SoundSample"> + <String name="name">wheel_touchdown</String> + <External name="filename">../data/sounds/f16_touchdown.ogg</External> + <Bool name="looping">false</Bool> + <Float name="reference_distance">70.0</Float> + <Float name="max_distance">400.0</Float> + <Int name="priority">10</Int> + </Object> + </List> +</Object> |
From: <sv...@ww...> - 2006-04-24 16:29:25
|
Author: mkrose Date: 2006-04-24 09:29:17 -0700 (Mon, 24 Apr 2006) New Revision: 1921 Modified: trunk/csp/dist/win/demo/template/COPYING.txt Log: Add PLY copyright and license notice to the demo template. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1921 Modified: trunk/csp/dist/win/demo/template/COPYING.txt =================================================================== --- trunk/csp/dist/win/demo/template/COPYING.txt 2006-04-24 08:09:19 UTC (rev 1920) +++ trunk/csp/dist/win/demo/template/COPYING.txt 2006-04-24 16:29:17 UTC (rev 1921) @@ -129,7 +129,13 @@ Licensed under the terms of the GNU Library General Public License version 2.1 or later. http://www.vrlab.umu.se/research/osgAL/ +PLY (Python Lex-Yacc) +Version 1.5 (June 1, 2004) +Copyright (C) 2001-2004 David M. Beazley +Licensed under the terms of the GNU Library General Public License version 2.1 or later. +http://www.dabeaz.com/ply/ply.html + Microsoft Visual C++ Runtime Libraries -------------------------------------- This package includes the Microsoft Visual C++ runtime libraries (msvcrt80.dll and msvcp80.dll). These libraries may be used and redistributed as part of this package, subject to the following terms: |
From: <sv...@ww...> - 2006-04-24 08:09:26
|
Author: mkrose Date: 2006-04-24 01:09:19 -0700 (Mon, 24 Apr 2006) New Revision: 1920 Modified: trunk/csp/dist/win/demo/demo.nsi Log: Add finish page to the installer and better start menu shortcuts. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1920 Modified: trunk/csp/dist/win/demo/demo.nsi =================================================================== --- trunk/csp/dist/win/demo/demo.nsi 2006-04-24 07:47:59 UTC (rev 1919) +++ trunk/csp/dist/win/demo/demo.nsi 2006-04-24 08:09:19 UTC (rev 1920) @@ -23,10 +23,22 @@ !define MUI_HEADERIMAGE_BITMAP "logo.bmp" !define MUI_ABORTWARNING - !insertmacro MUI_PAGE_LICENSE "csp-demo-${VERSION}\COPYING" + !define MUI_FINISHPAGE_RUN + !define MUI_FINISHPAGE_RUN_TEXT "Run demo" + !define MUI_FINISHPAGE_RUN_FUNCTION LaunchLink + !define MUI_FINISHPAGE_RUN_NOTCHECKED + !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" + !define MUI_FINISHPAGE_SHOWREADME_TEXT "View release notes" + !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED + !define MUI_FINISHPAGE_LINK "Online release notes and support" + !define MUI_FINISHPAGE_LINK_LOCATION "http://csp.sf.net/wiki/Windows_Demo_0.6" + !define MUI_FINISHPAGE_NOREBOOTSUPPORT + + !insertmacro MUI_PAGE_LICENSE "csp-demo-${VERSION}\COPYING.txt" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES @@ -39,7 +51,6 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "CSP Demo Installer" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}" - Section "Demo" SecDemo SetOutPath "$INSTDIR" @@ -55,6 +66,7 @@ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\readme.lnk" "$INSTDIR\README.txt" SetOutPath "$INSTDIR\bin" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\sim.lnk" "$INSTDIR\bin\sim.exe" "" "" "" "" "" "Run demo" CreateShortCut "$INSTDIR\sim.lnk" "$INSTDIR\bin\sim.exe" "" "" "" "" "" "Run demo" @@ -70,6 +82,7 @@ !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\sim.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\readme.lnk" StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" startMenuDeleteLoop: ClearErrors @@ -82,3 +95,8 @@ DeleteRegKey /ifempty HKCU "Software\csp-demo-${VERSION}" SectionEnd + +Function LaunchLink + ExecShell "" "$INSTDIR\sim.lnk" +FunctionEnd + |
From: <sv...@ww...> - 2006-04-24 07:48:11
|
Author: mkrose Date: 2006-04-24 00:47:59 -0700 (Mon, 24 Apr 2006) New Revision: 1919 Modified: trunk/csp/dist/win/demo/logo.bmp trunk/csp/dist/win/demo/logo.xcf Log: Remove some empty space at the bottom of the logo. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1919 Modified: trunk/csp/dist/win/demo/logo.bmp =================================================================== (Binary files differ) Modified: trunk/csp/dist/win/demo/logo.xcf =================================================================== (Binary files differ) |
From: <sv...@ww...> - 2006-04-24 07:44:22
|
Author: mkrose Date: 2006-04-24 00:44:14 -0700 (Mon, 24 Apr 2006) New Revision: 1918 Added: trunk/csp/dist/win/demo/logo.xcf Modified: trunk/csp/dist/win/demo/logo.bmp Log: Update demo installer logo. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1918 Modified: trunk/csp/dist/win/demo/logo.bmp =================================================================== (Binary files differ) Added: trunk/csp/dist/win/demo/logo.xcf =================================================================== (Binary files differ) Property changes on: trunk/csp/dist/win/demo/logo.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <sv...@ww...> - 2006-04-24 07:31:34
|
Author: mkrose Date: 2006-04-24 00:31:23 -0700 (Mon, 24 Apr 2006) New Revision: 1917 Modified: trunk/csp/dist/win/demo/logo.ico Log: Use white instead of transparency in logo icons so that the interior edges are antialiased (since the alpha channel is only one bit). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1917 Modified: trunk/csp/dist/win/demo/logo.ico =================================================================== (Binary files differ) |
From: <sv...@ww...> - 2006-04-24 05:47:10
|
Author: mkrose Date: 2006-04-23 22:47:02 -0700 (Sun, 23 Apr 2006) New Revision: 1916 Added: branches/csp-demo-0.6.0/ Log: Create release branch for demo version 0.6.0. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1916 Copied: branches/csp-demo-0.6.0 (from rev 1915, trunk) |
From: <sv...@ww...> - 2006-04-24 03:37:18
|
Author: mkrose Date: 2006-04-23 20:37:05 -0700 (Sun, 23 Apr 2006) New Revision: 1915 Modified: trunk/csp/SConstruct Log: Add /W3 to the windows build flags. The code is almost entirely clean at this warning level. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1915 Modified: trunk/csp/SConstruct =================================================================== --- trunk/csp/SConstruct 2006-04-24 03:22:58 UTC (rev 1914) +++ trunk/csp/SConstruct 2006-04-24 03:37:05 UTC (rev 1915) @@ -153,7 +153,7 @@ class PlatformSettings: def customize_win(self, env): - env['CXXFLAGS'] = Split('/GR /MD /O2 /EHsc /nologo') + env['CXXFLAGS'] = Split('/GR /MD /O2 /EHsc /W3 /nologo') env.AppendUnique(CPPDEFINES=Split('WIN32 __WIN32__ _USRDLL _DLL NDEBUG _CRT_SECURE_NO_DEPRECATE')) env.AppendUnique(LINKFLAGS=Split('/INCREMENTAL:NO /RELEASE /nologo')) env.AppendUnique(SHLINKFLAGS=Split('/INCREMENTAL:NO /RELEASE /nologo')) |
From: <sv...@ww...> - 2006-04-24 03:23:14
|
Author: mkrose Date: 2006-04-23 20:22:58 -0700 (Sun, 23 Apr 2006) New Revision: 1914 Added: trunk/csp/dist/win/demo/README.makedemo trunk/csp/dist/win/demo/logo.bmp Modified: trunk/csp/dist/win/demo/template/README.txt Log: Update demo readme, add demo installer logo, add demo assembly instructions. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1914 Added: trunk/csp/dist/win/demo/README.makedemo =================================================================== --- trunk/csp/dist/win/demo/README.makedemo 2006-04-24 03:21:31 UTC (rev 1913) +++ trunk/csp/dist/win/demo/README.makedemo 2006-04-24 03:22:58 UTC (rev 1914) @@ -0,0 +1,34 @@ +How to build and release a new demo. Please update these instructions as +needed. + +* Decide on the demo version number (x.y) +* Copy trunk/csp to branches/csp-demo-x.y/csp at the desired revision number. +* Check out branches/csp-demo-x.y/csp. +* Build all targets (scons all) +* Run 'python makedemo.py x.y' +* Generate the hid files and copy them to csp-demo-x.y/data/input. + - Verify that joystick axis 2 is mapped to the throttle. +* Copy terrain files to csp-demo-x.y/data/terrain from an existing + demo package. At present these are the standard balkan terrain + tiles from 4-4 to 10-10. All other tiles have been set to zero + elevation to save space. Note also that tile 7-7 (where the + airbase is located) has been modified slightly from the version + available in the balkan terrain release on SourceForge. +* Submit to the branch any changes that are specific to this release. +* All other changes should be made in a separate client workspace + checked out from trunk/csp and merged into the release branch as + needed. +* Run 'makensis /DVERSION=x.y demo.nsi' +* Test the demo installer locally, correcting any problems and + repeating earlier steps as needed. +* From the directory containing the top-level csp directory, run: + find csp | grep -v /\\. | grep -v csp/data/ | grep -v csp/dist | \ + grep -v \\.log | grep -v \\.pyc | xargs tar --no-recursion \ + -vcjf csp-demo-x.y-src.tbz' + tar -vcjf csp-demo-x.y-data.tbz csp/data +* Distribute the demo installer to other developers for testing. +* Add a wiki page Windows_Demo_x.y, copying and updating content from + the previous version as needed. +* When all developers have signed off on the new demo, post the installer, + source, and data packages to SourceForge. +* Post an announcement on the forums. Added: trunk/csp/dist/win/demo/logo.bmp =================================================================== (Binary files differ) Property changes on: trunk/csp/dist/win/demo/logo.bmp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/csp/dist/win/demo/template/README.txt =================================================================== --- trunk/csp/dist/win/demo/template/README.txt 2006-04-24 03:21:31 UTC (rev 1913) +++ trunk/csp/dist/win/demo/template/README.txt 2006-04-24 03:22:58 UTC (rev 1914) @@ -1,15 +1,15 @@ Combat Simulator Project Demo, version %(VERSION)s, built %(DATE)s -This is a demonstration release of the CSP simulator. Please visit the -CSP forums and wiki for additional information and help (links below). +To run the demo it is recommended that you have at least a 1 GHz CPU, 512 MB +of ram, and a modern 3D accelerated graphics card (GF4 equivalent or better). +A joystick or HOTAS is optional but recommended. -To run this demo, it is recommended that you have at least a 1 GHz CPU, -512 MB of ram, and a modern 3D accelerated graphics card (GF4 equivalent -or better). A joystick or HOTAS is optional but recommended. +Release notes, tips, and general information about this demo can be found at +http://csp.sf.net/wiki/Windows_Demo_%(VERSION)s Enjoy! ---------------------------------------------------------------------------- -Demo information : http://csp.sf.net/wiki/Demo -Forums : http://csp.sf.net/forum +Wiki : http://csp.sf.net/wiki +Forums : http://csp.sf.net/forum |
From: <sv...@ww...> - 2006-04-24 03:21:42
|
Author: mkrose Date: 2006-04-23 20:21:31 -0700 (Sun, 23 Apr 2006) New Revision: 1913 Modified: trunk/csp/cspsim/LandingGear.cpp Log: Add a dead zone, non-linear response, and speed limiter to the steering command. This is mainly intended as a short term fix to make steering more user-friendly. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1913 Modified: trunk/csp/cspsim/LandingGear.cpp =================================================================== --- trunk/csp/cspsim/LandingGear.cpp 2006-04-24 00:20:06 UTC (rev 1912) +++ trunk/csp/cspsim/LandingGear.cpp 2006-04-24 03:21:31 UTC (rev 1913) @@ -331,6 +331,14 @@ void LandingGear::updateSteeringAngle(double /*dt*/) { if (m_SteeringLimit > 0 && b_SteeringCommand.valid()) { double setting = clampTo(b_SteeringCommand->value(), -1.0, 1.0); + + // add a deadzone and more gentle response for small commands. + setting = setting * std::max(setting * setting - 0.01, 0.0); + + // ad-hoc velocity limiter + double v = m_TireRotationRate * m_TireRadius; + setting *= clampTo(1.1 - 0.1 * v, 0.1, 1.0); + m_SteeringAngle = setting * m_SteeringLimit; m_SteerTransform.makeRotate(toRadians(m_SteeringAngle), Vector3::ZAXIS); } |
From: <sv...@ww...> - 2006-04-24 00:20:16
|
Author: mkrose Date: 2006-04-23 17:20:06 -0700 (Sun, 23 Apr 2006) New Revision: 1912 Modified: trunk/csp/dist/win/demo/makedemo.py Log: Rename demo from cspsim-demo-x.y to just csp-demo-x.y. Fix test_objects path. Add icon to sim.exe. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1912 Modified: trunk/csp/dist/win/demo/makedemo.py =================================================================== --- trunk/csp/dist/win/demo/makedemo.py 2006-04-24 00:16:28 UTC (rev 1911) +++ trunk/csp/dist/win/demo/makedemo.py 2006-04-24 00:20:06 UTC (rev 1912) @@ -37,7 +37,7 @@ PATH = os.environ.get('PATH', '') if PATH.split(os.pathsep)[0] != CSPDEVPACK_BIN: print >>sys.stderr, 'WARNING: placing %s at start of PATH' % CSPDEVPACK_BIN - os.environ['PATH'] = '%s;%s' % (CSPDEVPACK, os.environ.get('PATH', '')) + os.environ['PATH'] = '%s;%s' % (CSPDEVPACK_BIN, os.environ.get('PATH', '')) try: import csp @@ -103,7 +103,7 @@ # TODO force msvcrt80.dll and msvcrp80.dll to be included? def make_demo(version): TEMPLATE = 'template' - DEMO = 'cspsim-demo-%s' % version + DEMO = 'csp-demo-%s' % version if not os.path.exists(TEMPLATE): error('%s not found!' % TEMPLATE) @@ -122,21 +122,25 @@ DIST_DIR = os.path.join(DEMO, 'bin') print 'Running py2exe to create %s' % DIST_DIR - TEST_OBJECTS = os.path.join(BIN, 'test_objects.py') + TARGET = os.path.join(BIN, 'sim.py') + CONFIG = os.path.join(BIN, 'sim.ini') + TEST_OBJECTS = os.path.join(BIN, 'test_objects') opts = { 'py2exe': { 'excludes': ['dl'], 'dist_dir': DIST_DIR, 'packages': ['encodings'], + 'dll_excludes': ['msvcp80.dll', 'msvcr80.dll'], } } + windows = { + 'script': TARGET, + 'icon_resources':[(1, 'logo.ico')] + } - TARGET = os.path.join(BIN, 'sim.py') - CONFIG = os.path.join(BIN, 'sim.ini') + setup(options=opts, windows=[windows], console=[TARGET], data_files=[CONFIG, TEST_OBJECTS]) - setup(options=opts, console=[TARGET], data_files=[CONFIG]) - # not all dependencies can be found by py2exe, so ensure that all # dlls in the devpack are copied. same for csp modules. DEVPACK_DLLS = glob(os.path.join(DP_BIN, '*.dll')) |
From: <sv...@ww...> - 2006-04-24 00:16:35
|
Author: mkrose Date: 2006-04-23 17:16:28 -0700 (Sun, 23 Apr 2006) New Revision: 1911 Added: trunk/csp/dist/win/demo/template/COPYING.txt trunk/csp/dist/win/demo/template/LICENSES/GPL-2.txt trunk/csp/dist/win/demo/template/LICENSES/GPL.txt trunk/csp/dist/win/demo/template/LICENSES/LGPL-2.1.txt trunk/csp/dist/win/demo/template/LICENSES/LGPL-2.txt trunk/csp/dist/win/demo/template/LICENSES/LGPL.txt trunk/csp/dist/win/demo/template/LICENSES/libjpeg.txt trunk/csp/dist/win/demo/template/LICENSES/libpng.txt trunk/csp/dist/win/demo/template/LICENSES/openal.txt trunk/csp/dist/win/demo/template/LICENSES/osg.txt trunk/csp/dist/win/demo/template/LICENSES/python.txt trunk/csp/dist/win/demo/template/LICENSES/xiph.txt trunk/csp/dist/win/demo/template/LICENSES/zlib.txt trunk/csp/dist/win/demo/template/README.txt Removed: trunk/csp/dist/win/demo/template/COPYING trunk/csp/dist/win/demo/template/LICENSES/GPL trunk/csp/dist/win/demo/template/LICENSES/GPL-2 trunk/csp/dist/win/demo/template/LICENSES/LGPL trunk/csp/dist/win/demo/template/LICENSES/LGPL-2 trunk/csp/dist/win/demo/template/LICENSES/LGPL-2.1 trunk/csp/dist/win/demo/template/LICENSES/libjpeg trunk/csp/dist/win/demo/template/LICENSES/libpng trunk/csp/dist/win/demo/template/LICENSES/openal trunk/csp/dist/win/demo/template/LICENSES/osg trunk/csp/dist/win/demo/template/LICENSES/python trunk/csp/dist/win/demo/template/LICENSES/xiph trunk/csp/dist/win/demo/template/LICENSES/zlib trunk/csp/dist/win/demo/template/README Log: Rename various text files in the demo distribution to have a 'txt' extension. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1911 Diff omitted (157319 bytes). |
From: <sv...@ww...> - 2006-04-24 00:14:10
|
Author: mkrose Date: 2006-04-23 17:14:02 -0700 (Sun, 23 Apr 2006) New Revision: 1910 Added: trunk/csp/dist/win/demo/demo.nsi trunk/csp/dist/win/demo/template/LICENSES/openal trunk/csp/dist/win/demo/template/LICENSES/xiph Modified: trunk/csp/dist/win/demo/template/COPYING trunk/csp/dist/win/demo/template/README Log: Update readme and license text. Include version and copyright notices for sound libs and msvcrt. Add startmenu shortcuts to demo installer. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1910 Diff omitted (17281 bytes). |
From: <sv...@ww...> - 2006-04-23 23:46:12
|
Author: mkrose Date: 2006-04-23 16:46:05 -0700 (Sun, 23 Apr 2006) New Revision: 1909 Modified: trunk/csp/dist/win/demo/logo.ico Log: Include 48x48 icon, clean up other sizes slightly. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1909 Modified: trunk/csp/dist/win/demo/logo.ico =================================================================== (Binary files differ) |
From: <sv...@ww...> - 2006-04-23 23:26:03
|
Author: mkrose Date: 2006-04-23 16:25:55 -0700 (Sun, 23 Apr 2006) New Revision: 1908 Added: trunk/csp/dist/win/demo/logo.ico Log: Add logo icon for windows demos. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1908 Added: trunk/csp/dist/win/demo/logo.ico =================================================================== (Binary files differ) Property changes on: trunk/csp/dist/win/demo/logo.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <sv...@ww...> - 2006-04-23 19:20:23
|
Author: mkrose Date: 2006-04-23 12:20:14 -0700 (Sun, 23 Apr 2006) New Revision: 1907 Modified: trunk/csp/data/models/aircraft/f16/f16dj.osg Log: Fix nozzle animation so that it doesn't cycle back to fully closed when it should be fully open. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1907 Diff omitted (30134 bytes). |
From: <sv...@ww...> - 2006-04-23 17:53:36
|
Author: mkrose Date: 2006-04-23 10:53:29 -0700 (Sun, 23 Apr 2006) New Revision: 1906 Modified: trunk/csp/tools/build.py Log: Run swig without a fully qualified path to work around problems with spaces in path names under Windows. "swig" has to be in the PATH, but that was also true before. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1906 Modified: trunk/csp/tools/build.py =================================================================== --- trunk/csp/tools/build.py 2006-04-21 05:50:23 UTC (rev 1905) +++ trunk/csp/tools/build.py 2006-04-23 17:53:29 UTC (rev 1906) @@ -782,17 +782,13 @@ env.Append(SCANNERS = scanner) -SWIG = 'swig' - 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) |
From: <sv...@ww...> - 2006-04-21 05:50:29
|
Author: mkrose Date: 2006-04-20 22:50:23 -0700 (Thu, 20 Apr 2006) New Revision: 1905 Removed: trunk/csp/bin/test_objects.py Modified: trunk/csp/bin/sim.py trunk/csp/bin/test_objects Log: Finish converting test_objects.py from a module to an executed script. (This will simplify py2exe distribution.) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1905 Modified: trunk/csp/bin/sim.py =================================================================== --- trunk/csp/bin/sim.py 2006-04-21 05:49:21 UTC (rev 1904) +++ trunk/csp/bin/sim.py 2006-04-21 05:50:23 UTC (rev 1905) @@ -198,15 +198,10 @@ Run the specified script to add test objects to the simulation. At least one vehicle must be added. """ - if file: - if file.endswith('.py'): file = file[:-3] + if file and os.path.exists(file): try: - mod = __import__(file, {}, {}, []) - #import csp.test_objects as mod - except ImportError: - fail('Unable to import test objects file "%s"' % file) - try: - mod.create(sim) + env = {'csp': csp, 'sim': sim} + execfile(file, env) except Exception, e: fail('Error executing objects script "%s":\n %s' % (file, e)) @@ -362,6 +357,6 @@ csp.base.app.addOption('--logcat', metavar='CATLIST', default=None, help='set log category filter (e.g., "object,physics")') csp.base.app.addOption('--pause', action='store_true', default=False, help='pause on startup for attaching a debugger') csp.base.app.addOption('--dumpdata', action='store_true', default=False, help='dump the contents of the data archive') - csp.base.app.addOption('--objects', metavar='PATH', default='test_objects.py', help='python script to place test objects') + csp.base.app.addOption('--objects', metavar='PATH', default='test_objects', help='python script to place test objects') csp.base.app.start() Modified: trunk/csp/bin/test_objects =================================================================== --- trunk/csp/bin/test_objects 2006-04-21 05:49:21 UTC (rev 1904) +++ trunk/csp/bin/test_objects 2006-04-21 05:50:23 UTC (rev 1905) @@ -1,3 +1,5 @@ +# -*- python -*- + # Combat Simulator Project # Copyright (C) 2002 The Combat Simulator Project # http://csp.sourceforge.net @@ -16,57 +18,38 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -from csp import csplib -## # Create some test vehicles and other objects. The first vehicle created -# will be the initial active object. -# -# The create() method checks the terrain name (set in XML) and dispatches -# the appropriate object creation routine. This is a temporary hack until -# the theater code is developed to the point that objects are generated +# will be the initial active object. This is a temporary hack until the +# theater code is developed to the point that objects are generated # automatically via a campaign engine. -def create(app): - terrain = app.getTerrainName() - if terrain == "Balkan Terrain": - createBalkan(app) - elif terrain == "NCA Terrain": - createNCA(app) +# shorthand -def createBalkan(app): - v = csplib.Vector3 - m = csplib.LLA() - vehicle = app.createVehicle - vehicle("sim:vehicles.aircraft.f16dj", v(-29495, -10530, 87.8), v(0, 0, 0), v(0.0, 0.0, 180.0)) - vehicle("sim:vehicles.aircraft.m2k", v(-29510, -10530, 87.8), v(0, 0, 0), v(0.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 98.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 108.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 118.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 118.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 1000), v(0, 100.0, 0), v(5.0, 0.0, 0.0)) +vec = csp.csplib.Vector3 +vehicle = sim.createVehicle -def createNCA(app): - v = csplib.Vector3 - m = csplib.LLA() - vehicle = app.createVehicle - vehicle("sim:vehicles.aircraft.m2k", v(0, 0, 1200.0), v(0, 100.0, 0), v(5.0, 0.0, 0.0)) - vehicle("sim:vehicles.aircraft.f16dj", v(10, 10, 1000.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0)) +m2k = "sim:vehicles.aircraft.m2k" +f16dj = "sim:vehicles.aircraft.f16dj" +def createBalkan(): + vehicle(f16dj, vec(-29495, -10530, 87.8), vec(0, 0, 0), vec(0.0, 0.0, 180.0)) + vehicle(m2k, vec(-29510, -10530, 87.8), vec(0, 0, 0), vec(0.0, 0.0, 180.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483010, 499010, 190.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483025, 499015, 190.2), v(0, 100.0, 0), v(5.0, 0.0, 240.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483040, 499020, 190.2), v(0, 100.0, 0), v(8.0, 1.0, 240.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483055, 499025, 190.2), v(0, 100.0, 0), v(12.0, 3.0, 240.0)) +def createNCA(): + vehicle(m2k, vec(0, 0, 1200.0), vec(0, 100.0, 0), vec(5.0, 0.0, 0.0)) + vehicle(f16dj, vec(10, 10, 1000.2), vec(0, 100.0, 0), vec(2.0, 2.0, 140.0)) -# m.setDegrees(37.5, -121.0, 600) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 2.0)) +def unknown(): + print "Unrecognized terrain name: %s" % sim.getTerrainName() -# m.setDegrees(37.6, -121.41, 2090) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# m.setDegrees(40.6, 14.42, 2090) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# m.setDegrees(42.6, 14.43, 2090) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# + +dispatch = { + "Balkan Terrain": createBalkan, + "NCA Terrain": createNCA, +} + +create = dispatch.get(sim.getTerrainName(), unknown) +create() + Deleted: trunk/csp/bin/test_objects.py =================================================================== --- trunk/csp/bin/test_objects.py 2006-04-21 05:49:21 UTC (rev 1904) +++ trunk/csp/bin/test_objects.py 2006-04-21 05:50:23 UTC (rev 1905) @@ -1,72 +0,0 @@ -# Combat Simulator Project -# Copyright (C) 2002 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. - -from csp import csplib - -## -# Create some test vehicles and other objects. The first vehicle created -# will be the initial active object. -# -# The create() method checks the terrain name (set in XML) and dispatches -# the appropriate object creation routine. This is a temporary hack until -# the theater code is developed to the point that objects are generated -# automatically via a campaign engine. - -def create(app): - terrain = app.getTerrainName() - if terrain == "Balkan Terrain": - createBalkan(app) - elif terrain == "NCA Terrain": - createNCA(app) - -def createBalkan(app): - v = csplib.Vector3 - m = csplib.LLA() - vehicle = app.createVehicle - vehicle("sim:vehicles.aircraft.f16dj", v(-29495, -10530, 87.8), v(0, 0, 0), v(0.0, 0.0, 180.0)) - vehicle("sim:vehicles.aircraft.m2k", v(-29510, -10530, 87.8), v(0, 0, 0), v(0.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 98.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 108.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 118.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 118.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) - #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 1000), v(0, 100.0, 0), v(5.0, 0.0, 0.0)) - -def createNCA(app): - v = csplib.Vector3 - m = csplib.LLA() - vehicle = app.createVehicle - vehicle("sim:vehicles.aircraft.m2k", v(0, 0, 1200.0), v(0, 100.0, 0), v(5.0, 0.0, 0.0)) - vehicle("sim:vehicles.aircraft.f16dj", v(10, 10, 1000.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0)) - - - -# vehicle("sim:vehicles.aircraft.m2k", v(483010, 499010, 190.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483025, 499015, 190.2), v(0, 100.0, 0), v(5.0, 0.0, 240.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483040, 499020, 190.2), v(0, 100.0, 0), v(8.0, 1.0, 240.0)) -# vehicle("sim:vehicles.aircraft.m2k", v(483055, 499025, 190.2), v(0, 100.0, 0), v(12.0, 3.0, 240.0)) - -# m.setDegrees(37.5, -121.0, 600) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 2.0)) - -# m.setDegrees(37.6, -121.41, 2090) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# m.setDegrees(40.6, 14.42, 2090) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# m.setDegrees(42.6, 14.43, 2090) -# vehicle("sim:vehicles.aircraft.m2k", m, v(0, 100.0, 0), v(2.0, 2.0, 140.0)) -# |
From: <sv...@ww...> - 2006-04-21 05:49:28
|
Author: mkrose Date: 2006-04-20 22:49:21 -0700 (Thu, 20 Apr 2006) New Revision: 1904 Added: trunk/csp/bin/test_objects Log: Begin converting test_objects.py from a module to an executed script. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1904 Copied: trunk/csp/bin/test_objects (from rev 1872, trunk/csp/bin/test_objects.py) |