mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-08 07:28:22 -10:00
Compare commits
46
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8f9376d55 | ||
|
|
2c95fa52f8 | ||
|
|
993740e06f | ||
|
|
da67b2b53c | ||
|
|
7d08fec7cc | ||
|
|
6ec2c31678 | ||
|
|
e469a54429 | ||
|
|
2352055d98 | ||
|
|
7892625474 | ||
|
|
58a1497614 | ||
|
|
76d94278a8 | ||
|
|
47b2c3cd88 | ||
|
|
1f55e87876 | ||
|
|
cdd1a0b743 | ||
|
|
f864a28bb3 | ||
|
|
993a176572 | ||
|
|
414a344f33 | ||
|
|
28848dcbc8 | ||
|
|
ea32341410 | ||
|
|
ad53507f1c | ||
|
|
8f9e7cf941 | ||
|
|
1f1339cb01 | ||
|
|
e5eafea546 | ||
|
|
373d2c201c | ||
|
|
ec63b64b1f | ||
|
|
e6da9a6d68 | ||
|
|
4fac9708ec | ||
|
|
71d4bd62b2 | ||
|
|
3e96899ace | ||
|
|
51c590c6a6 | ||
|
|
e7d1452827 | ||
|
|
137e7a8cdd | ||
|
|
77f769b328 | ||
|
|
c85cb1377b | ||
|
|
f3362d6a2f | ||
|
|
043310f88a | ||
|
|
46f524706c | ||
|
|
7b7df3caba | ||
|
|
a47ff4d7a5 | ||
|
|
70fc3119e7 | ||
|
|
830be35c58 | ||
|
|
2fff39194f | ||
|
|
fffa377d2f | ||
|
|
a819e73388 | ||
|
|
0562965e69 | ||
|
|
7928823b96 |
No files matched your search
@@ -0,0 +1,29 @@
|
||||
Original source (Freespace 2) by Volition, Inc.; see "credits.tbl"
|
||||
|
||||
Modifications by the FreeSpace Source Code Project (FSSCP)
|
||||
http://fs2source.warpcore.org
|
||||
|
||||
FS2_OPEN STAFF:
|
||||
|
||||
Project leader:
|
||||
Edward "Inquisitor" Gardner
|
||||
|
||||
Programmers:
|
||||
"Bobboau"
|
||||
Dennis "DTP" Pedersen
|
||||
Ian "Goober5000" Warfield
|
||||
Joe "Righteous1" Dowd
|
||||
Mike "penguin" Harris
|
||||
"Mysterial"
|
||||
"PhReAk"
|
||||
Thomas "Random Tiger" Whittaker
|
||||
Will "Unknown PLayer" Rousnel
|
||||
"WMCoolmon"
|
||||
|
||||
Web support:
|
||||
Icefire and the staff at Volitionwatch.com
|
||||
Alex "Thunder" Avery and the staff at Hard Light Productions
|
||||
|
||||
Special thanks to:
|
||||
Volition for making FS2 such a great game
|
||||
Dave Baranec for giving us the code and keeping us sanity checked
|
||||
@@ -0,0 +1,13 @@
|
||||
Volition Copyright (applies to original FreeSpace2 source code
|
||||
developed and released by Volition):
|
||||
|
||||
"Copyright (C) Volition, Inc. 1999. All rights reserved.
|
||||
|
||||
All source code herein is the property of Volition, Inc. You may not
|
||||
sell or otherwise commercially exploit the source or things you
|
||||
created based on the source."
|
||||
|
||||
|
||||
Modifications by members of the FreeSpace Source Code Project are
|
||||
released under whatever terms the individual authors choose, but the
|
||||
above notice continues to apply to all fs2_open code.
|
||||
Binary file not shown.
@@ -43,7 +43,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /D "_MBCS" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENGL" /U "_DEBUG" /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /D "_MBCS" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENGL" /U "_DEBUG" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
This is still in pretty rough form.
|
||||
|
||||
|
||||
=== for people building fs2_open:
|
||||
|
||||
Win32-MSVC:
|
||||
Use the Freespace2.dsw workspace and build within the IDE.
|
||||
|
||||
|
||||
Win32-MinGW:
|
||||
make
|
||||
|
||||
|
||||
Linux and other unix variants (NOT YET COMPLETE)
|
||||
./configure [options] (options tbd)
|
||||
make -f makefile.linux
|
||||
|
||||
|
||||
|
||||
=== for the project maintainers (people who need to
|
||||
=== keep the makefiles up to date):
|
||||
|
||||
aclocal
|
||||
autoconf
|
||||
automake
|
||||
./configure
|
||||
make
|
||||
@@ -0,0 +1,5 @@
|
||||
# Makefile.am for fs2_open (top level)
|
||||
#
|
||||
# This file uses GNU Automake to generate makefiles
|
||||
|
||||
SUBDIRS = code
|
||||
@@ -0,0 +1,506 @@
|
||||
# Makefile.in generated by automake 1.7.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Makefile.am for fs2_open (top level)
|
||||
#
|
||||
# This file uses GNU Automake to generate makefiles
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DX8_INCLUDE = @DX8_INCLUDE@
|
||||
DX8_LIB = @DX8_LIB@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
FS2_GRSOFT_FALSE = @FS2_GRSOFT_FALSE@
|
||||
FS2_GRSOFT_TRUE = @FS2_GRSOFT_TRUE@
|
||||
FS2_JOYSTICK_FALSE = @FS2_JOYSTICK_FALSE@
|
||||
FS2_JOYSTICK_TRUE = @FS2_JOYSTICK_TRUE@
|
||||
FS2_NETWORKING_FALSE = @FS2_NETWORKING_FALSE@
|
||||
FS2_NETWORKING_TRUE = @FS2_NETWORKING_TRUE@
|
||||
FS2_OS_UNIX_FALSE = @FS2_OS_UNIX_FALSE@
|
||||
FS2_OS_UNIX_TRUE = @FS2_OS_UNIX_TRUE@
|
||||
FS2_OS_WIN32_FALSE = @FS2_OS_WIN32_FALSE@
|
||||
FS2_OS_WIN32_TRUE = @FS2_OS_WIN32_TRUE@
|
||||
FS2_SOUND_FALSE = @FS2_SOUND_FALSE@
|
||||
FS2_SOUND_TRUE = @FS2_SOUND_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
|
||||
SUBDIRS = code
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
|
||||
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
|
||||
ps-recursive install-info-recursive uninstall-info-recursive \
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive
|
||||
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
|
||||
Makefile.in NEWS aclocal.m4 config.guess config.sub configure \
|
||||
configure.in depcomp install-sh missing mkinstalldirs
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
|
||||
|
||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): configure.in
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
uninstall-info-am:
|
||||
|
||||
# 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.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_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 \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" \
|
||||
distdir=../$(distdir)/$$subdir \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
$(am__remove_distdir)
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
|
||||
&& rm -f $(distdir).tar.gz \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
distuninstallcheck:
|
||||
cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf autom4te.cache
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-recursive ctags ctags-recursive dist \
|
||||
dist-all dist-gzip distcheck distclean distclean-generic \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am dvi-recursive info info-am \
|
||||
info-recursive install install-am install-data install-data-am \
|
||||
install-data-recursive install-exec install-exec-am \
|
||||
install-exec-recursive install-info install-info-am \
|
||||
install-info-recursive install-man install-recursive \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am installdirs-recursive maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
|
||||
mostlyclean-generic mostlyclean-recursive pdf pdf-am \
|
||||
pdf-recursive ps ps-am ps-recursive tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-info-recursive uninstall-recursive
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,3 @@
|
||||
This file is required to keep autoconf/automake from complaining.
|
||||
|
||||
See the ChangeLog for what's new.
|
||||
@@ -0,0 +1,4 @@
|
||||
This file is required to keep autoconf/automake from complaining.
|
||||
|
||||
See the ChangeLog to see what's new.
|
||||
See the INSTALL file for instructions on how to build fs2_open.
|
||||
@@ -1,700 +0,0 @@
|
||||
TARGET = fs2
|
||||
|
||||
ifeq ($(USE_SOUND), 1)
|
||||
SOUND_DEF=
|
||||
SOUND_OBJS= \
|
||||
gamesnd/eventmusic.o \
|
||||
gamesnd/gamesnd.o \
|
||||
object/objectsnd.o \
|
||||
sound/acm.o \
|
||||
sound/audiostr.o \
|
||||
sound/ds.o \
|
||||
sound/ds3d.o \
|
||||
sound/dscap.o \
|
||||
sound/midifile.o \
|
||||
sound/rbaudio.o \
|
||||
sound/rtvoice.o \
|
||||
sound/sound.o \
|
||||
sound/winmidi.o \
|
||||
sound/winmidi_base.o \
|
||||
vcodec/codec1.o
|
||||
else
|
||||
SOUND_DEF=-DNO_SOUND
|
||||
SOUND_OBJS=
|
||||
endif # USE_SOUND
|
||||
|
||||
|
||||
ifeq ($(USE_JOYSTICK), 1)
|
||||
JOYSTICK_DEF=
|
||||
JOYSTICK_OBJS= \
|
||||
io/joy.o \
|
||||
io/joy_ff.o \
|
||||
io/swff_lib.o
|
||||
else
|
||||
JOYSTICK_DEF=-DNO_JOYSTICK
|
||||
JOYSTICK_OBJS=
|
||||
endif # USE_JOYSTICK
|
||||
|
||||
|
||||
ifeq ($(USE_NETWORK), 1)
|
||||
# no support for standalone server yet... (UI is Win32 specific)
|
||||
NETWORK_DEF=-DNO_STANDALONE
|
||||
NETWORK_OBJS= \
|
||||
hud/hudobserver.o \
|
||||
network/multi.o \
|
||||
network/multimsgs.o \
|
||||
network/multiteamselect.o \
|
||||
network/multiui.o \
|
||||
network/multiutil.o \
|
||||
network/multi_campaign.o \
|
||||
network/multi_data.o \
|
||||
network/multi_dogfight.o \
|
||||
network/multi_endgame.o \
|
||||
network/multi_ingame.o \
|
||||
network/multi_kick.o \
|
||||
network/multi_log.o \
|
||||
network/multi_obj.o \
|
||||
network/multi_observer.o \
|
||||
network/multi_options.o \
|
||||
network/multi_pause.o \
|
||||
network/multi_pinfo.o \
|
||||
network/multi_ping.o \
|
||||
network/multi_pmsg.o \
|
||||
network/multi_rate.o \
|
||||
network/multi_respawn.o \
|
||||
network/multi_team.o \
|
||||
network/multi_voice.o \
|
||||
network/multi_xfer.o \
|
||||
network/psnet.o \
|
||||
network/psnet2.o \
|
||||
menuui/optionsmenumulti.o \
|
||||
missionui/chatbox.o
|
||||
#
|
||||
# Network/stand_gui.o
|
||||
#
|
||||
else
|
||||
NETWORK_DEF=-DNO_NETWORK -DNO_STANDALONE
|
||||
NETWORK_OBJS=
|
||||
endif # USE_NETWORK
|
||||
|
||||
|
||||
ifeq ($(USE_OPENGL), 0)
|
||||
OPENGL_DEF=
|
||||
else
|
||||
OPENGL_DEF=-DUSE_OPENGL
|
||||
endif # USE_OPENGL
|
||||
|
||||
|
||||
LDFLAGS = -g
|
||||
LDLIBS = -L/usr/X11R6/lib -lSDL -lGL -lGLU -lpthread
|
||||
|
||||
CXXFLAGS = \
|
||||
-g \
|
||||
-I/usr/local/include/SDL \
|
||||
-I. \
|
||||
-fno-exceptions \
|
||||
-D_DEBUG -DNO_CD_CHECK -UNDEBUG \
|
||||
-DNO_DIRECT3D $(SOUND_DEF) $(JOYSTICK_DEF) $(NETWORK_DEF) $(OPENGL_DEF)
|
||||
|
||||
ANIM_OBJFILES = \
|
||||
anim/animplay.o \
|
||||
anim/packunpack.o
|
||||
|
||||
ASTEROID_OBJFILES = \
|
||||
asteroid/asteroid.o
|
||||
|
||||
BMPMAN_OBJFILES = \
|
||||
bmpman/bmpman.o
|
||||
|
||||
CFILE_OBJFILES = \
|
||||
cfile/cfile.o \
|
||||
cfile/cfilearchive.o \
|
||||
cfile/cfilelist.o \
|
||||
cfile/cfilesystem.o
|
||||
|
||||
CMDLINE_OBJFILES = \
|
||||
cmdline/cmdline.o
|
||||
|
||||
CMEASURE_OBJFILES = \
|
||||
cmeasure/cmeasure.o
|
||||
|
||||
CONTROLCONFIG_OBJFILES = \
|
||||
controlconfig/controlsconfig.o \
|
||||
controlconfig/controlsconfigcommon.o
|
||||
|
||||
CUTSCENE_OBJFILES = \
|
||||
cutscene/cutscenes.o
|
||||
|
||||
DEBRIS_OBJFILES = \
|
||||
debris/debris.o
|
||||
|
||||
DEBUGCONSOLE_OBJFILES = \
|
||||
debugconsole/console.o
|
||||
|
||||
DEMO_OBJFILES = \
|
||||
demo/demo.o
|
||||
|
||||
EXCEPTIONHANDLER_OBJFILES = \
|
||||
exceptionhandler/exceptionhandler.o
|
||||
|
||||
FIREBALL_OBJFILES = \
|
||||
fireball/fireballs.o \
|
||||
fireball/warpineffect.o
|
||||
|
||||
GAMEHELP_OBJFILES = \
|
||||
gamehelp/contexthelp.o \
|
||||
gamehelp/gameplayhelp.o
|
||||
|
||||
GAMESEQUENCE_OBJFILES = \
|
||||
gamesequence/gamesequence.o
|
||||
|
||||
# gamesnd/eventmusic.o
|
||||
# gamesnd/gamesnd.o
|
||||
GAMESND_OBJFILES =
|
||||
|
||||
# glide/glide.o
|
||||
GLIDE_OBJFILES =
|
||||
|
||||
# globalincs/windebug.o
|
||||
GLOBALINCS_OBJFILES = \
|
||||
globalincs/alphacolors.o \
|
||||
globalincs/crypt.o \
|
||||
globalincs/systemvars.o \
|
||||
globalincs/version.o
|
||||
|
||||
# graphics/grd3d.o
|
||||
# graphics/grd3drender.o
|
||||
# graphics/grd3dtexture.o
|
||||
# graphics/grdirectdraw.o
|
||||
# graphics/grglide.o
|
||||
# graphics/grglidetexture.o
|
||||
# graphics/grsoft.o
|
||||
# graphics/scaler.o
|
||||
# graphics/tmapgenericscans.o
|
||||
# graphics/tmapscantiled128x128.o
|
||||
# graphics/tmapscantiled16x16.o
|
||||
# graphics/tmapscantiled256x256.o
|
||||
# graphics/tmapscantiled32x32.o
|
||||
# graphics/tmapscantiled64x64.o
|
||||
# graphics/tmapscanline.o
|
||||
# graphics/tmapper.o
|
||||
GRAPHICS_OBJFILES = \
|
||||
graphics/2d.o \
|
||||
graphics/aaline.o \
|
||||
graphics/bitblt.o \
|
||||
graphics/circle.o \
|
||||
graphics/colors.o \
|
||||
graphics/font.o \
|
||||
graphics/gradient.o \
|
||||
graphics/gropengl.o \
|
||||
graphics/grzbuffer.o \
|
||||
graphics/line.o \
|
||||
graphics/pixel.o \
|
||||
graphics/rect.o \
|
||||
graphics/shade.o
|
||||
|
||||
# hud/hudobserver.o
|
||||
HUD_OBJFILES = \
|
||||
hud/hud.o \
|
||||
hud/hudartillery.o \
|
||||
hud/hudbrackets.o \
|
||||
hud/hudconfig.o \
|
||||
hud/hudescort.o \
|
||||
hud/hudets.o \
|
||||
hud/hudlock.o \
|
||||
hud/hudmessage.o \
|
||||
hud/hudreticle.o \
|
||||
hud/hudshield.o \
|
||||
hud/hudsquadmsg.o \
|
||||
hud/hudtarget.o \
|
||||
hud/hudtargetbox.o \
|
||||
hud/hudwingmanstatus.o
|
||||
|
||||
INETFILE_OBJFILES = \
|
||||
inetfile/cftp.o \
|
||||
inetfile/chttpget.o \
|
||||
inetfile/inetgetfile.o
|
||||
|
||||
# io/joy.o
|
||||
# io/joy_ff.o
|
||||
# io/swff_lib.o
|
||||
IO_OBJFILES = \
|
||||
io/key.o \
|
||||
io/keycontrol.o \
|
||||
io/mouse.o \
|
||||
io/timer.o \
|
||||
io/xmouse.o
|
||||
|
||||
JUMPNODE_OBJFILES = \
|
||||
jumpnode/jumpnode.o
|
||||
|
||||
LIGHTING_OBJFILES = \
|
||||
lighting/lighting.o
|
||||
|
||||
LOCALIZATION_OBJFILES = \
|
||||
localization/fhash.o \
|
||||
localization/localize.o
|
||||
|
||||
MATH_OBJFILES = \
|
||||
math/fix.o \
|
||||
math/floating.o \
|
||||
math/fvi.o \
|
||||
math/spline.o \
|
||||
math/staticrand.o \
|
||||
math/vecmat.o
|
||||
|
||||
# menuui/optionsmenumulti.o
|
||||
MENUUI_OBJFILES = \
|
||||
menuui/barracks.o \
|
||||
menuui/credits.o \
|
||||
menuui/fishtank.o \
|
||||
menuui/mainhallmenu.o \
|
||||
menuui/mainhalltemp.o \
|
||||
menuui/optionsmenu.o \
|
||||
menuui/playermenu.o \
|
||||
menuui/readyroom.o \
|
||||
menuui/snazzyui.o \
|
||||
menuui/techmenu.o \
|
||||
menuui/trainingmenu.o
|
||||
|
||||
MISSION_OBJFILES = \
|
||||
mission/missionbriefcommon.o \
|
||||
mission/missioncampaign.o \
|
||||
mission/missiongoals.o \
|
||||
mission/missiongrid.o \
|
||||
mission/missionhotkey.o \
|
||||
mission/missionload.o \
|
||||
mission/missionlog.o \
|
||||
mission/missionmessage.o \
|
||||
mission/missionparse.o \
|
||||
mission/missiontraining.o
|
||||
|
||||
# missionui/chatbox.o
|
||||
MISSIONUI_OBJFILES = \
|
||||
missionui/missionbrief.o \
|
||||
missionui/missioncmdbrief.o \
|
||||
missionui/missiondebrief.o \
|
||||
missionui/missionloopbrief.o \
|
||||
missionui/missionpause.o \
|
||||
missionui/missionrecommend.o \
|
||||
missionui/missionscreencommon.o \
|
||||
missionui/missionshipchoice.o \
|
||||
missionui/missionstats.o \
|
||||
missionui/missionweaponchoice.o \
|
||||
missionui/redalert.o
|
||||
|
||||
MODEL_OBJFILES = \
|
||||
model/modelcollide.o \
|
||||
model/modelinterp.o \
|
||||
model/modeloctant.o \
|
||||
model/modelread.o
|
||||
|
||||
NEBULA_OBJFILES = \
|
||||
nebula/neb.o \
|
||||
nebula/neblightning.o
|
||||
|
||||
# network/multi.o
|
||||
# network/multi_campaign.o
|
||||
# network/multi_data.o
|
||||
# network/multi_dogfight.o
|
||||
# network/multi_endgame.o
|
||||
# network/multi_ingame.o
|
||||
# network/multi_kick.o
|
||||
# network/multi_log.o
|
||||
# network/multimsgs.o
|
||||
# network/multi_obj.o
|
||||
# network/multi_observer.o
|
||||
# network/multi_oo.o
|
||||
# network/multi_options.o
|
||||
# network/multi_pause.o
|
||||
# network/multi_pinfo.o
|
||||
# network/multi_ping.o
|
||||
# network/multi_pmsg.o
|
||||
# network/multi_rate.o
|
||||
# network/multi_respawn.o
|
||||
# network/multi_team.o
|
||||
# network/multi_update.o
|
||||
# network/multi_voice.o
|
||||
# network/multi_xfer.o
|
||||
# network/multilag.o
|
||||
# network/multiteamselect.o
|
||||
# network/multiui.o
|
||||
# network/psnet.o
|
||||
# network/psnet2.o
|
||||
# network/stand_gui.o
|
||||
NETWORK_OBJFILES = \
|
||||
network/multiutil.o
|
||||
|
||||
# object/objectsnd.o
|
||||
OBJECT_OBJFILES = \
|
||||
object/collidedebrisship.o \
|
||||
object/collidedebrisweapon.o \
|
||||
object/collideshipship.o \
|
||||
object/collideshipweapon.o \
|
||||
object/collideweaponweapon.o \
|
||||
object/objcollide.o \
|
||||
object/object.o \
|
||||
object/objectsort.o
|
||||
|
||||
OBSERVER_OBJFILES = \
|
||||
observer/observer.o
|
||||
|
||||
OSAPI_OBJFILES = \
|
||||
osapi/osapi_unix.o \
|
||||
osapi/osregistry_unix.o \
|
||||
osapi/outwnd_unix.o
|
||||
|
||||
PALMAN_OBJFILES = \
|
||||
palman/palman.o
|
||||
|
||||
PARSE_OBJFILES = \
|
||||
parse/encrypt.o \
|
||||
parse/parselo.o \
|
||||
parse/sexp.o
|
||||
|
||||
PARTICLE_OBJFILES = \
|
||||
particle/particle.o
|
||||
|
||||
PCXUTILS_OBJFILES = \
|
||||
pcxutils/pcxutils.o
|
||||
|
||||
PHYSICS_OBJFILES = \
|
||||
physics/physics.o
|
||||
|
||||
PLAYERMAN_OBJFILES = \
|
||||
playerman/managepilot.o \
|
||||
playerman/playercontrol.o
|
||||
|
||||
POPUP_OBJFILES = \
|
||||
popup/popup.o \
|
||||
popup/popupdead.o
|
||||
|
||||
RADAR_OBJFILES = \
|
||||
radar/radar.o
|
||||
|
||||
RENDER_OBJFILES = \
|
||||
render/3dclipper.o \
|
||||
render/3ddraw.o \
|
||||
render/3dlaser.o \
|
||||
render/3dmath.o \
|
||||
render/3dsetup.o
|
||||
|
||||
SHIP_OBJFILES = \
|
||||
ship/afterburner.o \
|
||||
ship/ai.o \
|
||||
ship/aibig.o \
|
||||
ship/aicode.o \
|
||||
ship/aigoals.o \
|
||||
ship/awacs.o \
|
||||
ship/shield.o \
|
||||
ship/ship.o \
|
||||
ship/shipcontrails.o \
|
||||
ship/shipfx.o \
|
||||
ship/shiphit.o
|
||||
|
||||
SOUND_OBJFILES = \
|
||||
sound/acm.o \
|
||||
sound/audiostr.o \
|
||||
sound/ds.o \
|
||||
sound/ds3d.o \
|
||||
sound/dscap.o \
|
||||
sound/midifile.o \
|
||||
sound/rbaudio.o \
|
||||
sound/rtvoice.o \
|
||||
sound/sound.o \
|
||||
sound/winmidi.o \
|
||||
sound/winmidi_base.o
|
||||
|
||||
STARFIELD_OBJFILES = \
|
||||
starfield/nebula.o \
|
||||
starfield/starfield.o \
|
||||
starfield/supernova.o
|
||||
|
||||
STATS_OBJFILES = \
|
||||
stats/medals.o \
|
||||
stats/scoring.o \
|
||||
stats/stats.o
|
||||
|
||||
TGAUTILS_OBJFILES = \
|
||||
tgautils/tgautils.o
|
||||
|
||||
UI_OBJFILES = \
|
||||
ui/button.o \
|
||||
ui/checkbox.o \
|
||||
ui/gadget.o \
|
||||
ui/icon.o \
|
||||
ui/inputbox.o \
|
||||
ui/keytrap.o \
|
||||
ui/listbox.o \
|
||||
ui/radio.o \
|
||||
ui/scroll.o \
|
||||
ui/slider.o \
|
||||
ui/slider2.o \
|
||||
ui/uidraw.o \
|
||||
ui/uimouse.o \
|
||||
ui/window.o
|
||||
|
||||
VCODEC_OBJFILES = \
|
||||
vcodec/codec1.o
|
||||
|
||||
WEAPON_OBJFILES = \
|
||||
weapon/beam.o \
|
||||
weapon/corkscrew.o \
|
||||
weapon/emp.o \
|
||||
weapon/flak.o \
|
||||
weapon/muzzleflash.o \
|
||||
weapon/shockwave.o \
|
||||
weapon/swarm.o \
|
||||
weapon/trails.o \
|
||||
weapon/weapons.o
|
||||
|
||||
# SOUND_OBJFILES
|
||||
# INETFILE_OBJFILES
|
||||
# EXCEPTIONHANDLER_OBJFILES
|
||||
OBJFILES = \
|
||||
ANIM_OBJFILES \
|
||||
ASTEROID_OBJFILES \
|
||||
BMPMAN_OBJFILES \
|
||||
CFILE_OBJFILES \
|
||||
CMDLINE_OBJFILES \
|
||||
CMEASURE_OBJFILES \
|
||||
CONTROLCONFIG_OBJFILES \
|
||||
CUTSCENE_OBJFILES \
|
||||
DEBRIS_OBJFILES \
|
||||
DEBUGCONSOLE_OBJFILES \
|
||||
FIREBALL_OBJFILES \
|
||||
GAMEHELP_OBJFILES \
|
||||
GAMESEQUENCE_OBJFILES \
|
||||
GAMESND_OBJFILES \
|
||||
GLIDE_OBJFILES \
|
||||
GLOBALINCS_OBJFILES \
|
||||
GRAPHICS_OBJFILES \
|
||||
HUD_OBJFILES \
|
||||
IO_OBJFILES \
|
||||
JUMPNODE_OBJFILES \
|
||||
LIGHTING_OBJFILES \
|
||||
MATH_OBJFILES \
|
||||
MENUUI_OBJFILES \
|
||||
MISSION_OBJFILES \
|
||||
MISSIONUI_OBJFILES \
|
||||
MODEL_OBJFILES \
|
||||
NETWORK_OBJFILES \
|
||||
OBJECT_OBJFILES \
|
||||
OBSERVER_OBJFILES \
|
||||
OSAPI_OBJFILES \
|
||||
PALMAN_OBJFILES \
|
||||
PARSE_OBJFILES \
|
||||
PARTICLE_OBJFILES \
|
||||
PCXUTILS_OBJFILES \
|
||||
PHYSICS_OBJFILES \
|
||||
PLAYERMAN_OBJFILES \
|
||||
POPUP_OBJFILES \
|
||||
RADAR_OBJFILES \
|
||||
RENDER_OBJFILES \
|
||||
SHIP_OBJFILES \
|
||||
STARFIELD_OBJFILES \
|
||||
STATS_OBJFILES \
|
||||
UI_OBJFILES \
|
||||
VCODEC_OBJFILES \
|
||||
WEAPON_OBJFILES \
|
||||
NEBULA_OBJFILES \
|
||||
LOCALIZATION_OBJFILES \
|
||||
TGAUTILS_OBJFILES \
|
||||
DEMO_OBJFILES
|
||||
|
||||
# SOUND_OBJFILES
|
||||
# INETFILE_OBJFILES
|
||||
# EXCEPTIONHANDLER_OBJFILES
|
||||
LIB_OBJFILES = \
|
||||
$(ANIM_OBJFILES) \
|
||||
$(ASTEROID_OBJFILES) \
|
||||
$(BMPMAN_OBJFILES) \
|
||||
$(CFILE_OBJFILES) \
|
||||
$(CMDLINE_OBJFILES) \
|
||||
$(CMEASURE_OBJFILES) \
|
||||
$(CONTROLCONFIG_OBJFILES) \
|
||||
$(CUTSCENE_OBJFILES) \
|
||||
$(DEBRIS_OBJFILES) \
|
||||
$(DEBUGCONSOLE_OBJFILES) \
|
||||
$(FIREBALL_OBJFILES) \
|
||||
$(GAMEHELP_OBJFILES) \
|
||||
$(GAMESEQUENCE_OBJFILES) \
|
||||
$(GAMESND_OBJFILES) \
|
||||
$(GLIDE_OBJFILES) \
|
||||
$(GLOBALINCS_OBJFILES) \
|
||||
$(GRAPHICS_OBJFILES) \
|
||||
$(HUD_OBJFILES) \
|
||||
$(IO_OBJFILES) \
|
||||
$(JUMPNODE_OBJFILES) \
|
||||
$(LIGHTING_OBJFILES) \
|
||||
$(MATH_OBJFILES) \
|
||||
$(MENUUI_OBJFILES) \
|
||||
$(MISSION_OBJFILES) \
|
||||
$(MISSIONUI_OBJFILES) \
|
||||
$(MODEL_OBJFILES) \
|
||||
$(NETWORK_OBJFILES) \
|
||||
$(OBJECT_OBJFILES) \
|
||||
$(OBSERVER_OBJFILES) \
|
||||
$(OSAPI_OBJFILES) \
|
||||
$(PALMAN_OBJFILES) \
|
||||
$(PARSE_OBJFILES) \
|
||||
$(PARTICLE_OBJFILES) \
|
||||
$(PCXUTILS_OBJFILES) \
|
||||
$(PHYSICS_OBJFILES) \
|
||||
$(PLAYERMAN_OBJFILES) \
|
||||
$(POPUP_OBJFILES) \
|
||||
$(RADAR_OBJFILES) \
|
||||
$(RENDER_OBJFILES) \
|
||||
$(SHIP_OBJFILES) \
|
||||
$(STARFIELD_OBJFILES) \
|
||||
$(STATS_OBJFILES) \
|
||||
$(UI_OBJFILES) \
|
||||
$(VCODEC_OBJFILES) \
|
||||
$(WEAPON_OBJFILES) \
|
||||
$(NEBULA_OBJFILES) \
|
||||
$(LOCALIZATION_OBJFILES) \
|
||||
$(TGAUTILS_OBJFILES) \
|
||||
$(DEMO_OBJFILES) \
|
||||
$(SOUND_OBJS) \
|
||||
$(JOYSTICK_OBJS) \
|
||||
$(NETWORK_OBJS)
|
||||
|
||||
FREESPACE2_OBJFILES = \
|
||||
freespace2/freespace.o \
|
||||
freespace2/levelpaging.o
|
||||
|
||||
STUB_OBJFILES = \
|
||||
windows_stub/stubs.o
|
||||
|
||||
# ==============================
|
||||
.PHONY: all clean code \
|
||||
ANIM_OBJFILES \
|
||||
ASTEROID_OBJFILES \
|
||||
BMPMAN_OBJFILES \
|
||||
CMDLINE_OBJFILES \
|
||||
CMEASURE_OBJFILES \
|
||||
CONTROLCONFIG_OBJFILES \
|
||||
CUTSCENE_OBJFILES \
|
||||
DEBRIS_OBJFILES \
|
||||
DEBUGCONSOLE_OBJFILES \
|
||||
FIREBALL_OBJFILES \
|
||||
GAMEHELP_OBJFILES \
|
||||
GAMESEQUENCE_OBJFILES \
|
||||
GAMESND_OBJFILES \
|
||||
GLIDE_OBJFILES \
|
||||
GLOBALINCS_OBJFILES \
|
||||
GRAPHICS_OBJFILES \
|
||||
HUD_OBJFILES \
|
||||
IO_OBJFILES \
|
||||
JUMPNODE_OBJFILES \
|
||||
LIGHTING_OBJFILES \
|
||||
MATH_OBJFILES \
|
||||
MENUUI_OBJFILES \
|
||||
MISSION_OBJFILES \
|
||||
MISSIONUI_OBJFILES \
|
||||
MODEL_OBJFILES \
|
||||
OBJECT_OBJFILES \
|
||||
OBSERVER_OBJFILES \
|
||||
OSAPI_OBJFILES \
|
||||
PALMAN_OBJFILES \
|
||||
PARSE_OBJFILES \
|
||||
PARTICLE_OBJFILES \
|
||||
PCXUTILS_OBJFILES \
|
||||
PHYSICS_OBJFILES \
|
||||
PLAYERMAN_OBJFILES \
|
||||
POPUP_OBJFILES \
|
||||
RADAR_OBJFILES \
|
||||
RENDER_OBJFILES \
|
||||
SHIP_OBJFILES \
|
||||
SOUND_OBJFILES \
|
||||
STARFIELD_OBJFILES \
|
||||
STATS_OBJFILES \
|
||||
UI_OBJFILES \
|
||||
VCODEC_OBJFILES \
|
||||
WEAPON_OBJFILES \
|
||||
NEBULA_OBJFILES \
|
||||
LOCALIZATION_OBJFILES \
|
||||
TGAUTILS_OBJFILES \
|
||||
DEMO_OBJFILES \
|
||||
INETFILE_OBJFILES \
|
||||
EXCEPTIONHANDLER_OBJFILES \
|
||||
NETWORK_OBJFILES
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) libcode.a core *.o *~
|
||||
find -name *.o -exec rm {} \;
|
||||
find -name *~ -exec rm {} \;
|
||||
|
||||
code: libcode.a
|
||||
|
||||
|
||||
# ==============================
|
||||
libcode.a: $(LIB_OBJFILES)
|
||||
$(AR) -r $@ $(LIB_OBJFILES)
|
||||
# $(CXX) -o $@ $(LIB_OBJFILES)
|
||||
|
||||
fs2: libcode.a $(FREESPACE2_OBJFILES) $(STUB_OBJFILES)
|
||||
$(CXX) $(LDFLAGS) -o $@ $(FREESPACE2_OBJFILES) $(STUB_OBJFILES) $(LDLIBS) -L. -lcode
|
||||
|
||||
|
||||
# exceptions to the rule...
|
||||
freespace2/freespace.o: freespace2/freespace.cpp
|
||||
$(CXX) $(CXXFLAGS) -fexceptions -c -o $@ $<
|
||||
|
||||
ANIM_OBJFILES: $(ANIM_OBJFILES)
|
||||
ASTEROID_OBJFILES: $(ASTEROID_OBJFILES)
|
||||
BMPMAN_OBJFILES: $(BMPMAN_OBJFILES)
|
||||
CMDLINE_OBJFILES: $(CMDLINE_OBJFILES)
|
||||
CMEASURE_OBJFILES: $(CMEASURE_OBJFILES)
|
||||
CONTROLCONFIG_OBJFILES: $(CONTROLCONFIG_OBJFILES)
|
||||
CUTSCENE_OBJFILES: $(CUTSCENE_OBJFILES)
|
||||
DEBRIS_OBJFILES: $(DEBRIS_OBJFILES)
|
||||
DEBUGCONSOLE_OBJFILES: $(DEBUGCONSOLE_OBJFILES)
|
||||
FIREBALL_OBJFILES: $(FIREBALL_OBJFILES)
|
||||
GAMEHELP_OBJFILES: $(GAMEHELP_OBJFILES)
|
||||
GAMESEQUENCE_OBJFILES: $(GAMESEQUENCE_OBJFILES)
|
||||
GAMESND_OBJFILES: $(GAMESND_OBJFILES)
|
||||
GLIDE_OBJFILES: $(GLIDE_OBJFILES)
|
||||
GLOBALINCS_OBJFILES: $(GLOBALINCS_OBJFILES)
|
||||
GRAPHICS_OBJFILES: $(GRAPHICS_OBJFILES)
|
||||
HUD_OBJFILES: $(HUD_OBJFILES)
|
||||
IO_OBJFILES: $(IO_OBJFILES)
|
||||
JUMPNODE_OBJFILES: $(JUMPNODE_OBJFILES)
|
||||
LIGHTING_OBJFILES: $(LIGHTING_OBJFILES)
|
||||
MATH_OBJFILES: $(MATH_OBJFILES)
|
||||
MENUUI_OBJFILES: $(MENUUI_OBJFILES)
|
||||
MISSION_OBJFILES: $(MISSION_OBJFILES)
|
||||
MISSIONUI_OBJFILES: $(MISSIONUI_OBJFILES)
|
||||
MODEL_OBJFILES: $(MODEL_OBJFILES)
|
||||
OBJECT_OBJFILES: $(OBJECT_OBJFILES)
|
||||
OBSERVER_OBJFILES: $(OBSERVER_OBJFILES)
|
||||
OSAPI_OBJFILES: $(OSAPI_OBJFILES)
|
||||
PALMAN_OBJFILES: $(PALMAN_OBJFILES)
|
||||
PARSE_OBJFILES: $(PARSE_OBJFILES)
|
||||
PARTICLE_OBJFILES: $(PARTICLE_OBJFILES)
|
||||
PCXUTILS_OBJFILES: $(PCXUTILS_OBJFILES)
|
||||
PHYSICS_OBJFILES: $(PHYSICS_OBJFILES)
|
||||
PLAYERMAN_OBJFILES: $(PLAYERMAN_OBJFILES)
|
||||
POPUP_OBJFILES: $(POPUP_OBJFILES)
|
||||
RADAR_OBJFILES: $(RADAR_OBJFILES)
|
||||
RENDER_OBJFILES: $(RENDER_OBJFILES)
|
||||
SHIP_OBJFILES: $(SHIP_OBJFILES)
|
||||
SOUND_OBJFILES: $(SOUND_OBJFILES)
|
||||
STARFIELD_OBJFILES: $(STARFIELD_OBJFILES)
|
||||
STATS_OBJFILES: $(STATS_OBJFILES)
|
||||
UI_OBJFILES: $(UI_OBJFILES)
|
||||
VCODEC_OBJFILES: $(VCODEC_OBJFILES)
|
||||
WEAPON_OBJFILES: $(WEAPON_OBJFILES)
|
||||
NEBULA_OBJFILES: $(NEBULA_OBJFILES)
|
||||
LOCALIZATION_OBJFILES: $(LOCALIZATION_OBJFILES)
|
||||
TGAUTILS_OBJFILES: $(TGAUTILS_OBJFILES)
|
||||
DEMO_OBJFILES: $(DEMO_OBJFILES)
|
||||
INETFILE_OBJFILES: $(INETFILE_OBJFILES)
|
||||
EXCEPTIONHANDLER_OBJFILES: $(EXCEPTIONHANDLER_OBJFILES)
|
||||
NETWORK_OBJFILES: $(NETWORK_OBJFILES)
|
||||
@@ -0,0 +1,305 @@
|
||||
# code/Makefile.am for fs2_open
|
||||
#
|
||||
# $Id: Makefile.am,v 1.2 2003-03-11 19:00:05 penguin Exp $
|
||||
|
||||
noinst_PROGRAMS = fs2
|
||||
|
||||
fs2_SOURCES = \
|
||||
anim/animplay.cpp \
|
||||
anim/packunpack.cpp \
|
||||
asteroid/asteroid.cpp \
|
||||
bmpman/bmpman.cpp \
|
||||
cfile/cfile.cpp \
|
||||
cfile/cfilearchive.cpp \
|
||||
cfile/cfilelist.cpp \
|
||||
cfile/cfilesystem.cpp \
|
||||
cmdline/cmdline.cpp \
|
||||
cmeasure/cmeasure.cpp \
|
||||
controlconfig/controlsconfig.cpp \
|
||||
controlconfig/controlsconfigcommon.cpp \
|
||||
cutscene/cutscenes.cpp \
|
||||
debris/debris.cpp \
|
||||
debugconsole/console.cpp \
|
||||
decals/decals.cpp \
|
||||
demo/demo.cpp \
|
||||
exceptionhandler/exceptionhandler.cpp \
|
||||
fireball/fireballs.cpp \
|
||||
fireball/warpineffect.cpp \
|
||||
freespace2/freespace.cpp \
|
||||
freespace2/levelpaging.cpp \
|
||||
gamehelp/contexthelp.cpp \
|
||||
gamehelp/gameplayhelp.cpp \
|
||||
gamesequence/gamesequence.cpp \
|
||||
globalincs/alphacolors.cpp \
|
||||
globalincs/crypt.cpp \
|
||||
globalincs/systemvars.cpp \
|
||||
globalincs/version.cpp \
|
||||
graphics/2d.cpp \
|
||||
graphics/aaline.cpp \
|
||||
graphics/bitblt.cpp \
|
||||
graphics/circle.cpp \
|
||||
graphics/colors.cpp \
|
||||
graphics/font.cpp \
|
||||
graphics/gradient.cpp \
|
||||
graphics/gropengl.cpp \
|
||||
graphics/grzbuffer.cpp \
|
||||
graphics/line.cpp \
|
||||
graphics/pixel.cpp \
|
||||
graphics/rect.cpp \
|
||||
graphics/scaler.cpp \
|
||||
graphics/shade.cpp \
|
||||
hud/hud.cpp \
|
||||
hud/hudartillery.cpp \
|
||||
hud/hudbrackets.cpp \
|
||||
hud/hudconfig.cpp \
|
||||
hud/hudescort.cpp \
|
||||
hud/hudets.cpp \
|
||||
hud/hudlock.cpp \
|
||||
hud/hudmessage.cpp \
|
||||
hud/hudreticle.cpp \
|
||||
hud/hudshield.cpp \
|
||||
hud/hudsquadmsg.cpp \
|
||||
hud/hudtarget.cpp \
|
||||
hud/hudtargetbox.cpp \
|
||||
hud/hudwingmanstatus.cpp \
|
||||
io/key.cpp \
|
||||
io/keycontrol.cpp \
|
||||
io/mouse.cpp \
|
||||
io/timer.cpp \
|
||||
jumpnode/jumpnode.cpp \
|
||||
lighting/lighting.cpp \
|
||||
localization/fhash.cpp \
|
||||
localization/localize.cpp \
|
||||
math/fix.cpp \
|
||||
math/floating.cpp \
|
||||
math/fvi.cpp \
|
||||
math/spline.cpp \
|
||||
math/staticrand.cpp \
|
||||
math/vecmat.cpp \
|
||||
menuui/barracks.cpp \
|
||||
menuui/credits.cpp \
|
||||
menuui/fishtank.cpp \
|
||||
menuui/mainhallmenu.cpp \
|
||||
menuui/mainhalltemp.cpp \
|
||||
menuui/optionsmenu.cpp \
|
||||
menuui/playermenu.cpp \
|
||||
menuui/readyroom.cpp \
|
||||
menuui/snazzyui.cpp \
|
||||
menuui/techmenu.cpp \
|
||||
menuui/trainingmenu.cpp \
|
||||
mission/missionbriefcommon.cpp \
|
||||
mission/missioncampaign.cpp \
|
||||
mission/missiongoals.cpp \
|
||||
mission/missiongrid.cpp \
|
||||
mission/missionhotkey.cpp \
|
||||
mission/missionload.cpp \
|
||||
mission/missionlog.cpp \
|
||||
mission/missionmessage.cpp \
|
||||
mission/missionparse.cpp \
|
||||
mission/missiontraining.cpp \
|
||||
missionui/missionbrief.cpp \
|
||||
missionui/missioncmdbrief.cpp \
|
||||
missionui/missiondebrief.cpp \
|
||||
missionui/missionloopbrief.cpp \
|
||||
missionui/missionpause.cpp \
|
||||
missionui/missionrecommend.cpp \
|
||||
missionui/missionscreencommon.cpp \
|
||||
missionui/missionshipchoice.cpp \
|
||||
missionui/missionstats.cpp \
|
||||
missionui/missionweaponchoice.cpp \
|
||||
missionui/redalert.cpp \
|
||||
model/modelcollide.cpp \
|
||||
model/modelinterp.cpp \
|
||||
model/modeloctant.cpp \
|
||||
model/modelread.cpp \
|
||||
nebula/neb.cpp \
|
||||
nebula/neblightning.cpp \
|
||||
object/collidedebrisship.cpp \
|
||||
object/collidedebrisweapon.cpp \
|
||||
object/collideshipship.cpp \
|
||||
object/collideshipweapon.cpp \
|
||||
object/collideweaponweapon.cpp \
|
||||
object/objcollide.cpp \
|
||||
object/object.cpp \
|
||||
object/objectsort.cpp \
|
||||
observer/observer.cpp \
|
||||
palman/palman.cpp \
|
||||
parse/encrypt.cpp \
|
||||
parse/parselo.cpp \
|
||||
parse/sexp.cpp \
|
||||
particle/particle.cpp \
|
||||
pcxutils/pcxutils.cpp \
|
||||
physics/physics.cpp \
|
||||
playerman/managepilot.cpp \
|
||||
playerman/playercontrol.cpp \
|
||||
popup/popup.cpp \
|
||||
popup/popupdead.cpp \
|
||||
radar/radar.cpp \
|
||||
render/3dclipper.cpp \
|
||||
render/3ddraw.cpp \
|
||||
render/3dlaser.cpp \
|
||||
render/3dmath.cpp \
|
||||
render/3dsetup.cpp \
|
||||
ship/afterburner.cpp \
|
||||
ship/ai.cpp \
|
||||
ship/aibig.cpp \
|
||||
ship/aicode.cpp \
|
||||
ship/aigoals.cpp \
|
||||
ship/awacs.cpp \
|
||||
ship/shield.cpp \
|
||||
ship/ship.cpp \
|
||||
ship/shipcontrails.cpp \
|
||||
ship/shipfx.cpp \
|
||||
ship/shiphit.cpp \
|
||||
starfield/nebula.cpp \
|
||||
starfield/starfield.cpp \
|
||||
starfield/supernova.cpp \
|
||||
stats/medals.cpp \
|
||||
stats/scoring.cpp \
|
||||
stats/stats.cpp \
|
||||
tgautils/tgautils.cpp \
|
||||
ui/button.cpp \
|
||||
ui/checkbox.cpp \
|
||||
ui/gadget.cpp \
|
||||
ui/icon.cpp \
|
||||
ui/inputbox.cpp \
|
||||
ui/keytrap.cpp \
|
||||
ui/listbox.cpp \
|
||||
ui/radio.cpp \
|
||||
ui/scroll.cpp \
|
||||
ui/slider.cpp \
|
||||
ui/slider2.cpp \
|
||||
ui/uidraw.cpp \
|
||||
ui/uimouse.cpp \
|
||||
ui/window.cpp \
|
||||
weapon/beam.cpp \
|
||||
weapon/corkscrew.cpp \
|
||||
weapon/emp.cpp \
|
||||
weapon/flak.cpp \
|
||||
weapon/muzzleflash.cpp \
|
||||
weapon/shockwave.cpp \
|
||||
weapon/swarm.cpp \
|
||||
weapon/trails.cpp \
|
||||
weapon/weapons.cpp
|
||||
|
||||
|
||||
## conditional includes follow:
|
||||
|
||||
## joystic support sources
|
||||
if FS2_JOYSTICK
|
||||
fs2_SOURCES += \
|
||||
io/joy.cpp \
|
||||
io/joy_ff.cpp \
|
||||
io/swff_lib.cpp
|
||||
endif # FS2_JOYSTICK
|
||||
|
||||
## networking support sources
|
||||
if FS2_NETWORKING
|
||||
fs2_SOURCES += \
|
||||
hud/hudobserver.cpp \
|
||||
network/multi.cpp \
|
||||
network/multimsgs.cpp \
|
||||
network/multiteamselect.cpp \
|
||||
network/multiui.cpp \
|
||||
network/multiutil.cpp \
|
||||
network/multi_campaign.cpp \
|
||||
network/multi_data.cpp \
|
||||
network/multi_dogfight.cpp \
|
||||
network/multi_endgame.cpp \
|
||||
network/multi_ingame.cpp \
|
||||
network/multi_kick.cpp \
|
||||
network/multi_log.cpp \
|
||||
network/multi_obj.cpp \
|
||||
network/multi_observer.cpp \
|
||||
network/multi_options.cpp \
|
||||
network/multi_pause.cpp \
|
||||
network/multi_pinfo.cpp \
|
||||
network/multi_ping.cpp \
|
||||
network/multi_pmsg.cpp \
|
||||
network/multi_rate.cpp \
|
||||
network/multi_respawn.cpp \
|
||||
network/multi_team.cpp \
|
||||
network/multi_voice.cpp \
|
||||
network/multi_xfer.cpp \
|
||||
network/psnet.cpp \
|
||||
network/psnet2.cpp \
|
||||
menuui/optionsmenumulti.cpp \
|
||||
missionui/chatbox.cpp
|
||||
endif # FS2_NETWORKING
|
||||
|
||||
## sound support sources
|
||||
if FS2_SOUND
|
||||
fs2_SOURCES += \
|
||||
gamesnd/eventmusic.cpp \
|
||||
gamesnd/gamesnd.cpp \
|
||||
object/objectsnd.cpp \
|
||||
sound/acm.cpp \
|
||||
sound/audiostr.cpp \
|
||||
sound/ds.cpp \
|
||||
sound/ds3d.cpp \
|
||||
sound/dscap.cpp \
|
||||
sound/midifile.cpp \
|
||||
sound/rbaudio.cpp \
|
||||
sound/rtvoice.cpp \
|
||||
sound/sound.cpp \
|
||||
sound/winmidi.cpp \
|
||||
sound/winmidi_base.cpp \
|
||||
vcodec/codec1.cpp
|
||||
endif # FS2_SOUND
|
||||
|
||||
## software-rendering support sources
|
||||
if FS2_GRSOFT
|
||||
fs2_SOURCES += \
|
||||
graphics/grsoft.cpp \
|
||||
graphics/tmapper.cpp
|
||||
endif # FS2_GRSOFT
|
||||
|
||||
## Win32-specific sources
|
||||
if FS2_OS_WIN32
|
||||
fs2_SOURCES += \
|
||||
cutscene/movie.cpp \
|
||||
directx/dx8show.cpp \
|
||||
ddsutils/ddsutils.cpp \
|
||||
globalincs/windebug.cpp \
|
||||
glide/glide.cpp \
|
||||
graphics/grd3d.cpp \
|
||||
graphics/grd3drender.cpp \
|
||||
graphics/grd3dtexture.cpp \
|
||||
graphics/grdirectdraw.cpp \
|
||||
graphics/grglide.cpp \
|
||||
graphics/grglidetexture.cpp \
|
||||
network/stand_gui.cpp \
|
||||
osapi/osapi.cpp \
|
||||
osapi/osregistry.cpp \
|
||||
osapi/outwnd.cpp
|
||||
endif # FS2_OS_WIN32
|
||||
|
||||
## Unix-specific sources
|
||||
if FS2_OS_UNIX
|
||||
fs2_SOURCES += \
|
||||
io/xmouse.cpp \
|
||||
osapi/osapi_unix.cpp \
|
||||
osapi/osregistry_unix.cpp \
|
||||
osapi/outwnd_unix.cpp
|
||||
endif # FS2_OS_UNIX
|
||||
|
||||
|
||||
## compiler flags
|
||||
# INCLUDES = -I.
|
||||
AM_CXXFLAGS = -fno-exceptions @DX8_INCLUDE@
|
||||
AM_LDFLAGS = -L/c/dx8/lib @DX8_LIB@
|
||||
|
||||
LDADD =
|
||||
|
||||
if FS2_OS_WIN32
|
||||
## Win32 libraries needed
|
||||
LDADD += \
|
||||
-lgdi32 -lole32 -lwsock32 -lwinmm -lmsacm32 -lopengl32 \
|
||||
-lcomctl32 -lstrmiids -ldxguid -lddraw -ldinput
|
||||
endif
|
||||
|
||||
|
||||
if FS2_OS_UNIX
|
||||
## Unix libraries needed
|
||||
## -- TODO --
|
||||
endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -41,7 +41,7 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "..\Release\Profile"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /Ob2 /I "." /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENGL" /U "_DEBUG" /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /Ob2 /I "." /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENGL" /U "_DEBUG" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "cmdline/cmdline.h"
|
||||
#include "graphics/2d.h"
|
||||
#include "debugconsole/dbugfile.h"
|
||||
#include "graphics/gropengl.h"
|
||||
|
||||
bool movie_shutdown_fgx = false;
|
||||
|
||||
@@ -41,7 +42,14 @@ bool movie_play(char *name, int unknown_value)
|
||||
gr_activate(0);
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
if (gr_screen.mode==GR_OPENGL)
|
||||
{
|
||||
gr_opengl_cleanup(0);
|
||||
}
|
||||
|
||||
os_app_activate_set(false);
|
||||
|
||||
dx8show_set_hwnd((void *) os_get_window());
|
||||
@@ -69,8 +77,13 @@ bool movie_play(char *name, int unknown_value)
|
||||
}
|
||||
*/
|
||||
|
||||
if (gr_screen.mode==GR_OPENGL)
|
||||
{
|
||||
gr_opengl_init(1);
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
if(movie_shutdown_fgx == true)
|
||||
{
|
||||
gr_activate(1);
|
||||
@@ -122,6 +135,12 @@ bool movie_play_two(char *name1, char *name2, int unknown_value)
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
if (gr_screen.mode==GR_OPENGL)
|
||||
{
|
||||
gr_opengl_cleanup();
|
||||
}
|
||||
|
||||
os_app_activate_set(false);
|
||||
|
||||
dx8show_play_cutscene(name1);
|
||||
@@ -138,6 +157,12 @@ bool movie_play_two(char *name1, char *name2, int unknown_value)
|
||||
dx8show_play_cutscene(name2);
|
||||
|
||||
os_app_activate_set(true);
|
||||
|
||||
if (gr_screen.mode==GR_OPENGL)
|
||||
{
|
||||
gr_opengl_init(1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if(movie_shutdown_fgx == true)
|
||||
|
||||
@@ -57,7 +57,8 @@ static int back_faceing;
|
||||
int decal_find_next(object *obj){
|
||||
ship *shipp = &Ships[obj->instance];
|
||||
int oldest = shipp->decals[0].timestamp;
|
||||
for(int i = 0; i < MAX_SHIP_DECALS; i++){
|
||||
int i;
|
||||
for(i = 0; i < MAX_SHIP_DECALS; i++){
|
||||
if(shipp->decals[i].is_valid != 1){ //use up all the unused decals first
|
||||
return i%MAX_SHIP_DECALS;
|
||||
}
|
||||
@@ -475,7 +476,8 @@ void decal_create_tmappoly(ubyte * p)
|
||||
}
|
||||
|
||||
//this is for faster testing, I'm not sure if it's realy makeing it faster or not
|
||||
for(int k = 0; k<6; k++){
|
||||
int k;
|
||||
for(k = 0; k<6; k++){
|
||||
int first_good = -1;
|
||||
for(i = 0; ((i< nv) && (first_good == -1)); i++){
|
||||
if(fvi_point_dist_plane(&decal_cube_plane[k][0], &decal_cube_plane[k][1], decal_point_list[decal_poly[i]]) > 0){
|
||||
@@ -757,11 +759,12 @@ void decal_render_all(object * obj){
|
||||
decal *dec = &shipp->decals[h];
|
||||
if(dec->is_valid){
|
||||
mprintf(("decal %d is valid, and has %d polys\n",h,dec->n_poly));
|
||||
vector g_pos;
|
||||
vm_vec_add(&g_pos, &dec->position, &obj->pos);
|
||||
float dist = vm_vec_dist_quick(&g_pos, &View_position);
|
||||
// vector g_pos;
|
||||
// vm_vec_add(&g_pos, &dec->position, &obj->pos);
|
||||
float dist = vm_vec_dist(&dec->position, &View_position);
|
||||
if(dist < (dec->radius*10)){
|
||||
mprintf(("decal %d too far away to be drawn %0.2f\n", h, dist));
|
||||
// HUD_printf("decal %d too far away to be drawn %0.2f\n", h, dist);
|
||||
continue;
|
||||
}
|
||||
for(int i = 0; i<dec->n_poly; i++){
|
||||
@@ -773,6 +776,7 @@ void decal_render_all(object * obj){
|
||||
// vector pos;
|
||||
// vm_vert2vec(&vecs[j], &pos);
|
||||
// vm_vec_add2(&pos, &obj->pos);
|
||||
if(dec->poly[i].point[j]<0 || dec->poly[i].point[j]>1000)break;
|
||||
vector pnt = dec->vert[dec->poly[i].point[j]];
|
||||
if(dec->submodel_parent != pm->detail[0]){
|
||||
matrix m;
|
||||
@@ -805,6 +809,8 @@ mprintf(("vert %d at x %0.2f y %0.2f z %0.2f u %0.2f v %0.2f\n", j, vecs[j].x, v
|
||||
*/
|
||||
}
|
||||
|
||||
if(dec->poly[i].point[j]<0 || dec->poly[i].point[j]>1000)break;
|
||||
|
||||
gr_set_bitmap(dec->texture, 0, GR_BITBLT_MODE_NORMAL, 1.0f );
|
||||
if((dec->poly[i].backfaced == 1) && (dec->backfaced_texture > -1)){
|
||||
gr_set_bitmap(dec->backfaced_texture, 0, GR_BITBLT_MODE_NORMAL, 1.0f );
|
||||
|
||||
@@ -77,4 +77,4 @@ int decal_create_sub(void *model_ptr);
|
||||
/*
|
||||
|
||||
int decal_is_in_face(int n, vertex vertlist[n]);//sees if a poly is inside a decal: 0 is yes, 1 is sort of, -1 is no
|
||||
*/
|
||||
*/
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.cpp $
|
||||
* $Revision: 2.0 $
|
||||
* $Date: 2002-06-03 04:02:22 $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2003-03-02 05:10:42 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Main file for dealing with exception handling
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.0 2002/06/03 04:02:22 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
* Revision 1.1 2002/05/02 18:03:05 mharris
|
||||
* Initial checkin - converted filenames and includes to lower case
|
||||
*
|
||||
@@ -139,7 +142,9 @@ static void PrintTime(char *output, FILETIME TimeToPrint)
|
||||
static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle)
|
||||
{
|
||||
char ModName[MAX_PATH];
|
||||
#ifdef _MSC_VER
|
||||
__try {
|
||||
#endif
|
||||
if (GetModuleFileName(ModuleHandle, ModName, sizeof(ModName)) > 0) {
|
||||
// If GetModuleFileName returns greater than zero then this must
|
||||
// be a valid code module address. Therefore we can try to walk
|
||||
@@ -174,11 +179,13 @@ static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle)
|
||||
ModName, ModuleHandle, FileSize,
|
||||
NTHeader->FileHeader.TimeDateStamp, TimeBuffer);
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
}
|
||||
// Handle any exceptions by continuing from this point.
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Scan memory looking for code modules (DLLs or EXEs). VirtualQuery is used
|
||||
@@ -436,15 +443,19 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
|
||||
// exception handler will print '??'.
|
||||
unsigned char *code = (unsigned char*)Context->Eip;
|
||||
for (int codebyte = 0; codebyte < NumCodeBytes; codebyte++) {
|
||||
#ifdef _MSC_VER
|
||||
__try {
|
||||
#endif
|
||||
hprintf(LogFile, "%02x ", code[codebyte]);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
hprintf(LogFile, "?? ");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Time to print part or all of the stack to the error log. This allows
|
||||
// us to figure out the call stack, parameters, local variables, etc.
|
||||
hprintf(LogFile, "\r\n"
|
||||
@@ -500,6 +511,7 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
|
||||
__except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
hprintf(LogFile, "Exception encountered during stack dump.\r\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
RecordModuleList(LogFile);
|
||||
|
||||
|
||||
@@ -9,13 +9,18 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Fireball/FireBalls.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-11-14 04:18:16 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:12:39 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Prototypes for fireball functions
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/11/14 04:18:16 bobboau
|
||||
* added warp model and type 1 glow points
|
||||
* and well as made the new glow file type,
|
||||
* some general improvement to fighter beams,
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -209,6 +214,6 @@ float fireball_lifeleft_percent( object *obj );
|
||||
extern void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius );
|
||||
extern int Warp_glow_bitmap; // Internal
|
||||
|
||||
#endif /* _FIREBALLS_H */
|
||||
extern int wm;
|
||||
|
||||
extern int wm;
|
||||
#endif /* _FIREBALLS_H */
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Freespace2/FreeSpace.cpp $
|
||||
* $Revision: 2.26 $
|
||||
* $Date: 2003-02-23 20:55:57 $
|
||||
* $Author: wmcoolmon $
|
||||
* $Revision: 2.27 $
|
||||
* $Date: 2003-03-02 05:23:34 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Freespace main body
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.26 2003/02/23 20:55:57 wmcoolmon
|
||||
* Refixed the splash screen loading code so that it still works with the demo VPs (Loading "2_PreLoad" and "PreLoad") and put logo support back in. Logo support does nothing unless "PreLoadLogo" and/or"2_PreLoadLogo" exist within the search path.
|
||||
*
|
||||
* Revision 2.25 2003/02/16 19:00:56 phreak
|
||||
* stupid typo -- my bad
|
||||
*
|
||||
@@ -1529,7 +1532,7 @@ void game_flash_diminish(float frametime)
|
||||
|
||||
if ( Use_palette_flash ) {
|
||||
int r,g,b;
|
||||
static int or=0, og=0, ob=0;
|
||||
static int o_r=0, o_g=0, o_b=0;
|
||||
|
||||
// Change the 200 to change the color range of colors.
|
||||
r = fl2i( Game_flash_red*128.0f );
|
||||
@@ -1557,9 +1560,9 @@ void game_flash_diminish(float frametime)
|
||||
|
||||
//mprintf(( "Flash! %d,%d,%d\n", r, g, b ));
|
||||
|
||||
or = r;
|
||||
og = g;
|
||||
ob = b;
|
||||
o_r = r;
|
||||
o_g = g;
|
||||
o_b = b;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2034,7 +2037,7 @@ int game_start_mission()
|
||||
game_post_level_init();
|
||||
load_post_level_init = time(NULL) - load_post_level_init;
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if (!defined(NDEBUG)) && (!defined(NO_SOFTWARE_RENDERING))
|
||||
{
|
||||
void Do_model_timings_test();
|
||||
Do_model_timings_test();
|
||||
@@ -7182,7 +7185,7 @@ int WinMainSub(int argc, char *argv[])
|
||||
// movie_play( NOX("intro.mve"), 0 );
|
||||
|
||||
// debug version, movie will only play with -showmovies
|
||||
#else if !defined(NDEBUG)
|
||||
#elif !defined(NDEBUG)
|
||||
|
||||
// no soup for you!
|
||||
// movie_play( NOX("intro.mve"), 0);
|
||||
@@ -7240,14 +7243,18 @@ int main(int argc, char *argv[])
|
||||
int result = -1;
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_MSC_VER)
|
||||
__try {
|
||||
#endif
|
||||
result = WinMainSub(hInst, hPrev, szCmdLine, nCmdShow);
|
||||
#if defined(_MSC_VER)
|
||||
} __except(RecordExceptionInfo(GetExceptionInformation(), "Freespace 2 Main Thread")) {
|
||||
// Do nothing here - RecordExceptionInfo() has already done
|
||||
// everything that is needed. Actually this code won't even
|
||||
// get called unless you return EXCEPTION_EXECUTE_HANDLER from
|
||||
// the __except clause.
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
try {
|
||||
result = WinMainSub(argc, argv);
|
||||
@@ -7735,7 +7742,7 @@ void game_show_event_debug(float frametime)
|
||||
|
||||
#endif // NDEBUG
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if (!defined(NDEBUG)) && (!defined(NO_SOFTWARE_RENDERING))
|
||||
FILE * Time_fp;
|
||||
FILE * Texture_fp;
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ typedef struct { float r, g, b, a; } FxColor4;
|
||||
#elif defined(__unix__)
|
||||
#define FX_ENTRY extern
|
||||
#define FX_CALL
|
||||
#elif defined(__GNUC__)
|
||||
#define FX_ENTRY extern
|
||||
#define FX_CALL
|
||||
#else
|
||||
#warning define FX_ENTRY & FX_CALL for your compiler
|
||||
#define FX_ENTRY extern
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/GlobalIncs/PsTypes.h $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2003-01-18 19:48:19 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.8 $
|
||||
* $Date: 2003-03-02 05:27:44 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Header file containg global typedefs, constants and macros
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.7 2003/01/18 19:48:19 phreak
|
||||
* added some defines that deal with mages using DXTC
|
||||
*
|
||||
* Revision 2.6 2002/12/02 23:56:12 Goober5000
|
||||
* fixed misspelling
|
||||
*
|
||||
@@ -434,8 +437,12 @@ extern void _cdecl Warning( char * filename, int line, char * format, ... );
|
||||
#endif // NDEBUG && DEMO
|
||||
#endif // INTERPLAYQA
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define PI 3.141592654f
|
||||
#define PI2 (3.141592654f*2.0f) // PI*2
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/GlobalIncs/WinDebug.cpp $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-08-01 01:41:04 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-03-02 05:30:26 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Debug stuff
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:22 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -116,12 +119,26 @@
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <stdio.h>
|
||||
#include <crtdbg.h>
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
|
||||
//Uncomment SHOW_CALL_STACK to show the call stack in Asserts, Warnings, and Errors
|
||||
#define SHOW_CALL_STACK
|
||||
#endif // _MSC_VER
|
||||
|
||||
|
||||
#ifndef __ASSERT
|
||||
#ifndef _DEBUG
|
||||
#define _ASSERT(expr) ((void)0)
|
||||
#else
|
||||
#define _ASSERT(expr) (assert(expr))
|
||||
// #error _ASSERT is not defined yet for debug mode with non-MSVC compilers
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SHOW_CALL_STACK
|
||||
|
||||
@@ -1006,8 +1023,6 @@ void getmem()
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
#include <crtdbg.h>
|
||||
|
||||
int TotalRam = 0;
|
||||
|
||||
#define nNoMansLandSize 4
|
||||
@@ -1030,6 +1045,9 @@ typedef struct _CrtMemBlockHeader
|
||||
|
||||
#define pHdr(pbData) (((_CrtMemBlockHeader *)pbData)-1)
|
||||
|
||||
|
||||
// this block of code is never referenced...
|
||||
#if 0
|
||||
int __cdecl MyAllocHook(
|
||||
int nAllocType,
|
||||
void * pvData,
|
||||
@@ -1067,6 +1085,9 @@ int __cdecl MyAllocHook(
|
||||
|
||||
return( TRUE ); // Allow the memory operation to proceed
|
||||
}
|
||||
#endif // #if 0
|
||||
|
||||
|
||||
|
||||
void windebug_memwatch_init()
|
||||
{
|
||||
@@ -1120,7 +1141,7 @@ void *vm_malloc( int size, char *filename, int line )
|
||||
void *vm_malloc( int size )
|
||||
#endif
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
#if (!defined(NDEBUG)) && defined(_MSC_VER)
|
||||
if ( !Heap ) {
|
||||
TotalRam += size;
|
||||
|
||||
@@ -1179,27 +1200,23 @@ void vm_free( void *ptr )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if (!defined(NDEBUG)) && defined(_MSC_VER)
|
||||
if ( !Heap ) {
|
||||
#ifndef NDEBUG
|
||||
_CrtMemBlockHeader *phd = pHdr(ptr);
|
||||
int nSize = phd->nDataSize;
|
||||
|
||||
TotalRam -= nSize;
|
||||
#endif
|
||||
|
||||
_free_dbg(ptr,_NORMAL_BLOCK);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
int actual_size = HeapSize(Heap, HEAP_FLAG, ptr);
|
||||
if ( Watch_malloc ) {
|
||||
mprintf(( "Free %d bytes [%s(%d)]\n", actual_size, clean_filename(filename), line ));
|
||||
}
|
||||
TotalRam -= actual_size;
|
||||
#endif
|
||||
int actual_size = HeapSize(Heap, HEAP_FLAG, ptr);
|
||||
if ( Watch_malloc ) {
|
||||
mprintf(( "Free %d bytes [%s(%d)]\n", actual_size, clean_filename(filename), line ));
|
||||
}
|
||||
TotalRam -= actual_size;
|
||||
#endif
|
||||
HeapFree( Heap, HEAP_FLAG, ptr );
|
||||
HeapCompact(Heap, HEAP_FLAG);
|
||||
}
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/2d.cpp $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2002-11-18 21:32:11 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2003-03-02 05:41:52 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Main file for 2d primitives.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2002/11/18 21:32:11 phreak
|
||||
* added some ogl functionality - phreak
|
||||
*
|
||||
* Revision 2.3 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -516,9 +519,6 @@ void gr_close()
|
||||
|
||||
switch( gr_screen.mode ) {
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
gr_soft_cleanup();
|
||||
break;
|
||||
case GR_DIRECTDRAW:
|
||||
Int3();
|
||||
gr_directdraw_cleanup();
|
||||
@@ -531,6 +531,12 @@ void gr_close()
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
gr_soft_cleanup();
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
gr_opengl_cleanup();
|
||||
@@ -890,9 +896,6 @@ int gr_init(int res, int mode, int depth, int fred_x, int fred_y)
|
||||
if ( Gr_inited ) {
|
||||
switch( gr_screen.mode ) {
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
gr_soft_cleanup();
|
||||
break;
|
||||
case GR_DIRECTDRAW:
|
||||
Int3();
|
||||
gr_directdraw_cleanup();
|
||||
@@ -907,7 +910,13 @@ int gr_init(int res, int mode, int depth, int fred_x, int fred_y)
|
||||
case GR_GLIDE:
|
||||
gr_glide_cleanup();
|
||||
break;
|
||||
#endif
|
||||
#endif // ifdef _WIN32
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
gr_soft_cleanup();
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
@@ -981,10 +990,6 @@ int gr_init(int res, int mode, int depth, int fred_x, int fred_y)
|
||||
|
||||
switch( gr_screen.mode ) {
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
Assert(Fred_running || Pofview_running || Is_standalone || Nebedit_running);
|
||||
gr_soft_init();
|
||||
break;
|
||||
// directdraw, direct3d,
|
||||
case GR_DIRECTDRAW:
|
||||
Int3();
|
||||
@@ -1023,6 +1028,13 @@ int gr_init(int res, int mode, int depth, int fred_x, int fred_y)
|
||||
break;
|
||||
#endif // ifdef WIN32
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
Assert(Fred_running || Pofview_running || Is_standalone || Nebedit_running);
|
||||
gr_soft_init();
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
Gr_bitmap_poly=1;
|
||||
@@ -1069,12 +1081,6 @@ void gr_force_windowed()
|
||||
|
||||
switch( gr_screen.mode ) {
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
{
|
||||
extern void gr_soft_force_windowed();
|
||||
gr_soft_force_windowed();
|
||||
}
|
||||
break;
|
||||
case GR_DIRECTDRAW:
|
||||
{
|
||||
Int3();
|
||||
@@ -1092,6 +1098,15 @@ void gr_force_windowed()
|
||||
break;
|
||||
#endif // ifdef WIN32
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
{
|
||||
extern void gr_soft_force_windowed();
|
||||
gr_soft_force_windowed();
|
||||
}
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
extern void opengl_minimize();
|
||||
@@ -1115,13 +1130,6 @@ void gr_activate(int active)
|
||||
|
||||
switch( gr_screen.mode ) {
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
{
|
||||
extern void gr_soft_activate(int active);
|
||||
gr_soft_activate(active);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GR_DIRECTDRAW:
|
||||
{
|
||||
Int3();
|
||||
@@ -1146,6 +1154,16 @@ void gr_activate(int active)
|
||||
break;
|
||||
#endif // ifdef WIN32
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
{
|
||||
extern void gr_soft_activate(int active);
|
||||
gr_soft_activate(active);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
extern void gr_opengl_activate(int active);
|
||||
@@ -1246,10 +1264,6 @@ void gr_bitmap(int x, int y)
|
||||
// old school bitmaps
|
||||
switch(gr_screen.mode){
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
grx_bitmap(x, y);
|
||||
break;
|
||||
|
||||
case GR_DIRECTDRAW:
|
||||
grx_bitmap(x, y);
|
||||
break;
|
||||
@@ -1261,9 +1275,14 @@ void gr_bitmap(int x, int y)
|
||||
case GR_GLIDE:
|
||||
gr_glide_bitmap(x, y);
|
||||
break;
|
||||
|
||||
#endif // ifdef WIN32
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
grx_bitmap(x, y);
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
gr_opengl_bitmap(x, y);
|
||||
@@ -1277,10 +1296,6 @@ void gr_bitmap_ex(int x, int y, int w, int h, int sx, int sy)
|
||||
{
|
||||
switch(gr_screen.mode){
|
||||
#ifdef _WIN32
|
||||
case GR_SOFTWARE:
|
||||
grx_bitmap_ex(x, y, w, h, sx, sy);
|
||||
break;
|
||||
|
||||
case GR_DIRECTDRAW:
|
||||
grx_bitmap_ex(x, y, w, h, sx, sy);
|
||||
break;
|
||||
@@ -1294,6 +1309,12 @@ void gr_bitmap_ex(int x, int y, int w, int h, int sx, int sy)
|
||||
break;
|
||||
#endif // ifdef WIN32
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
case GR_SOFTWARE:
|
||||
grx_bitmap_ex(x, y, w, h, sx, sy);
|
||||
break;
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case GR_OPENGL:
|
||||
gr_opengl_bitmap_ex(x, y, w, h, sx, sy);
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/aaline.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:05 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:42:25 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code to draw antialiased lines
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:55:59 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -246,11 +249,12 @@ void aaline_init_tables()
|
||||
// less than 1.0 and less total bits are sufficient.
|
||||
// Some of the steps here are not needed. This was originally
|
||||
// written to simulate exact hardware behavior.
|
||||
#if defined( _WIN32 ) && defined( _MSC_VER )
|
||||
#if defined _WIN32
|
||||
long int fix_xy_mult(long int oa, fix_xy ob)
|
||||
{
|
||||
int retval;
|
||||
|
||||
#if defined _MSC_VER
|
||||
_asm {
|
||||
mov edx, oa
|
||||
mov eax, ob
|
||||
@@ -258,11 +262,26 @@ long int fix_xy_mult(long int oa, fix_xy ob)
|
||||
shrd eax,edx,20
|
||||
mov retval, eax
|
||||
}
|
||||
#elif defined __GNUC__
|
||||
asm(
|
||||
"mov %1,%%edx;"
|
||||
"mov %2,%%eax;"
|
||||
"imul %%edx;"
|
||||
"shrd $20,%%eax,%%edx;"
|
||||
"mov %%eax,%0"
|
||||
: "=g" (retval) // outputs
|
||||
: "g" (oa), "g" (ob) // inputs
|
||||
: "eax", "edx" // clobbered registers
|
||||
);
|
||||
#else
|
||||
#error unknown compiler
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
#else
|
||||
#error unknown OS
|
||||
long int fix_xy_mult(long int oa, fix_xy ob);
|
||||
#endif // if defined( _WIN32 ) && defined( _MSC_VER )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/Font.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2002-08-01 01:41:05 $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-03-02 05:41:52 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* source file for font stuff
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.2 2002/07/29 20:12:31 penguin
|
||||
* added #ifdef _WIN32 around windows-specific system headers
|
||||
*
|
||||
@@ -644,6 +647,7 @@ void gr8_string(int sx, int sy, char *s )
|
||||
gr_unlock();
|
||||
}
|
||||
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
#ifdef _WIN32
|
||||
HFONT MyhFont = NULL;
|
||||
extern HDC hDibDC;
|
||||
@@ -733,7 +737,8 @@ void gr_get_string_size_win(int *w, int *h, char *text)
|
||||
if (h)
|
||||
*h += size.cy;
|
||||
}
|
||||
#endif
|
||||
#endif // ifdef _WIN32
|
||||
#endif // ifndef NO_SOFTWARE_RENDERING
|
||||
|
||||
char grx_printf_text[2048];
|
||||
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrD3D.cpp $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-01-14 05:53:58 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2003-03-02 05:43:48 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code for our Direct3D renderer
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2003/01/14 05:53:58 Goober5000
|
||||
* commented out some mprintfs that were clogging up the debug spew
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.3 2002/10/05 16:46:09 randomtiger
|
||||
* Added us fs2_open people to the credits. Worth looking at just for that.
|
||||
* Added timer bar code, by default its not compiled in.
|
||||
@@ -667,14 +671,14 @@ HRESULT d3d_DrawPrimitive( D3DPRIMITIVETYPE dptPrimitiveType, D3DVERTEXTYPE dvtV
|
||||
OP_NOP( D3D_ex_ptr );
|
||||
}
|
||||
|
||||
OP_TRIANGLE_LIST( unsigned short(dwVertexCount-2), D3D_ex_ptr );
|
||||
OP_TRIANGLE_LIST( (unsigned short)(dwVertexCount-2), D3D_ex_ptr );
|
||||
|
||||
LPD3DTRIANGLE tri = ( LPD3DTRIANGLE )D3D_ex_ptr;
|
||||
|
||||
for (i=0; i<(int)dwVertexCount-2; i++ ) {
|
||||
tri->v1 = unsigned short(D3D_num_verts+0);
|
||||
tri->v2 = unsigned short(D3D_num_verts+i+1);
|
||||
tri->v3 = unsigned short(D3D_num_verts+i+2);
|
||||
tri->v1 = (unsigned short)(D3D_num_verts+0);
|
||||
tri->v2 = (unsigned short)(D3D_num_verts+i+1);
|
||||
tri->v3 = (unsigned short)(D3D_num_verts+i+2);
|
||||
tri->wFlags = D3DTRIFLAG_EDGEENABLETRIANGLE;
|
||||
tri++;
|
||||
|
||||
@@ -714,8 +718,8 @@ HRESULT d3d_DrawPrimitive( D3DPRIMITIVETYPE dptPrimitiveType, D3DVERTEXTYPE dvtV
|
||||
|
||||
for (i=0; i<(int)nlines; i++ ) {
|
||||
LPD3DLINE line = (LPD3DLINE )D3D_ex_ptr;
|
||||
line->v1 = unsigned short(D3D_num_verts);
|
||||
line->v2 = unsigned short(D3D_num_verts+1);
|
||||
line->v1 = (unsigned short)(D3D_num_verts);
|
||||
line->v2 = (unsigned short)(D3D_num_verts+1);
|
||||
D3D_ex_ptr = (void *)(((LPD3DLINE)D3D_ex_ptr) + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrD3DRender.cpp $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2003-02-16 05:14:28 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.10 $
|
||||
* $Date: 2003-03-02 05:43:48 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code to actually render stuff using Direct3D
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.9 2003/02/16 05:14:28 bobboau
|
||||
* added glow map nebula bug fix for d3d, someone should add a fix for glide too
|
||||
* more importantly I (think I) have fixed all major bugs with fighter beams, and added a bit of new functionality
|
||||
*
|
||||
* Revision 2.8 2003/01/20 05:40:49 bobboau
|
||||
* added several sExps for turning glow points and glow maps on and off
|
||||
*
|
||||
@@ -1304,9 +1308,9 @@ void gr_d3d_reset_clip()
|
||||
void gr_d3d_init_color(color *c, int r, int g, int b)
|
||||
{
|
||||
c->screen_sig = gr_screen.signature;
|
||||
c->red = unsigned char(r);
|
||||
c->green = unsigned char(g);
|
||||
c->blue = unsigned char(b);
|
||||
c->red = (unsigned char) r;
|
||||
c->green = (unsigned char) g;
|
||||
c->blue = (unsigned char) b;
|
||||
c->alpha = 255;
|
||||
c->ac_type = AC_TYPE_NONE;
|
||||
c->alphacolor = -1;
|
||||
@@ -1323,7 +1327,7 @@ void gr_d3d_init_alphacolor( color *clr, int r, int g, int b, int alpha, int typ
|
||||
|
||||
gr_d3d_init_color( clr, r, g, b );
|
||||
|
||||
clr->alpha = unsigned char(alpha);
|
||||
clr->alpha = (unsigned char) alpha;
|
||||
clr->ac_type = (ubyte)type;
|
||||
clr->alphacolor = -1;
|
||||
clr->is_alphacolor = 1;
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrD3DTexture.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-01-19 01:07:41 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:43:48 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code to manage loading textures into VRAM for Direct3D
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2003/01/19 01:07:41 bobboau
|
||||
* redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -627,7 +630,7 @@ int d3d_create_texture_sub(int bitmap_type, int texture_handle, ushort *data, in
|
||||
g /= Gr_ta_green.scale;
|
||||
b /= Gr_ta_blue.scale;
|
||||
a /= Gr_ta_alpha.scale;
|
||||
xlat[i] = unsigned short(((a<<Gr_ta_alpha.shift) | (r << Gr_ta_red.shift) | (g << Gr_ta_green.shift) | (b << Gr_ta_blue.shift)));
|
||||
xlat[i] = (unsigned short)(((a<<Gr_ta_alpha.shift) | (r << Gr_ta_red.shift) | (g << Gr_ta_green.shift) | (b << Gr_ta_blue.shift)));
|
||||
}
|
||||
|
||||
xlat[15] = xlat[1];
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrGlide.cpp $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-08-01 01:41:05 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-03-02 05:43:49 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code that uses 3DFX's Glide graphics library
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:22 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -2170,9 +2173,9 @@ void gr_glide_set_palette(ubyte *new_palette, int force_flag )
|
||||
void gr_glide_init_color(color *c, int r, int g, int b)
|
||||
{
|
||||
c->screen_sig = gr_screen.signature;
|
||||
c->red = unsigned char(r);
|
||||
c->green = unsigned char(g);
|
||||
c->blue = unsigned char(b);
|
||||
c->red = (unsigned char)(r);
|
||||
c->green = (unsigned char)(g);
|
||||
c->blue = (unsigned char)(b);
|
||||
c->alpha = 255;
|
||||
c->ac_type = AC_TYPE_NONE;
|
||||
c->alphacolor = -1;
|
||||
@@ -2189,7 +2192,7 @@ void gr_glide_init_alphacolor( color *clr, int r, int g, int b, int alpha, int t
|
||||
|
||||
gr_glide_init_color( clr, r, g, b );
|
||||
|
||||
clr->alpha = unsigned char(alpha);
|
||||
clr->alpha = (unsigned char)(alpha);
|
||||
clr->ac_type = (ubyte)type;
|
||||
clr->alphacolor = -1;
|
||||
clr->is_alphacolor = 1;
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrOpenGL.cpp $
|
||||
* $Revision: 2.15 $
|
||||
* $Date: 2003-02-16 18:43:13 $
|
||||
* $Revision: 2.16 $
|
||||
* $Date: 2003-03-07 00:15:45 $
|
||||
* $Author: phreak $
|
||||
*
|
||||
* Code that uses the OpenGL graphics library
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.15 2003/02/16 18:43:13 phreak
|
||||
* tweaked some more stuff
|
||||
*
|
||||
* Revision 2.14 2003/02/01 02:57:42 phreak
|
||||
* started to finalize before 3.50 release.
|
||||
* added support for GL_EXT_texture_filter_ansiotropic
|
||||
@@ -1843,7 +1846,7 @@ int gr_opengl_supports_res_interface(int res)
|
||||
}
|
||||
|
||||
void opengl_tcache_cleanup ();
|
||||
void gr_opengl_cleanup()
|
||||
void gr_opengl_cleanup(int minimize)
|
||||
{
|
||||
HWND wnd=(HWND)os_get_window();
|
||||
if ( !OGL_inited ) return;
|
||||
@@ -1876,8 +1879,11 @@ void gr_opengl_cleanup()
|
||||
}
|
||||
|
||||
opengl_minimize();
|
||||
if (!Cmdline_window)
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
if (minimize)
|
||||
{
|
||||
if (!Cmdline_window)
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void gr_opengl_fog_set(int fog_mode, int r, int g, int b, float fog_near, float fog_far)
|
||||
@@ -3212,7 +3218,7 @@ void gr_opengl_bitmap(int x, int y)
|
||||
}
|
||||
|
||||
extern char *Osreg_title;
|
||||
void gr_opengl_init()
|
||||
void gr_opengl_init(int reinit)
|
||||
{
|
||||
char *extlist;
|
||||
char *curext;
|
||||
@@ -3385,34 +3391,38 @@ Gr_ta_alpha: bits=0, mask=f000, scale=17, shift=c
|
||||
|
||||
ver=(char*)glGetString(GL_VERSION);
|
||||
OGL_inited = 1;
|
||||
mprintf(("OPENGL INITED!\n"));
|
||||
mprintf(("\n"));
|
||||
mprintf(( "Vendor : %s\n", glGetString( GL_VENDOR ) ));
|
||||
mprintf(( "Renderer : %s\n", glGetString( GL_RENDERER ) ));
|
||||
mprintf(( "Version : %s\n", ver ));
|
||||
mprintf(( "Extensions : \n" ));
|
||||
|
||||
//print out extensions
|
||||
OGL_extensions=(const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
extlist=(char*)malloc(strlen(OGL_extensions));
|
||||
memcpy(extlist, OGL_extensions, strlen(OGL_extensions));
|
||||
memcpy(curver, ver,3);
|
||||
|
||||
float version_float=(float)atof(curver);
|
||||
if (version_float < REQUIRED_GL_VERSION)
|
||||
if (!reinit)
|
||||
{
|
||||
Error(LOCATION,"Current GL Version of %f is less than required version of %f\nSwitch video modes or update drivers", version_float, REQUIRED_GL_VERSION);
|
||||
}
|
||||
mprintf(("OPENGL INITED!\n"));
|
||||
mprintf(("\n"));
|
||||
mprintf(( "Vendor : %s\n", glGetString( GL_VENDOR ) ));
|
||||
mprintf(( "Renderer : %s\n", glGetString( GL_RENDERER ) ));
|
||||
mprintf(( "Version : %s\n", ver ));
|
||||
mprintf(( "Extensions : \n" ));
|
||||
|
||||
//print out extensions
|
||||
OGL_extensions=(const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
extlist=(char*)malloc(strlen(OGL_extensions));
|
||||
memcpy(extlist, OGL_extensions, strlen(OGL_extensions));
|
||||
memcpy(curver, ver,3);
|
||||
|
||||
float version_float=(float)atof(curver);
|
||||
if (version_float < REQUIRED_GL_VERSION)
|
||||
{
|
||||
Error(LOCATION,"Current GL Version of %f is less than required version of %f\nSwitch video modes or update drivers", version_float, REQUIRED_GL_VERSION);
|
||||
}
|
||||
|
||||
curext=strtok(extlist, " ");
|
||||
while (curext)
|
||||
{
|
||||
mprintf(( "%s\n", curext ));
|
||||
curext=strtok(NULL, " ");
|
||||
curext=strtok(extlist, " ");
|
||||
while (curext)
|
||||
{
|
||||
mprintf(( "%s\n", curext ));
|
||||
curext=strtok(NULL, " ");
|
||||
}
|
||||
free(extlist);
|
||||
}
|
||||
|
||||
free(extlist);
|
||||
|
||||
|
||||
glViewport(0, 0, gr_screen.max_w, gr_screen.max_h);
|
||||
|
||||
@@ -3448,10 +3458,15 @@ Gr_ta_alpha: bits=0, mask=f000, scale=17, shift=c
|
||||
Gr_bitmap_poly = 1;
|
||||
OGL_fogmode=1;
|
||||
|
||||
//start extension
|
||||
opengl_get_extensions();
|
||||
|
||||
opengl_tcache_init (1);
|
||||
if (!reinit)
|
||||
{
|
||||
//start extension
|
||||
opengl_get_extensions();
|
||||
|
||||
opengl_tcache_init (1);
|
||||
}
|
||||
|
||||
gr_opengl_clear();
|
||||
|
||||
Gr_current_red = &Gr_red;
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrOpenGL.h $
|
||||
* $Revision: 2.0 $
|
||||
* $Date: 2002-06-03 04:02:23 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2003-03-07 00:15:45 $
|
||||
* $Author: phreak $
|
||||
*
|
||||
* Include file for OpenGL renderer
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.0 2002/06/03 04:02:23 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
* Revision 1.1 2002/05/02 18:03:07 mharris
|
||||
* Initial checkin - converted filenames and includes to lower case
|
||||
*
|
||||
@@ -36,8 +39,8 @@
|
||||
#ifndef _GROPENGL_H
|
||||
#define _GROPENGL_H
|
||||
|
||||
void gr_opengl_init();
|
||||
void gr_opengl_cleanup();
|
||||
void gr_opengl_init(int reinit=0);
|
||||
void gr_opengl_cleanup(int minimize=1);
|
||||
|
||||
void gr_opengl_bitmap(int x, int y);
|
||||
void gr_opengl_bitmap_ex(int x, int y, int w, int h, int sx, int sy);
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/GrSoft.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:05 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:43:49 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code for our software renderer using standard Win32 functions. (Dibsections, etc)
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:55:59 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -567,7 +570,7 @@ void gr_buffer_create( int w, int h, int bpp )
|
||||
Gr_blue.mask = 0xff;
|
||||
|
||||
DibInfo.Header.biCompression = BI_RGB;
|
||||
DibInfo.Header.biBitCount = unsigned short(bpp);
|
||||
DibInfo.Header.biBitCount = (unsigned short)(bpp);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/Scaler.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:05 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:45:04 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Routines to scale a bitmap.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:55:59 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -817,8 +820,9 @@ void gr8_scaler(vertex *va, vertex *vb )
|
||||
spixels = (ubyte *)bp->data;
|
||||
|
||||
gr_lock();
|
||||
#ifndef NO_SOFTWARE_RENDERING
|
||||
Tmap.pScreenBits = (uint)gr_screen.offscreen_buffer_base;
|
||||
|
||||
#endif
|
||||
uint *zbuf;
|
||||
|
||||
for (y=dy0; y<=dy1; v += dv, y++ ) {
|
||||
@@ -836,7 +840,8 @@ void gr8_scaler(vertex *va, vertex *vb )
|
||||
}
|
||||
|
||||
if ( Gr_scaler_zbuffering && gr_zbuffering ) {
|
||||
zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)Tmap.pScreenBits];
|
||||
// zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)Tmap.pScreenBits];
|
||||
zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)gr_screen.offscreen_buffer_base];
|
||||
}
|
||||
|
||||
#ifdef USE_COMPILED_CODE
|
||||
@@ -876,7 +881,7 @@ void gr8_scaler(vertex *va, vertex *vb )
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined _WIN32 && defined _MSC_VER
|
||||
_asm push esi
|
||||
_asm push edi
|
||||
_asm push edx
|
||||
@@ -898,8 +903,33 @@ void gr8_scaler(vertex *va, vertex *vb )
|
||||
_asm pop edx
|
||||
_asm pop edi
|
||||
_asm pop esi
|
||||
#elif defined __GNUC__
|
||||
asm(
|
||||
"push %%esi;"
|
||||
"push %%edi;"
|
||||
"push %%edx;"
|
||||
"push %%ecx;"
|
||||
"push %%ebx;"
|
||||
"push %%eax;"
|
||||
"mov %0,%%ecx;" // lookup
|
||||
"mov %1,%%esi;" // sbits
|
||||
"mov %2,%%edi;" // dbits
|
||||
"mov %3,%%eax;" // cc
|
||||
"mov %4,%%edx;" // zbuf
|
||||
"push %%ebp;"
|
||||
"mov %5,%%ebp;" // Gr_global_z
|
||||
"call *%%eax;"
|
||||
"pop %%ebp;"
|
||||
"pop %%eax;"
|
||||
"pop %%ebx;"
|
||||
"pop %%ecx;"
|
||||
"pop %%edx;"
|
||||
"pop %%edi;"
|
||||
"pop %%esi;"
|
||||
: /* no outputs */
|
||||
: "g" (lookup), "g" (sbits), "g" (dbits), "g" (cc), "g" (zbuf), "g" (Gr_global_z));
|
||||
#else
|
||||
#warning not implemented
|
||||
#error asm not implemented
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
@@ -1100,7 +1130,8 @@ void gr8_aascaler(vertex *va, vertex *vb )
|
||||
int x, tmp_u;
|
||||
tmp_u = u;
|
||||
|
||||
uint *zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)Tmap.pScreenBits];
|
||||
// uint *zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)Tmap.pScreenBits];
|
||||
uint *zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)gr_screen.offscreen_buffer_base];
|
||||
|
||||
for (x=0; x<w; x++ ) {
|
||||
if ( fx_w > *zbuf ) {
|
||||
@@ -1113,7 +1144,7 @@ void gr8_aascaler(vertex *va, vertex *vb )
|
||||
tmp_u += du;
|
||||
}
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
#if defined _WIN32 && defined _MSC_VER
|
||||
_asm push esi
|
||||
_asm push edi
|
||||
_asm push ecx
|
||||
@@ -1129,8 +1160,27 @@ void gr8_aascaler(vertex *va, vertex *vb )
|
||||
_asm pop ecx
|
||||
_asm pop edi
|
||||
_asm pop esi
|
||||
#elif defined __GNUC__
|
||||
asm(
|
||||
"push %%esi;"
|
||||
"push %%edi;"
|
||||
"push %%ecx;"
|
||||
"push %%ebx;"
|
||||
"push %%eax;"
|
||||
"mov %0,%%ecx;" // lookup
|
||||
"mov %1,%%esi;" // sbits
|
||||
"mov %2,%%edi;" // dbits
|
||||
"mov %3,%%eax;" // cc
|
||||
"call *%%eax;"
|
||||
"pop %%eax;"
|
||||
"pop %%ebx;"
|
||||
"pop %%ecx;"
|
||||
"pop %%edi;"
|
||||
"pop %%esi;"
|
||||
: /* no outputs */
|
||||
: "g" (lookup), "g" (sbits), "g" (dbits), "g" (cc));
|
||||
#else
|
||||
#warning not implemented
|
||||
#error asm not implemented
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
@@ -1138,7 +1188,8 @@ void gr8_aascaler(vertex *va, vertex *vb )
|
||||
int x, tmp_u;
|
||||
tmp_u = u;
|
||||
|
||||
uint *zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)Tmap.pScreenBits];
|
||||
// uint *zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)Tmap.pScreenBits];
|
||||
uint *zbuf = (uint *)&gr_zbuffer[(uint)dbits-(uint)gr_screen.offscreen_buffer_base];
|
||||
|
||||
for (x=0; x<w; x++ ) {
|
||||
if ( fx_w > *zbuf ) {
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Graphics/Shade.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:05 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:40:28 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Routines to shade an area.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:05 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:55:59 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -197,7 +200,7 @@ void gr8_shade(int x,int y,int w,int h)
|
||||
int left_over = w1 % 4;
|
||||
|
||||
if ( wd4 > 0 ) {
|
||||
#ifdef _WIN32
|
||||
#if defined _WIN32 && !defined __GNUC__
|
||||
_asm push eax
|
||||
_asm push ebx
|
||||
_asm push ecx
|
||||
@@ -248,7 +251,8 @@ void gr8_shade(int x,int y,int w,int h)
|
||||
_asm pop ebx
|
||||
_asm pop eax
|
||||
#else
|
||||
#warning not implemented
|
||||
#warning asm not implemented
|
||||
Error(LOCATION, "asm not implemented");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+91
-14
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Io/Timer.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:06 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 05:46:28 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Include file for timer stuff
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:06 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:55:59 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -190,11 +193,12 @@ fix timer_get_fixed_seconds()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
#if defined(_WIN32)
|
||||
int tmp;
|
||||
LARGE_INTEGER temp_large;
|
||||
timer_get(&temp_large);
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// Timing in fixed point (16.16) seconds.
|
||||
// Can be used for up to 1000 hours
|
||||
_asm mov edx, temp_large.HighPart
|
||||
@@ -212,9 +216,37 @@ sub_again:
|
||||
_asm add edx, ebx ; ...then add in to get correct value.
|
||||
_asm div ebx
|
||||
//eax = fixed point seconds elapsed...
|
||||
|
||||
_asm mov tmp, eax
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
|
||||
// Timing in fixed point (16.16) seconds.
|
||||
// Can be used for up to 1000 hours
|
||||
asm(
|
||||
"mov %1, %%edx;" // temp_large.HighPart
|
||||
"mov %2, %%eax;" // temp_large.LowPart
|
||||
|
||||
"shld $16,%%edx,%%eax;" // Keep 32+11 bits
|
||||
"shl $16,%%eax;"
|
||||
// edx:eax = number of 1.19Mhz pulses elapsed.
|
||||
"mov %3,%%ebx;" // Timer_freq
|
||||
|
||||
// Make sure we won't divide overflow. Make time wrap at about 9 hours
|
||||
"sub_again:"
|
||||
"sub %%ebx,%%edx;" // subtract until negative...
|
||||
"jns sub_again;" // ...to prevent divide overflow..."
|
||||
"add %%ebx,%%edx;" // ...then add in to get correct value."
|
||||
"div %%ebx;"
|
||||
//eax = fixed point seconds elapsed...
|
||||
"mov %%eax,%0;" // tmp
|
||||
: "=g" (tmp)
|
||||
: "g" (temp_large.HighPart), "g" (temp_large.LowPart), "g" (Timer_freq)
|
||||
: "edx", "eax", "ebx" );
|
||||
|
||||
#else
|
||||
#error unknown Win32 compiler
|
||||
#endif
|
||||
|
||||
return tmp;
|
||||
|
||||
#elif defined unix
|
||||
@@ -247,14 +279,13 @@ int timer_get_milliseconds()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
#if defined(_WIN32)
|
||||
int tmp;
|
||||
LARGE_INTEGER temp_large;
|
||||
|
||||
timer_get(&temp_large);
|
||||
|
||||
temp_large.QuadPart *= (longlong)1000;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// Timing in milliseconds.
|
||||
_asm mov edx, temp_large.HighPart
|
||||
_asm mov eax, temp_large.LowPart
|
||||
@@ -263,7 +294,6 @@ int timer_get_milliseconds()
|
||||
//_asm shl eax, 16
|
||||
// edx:eax = number of 1.19Mhz pulses elapsed.
|
||||
_asm mov ebx, Timer_freq
|
||||
|
||||
// Make sure we won't divide overflow. Make time wrap at about 9 hours
|
||||
sub_again:
|
||||
_asm sub edx, ebx ; subtract until negative...
|
||||
@@ -271,17 +301,41 @@ sub_again:
|
||||
_asm add edx, ebx ; ...then add in to get correct value.
|
||||
_asm div ebx
|
||||
//eax = milliseconds elapsed...
|
||||
|
||||
_asm mov tmp, eax
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
// Timing in milliseconds.
|
||||
asm(
|
||||
"mov %1,%%edx;\n" // temp_large.HighPart
|
||||
"mov %2,%%eax;\n" // temp_large.LowPart
|
||||
// edx:eax = number of 1.19Mhz pulses elapsed.
|
||||
"mov %3,%%ebx;\n" // Timer_freq
|
||||
// Make sure we won't divide overflow. Make time wrap at about 9 hours
|
||||
"sub_again2:"
|
||||
"sub %%ebx,%%edx;\n" // subtract until negative...
|
||||
"jns sub_again2;\n" // ...to prevent divide overflow...
|
||||
"add %%ebx,%%edx;\n" // ...then add in to get correct value.
|
||||
"div %%ebx;\n"
|
||||
//eax = milliseconds elapsed...
|
||||
"mov %%eax,%0;\n" // tmp
|
||||
: "=g" (tmp)
|
||||
: "g" (temp_large.HighPart), "g" (temp_large.LowPart), "g" (Timer_freq)
|
||||
: "edx", "eax", "ebx");
|
||||
#else
|
||||
#error unknown Win32 compiler
|
||||
#endif
|
||||
|
||||
return tmp;
|
||||
|
||||
#else
|
||||
|
||||
#elif defined unix
|
||||
|
||||
timeval tmp_tv;
|
||||
timer_get(&tmp_tv);
|
||||
return (tmp_tv.tv_sec * 1000) + (tmp_tv.tv_usec / 1000);
|
||||
|
||||
#else
|
||||
#error unknown architecture/compiler
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -293,14 +347,14 @@ int timer_get_microseconds()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
#if defined(_WIN32)
|
||||
int tmp;
|
||||
LARGE_INTEGER temp_large;
|
||||
|
||||
timer_get(&temp_large);
|
||||
|
||||
temp_large.QuadPart *= (longlong)1000000;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
// Timing in milliseconds.
|
||||
_asm mov edx, temp_large.HighPart
|
||||
_asm mov eax, temp_large.LowPart
|
||||
@@ -317,9 +371,30 @@ sub_again:
|
||||
_asm add edx, ebx ; ...then add in to get correct value.
|
||||
_asm div ebx
|
||||
//eax = milliseconds elapsed...
|
||||
|
||||
_asm mov tmp, eax
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
// Timing in milliseconds.
|
||||
asm(
|
||||
"mov %1,%%edx;\n" // temp_large.HighPart
|
||||
"mov %2,%%eax;\n" // temp_large.LowPart
|
||||
// edx:eax = number of 1.19Mhz pulses elapsed.
|
||||
"mov %3,%%ebx;\n" // Timer_freq
|
||||
// Make sure we won't divide overflow. Make time wrap at about 9 hours
|
||||
"sub_again3:"
|
||||
"sub %%ebx,%%edx;\n" // subtract until negative...
|
||||
"jns sub_again3;\n" // ...to prevent divide overflow...
|
||||
"add %%ebx,%%edx;\n" // ...then add in to get correct value.
|
||||
"div %%ebx;\n"
|
||||
//eax = milliseconds elapsed...
|
||||
"mov %%eax,%0;\n" // tmp
|
||||
: "=g" (tmp)
|
||||
: "g" (temp_large.HighPart), "g" (temp_large.LowPart), "g" (Timer_freq)
|
||||
: "edx", "eax", "ebx");
|
||||
#else
|
||||
#error unknown Win32 compiler
|
||||
#endif
|
||||
|
||||
return tmp;
|
||||
|
||||
#elif defined unix
|
||||
@@ -328,6 +403,8 @@ sub_again:
|
||||
timer_get(&tmp_tv);
|
||||
return (tmp_tv.tv_sec * 1000000) + tmp_tv.tv_usec;
|
||||
|
||||
#else
|
||||
#error unknown architecture/compiler
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Math/VecMat.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-02-25 06:22:48 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-03-02 07:39:34 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* C module containg functions for manipulating vectors and matricies
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2003/02/25 06:22:48 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
* and they have limeted range with atenuated damage (table option)
|
||||
* added bank specific compatabilities
|
||||
*
|
||||
* Revision 2.2 2002/12/07 01:37:41 bobboau
|
||||
* inital decals code, if you are worried a bug is being caused by the decals code it's only references are in,
|
||||
* collideshipweapon.cpp line 262, beam.cpp line 2771, and modelinterp.cpp line 2949.
|
||||
@@ -658,7 +664,7 @@ float vm_vec_dist_quick(vector *v0,vector *v1)
|
||||
//normalize a vector. returns mag of source vec
|
||||
float vm_vec_copy_normalize(vector *dest,vector *src)
|
||||
{
|
||||
static ben_warned = false;//added this so the warning could be sounded and you can still get on with playing-Bobboau
|
||||
static int ben_warned = false;//added this so the warning could be sounded and you can still get on with playing-Bobboau
|
||||
float m;
|
||||
|
||||
m = vm_vec_mag(src);
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/MenuUI/ReadyRoom.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-10-19 03:50:29 $
|
||||
* $Author: randomtiger $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-03 04:28:37 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* Ready Room code, which is the UI screen for selecting Campaign/mission to play next mainly.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/10/19 03:50:29 randomtiger
|
||||
* Added special pause mode for easier action screenshots.
|
||||
* Added new command line parameter for accessing all single missions in tech room. - RT
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:06 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -106,6 +110,7 @@
|
||||
#include "freespace2/freespace.h"
|
||||
#include "globalincs/alphacolors.h"
|
||||
#include "cmdline/cmdline.h"
|
||||
#include "menuui/techmenu.h" // for tech menu reset stuff
|
||||
|
||||
#define MAX_MISSIONS 1024
|
||||
|
||||
@@ -781,6 +786,10 @@ void sim_room_scroll_line_down()
|
||||
gamesnd_play_iface(SND_GENERAL_FAIL);
|
||||
}
|
||||
|
||||
/* Goober5000 - why are there two nearly identical functions?
|
||||
(campaign_room_reset_campaign and ready_room_reset_campaign)
|
||||
Looks like this function should be deprecated...
|
||||
|
||||
// returns: 0 = success, !0 = aborted or failed
|
||||
int ready_room_reset_campaign()
|
||||
{
|
||||
@@ -791,11 +800,13 @@ int ready_room_reset_campaign()
|
||||
if (z) {
|
||||
mission_campaign_savefile_delete(Campaign.filename);
|
||||
mission_campaign_load(Campaign.filename);
|
||||
|
||||
rval = 0;
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
*/
|
||||
|
||||
// Decide if we should offer choice to resume this savegame
|
||||
int sim_room_can_resume_savegame(char *savegame_filename)
|
||||
@@ -1545,6 +1556,7 @@ int campaign_room_reset_campaign(int n)
|
||||
mission_campaign_savefile_delete(filename);
|
||||
mission_campaign_load(filename);
|
||||
mission_campaign_next_mission();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1567,6 +1579,13 @@ void campaign_room_commit()
|
||||
mission_campaign_savefile_delete(Campaign_file_names[Selected_campaign_index]);
|
||||
mission_campaign_load(Campaign_file_names[Selected_campaign_index]);
|
||||
strcpy(Player->current_campaign, Campaign.filename); // track new campaign for player
|
||||
|
||||
// Goober5000 - reinitialize tech database if needed
|
||||
if ( (Campaign.flags & CF_CUSTOM_TECH_DATABASE) || !stricmp(Campaign.filename, "freespace2") )
|
||||
{
|
||||
// reset tech database to what's in the tables
|
||||
tech_reset_to_default();
|
||||
}
|
||||
}
|
||||
|
||||
if (mission_campaign_next_mission()) { // is campaign and next mission valid?
|
||||
@@ -1619,8 +1638,17 @@ int campaign_room_button_pressed(int n)
|
||||
else if (campaign_room_reset_campaign(Active_campaign_index))
|
||||
gamesnd_play_iface(SND_GENERAL_FAIL);
|
||||
else
|
||||
{
|
||||
gamesnd_play_iface(SND_USER_SELECT);
|
||||
|
||||
// Goober5000 - reinitialize tech database if needed
|
||||
if ( (Campaign.flags & CF_CUSTOM_TECH_DATABASE) || !stricmp(Campaign.filename, "freespace2") )
|
||||
{
|
||||
// reset tech database to what's in the tables
|
||||
tech_reset_to_default();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/MenuUI/TechMenu.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2002-12-07 01:37:42 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-03-03 04:28:37 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* C module that contains functions to drive the Tech Menu user interface
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2002/12/07 01:37:42 bobboau
|
||||
* inital decals code, if you are worried a bug is being caused by the decals code it's only references are in,
|
||||
* collideshipweapon.cpp line 262, beam.cpp line 2771, and modelinterp.cpp line 2949.
|
||||
* it needs a better renderer, but is in prety good shape for now,
|
||||
* I also (think) I squashed a bug in the warpmodel code
|
||||
*
|
||||
* Revision 2.2 2002/11/27 01:20:51 sesquipedalian
|
||||
* Added Phreak's fix for the weapons room bug. Can now view a modified weapons.tbl in the tech room without crashing
|
||||
*
|
||||
@@ -1099,7 +1105,7 @@ void techroom_change_tab(int num)
|
||||
Intel_list_size = 0;
|
||||
for (i=0; i<Intel_info_size; i++) {
|
||||
|
||||
if (Intel_info[i].in_tech_db != 0) {
|
||||
if (Intel_info[i].flags & IIF_IN_TECH_DATABASE) {
|
||||
// leave option for no animation if string == "none"
|
||||
if (!strcmp(Intel_info[i].anim_filename, "none")) {
|
||||
Intel_list[Intel_list_size].has_anim = 0;
|
||||
@@ -1270,7 +1276,7 @@ int techroom_load_ani(anim **animpp, char *name)
|
||||
|
||||
void techroom_intel_init()
|
||||
{
|
||||
int rval;
|
||||
int rval, temp;
|
||||
static int inited = 0;
|
||||
|
||||
// open localization
|
||||
@@ -1292,15 +1298,24 @@ void techroom_intel_init()
|
||||
Assert(Intel_info_size < MAX_INTEL_ENTRIES);
|
||||
if (Intel_info_size >= MAX_INTEL_ENTRIES) break;
|
||||
|
||||
Intel_info[Intel_info_size].flags = IIF_DEFAULT_VALUE;
|
||||
|
||||
required_string("$Name:");
|
||||
stuff_string(Intel_info[Intel_info_size].name, F_NAME, NULL, 32);
|
||||
required_string("$Anim:");
|
||||
stuff_string(Intel_info[Intel_info_size].anim_filename, F_NAME, NULL, 32);
|
||||
required_string("$AlwaysInTechRoom:");
|
||||
stuff_int(&Intel_info[Intel_info_size].in_tech_db);
|
||||
stuff_int(&temp);
|
||||
if (temp)
|
||||
{
|
||||
Intel_info[Intel_info_size].flags |= IIF_IN_TECH_DATABASE;
|
||||
}
|
||||
required_string("$Description:");
|
||||
stuff_string(Intel_info[Intel_info_size].desc, F_MULTITEXT, NULL, TECH_INTEL_DESC_LEN);
|
||||
|
||||
// set default to align with what we read - Goober5000
|
||||
if (Intel_info[Intel_info_size].flags & IIF_IN_TECH_DATABASE)
|
||||
Intel_info[Intel_info_size].flags |= IIF_DEFAULT_IN_TECH_DATABASE;
|
||||
|
||||
Intel_info_size++;
|
||||
}
|
||||
@@ -1685,3 +1700,56 @@ void techroom_do_frame(float frametime)
|
||||
|
||||
gr_flip();
|
||||
}
|
||||
|
||||
int intel_info_lookup(char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
// bogus
|
||||
if (!name)
|
||||
return -1;
|
||||
|
||||
for (i=0; i<Intel_info_size; i++)
|
||||
if (!stricmp(name, Intel_info[i].name))
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Goober5000
|
||||
void tech_reset_to_default()
|
||||
{
|
||||
int i;
|
||||
|
||||
// ships
|
||||
for (i=0; i<Num_ship_types; i++)
|
||||
{
|
||||
if (Ship_info[i].flags2 & SIF2_DEFAULT_IN_TECH_DATABASE)
|
||||
Ship_info[i].flags |= SIF_IN_TECH_DATABASE;
|
||||
else
|
||||
Ship_info[i].flags &= ~SIF_IN_TECH_DATABASE;
|
||||
|
||||
if (Ship_info[i].flags2 & SIF2_DEFAULT_IN_TECH_DATABASE_M)
|
||||
Ship_info[i].flags |= SIF_IN_TECH_DATABASE_M;
|
||||
else
|
||||
Ship_info[i].flags &= ~SIF_IN_TECH_DATABASE_M;
|
||||
}
|
||||
|
||||
// weapons
|
||||
for (i=0; i<Num_weapon_types; i++)
|
||||
{
|
||||
if (Weapon_info[i].wi_flags2 & WIF2_DEFAULT_IN_TECH_DATABASE)
|
||||
Weapon_info[i].wi_flags |= WIF_IN_TECH_DATABASE;
|
||||
else
|
||||
Weapon_info[i].wi_flags &= ~WIF_IN_TECH_DATABASE;
|
||||
}
|
||||
|
||||
// intelligence
|
||||
for (i=0; i<Intel_info_size; i++)
|
||||
{
|
||||
if (Intel_info[i].flags & IIF_DEFAULT_IN_TECH_DATABASE)
|
||||
Intel_info[i].flags |= IIF_IN_TECH_DATABASE;
|
||||
else
|
||||
Intel_info[i].flags &= ~IIF_IN_TECH_DATABASE;
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/MenuUI/TechMenu.h $
|
||||
* $Revision: 2.0 $
|
||||
* $Date: 2002-06-03 04:02:24 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2003-03-03 04:28:37 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* Header file for code that controls the Tech Room menu
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.0 2002/06/03 04:02:24 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
* Revision 1.1 2002/05/02 18:03:10 mharris
|
||||
* Initial checkin - converted filenames and includes to lower case
|
||||
*
|
||||
@@ -79,9 +82,13 @@ typedef struct {
|
||||
char name[32];
|
||||
char desc[TECH_INTEL_DESC_LEN];
|
||||
char anim_filename[32];
|
||||
int in_tech_db; // determines if visible in tech db or not
|
||||
int flags;
|
||||
} intel_data;
|
||||
|
||||
// flags by Goober5000
|
||||
#define IIF_DEFAULT_VALUE 0
|
||||
#define IIF_IN_TECH_DATABASE (1 << 0) // in tech database? - Goober5000
|
||||
#define IIF_DEFAULT_IN_TECH_DATABASE (1 << 1) // in tech database by default? - Goober5000
|
||||
|
||||
extern intel_data Intel_info[MAX_INTEL_ENTRIES];
|
||||
extern int Intel_info_size;
|
||||
@@ -93,5 +100,7 @@ void techroom_close();
|
||||
void techroom_do_frame(float frametime);
|
||||
int techroom_on_ships_tab();
|
||||
void techroom_intel_init(); // called on startup so campaigns can manipulate tech room visibility
|
||||
int intel_info_lookup(char *name);
|
||||
extern void tech_reset_to_default();
|
||||
|
||||
#endif
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Mission/MissionCampaign.cpp $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2003-02-23 03:13:03 $
|
||||
* $Author: wmcoolmon $
|
||||
* $Revision: 2.8 $
|
||||
* $Date: 2003-03-03 04:28:36 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* source for dealing with campaigns
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.7 2003/02/23 03:13:03 wmcoolmon
|
||||
* Uncommented the sections of code that actually played a movie for a given mission. (Removed when daveb cleaned out the movie code for the release)
|
||||
*
|
||||
* Revision 2.6 2003/01/14 04:00:16 Goober5000
|
||||
* allowed for up to 256 main halls
|
||||
* --Goober5000
|
||||
@@ -587,6 +590,13 @@ int mission_campaign_load( char *filename, int load_savefile )
|
||||
stuff_int( &(Campaign.num_players) );
|
||||
}
|
||||
|
||||
// parse flags - Goober5000
|
||||
Campaign.flags = CF_DEFAULT_VALUE;
|
||||
if (optional_string("$Flags:"))
|
||||
{
|
||||
stuff_int( &(Campaign.flags) );
|
||||
}
|
||||
|
||||
// parse the optional ship/weapon information
|
||||
mission_campaign_get_sw_info();
|
||||
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Mission/MissionCampaign.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-01-14 04:00:16 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-03 04:28:36 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* header file for dealing with campaigns
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2003/01/14 04:00:16 Goober5000
|
||||
* allowed for up to 256 main halls
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:06 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -320,6 +324,11 @@
|
||||
|
||||
extern char *campaign_types[MAX_CAMPAIGN_TYPES];
|
||||
|
||||
|
||||
// campaign flags - Goober5000
|
||||
#define CF_DEFAULT_VALUE 0
|
||||
#define CF_CUSTOM_TECH_DATABASE (1 << 0) // Goober5000
|
||||
|
||||
// structure for a campaign definition. It contains the mission names and other interesting
|
||||
// information about a campaign and the mission strucuture within.
|
||||
|
||||
@@ -360,6 +369,7 @@ typedef struct campaign {
|
||||
char filename[MAX_FILENAME_LEN]; // filename the campaign info is in
|
||||
char *desc; // description of campaign
|
||||
int type; // type of campaign
|
||||
int flags; // flags - Goober5000
|
||||
int num_missions; // number of missions in the campaign
|
||||
int num_missions_completed; // number of missions in the campaign that have been flown
|
||||
int current_mission; // the current mission that the player is playing. Only valid during the mission
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/fs2open/fs2_open/code/mission/missionparse.h,v $
|
||||
* $Revision: 2.21 $
|
||||
* $Revision: 2.22 $
|
||||
* $Author: Goober5000 $
|
||||
* $Date: 2003-01-19 07:02:16 $
|
||||
* $Date: 2003-03-02 02:10:11 $
|
||||
*
|
||||
* main header file for parsing code
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.21 2003/01/19 07:02:16 Goober5000
|
||||
* fixed a bunch of bugs - "no-subspace-drive" should now work properly for
|
||||
* all ships, and all ships who have their departure anchor set to a capital ship
|
||||
* should exit to that ship when told to depart
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.20 2003/01/18 23:25:39 Goober5000
|
||||
* made "no-subspace-drive" applicable to all ships and fixed a really *STUPID*
|
||||
* bug that made FRED keep crashing (missing comma, bleagh!)
|
||||
@@ -398,7 +404,7 @@ extern char Mission_filename[80]; // filename of mission in The_mission (Fred o
|
||||
#define MAX_GOAL_TYPE_NAMES 3
|
||||
|
||||
// alternate ship type names
|
||||
#define MAX_ALT_TYPE_NAMES 10
|
||||
#define MAX_ALT_TYPE_NAMES 25
|
||||
extern char Mission_alt_types[MAX_ALT_TYPE_NAMES][NAME_LENGTH];
|
||||
extern int Mission_alt_type_count;
|
||||
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/MissionUI/MissionShipChoice.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-02-25 06:22:48 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-03-05 09:17:14 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* C module to allow player ship selection for the mission
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2003/02/25 06:22:48 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
* and they have limeted range with atenuated damage (table option)
|
||||
* added bank specific compatabilities
|
||||
*
|
||||
* Revision 2.2 2002/12/15 06:50:49 DTP
|
||||
* FIX; player can now have all ships set in FRED2 as allowed playerships in singleplayer
|
||||
*
|
||||
@@ -3270,13 +3276,14 @@ int ss_dump_to_list(int from_slot, int to_list, int *sound)
|
||||
// exit: data changed flag
|
||||
int ss_grab_from_list(int from_list, int to_slot, int *sound)
|
||||
{
|
||||
wss_unit *slot;
|
||||
wss_unit *slot;
|
||||
int i, wep[MAX_WL_WEAPONS], wep_count[MAX_WL_WEAPONS];
|
||||
|
||||
slot = &Wss_slots[to_slot];
|
||||
|
||||
// ensure that pool has ship
|
||||
if ( Ss_pool[from_list] <= 0 ) {
|
||||
if ( Ss_pool[from_list] <= 0 )
|
||||
{
|
||||
*sound=SND_ICON_DROP;
|
||||
return 0;
|
||||
}
|
||||
@@ -3289,8 +3296,9 @@ int ss_grab_from_list(int from_list, int to_slot, int *sound)
|
||||
|
||||
// take weapons from list->slot
|
||||
wl_get_default_weapons(from_list, to_slot, wep, wep_count);
|
||||
wl_remove_weps_from_pool(wep, wep_count, slot->ship_class, to_slot);
|
||||
for ( i = 0; i < MAX_WL_WEAPONS; i++ ) {
|
||||
wl_remove_weps_from_pool(wep, wep_count, slot->ship_class);
|
||||
for ( i = 0; i < MAX_WL_WEAPONS; i++ )
|
||||
{
|
||||
slot->wep[i] = wep[i];
|
||||
slot->wep_count[i] = wep_count[i];
|
||||
}
|
||||
@@ -3298,28 +3306,31 @@ int ss_grab_from_list(int from_list, int to_slot, int *sound)
|
||||
*sound=SND_ICON_DROP_ON_WING;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// exit: data changed flag
|
||||
int ss_swap_list_slot(int from_list, int to_slot, int *sound)
|
||||
{
|
||||
int i, wep[MAX_WL_WEAPONS], wep_count[MAX_WL_WEAPONS];
|
||||
wss_unit *slot;
|
||||
wss_unit *slot;
|
||||
|
||||
// ensure that pool has ship
|
||||
if ( Ss_pool[from_list] <= 0 ) {
|
||||
if ( Ss_pool[from_list] <= 0 )
|
||||
{
|
||||
*sound=SND_ICON_DROP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
slot = &Wss_slots[to_slot];
|
||||
Assert(slot->ship_class >= 0 ); // slot should be filled
|
||||
Assert(slot->ship_class >= 0 ); // slot should be filled
|
||||
|
||||
// put ship from slot->list
|
||||
Ss_pool[Wss_slots[to_slot].ship_class]++;
|
||||
|
||||
// put weapons from slot->list
|
||||
for ( i = 0; i < MAX_WL_WEAPONS; i++ ) {
|
||||
if ( (slot->wep[i] >= 0) && (slot->wep_count[i] > 0) ) {
|
||||
for ( i = 0; i < MAX_WL_WEAPONS; i++ )
|
||||
{
|
||||
if ( (slot->wep[i] >= 0) && (slot->wep_count[i] > 0) )
|
||||
{
|
||||
Wl_pool[slot->wep[i]] += slot->wep_count[i];
|
||||
slot->wep[i] = -1;
|
||||
slot->wep_count[i] = 0;
|
||||
@@ -3332,8 +3343,9 @@ int ss_swap_list_slot(int from_list, int to_slot, int *sound)
|
||||
|
||||
// take weapons from list->slot
|
||||
wl_get_default_weapons(from_list, to_slot, wep, wep_count);
|
||||
wl_remove_weps_from_pool(wep, wep_count, slot->ship_class, to_slot);
|
||||
for ( i = 0; i < MAX_WL_WEAPONS; i++ ) {
|
||||
wl_remove_weps_from_pool(wep, wep_count, slot->ship_class);
|
||||
for ( i = 0; i < MAX_WL_WEAPONS; i++ )
|
||||
{
|
||||
slot->wep[i] = wep[i];
|
||||
slot->wep_count[i] = wep_count[i];
|
||||
}
|
||||
@@ -3341,7 +3353,7 @@ int ss_swap_list_slot(int from_list, int to_slot, int *sound)
|
||||
*sound=SND_ICON_DROP_ON_WING;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void ss_apply(int mode, int from_slot, int from_list, int to_slot, int to_list,int player_index)
|
||||
{
|
||||
int update=0;
|
||||
|
||||
@@ -9,13 +9,21 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/MissionUI/MissionWeaponChoice.cpp $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2003-02-25 06:22:48 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.13 $
|
||||
* $Date: 2003-03-06 09:13:42 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* C module for the weapon loadout screen
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.12 2003/03/05 12:38:01 Goober5000
|
||||
* rewrote the restricted bank loadout code; it should work now
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.11 2003/03/05 09:17:14 Goober5000
|
||||
* cleaned out Bobboau's buggy code - about to rewrite with new, bug-free code :)
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.6 2003/01/15 21:29:05 anonymous
|
||||
* fixed the demo compilation. Define FS2_DEMO globally to compile as a demo. Make sure warp.pof is in your data/models directory.
|
||||
*
|
||||
@@ -1239,18 +1247,19 @@ int wl_get_ship_class(int wl_slot)
|
||||
|
||||
// Return true if weapon_flags indicates a weapon that is legal for use in current game type.
|
||||
// Function added by MK on 9/6/99 to support separate legal loadouts for dogfight missions.
|
||||
int weapon_allowed_for_game_type(int weapon_flags)
|
||||
// name changed by Goober5000 to better reflect what it actually does
|
||||
int eval_weapon_flag_for_game_type(int weapon_flags)
|
||||
{
|
||||
int rval = 0;
|
||||
|
||||
#if !defined NO_NETWORK && !defined FS2_DEMO
|
||||
if ((Game_mode & GM_MULTIPLAYER) && (Netgame.type_flags & NG_TYPE_DOGFIGHT)) {
|
||||
if (weapon_flags & (1 << 1))
|
||||
if (weapon_flags & DOGFIGHT_WEAPON)
|
||||
rval = 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (weapon_flags & (1 << 0))
|
||||
if (weapon_flags & REGULAR_WEAPON)
|
||||
rval = 1;
|
||||
|
||||
return rval;
|
||||
@@ -1275,20 +1284,16 @@ void wl_set_disabled_weapons(int ship_class)
|
||||
{
|
||||
// Determine whether weapon #i is allowed on this ship class in the current type of mission.
|
||||
// As of 9/6/99, the only difference is dogfight missions have a different list of legal weapons.
|
||||
for ( int k = 0; k < MAX_SECONDARY_BANKS; k++ ){//bank specific loadouts-Bobboau
|
||||
Wl_icons[i].can_use = weapon_allowed_for_game_type(sip->allowed_weapons[i][k]);
|
||||
Wl_icons[i].can_use = eval_weapon_flag_for_game_type(sip->allowed_weapons[i]);
|
||||
|
||||
// Goober5000: ballistic primaries
|
||||
if (Weapon_info[i].wi_flags2 & WIF2_BALLISTIC)
|
||||
// Goober5000: ballistic primaries
|
||||
if (Weapon_info[i].wi_flags2 & WIF2_BALLISTIC)
|
||||
{
|
||||
// not allowed if this ship is not ballistic
|
||||
if (!(sip->flags & SIF_BALLISTIC_PRIMARIES))
|
||||
{
|
||||
// not allowed if this ship is not ballistic
|
||||
if (!(sip->flags & SIF_BALLISTIC_PRIMARIES))
|
||||
{
|
||||
Wl_icons[i].can_use = 0;
|
||||
}
|
||||
Wl_icons[i].can_use = 0;
|
||||
}
|
||||
|
||||
if(Wl_icons[i].can_use != 0)break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1902,15 +1907,40 @@ void wl_get_parseobj_weapons(int sa_index, int ship_class, int *wep, int *wep_co
|
||||
}
|
||||
|
||||
// ensure that there aren't any bogus weapons assigned by default
|
||||
void wl_cull_illegal_weapons(int ship_class, int *wep, int *wep_count, int bank)
|
||||
void wl_cull_illegal_weapons(int ship_class, int *wep, int *wep_count)
|
||||
{
|
||||
int i;
|
||||
int i, check_flag;
|
||||
for ( i=0; i < MAX_WL_WEAPONS; i++ ) {
|
||||
if ( wep[i] < 0 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !weapon_allowed_for_game_type(Ship_info[ship_class].allowed_weapons[wep[i]][bank]) ) {
|
||||
check_flag = Ship_info[ship_class].allowed_weapons[wep[i]];
|
||||
|
||||
// possibly re-do flag according to whether it's restricted
|
||||
if (i < MAX_WL_PRIMARY)
|
||||
{
|
||||
if (i < MAX_SUPPORTED_PRIMARY_BANKS)
|
||||
{
|
||||
if (eval_weapon_flag_for_game_type(Ship_info[ship_class].restricted_loadout_flag[i]))
|
||||
{
|
||||
check_flag = Ship_info[ship_class].allowed_bank_restricted_weapons[i][wep[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i-MAX_WL_PRIMARY < MAX_SUPPORTED_SECONDARY_BANKS)
|
||||
{
|
||||
if (eval_weapon_flag_for_game_type(Ship_info[ship_class].restricted_loadout_flag[i-MAX_WL_PRIMARY+MAX_SUPPORTED_PRIMARY_BANKS]))
|
||||
{
|
||||
check_flag = Ship_info[ship_class].allowed_bank_restricted_weapons[i-MAX_WL_PRIMARY+MAX_SUPPORTED_PRIMARY_BANKS][wep[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( !eval_weapon_flag_for_game_type(check_flag) ) {
|
||||
// wep[i] = -1;
|
||||
wep_count[i] = 0;
|
||||
}
|
||||
@@ -1957,7 +1987,7 @@ void wl_get_default_weapons(int ship_class, int slot_num, int *wep, int *wep_cou
|
||||
}
|
||||
|
||||
// ensure that there aren't any bogus weapons assigned by default
|
||||
wl_cull_illegal_weapons(ship_class, wep, wep_count, slot_num);
|
||||
wl_cull_illegal_weapons(ship_class, wep, wep_count);
|
||||
}
|
||||
|
||||
// function to add a weapon_class to ui lists
|
||||
@@ -1986,7 +2016,7 @@ void wl_add_index_to_list(int wi_index)
|
||||
}
|
||||
|
||||
// remove the weapons specified by wep[] and wep_count[] from Wl_pool[].
|
||||
void wl_remove_weps_from_pool(int *wep, int *wep_count, int ship_class, int bank)
|
||||
void wl_remove_weps_from_pool(int *wep, int *wep_count, int ship_class)
|
||||
{
|
||||
int i, wi_index;
|
||||
|
||||
@@ -2017,7 +2047,7 @@ void wl_remove_weps_from_pool(int *wep, int *wep_count, int ship_class, int bank
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !weapon_allowed_for_game_type(Ship_info[ship_class].allowed_weapons[wep_pool_index][bank]) ) {
|
||||
if ( !eval_weapon_flag_for_game_type(Ship_info[ship_class].allowed_weapons[wep_pool_index]) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2079,7 +2109,7 @@ void wl_fill_slots()
|
||||
|
||||
// get the weapons info that should be on ship by default
|
||||
wl_get_default_weapons(Wss_slots[i].ship_class, i, wep, wep_count);
|
||||
wl_remove_weps_from_pool(wep, wep_count, Wss_slots[i].ship_class, i);
|
||||
wl_remove_weps_from_pool(wep, wep_count, Wss_slots[i].ship_class);
|
||||
|
||||
// copy to Wss_slots[]
|
||||
for ( j = 0; j < MAX_WL_WEAPONS; j++ ) {
|
||||
@@ -3656,45 +3686,104 @@ void wl_saturate_bank(int ship_slot, int bank)
|
||||
// exit: 0 -> no data changed
|
||||
// 1 -> data changed
|
||||
// sound => gets filled with sound id to play
|
||||
// updated for specific bank by Goober5000
|
||||
int wl_swap_slot_slot(int from_bank, int to_bank, int ship_slot, int *sound)
|
||||
{
|
||||
wss_unit *slot;
|
||||
int class_mismatch_flag, from_index, to_index, forced_update;
|
||||
slot = &Wss_slots[ship_slot];
|
||||
|
||||
// usually zero, unless we have a strange update thingy
|
||||
forced_update = 0;
|
||||
|
||||
if ( slot->ship_class == -1 ) {
|
||||
Int3(); // should not be possible
|
||||
return 0;
|
||||
return forced_update;
|
||||
}
|
||||
|
||||
// do nothing if swapping with self
|
||||
if ( from_bank == to_bank ) {
|
||||
*sound=SND_ICON_DROP_ON_WING;
|
||||
return 0; // no update
|
||||
return forced_update; // no update
|
||||
}
|
||||
|
||||
// ensure that source bank exists and has something to pick from
|
||||
if ( slot->wep[from_bank] == -1 || slot->wep_count[from_bank] <= 0 ) {
|
||||
return 0;
|
||||
return forced_update;
|
||||
}
|
||||
|
||||
// ensure that the dest bank exists
|
||||
if ( slot->wep_count[to_bank] < 0 ) {
|
||||
return 0;
|
||||
return forced_update;
|
||||
}
|
||||
|
||||
//ensure that the two banks are both compatable types-Bobboau
|
||||
if(!weapon_allowed_for_game_type(Ship_info[slot->ship_class].allowed_weapons[Carried_wl_icon.weapon_class][to_bank])){
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "A %s can not carry %s weaponry in bank %d", Ship_info[slot->ship_class].name, Weapon_info[Carried_wl_icon.weapon_class].name, to_bank+1);
|
||||
return 0;
|
||||
}
|
||||
if(!weapon_allowed_for_game_type(Ship_info[slot->ship_class].allowed_weapons[slot->wep[to_bank]][from_bank])){
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "A %s can not carry %s weaponry in bank %d", Ship_info[slot->ship_class].name, Weapon_info[Carried_wl_icon.weapon_class].name, from_bank+1);
|
||||
return 0;
|
||||
}
|
||||
//Warning(LOCATION,"slot slot");
|
||||
// ensure banks are compatible as far as primary and secondary
|
||||
class_mismatch_flag = (IS_BANK_PRIMARY(from_bank) && IS_BANK_SECONDARY(to_bank)) || (IS_BANK_SECONDARY(from_bank) && IS_BANK_PRIMARY(to_bank));
|
||||
|
||||
// further ensure that restrictions aren't breached
|
||||
if (!class_mismatch_flag)
|
||||
{
|
||||
from_index = -1;
|
||||
to_index = -1;
|
||||
|
||||
// ensure that the banks are both of the same class
|
||||
if ( (IS_BANK_PRIMARY(from_bank) && IS_BANK_SECONDARY(to_bank)) || (IS_BANK_SECONDARY(from_bank) && IS_BANK_PRIMARY(to_bank)) ) {
|
||||
// calculate indices for ship_info
|
||||
if (from_bank < MAX_SUPPORTED_PRIMARY_BANKS)
|
||||
{
|
||||
from_index = from_bank;
|
||||
}
|
||||
if (to_bank < MAX_SUPPORTED_PRIMARY_BANKS)
|
||||
{
|
||||
to_index = to_bank;
|
||||
}
|
||||
if (MAX_WL_PRIMARY <= from_bank && from_bank-MAX_WL_PRIMARY < MAX_SUPPORTED_SECONDARY_BANKS)
|
||||
{
|
||||
from_index = from_bank - MAX_WL_PRIMARY + MAX_SUPPORTED_PRIMARY_BANKS;
|
||||
}
|
||||
if (MAX_WL_PRIMARY <= to_bank && to_bank-MAX_WL_PRIMARY < MAX_SUPPORTED_SECONDARY_BANKS)
|
||||
{
|
||||
to_index = to_bank - MAX_WL_PRIMARY + MAX_SUPPORTED_PRIMARY_BANKS;
|
||||
}
|
||||
|
||||
ship_info *sip = &Ship_info[slot->ship_class];
|
||||
|
||||
// check the to-bank first
|
||||
// check only if we have good bank numbering
|
||||
if (to_index >= 0)
|
||||
{
|
||||
if (eval_weapon_flag_for_game_type(sip->restricted_loadout_flag[to_index]))
|
||||
{
|
||||
if (!eval_weapon_flag_for_game_type(sip->allowed_bank_restricted_weapons[to_index][slot->wep[from_bank]]))
|
||||
{
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "This bank is unable to carry %s weaponry", Weapon_info[slot->wep[from_bank]].name);
|
||||
return forced_update;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check the from-bank
|
||||
// again, we must have good bank numbering
|
||||
if (from_index >= 0)
|
||||
{
|
||||
if (eval_weapon_flag_for_game_type(sip->restricted_loadout_flag[from_index]))
|
||||
{
|
||||
if (!eval_weapon_flag_for_game_type(sip->allowed_bank_restricted_weapons[from_index][slot->wep[to_bank]]))
|
||||
{
|
||||
// going from "from" to "to" is valid (from previous if), but going the other way isn't...
|
||||
// so return the "to" to the list before we move the "from"
|
||||
|
||||
// put to_bank back into list
|
||||
Wl_pool[slot->wep[to_bank]] += slot->wep_count[to_bank];; // return to list
|
||||
slot->wep[to_bank] = -1; // remove from slot
|
||||
slot->wep_count[to_bank] = 0;
|
||||
*sound=SND_ICON_DROP; // unless it changes later
|
||||
forced_update = 1; // because we can't return right away
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( class_mismatch_flag )
|
||||
{
|
||||
// put from_bank back into list
|
||||
Wl_pool[slot->wep[from_bank]] += slot->wep_count[from_bank];; // return to list
|
||||
slot->wep[from_bank] = -1; // remove from slot
|
||||
@@ -3723,7 +3812,7 @@ int wl_swap_slot_slot(int from_bank, int to_bank, int ship_slot, int *sound)
|
||||
|
||||
if ( dest_can_fit <= 0 ) {
|
||||
// dest bank is already full.. nothing to do here
|
||||
return 0;
|
||||
return forced_update;
|
||||
}
|
||||
|
||||
// see how much source can give
|
||||
@@ -3735,7 +3824,7 @@ int wl_swap_slot_slot(int from_bank, int to_bank, int ship_slot, int *sound)
|
||||
*sound=SND_ICON_DROP_ON_WING;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
return forced_update;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3754,7 +3843,7 @@ int wl_swap_slot_slot(int from_bank, int to_bank, int ship_slot, int *sound)
|
||||
}
|
||||
|
||||
Int3(); // should never get here
|
||||
return 0;
|
||||
return forced_update;
|
||||
}
|
||||
|
||||
// exit: 0 -> no data changed
|
||||
@@ -3786,7 +3875,7 @@ int wl_grab_from_list(int from_list, int to_bank, int ship_slot, int *sound)
|
||||
{
|
||||
wss_unit *slot;
|
||||
slot = &Wss_slots[ship_slot];
|
||||
int max_fit;
|
||||
int max_fit, to_index;
|
||||
|
||||
// ensure that the banks are both of the same class
|
||||
if ( (IS_LIST_PRIMARY(from_list) && IS_BANK_SECONDARY(to_bank)) || (IS_LIST_SECONDARY(from_list) && IS_BANK_PRIMARY(to_bank)) )
|
||||
@@ -3811,12 +3900,34 @@ int wl_grab_from_list(int from_list, int to_bank, int ship_slot, int *sound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//ensure that this bank can have this weapon-Bobboau
|
||||
if(!weapon_allowed_for_game_type(Ship_info[slot->ship_class].allowed_weapons[Carried_wl_icon.weapon_class][to_bank])){
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "A %s can not carry %s weaponry in bank %d", Ship_info[slot->ship_class].name, Weapon_info[Carried_wl_icon.weapon_class].name, to_bank+1);
|
||||
return 0;
|
||||
// ensure that this bank will accept the weapon
|
||||
to_index = -1;
|
||||
|
||||
// calculate index for ship_info
|
||||
if (to_bank < MAX_SUPPORTED_PRIMARY_BANKS)
|
||||
{
|
||||
to_index = to_bank;
|
||||
}
|
||||
//Warning(LOCATION,"list");
|
||||
if (MAX_WL_PRIMARY <= to_bank && to_bank-MAX_WL_PRIMARY < MAX_SUPPORTED_SECONDARY_BANKS)
|
||||
{
|
||||
to_index = to_bank - MAX_WL_PRIMARY + MAX_SUPPORTED_PRIMARY_BANKS;
|
||||
}
|
||||
|
||||
ship_info *sip = &Ship_info[slot->ship_class];
|
||||
|
||||
// check only if we have good bank numbering
|
||||
if (to_index >= 0)
|
||||
{
|
||||
if (eval_weapon_flag_for_game_type(sip->restricted_loadout_flag[to_index]))
|
||||
{
|
||||
if (!eval_weapon_flag_for_game_type(sip->allowed_bank_restricted_weapons[to_index][from_list]))
|
||||
{
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "This bank is unable to carry %s weaponry", Weapon_info[from_list].name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// find how much dest bank can fit
|
||||
if ( to_bank < MAX_WL_PRIMARY )
|
||||
{
|
||||
@@ -3848,7 +3959,7 @@ int wl_swap_list_slot(int from_list, int to_bank, int ship_slot, int *sound)
|
||||
{
|
||||
wss_unit *slot;
|
||||
slot = &Wss_slots[ship_slot];
|
||||
int max_fit;
|
||||
int max_fit, to_index;
|
||||
|
||||
// ensure that the banks are both of the same class
|
||||
if ( (IS_LIST_PRIMARY(from_list) && IS_BANK_SECONDARY(to_bank)) || (IS_LIST_SECONDARY(from_list) && IS_BANK_PRIMARY(to_bank)) ) {
|
||||
@@ -3871,12 +3982,34 @@ int wl_swap_list_slot(int from_list, int to_bank, int ship_slot, int *sound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//ensure that this bank can have this weapon-Bobboau
|
||||
if(!weapon_allowed_for_game_type(Ship_info[slot->ship_class].allowed_weapons[Carried_wl_icon.weapon_class][to_bank])){
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "A %s can not carry %s weaponry in bank %d", Ship_info[slot->ship_class].name, Weapon_info[Carried_wl_icon.weapon_class].name, to_bank+1);
|
||||
return 0;
|
||||
// ensure that this bank will accept the weapon
|
||||
to_index = -1;
|
||||
|
||||
// calculate index for ship_info
|
||||
if (to_bank < MAX_SUPPORTED_PRIMARY_BANKS)
|
||||
{
|
||||
to_index = to_bank;
|
||||
}
|
||||
//Warning(LOCATION,"list slot");
|
||||
if (MAX_WL_PRIMARY <= to_bank && to_bank-MAX_WL_PRIMARY < MAX_SUPPORTED_SECONDARY_BANKS)
|
||||
{
|
||||
to_index = to_bank - MAX_WL_PRIMARY + MAX_SUPPORTED_PRIMARY_BANKS;
|
||||
}
|
||||
|
||||
ship_info *sip = &Ship_info[slot->ship_class];
|
||||
|
||||
// check only if we have good bank numbering
|
||||
if (to_index >= 0)
|
||||
{
|
||||
if (eval_weapon_flag_for_game_type(sip->restricted_loadout_flag[to_index]))
|
||||
{
|
||||
if (!eval_weapon_flag_for_game_type(sip->allowed_bank_restricted_weapons[to_index][from_list]))
|
||||
{
|
||||
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "This bank is unable to carry %s weaponry", Weapon_info[from_list].name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dump slot weapon back into list
|
||||
Wl_pool[slot->wep[to_bank]] += slot->wep_count[to_bank];
|
||||
slot->wep_count[to_bank] = 0;
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/MissionUI/MissionWeaponChoice.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-02-25 06:22:49 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-05 09:17:14 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* Header file for the weapon loadout screen
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2003/02/25 06:22:49 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
* and they have limeted range with atenuated damage (table option)
|
||||
* added bank specific compatabilities
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:07 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -174,7 +180,7 @@ void wl_reset_to_defaults();
|
||||
// Set selected slot to first placed ship
|
||||
void wl_reset_selected_slot();
|
||||
|
||||
void wl_remove_weps_from_pool(int *wep, int *wep_count, int ship_class, int bank);
|
||||
void wl_remove_weps_from_pool(int *wep, int *wep_count, int ship_class);
|
||||
void wl_get_ship_class_weapons(int ship_class, int *wep, int *wep_count);
|
||||
void wl_get_default_weapons(int ship_class, int slot_num, int *wep, int *wep_count);
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Model/MODEL.H $
|
||||
* $Revision: 2.20 $
|
||||
* $Date: 2003-01-20 05:40:49 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.21 $
|
||||
* $Date: 2003-03-02 05:54:23 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* header file for information about polygon models
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.20 2003/01/20 05:40:49 bobboau
|
||||
* added several sExps for turning glow points and glow maps on and off
|
||||
*
|
||||
* Revision 2.19 2003/01/19 06:44:39 Goober5000
|
||||
* got rid of nameplate stuff (superceded by texture replacement)
|
||||
* --Goober5000
|
||||
@@ -447,7 +450,7 @@ typedef struct ai_rotation {
|
||||
float max;
|
||||
float min;
|
||||
int time;
|
||||
} ai_rotation;
|
||||
} ai_rotation_t;
|
||||
|
||||
#define MSS_AI_DOCK (1<<0) //model that animates when docking
|
||||
#define MSS_AI_ENGINE (1<<1) //model that animates baised on wich direction you're turning
|
||||
@@ -484,7 +487,7 @@ typedef struct model_subsystem { /* contains rotation rate info */
|
||||
// Rotation specific info
|
||||
float turn_rate; // The turning rate of this subobject, if MSS_FLAG_ROTATES is set.
|
||||
stepped_rotation_t *stepped_rotation; // turn rotation struct
|
||||
ai_rotation ai_rotation; // ai controlled rotation struct
|
||||
ai_rotation_t ai_rotation; // ai controlled rotation struct
|
||||
|
||||
// AWACS specific information
|
||||
float awacs_intensity; // awacs intensity of this subsystem
|
||||
@@ -1268,4 +1271,4 @@ void model_set_replacement_bitmap(int bmap);
|
||||
|
||||
void model_set_replacement_textures(int *replacement_textures);
|
||||
|
||||
int decal_make_model(polymodel * pm);
|
||||
int decal_make_model(polymodel * pm);
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Model/ModelInterp.cpp $
|
||||
* $Revision: 2.17 $
|
||||
* $Date: 2003-01-30 23:19:14 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.18 $
|
||||
* $Date: 2003-03-02 05:55:51 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Rendering models, I think.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.17 2003/01/30 23:19:14 phreak
|
||||
* enabled RGB lighting for OpenGL
|
||||
*
|
||||
* Revision 2.16 2003/01/21 17:24:16 Goober5000
|
||||
* fixed a few bugs in Bobboau's implementation of the glow sexps; also added
|
||||
* help for the sexps in sexp_tree
|
||||
@@ -329,6 +332,7 @@ int modelstats_num_boxes = 0;
|
||||
int glow_maps_active = 1;
|
||||
|
||||
extern int OGL_inited;
|
||||
extern int Gr_scaler_zbuffering;
|
||||
|
||||
// a lighting object
|
||||
typedef struct model_light_object {
|
||||
@@ -3133,7 +3137,6 @@ void model_really_render(int model_num, matrix *orient, vector * pos, uint flags
|
||||
|
||||
gr_set_bitmap( bank->glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, d );
|
||||
// mprintf(( "rendering glow with texture %d\n", bank->glow_bitmap ));
|
||||
extern int Gr_scaler_zbuffering;
|
||||
Gr_scaler_zbuffering = 1;
|
||||
g3_draw_bitmap(&p,0,w*0.5f, TMAP_FLAG_TEXTURED );
|
||||
//g3_draw_rotated_bitmap(&p,0.0f,w,w, TMAP_FLAG_TEXTURED );
|
||||
@@ -3297,7 +3300,6 @@ void model_really_render(int model_num, matrix *orient, vector * pos, uint flags
|
||||
g3_rotate_vertex( &p, &bank->pnt[j] );
|
||||
gr_set_bitmap( Interp_thrust_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, d );
|
||||
{
|
||||
extern int Gr_scaler_zbuffering;
|
||||
Gr_scaler_zbuffering = 1;
|
||||
g3_draw_bitmap(&p,0,w*0.5f, TMAP_FLAG_TEXTURED );
|
||||
//g3_draw_rotated_bitmap(&p,0.0f,w,w, TMAP_FLAG_TEXTURED );
|
||||
@@ -3880,4 +3882,4 @@ mprintf(("vert %d at x %0.2f y %0.2f z %0.2f u %0.2f v %0.2f\n", j, vecs[j].x, v
|
||||
mprintf(("decals rendered\n"));
|
||||
|
||||
}
|
||||
*/
|
||||
*/
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Model/ModelRead.cpp $
|
||||
* $Revision: 2.17 $
|
||||
* $Date: 2003-02-25 16:46:01 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.18 $
|
||||
* $Date: 2003-03-02 05:56:56 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* file which reads and deciphers POF information
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.17 2003/02/25 16:46:01 bobboau
|
||||
* fixing my bug fix for the warp model, and not being able to find it
|
||||
*
|
||||
* Revision 2.16 2003/02/25 06:22:49 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
@@ -749,6 +752,9 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef __WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#define MODEL_LIB
|
||||
|
||||
@@ -3810,4 +3816,4 @@ void model_duplicate_reskin(int modelnum, char *ship_name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/OsApi/OsApi.cpp $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2003-02-22 04:14:21 $
|
||||
* $Author: wmcoolmon $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2003-03-02 06:01:55 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Low level Windows code
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.5 2003/02/22 04:14:21 wmcoolmon
|
||||
* Added "os_app_activate_set"
|
||||
*
|
||||
* Revision 2.4 2003/01/07 00:02:08 phreak
|
||||
* fixed problem in win32_create_window() that disabled OpenGL from running in windowed mode
|
||||
*
|
||||
@@ -709,6 +712,18 @@ void os_poll()
|
||||
void debug_int3()
|
||||
{
|
||||
gr_activate(0);
|
||||
#ifdef _WIN32
|
||||
#if defined _MSC_VER
|
||||
_asm { int 3 };
|
||||
#elif defined __GNUC__
|
||||
asm("int $3");
|
||||
#else
|
||||
#error debug_int3: unknown compiler
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error debug_int3: unknown OS
|
||||
#endif
|
||||
|
||||
gr_activate(1);
|
||||
}
|
||||
}
|
||||
@@ -59,4 +59,5 @@ unsigned int os_config_read_uint( char *section, char *name, unsigned int defau
|
||||
// uses Ex versions of Windows registry functions
|
||||
char * os_config_read_string_ex( char *keyname, char *name, char *default_value );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -9,13 +9,18 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/OsApi/OutWnd.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2002-11-14 04:18:17 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-03-02 06:04:00 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Routines for debugging output
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2002/11/14 04:18:17 bobboau
|
||||
* added warp model and type 1 glow points
|
||||
* and well as made the new glow file type,
|
||||
* some general improvement to fighter beams,
|
||||
*
|
||||
*
|
||||
* 6 6/03/99 6:37p Dave
|
||||
* More TNT fun. Made perspective bitmaps more flexible.
|
||||
@@ -195,6 +200,30 @@ int Outwnd_no_filter_file = 0; // 0 = .cfg file found, 1 = not found and warnin
|
||||
char *Freespace_logfilename = "fs.log";
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
inline void _outp(unsigned short port, unsigned char value)
|
||||
{
|
||||
asm(
|
||||
"mov %0,%%al;"
|
||||
"mov %1,%%dx;"
|
||||
"out %%al,%%dx;"
|
||||
: : "g" (value), "g" (port) : "al", "dx");
|
||||
}
|
||||
|
||||
inline unsigned char _inp(unsigned short port)
|
||||
{
|
||||
unsigned char value;
|
||||
asm(
|
||||
"mov %1,%%dx;"
|
||||
"in %%dx,%%al;"
|
||||
"mov %%al,%0"
|
||||
: "=g"(value) : "g" (port) : "al", "dx");
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
inline void text_hilight(HDC &hdc)
|
||||
{
|
||||
SetBkColor(hdc, RGB(0, 0, 0));
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/fs2open/fs2_open/code/parse/parselo.cpp,v $
|
||||
* $Revision: 2.5 $
|
||||
* $Author: phreak $
|
||||
* $Date: 2003-01-30 23:19:33 $
|
||||
* $Revision: 2.6 $
|
||||
* $Author: penguin $
|
||||
* $Date: 2003-03-02 06:10:58 $
|
||||
*
|
||||
* low level parse routines common to all types of parsers
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.5 2003/01/30 23:19:33 phreak
|
||||
* cleaned up debug output
|
||||
*
|
||||
* Revision 2.4 2003/01/19 01:07:42 bobboau
|
||||
* redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it
|
||||
*
|
||||
@@ -1159,7 +1162,7 @@ void read_file_text(char *filename, int mode)
|
||||
strcpy(Current_filename, filename);
|
||||
mf = cfopen(filename, "rb", CFILE_NORMAL, mode);
|
||||
if (mf == NULL) {
|
||||
nprintf(("Error", "Wokka! Error opening mission.txt (%s)!\n", filename));
|
||||
nprintf(("Error", "Wokka! Error opening file (%s)!\n", filename));
|
||||
longjmp(parse_abort, 5);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/parse/SEXP.CPP $
|
||||
* $Revision: 2.40 $
|
||||
* $Date: 2003-01-26 18:37:19 $
|
||||
* $Revision: 2.42 $
|
||||
* $Date: 2003-03-03 04:28:37 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* main sexpression generator
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.41 2003/03/01 01:15:38 Goober5000
|
||||
* fixed the initial status bug
|
||||
*
|
||||
* Revision 2.40 2003/01/26 18:37:19 Goober5000
|
||||
* changed change-music to change-soundtrack
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.39 2003/01/25 04:54:36 Goober5000
|
||||
* added preloader to change-ship-model and change-ship-class so that the game
|
||||
* doesn't hesitate when switching models in the middle of missions
|
||||
@@ -538,6 +545,7 @@
|
||||
#include "ship/awacs.h"
|
||||
#include "hud/hudsquadmsg.h" // for the order sexp
|
||||
#include "gamesnd/eventmusic.h" // for change-soundtrack
|
||||
#include "menuui/techmenu.h" // for intel stuff
|
||||
|
||||
#ifndef NO_NETWORK
|
||||
#include "network/multi.h"
|
||||
@@ -732,6 +740,8 @@ sexp_oper Operators[] = {
|
||||
{ "allow-weapon", OP_ALLOW_WEAPON, 1, 1, },
|
||||
{ "tech-add-ships", OP_TECH_ADD_SHIP, 1, INT_MAX },
|
||||
{ "tech-add-weapons", OP_TECH_ADD_WEAPON, 1, INT_MAX },
|
||||
{ "tech-add-intel", OP_TECH_ADD_INTEL, 1, INT_MAX }, // Goober5000
|
||||
{ "tech-reset-to-default", OP_TECH_RESET_TO_DEFAULT, 0, 0 }, // Goober5000
|
||||
|
||||
{ "don't-collide-invisible", OP_DONT_COLLIDE_INVISIBLE, 1, INT_MAX }, // Goober5000
|
||||
{ "collide-invisible", OP_COLLIDE_INVISIBLE, 1, INT_MAX }, // Goober5000
|
||||
@@ -2230,6 +2240,20 @@ int check_sexp_syntax(int index, int return_type, int recursive, int *bad_index,
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case OPF_INTEL_NAME:
|
||||
if ( type2 != SEXP_ATOM_STRING )
|
||||
return SEXP_CHECK_TYPE_MISMATCH;
|
||||
|
||||
for (i = 0; i < Intel_info_size; i++ ) {
|
||||
if ( !stricmp(CTEXT(index), Intel_info[i].name) )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( i == Intel_info_size )
|
||||
return SEXP_CHECK_INVALID_INTEL_NAME;
|
||||
|
||||
break;
|
||||
|
||||
case OPF_SHIP_CLASS_NAME:
|
||||
if ( type2 != SEXP_ATOM_STRING )
|
||||
@@ -6355,12 +6379,40 @@ void sexp_tech_add_weapon(int node)
|
||||
if (i >= 0)
|
||||
Weapon_info[i].wi_flags |= WIF_IN_TECH_DATABASE;
|
||||
else
|
||||
Error(LOCATION, "Ship class \"%s\" invalid", name);
|
||||
Error(LOCATION, "Weapon class \"%s\" invalid", name);
|
||||
|
||||
node = CDR(node);
|
||||
}
|
||||
}
|
||||
|
||||
void sexp_tech_add_intel(int node)
|
||||
{
|
||||
int i;
|
||||
char *name;
|
||||
|
||||
Assert(node >= 0);
|
||||
// this function doesn't mean anything when not in campaign mode
|
||||
if ( !(Game_mode & GM_CAMPAIGN_MODE) )
|
||||
return;
|
||||
|
||||
while (node >= 0) {
|
||||
name = CTEXT(node);
|
||||
i = intel_info_lookup(name);
|
||||
if (i >= 0)
|
||||
Intel_info[i].flags |= IIF_IN_TECH_DATABASE;
|
||||
else
|
||||
Error(LOCATION, "Intel name \"%s\" invalid", name);
|
||||
|
||||
node = CDR(node);
|
||||
}
|
||||
}
|
||||
|
||||
// Goober5000 - reset all the tech entries to their default states
|
||||
void sexp_tech_reset_to_default()
|
||||
{
|
||||
tech_reset_to_default();
|
||||
}
|
||||
|
||||
// function to set variables needed to grant a new ship/weapon to the player during the course
|
||||
// of a mission
|
||||
void sexp_allow_ship( int n )
|
||||
@@ -7875,7 +7927,7 @@ void sexp_change_ship_class(int n)
|
||||
// don't mess with a ship that's occupied
|
||||
if (!(Ships[ship_num].flags & (SF_DYING | SF_ARRIVING | SF_DEPARTING)))
|
||||
{
|
||||
change_ship_type(ship_num, class_num);
|
||||
change_ship_type(ship_num, class_num, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9789,6 +9841,16 @@ int eval_sexp(int cur_node)
|
||||
sexp_val = 1;
|
||||
break;
|
||||
|
||||
case OP_TECH_ADD_INTEL:
|
||||
sexp_tech_add_intel(node);
|
||||
sexp_val = 1;
|
||||
break;
|
||||
|
||||
case OP_TECH_RESET_TO_DEFAULT:
|
||||
sexp_tech_reset_to_default();
|
||||
sexp_val = 1;
|
||||
break;
|
||||
|
||||
// in the case of a red_alert mission, simply call the red alert function to close
|
||||
// the current campaign's mission and move forward to the next mission
|
||||
case OP_RED_ALERT:
|
||||
@@ -10334,6 +10396,8 @@ int query_operator_return_type(int op)
|
||||
case OP_ALLOW_WEAPON:
|
||||
case OP_TECH_ADD_SHIP:
|
||||
case OP_TECH_ADD_WEAPON:
|
||||
case OP_TECH_ADD_INTEL:
|
||||
case OP_TECH_RESET_TO_DEFAULT:
|
||||
case OP_WARP_BROKEN:
|
||||
case OP_WARP_NOT_BROKEN:
|
||||
case OP_WARP_NEVER:
|
||||
@@ -10931,6 +10995,12 @@ int query_operator_argument_type(int op, int argnum)
|
||||
case OP_TECH_ADD_WEAPON:
|
||||
return OPF_WEAPON_NAME;
|
||||
|
||||
case OP_TECH_ADD_INTEL:
|
||||
return OPF_INTEL_NAME;
|
||||
|
||||
case OP_TECH_RESET_TO_DEFAULT:
|
||||
return OPF_NONE;
|
||||
|
||||
case OP_SHIP_VAPORIZE:
|
||||
case OP_SHIP_NO_VAPORIZE:
|
||||
return OPF_SHIP;
|
||||
@@ -11560,6 +11630,9 @@ char *sexp_error_message(int num)
|
||||
case SEXP_CHECK_INVALID_WEAPON_NAME:
|
||||
return "Invalid weapon name";
|
||||
|
||||
case SEXP_CHECK_INVALID_INTEL_NAME:
|
||||
return "Invalid intel name";
|
||||
|
||||
case SEXP_CHECK_INVALID_SHIP_CLASS_NAME:
|
||||
return "Invalid ship class name";
|
||||
|
||||
@@ -12018,6 +12091,8 @@ int get_subcategory(int sexp_id)
|
||||
case OP_ALLOW_WEAPON:
|
||||
case OP_TECH_ADD_SHIP:
|
||||
case OP_TECH_ADD_WEAPON:
|
||||
case OP_TECH_ADD_INTEL:
|
||||
case OP_TECH_RESET_TO_DEFAULT:
|
||||
return CHANGE_SUBCATEGORY_MISSION_AND_CAMPAIGN;
|
||||
|
||||
case OP_MODIFY_VARIABLE:
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/fs2open/fs2_open/code/parse/sexp.h,v $
|
||||
* $Revision: 2.28 $
|
||||
* $Revision: 2.29 $
|
||||
* $Author: Goober5000 $
|
||||
* $Date: 2003-01-26 18:37:19 $
|
||||
* $Date: 2003-03-03 04:28:37 $
|
||||
*
|
||||
* header for sexpression parsing
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.28 2003/01/26 18:37:19 Goober5000
|
||||
* changed change-music to change-soundtrack
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.27 2003/01/25 04:17:39 Goober5000
|
||||
* added change-music sexp and bumped MAX_SOUNDTRACKS from 10 to 25
|
||||
* --Ian Warfield
|
||||
@@ -491,7 +495,7 @@
|
||||
#define OPF_DEPARTURE_LOCATION 43 // Goober5000
|
||||
#define OPF_SHIP_WITH_BAY 44 // Goober5000
|
||||
#define OPF_SOUNDTRACK_NAME 45 // Goober5000
|
||||
|
||||
#define OPF_INTEL_NAME 46 // Goober5000
|
||||
|
||||
// Operand return types
|
||||
#define OPR_NUMBER 1 // returns number
|
||||
@@ -724,6 +728,8 @@
|
||||
#define OP_DEACTIVATE_GLOW_POINT_BANK (0x0078 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) //-Bobboau
|
||||
#define OP_ACTIVATE_GLOW_POINT_BANK (0x0079 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) //-Bobboau
|
||||
#define OP_CHANGE_SOUNDTRACK (0x007a | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Goober5000
|
||||
#define OP_TECH_ADD_INTEL (0x007b | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Goober5000
|
||||
#define OP_TECH_RESET_TO_DEFAULT (0x007c | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Goober5000
|
||||
|
||||
|
||||
// debugging sexpressions
|
||||
@@ -927,6 +933,7 @@ char *CTEXT(int n);
|
||||
#define SEXP_CHECK_INVALID_DEPARTURE_LOCATION -134
|
||||
#define SEXP_CHECK_INVALID_ARRIVAL_ANCHOR_ALL -135
|
||||
#define SEXP_CHECK_INVALID_SOUNDTRACK_NAME -136
|
||||
#define SEXP_CHECK_INVALID_INTEL_NAME -137
|
||||
|
||||
#define TRAINING_CONTEXT_SPEED (1<<0)
|
||||
#define TRAINING_CONTEXT_FLY_PATH (1<<1)
|
||||
|
||||
@@ -9,14 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Playerman/ManagePilot.cpp $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-02-16 18:55:12 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2003-03-03 04:28:36 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* ManagePilot.cpp has code to load and save pilot files, and to select and
|
||||
* manage the pilot
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2003/02/16 18:55:12 phreak
|
||||
* fixed typecasting warnings
|
||||
*
|
||||
* Revision 2.3 2003/01/14 04:00:15 Goober5000
|
||||
* allowed for up to 256 main halls
|
||||
* --Goober5000
|
||||
@@ -411,7 +414,8 @@ void pilot_write_techroom_data(CFILE *file)
|
||||
|
||||
// write all intel entry flags out
|
||||
for (idx=0; idx<Intel_info_size; idx++) {
|
||||
cfwrite_ubyte((ubyte)Intel_info[idx].in_tech_db, file);
|
||||
out = (Intel_info[idx].flags & IIF_IN_TECH_DATABASE) ? (ubyte)1 : (ubyte)0;
|
||||
cfwrite_ubyte(out, file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,9 +469,9 @@ void pilot_read_techroom_data(CFILE *file)
|
||||
for (idx=0; idx<intel_count; idx++) {
|
||||
in = cfread_ubyte(file);
|
||||
if (in) {
|
||||
Intel_info[idx].in_tech_db = 1;
|
||||
Intel_info[idx].flags |= IIF_IN_TECH_DATABASE;
|
||||
} else {
|
||||
Intel_info[idx].in_tech_db = 0;
|
||||
Intel_info[idx].flags &= ~IIF_IN_TECH_DATABASE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+237
-123
@@ -9,13 +9,38 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Ship/Ship.cpp $
|
||||
* $Revision: 2.49 $
|
||||
* $Date: 2003-02-25 06:22:49 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.55 $
|
||||
* $Date: 2003-03-06 09:13:43 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* Ship (and other object) handling functions
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.54 2003/03/05 12:38:01 Goober5000
|
||||
* rewrote the restricted bank loadout code; it should work now
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.53 2003/03/05 09:17:15 Goober5000
|
||||
* cleaned out Bobboau's buggy code - about to rewrite with new, bug-free code :)
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.52 2003/03/03 17:15:16 Goober5000
|
||||
* fixed custom banks so that they no longer need the ":" between each entry
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.51 2003/03/03 04:28:37 Goober5000
|
||||
* fixed the tech room bug! yay!
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.50 2003/03/01 01:15:38 Goober5000
|
||||
* fixed the initial status bug
|
||||
*
|
||||
* Revision 2.49 2003/02/25 06:22:49 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
* and they have limeted range with atenuated damage (table option)
|
||||
* added bank specific compatabilities
|
||||
*
|
||||
* Revision 2.48 2003/02/16 05:14:29 bobboau
|
||||
* added glow map nebula bug fix for d3d, someone should add a fix for glide too
|
||||
* more importantly I (think I) have fixed all major bugs with fighter beams, and added a bit of new functionality
|
||||
@@ -1274,7 +1299,7 @@ int parse_ship()
|
||||
subsystems[idx].stepped_rotation = NULL;
|
||||
// subsystems[idx].ai_rotation = NULL;
|
||||
}
|
||||
int i, num_allowed, rtn = 0;
|
||||
int i, j, num_allowed, rtn = 0;
|
||||
int allowed_weapons[MAX_WEAPON_TYPES];
|
||||
int pbank_capacity_specified, pbank_capacity_count, sbank_capacity_count;
|
||||
|
||||
@@ -1481,75 +1506,111 @@ int parse_ship()
|
||||
stuff_int(&sip->shockwave_count);
|
||||
}
|
||||
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ ){
|
||||
for ( int k = 0; k < MAX_SECONDARY_BANKS; k++ )sip->allowed_weapons[i][k] = 0;
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )
|
||||
{
|
||||
sip->allowed_weapons[i] = 0;
|
||||
}
|
||||
|
||||
for ( i = 0; i < MAX_SHIP_WEAPONS; i++ )
|
||||
{
|
||||
sip->restricted_loadout_flag[i] = 0;
|
||||
for ( j = 0; j < MAX_WEAPON_TYPES; j++ )
|
||||
{
|
||||
sip->allowed_bank_restricted_weapons[i][j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
char temp_error[64];
|
||||
strcpy(temp_error, parse_error_text);
|
||||
|
||||
int b = 0;
|
||||
// Set the weapons filter used in weapons loadout (for primary weapons)
|
||||
if (optional_string("$Allowed PBanks:")) {
|
||||
|
||||
strcat(parse_error_text,"'s primary banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// actually say which weapons are allowed
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
for ( b = 0; b < MAX_PRIMARY_BANKS; b++ )sip->allowed_weapons[allowed_weapons[i]][b] |= 1;
|
||||
}
|
||||
}
|
||||
b = 1;
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )allowed_weapons[i] = -1;
|
||||
|
||||
while(optional_string(":")){
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )sip->allowed_weapons[i][b] = 0;
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
sip->allowed_weapons[allowed_weapons[i]][b] |= 1;
|
||||
}
|
||||
}
|
||||
b++;
|
||||
// Goober5000 - fixed Bobboau's implementation of restricted banks
|
||||
int bank;
|
||||
|
||||
// Set the weapons filter used in weapons loadout (for primary weapons)
|
||||
if (optional_string("$Allowed PBanks:"))
|
||||
{
|
||||
bank = -1;
|
||||
|
||||
while (check_for_string("("))
|
||||
{
|
||||
bank++;
|
||||
|
||||
// make sure we don't specify more than we have banks for
|
||||
if (bank > UPPER_BOUND_SUPPORTED_PRIMARY_BANK)
|
||||
{
|
||||
Warning(LOCATION, "$Allowed PBanks bank-specific loadout exceeds permissible number of primary banks. Ignoring the rest...");
|
||||
bank--;
|
||||
break;
|
||||
}
|
||||
|
||||
strcat(parse_error_text,"'s primary banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// actually say which weapons are allowed
|
||||
for ( i = 0; i < num_allowed; i++ )
|
||||
{
|
||||
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
{
|
||||
sip->allowed_bank_restricted_weapons[bank][allowed_weapons[i]] |= REGULAR_WEAPON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set flags if need be
|
||||
if (bank > 0) // meaning there was a restricted bank table entry
|
||||
{
|
||||
for (i=0; i<=bank; i++)
|
||||
{
|
||||
sip->restricted_loadout_flag[i] |= REGULAR_WEAPON;
|
||||
}
|
||||
}
|
||||
b=0;
|
||||
}
|
||||
|
||||
// Set the weapons filter used in weapons loadout (for primary weapons)
|
||||
if (optional_string("$Allowed Dogfight PBanks:")) {
|
||||
if (optional_string("$Allowed Dogfight PBanks:"))
|
||||
{
|
||||
bank = -1;
|
||||
|
||||
strcat(parse_error_text,"'s primary dogfight banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
while (check_for_string("("))
|
||||
{
|
||||
bank++;
|
||||
|
||||
// make sure we don't specify more than we have banks for
|
||||
if (bank > UPPER_BOUND_SUPPORTED_PRIMARY_BANK)
|
||||
{
|
||||
Warning(LOCATION, "$Allowed Dogfight PBanks bank-specific loadout exceeds permissible number of primary banks. Ignoring the rest...");
|
||||
bank--;
|
||||
break;
|
||||
}
|
||||
|
||||
strcat(parse_error_text,"'s primary dogfight banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// actually say which weapons are allowed
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
for ( b = 0; b < MAX_PRIMARY_BANKS; b++ )sip->allowed_weapons[allowed_weapons[i]][b] |= 2;
|
||||
for ( i = 0; i < num_allowed; i++ )
|
||||
{
|
||||
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
{
|
||||
sip->allowed_bank_restricted_weapons[bank][allowed_weapons[i]] |= DOGFIGHT_WEAPON;
|
||||
}
|
||||
}
|
||||
b = 1;
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )allowed_weapons[i] = -1;
|
||||
|
||||
while(optional_string(":")){
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )sip->allowed_weapons[i][b] = 0;
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
sip->allowed_weapons[allowed_weapons[i]][b] |= 2;
|
||||
}
|
||||
}
|
||||
b++;
|
||||
|
||||
}
|
||||
b=0;
|
||||
|
||||
// set flags if need be
|
||||
if (bank > 0) // meaning there was a restricted bank table entry
|
||||
{
|
||||
for (i=0; i<=bank; i++)
|
||||
{
|
||||
sip->restricted_loadout_flag[i] |= DOGFIGHT_WEAPON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get default primary bank weapons
|
||||
for ( i = 0; i < MAX_PRIMARY_BANKS; i++ ){
|
||||
// Get default primary bank weapons
|
||||
for ( i = 0; i < MAX_PRIMARY_BANKS; i++ )
|
||||
{
|
||||
sip->primary_bank_weapons[i] = -1;
|
||||
}
|
||||
|
||||
@@ -1559,7 +1620,8 @@ strcat(parse_error_text,"'s default primary banks");
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// error checking
|
||||
for ( i = 0; i < sip->num_primary_banks; i++ ) {
|
||||
for ( i = 0; i < sip->num_primary_banks; i++ )
|
||||
{
|
||||
Assert(sip->primary_bank_weapons[i] >= 0);
|
||||
}
|
||||
|
||||
@@ -1582,69 +1644,93 @@ strcpy(parse_error_text, temp_error);
|
||||
{
|
||||
Warning(LOCATION, "Primary bank capacities have not been completely specified for ship class %s... fix this!!", sip->name);
|
||||
}
|
||||
b = 0;
|
||||
}
|
||||
|
||||
// Set the weapons filter used in weapons loadout (for secondary weapons)
|
||||
if (optional_string("$Allowed SBanks:")) {
|
||||
strcat(parse_error_text,"'s secondary banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// actually say which weapons are allowed
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
for ( b = 0; b < MAX_SECONDARY_BANKS; b++ )sip->allowed_weapons[allowed_weapons[i]][b] |= 1;
|
||||
}
|
||||
}
|
||||
b = 1;
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )allowed_weapons[i] = -1;
|
||||
|
||||
while(optional_string(":")){
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )sip->allowed_weapons[i][b] = 0;
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
sip->allowed_weapons[allowed_weapons[i]][b] |= 1;
|
||||
}
|
||||
}
|
||||
b++;
|
||||
|
||||
}
|
||||
b=0;
|
||||
}
|
||||
|
||||
// Set the weapons filter used in weapons loadout (for secondary weapons)
|
||||
if (optional_string("$Allowed Dogfight SBanks:")) {
|
||||
strcat(parse_error_text,"'s primary dogfight banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
if (optional_string("$Allowed SBanks:"))
|
||||
{
|
||||
bank = -1;
|
||||
|
||||
while (check_for_string("("))
|
||||
{
|
||||
bank++;
|
||||
|
||||
// make sure we don't specify more than we have banks for
|
||||
if (bank > UPPER_BOUND_SUPPORTED_SECONDARY_BANK)
|
||||
{
|
||||
Warning(LOCATION, "$Allowed SBanks bank-specific loadout exceeds permissible number of secondary banks. Ignoring the rest...");
|
||||
bank--;
|
||||
break;
|
||||
}
|
||||
|
||||
strcat(parse_error_text,"'s secondary banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// actually say which weapons are allowed
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
for ( b = 0; b < MAX_SECONDARY_BANKS; b++ )sip->allowed_weapons[allowed_weapons[i]][b] |= 2;
|
||||
for ( i = 0; i < num_allowed; i++ )
|
||||
{
|
||||
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
{
|
||||
sip->allowed_bank_restricted_weapons[MAX_SUPPORTED_PRIMARY_BANKS+bank][allowed_weapons[i]] |= REGULAR_WEAPON;
|
||||
}
|
||||
}
|
||||
b = 1;
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )allowed_weapons[i] = -1;
|
||||
|
||||
while(optional_string(":")){
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
for ( i = 0; i < MAX_WEAPON_TYPES; i++ )sip->allowed_weapons[i][b] = 0;
|
||||
for ( i = 0; i < num_allowed; i++ ) {
|
||||
if ( allowed_weapons[i] >= 0 ) { // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
sip->allowed_weapons[allowed_weapons[i]][b] |= 2;
|
||||
}
|
||||
}
|
||||
b++;
|
||||
|
||||
}
|
||||
b=0;
|
||||
|
||||
// set flags if need be
|
||||
if (bank > 0) // meaning there was a restricted bank table entry
|
||||
{
|
||||
for (i=0; i<=bank; i++)
|
||||
{
|
||||
sip->restricted_loadout_flag[MAX_SUPPORTED_PRIMARY_BANKS+i] |= REGULAR_WEAPON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get default secondary bank weapons
|
||||
for ( i = 0; i < MAX_SECONDARY_BANKS; i++ ){
|
||||
// Set the weapons filter used in weapons loadout (for secondary weapons)
|
||||
if (optional_string("$Allowed Dogfight SBanks:"))
|
||||
{
|
||||
bank = -1;
|
||||
|
||||
while (check_for_string("("))
|
||||
{
|
||||
bank++;
|
||||
|
||||
// make sure we don't specify more than we have banks for
|
||||
if (bank > UPPER_BOUND_SUPPORTED_SECONDARY_BANK)
|
||||
{
|
||||
Warning(LOCATION, "$Allowed Dogfight SBanks bank-specific loadout exceeds permissible number of secondary banks. Ignoring the rest...");
|
||||
bank--;
|
||||
break;
|
||||
}
|
||||
|
||||
strcat(parse_error_text,"'s secondary dogfight banks");
|
||||
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// actually say which weapons are allowed
|
||||
for ( i = 0; i < num_allowed; i++ )
|
||||
{
|
||||
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
|
||||
{
|
||||
sip->allowed_bank_restricted_weapons[MAX_SUPPORTED_PRIMARY_BANKS+bank][allowed_weapons[i]] |= DOGFIGHT_WEAPON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set flags if need be
|
||||
if (bank > 0) // meaning there was a restricted bank table entry
|
||||
{
|
||||
for (i=0; i<=bank; i++)
|
||||
{
|
||||
sip->restricted_loadout_flag[MAX_SUPPORTED_PRIMARY_BANKS+i] |= DOGFIGHT_WEAPON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get default secondary bank weapons
|
||||
for ( i = 0; i < MAX_SECONDARY_BANKS; i++ )
|
||||
{
|
||||
sip->secondary_bank_weapons[i] = -1;
|
||||
}
|
||||
required_string("$Default SBanks:");
|
||||
@@ -1653,11 +1739,13 @@ strcat(parse_error_text,"'s default secondary banks");
|
||||
strcpy(parse_error_text, temp_error);
|
||||
|
||||
// error checking
|
||||
for ( i = 0; i < sip->num_secondary_banks; i++ ) {
|
||||
if(sip->secondary_bank_weapons[i] < 0){
|
||||
for ( i = 0; i < sip->num_secondary_banks; i++ )
|
||||
{
|
||||
if(sip->secondary_bank_weapons[i] < 0)
|
||||
{
|
||||
Warning(LOCATION, "%s has no secondary weapons, this cannot be!", sip->name);
|
||||
}
|
||||
// Assert(sip->secondary_bank_weapons[i] >= 0);
|
||||
}
|
||||
// Assert(sip->secondary_bank_weapons[i] >= 0);
|
||||
}
|
||||
|
||||
// Get the capacity of each secondary bank
|
||||
@@ -1665,9 +1753,23 @@ strcpy(parse_error_text, temp_error);
|
||||
strcat(parse_error_text,"'s secondary banks capacities");
|
||||
sbank_capacity_count = stuff_int_list(sip->secondary_bank_ammo_capacity, MAX_SECONDARY_BANKS, RAW_INTEGER_TYPE);
|
||||
strcpy(parse_error_text, temp_error);
|
||||
if ( sbank_capacity_count != sip->num_secondary_banks ) {
|
||||
if ( sbank_capacity_count != sip->num_secondary_banks )
|
||||
{
|
||||
Warning(LOCATION, "Secondary bank capacities have not been completely specified for ship class %s... fix this!!", sip->name);
|
||||
}
|
||||
|
||||
// copy to regular allowed_weapons array
|
||||
for (i=0; i<MAX_SHIP_WEAPONS; i++)
|
||||
{
|
||||
for (j=0; j<MAX_WEAPON_TYPES; j++)
|
||||
{
|
||||
if (sip->allowed_bank_restricted_weapons[i][j] & REGULAR_WEAPON)
|
||||
sip->allowed_weapons[j] |= REGULAR_WEAPON;
|
||||
|
||||
if (sip->allowed_bank_restricted_weapons[i][j] & DOGFIGHT_WEAPON)
|
||||
sip->allowed_weapons[j] |= DOGFIGHT_WEAPON;
|
||||
}
|
||||
}
|
||||
|
||||
required_string("$Shields:");
|
||||
stuff_float(&sip->shields);
|
||||
@@ -1762,6 +1864,12 @@ strcpy(parse_error_text, temp_error);
|
||||
}
|
||||
sip->flags2 = SIF2_DEFAULT_VALUE;
|
||||
|
||||
// set original status of tech database flags - Goober5000
|
||||
if (sip->flags & SIF_IN_TECH_DATABASE)
|
||||
sip->flags2 |= SIF2_DEFAULT_IN_TECH_DATABASE;
|
||||
if (sip->flags & SIF_IN_TECH_DATABASE_M)
|
||||
sip->flags2 |= SIF2_DEFAULT_IN_TECH_DATABASE_M;
|
||||
|
||||
// be friendly; ensure ballistic flags check out
|
||||
if (pbank_capacity_specified)
|
||||
{
|
||||
@@ -5532,7 +5640,7 @@ void ship_model_change(int n, int ship_type, int force_ship_info_stuff)
|
||||
// input: n => index of ship in Ships[] array
|
||||
// ship_type => ship class (index into Ship_info[])
|
||||
//
|
||||
void change_ship_type(int n, int ship_type)
|
||||
void change_ship_type(int n, int ship_type, int by_sexp)
|
||||
{
|
||||
ship_info *sip;
|
||||
ship *sp;
|
||||
@@ -5566,16 +5674,22 @@ void change_ship_type(int n, int ship_type)
|
||||
if (Fred_running) {
|
||||
objp->hull_strength = 100.0f;
|
||||
} else {
|
||||
// commented by Goober5000: we want to maintain hull strength
|
||||
//objp->hull_strength = sip->initial_hull_strength;
|
||||
// Goober5000: don't set hull strength if called by sexp
|
||||
if (!by_sexp)
|
||||
{
|
||||
objp->hull_strength = sip->initial_hull_strength;
|
||||
}
|
||||
}
|
||||
|
||||
// set the correct shields strength
|
||||
if (Fred_running) {
|
||||
objp->shields[0] = 100.0f;
|
||||
} else {
|
||||
// Goober5000 - again, we want to maintain shield strength
|
||||
//set_shield_strength(objp, sip->shields);
|
||||
// Goober5000: don't set shield strength if called by sexp
|
||||
if (!by_sexp)
|
||||
{
|
||||
set_shield_strength(objp, sip->shields);
|
||||
}
|
||||
}
|
||||
|
||||
sp->afterburner_fuel = sip->afterburner_fuel_capacity;
|
||||
@@ -7211,7 +7325,7 @@ int ship_select_next_primary(object *objp, int direction)
|
||||
}
|
||||
else
|
||||
{
|
||||
swp->current_primary_bank = UPPER_BOUND_PRIMARY_BANK;
|
||||
swp->current_primary_bank = UPPER_BOUND_SUPPORTED_PRIMARY_BANK;
|
||||
}
|
||||
}
|
||||
// now handle when not linked: cycle and constrain
|
||||
@@ -7219,7 +7333,7 @@ int ship_select_next_primary(object *objp, int direction)
|
||||
{
|
||||
if ( direction == CYCLE_PRIMARY_NEXT )
|
||||
{
|
||||
if ( swp->current_primary_bank < UPPER_BOUND_PRIMARY_BANK )
|
||||
if ( swp->current_primary_bank < UPPER_BOUND_SUPPORTED_PRIMARY_BANK )
|
||||
{
|
||||
swp->current_primary_bank++;
|
||||
}
|
||||
@@ -7260,7 +7374,7 @@ int ship_select_next_primary(object *objp, int direction)
|
||||
}
|
||||
else
|
||||
{
|
||||
swp->current_primary_bank = UPPER_BOUND_PRIMARY_BANK;
|
||||
swp->current_primary_bank = UPPER_BOUND_SUPPORTED_PRIMARY_BANK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+41
-13
@@ -9,13 +9,34 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Ship/Ship.h $
|
||||
* $Revision: 2.32 $
|
||||
* $Date: 2003-02-25 06:22:49 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.37 $
|
||||
* $Date: 2003-03-06 09:13:43 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* all sorts of cool stuff about ships
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.36 2003/03/05 12:38:01 Goober5000
|
||||
* rewrote the restricted bank loadout code; it should work now
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.35 2003/03/05 09:17:15 Goober5000
|
||||
* cleaned out Bobboau's buggy code - about to rewrite with new, bug-free code :)
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.34 2003/03/03 04:28:37 Goober5000
|
||||
* fixed the tech room bug! yay!
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.33 2003/03/01 01:15:38 Goober5000
|
||||
* fixed the initial status bug
|
||||
*
|
||||
* Revision 2.32 2003/02/25 06:22:49 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
* and they have limeted range with atenuated damage (table option)
|
||||
* added bank specific compatabilities
|
||||
*
|
||||
* Revision 2.31 2003/01/27 07:46:32 Goober5000
|
||||
* finished up my fighterbay code - ships will not be able to arrive from or depart into
|
||||
* fighterbays that have been destroyed (but you have to explicitly say in the tables
|
||||
@@ -434,10 +455,12 @@ extern vector Dead_camera_pos, Original_vec_to_deader;
|
||||
|
||||
// Goober5000 - currently only used in ship_select_next_primary and ship_select_next_secondary
|
||||
// Goober5000 - now used in hudtarget.cpp->hud_get_best_primary_bank
|
||||
// Goober5000 - now also used in ship.cpp for weapon specific bank parsing
|
||||
#define MAX_SUPPORTED_PRIMARY_BANKS 2
|
||||
#define UPPER_BOUND_PRIMARY_BANK (MAX_SUPPORTED_PRIMARY_BANKS - 1)
|
||||
#define UPPER_BOUND_SUPPORTED_PRIMARY_BANK (MAX_SUPPORTED_PRIMARY_BANKS - 1)
|
||||
#define MAX_SUPPORTED_SECONDARY_BANKS 3
|
||||
#define UPPER_BOUND_SECONDARY_BANK (MAX_SUPPORTED_SECONDARY_BANKS - 1)
|
||||
#define UPPER_BOUND_SUPPORTED_SECONDARY_BANK (MAX_SUPPORTED_SECONDARY_BANKS - 1)
|
||||
// IMPORTANT: MAX_SUPPORTED_PRIMARY_BANKS+MAX_SUPPORTED_SECONDARY_BANKS must equal MAX_SHIP_WEAPONS
|
||||
|
||||
// defines for 'direction' parameter of ship_select_next_primary()
|
||||
#define CYCLE_PRIMARY_NEXT 0
|
||||
@@ -946,8 +969,9 @@ extern int ship_find_exited_ship_by_signature( int signature);
|
||||
#define SIF_NO_FRED (1 << 31) // not available in fred
|
||||
|
||||
// flags2 -- added by Goober5000
|
||||
//#define SIF2_ [whatever] (1 << 0)
|
||||
//etc.
|
||||
#define SIF2_DEFAULT_IN_TECH_DATABASE (1 << 0) // default in tech database - Goober5000
|
||||
#define SIF2_DEFAULT_IN_TECH_DATABASE_M (1 << 1) // ditto - Goober5000
|
||||
|
||||
|
||||
#define MAX_SHIP_FLAGS 8 // Number of flags for flags field in ship_info struct
|
||||
#define SIF_DEFAULT_VALUE (SIF_DO_COLLISION_CHECK)
|
||||
@@ -987,6 +1011,9 @@ extern int ship_find_exited_ship_by_signature( int signature);
|
||||
#define SHIP_TYPE_CORVETTE 18
|
||||
#define SHIP_TYPE_KNOSSOS_DEVICE 19
|
||||
|
||||
#define REGULAR_WEAPON (1<<0)
|
||||
#define DOGFIGHT_WEAPON (1<<1)
|
||||
|
||||
// The real FreeSpace ship_info struct.
|
||||
typedef struct ship_info {
|
||||
char name[NAME_LENGTH]; // name for the ship
|
||||
@@ -1070,11 +1097,12 @@ typedef struct ship_info {
|
||||
vector closeup_pos; // position for camera when using ship in closeup view (eg briefing and hud target monitor)
|
||||
float closeup_zoom; // zoom when using ship in closeup view (eg briefing and hud target monitor)
|
||||
|
||||
int allowed_weapons[MAX_WEAPON_TYPES][MAX_SECONDARY_BANKS];
|
||||
// array which specifies which weapons can be loaded out by the
|
||||
// player during weapons loadout.
|
||||
// at this time secondary banks are larger than primary
|
||||
// now has bank specific loadout-Bobboau
|
||||
int allowed_weapons[MAX_WEAPON_TYPES]; // array which specifies which weapons can be loaded out by the
|
||||
// player during weapons loadout.
|
||||
|
||||
// Goober5000 - fix for restricted banks mod
|
||||
int restricted_loadout_flag[MAX_SHIP_WEAPONS];
|
||||
int allowed_bank_restricted_weapons[MAX_SHIP_WEAPONS][MAX_WEAPON_TYPES];
|
||||
|
||||
ubyte shield_icon_index; // index to locate ship-specific animation frames for the shield on HUD
|
||||
char icon_filename[NAME_LENGTH]; // filename for icon that is displayed in ship selection
|
||||
@@ -1248,7 +1276,7 @@ extern void ship_level_init(); // called before the start of each level
|
||||
|
||||
//returns -1 if failed
|
||||
extern int ship_create(matrix * orient, vector * pos, int ship_type, char *ship_name = NULL);
|
||||
extern void change_ship_type(int n, int ship_type);
|
||||
extern void change_ship_type(int n, int ship_type, int by_sexp = 0);
|
||||
extern void ship_model_change(int n, int ship_type, int force_ship_info_stuff = 0);
|
||||
extern void ship_process_pre( object * objp, float frametime );
|
||||
extern void ship_process_post( object * objp, float frametime );
|
||||
|
||||
@@ -9,13 +9,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Ship/ShipFX.cpp $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2003-01-19 01:07:42 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2003-03-03 09:53:32 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* Routines for ship effects (as in special)
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.5 2003/03/03 09:31:59 Goober5000
|
||||
* changed "Subspace node activated" message to "Subspace drive activated"
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.4 2003/01/19 01:07:42 bobboau
|
||||
* redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it
|
||||
*
|
||||
* Revision 2.3 2003/01/17 01:48:49 Goober5000
|
||||
* added capability to the $Texture replace code to substitute the textures
|
||||
* without needing and extra model, however, this way you can't substitute
|
||||
@@ -1084,7 +1091,9 @@ void shipfx_warpout_start( object *objp )
|
||||
}
|
||||
|
||||
if ( objp == Player_obj ) {
|
||||
HUD_printf(XSTR( "Subspace node activated", 498) );
|
||||
// changed by Goober5000 to be more accurate
|
||||
// HUD_printf(XSTR( "Subspace node activated", 498) );
|
||||
HUD_printf(NOX("Subspace drive activated"));
|
||||
}
|
||||
|
||||
float speed, effect_time, effect_radius;
|
||||
@@ -1105,9 +1114,9 @@ void shipfx_warpout_start( object *objp )
|
||||
if (shipp->special_warp_objnum >= 0) {
|
||||
// cap radius to size of knossos
|
||||
effect_radius = min(effect_radius, 0.8f*Objects[shipp->special_warp_objnum].radius);
|
||||
warp_objnum = fireball_create(&shipp->warp_effect_pos, FIREBALL_WARP_EFFECT, shipp->special_warp_objnum, effect_radius, 1, NULL, effect_time, shipp->ship_info_index);
|
||||
warp_objnum = fireball_create(&shipp->warp_effect_pos, FIREBALL_KNOSSOS_EFFECT, shipp->special_warp_objnum, effect_radius, 1, NULL, effect_time, shipp->ship_info_index);
|
||||
} else {
|
||||
warp_objnum = fireball_create(&shipp->warp_effect_pos, FIREBALL_KNOSSOS_EFFECT, OBJ_INDEX(objp), effect_radius, 1, NULL, effect_time, shipp->ship_info_index);
|
||||
warp_objnum = fireball_create(&shipp->warp_effect_pos, FIREBALL_WARP_EFFECT, OBJ_INDEX(objp), effect_radius, 1, NULL, effect_time, shipp->ship_info_index);
|
||||
}
|
||||
if (warp_objnum < 0 ) { // JAS: This must always be created, if not, just warp the ship in
|
||||
shipfx_actually_warpout(shipp,objp);
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Ship/ShipHit.cpp $
|
||||
* $Revision: 2.12 $
|
||||
* $Date: 2003-02-26 02:56:55 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.13 $
|
||||
* $Date: 2003-03-02 06:20:16 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Code to deal with a ship getting hit by something, be it a missile, dog, or ship.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.12 2003/02/26 02:56:55 bobboau
|
||||
* fixed the bug with fighter beams not giveing you kills
|
||||
*
|
||||
* Revision 2.11 2003/02/25 06:22:49 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
@@ -2365,6 +2368,7 @@ mprintf(("aplying damage to hull\n"));
|
||||
}
|
||||
break;
|
||||
case OBJ_BEAM://give kills for fighter beams-Bobboau
|
||||
{
|
||||
// object beam_obj = Objects[beam_get_parent(other_obj)];
|
||||
if((other_obj->parent < 0) || (other_obj->parent >= MAX_OBJECTS)){
|
||||
scoring_add_damage(ship_obj, NULL, damage);
|
||||
@@ -2372,6 +2376,7 @@ mprintf(("aplying damage to hull\n"));
|
||||
scoring_add_damage(ship_obj, &Objects[other_obj->parent], damage);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -2538,7 +2543,6 @@ mprintf(("doing TAG stuff\n"));
|
||||
} else if (Weapon_info[Weapons[other_obj->instance].weapon_info_index].tag_level == 3) {
|
||||
// tag C creates an SSM strike, yay -Bobboau
|
||||
struct ssm_firing_info;
|
||||
extern void ssm_create(vector *target, vector *start, int ssm_index, ssm_firing_info *override);
|
||||
|
||||
HUD_sourced_printf(HUD_SOURCE_HIDDEN, XSTR( "Firing artillery", 1570));
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/acm.cpp $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-08-01 01:41:10 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* C file for interface to Audio Compression Manager functions
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:29 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -56,7 +59,6 @@
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
#include <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include "sound/acm.h"
|
||||
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/acm.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-08-01 01:41:10 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Header file for interface to Audio Compression Manager functions
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:29 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -48,8 +51,8 @@
|
||||
#ifndef __FREESPACE_ACM_H__
|
||||
#define __FREESPACE_ACM_H__
|
||||
|
||||
#include <mmreg.h>
|
||||
#include <msacm.h>
|
||||
#include "mm/mmreg.h"
|
||||
#include "mm/msacm.h"
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
int ACM_convert_ADPCM_to_PCM(WAVEFORMATEX *pwfxSrc, ubyte *src, int src_len, ubyte **dest, int max_dest_bytes, int *dest_len, unsigned int *src_bytes_used, unsigned short dest_bps=16);
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/AudioStr.cpp $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-08-01 01:41:10 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Routines to stream large WAV files from disk
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:29 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -179,8 +182,8 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <mmreg.h>
|
||||
#include <msacm.h>
|
||||
#include "mm/mmreg.h"
|
||||
#include "mm/msacm.h"
|
||||
#include "directx/vdsound.h"
|
||||
#include "sound/audiostr.h"
|
||||
#include "cfile/cfile.h" // needed for cf_get_path
|
||||
@@ -1075,7 +1078,7 @@ long AudioStream::Get_Volume()
|
||||
// constructor
|
||||
void Timer::constructor(void)
|
||||
{
|
||||
m_nIDTimer = NULL;
|
||||
m_nIDTimer = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1084,7 +1087,7 @@ void Timer::destructor(void)
|
||||
{
|
||||
if (m_nIDTimer) {
|
||||
timeKillEvent (m_nIDTimer);
|
||||
m_nIDTimer = NULL;
|
||||
m_nIDTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1103,7 +1106,7 @@ BOOL Timer::Create (UINT nPeriod, UINT nRes, DWORD dwUser, TIMERCALLBACK pfnCall
|
||||
m_dwUser = dwUser;
|
||||
m_pfnCallback = pfnCallback;
|
||||
|
||||
if ((m_nIDTimer = timeSetEvent (m_nPeriod, m_nRes, TimeProc, (DWORD) this, TIME_PERIODIC)) == NULL) {
|
||||
if ((m_nIDTimer = timeSetEvent (m_nPeriod, m_nRes, TimeProc, (DWORD) this, TIME_PERIODIC)) == 0) {
|
||||
bRtn = FAILURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/ds.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-01-19 22:45:35 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* C file for interface to DirectSound
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2003/01/19 22:45:35 Goober5000
|
||||
* cleaned up build output a bit
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -325,6 +329,7 @@
|
||||
#include "sound/acm.h"
|
||||
#include "osapi/osapi.h"
|
||||
#include "sound/dscap.h"
|
||||
#include "mm/mmreg.h"
|
||||
|
||||
#include <objbase.h>
|
||||
#include <initguid.h>
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/ds.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-08-01 01:41:10 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Header file for interface to DirectSound
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:29 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -109,7 +112,6 @@
|
||||
#define __DS_H__
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include "directx/vdsound.h"
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/ds3d.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:10 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* C file for interface to DirectSound3D
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:56:00 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -103,7 +106,6 @@
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
#include <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include "directx/vdsound.h"
|
||||
|
||||
#include "sound/ds3d.h"
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Sound/Sound.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:10 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 06:37:24 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* Low-level sound code
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/08/01 01:41:10 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:56:00 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -306,7 +309,6 @@
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include "directx/vdsound.h"
|
||||
|
||||
#include "render/3dinternal.h"
|
||||
|
||||
@@ -446,9 +446,13 @@ int Encode(t_Sample* bufIn, t_Sample* bufOut, int sizeIn, int sizeOut,
|
||||
// theoretically evil but is not really all that dangerous in practice...
|
||||
|
||||
// disable compiler padding of structures
|
||||
#if defined _MSC_VER
|
||||
#pragma pack(push, packet_declarations)
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
|
||||
// most general notion of a packet pair
|
||||
struct t_PacketPair
|
||||
{
|
||||
@@ -544,8 +548,13 @@ struct t_PacketMF0
|
||||
};
|
||||
|
||||
// restore state of compiler padding of structures
|
||||
#if defined _MSC_VER
|
||||
#pragma pack(pop, packet_declarations)
|
||||
|
||||
#elif defined __GNUC__
|
||||
#pragma pack()
|
||||
#else
|
||||
#error unknown compiler
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1540,7 +1549,7 @@ static int ComputeNomData(t_Sample*& in, const int deltas[], int& level)
|
||||
// esi in
|
||||
// ebp data
|
||||
|
||||
#if defined(_WINDOWS)
|
||||
#if defined(_WIN32)
|
||||
#if defined(CODEC_DEMO)
|
||||
static int ComputeNomDataF(t_Sample*& inp, const int deltas[], int& level,
|
||||
t_Sample*& levels)
|
||||
@@ -1549,6 +1558,7 @@ static int ComputeNomDataF(t_Sample*& inp, const int deltas[], int& level)
|
||||
#endif
|
||||
{
|
||||
int data;
|
||||
#if defined _MSC_VER
|
||||
__asm
|
||||
{
|
||||
push ebp
|
||||
@@ -1602,16 +1612,22 @@ static int ComputeNomDataF(t_Sample*& inp, const int deltas[], int& level)
|
||||
mov [eax], esi // inp = esi
|
||||
mov [data], ebx
|
||||
}
|
||||
#elif defined __GNUC__
|
||||
#warning asm not implemented
|
||||
Error(LOCATION, "asm not implemented");
|
||||
#else
|
||||
#error unknown compiler
|
||||
#endif
|
||||
return data;
|
||||
}
|
||||
#else // if defined(_WINDOWS)
|
||||
#else // if defined(_WIN32)
|
||||
#if defined(CODEC_DEMO)
|
||||
int ComputeNomDataF(t_Sample*& inp, const int deltas[], int& level,
|
||||
t_Sample*& levels);
|
||||
#else
|
||||
int ComputeNomDataF(t_Sample*& inp, const int deltas[], int& level);
|
||||
#endif
|
||||
#endif // if defined(_WINDOWS)
|
||||
#endif // if defined(_WIN32)
|
||||
|
||||
#define VERIFY_ASM
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Weapon/Beam.cpp $
|
||||
* $Revision: 2.15 $
|
||||
* $Date: 2003-02-26 02:56:55 $
|
||||
* $Author: bobboau $
|
||||
* $Revision: 2.16 $
|
||||
* $Date: 2003-03-02 17:19:45 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* all sorts of cool stuff about ships
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.15 2003/02/26 02:56:55 bobboau
|
||||
* fixed the bug with fighter beams not giveing you kills
|
||||
*
|
||||
* Revision 2.14 2003/02/25 07:15:07 bobboau
|
||||
* doh... forgot something in the beam rendering code
|
||||
*
|
||||
@@ -2859,7 +2862,7 @@ void beam_add_collision(beam *b, object *hit_object, mc_info *cinfo)
|
||||
beam_collision *bc;
|
||||
int idx;
|
||||
int quadrant_num = -1;
|
||||
weapon_info *bwi = &Weapon_info[b->weapon_info_index];
|
||||
// weapon_info *bwi = &Weapon_info[b->weapon_info_index];
|
||||
|
||||
// if we haven't reached the limit for beam collisions, just add
|
||||
if(b->f_collision_count < MAX_FRAME_COLLISIONS){
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
* <insert description of file here>
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2003/02/25 06:22:50 bobboau
|
||||
* fixed a bunch of fighter beam bugs,
|
||||
* most notabley the sound now works corectly,
|
||||
* and they have limeted range with atenuated damage (table option)
|
||||
* added bank specific compatabilities
|
||||
*
|
||||
* Revision 2.7 2003/02/16 05:14:29 bobboau
|
||||
* added glow map nebula bug fix for d3d, someone should add a fix for glide too
|
||||
* more importantly I (think I) have fixed all major bugs with fighter beams, and added a bit of new functionality
|
||||
@@ -333,6 +339,9 @@
|
||||
// Bitflags controlling weapon behavior
|
||||
#define MAX_WEAPON_FLAGS 18 // Maximum number of different bit flags legal to specify in a single weapons.tbl Flags line
|
||||
|
||||
#define WIF_DEFAULT_VALUE 0
|
||||
#define WIF2_DEFAULT_VALUE 0
|
||||
|
||||
#define WIF_HOMING_HEAT (1 << 0) // if set, this weapon homes via seeking heat
|
||||
#define WIF_HOMING_ASPECT (1 << 1) // if set, this weapon homes via chasing aspect
|
||||
#define WIF_ELECTRONICS (1 << 2) // Takes out electronics systems.
|
||||
@@ -369,8 +378,9 @@
|
||||
#define WIF_LOCKARM (1 << 30) // if the missile was fired without a lock, it does significanlty less damage on impact
|
||||
#define WIF_STREAM (1 << 31) // handled by "trigger down/trigger up" instead of "fire - wait - fire - wait"
|
||||
|
||||
#define WIF2_BALLISTIC (1 << 0) // ballistic primaries - Goober5000
|
||||
#define WIF2_PIERCE (1 << 1) //shield pierceing -Bobboau
|
||||
#define WIF2_BALLISTIC (1 << 0) // ballistic primaries - Goober5000
|
||||
#define WIF2_PIERCE (1 << 1) // shield pierceing -Bobboau
|
||||
#define WIF2_DEFAULT_IN_TECH_DATABASE (1 << 2) // default in tech database - Goober5000
|
||||
|
||||
#define WIF_HOMING (WIF_HOMING_HEAT | WIF_HOMING_ASPECT)
|
||||
#define WIF_HURTS_BIG_SHIPS (WIF_BOMB | WIF_BEAM | WIF_HUGE | WIF_BIG_ONLY)
|
||||
|
||||
@@ -653,6 +653,10 @@ int weapon_info_lookup(char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
// bogus
|
||||
if (!name)
|
||||
return -1;
|
||||
|
||||
for (i=0; i<Num_weapon_types; i++)
|
||||
if (!stricmp(name, Weapon_info[i].name))
|
||||
return i;
|
||||
@@ -747,6 +751,10 @@ void parse_wi_flags(weapon_info *weaponp)
|
||||
Warning(LOCATION, "Bogus string in weapon flags: %s\n", weapon_strings[i]);
|
||||
}
|
||||
|
||||
// set default tech room status - Goober5000
|
||||
if (weaponp->wi_flags & WIF_IN_TECH_DATABASE)
|
||||
weaponp->wi_flags2 |= WIF2_DEFAULT_IN_TECH_DATABASE;
|
||||
|
||||
// SWARM, CORKSCREW and FLAK should be mutually exclusive
|
||||
if(weaponp->wi_flags & WIF_FLAK){
|
||||
Assert(!(weaponp->wi_flags & WIF_CORKSCREW) && !(weaponp->wi_flags & WIF_SWARM));
|
||||
@@ -778,7 +786,8 @@ int parse_weapon()
|
||||
|
||||
wip = &Weapon_info[Num_weapon_types];
|
||||
|
||||
wip->wi_flags = 0;
|
||||
wip->wi_flags = WIF_DEFAULT_VALUE;
|
||||
wip->wi_flags2 = WIF2_DEFAULT_VALUE;
|
||||
|
||||
required_string("$Name:");
|
||||
stuff_string(wip->name, F_NAME, NULL);
|
||||
@@ -941,6 +950,10 @@ int parse_weapon()
|
||||
stuff_float(&wip->damage);
|
||||
|
||||
// secondary weapons require these values
|
||||
wip->blast_force = 0;
|
||||
wip->inner_radius = 0;
|
||||
wip->outer_radius = 0;
|
||||
wip->shockwave_speed = 0;
|
||||
if (First_secondary_index != -1) {
|
||||
required_string("$Blast Force:");
|
||||
stuff_float( &(wip->blast_force) );
|
||||
@@ -1168,11 +1181,20 @@ int parse_weapon()
|
||||
// ballistic
|
||||
if (wip->wi_flags2 & WIF2_BALLISTIC)
|
||||
{
|
||||
Warning(LOCATION, "Secondary weapons can't be ballistic. Removing this flag...\n");
|
||||
Warning(LOCATION, "Secondary weapon %s can't be ballistic. Removing this flag...\n", wip->name);
|
||||
wip->wi_flags2 &= ~WIF2_BALLISTIC;
|
||||
}
|
||||
}
|
||||
|
||||
// also make sure EMP is friendly - Goober5000
|
||||
if (wip->wi_flags & WIF_EMP)
|
||||
{
|
||||
if (!wip->outer_radius)
|
||||
{
|
||||
Warning(LOCATION, "Outer blast radius of weapon %s is zero - EMP will not work.\nAdd $Outer Radius to weapon table entry.\n", wip->name);
|
||||
}
|
||||
}
|
||||
|
||||
char trail_name[MAX_FILENAME_LEN] = "";
|
||||
trail_info *ti = &wip->tr_info;
|
||||
memset(ti, 0, sizeof(trail_info));
|
||||
@@ -1405,7 +1427,7 @@ int parse_weapon()
|
||||
{
|
||||
stuff_float(&wip->b_info.range);
|
||||
}
|
||||
if (optional_string("+Atenuation:"))
|
||||
if (optional_string("+Attenuation:"))
|
||||
{
|
||||
stuff_float(&wip->b_info.damage_threshold);
|
||||
}
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-07-22 01:06:04 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-03-02 06:25:31 $
|
||||
* $Author: penguin $
|
||||
*
|
||||
* OS-dependent definitions.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2002/07/22 01:06:04 penguin
|
||||
* More defines for winsock compatibility
|
||||
*
|
||||
* Revision 2.1 2002/07/07 19:56:00 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
@@ -26,7 +29,7 @@
|
||||
#define LITTLE_ENDIAN 1234
|
||||
#define BIG_ENDIAN 4321
|
||||
|
||||
#if defined _M_IX86
|
||||
#if defined _M_IX86 || defined _X86_
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#else
|
||||
#error unknown byte order
|
||||
|
||||
+1400
File diff suppressed because it is too large.
Load diff
+1469
File diff suppressed because it is too large.
Load diff
+3701
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,136 @@
|
||||
dnl configure.in for fs2_open
|
||||
dnl
|
||||
dnl $Id: configure.in,v 2.2 2003-03-11 19:00:05 penguin Exp $
|
||||
|
||||
AC_INIT(fs2_open, 3.5)
|
||||
AC_CONFIG_SRCDIR(code/freespace2/freespace.cpp)
|
||||
AM_INIT_AUTOMAKE([ no-define ])
|
||||
|
||||
AC_DEFINE([NO_CD_CHECK])
|
||||
|
||||
dnl The configuration options
|
||||
dnl -------------------------
|
||||
|
||||
AC_ARG_ENABLE(joystick,
|
||||
AC_HELP_STRING([--disable-joystick],
|
||||
[TEST: disable joystick support]),
|
||||
[fs2_joystick=$enableval],
|
||||
[fs2_joystick=yes],
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(networking,
|
||||
AC_HELP_STRING([--disable-networking],
|
||||
[TEST: disable networking (multi-player)]),
|
||||
[fs2_networking=$enableval],
|
||||
[fs2_networking=yes],
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(sound,
|
||||
AC_HELP_STRING([--disable-sound],
|
||||
[TEST: disable sound]),
|
||||
[fs2_sound=$enableval],
|
||||
[fs2_sound=yes],
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(grsoft,
|
||||
AC_HELP_STRING([--enable-grsoft],
|
||||
[enable software rendering (needed for FRED)]),
|
||||
[fs2_grsoft=$enableval],
|
||||
[fs2_grsoft=no],
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],
|
||||
[build in DEBUG mode (default is release mode)]),
|
||||
[fs2_debug=$enableval],
|
||||
[fs2_debug=no],
|
||||
)
|
||||
|
||||
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl check OS type -- right now, we support
|
||||
dnl windows OS (via mingw) and unix (linux, etc.)
|
||||
dnl
|
||||
dnl the following block will need to be updated as additional
|
||||
dnl environments are supported
|
||||
fs2_os_win32="no"
|
||||
fs2_os_unix="no"
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
# windows
|
||||
echo "using Win32 defines (for $host_os)"
|
||||
fs2_os_win32="yes"
|
||||
;;
|
||||
linux*)
|
||||
# linux
|
||||
echo "Using Unix defines (for $host_os)"
|
||||
fs2_os_unix="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$fs2_os_win32" = "no" && test "$fs2_os_unix" = "no" ; then
|
||||
echo "fs2_open does not support $host_os"
|
||||
echo "check the configure.in file"
|
||||
echo "host_cpu: " $host_cpu
|
||||
echo "host_vendor: " $host_vendor
|
||||
echo "host_os: " $host_os
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
## define compiler switches
|
||||
if ! test "$fs2_joystick" = "yes" ; then
|
||||
AC_DEFINE([NO_JOYSTICK])
|
||||
fi
|
||||
if ! test "$fs2_networking" = "yes" ; then
|
||||
AC_DEFINE([NO_NETWORK])
|
||||
AC_DEFINE([NO_STANDALONE])
|
||||
fi
|
||||
if ! test "$fs2_sound" = "yes" ; then
|
||||
AC_DEFINE([NO_SOUND])
|
||||
fi
|
||||
if ! test "$fs2_grsoft" = "yes" ; then
|
||||
AC_DEFINE([NO_SOFTWARE_RENDERING])
|
||||
fi
|
||||
|
||||
if test "$fs2_debug" = "yes" ; then
|
||||
AC_DEFINE([_DEBUG])
|
||||
AC_SUBST(CXXFLAGS, [-O0 -g])
|
||||
AC_SUBST(LDFLAGS, [-g])
|
||||
else
|
||||
AC_DEFINE([NDEBUG])
|
||||
AC_SUBST(CXXFLAGS, [-O2])
|
||||
AC_SUBST(LDFLAGS, [])
|
||||
fi
|
||||
|
||||
|
||||
# generate appropriate conditionals for Makefile.am
|
||||
AM_CONDITIONAL(FS2_OS_WIN32, test "$fs2_os_win32" = "yes")
|
||||
AM_CONDITIONAL(FS2_OS_UNIX, test "$fs2_os_unix" = "yes")
|
||||
|
||||
AM_CONDITIONAL(FS2_JOYSTICK, test "$fs2_joystick" = "yes")
|
||||
AM_CONDITIONAL(FS2_NETWORKING, test "$fs2_networking" = "yes")
|
||||
AM_CONDITIONAL(FS2_SOUND, test "$fs2_sound" = "yes")
|
||||
AM_CONDITIONAL(FS2_GRSOFT, test "$fs2_grsoft" = "yes")
|
||||
|
||||
|
||||
dnl Check for programs
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl Check for headers
|
||||
|
||||
dnl -- this isn't working...
|
||||
dnl if test "$fs2_os_win32" = "yes" ; then
|
||||
dnl AC_SUBST(DX8_INCLUDE, [-I/dx8/include])
|
||||
dnl AC_CHECK_HEADER([dshow.h], [], [echo dshow.h not found; exit 1])
|
||||
dnl fi
|
||||
|
||||
dnl this is hardcoded until I can figure it out...
|
||||
AC_SUBST(DX8_INCLUDE, [-I/c/dx8/include])
|
||||
AC_SUBST(DX8_LIB, [-L/c/dx8/lib])
|
||||
|
||||
dnl The makefiles we create
|
||||
AC_OUTPUT([Makefile code/Makefile])
|
||||
Executable
+423
@@ -0,0 +1,423 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <[email protected]>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Executable
+276
@@ -0,0 +1,276 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
rmtmp=$dstdir/#rm.$$#
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
Executable
+336
@@ -0,0 +1,336 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <[email protected]>, 1996.
|
||||
|
||||
# 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, 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user