[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.72,1.73 tcNetworkView.cpp,1.8,1.9
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-04-05 02:37:03
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4666/src/sim Modified Files: Game.cpp tcNetworkView.cpp Log Message: Index: tcNetworkView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcNetworkView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcNetworkView.cpp 24 Mar 2004 21:09:27 -0000 1.8 --- tcNetworkView.cpp 5 Apr 2004 02:24:29 -0000 1.9 *************** *** 68,74 **** DrawStatusBox(pGraphics); ! if (tcMultiplayerInterface::Get().IsChatTextAvail()) { ! chatBox->Print(tcMultiplayerInterface::Get().GetChatText().c_str()); } --- 68,74 ---- DrawStatusBox(pGraphics); ! if (tcMultiplayerInterface::Get()->IsChatTextAvail()) { ! chatBox->Print(tcMultiplayerInterface::Get()->GetChatText().c_str()); } *************** *** 91,100 **** 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); } --- 91,100 ---- 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); } *************** *** 109,113 **** if (networkMode != 1) return; ! tcMultiplayerInterface::Get().OpenConnection(ipText.c_str()); } --- 109,113 ---- if (networkMode != 1) return; ! tcMultiplayerInterface::Get()->OpenConnection(ipText.c_str()); } *************** *** 123,136 **** std::string chatText = event.GetString().c_str(); ! unsigned nConnections = tcMultiplayerInterface::Get().GetNumConnections(); for (unsigned n=0;n<nConnections;n++) { ! int connId = tcMultiplayerInterface::Get().GetConnectionId(n); ! tcMultiplayerInterface::Get().SendChatText(connId, chatText); } // if server, print chat text locally since no echo comes back ! if (tcMultiplayerInterface::Get().IsServer()) { chatBox->Print(chatText.c_str()); --- 123,136 ---- std::string chatText = event.GetString().c_str(); ! unsigned nConnections = tcMultiplayerInterface::Get()->GetNumConnections(); for (unsigned n=0;n<nConnections;n++) { ! int connId = tcMultiplayerInterface::Get()->GetConnectionId(n); ! tcMultiplayerInterface::Get()->SendChatText(connId, chatText); } // if server, print chat text locally since no echo comes back ! if (tcMultiplayerInterface::Get()->IsServer()) { chatBox->Print(chatText.c_str()); *************** *** 144,148 **** ! tcMultiplayerInterface::Get().SetChatProtocol(protocol == 0); } --- 144,148 ---- ! tcMultiplayerInterface::Get()->SetChatProtocol(protocol == 0); } *************** *** 161,170 **** if (mode <= 1) { ! tcMultiplayerInterface::Get().MakeClient(); } else if (mode == 2) { ! tcMultiplayerInterface::Get().MakeServer(); } --- 161,170 ---- if (mode <= 1) { ! tcMultiplayerInterface::Get()->MakeClient(); } else if (mode == 2) { ! tcMultiplayerInterface::Get()->MakeServer(); } *************** *** 178,191 **** std::string testText = "Test text for UDP"; ! unsigned nConnections = tcMultiplayerInterface::Get().GetNumConnections(); for (unsigned n=0;n<nConnections;n++) { ! int connId = tcMultiplayerInterface::Get().GetConnectionId(n); ! tcMultiplayerInterface::Get().SendTestUDP(connId, testText); } // if server, print chat text locally since no echo comes back ! if (tcMultiplayerInterface::Get().IsServer()) { std::string localText = std::string("Sent UDP test: ") + --- 178,191 ---- std::string testText = "Test text for UDP"; ! unsigned nConnections = tcMultiplayerInterface::Get()->GetNumConnections(); for (unsigned n=0;n<nConnections;n++) { ! int connId = tcMultiplayerInterface::Get()->GetConnectionId(n); ! tcMultiplayerInterface::Get()->SendTestUDP(connId, testText); } // if server, print chat text locally since no echo comes back ! if (tcMultiplayerInterface::Get()->IsServer()) { std::string localText = std::string("Sent UDP test: ") + Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** Game.cpp 3 Apr 2004 20:24:33 -0000 1.72 --- Game.cpp 5 Apr 2004 02:24:29 -0000 1.73 *************** *** 1007,1012 **** tcTime::Update(); ! tcMultiplayerInterface::Get().Update(); ! tcMultiplayerInterface::Get().Update(); startView->mbPlayEnabled = mcSimState.msScenarioInfo.mbLoaded; --- 1007,1012 ---- tcTime::Update(); ! tcMultiplayerInterface::Get()->Update(); ! tcMultiplayerInterface::Get()->Update(); startView->mbPlayEnabled = mcSimState.msScenarioInfo.mbLoaded; |