1
0
Fork 0

Prepairing for C++ integration.

This commit is contained in:
curt 1998-04-21 17:02:27 +00:00
parent 52727b75c6
commit 664b1fa4a8
23 changed files with 1485 additions and 1268 deletions

View file

@ -27,6 +27,12 @@
#ifndef _AIRCRAFT_H
#define _AIRCRAFT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Flight/flight.h>
#include <Controls/controls.h>
@ -51,14 +57,22 @@ void fgAircraftInit( void );
void fgAircraftOutputCurrent(fgAIRCRAFT *a);
#ifdef __cplusplus
}
#endif
#endif /* _AIRCRAFT_H */
/* $Log$
/* Revision 1.10 1998/02/07 15:29:32 curt
/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.11 1998/04/21 17:02:27 curt
/* Prepairing for C++ integration.
/*
* Revision 1.10 1998/02/07 15:29:32 curt
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.9 1998/01/22 02:59:23 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
@ -71,10 +85,13 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a);
/* $Log$
/* Revision 1.10 1998/02/07 15:29:32 curt
/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.11 1998/04/21 17:02:27 curt
/* Prepairing for C++ integration.
/*
* Revision 1.10 1998/02/07 15:29:32 curt
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.9 1998/01/22 02:59:23 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*

View file

@ -26,6 +26,11 @@
#define _MOON_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Astro/orbits.h>
#include <Time/fg_time.h>
@ -44,15 +49,24 @@ struct CelestialCoord fgCalculateMoon(struct OrbElements Params,
extern struct OrbElements pltOrbElements[9];
#ifdef __cplusplus
}
#endif
#endif /* _MOON_H */
/* $Log$
/* Revision 1.6 1998/02/23 19:07:54 curt
/* Incorporated Durk's Astro/ tweaks. Includes unifying the sun position
/* calculation code between sun display, and other FG sections that use this
/* for things like lighting.
/* Revision 1.7 1998/04/21 17:02:30 curt
/* Prepairing for C++ integration.
/*
* Revision 1.6 1998/02/23 19:07:54 curt
* Incorporated Durk's Astro/ tweaks. Includes unifying the sun position
* calculation code between sun display, and other FG sections that use this
* for things like lighting.
*
* Revision 1.5 1998/02/02 20:53:21 curt
* To version 0.29
*

View file

@ -27,6 +27,11 @@
#define _ORBITS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <math.h>
@ -79,15 +84,23 @@ int fgSolarSystemInit(struct fgTIME t);
void fgSolarSystemUpdate(struct OrbElements *planets, struct fgTIME t);
#ifdef __cplusplus
}
#endif
#endif /* _ORBITS_H */
/* $Log$
/* Revision 1.6 1998/02/23 19:07:55 curt
/* Incorporated Durk's Astro/ tweaks. Includes unifying the sun position
/* calculation code between sun display, and other FG sections that use this
/* for things like lighting.
/* Revision 1.7 1998/04/21 17:02:31 curt
/* Prepairing for C++ integration.
/*
* Revision 1.6 1998/02/23 19:07:55 curt
* Incorporated Durk's Astro/ tweaks. Includes unifying the sun position
* calculation code between sun display, and other FG sections that use this
* for things like lighting.
*
* Revision 1.5 1998/02/12 21:59:35 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>

View file

@ -27,6 +27,11 @@
#define _PLANETS_H
#ifdef __cplusplus
extern "C" {
#endif
struct CelestialCoord fgCalculatePlanet(struct OrbElements planet,
struct OrbElements theSun,
struct fgTIME t, int idx);
@ -36,14 +41,22 @@ void fgPlanetsInit( void );
void fgPlanetsRender( void );
#ifdef __cplusplus
}
#endif
#endif /* PLANETS_H */
/* $Log$
/* Revision 1.4 1998/02/12 21:59:38 curt
/* Incorporated code changes contributed by Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.5 1998/04/21 17:02:31 curt
/* Prepairing for C++ integration.
/*
* Revision 1.4 1998/02/12 21:59:38 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.3 1998/02/02 20:53:23 curt
* To version 0.29
*

View file

@ -28,6 +28,11 @@
#define _SKY_H
#ifdef __cplusplus
extern "C" {
#endif
/* (Re)generate the display list */
void fgSkyInit( void );
@ -38,13 +43,21 @@ void fgSkyColorsInit( void );
void fgSkyRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _SKY_H */
/* $Log$
/* Revision 1.3 1998/01/22 02:59:28 curt
/* Changed #ifdef FILE_H to #ifdef _FILE_H
/* Revision 1.4 1998/04/21 17:02:32 curt
/* Prepairing for C++ integration.
/*
* Revision 1.3 1998/01/22 02:59:28 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
* Revision 1.2 1998/01/19 18:40:17 curt
* Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler.

View file

@ -28,6 +28,11 @@
#define _STARS_H
#ifdef __cplusplus
extern "C" {
#endif
#define FG_MAX_STARS 500
#define FG_STAR_LEVELS 4 /* how many star transitions */
#define FG_MIN_STAR_MAG 0.738750 /* magnitude of weakest star we'll display */
@ -40,14 +45,23 @@ void fgStarsRender( void );
extern struct OrbElements pltOrbElements[9];
extern struct fgTIME cur_time_params;
#ifdef __cplusplus
}
#endif
#endif /* _STARS_H */
/* $Log$
/* Revision 1.4 1998/02/12 21:59:39 curt
/* Incorporated code changes contributed by Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.5 1998/04/21 17:02:33 curt
/* Prepairing for C++ integration.
/*
* Revision 1.4 1998/02/12 21:59:39 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.3 1998/01/22 02:59:28 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*

View file

@ -27,6 +27,11 @@
#define _SUN_H
#ifdef __cplusplus
extern "C" {
#endif
extern fgSUNPOS solarPosition;
@ -40,13 +45,21 @@ void fgSunInit( void );
void fgSunRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _SUN_H */
/* $Log$
/* Revision 1.5 1998/03/09 22:47:26 curt
/* Incorporated Durk's updates.
/* Revision 1.6 1998/04/21 17:02:33 curt
/* Prepairing for C++ integration.
/*
* Revision 1.5 1998/03/09 22:47:26 curt
* Incorporated Durk's updates.
*
* Revision 1.4 1998/02/23 19:07:57 curt
* Incorporated Durk's Astro/ tweaks. Includes unifying the sun position
* calculation code between sun display, and other FG sections that use this

View file

@ -28,6 +28,11 @@
#define _COCKPIT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Cockpit/hud.h>
@ -46,14 +51,22 @@ fgCOCKPIT *fgCockpitInit( fgAIRCRAFT *cur_aircraft );
void fgCockpitUpdate( void );
#ifdef __cplusplus
}
#endif
#endif /* _COCKPIT_H */
/* $Log$
/* Revision 1.6 1998/02/07 15:29:33 curt
/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.7 1998/04/21 17:02:34 curt
/* Prepairing for C++ integration.
/*
* Revision 1.6 1998/02/07 15:29:33 curt
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.5 1998/01/22 02:59:29 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*

View file

@ -28,6 +28,11 @@
#define _CONTROLS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Include/fg_limits.h>
@ -78,13 +83,21 @@ void fgThrottleMove(int engine, double amt);
void fgThrottleSet(int engine, double pos);
#ifdef __cplusplus
}
#endif
#endif /* _CONTROLS_H */
/* $Log$
/* Revision 1.12 1998/02/09 22:56:48 curt
/* Removed "depend" files from cvs control. Other minor make tweaks.
/* Revision 1.13 1998/04/21 17:02:35 curt
/* Prepairing for C++ integration.
/*
* Revision 1.12 1998/02/09 22:56:48 curt
* Removed "depend" files from cvs control. Other minor make tweaks.
*
* Revision 1.11 1998/02/07 15:29:36 curt
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>

View file

@ -28,6 +28,11 @@
#define _GLUTKEY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <config.h>
#ifdef HAVE_WINDOWS_H
@ -42,13 +47,21 @@ void GLUTkey(unsigned char k, int x, int y);
void GLUTspecialkey(int k, int x, int y);
#ifdef __cplusplus
}
#endif
#endif /* _GLUTKEY_H */
/* $Log$
/* Revision 1.8 1998/04/03 22:09:02 curt
/* Converting to Gnu autoconf system.
/* Revision 1.9 1998/04/21 17:02:36 curt
/* Prepairing for C++ integration.
/*
* Revision 1.8 1998/04/03 22:09:02 curt
* Converting to Gnu autoconf system.
*
* Revision 1.7 1998/02/12 21:59:44 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>

File diff suppressed because it is too large Load diff

1162
Main/GLUTmain.cxx Normal file

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@ bin_SCRIPTS = runfg runfg.bat
fg_SOURCES = \
GLUTkey.c GLUTkey.h \
GLUTmain.c \
GLUTmain.cxx \
fg_config.h \
fg_getopt.c fg_getopt.h \
fg_init.c fg_init.h \

View file

@ -79,7 +79,7 @@ bin_SCRIPTS = runfg runfg.bat
fg_SOURCES = \
GLUTkey.c GLUTkey.h \
GLUTmain.c \
GLUTmain.cxx \
fg_config.h \
fg_getopt.c fg_getopt.h \
fg_init.c fg_init.h \
@ -135,6 +135,10 @@ $(top_builddir)/Lib/Debug/libDebug.la $(top_builddir)/Lib/zlib/libz.la
fg_LDFLAGS =
SCRIPTS = $(bin_SCRIPTS)
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
CXXLINK = $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
@ -148,13 +152,14 @@ TAR = tar
GZIP = --best
DEP_FILES = .deps/GLUTkey.P .deps/GLUTmain.P .deps/fg_getopt.P \
.deps/fg_init.P .deps/views.P
CXXMKDEP = $(CXX) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
SOURCES = $(fg_SOURCES)
OBJECTS = $(fg_OBJECTS)
all: Makefile $(PROGRAMS) $(SCRIPTS)
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
.SUFFIXES: .S .c .cxx .lo .o .s
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Simulator/Main/Makefile
@ -226,7 +231,7 @@ maintainer-clean-libtool:
fg: $(fg_OBJECTS) $(fg_DEPENDENCIES)
@rm -f fg
$(LINK) $(fg_LDFLAGS) $(fg_OBJECTS) $(fg_LDADD) $(LIBS)
$(CXXLINK) $(fg_LDFLAGS) $(fg_OBJECTS) $(fg_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
@ -246,6 +251,10 @@ uninstall-binSCRIPTS:
list='$(bin_SCRIPTS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
done
.cxx.o:
$(CXXCOMPILE) -c $<
.cxx.lo:
$(LTCXXCOMPILE) -c $<
tags: TAGS
@ -312,6 +321,17 @@ maintainer-clean-depend:
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
%.o: %.cxx
@echo '$(CXXCOMPILE) -c $<'; \
$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.cxx
@echo '$(LTCXXCOMPILE) -c $<'; \
$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all

View file

@ -30,9 +30,16 @@
*
****************************************************************************/
#ifndef __GETOPT_H
#define __GETOPT_H
#ifdef __cplusplus
extern "C" {
#endif
//#ifndef __DEBUG_H
//#include "debug.h"
//#endif
@ -100,9 +107,6 @@ typedef struct {
#define NUM_OPT(a) sizeof(a) / sizeof(Option)
#ifdef __cplusplus
extern "C" {
#endif
/*--------------------------- Global variables ---------------------------*/
@ -126,7 +130,10 @@ extern void print_desc(int num_opt, Option **optarr); // Not original code
/* $Log$
/* Revision 1.1 1998/02/13 00:23:39 curt
/* Initial revision.
/* Revision 1.2 1998/04/21 17:02:41 curt
/* Prepairing for C++ integration.
/*
* Revision 1.1 1998/02/13 00:23:39 curt
* Initial revision.
*
*/

View file

@ -28,6 +28,11 @@
#define _FG_INIT_H
#ifdef __cplusplus
extern "C" {
#endif
// General house keeping initializations
int fgInitGeneral ( void );
@ -37,14 +42,22 @@ int fgInitGeneral ( void );
int fgInitSubsystems( void );
#ifdef __cplusplus
}
#endif
#endif /* _FG_INIT_H */
/* $Log$
/* Revision 1.3 1998/02/12 21:59:50 curt
/* Incorporated code changes contributed by Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.4 1998/04/21 17:02:41 curt
/* Prepairing for C++ integration.
/*
* Revision 1.3 1998/02/12 21:59:50 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.2 1998/01/22 02:59:38 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*

View file

@ -28,6 +28,11 @@
#define _VIEWS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Include/fg_types.h>
#include <Flight/flight.h>
#include <Math/mat3.h>
@ -88,14 +93,22 @@ void fgViewInit(struct fgVIEW *v);
void fgViewUpdate(fgFLIGHT *f, struct fgVIEW *v, struct fgLIGHT *l);
#ifdef __cplusplus
}
#endif
#endif /* _VIEWS_H */
/* $Log$
/* Revision 1.10 1998/02/07 15:29:45 curt
/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.11 1998/04/21 17:02:42 curt
/* Prepairing for C++ integration.
/*
* Revision 1.10 1998/02/07 15:29:45 curt
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.9 1998/01/29 00:50:29 curt
* Added a view record field for absolute x, y, z position.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* obj.h -- routines to handle WaveFront .obj format files.
* obj.h -- routines to handle WaveFront .obj-ish format files.
*
* Written by Curtis Olson, started October 1997.
*
@ -28,6 +28,11 @@
#define _OBJ_H
#ifdef __cplusplus
extern "C" {
#endif
#include <config.h>
#ifdef HAVE_WINDOWS_H
@ -43,13 +48,21 @@
GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius);
#ifdef __cplusplus
}
#endif
#endif /* _OBJ_H */
/* $Log$
/* Revision 1.7 1998/04/03 22:11:37 curt
/* Converting to Gnu autoconf system.
/* Revision 1.8 1998/04/21 17:02:43 curt
/* Prepairing for C++ integration.
/*
* Revision 1.7 1998/04/03 22:11:37 curt
* Converting to Gnu autoconf system.
*
* Revision 1.6 1998/01/31 00:43:25 curt
* Added MetroWorks patches from Carmen Volpe.
*

View file

@ -28,6 +28,11 @@
#define _SCENERY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Include/fg_types.h>
@ -62,13 +67,21 @@ void fgSceneryUpdate(double lon, double lat, double elev);
void fgSceneryRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _SCENERY_H */
/* $Log$
/* Revision 1.18 1998/03/14 00:30:51 curt
/* Beginning initial terrain texturing experiments.
/* Revision 1.19 1998/04/21 17:02:43 curt
/* Prepairing for C++ integration.
/*
* Revision 1.18 1998/03/14 00:30:51 curt
* Beginning initial terrain texturing experiments.
*
* Revision 1.17 1998/02/20 00:16:24 curt
* Thursday's tweaks.
*

View file

@ -10,10 +10,20 @@
#define _TEXLOAD_H
#ifdef __cplusplus
extern "C" {
#endif
#include <GL/glut.h>
extern GLubyte *read_alpha_texture(char *name, int *width, int *height);
extern GLubyte * read_rgb_texture(char *name, int *width, int *height);
#ifdef __cplusplus
}
#endif
#endif /* _TEXLOAD_H */

View file

@ -28,6 +28,11 @@
#define _TILECACHE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <config.h>
#ifdef HAVE_WINDOWS_H
@ -77,13 +82,21 @@ void fgTileCacheEntryInfo( int index, GLint *display_list,
struct fgCartesianPoint *local_ref );
#ifdef __cplusplus
}
#endif
#endif /* _TILECACHE_H */
/* $Log$
/* Revision 1.9 1998/04/14 02:23:17 curt
/* Code reorganizations. Added a Lib/ directory for more general libraries.
/* Revision 1.10 1998/04/21 17:02:45 curt
/* Prepairing for C++ integration.
/*
* Revision 1.9 1998/04/14 02:23:17 curt
* Code reorganizations. Added a Lib/ directory for more general libraries.
*
* Revision 1.8 1998/04/08 23:30:08 curt
* Adopted Gnu automake/autoconf system.
*

View file

@ -28,6 +28,11 @@
#define _TILEMGR_H
#ifdef __cplusplus
extern "C" {
#endif
/* Initialize the Tile Manager subsystem */
int fgTileMgrInit( void );
@ -41,14 +46,22 @@ int fgTileMgrUpdate( void );
void fgTileMgrRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _TILEMGR_H */
/* $Log$
/* Revision 1.5 1998/02/12 21:59:53 curt
/* Incorporated code changes contributed by Charlie Hotchkiss
/* <chotchkiss@namg.us.anritsu.com>
/* Revision 1.6 1998/04/21 17:02:45 curt
/* Prepairing for C++ integration.
/*
* Revision 1.5 1998/02/12 21:59:53 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
*
* Revision 1.4 1998/01/22 02:59:42 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*

View file

@ -28,6 +28,11 @@
#define _WEATHER_H
#ifdef __cplusplus
extern "C" {
#endif
/* holds the current weather values */
struct fgWEATHER {
float visibility;
@ -39,17 +44,26 @@ extern struct fgWEATHER current_weather;
/* Initialize the weather modeling subsystem */
void fgWeatherInit( void );
/* Update the weather parameters for the current position */
void fgWeatherUpdate( void );
#ifdef __cplusplus
}
#endif
#endif /* _WEATHER_H */
/* $Log$
/* Revision 1.8 1998/01/22 02:59:44 curt
/* Changed #ifdef FILE_H to #ifdef _FILE_H
/* Revision 1.9 1998/04/21 17:02:46 curt
/* Prepairing for C++ integration.
/*
* Revision 1.8 1998/01/22 02:59:44 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
* Revision 1.7 1998/01/19 18:40:41 curt
* Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler.