]> git.mxchange.org Git - flightgear.git/blob - src/Network/net_hud.cxx
Initial revision.
[flightgear.git] / src / Network / net_hud.cxx
1 // network.cxx -- data structures for managing network.
2 //
3 // Written by Oliver Delise, started May 1999.
4 //
5 // Copyleft (C) 1999  Oliver Delise - delise@rp-plus.de
6 //
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.
11 //
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.
16 //
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.
20 //
21 // $Id$
22
23
24 #ifdef HAVE_CONFIG_H
25 #  include <config.h>
26 #endif
27
28 #ifdef HAVE_WINDOWS_H
29 #  include <windows.h>
30 #endif
31
32 #ifdef __BORLANDC__
33 #  define exception c_exception
34 #endif
35 #include <math.h>
36
37 #include <GL/glut.h>
38 #include <stdlib.h>
39 #include <string.h>
40
41 #ifdef HAVE_VALUES_H
42 #  include <values.h>  // for MAXINT
43 #endif
44
45 #include <Aircraft/aircraft.hxx>
46 #include <Debug/logstream.hxx>
47 #include <GUI/gui.h>
48 #include <Include/fg_constants.h>
49 #include <Main/options.hxx>
50 #include <Math/fg_random.h>
51 #include <Math/mat3.h>
52 #include <Math/polar3d.hxx>
53 #include <Scenery/scenery.hxx>
54 #include <Time/fg_timer.hxx>
55
56 #if defined ( __sun__ ) || defined ( __sgi )
57 extern "C" {
58   extern void *memmove(void *, const void *, size_t);
59 }
60 #endif
61
62 #include <Cockpit/hud.hxx>
63
64 int net_hud_display = 0;
65
66 void net_hud_update(){
67  char fgd_str[80];
68  char *fgd_pilot;
69  float fgd_lon, fgd_lat, fgd_alt;
70  
71   sprintf( fgd_pilot, "%s", current_options.get_net_id().c_str() );
72   fgd_lon = get_longitude();
73   fgd_lat = get_latitude();
74   fgd_alt = get_altitude();
75   sprintf(fgd_str,"Found %s %3.3f %3.3f", fgd_pilot, fgd_lat, fgd_lon);
76 //  printf("Lon: %.3f Lat: %.3f Alt: %.f\n", fgd_lon, fgd_lat, fgd_alt);
77   HUD_TextList.add( fgText( 40, 18, fgd_str) );
78 }