[Gcblue-commits] gcb_wx/src/graphics tc3DViewer.cpp,1.18,1.19 tcGameView.cpp,1.12,1.13 tcMapView.cpp
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-28 02:51:44
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6347/src/graphics Modified Files: tc3DViewer.cpp tcGameView.cpp tcMapView.cpp tcOOBView.cpp tcPlatformGui.cpp Log Message: Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapView.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcMapView.cpp 22 Jun 2005 01:22:08 -0000 1.28 --- tcMapView.cpp 28 Jun 2005 02:51:34 -0000 1.29 *************** *** 664,668 **** // draw top info string based on mnGameMode, this function should go elsewhere? strange to have in map ! osg::Vec4 color(1, 1, 1, 1); if (mnGameMode == GAMEMODE_NORMAL) --- 664,668 ---- // draw top info string based on mnGameMode, this function should go elsewhere? strange to have in map ! osg::Vec4 color(0.3, 0.3, 0.5, 1); if (mnGameMode == GAMEMODE_NORMAL) *************** *** 2077,2081 **** } ! /***********************************************************************************/ long tcTacticalMapView::HookSecondary(wxPoint pscreen) { --- 2077,2083 ---- } ! /** ! * ! */ long tcTacticalMapView::HookSecondary(wxPoint pscreen) { *************** *** 2102,2110 **** } ! /***********************************************************************************/ long tcTacticalMapView::GetClosest(wxPoint pscreen) { tcMapObj *pMO; ! tcPoint geopoint = ScreenToGeo(pscreen), geopointi; float fHookDistance,fMinDistance,fDistance; long nMinID; --- 2104,2115 ---- } ! /** ! * ! */ long tcTacticalMapView::GetClosest(wxPoint pscreen) { tcMapObj *pMO; ! tcPoint geopoint = ScreenToGeo(pscreen); ! tcPoint geopointi; float fHookDistance,fMinDistance,fDistance; long nMinID; *************** *** 2117,2121 **** { pMO = &maMapObj[i]; ! if (pMO->mbExists) { geopointi.x = pMO->mfLon; --- 2122,2126 ---- { pMO = &maMapObj[i]; ! if ((pMO->mbExists) && (pMO->mnID != -1)) { geopointi.x = pMO->mfLon; *************** *** 2796,2802 **** { // center on requested location ! const float c1 = 0.5f * C_180OVERPI; ! lon_deg -= c1 * mrectTheater.Width(); ! lat_deg += c1 * mrectTheater.Height(); wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_SETTHEATER) ; --- 2801,2811 ---- { // center on requested location ! //const float c1 = 0.5f * C_180OVERPI; ! //lon_deg -= c1 * mrectTheater.Width(); ! //lat_deg += c1 * mrectTheater.Height(); ! ! lon_deg -= 0.5f * mpMapData->GetTheaterWidthDeg(); ! lat_deg += 0.5f * mpMapData->GetTheaterHeightDeg(); ! wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_SETTHEATER) ; Index: tcGameView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcGameView.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcGameView.cpp 25 Jun 2005 22:10:35 -0000 1.12 --- tcGameView.cpp 28 Jun 2005 02:51:34 -0000 1.13 *************** *** 573,577 **** } ! /******************************************************************************/ /** * add truth data to view for objects matching anAlliance --- 573,577 ---- } ! /** * add truth data to view for objects matching anAlliance Index: tcPlatformGui.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPlatformGui.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcPlatformGui.cpp 22 Jun 2005 01:22:08 -0000 1.3 --- tcPlatformGui.cpp 28 Jun 2005 02:51:34 -0000 1.4 *************** *** 223,227 **** tcFlightOpsObject* tcPlatformGui::GetFlightOps() { ! return dynamic_cast<tcFlightOpsObject*>(tcSimState::Get()->GetObject(platformId)); } --- 223,234 ---- tcFlightOpsObject* tcPlatformGui::GetFlightOps() { ! if (hostId != -1) ! { ! return 0; ! } ! else ! { ! return dynamic_cast<tcFlightOpsObject*>(tcSimState::Get()->GetObject(platformId)); ! } } Index: tcOOBView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcOOBView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcOOBView.cpp 1 Jun 2005 00:13:31 -0000 1.8 --- tcOOBView.cpp 28 Jun 2005 02:51:34 -0000 1.9 *************** *** 31,34 **** --- 31,35 ---- #include "tcSimState.h" #include "tcSound.h" + #include "tcAirfieldObject.h" #include "tcHeloObject.h" #include "tcSubObject.h" *************** *** 93,96 **** --- 94,98 ---- surfaceObj.clear(); airObj.clear(); + carrierObj.clear(); flightopsObj.clear(); heloObj.clear(); *************** *** 130,136 **** airObj.push_back(info); } ! else if (dynamic_cast<tcFlightOpsObject*>(platformObj)) { ! flightopsObj.push_back(info); } else if (dynamic_cast<tcSurfaceObject*>(platformObj)) --- 132,152 ---- airObj.push_back(info); } ! else if (tcFlightOpsObject* flightOps = dynamic_cast<tcFlightOpsObject*>(platformObj)) { ! if (dynamic_cast<tcAirfieldObject*>(platformObj)) ! { ! flightopsObj.push_back(info); ! } ! else ! { ! if (flightOps->GetFlightPort()->GetHangarCapacity() > 3) ! { ! carrierObj.push_back(info); ! } ! else ! { ! surfaceObj.push_back(info); ! } ! } } else if (dynamic_cast<tcSurfaceObject*>(platformObj)) *************** *** 292,295 **** --- 308,314 ---- y += 2*mfRowSpacing; + UpdateRectCategory(carrierObj, y, stopy); + y += 2*mfRowSpacing; + UpdateRectCategory(flightopsObj, y, stopy); } *************** *** 447,458 **** DrawCategory(heloObj, stopy); ! yheader = GetCategoryY(flightopsObj); if (yheader > 0) { color.set(0.88f, 0.88f, 0.6f, 1.0f); ! DrawTextR("* CVs and Airfields", mfXOffset, yheader - 5.0f, defaultFont.get(), color, fontSize, LEFT_BASE_LINE); } DrawCategory(flightopsObj, stopy); } --- 466,485 ---- DrawCategory(heloObj, stopy); ! yheader = GetCategoryY(carrierObj); if (yheader > 0) { color.set(0.88f, 0.88f, 0.6f, 1.0f); ! DrawTextR("* Carriers", mfXOffset, yheader - 5.0f, defaultFont.get(), color, fontSize, LEFT_BASE_LINE); } + DrawCategory(carrierObj, stopy); + yheader = GetCategoryY(flightopsObj); + if (yheader > 0) + { + color.set(0.88f, 0.88f, 0.6f, 1.0f); + DrawTextR("* Airfields", mfXOffset, yheader - 5.0f, defaultFont.get(), + color, fontSize, LEFT_BASE_LINE); + } DrawCategory(flightopsObj, stopy); } Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DViewer.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tc3DViewer.cpp 22 Jun 2005 01:22:08 -0000 1.18 --- tc3DViewer.cpp 28 Jun 2005 02:51:34 -0000 1.19 *************** *** 1162,1165 **** --- 1162,1166 ---- if (model->GetNumParents() == 0) { + model->SetupUpdate(track); worldObjects->addChild(model->GetNode().get()); } |