From a93e97c4383f6ee403f8ecc3d2f5fedc8ebacba6 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 12 Jan 2000 17:53:10 +0000 Subject: [PATCH] Moved to NetworkOLK and updated. --- src/NetworkOLK/FILES | 9 + src/NetworkOLK/Makefile.am | 6 + src/NetworkOLK/README | 34 ++ src/NetworkOLK/fgd.h | 8 + src/NetworkOLK/net_hud.cxx | 97 ++++++ src/NetworkOLK/net_send.cxx | 653 ++++++++++++++++++++++++++++++++++++ src/NetworkOLK/network.cxx | 96 ++++++ src/NetworkOLK/network.h | 61 ++++ 8 files changed, 964 insertions(+) create mode 100644 src/NetworkOLK/FILES create mode 100644 src/NetworkOLK/Makefile.am create mode 100644 src/NetworkOLK/README create mode 100644 src/NetworkOLK/fgd.h create mode 100644 src/NetworkOLK/net_hud.cxx create mode 100644 src/NetworkOLK/net_send.cxx create mode 100644 src/NetworkOLK/network.cxx create mode 100644 src/NetworkOLK/network.h diff --git a/src/NetworkOLK/FILES b/src/NetworkOLK/FILES new file mode 100644 index 000000000..224377267 --- /dev/null +++ b/src/NetworkOLK/FILES @@ -0,0 +1,9 @@ +FILES - This file, describing the other files +README - containing Network info +Makefile.am - +net_hud.cxx - display found player's info in bottom/left part of HUD +network.cxx - initialization of netcode and vars +network.h - declaration of used vars and functions for libnetwork.a + should be included from other files using libnetwork +net_send.cxx - communication with deamon +Tools - directory containing network tools and toys diff --git a/src/NetworkOLK/Makefile.am b/src/NetworkOLK/Makefile.am new file mode 100644 index 000000000..f9880e8de --- /dev/null +++ b/src/NetworkOLK/Makefile.am @@ -0,0 +1,6 @@ +noinst_LIBRARIES = libNetworkOLK.a + +libNetworkOLK_a_SOURCES = \ + net_send.cxx net_hud.cxx network.cxx network.h fgd.h + +INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator diff --git a/src/NetworkOLK/README b/src/NetworkOLK/README new file mode 100644 index 000000000..a8db2a9a9 --- /dev/null +++ b/src/NetworkOLK/README @@ -0,0 +1,34 @@ +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: + +- Hyper Blast : Toggles between LaRCsim and a tuned Flight-Model + you can change between both "on the fly " +- 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 FG_NETWORK_OLK" in "network.h" + disables ALL network related stuff in case of problems, shouldn't occur ;-) +b) Runtime - setting the "int net_hud_display" variable to 0 disables any + network display (default) + +Have Phun +Oliver diff --git a/src/NetworkOLK/fgd.h b/src/NetworkOLK/fgd.h new file mode 100644 index 000000000..c25d2b521 --- /dev/null +++ b/src/NetworkOLK/fgd.h @@ -0,0 +1,8 @@ +#include +#include +#include +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/src/NetworkOLK/net_hud.cxx b/src/NetworkOLK/net_hud.cxx new file mode 100644 index 000000000..413919e90 --- /dev/null +++ b/src/NetworkOLK/net_hud.cxx @@ -0,0 +1,97 @@ +// 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