1
0
Fork 0

C++ - ifing the code a bit.

This commit is contained in:
curt 1998-04-22 13:21:26 +00:00
parent 664b1fa4a8
commit aba1974dad
30 changed files with 317 additions and 213 deletions

View file

@ -28,15 +28,15 @@
#define _AIRCRAFT_H
#include <Flight/flight.h>
#include <Controls/controls.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <Flight/flight.h>
#include <Controls/controls.h>
/* Define a structure containing all the parameters for an aircraft */
typedef struct{
fgFLIGHT *flight;
@ -66,9 +66,12 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a);
/* $Log$
/* Revision 1.11 1998/04/21 17:02:27 curt
/* Prepairing for C++ integration.
/* Revision 1.12 1998/04/22 13:26:15 curt
/* C++ - ifing the code a bit.
/*
* 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>
@ -85,9 +88,12 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a);
/* $Log$
/* Revision 1.11 1998/04/21 17:02:27 curt
/* Prepairing for C++ integration.
/* Revision 1.12 1998/04/22 13:26:15 curt
/* C++ - ifing the code a bit.
/*
* 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>

View file

@ -2,11 +2,11 @@ libdir = ${exec_prefix}/lib
lib_LTLIBRARIES = libAstro.la
libAstro_la_SOURCES = \
moon.c moon.h \
orbits.c orbits.h \
planets.c planets.h \
sky.c sky.h \
stars.c stars.h \
sun.c sun.h
moon.cxx moon.hxx \
orbits.cxx orbits.hxx \
planets.cxx planets.hxx \
sky.cxx sky.hxx \
stars.cxx stars.hxx \
sun.cxx sun.hxx
INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator

View file

@ -74,12 +74,12 @@ libdir = ${exec_prefix}/lib
lib_LTLIBRARIES = libAstro.la
libAstro_la_SOURCES = \
moon.c moon.h \
orbits.c orbits.h \
planets.c planets.h \
sky.c sky.h \
stars.c stars.h \
sun.c sun.h
moon.cxx moon.hxx \
orbits.cxx orbits.hxx \
planets.cxx planets.hxx \
sky.cxx sky.hxx \
stars.cxx stars.hxx \
sun.cxx sun.hxx
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../Include/config.h
CONFIG_CLEAN_FILES =
@ -98,10 +98,10 @@ libAstro_la_LDFLAGS =
libAstro_la_LIBADD =
libAstro_la_OBJECTS = moon.lo orbits.lo planets.lo sky.lo stars.lo \
sun.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
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 $@
DIST_COMMON = Makefile.am Makefile.in
@ -111,13 +111,14 @@ TAR = tar
GZIP = --best
DEP_FILES = .deps/moon.P .deps/orbits.P .deps/planets.P .deps/sky.P \
.deps/stars.P .deps/sun.P
CXXMKDEP = $(CXX) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
SOURCES = $(libAstro_la_SOURCES)
OBJECTS = $(libAstro_la_OBJECTS)
all: Makefile $(LTLIBRARIES)
.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/Astro/Makefile
@ -184,7 +185,11 @@ distclean-libtool:
maintainer-clean-libtool:
libAstro.la: $(libAstro_la_OBJECTS) $(libAstro_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libAstro_la_LDFLAGS) $(libAstro_la_OBJECTS) $(libAstro_la_LIBADD) $(LIBS)
$(CXXLINK) -rpath $(libdir) $(libAstro_la_LDFLAGS) $(libAstro_la_OBJECTS) $(libAstro_la_LIBADD) $(LIBS)
.cxx.o:
$(CXXCOMPILE) -c $<
.cxx.lo:
$(LTCXXCOMPILE) -c $<
tags: TAGS
@ -251,6 +256,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

@ -31,16 +31,17 @@
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Astro/orbits.h>
#include <Astro/moon.h>
#include <Aircraft/aircraft.h>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Include/general.h>
#include <Main/views.h>
#include <Main/views.hxx>
#include <Time/fg_time.h>
#include "orbits.hxx"
#include "moon.hxx"
struct CelestialCoord moonPos;
static float xMoon, yMoon, zMoon;
@ -213,9 +214,12 @@ void fgMoonRender( void ) {
/* $Log$
/* Revision 1.9 1998/04/18 04:13:56 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:21:28 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.9 1998/04/18 04:13:56 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.8 1998/04/03 21:52:49 curt
* Converting to Gnu autoconf system.
*

View file

@ -22,19 +22,20 @@
**************************************************************************/
#ifndef _MOON_H
#define _MOON_H
#ifndef _MOON_HXX
#define _MOON_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
#include <Astro/orbits.h>
#include <math.h>
#include <Time/fg_time.h>
#include <math.h>
#include "orbits.hxx"
/* Initialize the Moon Display management Subsystem */
@ -50,18 +51,16 @@ struct CelestialCoord fgCalculateMoon(struct OrbElements Params,
extern struct OrbElements pltOrbElements[9];
#ifdef __cplusplus
}
#endif
#endif /* _MOON_H */
#endif /* _MOON_HXX */
/* $Log$
/* Revision 1.7 1998/04/21 17:02:30 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:21:28 curt
/* C++ - ifing the code a bit.
/*
* 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

View file

@ -23,16 +23,19 @@
**************************************************************************/
#include <config.h>
#include <math.h>
#include <string.h>
#include <Astro/orbits.h>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Include/general.h>
#include <Time/fg_time.h>
#include "orbits.hxx"
struct OrbElements pltOrbElements[9];
@ -165,9 +168,12 @@ void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
/* $Log$
/* Revision 1.10 1998/04/18 04:13:57 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:21:29 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.10 1998/04/18 04:13:57 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.9 1998/03/14 00:27:12 curt
* Updated fgGENERAL to a "type" of struct.
*

View file

@ -23,12 +23,12 @@
**************************************************************************/
#ifndef _ORBITS_H
#define _ORBITS_H
#ifndef _ORBITS_HXX
#define _ORBITS_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -84,18 +84,16 @@ int fgSolarSystemInit(struct fgTIME t);
void fgSolarSystemUpdate(struct OrbElements *planets, struct fgTIME t);
#ifdef __cplusplus
}
#endif
#endif /* _ORBITS_H */
#endif /* _ORBITS_HXX */
/* $Log$
/* Revision 1.7 1998/04/21 17:02:31 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:21:30 curt
/* C++ - ifing the code a bit.
/*
* 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

View file

@ -32,12 +32,14 @@
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Astro/orbits.h>
#include <Astro/planets.h>
#include <Astro/sun.h>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Time/fg_time.h>
#include <Time/light.hxx>
#include "orbits.hxx"
#include "planets.hxx"
#include "sun.hxx"
GLint planets = 0;
@ -206,9 +208,12 @@ void fgPlanetsRender( void ) {
/* $Log$
/* Revision 1.9 1998/04/18 04:13:57 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:21:31 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.9 1998/04/18 04:13:57 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.8 1998/04/03 21:52:50 curt
* Converting to Gnu autoconf system.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* planets.h
* planets.hxx
*
* Written 1997 by Durk Talsma, started October, 1997. For the flight gear
* project.
@ -23,12 +23,12 @@
**************************************************************************/
#ifndef _PLANETS_H
#define _PLANETS_H
#ifndef _PLANETS_HXX
#define _PLANETS_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -41,18 +41,16 @@ void fgPlanetsInit( void );
void fgPlanetsRender( void );
#ifdef __cplusplus
}
#endif
#endif /* PLANETS_H */
#endif /* PLANETS_HXX */
/* $Log$
/* Revision 1.5 1998/04/21 17:02:31 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:21:32 curt
/* C++ - ifing the code a bit.
/*
* 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>

View file

@ -35,16 +35,16 @@
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Astro/sky.h>
#include <Time/event.h>
#include <Time/fg_time.h>
#include <Aircraft/aircraft.h>
#include <Flight/flight.h>
#include <Include/fg_constants.h>
#include <Main/views.h>
#include <Main/views.hxx>
#include <Math/fg_random.h>
#include <Time/event.h>
#include <Time/fg_time.h>
#include "sky.hxx"
/*
#include <Include/general.h>
@ -351,9 +351,12 @@ void fgSkyRender( void ) {
/* $Log$
/* Revision 1.9 1998/04/03 21:52:50 curt
/* Converting to Gnu autoconf system.
/* Revision 1.1 1998/04/22 13:21:32 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.9 1998/04/03 21:52:50 curt
* Converting to Gnu autoconf system.
*
* Revision 1.8 1998/03/09 22:47:25 curt
* Incorporated Durk's updates.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* sky.h -- model sky with an upside down "bowl"
* sky.hxx -- model sky with an upside down "bowl"
*
* Written by Curtis Olson, started December 1997.
*
@ -24,12 +24,12 @@
**************************************************************************/
#ifndef _SKY_H
#define _SKY_H
#ifndef _SKY_HXX
#define _SKY_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -43,18 +43,16 @@ void fgSkyColorsInit( void );
void fgSkyRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _SKY_H */
#endif /* _SKY_HXX */
/* $Log$
/* Revision 1.4 1998/04/21 17:02:32 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:21:33 curt
/* C++ - ifing the code a bit.
/*
* 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
*

View file

@ -38,17 +38,18 @@
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Astro/orbits.h>
#include <Astro/planets.h>
#include <Astro/stars.h>
#include <Aircraft/aircraft.h>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Include/general.h>
#include <Main/views.h>
#include <Main/views.hxx>
#include <Time/fg_time.h>
#include "orbits.hxx"
#include "planets.hxx"
#include "stars.hxx"
#define EpochStart (631065600)
#define DaysSinceEpoch(secs) (((secs)-EpochStart)*(1.0/(24*3600)))
@ -257,9 +258,12 @@ void fgStarsRender( void ) {
/* $Log$
/* Revision 1.11 1998/04/18 04:13:58 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:21:34 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.11 1998/04/18 04:13:58 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.10 1998/04/03 21:52:51 curt
* Converting to Gnu autoconf system.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* stars.h -- data structures and routines for managing and rendering stars.
* stars.hxx -- data structures and routines for managing and rendering stars.
*
* Written by Curtis Olson, started August 1997.
*
@ -24,12 +24,12 @@
**************************************************************************/
#ifndef _STARS_H
#define _STARS_H
#ifndef _STARS_HXX
#define _STARS_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -46,18 +46,16 @@ extern struct OrbElements pltOrbElements[9];
extern struct fgTIME cur_time_params;
#ifdef __cplusplus
}
#endif
#endif /* _STARS_H */
#endif /* _STARS_HXX */
/* $Log$
/* Revision 1.5 1998/04/21 17:02:33 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:21:35 curt
/* C++ - ifing the code a bit.
/*
* 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>

View file

@ -32,13 +32,15 @@
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Astro/orbits.h>
#include <Astro/sun.h>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Main/views.h>
#include <Main/views.hxx>
#include <Time/fg_time.h>
#include <Time/sunpos.h>
#include <Time/sunpos.hxx>
#include "orbits.hxx"
#include "sun.hxx"
GLint sun_obj = 0;
@ -188,9 +190,12 @@ void fgSunRender( void ) {
/* $Log$
/* Revision 1.10 1998/04/18 04:13:58 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:21:36 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.10 1998/04/18 04:13:58 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.9 1998/04/03 21:52:51 curt
* Converting to Gnu autoconf system.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* sun.h
* sun.hxx
*
* Written 1997 by Durk Talsma, started October, 1997. For the flight gear
* project.
@ -23,12 +23,12 @@
**************************************************************************/
#ifndef _SUN_H
#define _SUN_H
#ifndef _SUN_HXX
#define _SUN_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -38,25 +38,25 @@ extern fgSUNPOS solarPosition;
void fgCalcSunPos (struct OrbElements sunParams);
extern struct OrbElements pltOrbElements[9];
/* Initialize the Sun */
void fgSunInit( void );
/* Draw the Sun */
void fgSunRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _SUN_H */
#endif /* _SUN_HXX */
/* $Log$
/* Revision 1.6 1998/04/21 17:02:33 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:21:37 curt
/* C++ - ifing the code a bit.
/*
* 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.
*

View file

@ -26,11 +26,16 @@
#ifndef _AUTOPILOT_H
#define _AUTOPILOT_H
#include <Aircraft/aircraft.h>
#include <Flight/flight.h>
#include <Controls/controls.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
int Mode ; // the current mode the AP is operating in
@ -50,5 +55,10 @@ int fgAPRun( void );
void fgAPSetMode( int mode);
#ifdef __cplusplus
}
#endif
#endif // _AUTOPILOT_H

View file

@ -28,14 +28,14 @@
#define _COCKPIT_H
#include <Cockpit/hud.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <Cockpit/hud.h>
// And in the future (near future i hope).
// #include <Cockpit/panel.h>
@ -60,9 +60,12 @@ void fgCockpitUpdate( void );
/* $Log$
/* Revision 1.7 1998/04/21 17:02:34 curt
/* Prepairing for C++ integration.
/* Revision 1.8 1998/04/22 13:26:19 curt
/* C++ - ifing the code a bit.
/*
* 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>

View file

@ -28,14 +28,14 @@
#define _CONTROLS_H
#include <Include/fg_limits.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <Include/fg_limits.h>
/* Define a structure containing the control parameters */
typedef struct {
@ -92,9 +92,12 @@ void fgThrottleSet(int engine, double pos);
/* $Log$
/* Revision 1.13 1998/04/21 17:02:35 curt
/* Prepairing for C++ integration.
/* Revision 1.14 1998/04/22 13:26:19 curt
/* C++ - ifing the code a bit.
/*
* 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.
*

View file

@ -28,15 +28,14 @@
#define _FLIGHT_H
#include <Flight/Slew/slew.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <Flight/Slew/slew.h>
/* #include <Flight/LaRCsim/ls_interface.h> */
/* Define the various supported flight models (most not yet implemented) */
#define FG_LARCSIM 0 /* The only one that is currently implemented */
#define FG_ACM 1
@ -411,10 +410,13 @@ int fgFlightModelUpdate(int model, fgFLIGHT *f, int multiloop);
/* $Log$
/* Revision 1.15 1998/04/21 16:59:33 curt
/* Integrated autopilot.
/* Prepairing for C++ integration.
/* Revision 1.16 1998/04/22 13:26:20 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.15 1998/04/21 16:59:33 curt
* Integrated autopilot.
* Prepairing for C++ integration.
*
* Revision 1.14 1998/02/07 15:29:37 curt
* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>

View file

@ -28,17 +28,30 @@
#define _JOYSTICK_H
#ifdef __cplusplus
extern "C" {
#endif
int fgJoystickInit( int joy_num );
int fgJoystickRead( double *joy_x, double *joy_y, int *joy_b1, int *joy_b2 );
#ifdef __cplusplus
}
#endif
#endif /* _JOYSTICK_H */
/* $Log$
/* Revision 1.2 1998/01/22 02:59:36 curt
/* Changed #ifdef FILE_H to #ifdef _FILE_H
/* Revision 1.3 1998/04/22 13:26:21 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.2 1998/01/22 02:59:36 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
* Revision 1.1 1997/08/29 18:06:55 curt
* Initial revision.
*

View file

@ -6,8 +6,8 @@ libScenery_la_SOURCES = \
obj.c obj.h \
scenery.c scenery.h \
texload.c texload.h \
tilecache.c tilecache.h \
tilemgr.c tilemgr.h
tilecache.cxx tilecache.hxx \
tilemgr.cxx tilemgr.hxx
INCLUDES += \
-I$(top_builddir) \

View file

@ -78,8 +78,8 @@ libScenery_la_SOURCES = \
obj.c obj.h \
scenery.c scenery.h \
texload.c texload.h \
tilecache.c tilecache.h \
tilemgr.c tilemgr.h
tilecache.cxx tilecache.hxx \
tilemgr.cxx tilemgr.hxx
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../Include/config.h
CONFIG_CLEAN_FILES =
@ -98,6 +98,10 @@ libScenery_la_LDFLAGS =
libScenery_la_LIBADD =
libScenery_la_OBJECTS = obj.lo scenery.lo texload.lo tilecache.lo \
tilemgr.lo
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)
@ -111,13 +115,14 @@ TAR = tar
GZIP = --best
DEP_FILES = .deps/obj.P .deps/scenery.P .deps/texload.P \
.deps/tilecache.P .deps/tilemgr.P
CXXMKDEP = $(CXX) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
SOURCES = $(libScenery_la_SOURCES)
OBJECTS = $(libScenery_la_OBJECTS)
all: Makefile $(LTLIBRARIES)
.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/Scenery/Makefile
@ -184,7 +189,11 @@ distclean-libtool:
maintainer-clean-libtool:
libScenery.la: $(libScenery_la_OBJECTS) $(libScenery_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libScenery_la_LDFLAGS) $(libScenery_la_OBJECTS) $(libScenery_la_LIBADD) $(LIBS)
$(CXXLINK) -rpath $(libdir) $(libScenery_la_LDFLAGS) $(libScenery_la_OBJECTS) $(libScenery_la_LIBADD) $(LIBS)
.cxx.o:
$(CXXCOMPILE) -c $<
.cxx.lo:
$(LTCXXCOMPILE) -c $<
tags: TAGS
@ -251,6 +260,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

@ -96,7 +96,7 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) {
double x, y, z, xmax, xmin, ymax, ymin, zmax, zmin;
GLfloat sgenparams[] = { 1.0, 0.0, 0.0, 0.0 };
GLint tile;
gzFile *f;
gzFile f;
int first, ncount, vncount, n1, n2, n3, n4;
static int use_per_vertex_norms = 1;
int winding;
@ -398,9 +398,12 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) {
/* $Log$
/* Revision 1.27 1998/04/18 04:13:17 curt
/* Added zlib on the fly decompression support for loading scenery objects.
/* Revision 1.28 1998/04/22 13:22:44 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.27 1998/04/18 04:13:17 curt
* Added zlib on the fly decompression support for loading scenery objects.
*
* Revision 1.26 1998/04/03 22:11:36 curt
* Converting to Gnu autoconf system.
*

View file

@ -28,11 +28,6 @@
#define _OBJ_H
#ifdef __cplusplus
extern "C" {
#endif
#include <config.h>
#ifdef HAVE_WINDOWS_H
@ -44,6 +39,11 @@ extern "C" {
#include <Include/fg_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Load a .obj file and generate the GL call list */
GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius);
@ -57,9 +57,12 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius);
/* $Log$
/* Revision 1.8 1998/04/21 17:02:43 curt
/* Prepairing for C++ integration.
/* Revision 1.9 1998/04/22 13:22:45 curt
/* C++ - ifing the code a bit.
/*
* 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.
*

View file

@ -28,14 +28,14 @@
#define _SCENERY_H
#include <Include/fg_types.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <Include/fg_types.h>
/* Define a structure containing global scenery parameters */
struct fgSCENERY {
/* number of terrain data points to skip */
@ -76,9 +76,12 @@ void fgSceneryRender( void );
/* $Log$
/* Revision 1.19 1998/04/21 17:02:43 curt
/* Prepairing for C++ integration.
/* Revision 1.20 1998/04/22 13:22:45 curt
/* C++ - ifing the code a bit.
/*
* 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.
*

View file

@ -10,13 +10,14 @@
#define _TEXLOAD_H
#include <GL/glut.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);

View file

@ -37,9 +37,10 @@
#include <Bucket/bucketutils.h>
#include <Debug/fg_debug.h>
#include <Main/views.h>
#include <Scenery/obj.h>
#include <Scenery/tilecache.h>
#include <Main/views.hxx>
#include "obj.h"
#include "tilecache.hxx"
/* tile cache */
@ -197,9 +198,12 @@ int fgTileCacheNextAvail( void ) {
/* $Log$
/* Revision 1.11 1998/04/18 04:14:07 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:22:46 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.11 1998/04/18 04:14:07 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.10 1998/04/14 02:23:17 curt
* Code reorganizations. Added a Lib/ directory for more general libraries.
*

View file

@ -28,8 +28,8 @@
#define _TILECACHE_H
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -82,18 +82,16 @@ void fgTileCacheEntryInfo( int index, GLint *display_list,
struct fgCartesianPoint *local_ref );
#ifdef __cplusplus
}
#endif
#endif /* _TILECACHE_H */
/* $Log$
/* Revision 1.10 1998/04/21 17:02:45 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:22:47 curt
/* C++ - ifing the code a bit.
/*
* 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.
*

View file

@ -36,7 +36,7 @@
#include <Scenery/scenery.h>
#include <Scenery/obj.h>
#include <Scenery/tilecache.h>
#include <Scenery/tilecache.hxx>
#include <Aircraft/aircraft.h>
#include <Bucket/bucketutils.h>
@ -219,9 +219,12 @@ void fgTileMgrRender( void ) {
/* $Log$
/* Revision 1.25 1998/04/18 04:14:07 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/22 13:22:48 curt
/* C++ - ifing the code a bit.
/*
* Revision 1.25 1998/04/18 04:14:07 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.24 1998/04/14 02:23:18 curt
* Code reorganizations. Added a Lib/ directory for more general libraries.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* tilemgr.h -- routines to handle dynamic management of scenery tiles
* tilemgr.hxx -- routines to handle dynamic management of scenery tiles
*
* Written by Curtis Olson, started January 1998.
*
@ -24,12 +24,12 @@
**************************************************************************/
#ifndef _TILEMGR_H
#define _TILEMGR_H
#ifndef _TILEMGR_HXX
#define _TILEMGR_HXX
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -46,18 +46,16 @@ int fgTileMgrUpdate( void );
void fgTileMgrRender( void );
#ifdef __cplusplus
}
#endif
#endif /* _TILEMGR_H */
#endif /* _TILEMGR_HXX */
/* $Log$
/* Revision 1.6 1998/04/21 17:02:45 curt
/* Prepairing for C++ integration.
/* Revision 1.1 1998/04/22 13:22:49 curt
/* C++ - ifing the code a bit.
/*
* 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>