C++ - ifing the code a bit.

This commit is contained in:
curt
1998-04-22 13:21:26 +00:00
committed by Tim Moore
parent b6b93c74ea
commit 2dd9bcbd50
14 changed files with 166 additions and 132 deletions

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.
*