[Gcblue-commits] gcb_wx/src/graphics tc3DWindow.cpp,1.29,1.30 tcContainerGui.cpp,1.5,1.6 tcCreditVie
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-12-26 22:14:15
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17429/src/graphics Modified Files: tc3DWindow.cpp tcContainerGui.cpp tcCreditView.cpp tcFlightPortGui.cpp tcPlatformGui.cpp tcStoresGui.cpp Log Message: Launcher reload and helo launch bug fixes Index: tcFlightPortGui.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcFlightPortGui.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcFlightPortGui.cpp 18 Dec 2005 18:48:17 -0000 1.4 --- tcFlightPortGui.cpp 26 Dec 2005 22:14:03 -0000 1.5 *************** *** 143,152 **** void tcFlightPortGui::Draw() { - if (drawCount++ % 4 != 0) return; // update draw every 4th frame - tcFlightPort* flightPort = GetFlightPort(); if (flightPort == 0) DestroyGui(); if (FinishDestroy()) return; UpdateGui(); --- 143,152 ---- void tcFlightPortGui::Draw() { tcFlightPort* flightPort = GetFlightPort(); if (flightPort == 0) DestroyGui(); if (FinishDestroy()) return; + if (drawCount++ % 4 != 0) return; // update draw every 4th frame + UpdateGui(); Index: tcPlatformGui.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPlatformGui.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcPlatformGui.cpp 14 Jul 2005 23:42:22 -0000 1.5 --- tcPlatformGui.cpp 26 Dec 2005 22:14:03 -0000 1.6 *************** *** 96,106 **** void tcPlatformGui::Draw() ! { ! if (drawCount++ % 4 != 0) return; // update draw every 4th frame ! tcPlatformObject* platform = GetPlatform(); if (platform == 0) DestroyGui(); if (FinishDestroy()) return; UpdateGui(); --- 96,106 ---- void tcPlatformGui::Draw() ! { tcPlatformObject* platform = GetPlatform(); if (platform == 0) DestroyGui(); if (FinishDestroy()) return; + if (drawCount++ % 4 != 0) return; // update draw every 4th frame + UpdateGui(); Index: tcCreditView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcCreditView.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcCreditView.cpp 10 Sep 2005 21:47:38 -0000 1.17 --- tcCreditView.cpp 26 Dec 2005 22:14:03 -0000 1.18 *************** *** 75,80 **** s = "Jason Simpson"; ! AddCredit(s, 60.0f, 1); --- 75,82 ---- s = "Jason Simpson"; ! AddCredit(s, 25.0f, 1); + s = "Urwumpe"; + AddCredit(s, 60.0f, 1); *************** *** 89,94 **** --- 91,103 ---- s = "Havoc"; + AddCredit(s, 25.0f, 1); + + s = "Suresh"; + AddCredit(s, 25.0f, 1); + + s = "Urwumpe"; AddCredit(s, 75.0f, 1); + s = "--- \"Music\" ---"; AddCredit(s, 25.0f, 1); Index: tcStoresGui.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcStoresGui.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcStoresGui.cpp 14 Jul 2005 23:42:23 -0000 1.4 --- tcStoresGui.cpp 26 Dec 2005 22:14:03 -0000 1.5 *************** *** 83,92 **** void tcStoresGui::Draw() { - if (drawCount++ % 4 != 0) return; // update draw every 4th frame - tcStores* stores = GetStores(); if (stores == 0) DestroyGui(); if (FinishDestroy()) return; UpdateGui(); --- 83,91 ---- void tcStoresGui::Draw() { tcStores* stores = GetStores(); if (stores == 0) DestroyGui(); if (FinishDestroy()) return; + if (drawCount++ % 4 != 0) return; // update draw every 4th frame UpdateGui(); Index: tc3DWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DWindow.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** tc3DWindow.cpp 18 Dec 2005 18:48:17 -0000 1.29 --- tc3DWindow.cpp 26 Dec 2005 22:14:03 -0000 1.30 *************** *** 283,293 **** if (child == NULL) return; std::vector<tc3DWindow*>::iterator iter = children.begin(); ! for (iter = children.begin(); iter != children.end(); ++iter) { if ((*iter) == child) { children.erase(iter); - return; } } } --- 283,296 ---- if (child == NULL) return; std::vector<tc3DWindow*>::iterator iter = children.begin(); ! for (iter = children.begin(); iter != children.end(); ) { if ((*iter) == child) { children.erase(iter); } + else + { + ++iter; + } } } Index: tcContainerGui.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcContainerGui.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcContainerGui.cpp 24 Dec 2005 07:41:20 -0000 1.5 --- tcContainerGui.cpp 26 Dec 2005 22:14:03 -0000 1.6 *************** *** 121,125 **** --- 121,136 ---- tc3DWindow* tcContainerGui::parent = 0; int tcContainerGui::windowLayer = 2; + std::list<tcContainerGui*> tcContainerGui::openContainers; + + void tcContainerGui::CloseAll() + { + for (std::list<tcContainerGui*>::iterator iter = openContainers.begin(); + iter != openContainers.end(); ++iter) + { + (*iter)->DestroyGui(); + } + + } void tcContainerGui::SetParent(tc3DWindow* win) *************** *** 384,387 **** --- 395,421 ---- } + void tcContainerGui::RegisterGui() + { + openContainers.push_back(this); + } + + + void tcContainerGui::UnregisterGui() + { + std::list<tcContainerGui*>::iterator iter = + find(openContainers.begin(), openContainers.end(), this); + + if (iter != openContainers.end()) + { + openContainers.erase(iter); + } + else + { + fprintf(stderr, "tcContainerGui::UnregisterGui - not found in registry %s\n", + wxWindow::GetName().c_str()); + } + } + + void tcContainerGui::UpdateWindowDrag(const wxPoint& pos) { *************** *** 474,477 **** --- 508,513 ---- SetActive(true); + RegisterGui(); + #ifdef _DEBUG fprintf(stdout, "tcContainerGui::tcContainerGui - %s, %d slots\n", name.c_str(), *************** *** 494,497 **** --- 530,535 ---- windowLayer--; + + UnregisterGui(); } |