1 // network.cxx -- data structures for initializing & managing network.
3 // Written by Oliver Delise, started May 1999.
5 // Copyleft (C) 1999 Oliver Delise - delise@mail.isis.de
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 # define exception c_exception
43 # include <values.h> // for MAXINT
46 #include <Aircraft/aircraft.hxx>
47 #include <Debug/logstream.hxx>
49 #include <Include/fg_constants.h>
50 #include <Main/options.hxx>
51 #include <Math/fg_random.h>
52 #include <Math/mat3.h>
53 #include <Math/polar3d.hxx>
54 #include <Scenery/scenery.hxx>
55 #include <Time/fg_timer.hxx>
57 #if defined ( __sun__ ) || defined ( __sgi )
59 extern void *memmove(void *, const void *, size_t);
64 #include <Main/options.hxx>
68 int net_blast_toggle, net_hud_display, net_is_registered;
69 char *net_callsign, *FGFS_host;
73 extern void list_init();
74 extern void fgd_init();
75 extern void fgd_send_com( char *FGD_com, char *FGFS_host);
77 char *fg_net_init( ssgRoot *orig_scene ){
79 // We enable display of netinfos only if user wishes it via cmd-line param
80 net_hud_display = (net_hud_display == 0) ? 0 : 1;
81 // Get pilot's name from options, can be modified at runtime via menu
82 net_callsign = (char *) current_options.get_net_id().c_str();
83 // Disable Blast Mode -1 = Disable, 0 = Enable
84 net_blast_toggle = -1;
85 // We start unregistered, we reg. later via menu to fgd
86 net_is_registered = -1;
87 fgd_scene = orig_scene;
88 // Init list of Pilots
90 // Init Sockets et al...
93 // fgd_send_com( "0", FGFS_host);
94 // fgd_send_com( "1", FGFS_host);