[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.121,1.122 tcBallisticWeapon.cpp,1.8,1.9 tcFlightPort.cpp,
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-02-24 22:19:51
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11465/src/sim Modified Files: Game.cpp tcBallisticWeapon.cpp tcFlightPort.cpp tcGameObject.cpp tcMapData.cpp tcMissileObject.cpp tcPlatformObject.cpp tcSimState.cpp tcSurfaceObject.cpp tcTorpedoObject.cpp Log Message: More OpenAL++ changes and ai improvements Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** tcSimState.cpp 16 Feb 2005 23:13:49 -0000 1.66 --- tcSimState.cpp 24 Feb 2005 22:19:16 -0000 1.67 *************** *** 210,214 **** } /********************************************************************/ ! void tcSimState::DesignateLauncherDatum(tnPoolIndex anKey, tsGeoPoint p, unsigned anLauncher) { int bFound; --- 210,214 ---- } /********************************************************************/ ! void tcSimState::DesignateLauncherDatum(tnPoolIndex anKey, GeoPoint p, unsigned anLauncher) { int bFound; *************** *** 266,270 **** float fSeekerAz = po->mcKin.mfHeading_rad; // TODO: add launcher angle effect ! tsGeoPoint sSeekerLoc; sSeekerLoc.Set((float)po->mcKin.mfLon_rad,(float)po->mcKin.mfLat_rad); bool bCanDetect = RadarCanDetect(nSensorKey,pTargetObj,sSeekerLoc,fSeekerAz); --- 266,270 ---- float fSeekerAz = po->mcKin.mfHeading_rad; // TODO: add launcher angle effect ! GeoPoint sSeekerLoc; sSeekerLoc.Set((float)po->mcKin.mfLon_rad,(float)po->mcKin.mfLat_rad); bool bCanDetect = RadarCanDetect(nSensorKey,pTargetObj,sSeekerLoc,fSeekerAz); *************** *** 1155,1159 **** int nCount,nFCCount; tcRect region; ! tsGeoPoint currentpos; // tcDatabaseObject *pTargetDBObj; tcGameObject *pTargetObj; --- 1155,1159 ---- int nCount,nFCCount; tcRect region; ! GeoPoint currentpos; // tcDatabaseObject *pTargetDBObj; tcGameObject *pTargetObj; *************** *** 1312,1316 **** { long nTargetID; ! tsGeoPoint currentpos; tcTrack *pTrack; tcGameObject *ptarget; --- 1312,1316 ---- { long nTargetID; ! GeoPoint currentpos; tcTrack *pTrack; tcGameObject *ptarget; *************** *** 1400,1404 **** if (bFound) { ! bDetectable = apRadarSS->CanDetectTarget(ptarget,fRange); // (tsGeoPoint,float rcs_dbsm) if ((bDetectable)&&(fRange<fMinRange)) { --- 1400,1404 ---- if (bFound) { ! bDetectable = apRadarSS->CanDetectTarget(ptarget,fRange); // (GeoPoint,float rcs_dbsm) if ((bDetectable)&&(fRange<fMinRange)) { *************** *** 1974,1978 **** int nListIndex=0; tcKinematics *pKin; ! tsGeoPoint p; for (tnPoolIndex i=0;(i<nSize)&&(nListIndex<anLength);i++) --- 1974,1978 ---- int nListIndex=0; tcKinematics *pKin; ! GeoPoint p; for (tnPoolIndex i=0;(i<nSize)&&(nListIndex<anLength);i++) *************** *** 2391,2397 **** s.Format("tcSurfaceObject size: %d bytes",sizeof(tcSurfaceObject)); WTL(s.GetBuffer()); ! s.Format(" tcGuidanceState (%d) tsGeoPoint (%d) tsFormationParameters (%d) tcEngagementData (%d) " "tcAIData (%d)", ! sizeof(tcGuidanceState),sizeof(tsGeoPoint),sizeof(tsFormationParameters),sizeof(tcEngagementData), sizeof(tcAIData)); WTL(s.GetBuffer()); --- 2391,2397 ---- s.Format("tcSurfaceObject size: %d bytes",sizeof(tcSurfaceObject)); WTL(s.GetBuffer()); ! s.Format(" tcGuidanceState (%d) GeoPoint (%d) tsFormationParameters (%d) tcEngagementData (%d) " "tcAIData (%d)", ! sizeof(tcGuidanceState),sizeof(GeoPoint),sizeof(tsFormationParameters),sizeof(tcEngagementData), sizeof(tcAIData)); WTL(s.GetBuffer()); Index: tcMissileObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMissileObject.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** tcMissileObject.cpp 4 Feb 2005 18:54:51 -0000 1.22 --- tcMissileObject.cpp 24 Feb 2005 22:19:16 -0000 1.23 *************** *** 116,120 **** { tc3DPoint launcherPos = platObj->mpDBObject->GetLauncherPosition(nLauncher); ! tsGeoPoint pos = obj->RelPosToLatLonAlt(launcherPos.x, launcherPos.y, launcherPos.z); mcKin.mfLon_rad = pos.mfLon_rad; --- 116,120 ---- { tc3DPoint launcherPos = platObj->mpDBObject->GetLauncherPosition(nLauncher); ! GeoPoint pos = obj->RelPosToLatLonAlt(launcherPos.x, launcherPos.y, launcherPos.z); mcKin.mfLon_rad = pos.mfLon_rad; Index: tcTorpedoObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcTorpedoObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcTorpedoObject.cpp 21 Feb 2005 18:26:26 -0000 1.4 --- tcTorpedoObject.cpp 24 Feb 2005 22:19:16 -0000 1.5 *************** *** 96,100 **** { tc3DPoint launcherPos = platObj->mpDBObject->GetLauncherPosition(nLauncher); ! tsGeoPoint pos = obj->RelPosToLatLonAlt(launcherPos.x, launcherPos.y, launcherPos.z); mcKin.mfLon_rad = pos.mfLon_rad; --- 96,100 ---- { tc3DPoint launcherPos = platObj->mpDBObject->GetLauncherPosition(nLauncher); ! GeoPoint pos = obj->RelPosToLatLonAlt(launcherPos.x, launcherPos.y, launcherPos.z); mcKin.mfLon_rad = pos.mfLon_rad; Index: tcFlightPort.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcFlightPort.cpp 31 Jan 2005 01:33:08 -0000 1.13 --- tcFlightPort.cpp 24 Feb 2005 22:19:16 -0000 1.14 *************** *** 352,356 **** wxASSERT(obj); ! tsGeoPoint p = obj->RelPosToLatLonAlt(spot->x, spot->y, spot->z); data.mfLat_rad = p.mfLat_rad; --- 352,356 ---- wxASSERT(obj); ! GeoPoint p = obj->RelPosToLatLonAlt(spot->x, spot->y, spot->z); data.mfLat_rad = p.mfLat_rad; *************** *** 486,490 **** unit->mfStatusTime = parent->mfStatusTime; ! tsGeoPoint childPos = parent->RelPosToLatLonAlt(unit->rel_pos); unit->mcKin.mfAlt_m = childPos.mfAlt_m; unit->mcKin.mfLat_rad = childPos.mfLat_rad; --- 486,490 ---- unit->mfStatusTime = parent->mfStatusTime; ! GeoPoint childPos = parent->RelPosToLatLonAlt(unit->rel_pos); unit->mcKin.mfAlt_m = childPos.mfAlt_m; unit->mcKin.mfLat_rad = childPos.mfLat_rad; Index: tcSurfaceObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSurfaceObject.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcSurfaceObject.cpp 16 Feb 2005 23:13:50 -0000 1.15 --- tcSurfaceObject.cpp 24 Feb 2005 22:19:16 -0000 1.16 *************** *** 149,153 **** mnAlliance = 0; mfStatusTime = 0; ! tsGeoPoint randomPoint = mapData->GetRandomPointNear(afLon_deg, afLat_deg, 1.1f, -16000.0f, -20.0f); mcKin.mfLon_rad = randomPoint.mfLon_rad; mcKin.mfLat_rad = randomPoint.mfLat_rad; --- 149,153 ---- mnAlliance = 0; mfStatusTime = 0; ! GeoPoint randomPoint = mapData->GetRandomPointNear(afLon_deg, afLat_deg, 1.1f, -16000.0f, -20.0f); mcKin.mfLon_rad = randomPoint.mfLon_rad; mcKin.mfLat_rad = randomPoint.mfLat_rad; Index: tcBallisticWeapon.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcBallisticWeapon.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcBallisticWeapon.cpp 1 Feb 2005 02:29:15 -0000 1.8 --- tcBallisticWeapon.cpp 24 Feb 2005 22:19:16 -0000 1.9 *************** *** 77,81 **** { tc3DPoint launcherPos = platObj->mpDBObject->GetLauncherPosition(nLauncher); ! tsGeoPoint pos = obj->RelPosToLatLonAlt(launcherPos.x, launcherPos.y, launcherPos.z); mcKin.mfLon_rad = pos.mfLon_rad; --- 77,81 ---- { tc3DPoint launcherPos = platObj->mpDBObject->GetLauncherPosition(nLauncher); ! GeoPoint pos = obj->RelPosToLatLonAlt(launcherPos.x, launcherPos.y, launcherPos.z); mcKin.mfLon_rad = pos.mfLon_rad; *************** *** 103,107 **** mcKin.mfSpeed_kts = C_MPSTOKTS * mpDBObject->launchSpeed_mps; ! tsGeoPoint targetDatum = pLauncher->msDatum; mcKin.mfHeading_rad = mcKin.HeadingToGeoRad(&targetDatum); --- 103,107 ---- mcKin.mfSpeed_kts = C_MPSTOKTS * mpDBObject->launchSpeed_mps; ! GeoPoint targetDatum = pLauncher->msDatum; mcKin.mfHeading_rad = mcKin.HeadingToGeoRad(&targetDatum); Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** tcPlatformObject.cpp 20 Feb 2005 18:20:20 -0000 1.37 --- tcPlatformObject.cpp 24 Feb 2005 22:19:16 -0000 1.38 *************** *** 59,63 **** } ! void tcPlatformObject::DesignateLauncherDatum(tsGeoPoint p, unsigned int anLauncher) { mcLauncherState.SetLauncherDatum(anLauncher, p.mfLon_rad, p.mfLat_rad, p.mfAlt_m); --- 59,63 ---- } ! void tcPlatformObject::DesignateLauncherDatum(GeoPoint p, unsigned int anLauncher) { mcLauncherState.SetLauncherDatum(anLauncher, p.mfLon_rad, p.mfLat_rad, p.mfAlt_m); *************** *** 106,110 **** } ! tsGeoPoint msGeoForm; tsFormationParameters *pFP = &msFormationParameters; pFP->mcFormationKin.SetRelativeGeo(msGeoForm,pFP->mfFormationBearing_rad,pFP->mfFormationRange_km); --- 106,110 ---- } ! GeoPoint msGeoForm; tsFormationParameters *pFP = &msFormationParameters; pFP->mcFormationKin.SetRelativeGeo(msGeoForm,pFP->mfFormationBearing_rad,pFP->mfFormationRange_km); Index: tcMapData.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapData.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcMapData.cpp 21 Feb 2005 18:26:13 -0000 1.16 --- tcMapData.cpp 24 Feb 2005 22:19:16 -0000 1.17 *************** *** 56,64 **** * @param maxAlt maximum altitude in meters */ ! tsGeoPoint tcMapData::GetRandomPointNear(float lon, float lat, float r, float minAlt, float maxAlt) { enum {MAX_TRIALS = 100}; ! tsGeoPoint p; int trial = 0; --- 56,64 ---- * @param maxAlt maximum altitude in meters */ ! GeoPoint tcMapData::GetRandomPointNear(float lon, float lat, float r, float minAlt, float maxAlt) { enum {MAX_TRIALS = 100}; ! GeoPoint p; int trial = 0; Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** Game.cpp 20 Feb 2005 21:54:34 -0000 1.121 --- Game.cpp 24 Feb 2005 22:19:15 -0000 1.122 *************** *** 2149,2158 **** enableTacticalMap = !enableTacticalMap; return; ! case 'w': // toggle world map size ! if (worldMap) ! { ! worldMap->ToggleMapSize(); ! } return; case 'A': accelerateTime = (accelerateTime + 1)/2 - 1; --- 2149,2156 ---- enableTacticalMap = !enableTacticalMap; return; ! case 'p': ! if (!mbScenarioEdit) mbPaused = !mbPaused; return; + case 'A': accelerateTime = (accelerateTime + 1)/2 - 1; *************** *** 2171,2177 **** viewer->SetTerrainActive(!viewer->GetTerrainActive()); return; ! case 'p': ! if (!mbScenarioEdit) mbPaused = !mbPaused; return; case WXK_ESCAPE: ProcessEsc(); --- 2169,2179 ---- viewer->SetTerrainActive(!viewer->GetTerrainActive()); return; ! case 'W': // toggle world map size ! if (worldMap) ! { ! worldMap->ToggleMapSize(); ! } return; + case WXK_ESCAPE: ProcessEsc(); Index: tcGameObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObject.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcGameObject.cpp 1 Feb 2005 02:29:15 -0000 1.28 --- tcGameObject.cpp 24 Feb 2005 22:19:16 -0000 1.29 *************** *** 196,200 **** } ! tsGeoPoint tcGameObject::RelPosToLatLonAlt(const tsRelativePosition& rel_pos) const { return RelPosToLatLonAlt(rel_pos.dx, rel_pos.dy, rel_pos.dz); --- 196,200 ---- } ! GeoPoint tcGameObject::RelPosToLatLonAlt(const tsRelativePosition& rel_pos) const { return RelPosToLatLonAlt(rel_pos.dx, rel_pos.dy, rel_pos.dz); *************** *** 205,212 **** * Old system was: dx is right, dy is up, and dz is back */ ! tsGeoPoint tcGameObject::RelPosToLatLonAlt(const float& dx, const float& dy, const float& dz) const { ! tsGeoPoint p; float hdg = mcKin.mfHeading_rad; --- 205,212 ---- * Old system was: dx is right, dy is up, and dz is back */ ! GeoPoint tcGameObject::RelPosToLatLonAlt(const float& dx, const float& dy, const float& dz) const { ! GeoPoint p; float hdg = mcKin.mfHeading_rad; |