[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.82,1.83
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-06-14 22:37:22
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3774/src/sim Modified Files: Game.cpp Log Message: Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Game.cpp 14 Jun 2004 21:52:48 -0000 1.82 --- Game.cpp 14 Jun 2004 22:37:12 -0000 1.83 *************** *** 549,555 **** { wxASSERT(startView); - optionsView = new tcOptionsView(glCanvas, wxPoint(0,0), frameSize, - "OptionsView", startView); optionsView->AttachOptions(tcOptions::Get()); --- 549,555 ---- { wxASSERT(startView); + optionsView = new tcOptionsView(glCanvas, startView, wxPoint(0,0), frameSize); + optionsView->AttachOptions(tcOptions::Get()); *************** *** 907,910 **** --- 907,912 ---- //tcSound::Get()->PlayEffect(SEFFECT_WELCOME); + HookSomethingFriendly(); + return true; } *************** *** 1565,1568 **** --- 1567,1584 ---- } + /** + * Hooks first friendly platform. + * Used to avoid blank 3D screen in rand scenario + */ + void tcGame::HookSomethingFriendly() + { + long id; + + int ownAlliance = mcUserInfo.GetOwnAlliance(); + simState->GetAlliancePlatforms(&id, 1, ownAlliance); + + NewHook(id); + } + void tcGame::OnMouseMove(wxMouseEvent& event) {} *************** *** 1654,1667 **** long nHookID = event.m_extraLong; ! tacticalMap->SetHookID(nHookID); ! hookInfo->SetHookID(nHookID); ! oobView->SetHookID(nHookID); ! objectControl->SetHookID(nHookID); ! viewer->SetHookID(nHookID); ! if (nHookID != NULL_INDEX) { tcSound::Get()->PlayEffect(SEFFECT_SHORTBEEP); ! pythonInterface->SetMenuPlatform(nHookID); } } --- 1670,1691 ---- long nHookID = event.m_extraLong; ! NewHook(nHookID); ! } ! /** ! * Update member objects with new hook ID. ! */ ! void tcGame::NewHook(long hookID) ! { ! tacticalMap->SetHookID(hookID); ! hookInfo->SetHookID(hookID); ! oobView->SetHookID(hookID); ! objectControl->SetHookID(hookID); ! viewer->SetHookID(hookID); ! ! if (hookID != NULL_INDEX) { tcSound::Get()->PlayEffect(SEFFECT_SHORTBEEP); ! pythonInterface->SetMenuPlatform(hookID); } } |