[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.131,1.132 tcAero.cpp,1.7,1.8 tcAeroAirObject.cpp,1.17,1.1
Status: Alpha
Brought to you by:
ddcforge
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/src/sim Modified Files: Game.cpp tcAero.cpp tcAeroAirObject.cpp tcDirectorEvent.cpp tcFlightOpsObject.cpp tcFlightPort.cpp tcGameObject.cpp tcLauncher.cpp tcLauncherState.cpp tcObjectControl.cpp tcPlatformObject.cpp tcSensorMap.cpp tcSensorMapTrack.cpp tcSensorPlatform.cpp tcSensorTrackIterator.cpp tcSimState.cpp tcWeaponObject.cpp Removed Files: tcAIData.cpp Log Message: namespace housekeeping Index: tcSensorTrackIterator.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorTrackIterator.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorTrackIterator.cpp 17 May 2005 00:20:41 -0000 1.2 --- tcSensorTrackIterator.cpp 1 Jun 2005 00:13:33 -0000 1.3 *************** *** 36,40 **** #endif ! namespace Sensor { tcSimState* tcSensorTrackIterator::simState = NULL; --- 36,40 ---- #endif ! tcSimState* tcSensorTrackIterator::simState = NULL; *************** *** 197,199 **** } - } \ No newline at end of file --- 197,198 ---- Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** tcObjectControl.cpp 5 May 2005 02:14:54 -0000 1.36 --- tcObjectControl.cpp 1 Jun 2005 00:13:32 -0000 1.37 *************** *** 32,36 **** #include "ai/Brain.h" #include "tcAeroAirObject.h" ! #include "tcAIData.h" #include "tcAirDBObject.h" #include "tcAltitudeBarControl.h" --- 32,36 ---- #include "ai/Brain.h" #include "tcAeroAirObject.h" ! #include "ai/tcAIData.h" #include "tcAirDBObject.h" #include "tcAltitudeBarControl.h" *************** *** 59,64 **** ! using namespace AI; ! using namespace Database; /******************* tcAIPanel ************************/ --- 59,64 ---- ! using namespace ai; ! using namespace database; /******************* tcAIPanel ************************/ Index: tcFlightPort.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcFlightPort.cpp 21 May 2005 02:01:04 -0000 1.18 --- tcFlightPort.cpp 1 Jun 2005 00:13:32 -0000 1.19 *************** *** 706,710 **** * Initialize flightport using data in dbObj. */ ! void tcFlightPort::InitFromDatabase(Database::tcFlightportDBObject *dbObj) { wxASSERT(dbObj); --- 706,710 ---- * Initialize flightport using data in dbObj. */ ! void tcFlightPort::InitFromDatabase(database::tcFlightportDBObject *dbObj) { wxASSERT(dbObj); Index: tcLauncher.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncher.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** tcLauncher.cpp 21 May 2005 02:01:04 -0000 1.20 --- tcLauncher.cpp 1 Jun 2005 00:13:32 -0000 1.21 *************** *** 530,534 **** void tcLauncher::UpdateStatus() { ! using namespace Database; if (mnCurrent <= 0) --- 530,534 ---- void tcLauncher::UpdateStatus() { ! using namespace database; if (mnCurrent <= 0) *************** *** 835,839 **** int temp; buffer >> temp; ! meLaunchMode = (Database::teWeaponLaunchMode)temp; buffer >> mnTargetFlags; --- 835,839 ---- int temp; buffer >> temp; ! meLaunchMode = (database::teWeaponLaunchMode)temp; buffer >> mnTargetFlags; Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** tcPlatformObject.cpp 21 May 2005 02:01:04 -0000 1.46 --- tcPlatformObject.cpp 1 Jun 2005 00:13:33 -0000 1.47 *************** *** 44,48 **** #endif ! using namespace AI; void tcPlatformObject::DesignateDatum(tcPoint p) --- 44,48 ---- #endif ! using namespace ai; void tcPlatformObject::DesignateDatum(tcPoint p) *************** *** 887,891 **** : tcGameObject(obj), tcSensorPlatform() { ! using namespace Database; tcSensorPlatform::Init(obj, this); --- 887,891 ---- : tcGameObject(obj), tcSensorPlatform() { ! using namespace database; tcSensorPlatform::Init(obj, this); Index: tcSensorMap.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMap.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tcSensorMap.cpp 17 May 2005 00:20:40 -0000 1.21 --- tcSensorMap.cpp 1 Jun 2005 00:13:33 -0000 1.22 *************** *** 33,38 **** #endif - using namespace Sensor; - --- 33,36 ---- *************** *** 103,107 **** ! bool tcAllianceSensorMap::AddReport(const Sensor::tcSensorReport& report) { tnPoolIndex nTrackID = report.mnTrackID; --- 101,105 ---- ! bool tcAllianceSensorMap::AddReport(const tcSensorReport& report) { tnPoolIndex nTrackID = report.mnTrackID; *************** *** 129,135 **** } ! bool tcAllianceSensorMap::UpdateActiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID, tnPoolIndex anTrackID, ! Sensor::tcSensorMapTrack*& rpSMTrack) { tnPoolIndex nIdx = maTrackToSensorTrack[anTrackID]; --- 127,133 ---- } ! bool tcAllianceSensorMap::UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, tnPoolIndex anTrackID, ! tcSensorMapTrack*& rpSMTrack) { tnPoolIndex nIdx = maTrackToSensorTrack[anTrackID]; *************** *** 171,177 **** ! bool tcAllianceSensorMap::UpdatePassiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID, tnPoolIndex anTrackID, ! Sensor::tcSensorMapTrack*& rpSMTrack) { tnPoolIndex nIdx = maTrackToSensorTrack[anTrackID]; --- 169,175 ---- ! bool tcAllianceSensorMap::UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, tnPoolIndex anTrackID, ! tcSensorMapTrack*& rpSMTrack) { tnPoolIndex nIdx = maTrackToSensorTrack[anTrackID]; *************** *** 490,500 **** } ! bool tcSensorMap::AddReport(const Sensor::tcSensorReport& report, UINT8 anAlliance) { tcAllianceSensorMap *pMap = GetMap(anAlliance); return pMap->AddReport(report); } ! bool tcSensorMap::UpdateActiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, Sensor::tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance) { --- 488,499 ---- } ! bool tcSensorMap::AddReport(const tcSensorReport& report, UINT8 anAlliance) ! { tcAllianceSensorMap *pMap = GetMap(anAlliance); return pMap->AddReport(report); } ! bool tcSensorMap::UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance) { *************** *** 503,508 **** } ! bool tcSensorMap::UpdatePassiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, Sensor::tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance) { --- 502,507 ---- } ! bool tcSensorMap::UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance) { Index: tcGameObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObject.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** tcGameObject.cpp 21 May 2005 02:01:04 -0000 1.36 --- tcGameObject.cpp 1 Jun 2005 00:13:32 -0000 1.37 *************** *** 75,79 **** bool tcGameObject::clientMode = false; tcMapData* tcGameObject::mapData = NULL; ! Database::tcDatabase* tcGameObject::database = NULL; tcSimState* tcGameObject::simState = NULL; long tcGameObject::hookedId = -1; --- 75,79 ---- bool tcGameObject::clientMode = false; tcMapData* tcGameObject::mapData = NULL; ! database::tcDatabase* tcGameObject::database = NULL; tcSimState* tcGameObject::simState = NULL; long tcGameObject::hookedId = -1; Index: tcAero.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAero.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcAero.cpp 21 May 2005 02:01:04 -0000 1.7 --- tcAero.cpp 1 Jun 2005 00:13:32 -0000 1.8 *************** *** 33,37 **** #endif ! namespace Aero { --- 33,37 ---- #endif ! *************** *** 39,43 **** * Load state from stream */ ! tcStream& tsMissileKState::operator<<(tcStream& stream) { stream >> mfFlightTime; --- 39,43 ---- * Load state from stream */ ! tcStream& Aero::tsMissileKState::operator<<(tcStream& stream) { stream >> mfFlightTime; *************** *** 55,59 **** * Save state to stream */ ! tcStream& tsMissileKState::operator>>(tcStream& stream) { stream << mfFlightTime; --- 55,59 ---- * Save state to stream */ ! tcStream& Aero::tsMissileKState::operator>>(tcStream& stream) { stream << mfFlightTime; *************** *** 72,76 **** * to table) */ ! float GetAirDensity(float afAltitude_m) { float fDensity_kgm3; // kg/m^3 --- 72,76 ---- * to table) */ ! float Aero::GetAirDensity(float afAltitude_m) { float fDensity_kgm3; // kg/m^3 *************** *** 87,91 **** ** standard atmosphere 1976, 59 deg F model */ ! float GetSoundSpeed(float afAltitude_m) { float fSoundSpeed_mps; --- 87,91 ---- ** standard atmosphere 1976, 59 deg F model */ ! float Aero::GetSoundSpeed(float afAltitude_m) { float fSoundSpeed_mps; *************** *** 105,109 **** ! void UpdateMissileKState(tsMissileKState& k, Database::tcMissileDBObject *apMissileData, float afTimeStep) { float rhv2; --- 105,109 ---- ! void Aero::UpdateMissileKState(tsMissileKState& k, database::tcMissileDBObject *apMissileData, float afTimeStep) { float rhv2; *************** *** 191,195 **** ! } --- 191,195 ---- ! Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** tcSimState.cpp 21 May 2005 02:01:05 -0000 1.81 --- tcSimState.cpp 1 Jun 2005 00:13:33 -0000 1.82 *************** *** 64,71 **** #endif ! using namespace Database; ! using namespace Aero; ! using namespace Sensor; ! using namespace ScriptInterface; --- 64,69 ---- #endif ! using namespace database; ! using namespace scriptinterface; Index: tcWeaponObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcWeaponObject.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcWeaponObject.cpp 29 Apr 2005 18:52:56 -0000 1.12 --- tcWeaponObject.cpp 1 Jun 2005 00:13:50 -0000 1.13 *************** *** 111,115 **** void tcWeaponObject::SetIntendedTarget(long targetId) { - using namespace Sensor; intendedTarget = targetId; if (targetId == -1) return; --- 111,114 ---- Index: tcFlightOpsObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightOpsObject.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcFlightOpsObject.cpp 29 Apr 2005 18:52:55 -0000 1.9 --- tcFlightOpsObject.cpp 1 Jun 2005 00:13:32 -0000 1.10 *************** *** 39,43 **** ! Database::tcDatabase* tcFlightOpsObject::database = 0; --- 39,43 ---- ! database::tcDatabase* tcFlightOpsObject::database = 0; Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** tcLauncherState.cpp 5 May 2005 02:14:54 -0000 1.30 --- tcLauncherState.cpp 1 Jun 2005 00:13:32 -0000 1.31 *************** *** 179,183 **** int tcLauncherState::GetLauncherStatus(unsigned nLauncher) { ! using namespace Database; if (nLauncher > launchers.size()) --- 179,183 ---- int tcLauncherState::GetLauncherStatus(unsigned nLauncher) { ! using namespace database; if (nLauncher > launchers.size()) Index: tcDirectorEvent.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirectorEvent.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcDirectorEvent.cpp 27 Jan 2005 01:01:55 -0000 1.14 --- tcDirectorEvent.cpp 1 Jun 2005 00:13:32 -0000 1.15 *************** *** 44,48 **** #endif - using MapView::tcMapView; /********** tcDirectorEvent ****************/ --- 44,47 ---- Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** Game.cpp 8 May 2005 23:28:59 -0000 1.131 --- Game.cpp 1 Jun 2005 00:13:32 -0000 1.132 *************** *** 59,62 **** --- 59,63 ---- #include "tcLauncherPopup.h" #include "tcUserSelectedGroups.h" + #include "tcContainerGui.h" #if defined(_MSC_VER) *************** *** 68,72 **** using namespace std; - using namespace MapView; using network::tcMultiplayerInterface; --- 69,72 ---- *************** *** 991,994 **** --- 991,995 ---- tcPopupMessage::SetParent(tacticalMap); tcLauncherPopup::SetParent(tacticalMap); // should inherit these from common base + tcContainerGui::SetParent(tacticalMap); #if 0 *************** *** 2178,2183 **** case 'h': { ! tcPopupMessage* msg = new tcPopupMessage("TEST", wxPoint(50, 50), 100); ! msg->SetActive(true); } return; --- 2179,2185 ---- case 'h': { ! //tcPopupMessage* msg = new tcPopupMessage("TEST", wxPoint(50, 50), 100); ! //msg->SetActive(true); ! tcContainerGui* gui = new tcContainerGui(wxPoint(250, 50), "xml/test_container.xml", "TestContainer"); } return; Index: tcSensorPlatform.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorPlatform.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcSensorPlatform.cpp 21 May 2005 02:01:04 -0000 1.4 --- tcSensorPlatform.cpp 1 Jun 2005 00:13:33 -0000 1.5 *************** *** 327,331 **** void tcSensorPlatform::Init(tcSensorPlatformDBObject* obj, tcGameObject* parent) { ! using namespace Database; // add sensors --- 327,331 ---- void tcSensorPlatform::Init(tcSensorPlatformDBObject* obj, tcGameObject* parent) { ! using namespace database; // add sensors Index: tcSensorMapTrack.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMapTrack.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSensorMapTrack.cpp 17 May 2005 00:20:41 -0000 1.1 --- tcSensorMapTrack.cpp 1 Jun 2005 00:13:33 -0000 1.2 *************** *** 36,41 **** #endif - using namespace Sensor; - /******************************* tcSensorMapTrack ****************************/ --- 36,39 ---- *************** *** 277,281 **** ! bool tcSensorMapTrack::UpdateActiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID) { int nPassiveIdx = -1; --- 275,279 ---- ! bool tcSensorMapTrack::UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID) { int nPassiveIdx = -1; *************** *** 370,374 **** } ! bool tcSensorMapTrack::UpdatePassiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID) { //int nPassiveIdx = -1; --- 368,373 ---- } ! bool tcSensorMapTrack::UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID) ! { //int nPassiveIdx = -1; *************** *** 428,432 **** * if not add new report if slots are free */ ! bool tcSensorMapTrack::AddReport(const Sensor::tcSensorReport& report) { // search for existing match --- 427,431 ---- * if not add new report if slots are free */ ! bool tcSensorMapTrack::AddReport(const tcSensorReport& report) { // search for existing match --- tcAIData.cpp DELETED --- Index: tcAeroAirObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAeroAirObject.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcAeroAirObject.cpp 27 May 2005 00:28:21 -0000 1.17 --- tcAeroAirObject.cpp 1 Jun 2005 00:13:32 -0000 1.18 *************** *** 39,43 **** #endif ! using namespace Database; --- 39,43 ---- #endif ! using namespace database; *************** *** 249,254 **** { // apply engine thrust and fuel consumption decrease with altitude ! fThrust_N = mpDBObject->mfMaxThrust_N * throttleFraction * thrustFactor; ! fuel_kg -= throttleFraction * fuelEfficiencyFactor * mpDBObject->mfFuelRate_kgps * dt_s * damagePenalty; } --- 249,255 ---- { // apply engine thrust and fuel consumption decrease with altitude ! float thrustMultiplier = throttleFraction * thrustFactor; ! fThrust_N = mpDBObject->mfMaxThrust_N * thrustMultiplier; ! fuel_kg -= thrustMultiplier * fuelEfficiencyFactor * mpDBObject->mfFuelRate_kgps * dt_s * damagePenalty; } *************** *** 279,291 **** float fDrag_N, fThrust_N; - using Aero::GetAirDensity; - using Aero::GetSoundSpeed; tcKinematics& k = mcKin; float mfSpeed_mps = k.mfSpeed_kts*C_KTSTOMPS; ! float rho = GetAirDensity(k.mfAlt_m); rhv2 = rho*mfSpeed_mps*mfSpeed_mps; ! vsound = GetSoundSpeed(k.mfAlt_m); vmach = mfSpeed_mps/vsound; --- 280,290 ---- float fDrag_N, fThrust_N; tcKinematics& k = mcKin; float mfSpeed_mps = k.mfSpeed_kts*C_KTSTOMPS; ! float rho = Aero::GetAirDensity(k.mfAlt_m); rhv2 = rho*mfSpeed_mps*mfSpeed_mps; ! vsound = Aero::GetSoundSpeed(k.mfAlt_m); vmach = mfSpeed_mps/vsound; |