[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.65,1.66 tcCreditView.cpp,1.8,1.9 tcDirector.cpp,1.5,1.6 t
Status: Alpha
Brought to you by:
ddcforge
|
From: <ddc...@us...> - 2004-02-29 23:02:10
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13290/src/sim Modified Files: Game.cpp tcCreditView.cpp tcDirector.cpp tcDirectorEvent.cpp tcMapView.cpp tcNetworkView.cpp tcOOBView.cpp tcObjectControl.cpp tcRadar.cpp tcScenarioSelectView.cpp tcSimState.cpp tcStartView.cpp Log Message: Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Game.cpp 27 Feb 2004 00:07:59 -0000 1.65 --- Game.cpp 29 Feb 2004 22:51:36 -0000 1.66 *************** *** 46,52 **** #include "cspDate.h" #include "tcDirector.h" - #include "network/tcNetworkInterface.h" #include "tcStandardWindow.h" #include "tcNetworkView.h" #if defined(_MSC_VER) --- 46,52 ---- #include "cspDate.h" #include "tcDirector.h" #include "tcStandardWindow.h" #include "tcNetworkView.h" + #include "network/tcMultiplayerInterface.h" #if defined(_MSC_VER) *************** *** 59,62 **** --- 59,63 ---- using namespace std; using namespace MapView; + using network::tcMultiplayerInterface; BEGIN_EVENT_TABLE(tcGame, wxFrame) *************** *** 247,251 **** { meScreenMode = CREDIT; ! mcSound.PlayMusic("tension1"); } --- 248,252 ---- { meScreenMode = CREDIT; ! tcSound::Get()->PlayMusic("tension1"); } *************** *** 269,273 **** if (meGameMode == GM_START) { ! if (meScreenMode == CREDIT) mcSound.PlayMusic("loop1"); meScreenMode = START; } --- 270,274 ---- if (meGameMode == GM_START) { ! if (meScreenMode == CREDIT) tcSound::Get()->PlayMusic("loop1"); meScreenMode = START; } *************** *** 351,355 **** InitializeCreditView(); InitializeNetworkView(); - InitializeNetwork(); InitializeScenarioSelectView(); --- 352,355 ---- *************** *** 438,444 **** void tcGame::StartMusic() { ! if (mcSound.Init()) { ! mcSound.Test(); } else --- 438,446 ---- void tcGame::StartMusic() { ! if (mcOptions.disableSound) return; ! ! if (tcSound::Get()->Init()) { ! tcSound::Get()->Test(); } else *************** *** 448,455 **** return; } - - tcWindow::AttachSound(&mcSound); ! mcSound.PlayMusic("loop1"); } --- 450,458 ---- return; } ! if (mcOptions.mbPlayMusic) ! { ! tcSound::Get()->PlayMusic("loop1"); ! } } *************** *** 472,476 **** startView->AttachOptions(&mcOptions); - startView->AttachSound(&mcSound); startView->LoadBackgroundImage("start_background.jpg"); --- 475,478 ---- *************** *** 499,503 **** optionsView->AttachOptions(&mcOptions); - optionsView->AttachSound(&mcSound); if (optionsView->Init() == false) --- 501,504 ---- *************** *** 510,524 **** /** - * Initialize network multiplayer objects - */ - void tcGame::InitializeNetwork() - { - networkInterface = new network::tcNetworkInterface(); - wxASSERT(networkView); - networkView->AttachNetworkInterface(networkInterface); - //networkInterface->MakeServer(); - } - - /** * Initialize network view interface * startView must be initialized before calling this --- 511,514 ---- *************** *** 550,554 **** throw "briefingConsoleLeft->CreateSurfaces failed"; } - briefingConsoleLeft->AttachSound(&mcSound); briefingConsoleLeft->SetEffect(SEFFECT_MUTEDBEEP); briefingConsoleLeft->InitGdi(10.0f,0xFF64FF64); --- 540,543 ---- *************** *** 575,579 **** throw "briefingConsoleBottom->CreateSurfaces failed"; } - briefingConsoleBottom->AttachSound(&mcSound); briefingConsoleBottom->SetEffect(-1); briefingConsoleBottom->InitGdi(10.0f,0xFF64FF64); --- 564,567 ---- *************** *** 601,605 **** } - creditView->AttachSound(&mcSound); creditView->LoadBackgroundImage("start_background.jpg"); --- 589,592 ---- *************** *** 620,624 **** wxASSERT(tacticalMap); wxASSERT(briefingConsoleLeft); ! director = new tcDirector(viewer, tacticalMap, &mcSound, briefingConsoleLeft, this); director->SetStartTime(0); director->InitTest(); // load test event sequence --- 607,611 ---- wxASSERT(tacticalMap); wxASSERT(briefingConsoleLeft); ! director = new tcDirector(viewer, tacticalMap, briefingConsoleLeft, this); director->SetStartTime(0); director->InitTest(); // load test event sequence *************** *** 641,645 **** scenarioSelectView->AttachSimState(&mcSimState); - scenarioSelectView->AttachSound(&mcSound); scenarioSelectView->LoadBackgroundImage("start_background.jpg"); --- 628,631 ---- *************** *** 670,674 **** tacticalMap->AttachOptions(&mcOptions); tacticalMap->AttachCommandInterface(&mcCommandQueue); - tacticalMap->AttachSound(&mcSound); tacticalMap->SetYMirror(mnHeight); // was 200 --- 656,659 ---- *************** *** 706,710 **** } - infoConsole->AttachSound(&mcSound); infoConsole->SetEffect(-1); //SEFFECT_MUTEDBEEP); // no sound infoConsole->InitGdi(10.0f,0xFF64FF64); --- 691,694 ---- *************** *** 756,760 **** } - objectControl->AttachSound(&mcSound); objectControl->AttachCommandInterface(&mcCommandQueue); objectControl->AttachSimState(&mcSimState); --- 740,743 ---- *************** *** 786,790 **** oobView->AttachMapView(tacticalMap); oobView->AttachSimState(&mcSimState); - oobView->AttachSound(&mcSound); oobView->mnAlliance = mcUserInfo.GetOwnAlliance(); // TODO: make this configurable oobView->SetSkipCount(mcOptions.renderSkipCount); --- 769,772 ---- *************** *** 829,833 **** mcWorldMap.AttachOptions(&mcOptions); mcWorldMap.AttachCommandInterface(&mcCommandQueue); - mcWorldMap.AttachSound(&mcSound); if(!mcWorldMap.CreateSurfaces(mpGraphicsEngine)) --- 811,814 ---- *************** *** 870,874 **** mcSimState.AttachMapData(&mcMapData); mcSimState.AttachPythonInterface(pythonInterface); - mcSimState.AttachSound(&mcSound); mcSimState.AttachUserInfo(&mcUserInfo); mcSimState.AttachCommandInterface(&mcCommandQueue); --- 851,854 ---- *************** *** 883,887 **** wxASSERT(director); pythonInterface->AttachConsole(infoConsole); - pythonInterface->AttachSound(&mcSound); pythonInterface->AttachSensorMap(mcSimState.mcSensorMap.GetMap(mcUserInfo.GetOwnAlliance())); pythonInterface->AttachCommandQueue(&mcCommandQueue); --- 863,866 ---- *************** *** 896,900 **** viewer->AttachMapData(&mcMapData); ! //mcSound.PlayEffect(SEFFECT_WELCOME); return true; --- 875,879 ---- viewer->AttachMapData(&mcMapData); ! //tcSound::Get()->PlayEffect(SEFFECT_WELCOME); return true; *************** *** 1038,1042 **** tcTime::Update(); ! networkInterface->Update(); startView->mbPlayEnabled = mcSimState.msScenarioInfo.mbLoaded; --- 1017,1021 ---- tcTime::Update(); ! tcMultiplayerInterface::Get().Update(); startView->mbPlayEnabled = mcSimState.msScenarioInfo.mbLoaded; *************** *** 1083,1087 **** viewer->Frame(); ! mcSound.UpdateAutoMusic(0); #if 0 --- 1062,1066 ---- viewer->Frame(); ! tcSound::Get()->UpdateAutoMusic(0); #if 0 *************** *** 1335,1343 **** if(mcOptions.mbPlayMusic) { ! mcSound.UpdateAutoMusic(gameTime); } else { ! mcSound.StopMusic(); } --- 1314,1322 ---- if(mcOptions.mbPlayMusic) { ! tcSound::Get()->UpdateAutoMusic(gameTime); } else { ! tcSound::Get()->StopMusic(); } *************** *** 1408,1417 **** } ! if (networkInterface) ! { ! delete networkInterface; ! } ! ! mcSound.UnInit(); tcCustomControl::ReleaseGdi(); --- 1387,1391 ---- } ! tcSound::Get()->UnInit(); tcCustomControl::ReleaseGdi(); *************** *** 1518,1522 **** if (nHookID != NULL_INDEX) { ! mcSound.PlayEffect(SEFFECT_SHORTBEEP); pythonInterface->SetMenuPlatform(nHookID); } --- 1492,1496 ---- if (nHookID != NULL_INDEX) { ! tcSound::Get()->PlayEffect(SEFFECT_SHORTBEEP); pythonInterface->SetMenuPlatform(nHookID); } *************** *** 1837,1841 **** SetRect(&marectButtonBar[0],mrectConsole.right - 100,nY-25,mrectConsole.right,nY); maButtonBar[0].SetWindow(marectButtonBar[0]); - maButtonBar[0].AttachSound(&mcSound); maButtonBar[0].ClearButtons(); maButtonBar[0].AddButton("buttonbar_on.bmp","buttonbar_off.bmp","Norm"); --- 1811,1814 ---- *************** *** 1850,1854 **** SetRect(&marectButtonBar[1],mrectConsole.right - 200,nY-25,mrectConsole.right,nY); maButtonBar[1].SetWindow(marectButtonBar[1]); - maButtonBar[1].AttachSound(&mcSound); maButtonBar[1].ClearButtons(); maButtonBar[1].AddButton("buttonbar_on.bmp","buttonbar_off.bmp","NTDS"); --- 1823,1826 ---- *************** *** 1863,1867 **** SetRect(&marectButtonBar[2],mrectConsole.right - 350,nY-25,mrectConsole.right,nY); maButtonBar[2].SetWindow(marectButtonBar[2]); - maButtonBar[2].AttachSound(&mcSound); maButtonBar[2].ClearButtons(); maButtonBar[2].AddButton("buttonbar_on.bmp","buttonbar_off.bmp","Small"); --- 1835,1838 ---- *************** *** 1877,1881 **** SetRect(&marectButtonBar[3],20, mrectOOB.top + 20, 0, 0); maButtonBar[3].SetWindow(marectButtonBar[3]); - maButtonBar[3].AttachSound(&mcSound); maButtonBar[3].ClearButtons(); maButtonBar[3].AddButton("buttonbar_on.bmp","buttonbar_off.bmp","OOB"); --- 1848,1851 ---- *************** *** 2081,2085 **** else { if (mcSimState.DesignateLauncherTarget(tacticalMap->mnHookID,anData,snData2)==false) { ! mcSound.PlayEffect(SEFFECT_REJECTBEEP); // failed, repeat command ProcessCommand(PC_GETLAUNCHERTARGET,0,0,anData); --- 2051,2055 ---- else { if (mcSimState.DesignateLauncherTarget(tacticalMap->mnHookID,anData,snData2)==false) { ! tcSound::Get()->PlayEffect(SEFFECT_REJECTBEEP); // failed, repeat command ProcessCommand(PC_GETLAUNCHERTARGET,0,0,anData); *************** *** 2091,2095 **** WTL("tcGame::ProcessCommand PC_GETDATUM"); tacticalMap->ActivateCmd(MC_DATUM); ! //mcSound.PlayEffect(SEFFECT_TWOBEEPS); seMode = PLATFORM_DATUM; break; --- 2061,2065 ---- WTL("tcGame::ProcessCommand PC_GETDATUM"); tacticalMap->ActivateCmd(MC_DATUM); ! //tcSound::Get()->PlayEffect(SEFFECT_TWOBEEPS); seMode = PLATFORM_DATUM; break; *************** *** 2097,2101 **** WTL("tcGame::ProcessCommand PC_GETLAUNCHERDATUM"); tacticalMap->ActivateCmd(MC_DATUM); ! //mcSound.PlayEffect(SEFFECT_TWOBEEPS); seMode = LAUNCHER_DATUM; break; --- 2067,2071 ---- WTL("tcGame::ProcessCommand PC_GETLAUNCHERDATUM"); tacticalMap->ActivateCmd(MC_DATUM); ! //tcSound::Get()->PlayEffect(SEFFECT_TWOBEEPS); seMode = LAUNCHER_DATUM; break; *************** *** 2131,2135 **** } else { ! mcSound.PlayEffect(SEFFECT_REJECTBEEP); infoConsole->Print("No launchers ready to fire"); } --- 2101,2105 ---- } else { ! tcSound::Get()->PlayEffect(SEFFECT_REJECTBEEP); infoConsole->Print("No launchers ready to fire"); } Index: tcCreditView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcCreditView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcCreditView.cpp 29 Jan 2004 00:05:38 -0000 1.8 --- tcCreditView.cpp 29 Feb 2004 22:51:36 -0000 1.9 *************** *** 231,240 **** } ! if (bFlash) { if (nFlashId >= 0) {szFocus = maCredit[nFlashId].mzCaption;} snFocusTime = mcTime.snCount_30Hz; mpBrush->SetColor(Color(255,255,255,255)); pGraphics->FillRectangle(mpBrush,0,0,mnWidth,mnHeight); ! mpSound->PlayEffect(SEFFECT_EXPLOSION2); } if (nFlashId >= 0) { --- 231,241 ---- } ! if (bFlash) ! { if (nFlashId >= 0) {szFocus = maCredit[nFlashId].mzCaption;} snFocusTime = mcTime.snCount_30Hz; mpBrush->SetColor(Color(255,255,255,255)); pGraphics->FillRectangle(mpBrush,0,0,mnWidth,mnHeight); ! tcSound::Get()->PlayEffect(SEFFECT_EXPLOSION2); } if (nFlashId >= 0) { *************** *** 330,334 **** mpFontSmall = NULL; mpBrush = NULL; - mpSound = NULL; mnCredits = 0; mbDrawRewind = false; --- 331,334 ---- Index: tcDirector.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirector.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcDirector.cpp 1 Jan 2004 23:44:47 -0000 1.5 --- tcDirector.cpp 29 Feb 2004 22:51:36 -0000 1.6 *************** *** 107,115 **** } ! tcDirector::tcDirector(tc3DViewer *view3D, tcMapView *mv, tcSound *soundInterface, tcConsole *console , wxWindow *win) : mapView(mv), viewer(view3D) { - tcSoundEvent::AttachSound(soundInterface); tcConsoleTextEvent::AttachConsole(console); tcDirectorEvent::AttachEventHandler(win); --- 107,114 ---- } ! tcDirector::tcDirector(tc3DViewer *view3D, tcMapView *mv, tcConsole *console , wxWindow *win) : mapView(mv), viewer(view3D) { tcConsoleTextEvent::AttachConsole(console); tcDirectorEvent::AttachEventHandler(win); Index: tcDirectorEvent.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirectorEvent.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcDirectorEvent.cpp 3 Jan 2004 00:45:13 -0000 1.5 --- tcDirectorEvent.cpp 29 Feb 2004 22:51:36 -0000 1.6 *************** *** 139,143 **** /********************** tcSoundEvent ***************************/ - tcSound* tcSoundEvent::soundInterface = NULL; void tcSoundEvent::Update(double t) --- 139,142 ---- *************** *** 159,163 **** void tcSoundEffectEvent::Update(double t) { - wxASSERT(soundInterface); if (t < eventStart) { --- 158,161 ---- *************** *** 166,170 **** } if (triggered) return; ! soundInterface->PlayEffect(effectCode); triggered = true; } --- 164,168 ---- } if (triggered) return; ! tcSound::Get()->PlayEffect(effectCode); triggered = true; } *************** *** 189,210 **** if (command == "play") { ! soundInterface->PlayMusic(song); ! soundInterface->SeekMusic(param); } else if (command == "pause") { ! soundInterface->SetMusicPause(true); } else if (command == "unpause") { ! soundInterface->SetMusicPause(false); } else if (command == "seek") { ! soundInterface->SeekMusic(param); } else if (command == "volume") { ! soundInterface->SetMusicVolume(param); } triggered = true; --- 187,208 ---- if (command == "play") { ! tcSound::Get()->PlayMusic(song); ! tcSound::Get()->SeekMusic(param); } else if (command == "pause") { ! tcSound::Get()->SetMusicPause(true); } else if (command == "unpause") { ! tcSound::Get()->SetMusicPause(false); } else if (command == "seek") { ! tcSound::Get()->SeekMusic(param); } else if (command == "volume") { ! tcSound::Get()->SetMusicVolume(param); } triggered = true; Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapView.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcMapView.cpp 1 Feb 2004 22:19:09 -0000 1.18 --- tcMapView.cpp 29 Feb 2004 22:51:36 -0000 1.19 *************** *** 266,270 **** mpMapData = NULL; mpOptions = NULL; - mpSound = NULL; mnXCenter = 0; --- 266,269 ---- *************** *** 1497,1501 **** { SetViewCenterZoom(point,1.5f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} return; } --- 1496,1500 ---- { SetViewCenterZoom(point,1.5f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); return; } *************** *** 1503,1507 **** { SetViewCenterZoom(point,1.0f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} return; } --- 1502,1506 ---- { SetViewCenterZoom(point,1.0f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); return; } *************** *** 1530,1534 **** { SetViewCenterZoom(point,0.7f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} return; // old returned true } --- 1529,1533 ---- { SetViewCenterZoom(point,0.7f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); return; // old returned true } *************** *** 1584,1593 **** { SetViewCenterZoom(point,2.0f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} } else if (zDelta < 0) { SetViewCenterZoom(point,0.5f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} } } --- 1583,1592 ---- { SetViewCenterZoom(point,2.0f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } else if (zDelta < 0) { SetViewCenterZoom(point,0.5f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } } *************** *** 1805,1809 **** { SetViewCenterZoom(point,2.0f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} } } --- 1804,1808 ---- { SetViewCenterZoom(point,2.0f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } } *************** *** 1811,1815 **** { SetViewCenterZoom(point,1.0f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} } else --- 1810,1814 ---- { SetViewCenterZoom(point,1.0f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } else *************** *** 1824,1828 **** { SetViewCenterZoom(point,0.5f); ! if (mpSound != NULL) {mpSound->PlayEffect(SEFFECT_BEEP2);} } } --- 1823,1827 ---- { SetViewCenterZoom(point,0.5f); ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } } Index: tcNetworkView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcNetworkView.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcNetworkView.cpp 27 Feb 2004 00:07:59 -0000 1.3 --- tcNetworkView.cpp 29 Feb 2004 22:51:36 -0000 1.4 *************** *** 32,36 **** #include "tcEditBox.h" #include "tcXMLFile.h" ! #include "network/tcNetworkInterface.h" #include "wxcommands.h" --- 32,36 ---- #include "tcEditBox.h" #include "tcXMLFile.h" ! #include "network/tcMultiplayerInterface.h" #include "wxcommands.h" *************** *** 40,43 **** --- 40,44 ---- EVT_COMMAND(ID_MULTIPLAYERMODE, wxEVT_COMMAND_BUTTON_CLICKED , tcNetworkView::SetNetworkMode) EVT_COMMAND(ID_CONNECT, wxEVT_COMMAND_BUTTON_CLICKED , tcNetworkView::OnConnect) + EVT_COMMAND(ID_CHATTEXT, wxEVT_COMMAND_BUTTON_CLICKED , tcNetworkView::SendChatText) EVT_COMMAND(1, wxEVT_COMMAND_TEXT_UPDATED, tcNetworkView::SetIPText) END_EVENT_TABLE() *************** *** 47,50 **** --- 48,53 ---- #endif + using network::tcMultiplayerInterface; + int tcNetworkView::Draw() { *************** *** 79,88 **** DrawTextCenteredHV(graphics, font12, mpBrush, "Connection Status", x, y); ! unsigned nConnections = networkInterface->GetNumConnections(); x = (float)statusBoxBounds.x + 10.0f; for (unsigned n=0;n<nConnections;n++) { y += 10.0f; ! std::string connectionStatus = networkInterface->GetConnectionStatus(n); DrawText(graphics, font8, mpBrush, connectionStatus.c_str(), x, y); --- 82,91 ---- DrawTextCenteredHV(graphics, font12, mpBrush, "Connection Status", x, y); ! unsigned nConnections = tcMultiplayerInterface::Get().GetNumConnections(); x = (float)statusBoxBounds.x + 10.0f; for (unsigned n=0;n<nConnections;n++) { y += 10.0f; ! std::string connectionStatus = tcMultiplayerInterface::Get().GetConnectionStatus(n); DrawText(graphics, font8, mpBrush, connectionStatus.c_str(), x, y); *************** *** 97,101 **** if (networkMode != 1) return; ! networkInterface->OpenConnection(ipText.c_str()); } --- 100,104 ---- if (networkMode != 1) return; ! tcMultiplayerInterface::Get().OpenConnection(ipText.c_str()); } *************** *** 104,107 **** --- 107,127 ---- } + /** + * Send chat text to all connections + */ + void tcNetworkView::SendChatText(wxCommandEvent& event) + { + std::string chatText = "This is some test chat text."; + + unsigned nConnections = tcMultiplayerInterface::Get().GetNumConnections(); + + for (unsigned n=0;n<nConnections;n++) + { + int connId = tcMultiplayerInterface::Get().GetConnectionId(n); + tcMultiplayerInterface::Get().SendTestMessage(connId, chatText); + } + + } + void tcNetworkView::SetIPText(wxCommandEvent& event) { *************** *** 118,130 **** if (mode <= 1) { ! networkInterface->MakeClient(); } else if (mode == 2) { ! networkInterface->MakeServer(); } ! //networkInterface->OpenConnection("192.168.0.101"); networkMode = mode; --- 138,150 ---- if (mode <= 1) { ! tcMultiplayerInterface::Get().MakeClient(); } else if (mode == 2) { ! tcMultiplayerInterface::Get().MakeServer(); } ! //tcMultiplayerInterface::Get().OpenConnection("192.168.0.101"); networkMode = mode; *************** *** 137,141 **** const wxPoint& pos, const wxSize& size, const wxString& name) : tcStandardWindow(parent, pos, size, "xml/network_view.xml", name), - networkInterface(NULL), networkMode(0) { --- 157,160 ---- Index: tcOOBView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcOOBView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcOOBView.cpp 18 Jan 2004 18:42:41 -0000 1.5 --- tcOOBView.cpp 29 Feb 2004 22:51:36 -0000 1.6 *************** *** 278,285 **** } mnSelectedKey = new_key; ! if (mpSound != NULL) ! { ! mpSound->PlayEffect(SEFFECT_SHORTBEEP); ! } mbMouseDrag = true; msFormationChangeInfo.mnFollowerKey = pInfo->mnID; --- 278,284 ---- } mnSelectedKey = new_key; ! ! tcSound::Get()->PlayEffect(SEFFECT_SHORTBEEP); ! mbMouseDrag = true; msFormationChangeInfo.mnFollowerKey = pInfo->mnID; *************** *** 302,308 **** msFormationChangeInfo.mnNewLeaderKey = pInfo->mnID; msFormationChangeInfo.mbApply = true; ! if (mpSound != NULL) { ! mpSound->PlayEffect(SEFFECT_BEEP2); ! } } } --- 301,306 ---- msFormationChangeInfo.mnNewLeaderKey = pInfo->mnID; msFormationChangeInfo.mbApply = true; ! ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } } *************** *** 329,333 **** mpSimState = NULL; mpMapView = NULL; - mpSound = NULL; mnCount = 0; mnAlliance = 0; --- 327,330 ---- Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcObjectControl.cpp 13 Feb 2004 01:31:33 -0000 1.13 --- tcObjectControl.cpp 29 Feb 2004 22:51:36 -0000 1.14 *************** *** 1156,1162 **** } bool bAccepted = ProcessWeaponPanelButton(nLauncher,nCol); ! if ((mpSound != NULL)&&(bAccepted)) { ! mpSound->PlayEffect(SEFFECT_LOWBEEP); } } --- 1156,1162 ---- } bool bAccepted = ProcessWeaponPanelButton(nLauncher,nCol); ! if (bAccepted) { ! tcSound::Get()->PlayEffect(SEFFECT_LOWBEEP); } } *************** *** 1169,1175 **** } bool bAccepted = ProcessSensorPanelButton(nSensor,nCol); ! if ((mpSound != NULL)&&(bAccepted)) { ! mpSound->PlayEffect(SEFFECT_PING3); } } --- 1169,1175 ---- } bool bAccepted = ProcessSensorPanelButton(nSensor,nCol); ! if (bAccepted) { ! tcSound::Get()->PlayEffect(SEFFECT_PING3); } } *************** *** 1262,1266 **** else { ! //mpSound->PlayEffect(SEFFECT_REJECTBEEP); } return true; --- 1262,1266 ---- else { ! //tcSound::Get()->PlayEffect(SEFFECT_REJECTBEEP); } return true; *************** *** 1542,1546 **** mnLaunchers = 0; mpHookedGameObj = NULL; - mpSound = NULL; mpCommandInterface = NULL; mpUserInfo = NULL; --- 1542,1545 ---- Index: tcRadar.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcRadar.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcRadar.cpp 13 Feb 2004 01:31:33 -0000 1.4 --- tcRadar.cpp 29 Feb 2004 22:51:36 -0000 1.5 *************** *** 384,388 **** if (simState->mpUserInfo->IsOwnAlliance(parent->mnAlliance)) { ! simState->mpSound->PlayEffect(SEFFECT_PING); } char zBuff[128]; --- 384,388 ---- if (simState->mpUserInfo->IsOwnAlliance(parent->mnAlliance)) { ! tcSound::Get()->PlayEffect(SEFFECT_PING); } char zBuff[128]; *************** *** 436,440 **** if (simState->mpUserInfo->IsOwnAlliance(parent->mnAlliance)) { ! simState->mpSound->PlayEffect(SEFFECT_TWOBEEPS); } } --- 436,440 ---- if (simState->mpUserInfo->IsOwnAlliance(parent->mnAlliance)) { ! tcSound::Get()->PlayEffect(SEFFECT_TWOBEEPS); } } Index: tcScenarioSelectView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcScenarioSelectView.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcScenarioSelectView.cpp 1 Jan 2004 23:44:47 -0000 1.12 --- tcScenarioSelectView.cpp 29 Feb 2004 22:51:36 -0000 1.13 *************** *** 246,274 **** if (mrectReturnButton.Contains((REAL)point.x,(REAL)point.y)) { if (mnReturnButtonState == 0) { ! mpSound->PlayEffect(SEFFECT_THUCK); mnReturnButtonState = 1; } } ! else { if (mnReturnButtonState != 2) {mnReturnButtonState = 0;} } ! if (bButtonOver) { ! if (nButton >= mnButtons) { WTL("tcScenarioSelectView::OnMouseMove error"); return; } ! if (mpSound != NULL) { ! //mpSound->PlayEffect(SEFFECT_BEEP2); ! } } ! for(unsigned i=0;i<mnButtons;i++) { ! if ((i == nButton)&&(bButtonOver)) { ! if ((maButton[i].mnState == 0)) { ! mpSound->PlayEffect(SEFFECT_THUCK); maButton[i].mnState = 1; } } ! else { if (maButton[i].mnState == 1) {maButton[i].mnState = 0;} } --- 246,280 ---- if (mrectReturnButton.Contains((REAL)point.x,(REAL)point.y)) { if (mnReturnButtonState == 0) { ! tcSound::Get()->PlayEffect(SEFFECT_THUCK); mnReturnButtonState = 1; } } ! else ! { if (mnReturnButtonState != 2) {mnReturnButtonState = 0;} } ! if (bButtonOver) ! { ! if (nButton >= mnButtons) ! { WTL("tcScenarioSelectView::OnMouseMove error"); return; } ! ! //tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } ! for(unsigned i=0;i<mnButtons;i++) ! { ! if ((i == nButton)&&(bButtonOver)) ! { ! if ((maButton[i].mnState == 0)) ! { ! tcSound::Get()->PlayEffect(SEFFECT_THUCK); maButton[i].mnState = 1; } } ! else ! { if (maButton[i].mnState == 1) {maButton[i].mnState = 0;} } *************** *** 329,336 **** if (maButton[i].mnState != 2) { ! if ((mpSound != NULL)) ! { ! mpSound->PlayEffect(SEFFECT_BEEP2); ! } if (maButton[i].mbLoadRandom) { --- 335,339 ---- if (maButton[i].mnState != 2) { ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); if (maButton[i].mbLoadRandom) { *************** *** 495,499 **** mpFont = NULL; mpBrush = NULL; - mpSound = NULL; mpSimState = NULL; mnXStart = 100; --- 498,501 ---- Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** tcSimState.cpp 15 Feb 2004 19:47:23 -0000 1.34 --- tcSimState.cpp 29 Feb 2004 22:51:36 -0000 1.35 *************** *** 200,205 **** if (pLauncherState->GetLauncherStatus(anLauncher) == tcLauncherState::LAUNCHER_READY) { ! if (mpUserInfo->IsOwnAlliance(pPlatformObj->mnAlliance)) { ! mpSound->PlayEffect(SEFFECT_NOISYBEEP); } return true; --- 200,206 ---- if (pLauncherState->GetLauncherStatus(anLauncher) == tcLauncherState::LAUNCHER_READY) { ! if (mpUserInfo->IsOwnAlliance(pPlatformObj->mnAlliance)) ! { ! tcSound::Get()->PlayEffect(SEFFECT_NOISYBEEP); } return true; *************** *** 233,237 **** pPlatformObj->DesignateLauncherTarget(anTargetKey, anLauncher); if (mpUserInfo->IsOwnAlliance(pPlatformObj->mnAlliance)) { ! mpSound->PlayEffect(SEFFECT_NOISYBEEP); } return true; --- 234,238 ---- pPlatformObj->DesignateLauncherTarget(anTargetKey, anLauncher); if (mpUserInfo->IsOwnAlliance(pPlatformObj->mnAlliance)) { ! tcSound::Get()->PlayEffect(SEFFECT_NOISYBEEP); } return true; *************** *** 239,243 **** else { //pPlatformObj->DesignateLauncherTarget(anTargetKey, anLauncher); ! //mpSound->PlayEffect(SEFFECT_LOWBEEP); return false; } --- 240,244 ---- else { //pPlatformObj->DesignateLauncherTarget(anTargetKey, anLauncher); ! //tcSound::Get()->PlayEffect(SEFFECT_LOWBEEP); return false; } *************** *** 346,354 **** if (mpUserInfo->IsOwnAlliance(ptarget->mnAlliance)) { ! mpSound->PlayEffect(SEFFECT_IMPLOSION); } else { ! mpSound->PlayEffect(SEFFECT_EXPLOSION2); } } --- 347,355 ---- if (mpUserInfo->IsOwnAlliance(ptarget->mnAlliance)) { ! tcSound::Get()->PlayEffect(SEFFECT_IMPLOSION); } else { ! tcSound::Get()->PlayEffect(SEFFECT_EXPLOSION2); } } *************** *** 745,749 **** if (mpUserInfo->IsOwnAlliance(apRadarPlat->mnAlliance)) { ! mpSound->PlayEffect(SEFFECT_PING); } char zBuff[128]; --- 746,750 ---- if (mpUserInfo->IsOwnAlliance(apRadarPlat->mnAlliance)) { ! tcSound::Get()->PlayEffect(SEFFECT_PING); } char zBuff[128]; *************** *** 850,856 **** ! if (bNewDetection) { pSMTrack->UpdateTrack(); ! if (mpUserInfo->IsOwnAlliance(apESMPlat->mnAlliance)) {mpSound->PlayEffect(SEFFECT_PING);} char zBuff[128]; sprintf(zBuff,"target %d detected with ESM at %3.1f deg at time %.1f [a:%d]", --- 851,861 ---- ! if (bNewDetection) ! { pSMTrack->UpdateTrack(); ! if (mpUserInfo->IsOwnAlliance(apESMPlat->mnAlliance)) ! { ! tcSound::Get()->PlayEffect(SEFFECT_PING); ! } char zBuff[128]; sprintf(zBuff,"target %d detected with ESM at %3.1f deg at time %.1f [a:%d]", *************** *** 1044,1048 **** { gameObj->toLaunch.clear(); ! mpSound->PlayEffect(SEFFECT_JETLAUNCH); } } --- 1049,1053 ---- { gameObj->toLaunch.clear(); ! tcSound::Get()->PlayEffect(SEFFECT_JETLAUNCH); } } *************** *** 1094,1099 **** if (apRadarSS->mnMode == SSMODE_SEEKERACQUIRE) { apRadarSS->mnMode=SSMODE_SEEKERTRACK; ! if(mpUserInfo->IsOwnAlliance(applat->mnAlliance)) { ! mpSound->PlayEffect(SEFFECT_TWOBEEPS); } } --- 1099,1105 ---- if (apRadarSS->mnMode == SSMODE_SEEKERACQUIRE) { apRadarSS->mnMode=SSMODE_SEEKERTRACK; ! if(mpUserInfo->IsOwnAlliance(applat->mnAlliance)) ! { ! tcSound::Get()->PlayEffect(SEFFECT_TWOBEEPS); } } *************** *** 1230,1234 **** if (mpUserInfo->IsOwnAlliance(plaunchingplatform->mnAlliance)) { ! mpSound->PlayEffect(SEFFECT_MISSILELAUNCH); } --- 1236,1240 ---- if (mpUserInfo->IsOwnAlliance(plaunchingplatform->mnAlliance)) { ! tcSound::Get()->PlayEffect(SEFFECT_MISSILELAUNCH); } *************** *** 1784,1788 **** mpMapData = NULL; mpPythonInterface = NULL; - mpSound = NULL; mpUserInfo = NULL; mfSimTime = 0; --- 1790,1793 ---- Index: tcStartView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcStartView.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcStartView.cpp 20 Feb 2004 03:31:50 -0000 1.9 --- tcStartView.cpp 29 Feb 2004 22:51:36 -0000 1.10 *************** *** 210,218 **** return; } ! if (mpSound != NULL) ! { ! //mpSound->PlayEffect(SEFFECT_BEEP2); ! } ! } --- 210,214 ---- return; } ! //tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } *************** *** 224,228 **** if ((maButton[i].mnState == 0)&&(bButtonEnabled)) { ! mpSound->PlayEffect(SEFFECT_THUCK); } if (bButtonEnabled) {maButton[i].mnState = 1;} --- 220,224 ---- if ((maButton[i].mnState == 0)&&(bButtonEnabled)) { ! tcSound::Get()->PlayEffect(SEFFECT_THUCK); } if (bButtonEnabled) {maButton[i].mnState = 1;} *************** *** 258,264 **** } ! if ((mpSound != NULL)&&(nButton != 2)) { ! mpSound->PlayEffect(SEFFECT_BEEP2); } int command_id; --- 254,260 ---- } ! if (nButton != 2) { ! tcSound::Get()->PlayEffect(SEFFECT_BEEP2); } int command_id; *************** *** 399,403 **** mpFont = NULL; mpBrush = NULL; - mpSound = NULL; for (int i=0; i < N_START_BUTTONS; i++) --- 395,398 ---- |