From 8520f464031634e7f2ecaf29682aed15827dd13a Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 24 Jun 1999 20:40:22 +0000 Subject: [PATCH] Initial revision. --- src/Network/Makefile.am | 6 ++++ src/Network/README | 32 +++++++++++++++++ src/Network/net_hud.cxx | 78 +++++++++++++++++++++++++++++++++++++++++ src/Network/net_hud.h | 26 ++++++++++++++ src/Network/network.h | 32 +++++++++++++++++ 5 files changed, 174 insertions(+) create mode 100644 src/Network/Makefile.am create mode 100644 src/Network/README create mode 100644 src/Network/net_hud.cxx create mode 100644 src/Network/net_hud.h create mode 100644 src/Network/network.h diff --git a/src/Network/Makefile.am b/src/Network/Makefile.am new file mode 100644 index 000000000..656e12ba7 --- /dev/null +++ b/src/Network/Makefile.am @@ -0,0 +1,6 @@ +noinst_LIBRARIES = libNetwork.a + +libNetwork_a_SOURCES = \ + net_hud.cxx + +INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator diff --git a/src/Network/README b/src/Network/README new file mode 100644 index 000000000..c029e3097 --- /dev/null +++ b/src/Network/README @@ -0,0 +1,32 @@ +Network README +-------------- +Here in .../Simulator/Network will be the new home for multi pilot +related code. +For the moment all you get is a new menu entry "Network" with the +folowing entries: + +- Toggle Display : enable/disable info (Lat/Lon/Alt) about found player + well, by now it will be you. ;-)) +- Display Netinfos : n.i. will display more detailed information +- Enter Callsign : to enter your name +- Scan for Deamons : n.i. will scan the network for FGFS_D's +- Register to FGD : n.i. will allow pilot to connect to found Deamons +- Show Pilots : n.i. ? not yet sure what to show, maybe their planes +- Send Message : n.i. will send a message to a specific Pilot +- Send Message to all : n.i. obvious, isn't it ? +- Unregister from Deamon : n.i. + +In the Tools directory you will find some progs (one first try of deamon) +to play with. There is also a README file, check it out. + +You don't need a net-access to test this new stuff since it is just an idea +of how to incorporate a Multi-Pilot Mode in FGFS. + +There are two security options: +a) Compiletime - commenting the "#define FGD" in "network.h" disables _ALL_ + network related stuff in case of problems, should not happen ;-) +b) Runtime - setting the "int net_hud_display" variable to 0 disables any + network display (default) + +Have Phun +Oliver diff --git a/src/Network/net_hud.cxx b/src/Network/net_hud.cxx new file mode 100644 index 000000000..6846d39cf --- /dev/null +++ b/src/Network/net_hud.cxx @@ -0,0 +1,78 @@ +// network.cxx -- data structures for managing network. +// +// Written by Oliver Delise, started May 1999. +// +// Copyleft (C) 1999 Oliver Delise - delise@rp-plus.de +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 2 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +// $Id$ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_WINDOWS_H +# include +#endif + +#ifdef __BORLANDC__ +# define exception c_exception +#endif +#include + +#include +#include +#include + +#ifdef HAVE_VALUES_H +# include // for MAXINT +#endif + +#include +#include +#include +#include +#include
+#include +#include +#include +#include +#include