[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.99,1.100 tcDirectorEvent.cpp,1.10,1.11
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-10-21 04:11:16
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9417/src/sim Modified Files: Game.cpp tcDirectorEvent.cpp Log Message: Changes related to GDI+ replacement Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** Game.cpp 7 Oct 2004 22:01:46 -0000 1.99 --- Game.cpp 21 Oct 2004 04:11:00 -0000 1.100 *************** *** 157,160 **** --- 157,163 ---- mnBottomMargin = 200; + enableGraphicsEngine = true; + enableTacticalMap = true; + std::cout << "Game constructor success" << std::endl; } *************** *** 358,361 **** --- 361,365 ---- scenarioSelectView->SetActive(false); + viewer->SetTerrainActive(true); viewer->SetClearMode(2); // depth and color buffer clearing *************** *** 433,437 **** margin += 1; r.x = margin; ! r.y = 0; r.width = mnWidth-margin; r.height = mnHeight-mnBottomMargin-1; --- 437,441 ---- margin += 1; r.x = margin; ! r.y = 2; r.width = mnWidth-margin; r.height = mnHeight-mnBottomMargin-1; *************** *** 624,630 **** wxASSERT(glCanvas); ! smallViewerPosition = wxPoint(mnWidth - 380, 0); smallViewerSize = wxSize(380, 200); - startViewerSize = wxSize(mnWidth/2, mnHeight/2); --- 628,633 ---- wxASSERT(glCanvas); ! smallViewerPosition = wxPoint(mnWidth - 380, 2); smallViewerSize = wxSize(380, 200); startViewerSize = wxSize(mnWidth/2, mnHeight/2); *************** *** 720,723 **** --- 723,729 ---- briefingConsoleLeft = new tcSoundConsole(glCanvas, wxPoint(0,0), wxSize(mnBriefingWidth, leftConsoleHeight), "xml/briefing_left.xml") ; + briefingConsoleLeft->SetBaseRenderBin(10); + + if (!briefingConsoleLeft) { *************** *** 739,742 **** --- 745,750 ---- briefingConsoleBottom = new tcSoundConsole(glCanvas, wxPoint(0, mnHeight-mnBottomMargin), wxSize(mnWidth, mnBottomMargin), "xml/briefing_bottom.xml"); + briefingConsoleBottom->SetBaseRenderBin(10); + if (!briefingConsoleBottom) { *************** *** 830,833 **** --- 838,843 ---- tacticalMap = new tcTacticalMapView(glCanvas, wxPoint(mrectMap.left,mrectMap.top), wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top)); + tacticalMap->SetBaseRenderBin(10); + tacticalMapSize = TM_LARGE; *************** *** 846,849 **** --- 856,860 ---- tacticalMap->SetBlend(true); tacticalMap->RefreshTerrainView(); + } *************** *** 857,860 **** --- 868,872 ---- wxSize(mrectWorldMap.right - mrectWorldMap.left - 1, mrectWorldMap.bottom - mrectWorldMap.top - 1)); + worldMap->SetBaseRenderBin(20); if (!worldMap) *************** *** 1457,1460 **** --- 1469,1473 ---- bool drawEdgeWindows = (size3D != MODE3D_FULL) || (!mb3DActive); bool drawTacticalMap = (size3D == MODE3D_SMALL) || (!mb3DActive); + if (meScreenMode == TACTICAL) { *************** *** 1523,1539 **** else if (meScreenMode == OPTIONS) { briefingConsoleLeft->SetActive(false); briefingConsoleBottom->SetActive(false); optionsView->SetActive(true); ! //networkView->SetActive(false); ! //displaySettingsView->SetActive(false); tacticalMap->SetActive(false); worldMap->SetActive(false); infoConsole->SetActive(false); hookInfo->SetActive(false); oobView->SetActive(false); objectControl->SetActive(false); viewer->SetActive(false); chatBox->SetActive(false); optionsView->Draw(); } --- 1536,1560 ---- else if (meScreenMode == OPTIONS) { + briefingConsoleLeft->SetActive(false); briefingConsoleBottom->SetActive(false); + optionsView->SetActive(true); ! networkView->SetActive(false); ! displaySettingsView->SetActive(false); tacticalMap->SetActive(false); worldMap->SetActive(false); infoConsole->SetActive(false); hookInfo->SetActive(false); + + oobView->SetActive(false); objectControl->SetActive(false); viewer->SetActive(false); + + chatBox->SetActive(false); + + optionsView->Draw(); } *************** *** 1764,1768 **** if ((directorTime > 0.1f) && doRender) { ! mpGraphicsEngine->RenderAll(); viewer->Frame(); --- 1785,1789 ---- if ((directorTime > 0.1f) && doRender) { ! if (enableGraphicsEngine) mpGraphicsEngine->RenderAll(); viewer->Frame(); *************** *** 2051,2054 **** --- 2072,2081 ---- if (chatBox->mbActive) chatBox->MoveToTop(); return; + case 'g': + enableGraphicsEngine = !enableGraphicsEngine; + return; + case 'm': + enableTacticalMap = !enableTacticalMap; + return; case 'w': // toggle world map size if (worldMap) Index: tcDirectorEvent.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirectorEvent.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcDirectorEvent.cpp 7 Oct 2004 22:01:47 -0000 1.10 --- tcDirectorEvent.cpp 21 Oct 2004 04:11:00 -0000 1.11 *************** *** 131,137 **** alpha = 1.0; } ! int nAlpha = (int)(255 * alpha); ! UINT32 currentColor = mapObject->GetColor(); ! mapObject->SetColor((currentColor & 0x00FFFFFF) + (nAlpha << 24)); } } --- 131,138 ---- alpha = 1.0; } ! ! osg::Vec4 currentColor = mapObject->GetColor(); ! currentColor._v[3] = alpha; ! mapObject->SetColor(currentColor); } } |