Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv30307 Modified Files: Tag: simdata AeroDynamics.cpp AircraftObject.cpp CSPSim.cpp Colorspace.cpp Config.cpp DynamicObject.cpp EventMapIndex.cpp EventMapping.cpp HID.cpp InputInterface.cpp LogoScreen.cpp ObjectModel.cpp SimObject.cpp SimpleConfig.cpp TerrainObject.cpp VirtualBattlefield.cpp main.cpp Log Message: no message Index: AeroDynamics.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/AeroDynamics.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** AeroDynamics.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- AeroDynamics.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 30,33 **** --- 30,34 ---- #include <SimData/InterfaceRegistry.h> #include <SimData/Math.h> + #include <SimData/Quaternion.h> using simdata::RadiansToDegrees; *************** *** 53,57 **** void AeroDynamics::pack(simdata::Packer& p) const { ! simdata::Object::pack(p); p.pack(m_WingSpan); --- 54,58 ---- void AeroDynamics::pack(simdata::Packer& p) const { ! Object::pack(p); p.pack(m_WingSpan); *************** *** 106,110 **** void AeroDynamics::unpack(simdata::UnPacker& p) { ! simdata::Object::unpack(p); p.unpack(m_WingSpan); --- 107,111 ---- void AeroDynamics::unpack(simdata::UnPacker& p) { ! Object::unpack(p); p.unpack(m_WingSpan); *************** *** 699,703 **** simdata::Vector3 AeroDynamics::LocalToBody(const simdata::Vector3 & vec ) { ! return QVRotate( qOrientation.Bar(), vec ); } --- 700,704 ---- simdata::Vector3 AeroDynamics::LocalToBody(const simdata::Vector3 & vec ) { ! return simdata::QVRotate( qOrientation.Bar(), vec ); } *************** *** 705,709 **** simdata::Vector3 AeroDynamics::BodyToLocal(const simdata::Vector3 & vec ) { ! return QVRotate( qOrientation, vec ); } --- 706,710 ---- simdata::Vector3 AeroDynamics::BodyToLocal(const simdata::Vector3 & vec ) { ! return simdata::QVRotate( qOrientation, vec ); } Index: AircraftObject.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/AircraftObject.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** AircraftObject.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- AircraftObject.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 188,192 **** m_Aileron = m_AileronInput * m_AileronMax * 0.017; m_Elevator = m_ElevatorInput * m_ElevatorMax * 0.017; ! m_Throttle = (m_ThrottleInput+1.0) * 0.5; } --- 188,192 ---- m_Aileron = m_AileronInput * m_AileronMax * 0.017; m_Elevator = m_ElevatorInput * m_ElevatorMax * 0.017; ! m_Throttle = (-m_ThrottleInput+1.0) * 0.5; } Index: CSPSim.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** CSPSim.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- CSPSim.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 23,27 **** */ ! #ifdef WIN32 #include <windows.h> #endif --- 23,27 ---- */ ! #ifdef _WIN32 #include <windows.h> #endif *************** *** 38,42 **** #include "DT_drawtext.h" ! #include "DemeterException.h" #include "Config.h" --- 38,42 ---- #include "DT_drawtext.h" ! //#include "DemeterException.h" #include "Config.h" Index: Colorspace.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Colorspace.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Colorspace.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- Colorspace.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 13,18 **** */ ! #include "Color.h" ! #include <stdio.h> #define PI 3.14159265358979323846264338327950288419716939937510 --- 13,18 ---- */ ! #include "Colorspace.h" ! //#include <stdio.h> #define PI 3.14159265358979323846264338327950288419716939937510 *************** *** 815,819 **** "HLS", "HSV", "RGB"}; ! void Color::set(float A, float B, float C, space_t S=RGB, bool check) { if (check) { switch (S) { --- 815,819 ---- "HLS", "HSV", "RGB"}; ! void Color::set(float A, float B, float C, space_t S, bool check) { if (check) { switch (S) { *************** *** 1067,1070 **** --- 1067,1071 ---- << c.getB() << ", " << c.getC() << "]"; + return os; } Index: Config.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Config.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Config.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- Config.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 1,2 **** --- 1,7 ---- + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning (disable : 4786) + # endif + + #include "Config.h" #include "Platform.h" *************** *** 13,17 **** try { found_config = g_Config.open(ini_path); ! } catch (ConfigError &e) { return false; } --- 18,22 ---- try { found_config = g_Config.open(ini_path); ! } catch (ConfigError &) { return false; } *************** *** 21,23 **** --- 26,29 ---- return found_config; } + Index: DynamicObject.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/DynamicObject.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** DynamicObject.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- DynamicObject.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 140,148 **** if (m_Placer) { simdata::Vector3 motion = m_PrevPosition - m_LocalPosition; ! simdata::Vector3 motionBody = QVRotate(m_qOrientation.Bar(), motion); osg::BoundingSphere s = m_rpNode.get()->getBound(); float r = s.radius(); osg::Vec3 c = s.center(); ! osg::Vec3Array* pl = osgNew osg::Vec3Array; osg::Vec3 B(0.0,-0.8 * r, 0.0); B = B + osg::Vec3(motionBody.x, motionBody.y, motionBody.z); --- 140,148 ---- if (m_Placer) { simdata::Vector3 motion = m_PrevPosition - m_LocalPosition; ! simdata::Vector3 motionBody = simdata::QVRotate(m_qOrientation.Bar(), motion); osg::BoundingSphere s = m_rpNode.get()->getBound(); float r = s.radius(); osg::Vec3 c = s.center(); ! osg::Vec3Array* pl = new osg::Vec3Array; osg::Vec3 B(0.0,-0.8 * r, 0.0); B = B + osg::Vec3(motionBody.x, motionBody.y, motionBody.z); Index: EventMapIndex.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/EventMapIndex.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** EventMapIndex.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- EventMapIndex.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 23,26 **** --- 23,34 ---- **/ + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning(disable : 4786) + # endif + + #ifdef _WIN32 + #include <assert.h> + #endif + #include "EventMapIndex.h" #include "LogStream.h" Index: EventMapping.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/EventMapping.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** EventMapping.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- EventMapping.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 22,29 **** --- 22,36 ---- * **/ + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning(disable : 4786) + # endif #include "EventMapping.h" //#include "InputInterface.h" #include "SDL_events.h" + + #ifdef _WIN32 + #include <assert.h> + #endif #include <iostream> Index: HID.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/HID.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** HID.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- HID.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 22,25 **** --- 22,28 ---- * **/ + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning(disable : 4786) + # endif #include "HID.h" *************** *** 119,123 **** void VirtualHID::setJoystickModifier(int jmod) { ! m_JoystickModifier = jmod; } --- 122,126 ---- void VirtualHID::setJoystickModifier(int jmod) { ! m_JoystickModifier = (jmod != 0); } Index: InputInterface.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/InputInterface.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** InputInterface.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- InputInterface.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 22,25 **** --- 22,28 ---- * **/ + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning(disable : 4786) + # endif #include "InputInterface.h" Index: LogoScreen.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/LogoScreen.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** LogoScreen.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- LogoScreen.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 1,2 **** --- 1,6 ---- + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning(disable : 4786) + # endif + #include <iostream> Index: ObjectModel.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ObjectModel.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ObjectModel.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- ObjectModel.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 53,57 **** void ObjectModel::pack(simdata::Packer& p) const { ! simdata::Object::pack(p); p.pack(m_ModelPath); p.pack(m_Rotation); --- 53,57 ---- void ObjectModel::pack(simdata::Packer& p) const { ! Object::pack(p); p.pack(m_ModelPath); p.pack(m_Rotation); *************** *** 63,67 **** void ObjectModel::unpack(simdata::UnPacker& p) { ! simdata::Object::unpack(p); p.unpack(m_ModelPath); p.unpack(m_Rotation); --- 63,67 ---- void ObjectModel::unpack(simdata::UnPacker& p) { ! Object::unpack(p); p.unpack(m_ModelPath); p.unpack(m_Rotation); *************** *** 105,113 **** m_Axis0.Normalize(); // orthogonalize ! m_Axis1 = m_Axis1 - m_Axis0 * Dot(m_Axis0, m_Axis1); assert(m_Axis1.Length() > 0.0); m_Axis1.Normalize(); // find third axis ! simdata::Vector3 axis2 = Cross(m_Axis0, m_Axis1); simdata::Matrix3 o(m_Axis0.x, m_Axis0.y, m_Axis0.z, m_Axis1.x, m_Axis1.y, m_Axis1.z, axis2.x, axis2.y, axis2.z); --- 105,113 ---- m_Axis0.Normalize(); // orthogonalize ! m_Axis1 = m_Axis1 - m_Axis0 * simdata::Dot(m_Axis0, m_Axis1); assert(m_Axis1.Length() > 0.0); m_Axis1.Normalize(); // find third axis ! simdata::Vector3 axis2 = simdata::Cross(m_Axis0, m_Axis1); simdata::Matrix3 o(m_Axis0.x, m_Axis0.y, m_Axis0.z, m_Axis1.x, m_Axis1.y, m_Axis1.z, axis2.x, axis2.y, axis2.z); Index: SimObject.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SimObject.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** SimObject.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- SimObject.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 99,103 **** void SimObject::pack(simdata::Packer& p) const { ! simdata::Object::pack(p); p.pack(m_Army); p.pack(m_Model); --- 99,103 ---- void SimObject::pack(simdata::Packer& p) const { ! Object::pack(p); p.pack(m_Army); p.pack(m_Model); *************** *** 105,109 **** void SimObject::unpack(simdata::UnPacker& p) { ! simdata::Object::unpack(p); p.unpack(m_Army); p.unpack(m_Model); --- 105,109 ---- void SimObject::unpack(simdata::UnPacker& p) { ! Object::unpack(p); p.unpack(m_Army); p.unpack(m_Model); *************** *** 345,349 **** // this needs 2 upgrades; // first one is: working with quat and only quat; ! // second is: make an osg app() callback CSP_LOG(CSP_APP, CSP_DEBUG, "SimObject::updateScene() ID:" << m_iObjectID ); --- 345,349 ---- // this needs 2 upgrades; // first one is: working with quat and only quat; ! // second is: make an osg update()/draw()? callback CSP_LOG(CSP_APP, CSP_DEBUG, "SimObject::updateScene() ID:" << m_iObjectID ); Index: SimpleConfig.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SimpleConfig.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** SimpleConfig.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- SimpleConfig.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 29,36 **** --- 29,45 ---- */ + # if defined(_MSC_VER) && (_MSC_VER <= 1200) + #pragma warning (disable : 4786) + # endif + + #ifdef _WIN32 + #include <assert.h> + #define snprintf _snprintf + #endif #include "SimpleConfig.h" #include "Platform.h" + #include <string> #include <vector> *************** *** 41,44 **** --- 50,54 ---- #include "compiler.h" + #include STL_SSTREAM Index: TerrainObject.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/TerrainObject.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** TerrainObject.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- TerrainObject.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 69,73 **** void TerrainObject::pack(simdata::Packer& p) const { ! simdata::Object::pack(p); p.pack(m_DynamicTextures); p.pack(m_TextureCompression); --- 69,73 ---- void TerrainObject::pack(simdata::Packer& p) const { ! Object::pack(p); p.pack(m_DynamicTextures); p.pack(m_TextureCompression); *************** *** 95,99 **** void TerrainObject::unpack(simdata::UnPacker& p) { ! simdata::Object::unpack(p); p.unpack(m_DynamicTextures); p.unpack(m_TextureCompression); --- 95,99 ---- void TerrainObject::unpack(simdata::UnPacker& p) { ! Object::unpack(p); p.unpack(m_DynamicTextures); p.unpack(m_TextureCompression); Index: VirtualBattlefield.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/VirtualBattlefield.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** VirtualBattlefield.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- VirtualBattlefield.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 223,227 **** // OSG can find itself the plugins. #ifdef _WIN32 ! osgDB::setLibraryFilePathList("../DemoPackage"); #endif --- 223,227 ---- // OSG can find itself the plugins. #ifdef _WIN32 ! osgDB::setLibraryFilePathList("../Bin"); #endif *************** *** 242,246 **** osg::ClearNode* earthSky = osgNew osg::ClearNode; earthSky->setRequiresClear(false); // we've got base and sky to do it. ! //earthSky->setRequiresClear(true); // we've got base and sky to do it. // use a transform to make the sky and base around with the eye point. --- 242,246 ---- osg::ClearNode* earthSky = osgNew osg::ClearNode; earthSky->setRequiresClear(false); // we've got base and sky to do it. ! //earthSky->setRequiresClear(true); // use a transform to make the sky and base around with the eye point. *************** *** 675,680 **** do { if (++i == objectList.end()) i = objectList.begin(); ! if ((human >= 0) && (*i)->isHuman() != (bool)human) continue; ! if ((local >= 0) && (*i)->isLocal() != (bool)local) continue; break; } while (object.ptr() != (*i).ptr()); --- 675,680 ---- do { if (++i == objectList.end()) i = objectList.begin(); ! if ((human >= 0) && (*i)->isHuman() != (human != 0)) continue; ! if ((local >= 0) && (*i)->isLocal() != (local != 0)) continue; break; } while (object.ptr() != (*i).ptr()); Index: main.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/main.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** main.cpp 26 Jan 2003 23:15:56 -0000 1.1.2.1 --- main.cpp 2 Feb 2003 15:52:45 -0000 1.1.2.2 *************** *** 1,11 **** - #include "stdinc.h" - #include "SDL.h" #include "Config.h" #include "CSPSim.h" ! int main(int argc, char *argv[]) { ! if (!openConfig("../Data/CSPSim.ini")) return 0; int level = g_Config.getInt("Debug", "LoggingLevel", 0, true); --- 1,9 ---- #include "Config.h" #include "CSPSim.h" ! #include "LogStream.h" int main(int argc, char *argv[]) { ! if (!openConfig("../Data/CSPSim.ini")) return 0; int level = g_Config.getInt("Debug", "LoggingLevel", 0, true); *************** *** 23,27 **** csplog().set_output (cerr); logfile.close(); ! return 0; } --- 21,25 ---- csplog().set_output (cerr); logfile.close(); ! return 0; } |