Thread: [Gcblue-commits] gcb_wx/src/sim Game.cpp,1.98,1.99 tcDirector.cpp,1.8,1.9 tcDirectorEvent.cpp,1.9,1.
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-10-07 22:02:01
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12439/src/sim Modified Files: Game.cpp tcDirector.cpp tcDirectorEvent.cpp Log Message: Changes related to GDI+ replacement Index: tcDirector.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirector.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcDirector.cpp 14 Sep 2004 02:01:47 -0000 1.8 --- tcDirector.cpp 7 Oct 2004 22:01:47 -0000 1.9 *************** *** 1,6 **** ! /* ! ** tcDirector.cpp ! ** ! ** Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcDirector.cpp ! */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 26,34 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #include "wx/msw/private.h" // for MS Windows specific definitions #endif #include "tcDirector.h" #include "tcDirectorEvent.h" #include "tcSound.h" #include "wxcommands.h" --- 26,34 ---- #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "tcDirector.h" #include "tcDirectorEvent.h" + #include "tcConsoleBox.h" #include "tcSound.h" #include "wxcommands.h" *************** *** 115,119 **** } ! tcDirector::tcDirector(tc3DViewer *view3D, tcConsole *console , wxWindow *win) : viewer(view3D) --- 115,119 ---- } ! tcDirector::tcDirector(tc3DViewer *view3D, tcConsoleBox *console , wxWindow *win) : viewer(view3D) Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** Game.cpp 2 Oct 2004 22:41:33 -0000 1.98 --- Game.cpp 7 Oct 2004 22:01:46 -0000 1.99 *************** *** 307,311 **** // clear briefing console text ! briefingConsoleLeft->ClearBuffer(); briefingConsoleLeft->SetDelayedTextEffect(true); --- 307,311 ---- // clear briefing console text ! briefingConsoleLeft->Clear(); briefingConsoleLeft->SetDelayedTextEffect(true); *************** *** 431,438 **** { int margin = (meScreenMode == TACTICALBRIEF) ? mnBriefingWidth : mnLeftMargin; r.x = margin; r.y = 0; r.width = mnWidth-margin; ! r.height = mnHeight-mnBottomMargin; } else if (size3D == MODE3D_FULL) --- 431,439 ---- { int margin = (meScreenMode == TACTICALBRIEF) ? mnBriefingWidth : mnLeftMargin; + margin += 1; r.x = margin; r.y = 0; r.width = mnWidth-margin; ! r.height = mnHeight-mnBottomMargin-1; } else if (size3D == MODE3D_FULL) *************** *** 512,519 **** /*** Init edit control ***/ ! editControl = new tcEditControl(viewer, wxPoint(200,200), wxSize(100,50)); editControl->SetActive(false); ! chatBox = new tcChatBox(viewer, wxPoint(200, 200), wxSize(300, 180), "ChatBox"); chatBox->SetActive(false); chatBox->MoveToTop(); --- 513,520 ---- /*** Init edit control ***/ ! editControl = new tcEditControl(glCanvas, wxPoint(200,200), wxSize(100,50)); editControl->SetActive(false); ! chatBox = new tcChatBox(glCanvas, wxPoint(200, 200), wxSize(300, 180), "ChatBox"); chatBox->SetActive(false); chatBox->MoveToTop(); *************** *** 626,633 **** smallViewerSize = wxSize(380, 200); ! startViewerSize = wxSize(mnWidth, mnHeight); startViewerPosition = wxPoint(mnWidth - startViewerSize.x, mnHeight - startViewerSize.y); ! viewer = new tc3DViewer(glCanvas, startViewerPosition, startViewerSize); --- 627,635 ---- smallViewerSize = wxSize(380, 200); ! ! startViewerSize = wxSize(mnWidth/2, mnHeight/2); startViewerPosition = wxPoint(mnWidth - startViewerSize.x, mnHeight - startViewerSize.y); ! viewer = new tc3DViewer(glCanvas, startViewerPosition, startViewerSize); *************** *** 669,674 **** void tcGame::InitializeStartView() { ! wxSize viewerSize = viewer->GetSize(); ! startView = new tcStartView(viewer, wxPoint(0,0), viewerSize, "StartView"); startView->AttachOptions(tcOptions::Get()); --- 671,675 ---- void tcGame::InitializeStartView() { ! startView = new tcStartView(glCanvas, wxPoint(0,0), frameSize, "StartView"); startView->AttachOptions(tcOptions::Get()); *************** *** 690,696 **** { ! wxASSERT(viewer); ! optionsView = new tcOptionsView(viewer, wxPoint(0,0), frameSize, "OptionsView"); optionsView->Init(); --- 691,697 ---- { ! wxASSERT(glCanvas); ! optionsView = new tcOptionsView(glCanvas, wxPoint(0,0), frameSize, "OptionsView"); optionsView->Init(); *************** *** 705,711 **** void tcGame::InitializeNetworkView() { ! wxASSERT(viewer); ! networkView = new tcNetworkView(viewer, wxPoint(0,0), frameSize, "NetworkView"); } --- 706,712 ---- void tcGame::InitializeNetworkView() { ! wxASSERT(glCanvas); ! networkView = new tcNetworkView(glCanvas, wxPoint(0,0), frameSize, "NetworkView"); } *************** *** 717,722 **** { int leftConsoleHeight = mnHeight-mnBottomMargin; ! briefingConsoleLeft = new tcButtonConsole(glCanvas, wxPoint(0,0), ! wxSize(mnBriefingWidth,leftConsoleHeight)); if (!briefingConsoleLeft) { --- 718,723 ---- { int leftConsoleHeight = mnHeight-mnBottomMargin; ! briefingConsoleLeft = new tcSoundConsole(glCanvas, wxPoint(0,0), ! wxSize(mnBriefingWidth, leftConsoleHeight), "xml/briefing_left.xml") ; if (!briefingConsoleLeft) { *************** *** 726,730 **** briefingConsoleLeft->SetEffect(SEFFECT_MUTEDBEEP); ! briefingConsoleLeft->InitGdi(10.0f,0xFF64FF64); briefingConsoleLeft->SetLineSpacing(10); briefingConsoleLeft->SetWrap(48); --- 727,731 ---- briefingConsoleLeft->SetEffect(SEFFECT_MUTEDBEEP); ! //briefingConsoleLeft->InitGdi(10.0f,0xFF64FF64); briefingConsoleLeft->SetLineSpacing(10); briefingConsoleLeft->SetWrap(48); *************** *** 734,741 **** briefingConsoleLeft->Print(" "); // need this to get it to display // add buttons ! briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,14), ID_SKIPBRIEFING, "EXIT"); ! briefingConsoleBottom = new tcSoundConsole(glCanvas, wxPoint(0,mnHeight-mnBottomMargin), ! wxSize(mnWidth,mnBottomMargin)); if (!briefingConsoleBottom) { --- 735,742 ---- briefingConsoleLeft->Print(" "); // need this to get it to display // add buttons ! //briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,14), ID_SKIPBRIEFING, "EXIT"); ! briefingConsoleBottom = new tcSoundConsole(glCanvas, wxPoint(0, mnHeight-mnBottomMargin), ! wxSize(mnWidth, mnBottomMargin), "xml/briefing_bottom.xml"); if (!briefingConsoleBottom) { *************** *** 745,749 **** briefingConsoleBottom->SetEffect(-1); ! briefingConsoleBottom->InitGdi(10.0f,0xFF64FF64); briefingConsoleBottom->SetLineSpacing(10); briefingConsoleBottom->SetWrap(100); --- 746,750 ---- briefingConsoleBottom->SetEffect(-1); ! //briefingConsoleBottom->InitGdi(10.0f,0xFF64FF64); briefingConsoleBottom->SetLineSpacing(10); briefingConsoleBottom->SetWrap(100); *************** *** 759,764 **** void tcGame::InitializeCreditView() { ! wxSize viewerSize = viewer->GetSize(); ! creditView = new tcCreditView(viewer, wxPoint(0,0), viewerSize, "CreditView"); --- 760,764 ---- void tcGame::InitializeCreditView() { ! creditView = new tcCreditView(glCanvas, wxPoint(0,0), frameSize, "CreditView"); *************** *** 784,788 **** tcDirector::AttachMapViews(tacticalMap, worldMap); ! director = new tcDirector(viewer, briefingConsoleLeft, this); director->SetStartTime(0); director->InitTest(); // load test event sequence --- 784,788 ---- tcDirector::AttachMapViews(tacticalMap, worldMap); ! director = new tcDirector(viewer, briefingConsoleLeft->GetConsoleBox(), this); director->SetStartTime(0); director->InitTest(); // load test event sequence *************** *** 795,806 **** void tcGame::InitializeDisplaySettingsView() { ! wxASSERT(viewer); ! ! // displaySettingsView = ! // new tcDisplaySettingsView(viewer, wxPoint(0,0), frameSize, "DisplaySettings"); ! wxSize viewerSize = viewer->GetSize(); displaySettingsView = ! new tcDisplaySettingsView(viewer, wxPoint(0,0), viewerSize, "DisplaySettings"); displaySettingsView->SetActive(false); --- 795,802 ---- void tcGame::InitializeDisplaySettingsView() { ! wxASSERT(glCanvas); displaySettingsView = ! new tcDisplaySettingsView(glCanvas, wxPoint(0,0), frameSize, "DisplaySettings"); displaySettingsView->SetActive(false); *************** *** 813,820 **** void tcGame::InitializeScenarioSelectView() { ! wxASSERT(viewer); scenarioSelectView = ! new tcScenarioSelectView(viewer, wxPoint(0,0), frameSize, "ScenarioSelect"); if (scenarioSelectView->Init() == false) --- 809,816 ---- void tcGame::InitializeScenarioSelectView() { ! wxASSERT(glCanvas); scenarioSelectView = ! new tcScenarioSelectView(glCanvas, wxPoint(0,0), frameSize, "ScenarioSelect"); if (scenarioSelectView->Init() == false) *************** *** 886,890 **** mrectLowerLeft.bottom = mnHeight; ! infoConsole = new tcSoundConsole(glCanvas, wxPoint(mrectLowerLeft.left,mrectLowerLeft.top), wxSize(200,200)); messageConsole = infoConsole; --- 882,889 ---- mrectLowerLeft.bottom = mnHeight; ! infoConsole = new tcSoundConsole(glCanvas, ! wxPoint(mrectLowerLeft.left, mrectLowerLeft.top), wxSize(200,200), ! "xml/info_console.xml", "InfoConsole"); ! infoConsole->LoadBackgroundImage("start_background.jpg"); messageConsole = infoConsole; *************** *** 896,900 **** infoConsole->SetEffect(-1); //SEFFECT_MUTEDBEEP); // no sound ! infoConsole->InitGdi(10.0f,0xFF64FF64); infoConsole->SetLineSpacing(10); infoConsole->SetWrap(28); --- 895,899 ---- infoConsole->SetEffect(-1); //SEFFECT_MUTEDBEEP); // no sound ! // infoConsole->InitGdi(10.0f,0xFF64FF64); infoConsole->SetLineSpacing(10); infoConsole->SetWrap(28); *************** *** 1782,1786 **** if (size3D == MODE3D_SMALL) { ! viewerText = ""; } else --- 1781,1785 ---- if (size3D == MODE3D_SMALL) { ! viewerText = " "; // "" causes dropout of line objects in consoles } else *************** *** 2075,2078 **** --- 2074,2080 ---- tacticalMap->ToggleShowTrackTags(); return; + case 'T': + viewer->SetTerrainActive(!viewer->GetTerrainActive()); + return; case 'p': if (!mbScenarioEdit) mbPaused = !mbPaused; Index: tcDirectorEvent.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirectorEvent.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcDirectorEvent.cpp 14 Sep 2004 02:01:47 -0000 1.9 --- tcDirectorEvent.cpp 7 Oct 2004 22:01:47 -0000 1.10 *************** *** 1,6 **** ! /* ! ** tcDirectorEvent.cpp ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcDirectorEvent.cpp ! */ ! /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 26,30 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #include "wx/msw/private.h" // for MS Windows specific definitions #endif --- 26,29 ---- *************** *** 33,37 **** #include "tcMapView.h" #include "tcSound.h" ! #include "tcConsole.h" #include "tc3DViewer.h" #include "math_constants.h" --- 32,36 ---- #include "tcMapView.h" #include "tcSound.h" ! #include "tcConsoleBox.h" #include "tc3DViewer.h" #include "math_constants.h" *************** *** 243,247 **** /***************** tcConsoleTextEvent *******************/ ! tcConsole * tcConsoleTextEvent::console = NULL; void tcConsoleTextEvent::Update(double t) --- 242,246 ---- /***************** tcConsoleTextEvent *******************/ ! tcConsoleBox * tcConsoleTextEvent::console = NULL; void tcConsoleTextEvent::Update(double t) |