gServerBrowser Class Reference

#include <gServerBrowser.h>

List of all members.

Static Public Member Functions

static void BrowseFavorites ()
static void BrowseMaster ()
static void BrowseSpecialMaster (nServerInfoBase *master, char const *prefix)
static void BrowseLAN ()
static void BrowseServers ()
static void ConfigurationMenu ()
static nServerInfoBaseCurrentMaster ()

Static Public Attributes

static int lowPort = 4534
static int highPort = 4540


Detailed Description

Definition at line 34 of file gServerBrowser.h.


Member Function Documentation

static void gServerBrowser::BrowseFavorites (  )  [static]

void gServerBrowser::BrowseMaster (  )  [static]

Definition at line 182 of file gServerBrowser.cpp.

References BrowseSpecialMaster().

Referenced by net_game().

00183 {
00184     BrowseSpecialMaster(0,"");
00185 }

Here is the call graph for this function:

Here is the caller graph for this function:

void gServerBrowser::BrowseSpecialMaster ( nServerInfoBase master,
char const *  prefix 
) [static]

Definition at line 195 of file gServerBrowser.cpp.

References rConsole::autoDisplayAtNewline, BrowseServers(), rSysDep::ClearGL(), CreateGServer(), nServerInfo::DeleteAll(), rConsole::fullscreen, nServerInfo::GetFromMaster(), nServerInfo::Save(), nServerInfo::SetCreator(), sg_RequestLANcontinuously, sg_TalkToMaster, sr_con, sr_textOut, rSysDep::SwapGL(), and to.

Referenced by BrowseMaster(), and sg_AlternativeMaster().

00196 {
00197     sg_currentMaster = master;
00198 
00199     sg_RequestLANcontinuously = false;
00200 
00201     sn_ServerInfoCreator *cback = nServerInfo::SetCreator(&CreateGServer);
00202 
00203     sr_con.autoDisplayAtNewline=true;
00204     sr_con.fullscreen=true;
00205 
00206 #ifndef DEDICATED
00207     rSysDep::SwapGL();
00208     rSysDep::ClearGL();
00209     rSysDep::SwapGL();
00210     rSysDep::ClearGL();
00211 #endif
00212 
00213     bool to=sr_textOut;
00214     sr_textOut=true;
00215 
00216     nServerInfo::DeleteAll();
00217     nServerInfo::GetFromMaster( master, prefix );
00218     nServerInfo::Save();
00219 
00220     //  gLogo::SetBig(true);
00221     //  gLogo::SetSpinning(false);
00222 
00223     sr_textOut = to;
00224 
00225     tOutput StartHelpTextInternet("$network_master_host_inet_help");
00226     sg_StartHelpText = &StartHelpTextInternet;
00227     sg_TalkToMaster = true;
00228 
00229     BrowseServers();
00230 
00231     nServerInfo::Save();
00232 
00233     sg_TalkToMaster = false;
00234 
00235     nServerInfo::SetCreator(cback);
00236 
00237     sg_currentMaster = master;
00238 }

Here is the call graph for this function:

Here is the caller graph for this function:

void gServerBrowser::BrowseLAN (  )  [static]

Definition at line 240 of file gServerBrowser.cpp.

References rConsole::autoDisplayAtNewline, BrowseServers(), rSysDep::ClearGL(), CreateGServer(), nServerInfo::DeleteAll(), rConsole::fullscreen, nServerInfo::GetFromLAN(), highPort, lowPort, nServerInfo::SetCreator(), sg_RequestLANcontinuously, sg_TalkToMaster, sr_con, sr_textOut, rSysDep::SwapGL(), and to.

Referenced by net_game().

00241 {
00242     // TODO: reacivate and see what happens. Done.
00243     sg_RequestLANcontinuously = true;
00244     //  sg_RequestLANcontinuously = false;
00245 
00246     sn_ServerInfoCreator *cback = nServerInfo::SetCreator(&CreateGServer);
00247 
00248     sr_con.autoDisplayAtNewline=true;
00249     sr_con.fullscreen=true;
00250 
00251 #ifndef DEDICATED
00252     rSysDep::SwapGL();
00253     rSysDep::ClearGL();
00254     rSysDep::SwapGL();
00255     rSysDep::ClearGL();
00256 #endif
00257 
00258     bool to=sr_textOut;
00259     sr_textOut=true;
00260 
00261     nServerInfo::DeleteAll();
00262     nServerInfo::GetFromLAN(lowPort, highPort);
00263 
00264     sr_textOut = to;
00265 
00266     tOutput StartHelpTextLAN("$network_master_host_lan_help");
00267     sg_StartHelpText = &StartHelpTextLAN;
00268     sg_TalkToMaster = false;
00269 
00270     BrowseServers();
00271 
00272     nServerInfo::SetCreator(cback);
00273 }

Here is the call graph for this function:

Here is the caller graph for this function:

void gServerBrowser::BrowseServers (  )  [static]

Definition at line 275 of file gServerBrowser.cpp.

References continuePoll, uMenu::Enter(), nServerInfo::GetFromLANContinuouslyStop(), sg_queryType, nServerInfo::StartQueryAll(), and gServerMenu::Update().

Referenced by BrowseLAN(), and BrowseSpecialMaster().

00276 {
00277     //nServerInfo::CalcScoreAll();
00278     //nServerInfo::Sort();
00279     nServerInfo::StartQueryAll( sg_queryType );
00280     continuePoll = true;
00281 
00282     gServerMenu browser("Server Browser");
00283 
00284     gServerStartMenuItem start(&browser);
00285 
00286     /*
00287       while (nServerInfo::DoQueryAll(sg_simultaneous));
00288       sn_SetNetState(nSTANDALONE);
00289       nServerInfo::Sort();
00290 
00291       if (nServerInfo::GetFirstServer())
00292       ConnectToServer(nServerInfo::GetFirstServer());
00293     */
00294     browser.Update();
00295     browser.Enter();
00296 
00297     nServerInfo::GetFromLANContinuouslyStop();
00298 
00299     //  gLogo::SetBig(false);
00300     //  gLogo::SetSpinning(true);
00301     // gLogo::SetDisplayed(true);
00302 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void gServerBrowser::ConfigurationMenu (  )  [static]

nServerInfoBase * gServerBrowser::CurrentMaster (  )  [static]

Definition at line 189 of file gServerBrowser.cpp.

Referenced by sg_HostGame().

00190 {
00191     return sg_currentMaster;
00192 }

Here is the caller graph for this function:


Member Data Documentation

int gServerBrowser::lowPort = 4534 [static]

Definition at line 46 of file gServerBrowser.h.

Referenced by gServerFavorites::AlternativesMenu(), BrowseLAN(), gServerFavorites::FavoritesMenu(), net_options(), and sg_HostGameMenu().

int gServerBrowser::highPort = 4540 [static]

Definition at line 46 of file gServerBrowser.h.

Referenced by BrowseLAN(), gCustomConnectEntries::Generate(), net_options(), and sg_HostGameMenu().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:45:00 2008 for Armagetron Advanced by  doxygen 1.5.4