netpanzer-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netPanzer-CVS] netpanzer/src/NetPanzer Interfaces/DedicatedGam...


From: Matthias Braun
Subject: [netPanzer-CVS] netpanzer/src/NetPanzer Interfaces/DedicatedGam...
Date: Mon, 03 Nov 2003 08:26:37 -0500

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Matthias Braun <address@hidden> 03/11/03 08:26:37

Modified files:
        src/NetPanzer/Interfaces: DedicatedGameManager.cpp 
                                  PlayerGameManager.cpp 
                                  PlayerInterface.cpp 
                                  PlayerInterface.hpp 
        src/NetPanzer/Views/MainMenu/Multi: GetSessionView.cpp 
                                            HostJoinTemplateView.cpp 
Added files:
        src/NetPanzer/Views/MainMenu/Multi: GameServer.hpp 
                                            GameServerList.hpp 
                                            IRCChatMessage.hpp 
                                            IRCLobby.cpp IRCLobby.hpp 
                                            IRCLobbyView.cpp 
                                            IRCLobbyView.hpp 

Log message:
        applied 'Hankins' patch for a lobby view with a game server list, Thanks

Patches:
Index: netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp:1.3 
netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp:1.4
--- netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp:1.3     Wed Oct 
22 19:05:40 2003
+++ netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp Mon Nov  3 
08:26:34 2003
@@ -36,6 +36,7 @@
 #include "Physics.hpp"
 #include "Log.hpp"
 #include "Server.hpp"
+#include "IRCLobbyView.hpp"
 
 //-----------------------------------------------------------------
 void DedicatedGameManager::initializeGameConfig()
@@ -148,7 +149,10 @@
 
     GameManager::setNetPanzerGameOptions();
 
+    gameconfig->hostorjoin=_game_session_host;
+
     Particle2D::setCreateParticles(false);
+    IRCLobbyView::startIRC();
 
     ConsoleInterface::postMessage( "Game Launched, Server Ready...");
 
Index: netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp:1.4 
netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp:1.5
--- netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp:1.4        Sat Oct 
25 10:52:16 2003
+++ netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp    Mon Nov  3 
08:26:34 2003
@@ -102,6 +102,7 @@
 
 //winsock hack
 #include "IPAddressView.hpp"
+#include "IRCLobbyView.hpp"
 
 //** Physics/Particle Stuff
 #include "Particle2D.hpp"
@@ -207,6 +208,7 @@
 
     //winsock hack
     Desktop::add(new IPAddressView());
+    Desktop::add(new IRCLobbyView());
 
     Desktop::setVisibilityAllWindows(false);
     Desktop::setVisibility("MainView", true);
Index: netpanzer/src/NetPanzer/Interfaces/PlayerInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/PlayerInterface.cpp:1.8 
netpanzer/src/NetPanzer/Interfaces/PlayerInterface.cpp:1.9
--- netpanzer/src/NetPanzer/Interfaces/PlayerInterface.cpp:1.8  Mon Sep 22 
09:53:52 2003
+++ netpanzer/src/NetPanzer/Interfaces/PlayerInterface.cpp      Mon Nov  3 
08:26:34 2003
@@ -231,6 +231,17 @@
     return( &player_lists[ local_player_index ] );
 }
 
+int PlayerInterface::countPlayers( void )
+{
+    int count=0;
+    for ( int player_index = 0; player_index < max_players; player_index++ ) {
+        if ( player_lists[ player_index ].getStatus() != _player_state_free ) {
+            count++;
+        }
+    }
+    return count;
+}
+
 PlayerState * PlayerInterface::allocateNewPlayer( void )
 {
     unsigned long player_index;
Index: netpanzer/src/NetPanzer/Interfaces/PlayerInterface.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/PlayerInterface.hpp:1.5 
netpanzer/src/NetPanzer/Interfaces/PlayerInterface.hpp:1.6
--- netpanzer/src/NetPanzer/Interfaces/PlayerInterface.hpp:1.5  Tue Sep 16 
16:16:12 2003
+++ netpanzer/src/NetPanzer/Interfaces/PlayerInterface.hpp      Mon Nov  3 
08:26:35 2003
@@ -128,6 +128,7 @@
     static PlayerState * allocateLoopBackPlayer( void );
 
     static PlayerState * allocateNewPlayer( void );
+    static int countPlayers( void );
 
     static void spawnPlayer( unsigned short player_index, const iXY &location 
);
     static void spawnPlayer( const PlayerID &player, const iXY &location );
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.15 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.16
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.15        
Sat Oct 25 10:52:17 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp     Mon Nov 
 3 08:26:35 2003
@@ -24,6 +24,7 @@
 #include "GameManager.hpp"
 #include "MouseInterface.hpp"
 #include "GameViewGlobals.hpp"
+#include "IRCLobbyView.hpp"
 
 //winsock hack
 #include "IPAddressView.hpp"
@@ -140,6 +141,8 @@
 
 
         Desktop::setVisibility("IPAddressView", true);
+        Desktop::setVisibility("IRCLobbyView", true);
+        IRCLobbyView::startIRC();
         //Desktop::setVisibility("JoinView", true);
         //Desktop::setVisibility("GetSessionHostView", true);
         //Desktop::setVisibility("UnitSelectionView", true);
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp
diff -u 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.19 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.20
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.19  
Sat Oct 25 10:52:17 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp       
Mon Nov  3 08:26:36 2003
@@ -30,6 +30,7 @@
 #include "FlagSelectionView.hpp"
 #include "Palette.hpp"
 #include "GameViewGlobals.hpp"
+#include "IRCLobbyView.hpp"
 
 #include "Client.hpp"
 #include "Server.hpp"
@@ -118,6 +119,7 @@
     MenuTemplateView::backgroundSurface.free();
     //MenuTemplateView::titleSurface.free();
 
+    IRCLobbyView::stopIRC();
     //TODO: I don't like static methods
     PlayerGameManager::launchMultiPlayerGame();
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]