1
0
Fork 0

C++-ifing the code a bit.

This commit is contained in:
curt 1998-04-24 00:45:53 +00:00
parent 090ebffc84
commit be119a18a8
6 changed files with 76 additions and 43 deletions

View file

@ -2,7 +2,7 @@ libdir = ${exec_prefix}/lib
lib_LTLIBRARIES = libCockpit.la
libCockpit_la_SOURCES = \
cockpit.c cockpit.h \
hud.c hud.h
cockpit.cxx cockpit.hxx \
hud.cxx hud.hxx
INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator

View file

@ -74,8 +74,8 @@ libdir = ${exec_prefix}/lib
lib_LTLIBRARIES = libCockpit.la
libCockpit_la_SOURCES = \
cockpit.c cockpit.h \
hud.c hud.h
cockpit.cxx cockpit.hxx \
hud.cxx hud.hxx
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../Include/config.h
CONFIG_CLEAN_FILES =
@ -93,10 +93,10 @@ X_PRE_LIBS = @X_PRE_LIBS@
libCockpit_la_LDFLAGS =
libCockpit_la_LIBADD =
libCockpit_la_OBJECTS = cockpit.lo hud.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
@ -105,13 +105,14 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
DEP_FILES = .deps/cockpit.P .deps/hud.P
CXXMKDEP = $(CXX) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
SOURCES = $(libCockpit_la_SOURCES)
OBJECTS = $(libCockpit_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/Cockpit/Makefile
@ -178,7 +179,11 @@ distclean-libtool:
maintainer-clean-libtool:
libCockpit.la: $(libCockpit_la_OBJECTS) $(libCockpit_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libCockpit_la_LDFLAGS) $(libCockpit_la_OBJECTS) $(libCockpit_la_LIBADD) $(LIBS)
$(CXXLINK) -rpath $(libdir) $(libCockpit_la_LDFLAGS) $(libCockpit_la_OBJECTS) $(libCockpit_la_LIBADD) $(LIBS)
.cxx.o:
$(CXXCOMPILE) -c $<
.cxx.lo:
$(LTCXXCOMPILE) -c $<
tags: TAGS
@ -245,6 +250,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

@ -24,7 +24,9 @@
**************************************************************************/
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_WINDOWS_H
# include <windows.h>
@ -33,7 +35,6 @@
#include <GL/glut.h>
#include <stdlib.h>
#include <Cockpit/cockpit.h>
#include <Include/fg_constants.h>
@ -43,9 +44,10 @@
#include <Math/mat3.h>
#include <Math/polar.h>
#include <Scenery/scenery.h>
#include <Time/fg_timer.h>
#include <Time/fg_timer.hxx>
#include <Weather/weather.h>
#include "cockpit.hxx"
// This is a structure that contains all data related to
// cockpit/panel/hud system
@ -102,9 +104,12 @@ void fgCockpitUpdate( void )
/* $Log$
/* Revision 1.13 1998/04/18 04:14:01 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/24 00:45:54 curt
/* C++-ifing the code a bit.
/*
* Revision 1.13 1998/04/18 04:14:01 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.12 1998/04/14 02:23:09 curt
* Code reorganizations. Added a Lib/ directory for more general libraries.
*

View file

@ -1,5 +1,5 @@
/**************************************************************************
* cockpit.h -- cockpit defines and prototypes (initial draft)
* cockpit.hxx -- cockpit defines and prototypes (initial draft)
*
* Written by Michele America, started September 1997.
*
@ -24,15 +24,15 @@
**************************************************************************/
#ifndef _COCKPIT_H
#define _COCKPIT_H
#ifndef _COCKPIT_HXX
#define _COCKPIT_HXX
#include <Cockpit/hud.h>
#include "hud.hxx"
#ifdef __cplusplus
extern "C" {
#ifndef __cplusplus
# error This library requires C++
#endif
@ -51,18 +51,16 @@ fgCOCKPIT *fgCockpitInit( fgAIRCRAFT *cur_aircraft );
void fgCockpitUpdate( void );
#ifdef __cplusplus
}
#endif
#endif /* _COCKPIT_H */
#endif /* _COCKPIT_HXX */
/* $Log$
/* Revision 1.8 1998/04/22 13:26:19 curt
/* C++ - ifing the code a bit.
/* Revision 1.1 1998/04/24 00:45:55 curt
/* C++-ifing the code a bit.
/*
* 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.
*

View file

@ -24,7 +24,9 @@
**************************************************************************/
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_WINDOWS_H
# include <windows.h>
@ -38,8 +40,6 @@
# include <values.h> // for MAXINT
#endif
#include "hud.h"
#include <Aircraft/aircraft.h>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
@ -47,9 +47,11 @@
#include <Math/mat3.h>
#include <Math/polar.h>
#include <Scenery/scenery.h>
#include <Time/fg_timer.h>
#include <Time/fg_timer.hxx>
#include <Weather/weather.h>
#include "hud.hxx"
// #define DEBUG
#define drawOneLine(x1,y1,x2,y2) glBegin(GL_LINES); \
@ -1603,9 +1605,12 @@ void fgHUDSetBrightness( Hptr hud, int brightness )
}
/* $Log$
/* Revision 1.22 1998/04/18 04:14:02 curt
/* Moved fg_debug.c to it's own library.
/* Revision 1.1 1998/04/24 00:45:57 curt
/* C++-ifing the code a bit.
/*
* Revision 1.22 1998/04/18 04:14:02 curt
* Moved fg_debug.c to it's own library.
*
* Revision 1.21 1998/04/03 21:55:28 curt
* Converting to Gnu autoconf system.
* Tweaks to hud.c

View file

@ -1,5 +1,5 @@
/**************************************************************************
* hud.h -- hud defines and prototypes (initial draft)
* hud.hxx -- hud defines and prototypes (initial draft)
*
* Written by Michele America, started September 1997.
*
@ -24,8 +24,14 @@
**************************************************************************/
#ifndef _HUD_H
#define _HUD_H
#ifndef _HUD_HXX
#define _HUD_HXX
#ifndef __cplusplus
# error This library requires C++
#endif
#include <Aircraft/aircraft.h>
#include <Flight/flight.h>
@ -374,14 +380,17 @@ void fgUpdateHUD ( Hptr hud );
void fgUpdateHUD2( Hptr hud ); // Future use?
#endif // _HUD_H
#endif // _HUD_HXX
/* $Log$
/* Revision 1.15 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
/* for things like lighting.
/* Revision 1.1 1998/04/24 00:45:58 curt
/* C++-ifing the code a bit.
/*
* Revision 1.15 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
* for things like lighting.
*
* Revision 1.14 1998/02/21 14:53:14 curt
* Added Charlie's HUD changes.
*