Thread: [Gcblue-commits] gcb_wx/src/sim Game.cpp,1.140,1.141 gcb.cpp,1.18,1.19 tcHeloObject.cpp,1.7,1.8 tcLa
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-09-14 01:33:32
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3870/src/sim Modified Files: Game.cpp gcb.cpp tcHeloObject.cpp tcLauncher.cpp tcMapData.cpp Log Message: Updates for wxWidgets 2.6.1 compatibility Index: tcLauncher.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncher.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** tcLauncher.cpp 10 Sep 2005 21:47:38 -0000 1.29 --- tcLauncher.cpp 14 Sep 2005 01:33:24 -0000 1.30 *************** *** 21,24 **** --- 21,29 ---- #include "stdwx.h" // precompiled header file + + #ifndef WX_PRECOMP + #include "wx/wx.h" + #endif // WX_PRECOMP + #include "tcLauncher.h" #include "tcDatabase.h" *************** *** 38,41 **** --- 43,49 ---- #endif + using std::max; + using std::min; + tcSimState* tcLauncher::simState = 0; Index: tcHeloObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcHeloObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcHeloObject.cpp 10 Sep 2005 21:47:38 -0000 1.7 --- tcHeloObject.cpp 14 Sep 2005 01:33:24 -0000 1.8 *************** *** 33,36 **** --- 33,39 ---- #endif + using std::min; + using std::max; + void tcHeloObject::Clear() { Index: tcMapData.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapData.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tcMapData.cpp 20 Jul 2005 16:24:54 -0000 1.24 --- tcMapData.cpp 14 Sep 2005 01:33:24 -0000 1.25 *************** *** 22,25 **** --- 22,29 ---- #include "stdwx.h" + #ifndef WX_PRECOMP + #include "wx/wx.h" + #endif + #include "tcMapData.h" #include "aerror.h" *************** *** 33,36 **** --- 37,42 ---- #endif + using std::max; + using std::min; tcMapData* tcMapData::Get() *************** *** 198,205 **** if (rSource.top != 0) {rSource.top--;} if (rSource.bottom < (M_HIGHRES - 1)) {rSource.bottom++;} ! rSource.top = max(rSource.top,0); ! rSource.bottom = min(rSource.bottom,M_HIGHRES); ! rSource.left = max(rSource.left,0); ! rSource.right = min(rSource.right,N_HIGHRES); if (bJitterPatch) {if ((rSource.left % 16 ==0)&&(rSource.left>0)) {rSource.left--;rSource.right--;}} --- 204,211 ---- if (rSource.top != 0) {rSource.top--;} if (rSource.bottom < (M_HIGHRES - 1)) {rSource.bottom++;} ! rSource.top = max((int)rSource.top,0); ! rSource.bottom = min((int)rSource.bottom,M_HIGHRES); ! rSource.left = max((int)rSource.left,0); ! rSource.right = min((int)rSource.right,N_HIGHRES); if (bJitterPatch) {if ((rSource.left % 16 ==0)&&(rSource.left>0)) {rSource.left--;rSource.right--;}} *************** *** 259,265 **** ** This started happening after switching the terrain map to use osg::Texture */ ! nRed = min(128,nRed+80); ! nGreen = min(128,nGreen+80); ! nBlue = min(128,nBlue+60); maPalette1[k] = nRed + (nGreen << 8) + (nBlue << 16) + alpha_val; --- 265,271 ---- ** This started happening after switching the terrain map to use osg::Texture */ ! nRed = min((unsigned int)128, nRed+80); ! nGreen = min((unsigned int)128,nGreen+80); ! nBlue = min((unsigned int)128,nBlue+60); maPalette1[k] = nRed + (nGreen << 8) + (nBlue << 16) + alpha_val; Index: gcb.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/gcb.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** gcb.cpp 20 Feb 2005 21:54:35 -0000 1.18 --- gcb.cpp 14 Sep 2005 01:33:24 -0000 1.19 *************** *** 22,25 **** --- 22,26 ---- #include "stdwx.h" // precompiled header file + #ifndef WX_PRECOMP #include "wx/wx.h" *************** *** 30,33 **** --- 31,35 ---- #include "wx/dir.h" + #include "wx/evtloop.h" #include "gcb.h" *************** *** 48,51 **** --- 50,57 ---- FILE *errStream, *outStream; ///< for redirecting stderr, stdout + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + /** * tcGame seems to be skipped for key events, this is a workaround *************** *** 126,130 **** int GcbApp::MainLoop() { ! m_keepGoing = TRUE; while (m_keepGoing) --- 132,136 ---- int GcbApp::MainLoop() { ! bool m_keepGoing = TRUE; while (m_keepGoing) *************** *** 152,156 **** } ! return ((MSG*)current_msg)->wParam; } --- 158,162 ---- } ! return 0; // ((MSG*)current_msg)->wParam; } *************** *** 180,183 **** --- 186,193 ---- gameFrame->Show(true); SetTopWindow(gameFrame); + + eventLoop = new wxEventLoop(); + wxEventLoop::SetActive(eventLoop); + } catch (...) *************** *** 212,215 **** --- 222,228 ---- WTL("FCLOSE"); // special string to close file + delete eventLoop; + eventLoop = 0; + return wxApp::OnExit(); } Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** Game.cpp 10 Sep 2005 21:47:38 -0000 1.140 --- Game.cpp 14 Sep 2005 01:33:24 -0000 1.141 *************** *** 77,81 **** BEGIN_EVENT_TABLE(tcGame, wxFrame) EVT_PAINT(tcGame::OnPaint) ! EVT_NC_PAINT(tcGame::OnPaint) EVT_ERASE_BACKGROUND(tcGame::OnEraseBackground) EVT_LEFT_DOWN(tcGame::OnLButtonDown) --- 77,81 ---- BEGIN_EVENT_TABLE(tcGame, wxFrame) EVT_PAINT(tcGame::OnPaint) ! EVT_NC_PAINT(tcGame::OnNcPaint) EVT_ERASE_BACKGROUND(tcGame::OnEraseBackground) EVT_LEFT_DOWN(tcGame::OnLButtonDown) *************** *** 1974,1977 **** --- 1974,1982 ---- void tcGame::OnMouseWheel(wxMouseEvent& event) {} + void tcGame::OnNcPaint(wxNcPaintEvent& event) + { + wxPaintDC dc(this); + } + void tcGame::OnPaint(wxPaintEvent& event) { |