[Gcblue-commits] gcb_wx/src/scriptinterface tcPlatformInterface.cpp,1.36,1.37 tcPlatformInterfaceExt
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/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11465/src/scriptinterface Modified Files: tcPlatformInterface.cpp tcPlatformInterfaceExtension.cpp tcPlatformInterfaceExtensionB.cpp tcScenarioInterface.cpp Log Message: More OpenAL++ changes and ai improvements Index: tcPlatformInterfaceExtensionB.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtensionB.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcPlatformInterfaceExtensionB.cpp 18 Feb 2005 17:41:51 -0000 1.19 --- tcPlatformInterfaceExtensionB.cpp 24 Feb 2005 22:19:15 -0000 1.20 *************** *** 112,116 **** .def("ClearOrders",&tcPlatformInterface::ClearOrders) .def("CompletedOrder",&tcPlatformInterface::CompletedOrder) - .def("DeleteOrder",&tcPlatformInterface::DeleteOrder) .def("GetCurrentOrder",&tcPlatformInterface::GetCurrentOrder) .def("GetLocalObj",&tcPlatformInterface::GetLocalObj) --- 112,115 ---- Index: tcPlatformInterfaceExtension.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtension.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcPlatformInterfaceExtension.cpp 18 Feb 2005 17:41:51 -0000 1.13 --- tcPlatformInterfaceExtension.cpp 24 Feb 2005 22:19:15 -0000 1.14 *************** *** 98,105 **** ; ! class_<tsGeoPoint>("tsGeoPoint") ! .def_readonly("Alt",&tsGeoPoint::mfAlt_m) ! .def_readonly("Lon",&tsGeoPoint::mfLon_rad) ! .def_readonly("Lat",&tsGeoPoint::mfLat_rad) ; --- 98,105 ---- ; ! class_<GeoPoint>("GeoPoint") ! .def_readonly("Alt",&GeoPoint::mfAlt_m) ! .def_readonly("Lon",&GeoPoint::mfLon_rad) ! .def_readonly("Lat",&GeoPoint::mfLat_rad) ; Index: tcScenarioInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcScenarioInterface.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcScenarioInterface.cpp 18 Feb 2005 17:41:51 -0000 1.19 --- tcScenarioInterface.cpp 24 Feb 2005 22:19:15 -0000 1.20 *************** *** 435,439 **** tcDatum datum; wxASSERT(mapData); ! tsGeoPoint randomPoint = mapData->GetRandomPointNear(lon, lat, rand_offset, min_alt, max_alt); datum.lon = C_180OVERPI*randomPoint.mfLon_rad; --- 435,439 ---- tcDatum datum; wxASSERT(mapData); ! GeoPoint randomPoint = mapData->GetRandomPointNear(lon, lat, rand_offset, min_alt, max_alt); datum.lon = C_180OVERPI*randomPoint.mfLon_rad; Index: tcPlatformInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** tcPlatformInterface.cpp 20 Feb 2005 18:20:19 -0000 1.36 --- tcPlatformInterface.cpp 24 Feb 2005 22:19:15 -0000 1.37 *************** *** 49,52 **** --- 49,53 ---- #include "tcStores.h" #include "ai/Brain.h" + #include "ai/Nav.h" #ifdef _DEBUG *************** *** 382,386 **** float tcPlatformInterface::GetHeadingToDatum(float afLon_rad, float afLat_rad) { ! tsGeoPoint p; p.mfAlt_m = 0; p.mfLon_rad = afLon_rad; --- 383,387 ---- float tcPlatformInterface::GetHeadingToDatum(float afLon_rad, float afLat_rad) { ! GeoPoint p; p.mfAlt_m = 0; p.mfLon_rad = afLon_rad; *************** *** 392,396 **** float tcPlatformInterface::GetRangeToDatum(float afLon_rad, float afLat_rad) { ! tsGeoPoint p; p.mfAlt_m = 0; p.mfLon_rad = afLon_rad; --- 393,397 ---- float tcPlatformInterface::GetRangeToDatum(float afLon_rad, float afLat_rad) { ! GeoPoint p; p.mfAlt_m = 0; p.mfLon_rad = afLon_rad; *************** *** 568,572 **** float alt_m, int anLauncher) { ! tsGeoPoint p; p.mfLon_rad = afLon_rad; p.mfLat_rad = afLat_rad; --- 569,573 ---- float alt_m, int anLauncher) { ! GeoPoint p; p.mfLon_rad = afLon_rad; p.mfLat_rad = afLat_rad; *************** *** 739,758 **** void tcPlatformInterface::AddNavOrder(float afLon_rad, float afLat_rad) { ! tcOrder o; ! o.mstrOrdername = "Nav"; ! o.msDestination.mfAlt_m = 0; ! o.msDestination.mfLon_rad = afLon_rad; ! o.msDestination.mfLat_rad = afLat_rad; ! mpPlatformObj->mcAI.AddOrder(o); } ! void tcPlatformInterface::ClearOrders(void) { ! mpPlatformObj->mcAI.ClearOrders(); } ! void tcPlatformInterface::DeleteOrder(int n) { ! mpPlatformObj->mcAI.DeleteOrder(n); } --- 740,771 ---- void tcPlatformInterface::AddNavOrder(float afLon_rad, float afLat_rad) { ! ai::Brain* brain = mpPlatformObj->GetBrain(); ! wxASSERT(brain); ! ! ai::Nav* nav = brain->GetNavTask(); ! if (!nav) ! { ! brain->AddTask("Nav", 1.5f); ! nav = brain->GetNavTask(); ! } ! wxASSERT(nav); ! ! nav->AddWaypoint(afLon_rad, afLat_rad, 0); } ! /** ! * Only removes Nav task at the moment ! */ ! void tcPlatformInterface::ClearOrders() { ! ai::Brain* brain = mpPlatformObj->GetBrain(); ! wxASSERT(brain); ! ! mpPlatformObj->GetBrain()->RemoveTask("Nav"); } ! void tcPlatformInterface::DeleteTask(const std::string& taskName) { ! mpPlatformObj->GetBrain()->RemoveTask(taskName); } *************** *** 869,873 **** if ((bAffilMatch)&&(pTrack->mnClassification & anClassMask)&&(engagementsMatch)) { ! tsGeoPoint p; p.mfAlt_m = 0; p.mfLat_rad = pTrack->mfLat_rad; --- 882,886 ---- if ((bAffilMatch)&&(pTrack->mnClassification & anClassMask)&&(engagementsMatch)) { ! GeoPoint p; p.mfAlt_m = 0; p.mfLat_rad = pTrack->mfLat_rad; *************** *** 907,911 **** if ((bAffilMatch)&&(pTrack->mnClassification & anClassMask)) { ! tsGeoPoint p; p.mfAlt_m = 0; p.mfLat_rad = pTrack->mfLat_rad; --- 920,924 ---- if ((bAffilMatch)&&(pTrack->mnClassification & anClassMask)) { ! GeoPoint p; p.mfAlt_m = 0; p.mfLat_rad = pTrack->mfLat_rad; |