1
0
Fork 0

Adopted Gnu automake/autoconf system.

This commit is contained in:
curt 1998-04-08 23:30:04 +00:00
parent b69c64da41
commit e84ad0511b
10 changed files with 138 additions and 595 deletions

View file

@ -1,12 +1,14 @@
SUBDIRS = Bucket
libdir = ${exec_prefix}/lib
lib_LTLIBRARIES = libScenery.la
libScenery_la_SOURCES = \
bucketutils.c \
obj.c \
scenery.c \
texload.c \
tilecache.c \
tilemgr.c
obj.c obj.h \
scenery.c scenery.h \
texload.c texload.h \
tilecache.c tilecache.h \
tilemgr.c tilemgr.h
INCLUDES += -I..

View file

@ -70,16 +70,18 @@ PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
SUBDIRS = Bucket
libdir = ${exec_prefix}/lib
lib_LTLIBRARIES = libScenery.la
libScenery_la_SOURCES = \
bucketutils.c \
obj.c \
scenery.c \
texload.c \
tilecache.c \
tilemgr.c
obj.c obj.h \
scenery.c scenery.h \
texload.c texload.h \
tilecache.c tilecache.h \
tilemgr.c tilemgr.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../Simulator/Include/config.h
CONFIG_CLEAN_FILES =
@ -96,8 +98,8 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
libScenery_la_LDFLAGS =
libScenery_la_LIBADD =
libScenery_la_OBJECTS = bucketutils.lo obj.lo scenery.lo texload.lo \
tilecache.lo tilemgr.lo
libScenery_la_OBJECTS = obj.lo scenery.lo texload.lo tilecache.lo \
tilemgr.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
@ -109,12 +111,12 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
DEP_FILES = .deps/bucketutils.P .deps/obj.P .deps/scenery.P \
.deps/texload.P .deps/tilecache.P .deps/tilemgr.P
DEP_FILES = .deps/obj.P .deps/scenery.P .deps/texload.P \
.deps/tilecache.P .deps/tilemgr.P
SOURCES = $(libScenery_la_SOURCES)
OBJECTS = $(libScenery_la_OBJECTS)
all: Makefile $(LTLIBRARIES)
all: all-recursive all-am
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
@ -186,15 +188,55 @@ maintainer-clean-libtool:
libScenery.la: $(libScenery_la_OBJECTS) $(libScenery_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libScenery_la_LDFLAGS) $(libScenery_la_OBJECTS) $(libScenery_la_LIBADD) $(LIBS)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
list='$(SUBDIRS)'; for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
done; \
for subdir in $$rev; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
(cd $$subdir && $(MAKE) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
@ -227,6 +269,14 @@ distdir: $(DISTFILES)
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
for subdir in $(SUBDIRS); do \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
@ -251,25 +301,31 @@ maintainer-clean-depend:
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all
$(MAKE)
installcheck:
install-exec: install-libLTLIBRARIES
info: info-recursive
dvi: dvi-recursive
check: all-am
$(MAKE) check-recursive
installcheck: installcheck-recursive
all-am: Makefile $(LTLIBRARIES)
install-exec-am: install-libLTLIBRARIES
uninstall-am: uninstall-libLTLIBRARIES
install-exec: install-exec-recursive install-exec-am
@$(NORMAL_INSTALL)
install-data:
install-data: install-data-recursive
@$(NORMAL_INSTALL)
install: install-exec install-data all
install: install-recursive install-exec-am
@:
uninstall: uninstall-libLTLIBRARIES
uninstall: uninstall-recursive uninstall-am
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
installdirs: installdirs-recursive
$(mkinstalldirs) $(DATADIR)$(libdir)
@ -287,22 +343,31 @@ distclean-generic:
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-libLTLIBRARIES mostlyclean-compile \
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
mostlyclean-generic
clean: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
clean-depend clean-generic mostlyclean
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
clean-depend clean-generic mostlyclean-am
distclean: distclean-libLTLIBRARIES distclean-compile distclean-libtool \
distclean-tags distclean-depend distclean-generic clean
distclean-am: distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-tags distclean-depend \
distclean-generic clean-am
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean-am
mostlyclean: mostlyclean-recursive mostlyclean-am
clean: clean-recursive clean-am
distclean: distclean-recursive distclean-am
-rm -f config.status
-rm -f libtool
maintainer-clean: maintainer-clean-libLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@ -311,10 +376,16 @@ clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info dvi \
installcheck install-exec install-data install uninstall all \
maintainer-clean-libtool install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info dvi installcheck all-am install-exec-am \
uninstall-am install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean

View file

@ -1,313 +0,0 @@
/**************************************************************************
* bucketutils.c -- support routines to handle fgBUCKET operations
*
* Written by Curtis Olson, started January 1998.
*
* Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
* (Log is kept at end of this file)
**************************************************************************/
#include <math.h>
#include <stdio.h>
#include <Include/fg_constants.h>
#include <Scenery/bucketutils.h>
/* Generate the unique scenery tile index containing the specified
lon/lat parameters.
The index is constructed as follows:
9 bits - to represent 360 degrees of longitude (-180 to 179)
8 bits - to represent 180 degrees of latitude (-90 to 89)
Each 1 degree by 1 degree tile is further broken down into an 8x8
grid. So we also need:
3 bits - to represent x (0 to 7)
3 bits - to represent y (0 to 7) */
long int fgBucketGenIndex(struct fgBUCKET *p) {
long index = 0;
index = ((p->lon + 180) << 14) + ((p->lat + 90) << 6) + (p->y << 3) + p->x;
/* printf(" generated index = %ld\n", index); */
return(index);
}
/* Parse a unique scenery tile index and find the lon, lat, x, and y */
void fgBucketParseIndex(long int index, struct fgBUCKET *p) {
p->lon = index >> 14;
index -= p->lon << 14;
p->lon -= 180;
p->lat = index >> 6;
index -= p->lat << 6;
p->lat -= 90;
p->y = index >> 3;
index -= p->y << 3;
p->x = index;
}
/* Build a path name from an tile index */
void fgBucketGenBasePath(struct fgBUCKET *p, char *path) {
long int index;
int top_lon, top_lat, main_lon, main_lat;
char hem, pole;
index = fgBucketGenIndex(p);
path[0] = '\0';
top_lon = p->lon / 10;
main_lon = p->lon;
if ( (p->lon < 0) && (top_lon * 10 != p->lon) ) {
top_lon -= 1;
}
top_lon *= 10;
if ( top_lon >= 0 ) {
hem = 'e';
} else {
hem = 'w';
top_lon *= -1;
}
if ( main_lon < 0 ) {
main_lon *= -1;
}
top_lat = p->lat / 10;
main_lat = p->lat;
if ( (p->lat < 0) && (top_lat * 10 != p->lat) ) {
top_lat -= 1;
}
top_lat *= 10;
if ( top_lat >= 0 ) {
pole = 'n';
} else {
pole = 's';
top_lat *= -1;
}
if ( main_lat < 0 ) {
main_lat *= -1;
}
sprintf(path, "%c%03d%c%03d/%c%03d%c%03d",
hem, top_lon, pole, top_lat,
hem, main_lon, pole, main_lat);
}
/* offset an bucket struct by the specified amounts in the X & Y direction */
void fgBucketOffset(struct fgBUCKET *in, struct fgBUCKET *out, int x, int y) {
int diff, temp;
int dist_lat;
out->lon = in->lon;
out->lat = in->lat;
out->x = in->x;
out->y = in->y;
/* do X direction */
diff = out->x + x;
/* printf(" reducing x (%d)\n", diff); */
if ( diff >= 0 ) {
temp = diff / 8;
} else if ( diff < -7 ) {
temp = (diff + 1) / 8 - 1;
} else {
temp = diff / 8 - 1;
}
out->x = ((diff % 8) + 8) % 8;
out->lon = ( (out->lon + 180 + 360 + temp) % 360 ) - 180;
/* do Y direction */
diff = out->y + y;
/* printf(" reducing x (%d)\n", diff); */
if ( diff >= 0 ) {
temp = diff / 8;
} else if ( diff < -7 ) {
temp = (diff + 1) / 8 - 1;
} else {
temp = diff / 8 - 1;
}
out->y = ((diff % 8) + 8) % 8;
out->lat = out->lat + temp;
if ( out->lat >= 90 ) {
dist_lat = out->lat - 90;
/* printf(" +lat = %d +y = %d\n", dist_lat, out->y); */
out->lat = 90 - (dist_lat + 1);
out->lon = ( (out->lon + 180 + 180) % 360 ) - 180;
out->y = 7 - out->y;
}
if ( out->lat < -90 ) {
dist_lat = -90 - out->lat;
/* printf(" +lat = %d +y = %d\n", dist_lat, out->y); */
out->lat = -90 + (dist_lat - 1);
out->lon = ( (out->lon + 180 + 180) % 360 ) - 180;
out->y = 7 - out->y;
}
}
/* Given a lat/lon, find the "bucket" or tile that it falls within */
void fgBucketFind(double lon, double lat, struct fgBUCKET *p) {
double diff;
diff = lon - (double)(int)lon;
/* printf("diff = %.2f\n", diff); */
if ( (lon >= 0) || (fabs(diff) < FG_EPSILON) ) {
p->lon = (int)lon;
} else {
p->lon = (int)lon - 1;
}
/* printf(" p->lon = %d\n", p->lon); */
diff = lat - (double)(int)lat;
/* printf("diff = %.2f\n", diff); */
if ( (lat >= 0) || (fabs(diff) < FG_EPSILON) ) {
p->lat = (int)lat;
} else {
p->lat = (int)lat - 1;
}
/* printf(" p->lat = %d\n", p->lat); */
p->x = (int)((lon - p->lon) * 8);
p->y = (int)((lat - p->lat) * 8);
/* printf( "Bucket = lon,lat = %d,%d x,y index = %d,%d\n",
p->lon, p->lat, p->x, p->y); */
}
/* Given a lat/lon, fill in the local tile index array */
void fgBucketGenIdxArray(struct fgBUCKET *p1, struct fgBUCKET *tiles,
int width, int height) {
struct fgBUCKET *p2;
int dw, dh, i, j;
dh = height / 2;
dw = width / 2;
for ( j = 0; j < height; j++ ) {
for ( i = 0; i < width; i++ ) {
fgBucketOffset(p1, &tiles[(j*width)+i], i - dw, j - dh);
p2 = &tiles[(j*width)+i];
/* printf( " bucket = %d %d %d %d index = %ld\n",
p2->lon, p2->lat, p2->x, p2->y,
fgBucketGenIndex(&tiles[(j*width)+i])); */
}
}
}
/* sample main for testing
int main() {
struct fgBUCKET p1;
long int tile[49];
char path[256];
double lon, lat;
int i, j;
p1.lon = 180;
p1.lat = 90;
p1.x = 7;
p1.y = 7;
printf("Max index = %ld\n", gen_index(&p1));
lon = -50.0;
lat = -50.0;
find_bucket(lon, lat, &p1);
gen_idx_array(&p1, tile, 7, 7);
for ( j = 0; j < 7; j++ ) {
for ( i = 0; i < 7; i++ ) {
gen_path(tile[(j*7)+i], path);
printf(" path = %s\n", path);
}
}
lon = 50.0;
lat = 50.0;
find_bucket(lon, lat, &p1);
gen_idx_array(&p1, tile, 7, 7);
for ( j = 0; j < 7; j++ ) {
for ( i = 0; i < 7; i++ ) {
gen_path(tile[(j*7)+i], path);
printf(" path = %s\n", path);
}
}
return(1);
} */
/* $Log$
/* Revision 1.6 1998/02/09 15:07:51 curt
/* Minor tweaks.
/*
* Revision 1.5 1998/01/29 00:51:38 curt
* First pass at tile cache, dynamic tile loading and tile unloading now works.
*
* Revision 1.4 1998/01/27 03:26:41 curt
* Playing with new fgPrintf command.
*
* Revision 1.3 1998/01/27 00:48:01 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.
*
* Revision 1.2 1998/01/24 00:03:28 curt
* Initial revision.
*
* Revision 1.1 1998/01/23 20:06:51 curt
* tileutils.* renamed to bucketutils.*
*
* Revision 1.6 1998/01/19 19:27:18 curt
* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
* This should simplify things tremendously.
*
* Revision 1.5 1998/01/14 02:19:04 curt
* Makde offset_bucket visible to outside.
*
* Revision 1.4 1998/01/13 00:23:12 curt
* Initial changes to support loading and management of scenery tiles. Note,
* there's still a fair amount of work left to be done.
*
* Revision 1.3 1998/01/10 00:01:47 curt
* Misc api changes and tweaks.
*
* Revision 1.2 1998/01/08 02:22:28 curt
* Continue working on basic features.
*
* Revision 1.1 1998/01/07 23:50:52 curt
* "area" renamed to "tile"
*
* Revision 1.1 1998/01/07 23:23:40 curt
* Initial revision.
*
* */

View file

@ -1,110 +0,0 @@
/**************************************************************************
* bucketutils.h -- support routines to handle fgBUCKET operations
*
* Written by Curtis Olson, started January 1998.
*
* Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
* (Log is kept at end of this file)
**************************************************************************/
#ifndef _BUCKETUTILS_H
#define _BUCKETUTILS_H
struct fgBUCKET {
int lon; /* longitude (-180 to 179) */
int lat; /* latitude (-90 to 89) */
int x; /* x (0 to 7) */
int y; /* y (0 to 7) */
};
/* Generate the unique scenery tile index containing the specified
lon/lat parameters.
The index is constructed as follows:
9 bits - to represent 360 degrees of longitude (-180 to 179)
8 bits - to represent 180 degrees of latitude (-90 to 89)
Each 1 degree by 1 degree tile is further broken down into an 8x8
grid. So we also need:
3 bits - to represent x (0 to 7)
3 bits - to represent y (0 to 7) */
long int fgBucketGenIndex(struct fgBUCKET *p);
/* Parse a unique scenery tile index and find the lon, lat, x, and y */
void fgBucketParseIndex(long int index, struct fgBUCKET *p);
/* Build a path name from an tile index */
void fgBucketGenBasePath(struct fgBUCKET *p, char *path);
/* offset an bucket struct by the specified amounts in the X & Y direction */
void fgBucketOffset(struct fgBUCKET *in, struct fgBUCKET *out, int x, int y);
/* Given a lat/lon, find the "bucket" or tile that it falls within */
void fgBucketFind(double lon, double lat, struct fgBUCKET *p);
/* Given a lat/lon, fill in the local tile index array */
void fgBucketGenIdxArray(struct fgBUCKET *p1, struct fgBUCKET *tiles,
int width, int height);
#endif /* _BUCKETUTILS_H */
/* $Log$
/* Revision 1.2 1998/01/24 00:03:28 curt
/* Initial revision.
/*
* Revision 1.1 1998/01/23 20:06:52 curt
* tileutils.* renamed to bucketutils.*
*
* Revision 1.6 1998/01/22 02:59:42 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
* Revision 1.5 1998/01/14 02:19:05 curt
* Makde offset_bucket visible to outside.
*
* Revision 1.4 1998/01/13 00:23:12 curt
* Initial changes to support loading and management of scenery tiles. Note,
* there's still a fair amount of work left to be done.
*
* Revision 1.3 1998/01/10 00:01:48 curt
* Misc api changes and tweaks.
*
* Revision 1.2 1998/01/08 02:22:28 curt
* Continue working on basic features.
*
* Revision 1.1 1998/01/07 23:50:52 curt
* "area" renamed to "tile"
*
* Revision 1.1 1998/01/07 23:23:40 curt
* Initial revision.
*
* */

View file

@ -1,64 +0,0 @@
/**************************************************************************
* common.c -- common utilities and support routines for the parser
*
* Written by Curtis Olson, started May 1997.
*
* Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
* (Log is kept at end of this file)
**************************************************************************/
#ifdef WIN32
#include <string.h>
#endif
#include <Scenery/common.h>
/* strip the enclosing quotes from a string, works within the current
string and thus is destructive. "hello" ==> hello */
char *strip_quotes(char *s) {
int len;
/* strip first character */
s++;
/* toast last character */
len = strlen(s);
s[len-1] = '\0';
return(s);
}
/* $Log$
/* Revision 1.4 1998/01/19 19:27:14 curt
/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
/* This should simplify things tremendously.
/*
* Revision 1.3 1998/01/06 01:20:23 curt
* Tweaks to help building with MSVC++
*
* Revision 1.2 1997/05/23 15:40:41 curt
* Added GNU copyright headers.
*
* Revision 1.1 1997/05/16 16:07:03 curt
* Initial revision.
*
*/

View file

@ -1,55 +0,0 @@
/**************************************************************************
* common.h -- common utilities and support routines for the parser
*
* Written by Curtis Olson, started May 1997.
*
* Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
* (Log is kept at end of this file)
**************************************************************************/
#ifndef _COMMON_H
#define _COMMON_H
/* Maximum length for an identifier */
#define MAX_IDENT_LEN 33 /* 32 + 1 for string terminator */
/* strip the enclosing quotes from a string, works within the current
string and thus is destructive. */
char *strip_quotes(char *s);
#endif /* _COMMON_H */
/* $Log$
/* Revision 1.4 1998/01/22 02:59:40 curt
/* Changed #ifdef FILE_H to #ifdef _FILE_H
/*
* Revision 1.3 1997/07/23 21:52:24 curt
* Put comments around the text after an #endif for increased portability.
*
* Revision 1.2 1997/05/23 15:40:41 curt
* Added GNU copyright headers.
*
* Revision 1.1 1997/05/16 16:07:04 curt
* Initial revision.
*
*/

View file

@ -70,7 +70,7 @@ int fgSceneryInit( void ) {
path[0] = '\0';
strcat(path, g->root_dir);
strcat(path, "/Textures/");
strcat(path, "forest.rgb");
strcat(path, "desert.rgb");
if ( (texbuf = read_rgb_texture(path, &width, &height)) == NULL ) {
fgPrintf( FG_GENERAL, FG_EXIT, "Error in loading textures!\n" );
@ -114,9 +114,12 @@ void fgSceneryRender( void ) {
/* $Log$
/* Revision 1.38 1998/04/03 22:11:37 curt
/* Converting to Gnu autoconf system.
/* Revision 1.39 1998/04/08 23:30:07 curt
/* Adopted Gnu automake/autoconf system.
/*
* Revision 1.38 1998/04/03 22:11:37 curt
* Converting to Gnu autoconf system.
*
* Revision 1.37 1998/03/23 21:23:05 curt
* Debugging output tweaks.
*

View file

@ -36,7 +36,7 @@
#include <Include/general.h>
#include <Main/fg_debug.h>
#include <Main/views.h>
#include <Scenery/bucketutils.h>
#include <Scenery/Bucket/bucketutils.h>
#include <Scenery/obj.h>
#include <Scenery/tilecache.h>
@ -196,9 +196,12 @@ int fgTileCacheNextAvail( void ) {
/* $Log$
/* Revision 1.8 1998/04/03 22:11:38 curt
/* Converting to Gnu autoconf system.
/* Revision 1.9 1998/04/08 23:30:07 curt
/* Adopted Gnu automake/autoconf system.
/*
* Revision 1.8 1998/04/03 22:11:38 curt
* Converting to Gnu autoconf system.
*
* Revision 1.7 1998/02/01 03:39:55 curt
* Minor tweaks.
*

View file

@ -37,7 +37,7 @@
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <Scenery/bucketutils.h>
#include <Scenery/Bucket/bucketutils.h>
#include <Include/fg_types.h>
/* For best results ... i.e. to avoid tile load problems and blank areas
@ -81,9 +81,12 @@ void fgTileCacheEntryInfo( int index, GLint *display_list,
/* $Log$
/* Revision 1.7 1998/04/03 22:11:38 curt
/* Converting to Gnu autoconf system.
/* Revision 1.8 1998/04/08 23:30:08 curt
/* Adopted Gnu automake/autoconf system.
/*
* Revision 1.7 1998/04/03 22:11:38 curt
* Converting to Gnu autoconf system.
*
* Revision 1.6 1998/02/18 15:07:10 curt
* Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated
* drivers will work.)

View file

@ -35,7 +35,7 @@
#include <XGL/xgl.h>
#include <Scenery/scenery.h>
#include <Scenery/bucketutils.h>
#include <Scenery/Bucket/bucketutils.h>
#include <Scenery/obj.h>
#include <Scenery/tilecache.h>
@ -219,9 +219,12 @@ void fgTileMgrRender( void ) {
/* $Log$
/* Revision 1.22 1998/04/03 22:11:38 curt
/* Converting to Gnu autoconf system.
/* Revision 1.23 1998/04/08 23:30:08 curt
/* Adopted Gnu automake/autoconf system.
/*
* Revision 1.22 1998/04/03 22:11:38 curt
* Converting to Gnu autoconf system.
*
* Revision 1.21 1998/03/23 21:23:05 curt
* Debugging output tweaks.
*