mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-08 07:28:22 -10:00
Compare commits
309
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a03eae9534 | ||
|
|
c7acf4519a | ||
|
|
a33b484b84 | ||
|
|
4f719b2c4d | ||
|
|
4b5f47441b | ||
|
|
6b3c4a3bbe | ||
|
|
2f8c97d99d | ||
|
|
3d527efc50 | ||
|
|
7dd62135a3 | ||
|
|
4071a37ef4 | ||
|
|
dd6eea5406 | ||
|
|
840a2b37b5 | ||
|
|
762d41f41c | ||
|
|
e0b48bec6f | ||
|
|
28b3a8cffa | ||
|
|
431335b27d | ||
|
|
237ae621a4 | ||
|
|
f959999594 | ||
|
|
997d57faae | ||
|
|
1f2a891c7a | ||
|
|
911528b6d7 | ||
|
|
9b6620e21c | ||
|
|
17fc45faba | ||
|
|
59add586e3 | ||
|
|
bb472f8669 | ||
|
|
2f807f5793 | ||
|
|
a770aeab31 | ||
|
|
afa8e9b947 | ||
|
|
6c733d9f7b | ||
|
|
4474d26e5b | ||
|
|
9ca91d3518 | ||
|
|
d4823f735a | ||
|
|
4f87d063b8 | ||
|
|
eaae1243e6 | ||
|
|
3ce44dcdfa | ||
|
|
17f4291b70 | ||
|
|
31019d38a2 | ||
|
|
bca69ce180 | ||
|
|
f56c5d230e | ||
|
|
45caba7c72 | ||
|
|
0fc13dfa87 | ||
|
|
f5b60aa156 | ||
|
|
023d5ffab0 | ||
|
|
a4760e9c70 | ||
|
|
a58587d3a5 | ||
|
|
3b35a4f9c1 | ||
|
|
6ddaabcead | ||
|
|
d706747bd1 | ||
|
|
503ea74554 | ||
|
|
128a6d840f | ||
|
|
a0b4747c57 | ||
|
|
e237b9d8ba | ||
|
|
0bd342af4a | ||
|
|
1c8018a5ab | ||
|
|
5760eaf5fc | ||
|
|
ea4341a938 | ||
|
|
a410c7f132 | ||
|
|
83f954520c | ||
|
|
29963bfe39 | ||
|
|
163b45fdab | ||
|
|
73eda1ee69 | ||
|
|
2ea42c0928 | ||
|
|
af3afff65c | ||
|
|
1651717c41 | ||
|
|
71b718a3b9 | ||
|
|
c619e7b3b7 | ||
|
|
6e5ee3312d | ||
|
|
14b29354bb | ||
|
|
9460f0c613 | ||
|
|
ff083e9600 | ||
|
|
008a450cfd | ||
|
|
1e5edb91a7 | ||
|
|
863475d8d0 | ||
|
|
5194bb5f80 | ||
|
|
2c6f07a416 | ||
|
|
664c3bf797 | ||
|
|
031b923385 | ||
|
|
db75f373b3 | ||
|
|
d2badfc49e | ||
|
|
200588c3b0 | ||
|
|
5511c94080 | ||
|
|
e4460b46f3 | ||
|
|
bd3855b315 | ||
|
|
00f6a2ee32 | ||
|
|
4594df128c | ||
|
|
a3b330bdf5 | ||
|
|
01a1403f67 | ||
|
|
a09c6beb5c | ||
|
|
d589bcd911 | ||
|
|
401dbfc523 | ||
|
|
6cc7c6fcbd | ||
|
|
7e37fee039 | ||
|
|
0e2d84c60e | ||
|
|
647a03d53c | ||
|
|
97e7b62860 | ||
|
|
da03d81df6 | ||
|
|
194717b0c8 | ||
|
|
ccf5d144b5 | ||
|
|
87552b959c | ||
|
|
1a384df3ce | ||
|
|
bf0a46d3f6 | ||
|
|
e0570a7677 | ||
|
|
738c92e036 | ||
|
|
56e60218b3 | ||
|
|
0dad90aa7f | ||
|
|
9abdc3e9ae | ||
|
|
35e62e4777 | ||
|
|
aa5d98a918 | ||
|
|
6e0f31092e | ||
|
|
1c98f5954d | ||
|
|
19b5126542 | ||
|
|
b5fa66428c | ||
|
|
6a0d138a08 | ||
|
|
14804a1396 | ||
|
|
38dbeab543 | ||
|
|
41fdb82dd1 | ||
|
|
91af9dbfc0 | ||
|
|
c3cc9f8e21 | ||
|
|
1429123da4 | ||
|
|
93973d4a49 | ||
|
|
df028f3714 | ||
|
|
6937a4d1e2 | ||
|
|
19680f4ebd | ||
|
|
8a450c6b4d | ||
|
|
dacc345814 | ||
|
|
349459c502 | ||
|
|
fc9655bde3 | ||
|
|
faac91b3be | ||
|
|
eaa75f0a3f | ||
|
|
6ca850fbe6 | ||
|
|
f035fff922 | ||
|
|
625220a856 | ||
|
|
134aeb0085 | ||
|
|
7d51c61184 | ||
|
|
ec523fdf0b | ||
|
|
849e22dfff | ||
|
|
d334ab504a | ||
|
|
09f3d78d1c | ||
|
|
363313ee59 | ||
|
|
48371badfc | ||
|
|
cd3bb82030 | ||
|
|
2f0a9985de | ||
|
|
83887ad91b | ||
|
|
7c6bde8551 | ||
|
|
d355d6be5c | ||
|
|
35441575e7 | ||
|
|
92424ee0e3 | ||
|
|
bb4974a467 | ||
|
|
d5cc98338e | ||
|
|
ea30714b53 | ||
|
|
12ce22b1a4 | ||
|
|
e2865c4576 | ||
|
|
14cbcbf2ac | ||
|
|
c71f96710f | ||
|
|
f787dd331d | ||
|
|
33b42b554e | ||
|
|
5ac6b0a787 | ||
|
|
11ae968eb6 | ||
|
|
48a882755e | ||
|
|
a179aa698b | ||
|
|
a69435baa1 | ||
|
|
2f4ff28011 | ||
|
|
6cef921092 | ||
|
|
4c53554eae | ||
|
|
ec7681b75d | ||
|
|
0d46b06833 | ||
|
|
6316b4a4e4 | ||
|
|
85d7186bf6 | ||
|
|
b5ae16e463 | ||
|
|
acbb64b9b4 | ||
|
|
63af0632df | ||
|
|
60d31003cf | ||
|
|
cb22efe237 | ||
|
|
3a7f5f7320 | ||
|
|
bf2870d53b | ||
|
|
5024413d68 | ||
|
|
e418257394 | ||
|
|
4640a5eea4 | ||
|
|
c55568852b | ||
|
|
21448785ec | ||
|
|
4acd808412 | ||
|
|
806e9eefd1 | ||
|
|
4634470897 | ||
|
|
670d6a9078 | ||
|
|
1bf056b5ca | ||
|
|
3aae4e73f2 | ||
|
|
bd64ca2cb9 | ||
|
|
1c6ef1c02c | ||
|
|
1119146fcd | ||
|
|
45d5f46063 | ||
|
|
a5407aff0a | ||
|
|
be1fba0b34 | ||
|
|
d1186a73ab | ||
|
|
cb8f3dd3e2 | ||
|
|
33144fdad4 | ||
|
|
89e6af4fb5 | ||
|
|
a1c0d95647 | ||
|
|
a4dbb0ee88 | ||
|
|
a4e1bcfd2d | ||
|
|
3ad5ea54fb | ||
|
|
2b9cdc2689 | ||
|
|
5a9eee5a12 | ||
|
|
ff8edc4adc | ||
|
|
d83dbd88c4 | ||
|
|
7af6e41fa1 | ||
|
|
b3c084db06 | ||
|
|
37cdc6a4fe | ||
|
|
e9a29ac2e6 | ||
|
|
f7ffb89690 | ||
|
|
77fcc86c14 | ||
|
|
f0dddf2854 | ||
|
|
d23c3a6e4d | ||
|
|
26726238b5 | ||
|
|
51d8809a22 | ||
|
|
92e696a6ea | ||
|
|
cae2b33d34 | ||
|
|
e1ab4e4532 | ||
|
|
21fe0590ed | ||
|
|
0d76068eb8 | ||
|
|
f6faea6f81 | ||
|
|
72c34be6f9 | ||
|
|
65da0763f7 | ||
|
|
baed9715df | ||
|
|
8d2fa0418a | ||
|
|
f7dd512ba8 | ||
|
|
9c9006f55e | ||
|
|
177698e014 | ||
|
|
70834437dd | ||
|
|
a501d4b688 | ||
|
|
cb0360016d | ||
|
|
55f179db5c | ||
|
|
e8c844b32a | ||
|
|
b8fb999660 | ||
|
|
93964edfed | ||
|
|
3a89eeffc9 | ||
|
|
72ac50ca24 | ||
|
|
6f8e5b4447 | ||
|
|
64efe3e91c | ||
|
|
eda444a92b | ||
|
|
7999173fc7 | ||
|
|
a4c2329316 | ||
|
|
e2b8ce4d5d | ||
|
|
13ee198069 | ||
|
|
84e74a8abf | ||
|
|
a1903268ad | ||
|
|
f36d1802df | ||
|
|
a8beea705e | ||
|
|
0e60209a24 | ||
|
|
5187223a76 | ||
|
|
d99263ed75 | ||
|
|
eb489320e1 | ||
|
|
1b906e0369 | ||
|
|
5019375c1f | ||
|
|
3f1f149312 | ||
|
|
698f4e0e16 | ||
|
|
c089510571 | ||
|
|
e2bb83fbdb | ||
|
|
16b030459f | ||
|
|
2fbdb960f6 | ||
|
|
e80f8b391d | ||
|
|
231f9a0246 | ||
|
|
eb26a123cf | ||
|
|
2b8c618b27 | ||
|
|
7d0c23b02b | ||
|
|
1fc27844ce | ||
|
|
d6d0be0a3c | ||
|
|
94b5611023 | ||
|
|
5142d17030 | ||
|
|
6bcd42f543 | ||
|
|
d00f29b663 | ||
|
|
633d2c58e2 | ||
|
|
55d46b3801 | ||
|
|
d329ae66ae | ||
|
|
54d0d3bd2c | ||
|
|
9a50e83dce | ||
|
|
a98bc2643a | ||
|
|
3bf411f705 | ||
|
|
2d0dc11c64 | ||
|
|
30c3556abc | ||
|
|
6a3569280a | ||
|
|
76215199f1 | ||
|
|
3d8b7de265 | ||
|
|
4bc768fc32 | ||
|
|
e34938c8dc | ||
|
|
254efe0d53 | ||
|
|
cdfd1299f0 | ||
|
|
c005dc7dad | ||
|
|
9193af0210 | ||
|
|
12eef3702d | ||
|
|
480175df7d | ||
|
|
8ae9aaebf8 | ||
|
|
e7ac8a5d12 | ||
|
|
6710e15c5c | ||
|
|
f5c586edaf | ||
|
|
16163aad45 | ||
|
|
1cb372a8e7 | ||
|
|
e22820c475 | ||
|
|
9469dee1b8 | ||
|
|
71aecd3927 | ||
|
|
a8f2fb5c24 | ||
|
|
5a4a0f9710 | ||
|
|
f5bbbff05b | ||
|
|
fc0251d305 | ||
|
|
7129774def | ||
|
|
fc71fe2c0e | ||
|
|
de55362fe1 | ||
|
|
4df953f3bd | ||
|
|
a867b1979c | ||
|
|
8acb0872ac |
No files matched your search
@@ -1,15 +0,0 @@
|
||||
# The "checkoutlist" file is used to support additional version controlled
|
||||
# administrative files in $CVSROOT/CVSROOT, such as template files.
|
||||
#
|
||||
# The first entry on a line is a filename which will be checked out from
|
||||
# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
|
||||
# The remainder of the line is an error message to use if the file cannot
|
||||
# be checked out.
|
||||
#
|
||||
# File format:
|
||||
#
|
||||
# [<whitespace>]<filename><whitespace><error message><end-of-line>
|
||||
#
|
||||
# comment lines begin with '#'
|
||||
new_commit_prep Error checking out/updating CVSROOT/new_commit_prep
|
||||
new_log_accum Error checking out/updating CVSROOT/new_log_accum
|
||||
@@ -1,17 +0,0 @@
|
||||
# The "commitinfo" file is used to control pre-commit checks.
|
||||
# The filter on the right is invoked with the repository and a list
|
||||
# of files to check. A non-zero exit of the filter program will
|
||||
# cause the commit to be aborted.
|
||||
#
|
||||
# The first entry on a line is a regular expression which is tested
|
||||
# against the directory that the change is being committed to, relative
|
||||
# to the $CVSROOT. For the first match that is found, then the remainder
|
||||
# of the line is the name of the filter to run.
|
||||
#
|
||||
# If the repository name does not match any of the regular expressions in this
|
||||
# file, the "DEFAULT" line is used, if it is specified.
|
||||
#
|
||||
# If the name "ALL" appears as a regular expression it is always used
|
||||
# in addition to the first matching regex or "DEFAULT".
|
||||
DEFAULT $CVSROOT/CVSROOT/new_commit_prep
|
||||
CVSROOT $CVSROOT/CVSROOT/new_commit_prep
|
||||
@@ -1,14 +0,0 @@
|
||||
# Set this to "no" if pserver shouldn't check system users/passwords
|
||||
#SystemAuth=no
|
||||
|
||||
# Put CVS lock files in this directory rather than directly in the repository.
|
||||
LockDir=/var/lock/cvs
|
||||
|
||||
# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
|
||||
# level of the new working directory when using the `cvs checkout'
|
||||
# command.
|
||||
#TopLevelAdmin=no
|
||||
|
||||
# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
|
||||
# history file, or a subset as needed (ie `TMAR' logs all write operations)
|
||||
#LogHistory=TOFEWGCMAR
|
||||
@@ -1,23 +0,0 @@
|
||||
# This file affects handling of files based on their names.
|
||||
#
|
||||
# The -t/-f options allow one to treat directories of files
|
||||
# as a single file, or to transform a file in other ways on
|
||||
# its way in and out of CVS.
|
||||
#
|
||||
# The -m option specifies whether CVS attempts to merge files.
|
||||
#
|
||||
# The -k option specifies keyword expansion (e.g. -kb for binary).
|
||||
#
|
||||
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
|
||||
#
|
||||
# wildcard [option value][option value]...
|
||||
#
|
||||
# where option is one of
|
||||
# -f from cvs filter value: path to filter
|
||||
# -t to cvs filter value: path to filter
|
||||
# -m update methodology value: MERGE or COPY
|
||||
# -k expansion mode value: b, o, kkv, &c
|
||||
#
|
||||
# and value is a single-quote delimited value.
|
||||
# For example:
|
||||
#*.gif -k 'b'
|
||||
@@ -1,21 +0,0 @@
|
||||
# The "editinfo" file is used to allow verification of logging
|
||||
# information. It works best when a template (as specified in the
|
||||
# rcsinfo file) is provided for the logging procedure. Given a
|
||||
# template with locations for, a bug-id number, a list of people who
|
||||
# reviewed the code before it can be checked in, and an external
|
||||
# process to catalog the differences that were code reviewed, the
|
||||
# following test can be applied to the code:
|
||||
#
|
||||
# Making sure that the entered bug-id number is correct.
|
||||
# Validating that the code that was reviewed is indeed the code being
|
||||
# checked in (using the bug-id number or a seperate review
|
||||
# number to identify this particular code set.).
|
||||
#
|
||||
# If any of the above test failed, then the commit would be aborted.
|
||||
#
|
||||
# Actions such as mailing a copy of the report to each reviewer are
|
||||
# better handled by an entry in the loginfo file.
|
||||
#
|
||||
# One thing that should be noted is the the ALL keyword is not
|
||||
# supported. There can be only one entry that matches a given
|
||||
# repository.
|
||||
@@ -1,30 +0,0 @@
|
||||
# The "loginfo" file controls where "cvs commit" log information
|
||||
# is sent. The first entry on a line is a regular expression which must match
|
||||
# the directory that the change is being made to, relative to the
|
||||
# $CVSROOT. If a match is found, then the remainder of the line is a filter
|
||||
# program that should expect log information on its standard input.
|
||||
#
|
||||
# If the repository name does not match any of the regular expressions in this
|
||||
# file, the "DEFAULT" line is used, if it is specified.
|
||||
#
|
||||
# If the name ALL appears as a regular expression it is always used
|
||||
# in addition to the first matching regex or DEFAULT.
|
||||
#
|
||||
# You may specify a format string as part of the
|
||||
# filter. The string is composed of a `%' followed
|
||||
# by a single format character, or followed by a set of format
|
||||
# characters surrounded by `{' and `}' as separators. The format
|
||||
# characters are:
|
||||
#
|
||||
# s = file name
|
||||
# V = old version number (pre-checkin)
|
||||
# v = new version number (post-checkin)
|
||||
#
|
||||
# For example:
|
||||
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
|
||||
# or
|
||||
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
|
||||
|
||||
DEFAULT $CVSROOT/CVSROOT/new_log_accum -m [email protected] %{sVv}
|
||||
CVSROOT $CVSROOT/CVSROOT/new_log_accum -m [email protected] %{sVv}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Three different line formats are valid:
|
||||
# key -a aliases...
|
||||
# key [options] directory
|
||||
# key [options] directory files...
|
||||
#
|
||||
# Where "options" are composed of:
|
||||
# -i prog Run "prog" on "cvs commit" from top-level of module.
|
||||
# -o prog Run "prog" on "cvs checkout" of module.
|
||||
# -e prog Run "prog" on "cvs export" of module.
|
||||
# -t prog Run "prog" on "cvs rtag" of module.
|
||||
# -u prog Run "prog" on "cvs update" of module.
|
||||
# -d dir Place module in directory "dir" instead of module name.
|
||||
# -l Top-level directory only -- do not recurse.
|
||||
#
|
||||
# NOTE: If you change any of the "Run" options above, you'll have to
|
||||
# release and re-checkout any working directories of these modules.
|
||||
#
|
||||
# And "directory" is a path to a directory relative to $CVSROOT.
|
||||
#
|
||||
# The "-a" option specifies an alias. An alias is interpreted as if
|
||||
# everything on the right of the "-a" had been typed on the command line.
|
||||
#
|
||||
# You can encode a module within a module by using the special '&'
|
||||
# character to interpose another module into the current module. This
|
||||
# can be useful for creating a module that consists of many directories
|
||||
# spread out over the entire source repository.
|
||||
@@ -1,104 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# Copyright (C) 2000 by Kevin L. Mitchell <[email protected]>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Script to store the last visited directory for newlogaccum.pl.
|
||||
#
|
||||
# $Id: new_commit_prep,v 1.1 2002-08-11 23:05:15 drevil Exp $
|
||||
|
||||
use strict;
|
||||
|
||||
# This routine removes everything in a directory
|
||||
sub clear_dir {
|
||||
my ($dir) = @_;
|
||||
my ($file);
|
||||
|
||||
opendir(DIR, $dir) || die "Cannot clear directory $dir: $!";
|
||||
while ($file = readdir(DIR)) {
|
||||
next
|
||||
if ($file eq "." || $file eq "..");
|
||||
|
||||
$file = "$dir/$file";
|
||||
|
||||
if (-d $file) {
|
||||
# It's a directory, recurse into it, then delete it.
|
||||
clear_dir($file);
|
||||
rmdir($file);
|
||||
} else {
|
||||
# It's a file, delete it.
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
|
||||
# This routine prepares a temporary directory, hopefully in a secure
|
||||
# fashion; it uses the process group to make secondary programs be able
|
||||
# to find it.
|
||||
sub tmpdir (;$) {
|
||||
my ($clear) = @_;
|
||||
my ($pgrp, $own, $mode, $tmpdir);
|
||||
|
||||
$pgrp = getpgrp();
|
||||
|
||||
die "Don't run $0 setuid!"
|
||||
unless ($< == $>);
|
||||
|
||||
# Decide on the directory name, using various environment variables
|
||||
$tmpdir = ($ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp") .
|
||||
"/.#cvs.$pgrp";
|
||||
|
||||
# Doesn't exist, but we can't create it...
|
||||
die "Can't create temporary directory $tmpdir: $!"
|
||||
unless (-e $tmpdir || mkdir($tmpdir, 0700));
|
||||
|
||||
die "Temporary directory $tmpdir is not a directory"
|
||||
unless (-d $tmpdir);
|
||||
|
||||
# Check ownership and permissions
|
||||
(undef, undef, $mode, undef, $own, undef) = stat($tmpdir);
|
||||
|
||||
die "Temporary directory $tmpdir not owned by $< (owned by $own)"
|
||||
unless ($own == $<);
|
||||
|
||||
die "Temporary directory $tmpdir group-writable"
|
||||
if ($mode & 0020);
|
||||
die "Temporary directory $tmpdir other-writable"
|
||||
if ($mode & 0002);
|
||||
|
||||
# If we're supposed to clear the directory, do so...
|
||||
clear_dir($tmpdir)
|
||||
if ($clear);
|
||||
|
||||
return $tmpdir;
|
||||
}
|
||||
|
||||
# This routine writes a single line to a file
|
||||
sub write_line ($$) {
|
||||
my ($fname, $line) = @_;
|
||||
|
||||
open(FILE, ">$fname") || die "Cannot open file $fname for writing";
|
||||
print FILE "$line\n";
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
# Create and empty the temporary directory
|
||||
my ($tmpdir) = (tmpdir(1));
|
||||
|
||||
# Store the directory name
|
||||
write_line("$tmpdir/lastdir", shift(@ARGV));
|
||||
@@ -1,757 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# Copyright (C) 2000 by Kevin L. Mitchell <[email protected]>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Script to accumulate log messages for an entire tree and send them along
|
||||
# with the diffs; deals correctly with all manner of branching (I hope)
|
||||
#
|
||||
# $Id: new_log_accum,v 1.3 2003-09-07 12:46:59 drevil Exp $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw($MAILER $CVS $debug $boundary);
|
||||
use Digest::MD5;
|
||||
|
||||
# Set this to the full path of a mailer that takes a list
|
||||
# of email addresses as arguments...
|
||||
$MAILER = "/usr/sbin/sendmail -oi -oeq";
|
||||
|
||||
# Set this to the path of the CVS binary responsible for this tree...
|
||||
$CVS = "/usr/bin/cvs";
|
||||
|
||||
# Don't touch this; use the -d command line option
|
||||
$debug = 0;
|
||||
|
||||
# This is initialized by build_mailheader()
|
||||
$boundary = '';
|
||||
|
||||
use POSIX qw(setsid);
|
||||
|
||||
# We have to dissociate from our parent, so that the CVS commit can
|
||||
# complete, before we try to extract the diffs
|
||||
sub daemonize {
|
||||
defined(my $pid = fork()) || die "Can't fork: $!";
|
||||
exit(0)
|
||||
if $pid;
|
||||
setsid() || die "Can't start a new session: $!";
|
||||
}
|
||||
|
||||
# Debugging output
|
||||
sub debug (@) {
|
||||
print STDERR @_
|
||||
if ($debug);
|
||||
}
|
||||
|
||||
# Constants used in the FSM below for parsing the log message
|
||||
sub STATE_NONE { 0 }
|
||||
sub STATE_MODIFIED { 1 }
|
||||
sub STATE_ADDED { 2 }
|
||||
sub STATE_REMOVED { 3 }
|
||||
sub STATE_LOG1 { 4 }
|
||||
sub STATE_LOG2 { 5 }
|
||||
|
||||
# This routine removes everything in a directory
|
||||
sub clear_dir {
|
||||
my ($dir) = @_;
|
||||
my ($file);
|
||||
|
||||
opendir(DIR, $dir) || die "Cannot clear directory $dir: $!";
|
||||
while ($file = readdir(DIR)) {
|
||||
next
|
||||
if ($file eq "." || $file eq "..");
|
||||
|
||||
$file = "$dir/$file";
|
||||
|
||||
if (-d $file) {
|
||||
# It's a directory, recurse into it, then delete it.
|
||||
clear_dir($file);
|
||||
rmdir($file);
|
||||
} else {
|
||||
# It's a file, delete it.
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
|
||||
# This routine prepares a temporary directory, hopefully in a secure
|
||||
# fashion; it uses the process group to make secondary programs be able
|
||||
# to find it.
|
||||
sub tmpdir (;$) {
|
||||
my ($clear) = @_;
|
||||
my ($pgrp, $own, $mode, $tmpdir);
|
||||
|
||||
$pgrp = getpgrp();
|
||||
|
||||
die "Don't run $0 setuid!"
|
||||
unless ($< == $>);
|
||||
|
||||
# Decide on the directory name, using various environment variables
|
||||
$tmpdir = ($ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp") .
|
||||
"/.#cvs.$pgrp";
|
||||
|
||||
# Doesn't exist, but we can't create it...
|
||||
die "Can't create temporary directory $tmpdir: $!"
|
||||
unless (-e $tmpdir || mkdir($tmpdir, 0700));
|
||||
|
||||
die "Temporary directory $tmpdir is not a directory"
|
||||
unless (-d $tmpdir);
|
||||
|
||||
# Check ownership and permissions
|
||||
(undef, undef, $mode, undef, $own, undef) = stat($tmpdir);
|
||||
|
||||
die "Temporary directory $tmpdir not owned by $< (owned by $own)"
|
||||
unless ($own == $<);
|
||||
|
||||
die "Temporary directory $tmpdir group-writable"
|
||||
if ($mode & 0020);
|
||||
die "Temporary directory $tmpdir other-writable"
|
||||
if ($mode & 0002);
|
||||
|
||||
# If we're supposed to clear the directory, do so...
|
||||
clear_dir($tmpdir)
|
||||
if ($clear);
|
||||
|
||||
return $tmpdir;
|
||||
}
|
||||
|
||||
# Routine to remove the temporary directory when done
|
||||
sub cleanup_dir ($) {
|
||||
# If we're debugging, we may want to look at the contents...
|
||||
return
|
||||
if ($debug);
|
||||
|
||||
clear_dir($_[0]);
|
||||
rmdir($_[0]);
|
||||
}
|
||||
|
||||
# Retrieve a single line from a specified file
|
||||
sub get_line ($) {
|
||||
my ($fname) = @_;
|
||||
|
||||
open(FILE, "<$fname") || die "Cannot open file $fname for reading";
|
||||
my $line = <FILE>;
|
||||
close(FILE);
|
||||
|
||||
# Chomp off the \n
|
||||
chomp $line;
|
||||
|
||||
return $line;
|
||||
}
|
||||
|
||||
# Routine that only allows one value to be pushed on the array;
|
||||
# implemented by making the first element of the array a hash-reference.
|
||||
# When we add a new value, we also increment the count of an element in
|
||||
# the hash with the key being the array value...
|
||||
sub push_once (\@@) {
|
||||
my ($array, @values) = @_;
|
||||
|
||||
# If the array is empty, create our hash ref
|
||||
push @{$array}, {}
|
||||
if (@{$array} == 0);
|
||||
|
||||
foreach my $value (@values) {
|
||||
push @{$array}, $value
|
||||
if (!exists($array->[0]{$value}));
|
||||
|
||||
$array->[0]{$value}++;
|
||||
}
|
||||
|
||||
return @{$array} - 1;
|
||||
}
|
||||
|
||||
# Filter //, /./, and remove leading ./ or / from filenames
|
||||
sub fname_filter ($) {
|
||||
my ($fname) = @_;
|
||||
|
||||
$fname =~ s,//,/,g;
|
||||
$fname =~ s,/\./,/,g;
|
||||
$fname =~ s,^\.?/,,g;
|
||||
|
||||
return $fname;
|
||||
}
|
||||
|
||||
# Store file data in a temporary file
|
||||
sub names_to_file ($$@) {
|
||||
my ($fname, $dir, @names) = @_;
|
||||
|
||||
if (@names > 0) {
|
||||
open(FILE, ">>$fname") || die "Cannot open file $fname for appending";
|
||||
|
||||
# Store the directory data
|
||||
print FILE "D $dir\n";
|
||||
|
||||
foreach my $name (@names) {
|
||||
# Mark record as a file...
|
||||
print FILE "F ";
|
||||
|
||||
# Store the tag, if there is one...
|
||||
print FILE "$name->{tag}"
|
||||
if (defined($name->{tag}));
|
||||
|
||||
# Then store old revision, new revision, and file name
|
||||
print FILE ":$name->{old}:$name->{new}:$name->{file}\n";
|
||||
}
|
||||
|
||||
close(FILE);
|
||||
}
|
||||
}
|
||||
|
||||
# Retrieve file data from temporary file; updates branch tags with what it
|
||||
# reads
|
||||
sub file_to_names (\@$) {
|
||||
my ($btags, $fname) = @_;
|
||||
my ($dir) = (undef);
|
||||
my (@names) = ();
|
||||
|
||||
debug "Reading file names from $fname...\n";
|
||||
|
||||
# We may not have, say, added a file in this subdirectory...
|
||||
return ()
|
||||
if (!-e $fname);
|
||||
|
||||
open(FILE, "<$fname");
|
||||
while(<FILE>) {
|
||||
chomp;
|
||||
|
||||
# Get record type...
|
||||
my ($type, $data) = split(' ', $_, 2);
|
||||
|
||||
# ok, it's a directory, remember that...
|
||||
if ($type eq "D") {
|
||||
$dir = $data;
|
||||
|
||||
debug "Read directory $dir\n";
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
debug "Read file $data\n";
|
||||
|
||||
# Get all the information about the file
|
||||
my ($tag, $old, $new, $file) = split(':', $data);
|
||||
|
||||
# and store it all
|
||||
push(@names, { tag => $tag, old => $old, new => $new, file => $file,
|
||||
dir => $dir, name => fname_filter("$dir/$file") });
|
||||
|
||||
# Remember the tags...
|
||||
push_once(@{$btags}, $tag)
|
||||
if (defined($tag) && $tag ne "");
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
return @names;
|
||||
}
|
||||
|
||||
# Create a text-formatted list of names
|
||||
sub name_to_list (\@@) {
|
||||
my ($btags, @names) = @_;
|
||||
my (@nlist, @nline) = ();
|
||||
|
||||
debug "Tags:", join(':', @{$btags}), "\n";
|
||||
|
||||
# We group them by tag
|
||||
foreach my $tag ("", @{$btags}[1..$#{$btags}]) {
|
||||
debug "Processing tag $tag...\n";
|
||||
|
||||
@nlist = ();
|
||||
|
||||
# Get a list of files by the tag...
|
||||
foreach my $name (@names) {
|
||||
debug "Processing $name->{file}...\n";
|
||||
|
||||
next
|
||||
if ($name->{tag} ne $tag);
|
||||
|
||||
debug "Pushing $name->{name} on \@nlist...\n";
|
||||
push(@nlist, $name->{name});
|
||||
}
|
||||
|
||||
# If the tag is not the empty string, list the tag...
|
||||
push(@nline, " Tag: $tag", " ")
|
||||
if ($tag ne "");
|
||||
|
||||
# Now list each file name
|
||||
foreach my $name (@nlist) {
|
||||
# indent if we run past the end of line limit
|
||||
push(@nline, " ")
|
||||
if (@nline == 0 || ($nline[$#nline] ne " " &&
|
||||
length($nline[$#nline]) + length($name) + 1 > 70));
|
||||
|
||||
# add the file name to the list
|
||||
debug "Adding $name to \@nline...\n";
|
||||
$nline[$#nline] .= " $name";
|
||||
}
|
||||
}
|
||||
|
||||
return @nline;
|
||||
}
|
||||
|
||||
# write the log message to a temporary file
|
||||
sub write_log ($@) {
|
||||
my ($fname, @text) = @_;
|
||||
|
||||
open(FILE, ">$fname") || die "Cannot open file $fname for writing";
|
||||
print FILE join("\n", @text), "\n";
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
# Build the header of the commit message: CVSROOT, module name, any
|
||||
# branch tags, and the commit time
|
||||
sub build_header ($@) {
|
||||
my ($module, $subject, $mailto, @branch_tags) = @_;
|
||||
my (@text, @mailto);
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
|
||||
my ($user, $dummy);
|
||||
my ($digest);
|
||||
|
||||
($user, $dummy, $dummy, $dummy, $dummy, $dummy, $dummy) = getpwuid($<);
|
||||
|
||||
@mailto = @{$mailto};
|
||||
|
||||
# generate a unique boundary by calculating the md5sum of the
|
||||
# current time
|
||||
$digest = new Digest::MD5;
|
||||
$digest->reset();
|
||||
$digest->add(time() . rand());
|
||||
$boundary = "----=MIME." . unpack("H*", $digest->digest());
|
||||
|
||||
# Build the mail header
|
||||
push(@text, 'From: [email protected]');
|
||||
push(@text, "To: " . join(' ', @mailto));
|
||||
push(@text, "Subject: $subject");
|
||||
push(@text, "MIME-Version: 1.0");
|
||||
push(@text, "Content-Type: multipart/mixed; boundary=\"$boundary\"");
|
||||
push(@text, "");
|
||||
push(@text, "This is a multipart message as defined by RFC2049 (MIME)");
|
||||
push(@text, "");
|
||||
push(@text, "--$boundary");
|
||||
push(@text, "Content-Type: text/plain; charset=us-ascii");
|
||||
push(@text, "Content-Disposition: inline");
|
||||
push(@text, "");
|
||||
|
||||
# Build the commit message header
|
||||
push(@text, "Commiter : $user");
|
||||
push(@text, "CVSROOT : $ENV{CVSROOT}");
|
||||
push(@text, "Module : $module");
|
||||
push(@text, "Branch tags: " . join(' ', @branch_tags[1..$#branch_tags]))
|
||||
if (@branch_tags > 0);
|
||||
push(@text, sprintf("Commit time: %04d-%02d-%02d %02d:%02d:%02d UTC",
|
||||
$year + 1900, $mon + 1, $mday, $hour, $min, $sec));
|
||||
|
||||
return @text, "";
|
||||
}
|
||||
|
||||
# Send the mail message
|
||||
sub send_mail {
|
||||
my ($mailto, $text) = @_;
|
||||
my (@mailto, @text);
|
||||
# I <heart> perl
|
||||
@mailto = @{$mailto};
|
||||
@text = @{$text};
|
||||
|
||||
open(MAIL, "|$MAILER " . join(' ', @mailto));
|
||||
push(@text, "--$boundary--", "");
|
||||
print MAIL join("\n", @text), "\n";
|
||||
close(MAIL);
|
||||
}
|
||||
|
||||
# Find the tmp directory
|
||||
my ($tmpdir) = (tmpdir());
|
||||
|
||||
my (@mailto) = ();
|
||||
my (@files) = ();
|
||||
my (@path) = ();
|
||||
my ($modname, $repdir, $dir) = (undef, undef, undef);
|
||||
|
||||
# Process command line arguments
|
||||
while (@ARGV > 0) {
|
||||
my ($arg) = (shift(@ARGV));
|
||||
|
||||
if ($arg eq '-d') {
|
||||
# Turn on debugging
|
||||
$debug++;
|
||||
} elsif ($arg eq '-M') {
|
||||
# Module name explicitly set -- XXX Not tested, use at your own risk
|
||||
die "Argument for -M missing"
|
||||
unless (@ARGV > 0);
|
||||
|
||||
$modname = shift(@ARGV);
|
||||
} elsif ($arg eq '-m') {
|
||||
# An address to mail the notification to
|
||||
die "Argument for -m missing"
|
||||
unless (@ARGV > 0);
|
||||
|
||||
push(@mailto, shift(@ARGV));
|
||||
} else {
|
||||
# the list of filenames passed by CVS--you *must* use %{sVv}!
|
||||
die "Too many arguments!"
|
||||
unless (@files == 0);
|
||||
|
||||
@files = split(" ", $arg);
|
||||
}
|
||||
}
|
||||
|
||||
die "Nobody to mail to"
|
||||
unless (@mailto > 0);
|
||||
|
||||
die "No files to process"
|
||||
unless (@files > 1);
|
||||
|
||||
# The repository directory
|
||||
$repdir = shift(@files);
|
||||
|
||||
# break it appart...
|
||||
@path = split("/", $repdir);
|
||||
|
||||
# Now we know the module name, if it wasn't explicitly set
|
||||
$modname = $path[0]
|
||||
unless (defined($modname));
|
||||
|
||||
# Figure out what our directory is
|
||||
if (@path == 1) {
|
||||
$dir = ".";
|
||||
} else {
|
||||
$dir = join("/", @path[1..$#path]);
|
||||
}
|
||||
|
||||
# append a / to it...
|
||||
$dir .= "/";
|
||||
|
||||
debug "module = $modname\n";
|
||||
debug "dir = $dir\n";
|
||||
debug "path = ", join(":", @path), "\n";
|
||||
debug "files = ", join(":", @files), "\n";
|
||||
debug "tmpdir = $tmpdir\n";
|
||||
|
||||
my (%fversions);
|
||||
|
||||
# Unless its a new directory or imported sources, create file records
|
||||
unless (defined($files[1]) && defined($files[2]) &&
|
||||
(($files[1] eq "New" && $files[2] eq "directory") ||
|
||||
($files[1] eq "Imported" && $files[2] eq "sources"))) {
|
||||
|
||||
foreach my $fname (@files) {
|
||||
# You *must* use %{sVv} in the call in loginfo!
|
||||
die "Invalid filenames"
|
||||
unless ($fname =~ /^(.*),([0-9.]+|NONE),([0-9.]+|NONE)$/);
|
||||
|
||||
$fversions{$1} = {
|
||||
old => ($2 eq "NONE" ? "0" : $2),
|
||||
new => ($3 eq "NONE" ? "0" : $3),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
# process log message
|
||||
my ($state, $tag) = (STATE_NONE, undef);
|
||||
|
||||
my (@modified, @added, @removed, @log, @branch_tags) = ();
|
||||
|
||||
while (<STDIN>) {
|
||||
chomp;
|
||||
|
||||
debug "State $state, line:$_\n";
|
||||
|
||||
# Ignore empty space at the beginning of the log message
|
||||
next
|
||||
if ($state == STATE_LOG1 && /^\s*$/);
|
||||
|
||||
# We're done ignoring empty space
|
||||
if ($state == STATE_LOG1) {
|
||||
$state = STATE_LOG2;
|
||||
}
|
||||
|
||||
if ($state == STATE_LOG2) {
|
||||
# Don't modify the lines at all if we're processing the log message
|
||||
push(@log, $_);
|
||||
next;
|
||||
} else {
|
||||
# Strip out leading and trailing space
|
||||
s/^\s*(.*?)\s*$/$1/;
|
||||
}
|
||||
|
||||
if (/^Modified Files/) {
|
||||
# Collect list of modified files
|
||||
debug "State switching to STATE_MODIFIED\n";
|
||||
|
||||
$state = STATE_MODIFIED;
|
||||
$tag = undef;
|
||||
|
||||
next;
|
||||
|
||||
} elsif (/^Added Files/) {
|
||||
# Collect list of added files
|
||||
debug "State switching to STATE_ADDED\n";
|
||||
|
||||
$state = STATE_ADDED;
|
||||
$tag = undef;
|
||||
|
||||
next;
|
||||
|
||||
} elsif (/^Removed Files/) {
|
||||
# Collect list of removed files
|
||||
debug "State switching to STATE_REMOVED\n";
|
||||
|
||||
$state = STATE_REMOVED;
|
||||
$tag = undef;
|
||||
|
||||
next;
|
||||
|
||||
} elsif (/^Log Message/) {
|
||||
# Collect log message
|
||||
debug "State switching to STATE_LOG1\n";
|
||||
|
||||
$state = STATE_LOG1;
|
||||
$tag = undef;
|
||||
|
||||
next;
|
||||
|
||||
} elsif (/^Revision\/Branch/) {
|
||||
# Parse old-style Revision/Branch field
|
||||
debug "Found a branch tag\n";
|
||||
|
||||
/^[^:]+:\s*(.*)/;
|
||||
|
||||
push_once(@branch_tags, $1);
|
||||
|
||||
warn "Tag == $tag"
|
||||
if (defined($tag));
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
# Ignore the stuff at the top of the commit report
|
||||
next
|
||||
if ($state == STATE_NONE);
|
||||
|
||||
if (/^Tag:\s*(.*)$/) {
|
||||
# Remember the tag
|
||||
debug "Setting tag to $1\n";
|
||||
$tag = $1;
|
||||
next;
|
||||
}
|
||||
|
||||
my (@tfiles) = ();
|
||||
|
||||
# Find the file in our command line list of files
|
||||
foreach my $file (split) {
|
||||
die "Nothing known about file $file!"
|
||||
unless (exists($fversions{$file}));
|
||||
|
||||
push @tfiles, {
|
||||
file => $file,
|
||||
tag => $tag,
|
||||
old => $fversions{$file}{old},
|
||||
new => $fversions{$file}{new},
|
||||
};
|
||||
}
|
||||
|
||||
# Store the file list in the correct array
|
||||
push(@modified, @tfiles)
|
||||
if ($state == STATE_MODIFIED);
|
||||
|
||||
push(@added, @tfiles)
|
||||
if ($state == STATE_ADDED);
|
||||
|
||||
push(@removed, @tfiles)
|
||||
if ($state == STATE_REMOVED);
|
||||
}
|
||||
|
||||
# Remove trailing blank lines from the log message
|
||||
while (@log > 0 && $log[$#log] =~ /^\s*$/) {
|
||||
pop(@log);
|
||||
}
|
||||
|
||||
# If a new directory was added, we're done...
|
||||
if (defined($files[1]) && defined($files[2]) &&
|
||||
$files[1] eq "New" && $files[2] eq "directory") {
|
||||
|
||||
my (@text) = ();
|
||||
|
||||
# If there was a sticky tag for the directory, make it a branch tag
|
||||
if ($log[$#log] =~ /^--> Using per-directory sticky tag \`(.*)\'$/) {
|
||||
push_once(@branch_tags, $1);
|
||||
pop(@log);
|
||||
}
|
||||
|
||||
# Build the message...
|
||||
push(@text, build_header($modname, "Module $modname: New directory $dir",
|
||||
\@mailto, @branch_tags));
|
||||
push(@text, "Log message:", "", @log);
|
||||
|
||||
# and send it (synchronously)
|
||||
send_mail(\@mailto, \@text);
|
||||
|
||||
# Clean up after ourselves and exit.
|
||||
cleanup_dir($tmpdir);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# If an import was done, we're done...
|
||||
if (defined($files[1]) && defined($files[2]) &&
|
||||
$files[1] eq "Imported" && $files[2] eq "sources") {
|
||||
|
||||
my (@text) = ();
|
||||
|
||||
# Build the message...
|
||||
push(@text, build_header($modname, "Module $modname: Imported $dir",
|
||||
\@mailto, @branch_tags));
|
||||
push(@text, "Log message:", "", @log);
|
||||
|
||||
# and send it (synchronously)
|
||||
send_mail(\@mailto, \@text);
|
||||
|
||||
# Clean up after ourselves and exit.
|
||||
cleanup_dir($tmpdir);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
debug "Searching for log file index...";
|
||||
|
||||
my ($i);
|
||||
|
||||
# Look for an empty log file or one that matches our current log message
|
||||
for ($i = 0; ; $i++) {
|
||||
my (@text);
|
||||
|
||||
# found one that doesn't exist...
|
||||
last
|
||||
if (!-e "$tmpdir/logfile.$i");
|
||||
|
||||
# read in the log file
|
||||
open(FILE, "<$tmpdir/logfile.$i");
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
push(@text, $_);
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
# If the log file was empty, use it
|
||||
last
|
||||
if (@text == 0);
|
||||
|
||||
# If the log messages are identical, use that
|
||||
last
|
||||
if (join(' ', @log) eq join(' ', @text));
|
||||
}
|
||||
|
||||
debug "$tmpdir/logfile.$i\n";
|
||||
|
||||
# Store modified, added, and removed file lists, along with the log message
|
||||
names_to_file("$tmpdir/modified.$i", $dir, @modified);
|
||||
names_to_file("$tmpdir/added.$i", $dir, @added);
|
||||
names_to_file("$tmpdir/removed.$i", $dir, @removed);
|
||||
write_log("$tmpdir/logfile.$i", @log);
|
||||
|
||||
# Now check to see if we're at the end of our rope
|
||||
my ($lastdir) = (get_line("$tmpdir/lastdir"));
|
||||
|
||||
debug "Checking $ENV{CVSROOT}/$repdir against lastdir $lastdir\n";
|
||||
|
||||
# Nope, exit instead of sending a message
|
||||
exit(0)
|
||||
if ($lastdir ne "$ENV{CVSROOT}/$repdir");
|
||||
|
||||
debug "At last, we've reached the end\n";
|
||||
|
||||
# We have to daemonize and sleep so that there isn't any lock hanging
|
||||
# around when we get to the cvs rdiff below...
|
||||
daemonize();
|
||||
sleep(10);
|
||||
|
||||
# Build the mail message...
|
||||
my (@text) = ();
|
||||
@files = ();
|
||||
@branch_tags = ();
|
||||
|
||||
for ($i = 0; ; $i++) {
|
||||
# No more log files
|
||||
last
|
||||
if (!-e "$tmpdir/logfile.$i");
|
||||
|
||||
# read and insert the log message
|
||||
open(FILE, "<$tmpdir/logfile.$i");
|
||||
push(@text, "Log message:", "");
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
push(@text, $_);
|
||||
}
|
||||
push(@text, "");
|
||||
close(FILE);
|
||||
|
||||
# read modified list and list all modified files if non-empty
|
||||
@modified = file_to_names(@branch_tags, "$tmpdir/modified.$i");
|
||||
push(@text, "Modified files:", name_to_list(@branch_tags, @modified), "")
|
||||
if (@modified > 0);
|
||||
|
||||
# read added list and list all added files if non-empty
|
||||
@added = file_to_names(@branch_tags, "$tmpdir/added.$i");
|
||||
push(@text, "Added files:", name_to_list(@branch_tags, @added), "")
|
||||
if (@added > 0);
|
||||
|
||||
# read removed list and list all removed files if non-empty
|
||||
@removed = file_to_names(@branch_tags, "$tmpdir/removed.$i");
|
||||
push(@text, "Removed files:", name_to_list(@branch_tags, @removed), "")
|
||||
if (@removed > 0);
|
||||
|
||||
# remember all the files we looked at
|
||||
push(@files, @modified, @added, @removed);
|
||||
}
|
||||
|
||||
# Now that name_to_list has rebuilt our list of branch tags, we can build the
|
||||
# header and prepend it to the message
|
||||
unshift(@text, build_header($modname, "Module $modname: Change committed",
|
||||
\@mailto, @branch_tags));
|
||||
|
||||
# sort the files out for our diff
|
||||
@files = sort { $a->{name} cmp $b->{name} } @files;
|
||||
|
||||
my ($user, $filename);
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
|
||||
$user = getpwuid($<);
|
||||
|
||||
$filename = sprintf("%s.%04d%02d%02d.%02d%02d%02d.%s.diff", $modname,
|
||||
$year + 1900, $mon + 1, $mday, $hour, $min, $sec, $user);
|
||||
|
||||
push(@text, "--$boundary");
|
||||
push(@text, "Content-Type: text/plain; name=\"$filename\"");
|
||||
push(@text, "Content-Disposition: attachment; filename=\"$filename\"");
|
||||
push(@text, "Content-Transfer-Encoding: 8bit");
|
||||
push(@text, "");
|
||||
|
||||
foreach my $file (@files) {
|
||||
debug "Diffing file $file->{name}...\n";
|
||||
|
||||
# Run cvs rdiff, extracting a diff between the old version and the new
|
||||
open(DIFF, "$CVS -Q rdiff -u -r $file->{old} -r $file->{new} " .
|
||||
"$modname/$file->{name}|");
|
||||
while (<DIFF>) {
|
||||
chomp;
|
||||
push(@text, $_);
|
||||
}
|
||||
close(DIFF);
|
||||
}
|
||||
|
||||
# send the mail...
|
||||
send_mail(\@mailto, \@text);
|
||||
|
||||
# and clean up after ourselves
|
||||
cleanup_dir($tmpdir);
|
||||
@@ -1,12 +0,0 @@
|
||||
# The "notify" file controls where notifications from watches set by
|
||||
# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
|
||||
# a regular expression which is tested against the directory that the
|
||||
# change is being made to, relative to the $CVSROOT. If it matches,
|
||||
# then the remainder of the line is a filter program that should contain
|
||||
# one occurrence of %s for the user to notify, and information on its
|
||||
# standard input.
|
||||
#
|
||||
# "ALL" or "DEFAULT" can be used in place of the regular expression.
|
||||
#
|
||||
# For example:
|
||||
#ALL mail %s -s "CVS notification"
|
||||
@@ -1,19 +0,0 @@
|
||||
drevil:f76FWdDTUBG5c:fs2source
|
||||
mysterial:f7nJUwoIhmSrg:fs2source
|
||||
wmcoolmon:f7JRB.js9Q1sE:fs2source
|
||||
inquisitor:f7BVkOvwjDlWk:fs2source
|
||||
penguin:Jh.dOjaiO2jHk:fs2source
|
||||
DTP:f7M92Z/6/uep.:fs2source
|
||||
unknownplayer:f79BgAn.IzJs6:fs2source
|
||||
phreak:f7WQyGiT/jzlM:fs2source
|
||||
randomtiger:f7Way/xL9ic7o:fs2source
|
||||
righteous1:f7fpcXiE0Ubao:fs2source
|
||||
bobboau:f7jChSbXOIdWY:fs2source
|
||||
sesquipedalian:f75AcAOV6TM6Q:fs2source
|
||||
daveb:f7f2mVbMvbe.6:fs2source
|
||||
Goober5000:f7Fc.gHzyrOL2:fs2source
|
||||
dkharrat:f7odljbD5tm5k:fs2source
|
||||
EdrickV:f7cDahmEbbAlg:fs2source
|
||||
OldMan:f7N4NyUG5Ommw:fs2source
|
||||
komet:f7fyoBN5r.m76:fs2source
|
||||
anonymous:oIKtWP1q6GDt6:fs2source
|
||||
@@ -1,13 +0,0 @@
|
||||
# The "rcsinfo" file is used to control templates with which the editor
|
||||
# is invoked on commit and import.
|
||||
#
|
||||
# The first entry on a line is a regular expression which is tested
|
||||
# against the directory that the change is being made to, relative to the
|
||||
# $CVSROOT. For the first match that is found, then the remainder of the
|
||||
# line is the name of the file that contains the template.
|
||||
#
|
||||
# If the repository name does not match any of the regular expressions in this
|
||||
# file, the "DEFAULT" line is used, if it is specified.
|
||||
#
|
||||
# If the name "ALL" appears as a regular expression it is always used
|
||||
# in addition to the first matching regex or "DEFAULT".
|
||||
@@ -1,20 +0,0 @@
|
||||
# The "taginfo" file is used to control pre-tag checks.
|
||||
# The filter on the right is invoked with the following arguments:
|
||||
#
|
||||
# $1 -- tagname
|
||||
# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
|
||||
# $3 -- repository
|
||||
# $4-> file revision [file revision ...]
|
||||
#
|
||||
# A non-zero exit of the filter program will cause the tag to be aborted.
|
||||
#
|
||||
# The first entry on a line is a regular expression which is tested
|
||||
# against the directory that the change is being committed to, relative
|
||||
# to the $CVSROOT. For the first match that is found, then the remainder
|
||||
# of the line is the name of the filter to run.
|
||||
#
|
||||
# If the repository name does not match any of the regular expressions in this
|
||||
# file, the "DEFAULT" line is used, if it is specified.
|
||||
#
|
||||
# If the name "ALL" appears as a regular expression it is always used
|
||||
# in addition to the first matching regex or "DEFAULT".
|
||||
@@ -1,21 +0,0 @@
|
||||
# The "verifymsg" file is used to allow verification of logging
|
||||
# information. It works best when a template (as specified in the
|
||||
# rcsinfo file) is provided for the logging procedure. Given a
|
||||
# template with locations for, a bug-id number, a list of people who
|
||||
# reviewed the code before it can be checked in, and an external
|
||||
# process to catalog the differences that were code reviewed, the
|
||||
# following test can be applied to the code:
|
||||
#
|
||||
# Making sure that the entered bug-id number is correct.
|
||||
# Validating that the code that was reviewed is indeed the code being
|
||||
# checked in (using the bug-id number or a seperate review
|
||||
# number to identify this particular code set.).
|
||||
#
|
||||
# If any of the above test failed, then the commit would be aborted.
|
||||
#
|
||||
# Actions such as mailing a copy of the report to each reviewer are
|
||||
# better handled by an entry in the loginfo file.
|
||||
#
|
||||
# One thing that should be noted is the the ALL keyword is not
|
||||
# supported. There can be only one entry that matches a given
|
||||
# repository.
|
||||
@@ -1,18 +0,0 @@
|
||||
drevil
|
||||
inquisitor
|
||||
mysterial
|
||||
DTP
|
||||
randomtiger
|
||||
wmcoolmon
|
||||
unknownplayer
|
||||
phreak
|
||||
bobboau
|
||||
righteous1
|
||||
sesquipedalian
|
||||
Goober5000
|
||||
dkharrat
|
||||
daveb
|
||||
EdrickV
|
||||
OldMan
|
||||
komet
|
||||
penguin
|
||||
@@ -0,0 +1,22 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
configure
|
||||
FS2_Open.prj.bak
|
||||
FS2_Open.pws
|
||||
.tm_project.cache
|
||||
config.guess
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
autom4te*
|
||||
aclocal.m4
|
||||
Freespace2.ncb
|
||||
Freespace2.opt
|
||||
Freespace2.plg
|
||||
Release
|
||||
Debug
|
||||
@@ -0,0 +1,650 @@
|
||||
# Anjuta Version 1.2.2
|
||||
Compatibility Level: 1
|
||||
|
||||
<PROJECT_DESCRIPTION_START>
|
||||
FS2 Open: SCP<PROJECT_DESCRIPTION_END>
|
||||
<CONFIG_PROGS_START>
|
||||
<CONFIG_PROGS_END>
|
||||
<CONFIG_LIBS_START>
|
||||
<CONFIG_LIBS_END>
|
||||
<CONFIG_HEADERS_START>
|
||||
<CONFIG_HEADERS_END>
|
||||
<CONFIG_CHARACTERISTICS_START>
|
||||
<CONFIG_CHARACTERISTICS_END>
|
||||
<CONFIG_LIB_FUNCS_START>
|
||||
<CONFIG_LIB_FUNCS_END>
|
||||
<CONFIG_ADDITIONAL_START>
|
||||
<CONFIG_ADDITIONAL_END>
|
||||
<CONFIG_FILES_START>
|
||||
<CONFIG_FILES_END>
|
||||
<MAKEFILE_AM_START>
|
||||
<MAKEFILE_AM_END>
|
||||
|
||||
props.file.type=project
|
||||
|
||||
anjuta.version=1.2.2
|
||||
anjuta.compatibility.level=1
|
||||
|
||||
project.name=FS2_Open
|
||||
project.type=GENERIC
|
||||
project.target.type=EXECUTABLE
|
||||
project.version=3.6
|
||||
project.author=Taylor Richards
|
||||
project.source.target=fs2_open
|
||||
project.has.gettext=0
|
||||
project.gui.command=
|
||||
project.programming.language=C++
|
||||
project.excluded.modules=intl
|
||||
|
||||
project.config.extra.modules.before=
|
||||
project.config.extra.modules.after=
|
||||
project.config.blocked=1
|
||||
project.config.disable.overwriting=1 1 1 1 1 1 1 1 1
|
||||
|
||||
project.menu.entry=FS2_Open Version 3.6
|
||||
project.menu.group=Application
|
||||
project.menu.comment=FS2_Open Version 3.6
|
||||
project.menu.icon=
|
||||
project.menu.need.terminal=0
|
||||
|
||||
project.configure.options=
|
||||
anjuta.program.arguments=
|
||||
preferences.build.option.jobs=0
|
||||
preferences.build.option.silent=0
|
||||
preferences.build.option.autosave=0
|
||||
preferences.anjuta.make.options=-k
|
||||
preferences.make=make
|
||||
preferences.build.option.keep.going=1
|
||||
preferences.build.option.warn.undef=0
|
||||
preferences.autoformat.custom.style= -i8 -sc -bli0 -bl0 -cbi0 -ss
|
||||
preferences.indent.opening=0
|
||||
preferences.autoformat.disable=0
|
||||
preferences.indent.automatic=1
|
||||
preferences.use.tabs=1
|
||||
preferences.indent.size=4
|
||||
preferences.tabsize=4
|
||||
preferences.indent.closing=0
|
||||
|
||||
module.include.name=.
|
||||
module.include.type=
|
||||
module.include.files=\
|
||||
code/anim/animplay.h\
|
||||
code/anim/packunpack.h\
|
||||
code/demo/demo.h\
|
||||
code/asteroid/asteroid.h\
|
||||
code/bmpman/bmpman.h\
|
||||
code/cfile/cfile.h\
|
||||
code/cfile/cfilearchive.h\
|
||||
code/cfile/cfilesystem.h\
|
||||
code/cmdline/cmdline.h\
|
||||
code/cmeasure/cmeasure.h\
|
||||
code/controlconfig/controlsconfig.h\
|
||||
code/cutscene/cutscenes.h\
|
||||
code/cutscene/movie.h\
|
||||
code/ddsutils/ddsutils.h\
|
||||
code/debris/debris.h\
|
||||
code/debugconsole/dbugfile.h\
|
||||
code/debugconsole/timerbar.h\
|
||||
code/decals/decals.h\
|
||||
code/directx/dx8show.h\
|
||||
code/directx/vasync.h\
|
||||
code/directx/vd3dtypes.h\
|
||||
code/directx/vddraw.h\
|
||||
code/directx/vdinput.h\
|
||||
code/directx/vdplay.h\
|
||||
code/directx/vdplobby.h\
|
||||
code/directx/vdsetup.h\
|
||||
code/directx/vdsound.h\
|
||||
code/directx/vdvp.h\
|
||||
code/exceptionhandler/exceptionhandler.h\
|
||||
code/fireball/fireballs.h\
|
||||
code/freespace2/freespace.h\
|
||||
code/freespace2/freespaceresource.h\
|
||||
code/freespace2/levelpaging.h\
|
||||
code/gamehelp/contexthelp.h\
|
||||
code/gamehelp/gameplayhelp.h\
|
||||
code/gamesequence/gamesequence.h\
|
||||
code/gamesnd/eventmusic.h\
|
||||
code/gamesnd/gamesnd.h\
|
||||
code/globalincs/alphacolors.h\
|
||||
code/globalincs/crypt.h\
|
||||
code/globalincs/linklist.h\
|
||||
code/globalincs/pstypes.h\
|
||||
code/globalincs/systemvars.h\
|
||||
code/globalincs/version.h\
|
||||
code/graphics/2d.h\
|
||||
code/graphics/font.h\
|
||||
code/graphics/grd3d.h\
|
||||
code/graphics/grd3dbmpman.h\
|
||||
code/graphics/grd3dinternal.h\
|
||||
code/graphics/grinternal.h\
|
||||
code/graphics/gropengl.h\
|
||||
code/graphics/grzbuffer.h\
|
||||
code/graphics/line.h\
|
||||
code/graphics/tmapper.h\
|
||||
code/graphics/gl/wglext.h\
|
||||
code/graphics/gl/GLAUX.H\
|
||||
code/graphics/gl/GLU.H\
|
||||
code/graphics/gl/Gl.h\
|
||||
code/graphics/gl/Glext.h\
|
||||
code/graphics/grd3dsetup.h\
|
||||
code/graphics/grd3dlight.h\
|
||||
code/graphics/grd3dbatch.h\
|
||||
code/graphics/GrD3DParticle.h\
|
||||
code/hud/hudconfig.h\
|
||||
code/hud/hud.h\
|
||||
code/hud/hudartillery.h\
|
||||
code/hud/hudbrackets.h\
|
||||
code/hud/hudescort.h\
|
||||
code/hud/hudets.h\
|
||||
code/hud/hudgauges.h\
|
||||
code/hud/hudlock.h\
|
||||
code/hud/hudmessage.h\
|
||||
code/hud/hudobserver.h\
|
||||
code/hud/hudresource.h\
|
||||
code/hud/hudreticle.h\
|
||||
code/hud/hudshield.h\
|
||||
code/hud/hudsquadmsg.h\
|
||||
code/hud/hudtarget.h\
|
||||
code/hud/hudtargetbox.h\
|
||||
code/hud/hudwingmanstatus.h\
|
||||
code/inetfile/cftp.h\
|
||||
code/inetfile/chttpget.h\
|
||||
code/inetfile/inetgetfile.h\
|
||||
code/io/joy.h\
|
||||
code/io/joy_ff.h\
|
||||
code/io/key.h\
|
||||
code/io/keycontrol.h\
|
||||
code/io/mouse.h\
|
||||
code/io/sw_error.hpp\
|
||||
code/io/sw_force.h\
|
||||
code/io/sw_guid.hpp\
|
||||
code/io/timer.h\
|
||||
code/jumpnode/jumpnode.h\
|
||||
code/lighting/lighting.h\
|
||||
code/localization/fhash.h\
|
||||
code/localization/localize.h\
|
||||
code/math/fix.h\
|
||||
code/math/floating.h\
|
||||
code/math/fvi.h\
|
||||
code/math/spline.h\
|
||||
code/math/staticrand.h\
|
||||
code/math/vecmat.h\
|
||||
code/menuui/barracks.h\
|
||||
code/menuui/credits.h\
|
||||
code/menuui/fishtank.h\
|
||||
code/menuui/mainhallmenu.h\
|
||||
code/menuui/mainhalltemp.h\
|
||||
code/menuui/optionsmenu.h\
|
||||
code/menuui/optionsmenumulti.h\
|
||||
code/menuui/playermenu.h\
|
||||
code/menuui/readyroom.h\
|
||||
code/menuui/snazzyui.h\
|
||||
code/menuui/techmenu.h\
|
||||
code/menuui/trainingmenu.h\
|
||||
code/mission/missionbriefcommon.h\
|
||||
code/mission/missioncampaign.h\
|
||||
code/mission/missiongoals.h\
|
||||
code/mission/missiongrid.h\
|
||||
code/mission/missionhotkey.h\
|
||||
code/mission/missionload.h\
|
||||
code/mission/missionlog.h\
|
||||
code/mission/missionmessage.h\
|
||||
code/mission/missionparse.h\
|
||||
code/mission/missiontraining.h\
|
||||
code/missionui/chatbox.h\
|
||||
code/missionui/missionbrief.h\
|
||||
code/missionui/missioncmdbrief.h\
|
||||
code/missionui/missiondebrief.h\
|
||||
code/missionui/missionloopbrief.h\
|
||||
code/missionui/missionpause.h\
|
||||
code/missionui/missionrecommend.h\
|
||||
code/missionui/missionscreencommon.h\
|
||||
code/missionui/missionshipchoice.h\
|
||||
code/missionui/missionstats.h\
|
||||
code/missionui/missionweaponchoice.h\
|
||||
code/missionui/redalert.h\
|
||||
code/mm/mmreg.h\
|
||||
code/mm/msacm.h\
|
||||
code/model/modelsinc.h\
|
||||
code/model/model.h\
|
||||
code/nebula/neb.h\
|
||||
code/nebula/neblightning.h\
|
||||
code/network/fs2ox.h\
|
||||
code/network/multi.h\
|
||||
code/network/multi_campaign.h\
|
||||
code/network/multi_data.h\
|
||||
code/network/multi_dogfight.h\
|
||||
code/network/multi_endgame.h\
|
||||
code/network/multi_ingame.h\
|
||||
code/network/multi_kick.h\
|
||||
code/network/multi_log.h\
|
||||
code/network/multi_obj.h\
|
||||
code/network/multi_observer.h\
|
||||
code/network/multi_oo.h\
|
||||
code/network/multi_options.h\
|
||||
code/network/multi_pause.h\
|
||||
code/network/multi_pinfo.h\
|
||||
code/network/multi_ping.h\
|
||||
code/network/multi_pmsg.h\
|
||||
code/network/multi_rate.h\
|
||||
code/network/multi_respawn.h\
|
||||
code/network/multi_team.h\
|
||||
code/network/multi_update.h\
|
||||
code/network/multi_voice.h\
|
||||
code/network/multi_xfer.h\
|
||||
code/network/multilag.h\
|
||||
code/network/multimsgs.h\
|
||||
code/network/multiteamselect.h\
|
||||
code/network/multiui.h\
|
||||
code/network/multiutil.h\
|
||||
code/network/psnet.h\
|
||||
code/network/psnet2.h\
|
||||
code/network/stand_gui.h\
|
||||
code/object/objcollide.h\
|
||||
code/object/object.h\
|
||||
code/object/objectsnd.h\
|
||||
code/observer/observer.h\
|
||||
code/osapi/monopub.h\
|
||||
code/osapi/osapi.h\
|
||||
code/osapi/osregistry.h\
|
||||
code/osapi/outwnd.h\
|
||||
code/palman/palman.h\
|
||||
code/parse/encrypt.h\
|
||||
code/parse/parselo.h\
|
||||
code/parse/sexp.h\
|
||||
code/particle/particle.h\
|
||||
code/pcxutils/pcxutils.h\
|
||||
code/physics/physics.h\
|
||||
code/playerman/managepilot.h\
|
||||
code/playerman/player.h\
|
||||
code/popup/popup.h\
|
||||
code/popup/popupdead.h\
|
||||
code/radar/radar.h\
|
||||
code/render/3d.h\
|
||||
code/render/3dinternal.h\
|
||||
code/scramble/scramble.h\
|
||||
code/ship/afterburner.h\
|
||||
code/ship/ai.h\
|
||||
code/ship/aibig.h\
|
||||
code/ship/aigoals.h\
|
||||
code/ship/ailocal.h\
|
||||
code/ship/awacs.h\
|
||||
code/ship/ship.h\
|
||||
code/ship/shipcontrails.h\
|
||||
code/ship/shipfx.h\
|
||||
code/ship/shiphit.h\
|
||||
code/ship/subsysdamage.h\
|
||||
code/sound/acm.h\
|
||||
code/sound/audiostr.h\
|
||||
code/sound/channel.h\
|
||||
code/sound/ds.h\
|
||||
code/sound/ds3d.h\
|
||||
code/sound/dscap.h\
|
||||
code/sound/fsspeech.h\
|
||||
code/sound/midifile.h\
|
||||
code/sound/midiseq.h\
|
||||
code/sound/rbaudio.h\
|
||||
code/sound/rtvoice.h\
|
||||
code/sound/sound.h\
|
||||
code/sound/speech.h\
|
||||
code/sound/winmidi.h\
|
||||
code/starfield/nebula.h\
|
||||
code/starfield/starfield.h\
|
||||
code/starfield/supernova.h\
|
||||
code/stats/medals.h\
|
||||
code/stats/scoring.h\
|
||||
code/stats/stats.h\
|
||||
code/tgautils/tgautils.h\
|
||||
code/ui/ui.h\
|
||||
code/ui/uidefs.h\
|
||||
code/vcodec/codec1.h\
|
||||
code/weapon/beam.h\
|
||||
code/weapon/corkscrew.h\
|
||||
code/weapon/emp.h\
|
||||
code/weapon/flak.h\
|
||||
code/weapon/muzzleflash.h\
|
||||
code/weapon/shockwave.h\
|
||||
code/weapon/swarm.h\
|
||||
code/weapon/trails.h\
|
||||
code/weapon/weapon.h\
|
||||
code/windows_stub/config.h\
|
||||
code/species_defs/species_defs.h\
|
||||
code/fs2open_pxo/Client.h\
|
||||
code/fs2open_pxo/TCP_Socket.h\
|
||||
code/fs2open_pxo/protocol.h\
|
||||
code/fs2open_pxo/udpsocket.h\
|
||||
code/openil/il_func.h\
|
||||
code/globalincs/globals.h\
|
||||
code/jpgutils/jpgutils.h\
|
||||
code/graphics/grstub.h\
|
||||
code/irc/irc.h\
|
||||
code/graphics/grbatch.h\
|
||||
code/graphics/gropengltnl.h\
|
||||
code/graphics/gropengllight.h\
|
||||
code/graphics/gropenglextension.h\
|
||||
code/graphics/gropengltexture.h\
|
||||
code/autopilot/autopilot.h\
|
||||
code/hud/hudnavigation.h
|
||||
|
||||
module.source.name=.
|
||||
module.source.type=
|
||||
module.source.files=\
|
||||
code/anim/animplay.cpp\
|
||||
code/anim/packunpack.cpp\
|
||||
code/demo/demo.cpp\
|
||||
code/asteroid/asteroid.cpp\
|
||||
code/bmpman/bmpman.cpp\
|
||||
code/cfile/cfile.cpp\
|
||||
code/cfile/cfilearchive.cpp\
|
||||
code/cfile/cfilelist.cpp\
|
||||
code/cfile/cfilesystem.cpp\
|
||||
code/cfilearchiver/cfilearchiver.cpp\
|
||||
code/cmdline/cmdline.cpp\
|
||||
code/cmeasure/cmeasure.cpp\
|
||||
code/controlconfig/controlsconfig.cpp\
|
||||
code/controlconfig/controlsconfigcommon.cpp\
|
||||
code/cryptstring/cryptstring.cpp\
|
||||
code/cutscene/cutscenes.cpp\
|
||||
code/cutscene/movie.cpp\
|
||||
code/ddsutils/ddsutils.cpp\
|
||||
code/debris/debris.cpp\
|
||||
code/debugconsole/console.cpp\
|
||||
code/debugconsole/dbugfile.cpp\
|
||||
code/debugconsole/timerbar.cpp\
|
||||
code/decals/decals.cpp\
|
||||
code/directx/dx8show.cpp\
|
||||
code/exceptionhandler/exceptionhandler.cpp\
|
||||
code/fireball/fireballs.cpp\
|
||||
code/fireball/warpineffect.cpp\
|
||||
code/freespace2/freespace.cpp\
|
||||
code/freespace2/levelpaging.cpp\
|
||||
code/gamehelp/contexthelp.cpp\
|
||||
code/gamehelp/gameplayhelp.cpp\
|
||||
code/gamesequence/gamesequence.cpp\
|
||||
code/gamesnd/eventmusic.cpp\
|
||||
code/gamesnd/gamesnd.cpp\
|
||||
code/globalincs/alphacolors.cpp\
|
||||
code/globalincs/crypt.cpp\
|
||||
code/globalincs/systemvars.cpp\
|
||||
code/globalincs/version.cpp\
|
||||
code/globalincs/windebug.cpp\
|
||||
code/graphics/2d.cpp\
|
||||
code/graphics/font.cpp\
|
||||
code/graphics/grd3d.cpp\
|
||||
code/graphics/grd3dbmpman.cpp\
|
||||
code/graphics/grd3dcalls.cpp\
|
||||
code/graphics/grd3drender.cpp\
|
||||
code/graphics/grd3dtexture.cpp\
|
||||
code/graphics/gropengl.cpp\
|
||||
code/graphics/grzbuffer.cpp\
|
||||
code/graphics/grd3dsetup.cpp\
|
||||
code/graphics/grd3dlight.cpp\
|
||||
code/graphics/grd3dbatch.cpp\
|
||||
code/graphics/GrD3DParticle.cpp\
|
||||
code/hud/hud.cpp\
|
||||
code/hud/hudartillery.cpp\
|
||||
code/hud/hudbrackets.cpp\
|
||||
code/hud/hudconfig.cpp\
|
||||
code/hud/hudescort.cpp\
|
||||
code/hud/hudets.cpp\
|
||||
code/hud/hudlock.cpp\
|
||||
code/hud/hudmessage.cpp\
|
||||
code/hud/hudobserver.cpp\
|
||||
code/hud/hudresource.cpp\
|
||||
code/hud/hudreticle.cpp\
|
||||
code/hud/hudshield.cpp\
|
||||
code/hud/hudsquadmsg.cpp\
|
||||
code/hud/hudtarget.cpp\
|
||||
code/hud/hudtargetbox.cpp\
|
||||
code/hud/hudwingmanstatus.cpp\
|
||||
code/inetfile/cftp.cpp\
|
||||
code/inetfile/chttpget.cpp\
|
||||
code/inetfile/inetgetfile.cpp\
|
||||
code/io/joy_ff.cpp\
|
||||
code/io/joy.cpp\
|
||||
code/io/joy-unix.cpp\
|
||||
code/io/key.cpp\
|
||||
code/io/keycontrol.cpp\
|
||||
code/io/mouse.cpp\
|
||||
code/io/swff_lib.cpp\
|
||||
code/io/timer.cpp\
|
||||
code/io/xmouse.cpp\
|
||||
code/jumpnode/jumpnode.cpp\
|
||||
code/lighting/lighting.cpp\
|
||||
code/localization/fhash.cpp\
|
||||
code/localization/localize.cpp\
|
||||
code/math/floating.cpp\
|
||||
code/math/fix.cpp\
|
||||
code/math/fvi.cpp\
|
||||
code/math/spline.cpp\
|
||||
code/math/staticrand.cpp\
|
||||
code/math/vecmat.cpp\
|
||||
code/menuui/barracks.cpp\
|
||||
code/menuui/credits.cpp\
|
||||
code/menuui/fishtank.cpp\
|
||||
code/menuui/mainhallmenu.cpp\
|
||||
code/menuui/mainhalltemp.cpp\
|
||||
code/menuui/optionsmenu.cpp\
|
||||
code/menuui/optionsmenumulti.cpp\
|
||||
code/menuui/playermenu.cpp\
|
||||
code/menuui/readyroom.cpp\
|
||||
code/menuui/snazzyui.cpp\
|
||||
code/menuui/techmenu.cpp\
|
||||
code/menuui/trainingmenu.cpp\
|
||||
code/mission/missionbriefcommon.cpp\
|
||||
code/mission/missioncampaign.cpp\
|
||||
code/mission/missiongoals.cpp\
|
||||
code/mission/missiongrid.cpp\
|
||||
code/mission/missionhotkey.cpp\
|
||||
code/mission/missionload.cpp\
|
||||
code/mission/missionlog.cpp\
|
||||
code/mission/missionmessage.cpp\
|
||||
code/mission/missionparse.cpp\
|
||||
code/mission/missiontraining.cpp\
|
||||
code/missionui/chatbox.cpp\
|
||||
code/missionui/missionbrief.cpp\
|
||||
code/missionui/missioncmdbrief.cpp\
|
||||
code/missionui/missiondebrief.cpp\
|
||||
code/missionui/missionloopbrief.cpp\
|
||||
code/missionui/missionpause.cpp\
|
||||
code/missionui/missionrecommend.cpp\
|
||||
code/missionui/missionscreencommon.cpp\
|
||||
code/missionui/missionshipchoice.cpp\
|
||||
code/missionui/missionstats.cpp\
|
||||
code/missionui/missionweaponchoice.cpp\
|
||||
code/missionui/redalert.cpp\
|
||||
code/model/modelcollide.cpp\
|
||||
code/model/modelinterp.cpp\
|
||||
code/model/modeloctant.cpp\
|
||||
code/model/modelread.cpp\
|
||||
code/nebula/neb.cpp\
|
||||
code/nebula/neblightning.cpp\
|
||||
code/network/fs2ox.cpp\
|
||||
code/network/multi.cpp\
|
||||
code/network/multi_campaign.cpp\
|
||||
code/network/multi_data.cpp\
|
||||
code/network/multi_dogfight.cpp\
|
||||
code/network/multi_endgame.cpp\
|
||||
code/network/multi_ingame.cpp\
|
||||
code/network/multi_kick.cpp\
|
||||
code/network/multi_log.cpp\
|
||||
code/network/multi_obj.cpp\
|
||||
code/network/multi_observer.cpp\
|
||||
code/network/multi_oo.cpp\
|
||||
code/network/multi_options.cpp\
|
||||
code/network/multi_pause.cpp\
|
||||
code/network/multi_pinfo.cpp\
|
||||
code/network/multi_ping.cpp\
|
||||
code/network/multi_pmsg.cpp\
|
||||
code/network/multi_rate.cpp\
|
||||
code/network/multi_respawn.cpp\
|
||||
code/network/multi_team.cpp\
|
||||
code/network/multi_update.cpp\
|
||||
code/network/multi_voice.cpp\
|
||||
code/network/multi_xfer.cpp\
|
||||
code/network/multilag.cpp\
|
||||
code/network/multimsgs.cpp\
|
||||
code/network/multiteamselect.cpp\
|
||||
code/network/multiui.cpp\
|
||||
code/network/multiutil.cpp\
|
||||
code/network/psnet.cpp\
|
||||
code/network/psnet2.cpp\
|
||||
code/network/stand_gui.cpp\
|
||||
code/network/stand_gui-unix.cpp\
|
||||
code/object/collidedebrisship.cpp\
|
||||
code/object/collidedebrisweapon.cpp\
|
||||
code/object/collideshipship.cpp\
|
||||
code/object/collideshipweapon.cpp\
|
||||
code/object/collideweaponweapon.cpp\
|
||||
code/object/objcollide.cpp\
|
||||
code/object/object.cpp\
|
||||
code/object/objectsnd.cpp\
|
||||
code/object/objectsort.cpp\
|
||||
code/observer/observer.cpp\
|
||||
code/osapi/osapi.cpp\
|
||||
code/osapi/osapi_unix.cpp\
|
||||
code/osapi/osregistry.cpp\
|
||||
code/osapi/osregistry_unix.cpp\
|
||||
code/osapi/outwnd.cpp\
|
||||
code/osapi/outwnd_unix.cpp\
|
||||
code/palman/palman.cpp\
|
||||
code/parse/encrypt.cpp\
|
||||
code/parse/parselo.cpp\
|
||||
code/parse/sexp.cpp\
|
||||
code/particle/particle.cpp\
|
||||
code/pcxutils/pcxutils.cpp\
|
||||
code/physics/physics.cpp\
|
||||
code/playerman/managepilot.cpp\
|
||||
code/playerman/playercontrol.cpp\
|
||||
code/popup/popup.cpp\
|
||||
code/popup/popupdead.cpp\
|
||||
code/radar/radar.cpp\
|
||||
code/render/3ddraw.cpp\
|
||||
code/render/3dclipper.cpp\
|
||||
code/render/3dlaser.cpp\
|
||||
code/render/3dmath.cpp\
|
||||
code/render/3dsetup.cpp\
|
||||
code/scramble/scramble.cpp\
|
||||
code/ship/afterburner.cpp\
|
||||
code/ship/ai.cpp\
|
||||
code/ship/aibig.cpp\
|
||||
code/ship/aicode.cpp\
|
||||
code/ship/aigoals.cpp\
|
||||
code/ship/awacs.cpp\
|
||||
code/ship/shield.cpp\
|
||||
code/ship/ship.cpp\
|
||||
code/ship/shipcontrails.cpp\
|
||||
code/ship/shipfx.cpp\
|
||||
code/ship/shiphit.cpp\
|
||||
code/sound/audiostr.cpp\
|
||||
code/sound/acm.cpp\
|
||||
code/sound/ds.cpp\
|
||||
code/sound/ds3d.cpp\
|
||||
code/sound/dscap.cpp\
|
||||
code/sound/fsspeech.cpp\
|
||||
code/sound/midifile.cpp\
|
||||
code/sound/rbaudio.cpp\
|
||||
code/sound/rtvoice.cpp\
|
||||
code/sound/sound.cpp\
|
||||
code/sound/speech.cpp\
|
||||
code/sound/winmidi.cpp\
|
||||
code/sound/winmidi_base.cpp\
|
||||
code/sound/acm-unix.cpp\
|
||||
code/starfield/nebula.cpp\
|
||||
code/starfield/starfield.cpp\
|
||||
code/starfield/supernova.cpp\
|
||||
code/stats/medals.cpp\
|
||||
code/stats/scoring.cpp\
|
||||
code/stats/stats.cpp\
|
||||
code/tgautils/tgautils.cpp\
|
||||
code/ui/button.cpp\
|
||||
code/ui/checkbox.cpp\
|
||||
code/ui/gadget.cpp\
|
||||
code/ui/icon.cpp\
|
||||
code/ui/inputbox.cpp\
|
||||
code/ui/keytrap.cpp\
|
||||
code/ui/listbox.cpp\
|
||||
code/ui/radio.cpp\
|
||||
code/ui/scroll.cpp\
|
||||
code/ui/slider.cpp\
|
||||
code/ui/slider2.cpp\
|
||||
code/ui/uidraw.cpp\
|
||||
code/ui/uimouse.cpp\
|
||||
code/ui/window.cpp\
|
||||
code/vcodec/codec1.cpp\
|
||||
code/weapon/beam.cpp\
|
||||
code/weapon/corkscrew.cpp\
|
||||
code/weapon/emp.cpp\
|
||||
code/weapon/flak.cpp\
|
||||
code/weapon/muzzleflash.cpp\
|
||||
code/weapon/shockwave.cpp\
|
||||
code/weapon/swarm.cpp\
|
||||
code/weapon/trails.cpp\
|
||||
code/weapon/weapons.cpp\
|
||||
code/windows_stub/stubs.cpp\
|
||||
code/species_defs/species_defs.cpp\
|
||||
code/fs2open_pxo/Client.cpp\
|
||||
code/fs2open_pxo/TCP_Client.cpp\
|
||||
code/fs2open_pxo/TCP_Socket.cpp\
|
||||
code/fs2open_pxo/udpsocket.cpp\
|
||||
code/openil/il_func.cpp\
|
||||
code/jpgutils/jpgutils.cpp\
|
||||
code/irc/irc.cpp\
|
||||
code/graphics/grbatch.cpp\
|
||||
code/graphics/gropengltnl.cpp\
|
||||
code/graphics/gropengllight.cpp\
|
||||
code/graphics/gropenglextension.cpp\
|
||||
code/graphics/gropengltexture.cpp\
|
||||
code/sound/audiostr-unix.cpp\
|
||||
code/autopilot/autopilot.cpp\
|
||||
code/hud/hudnavigation.cpp
|
||||
|
||||
module.pixmap.name=.
|
||||
module.pixmap.type=
|
||||
module.pixmap.files=\
|
||||
code/freespace2/app_icon.ico\
|
||||
code/freespace2/goal_com.bmp\
|
||||
code/freespace2/goal_fail.bmp\
|
||||
code/freespace2/goal_inc.bmp\
|
||||
code/freespace2/goal_none.bmp\
|
||||
code/freespace2/goal_ord.bmp
|
||||
|
||||
module.data.name=.
|
||||
module.data.type=
|
||||
module.data.files=
|
||||
|
||||
module.help.name=.
|
||||
module.help.type=
|
||||
module.help.files=
|
||||
|
||||
module.doc.name=.
|
||||
module.doc.type=
|
||||
module.doc.files=\
|
||||
AUTHORS\
|
||||
ChangeLog\
|
||||
COPYING\
|
||||
INSTALL\
|
||||
NEWS\
|
||||
README
|
||||
|
||||
module.po.files=
|
||||
|
||||
compiler.options.supports=
|
||||
compiler.options.include.paths=\
|
||||
.\
|
||||
..
|
||||
compiler.options.library.paths=
|
||||
compiler.options.libraries=
|
||||
compiler.options.libraries.selected=
|
||||
compiler.options.defines=\
|
||||
HAVE_CONFIG_H
|
||||
compiler.options.defines.selected=
|
||||
compiler.options.warning.buttons=0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0
|
||||
compiler.options.optimize.buttons=0 0 1 0
|
||||
compiler.options.other.buttons=1 0
|
||||
compiler.options.other.c.flags=
|
||||
compiler.options.other.l.flags=
|
||||
compiler.options.other.l.libs=
|
||||
|
||||
project.src.paths=
|
||||
+7
-11
@@ -43,17 +43,17 @@ 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 /W2 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /D "USE_OPENGL" /D "HTL" /D "MORE_SPECIES" /U "_DEBUG" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "_MBCS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /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"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"Release\Profile\Freespace2.bsc" "Release\Profile\*.sbr"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 Quartz.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_r.exe" /libpath:"release" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib"
|
||||
# ADD LINK32 Quartz.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_r.exe" /libpath:"release" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib" /libpath:"C:\libraries\DevIL\lib"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
# Begin Custom Build - Copying $(InputPath) to D:\games\freespace2
|
||||
InputPath=\games\freespace2\fs2_open_r.exe
|
||||
@@ -78,18 +78,18 @@ SOURCE="$(InputPath)"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "NO_CD_CHECK" /D "MORE_SPECIES" /U "NDEBUG" /Fr /YX /FD /GZ /GZ /c
|
||||
# ADD CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "NO_CD_CHECK" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"debug/profile/Freespace2.bsc" "./debug/profile/*.sbr"
|
||||
# ADD BSC32 /nologo /o"Debug\Profile\Freespace2.bsc" "Debug\Profile\*.sbr"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Quartz.lib d3d8.lib d3dx8.lib DxErr8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_d.exe" /libpath:"debug" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib"
|
||||
# SUBTRACT LINK32 /pdb:none /incremental:no /map
|
||||
# ADD LINK32 Quartz.lib d3d8.lib d3dx8.lib DxErr8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_d.exe" /libpath:"debug" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib" /libpath:"C:\libraries\DevIL\lib"
|
||||
# SUBTRACT LINK32 /pdb:none /incremental:no
|
||||
# Begin Custom Build - Copying $(InputPath) to D:\games\freespace2
|
||||
InputPath=\games\freespace2\fs2_open_d.exe
|
||||
SOURCE="$(InputPath)"
|
||||
@@ -157,9 +157,5 @@ SOURCE=.\code\FREESPACE2\LevelPaging.cpp
|
||||
|
||||
SOURCE=.\code\FREESPACE2\LevelPaging.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\code\network\multiui.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,506 +0,0 @@
|
||||
# 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,180 @@
|
||||
# Configure paths for SDL
|
||||
# Sam Lantinga 9/21/99
|
||||
# stolen from Manish Singh
|
||||
# stolen back from Frank Belew
|
||||
# stolen from Manish Singh
|
||||
# Shamelessly stolen from Owen Taylor
|
||||
|
||||
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_SDL],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the sdl-config script
|
||||
dnl
|
||||
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
|
||||
sdl_prefix="$withval", sdl_prefix="")
|
||||
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
|
||||
sdl_exec_prefix="$withval", sdl_exec_prefix="")
|
||||
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
|
||||
, enable_sdltest=yes)
|
||||
|
||||
if test x$sdl_exec_prefix != x ; then
|
||||
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
|
||||
if test x${SDL_CONFIG+set} != xset ; then
|
||||
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
|
||||
fi
|
||||
fi
|
||||
if test x$sdl_prefix != x ; then
|
||||
sdl_args="$sdl_args --prefix=$sdl_prefix"
|
||||
if test x${SDL_CONFIG+set} != xset ; then
|
||||
SDL_CONFIG=$sdl_prefix/bin/sdl-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_TARGET])
|
||||
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
|
||||
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
|
||||
min_sdl_version=ifelse([$1], ,0.11.0,$1)
|
||||
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
|
||||
no_sdl=""
|
||||
if test "$SDL_CONFIG" = "no" ; then
|
||||
no_sdl=yes
|
||||
else
|
||||
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
|
||||
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
|
||||
|
||||
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_sdltest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed SDL is sufficiently new. (Also sanity
|
||||
dnl checks the results of sdl-config to some extent
|
||||
dnl
|
||||
rm -f conf.sdltest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "SDL.h"
|
||||
|
||||
char*
|
||||
my_strdup (char *str)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
if (str)
|
||||
{
|
||||
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
|
||||
strcpy (new_str, str);
|
||||
}
|
||||
else
|
||||
new_str = NULL;
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
/* This hangs on some systems (?)
|
||||
system ("touch conf.sdltest");
|
||||
*/
|
||||
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = my_strdup("$min_sdl_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_sdl_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (($sdl_major_version > major) ||
|
||||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
|
||||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
|
||||
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
|
||||
printf("*** best to upgrade to the required version.\n");
|
||||
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
|
||||
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
|
||||
printf("*** config.cache before re-running configure\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_sdl" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$SDL_CONFIG" = "no" ; then
|
||||
echo "*** The sdl-config script installed by SDL could not be found"
|
||||
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the SDL_CONFIG environment variable to the"
|
||||
echo "*** full path to sdl-config."
|
||||
else
|
||||
if test -f conf.sdltest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run SDL test program, checking why..."
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include "SDL.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{ return 0; }
|
||||
#undef main
|
||||
#define main K_and_R_C_main
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding SDL or finding the wrong"
|
||||
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
|
||||
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
SDL_CFLAGS=""
|
||||
SDL_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(SDL_CFLAGS)
|
||||
AC_SUBST(SDL_LIBS)
|
||||
rm -f conf.sdltest
|
||||
])
|
||||
Executable
+126
@@ -0,0 +1,126 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
PKG_NAME="the package."
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`autoconf' installed to."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`automake' installed."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
NO_AUTOMAKE=yes
|
||||
}
|
||||
|
||||
|
||||
# if no automake, don't bother testing for aclocal
|
||||
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
||||
echo "installed doesn't appear recent enough."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
echo
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
for coin in `find $srcdir -name configure.ac -print`
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
|
||||
( cd $dr
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
for k in $macrodirs; do
|
||||
if test -d $k; then
|
||||
aclocalinclude="$aclocalinclude -I $k"
|
||||
##else
|
||||
## echo "**Warning**: No such directory \`$k'. Ignored."
|
||||
fi
|
||||
done
|
||||
if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.ac >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.ac
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
./setup-gettext
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AM_GNOME_GETTEXT" configure.ac >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
./setup-gettext
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
echo "Running aclocal $aclocalinclude ..."
|
||||
aclocal $aclocalinclude
|
||||
if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
fi
|
||||
echo "Running automake --gnu $am_opt ..."
|
||||
automake --add-missing --copy --gnu $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
@@ -0,0 +1,5 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
fs2_open_d
|
||||
fs2_open_r
|
||||
.deps
|
||||
+336
-267
@@ -1,305 +1,374 @@
|
||||
# code/Makefile.am for fs2_open
|
||||
#
|
||||
# $Id: Makefile.am,v 1.2 2003-03-11 19:00:05 penguin Exp $
|
||||
# $Id: Makefile.am,v 1.3 2004-05-24 04:10:03 taylor Exp $
|
||||
|
||||
noinst_PROGRAMS = fs2
|
||||
if FS2_DEBUG
|
||||
noinst_PROGRAMS = fs2_open_d
|
||||
fs2_open_d_SOURCES = $(CODE_SOURCES)
|
||||
else
|
||||
noinst_PROGRAMS = fs2_open_r
|
||||
fs2_open_r_SOURCES = $(CODE_SOURCES)
|
||||
endif # FS2_DEBUG
|
||||
|
||||
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
|
||||
LDADD =
|
||||
|
||||
|
||||
CODE_SOURCES = \
|
||||
anim/animplay.cpp \
|
||||
anim/packunpack.cpp \
|
||||
asteroid/asteroid.cpp \
|
||||
autopilot/autopilot.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 \
|
||||
ddsutils/ddsutils.cpp \
|
||||
debris/debris.cpp \
|
||||
debugconsole/console.cpp \
|
||||
debugconsole/timerbar.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/font.cpp \
|
||||
graphics/grbatch.cpp \
|
||||
graphics/gropengl.cpp \
|
||||
graphics/gropenglextension.cpp \
|
||||
graphics/gropengllight.cpp \
|
||||
graphics/gropengltexture.cpp \
|
||||
graphics/gropengltnl.cpp \
|
||||
graphics/grzbuffer.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/hudnavigation.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 \
|
||||
jpgutils/jpgutils.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 \
|
||||
species_defs/species_defs.cpp
|
||||
|
||||
|
||||
## conditional includes follow:
|
||||
|
||||
## joystic support sources
|
||||
if FS2_JOYSTICK
|
||||
fs2_SOURCES += \
|
||||
io/joy.cpp \
|
||||
io/joy_ff.cpp \
|
||||
io/swff_lib.cpp
|
||||
|
||||
if FS2_OS_WIN32
|
||||
CODE_SOURCES += \
|
||||
io/joy.cpp \
|
||||
io/joy_ff.cpp \
|
||||
io/swff_lib.cpp
|
||||
endif # FS2_OS_WIN32
|
||||
|
||||
if FS2_OS_UNIX
|
||||
CODE_SOURCES += \
|
||||
io/joy-unix.cpp
|
||||
endif # FS2_OS_UNIX
|
||||
|
||||
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
|
||||
CODE_SOURCES += \
|
||||
hud/hudobserver.cpp \
|
||||
irc/irc.cpp \
|
||||
network/fs2ox.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 \
|
||||
fs2open_pxo/Client.cpp \
|
||||
fs2open_pxo/TCP_Client.cpp \
|
||||
fs2open_pxo/TCP_Socket.cpp \
|
||||
fs2open_pxo/udpsocket.cpp
|
||||
|
||||
if FS2_OS_WIN32
|
||||
CODE_SOURCES += \
|
||||
network/stand_gui.cpp
|
||||
endif # FS2_OS_WIN32
|
||||
|
||||
if FS2_OS_UNIX
|
||||
CODE_SOURCES += \
|
||||
network/stand_gui-unix.cpp
|
||||
endif # FS2_OS_UNIX
|
||||
|
||||
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
|
||||
CODE_SOURCES += \
|
||||
gamesnd/eventmusic.cpp \
|
||||
gamesnd/gamesnd.cpp \
|
||||
object/objectsnd.cpp \
|
||||
sound/ds.cpp \
|
||||
sound/midifile.cpp \
|
||||
sound/rbaudio.cpp \
|
||||
sound/rtvoice.cpp \
|
||||
sound/sound.cpp \
|
||||
sound/winmidi.cpp \
|
||||
sound/winmidi_base.cpp \
|
||||
vcodec/codec1.cpp \
|
||||
sound/fsspeech.cpp \
|
||||
sound/speech.cpp
|
||||
|
||||
## software-rendering support sources
|
||||
if FS2_GRSOFT
|
||||
fs2_SOURCES += \
|
||||
graphics/grsoft.cpp \
|
||||
graphics/tmapper.cpp
|
||||
endif # FS2_GRSOFT
|
||||
if FS2_OS_WIN32
|
||||
CODE_SOURCES += \
|
||||
sound/dscap.cpp \
|
||||
sound/ds3d.cpp \
|
||||
sound/audiostr.cpp \
|
||||
sound/acm.cpp
|
||||
endif # FS2_OS_WIN32
|
||||
|
||||
if FS2_OS_UNIX
|
||||
CODE_SOURCES += \
|
||||
sound/audiostr-unix.cpp \
|
||||
sound/acm-unix.cpp
|
||||
endif # FS2_OS_UNIX
|
||||
|
||||
endif # FS2_SOUND
|
||||
|
||||
## 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
|
||||
CODE_SOURCES += \
|
||||
cutscene/movie.cpp \
|
||||
directx/dx8show.cpp \
|
||||
globalincs/windebug.cpp \
|
||||
glide/glide.cpp \
|
||||
graphics/grd3d.cpp \
|
||||
graphics/grd3dbatch.cpp \
|
||||
graphics/grd3drender.cpp \
|
||||
graphics/grd3dtexture.cpp \
|
||||
graphics/grdirectdraw.cpp \
|
||||
graphics/grglide.cpp \
|
||||
graphics/grglidetexture.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
|
||||
CODE_SOURCES += \
|
||||
io/xmouse.cpp \
|
||||
osapi/osapi_unix.cpp \
|
||||
osapi/osregistry_unix.cpp \
|
||||
osapi/outwnd_unix.cpp \
|
||||
cutscene/movie.cpp \
|
||||
windows_stub/stubs.cpp
|
||||
endif # FS2_OS_UNIX
|
||||
|
||||
# Use devIL
|
||||
if FS2_DEVIL
|
||||
CODE_SOURCES += \
|
||||
openil/il_func.cpp
|
||||
endif # FS2_DEVIL
|
||||
|
||||
## compiler flags
|
||||
# INCLUDES = -I.
|
||||
AM_CXXFLAGS = -fno-exceptions @DX8_INCLUDE@
|
||||
AM_LDFLAGS = -L/c/dx8/lib @DX8_LIB@
|
||||
#if FS2_SPEECH
|
||||
#LDADD += \
|
||||
# -lFestival -lestools -lestbase -leststring -lncurses
|
||||
#endif
|
||||
|
||||
LDADD =
|
||||
|
||||
if FS2_OS_WIN32
|
||||
## compiler flags
|
||||
# INCLUDES = -I.
|
||||
AM_CXXFLAGS = \
|
||||
-fexceptions \
|
||||
${DX8_INCLUDE} \
|
||||
${DEVIL_CFLAGS}
|
||||
|
||||
AM_LDFLAGS = \
|
||||
${DX8_LIB} \
|
||||
${DEVIL_LIBS}
|
||||
|
||||
## Win32 libraries needed
|
||||
LDADD += \
|
||||
-lgdi32 -lole32 -lwsock32 -lwinmm -lmsacm32 -lopengl32 \
|
||||
-lcomctl32 -lstrmiids -ldxguid -lddraw -ldinput
|
||||
LDADD += \
|
||||
-lgdi32 -lole32 -lwsock32 -lwinmm -lmsacm32 -lopengl32 \
|
||||
-lcomctl32 -lstrmiids -ldxguid -lddraw -ldinput
|
||||
endif
|
||||
|
||||
|
||||
if FS2_OS_UNIX
|
||||
## Unix libraries needed
|
||||
## -- TODO --
|
||||
## Unix compiler flags
|
||||
AM_CXXFLAGS = \
|
||||
-Wno-missing-braces -Wno-multichar -Wno-deprecated \
|
||||
${SDL_CFLAGS} \
|
||||
${OPENAL_CFLAGS} \
|
||||
${DEVIL_CFLAGS} \
|
||||
-fsigned-char -DNO_DIRECT3D -DUSE_OPENGL
|
||||
|
||||
AM_LDFLAGS = \
|
||||
${OGL_LIBDIR} -lGL -lGLU \
|
||||
${SDL_LIBS} \
|
||||
${OPENAL_LIBS} \
|
||||
${DEVIL_LIBS}
|
||||
endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,67 @@
|
||||
// Place all prepreprcoessor definitions that tuurn features on/off
|
||||
// into this file.
|
||||
// the purpose of this is to prevent what happens with FRED
|
||||
// when DECALS_ENABLED was added to code.lib
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/PreProcDefines.h $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2004-12-05 22:01:11 $
|
||||
* $Author: bobboau $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.4 2004/10/31 21:23:08 taylor
|
||||
* #define if !#defined, add USE_DEVIL and FS2_SPEECH commented out
|
||||
*
|
||||
* Revision 1.3 2004/10/06 22:02:53 Kazan
|
||||
* interface corruption fix - thanks taylor (MAX_BITMAPS upped to 7000)
|
||||
*
|
||||
* Revision 1.2 2004/08/20 05:13:07 Kazan
|
||||
* wakka wakka - fix minor booboo
|
||||
*
|
||||
* Revision 1.1 2004/08/11 05:06:17 Kazan
|
||||
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_pre_proc_defs_h_)
|
||||
#define _pre_proc_defs_h_
|
||||
|
||||
#ifndef DECALS_ENABLED
|
||||
#define DECALS_ENABLED 1
|
||||
#endif
|
||||
|
||||
#ifndef HTL
|
||||
#define HTL 1
|
||||
#endif
|
||||
|
||||
#ifndef USE_OPENGL
|
||||
#define USE_OPENGL 1
|
||||
#endif
|
||||
|
||||
#ifndef MORE_SPECIES
|
||||
#define MORE_SPECIES 1
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_AUTO_PILOT
|
||||
#define ENABLE_AUTO_PILOT 1
|
||||
#endif
|
||||
|
||||
#ifndef _REPORT_MEM_LEAKS
|
||||
#define _REPORT_MEM_LEAKS 1
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
#ifndef USE_DEVIL
|
||||
#define USE_DEVIL 1
|
||||
#endif
|
||||
|
||||
#ifndef FS2_SPEECH
|
||||
#define FS2_SPEECH 1
|
||||
#endif
|
||||
*/
|
||||
|
||||
#endif // _pre_proc_defs_h_
|
||||
@@ -9,13 +9,29 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Anim/AnimPlay.cpp $
|
||||
* $Revision: 2.8 $
|
||||
* $Date: 2004-03-05 09:01:52 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.13 $
|
||||
* $Date: 2004-12-20 20:18:30 $
|
||||
* $Author: fryday $
|
||||
*
|
||||
* C module for playing back anim files
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.12 2004/10/09 17:58:48 taylor
|
||||
* one more try to fix the memory leak and end-of-mission crash for talking head anis
|
||||
*
|
||||
* Revision 2.11 2004/07/26 20:47:23 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.10 2004/07/17 18:46:06 taylor
|
||||
* various OGL and memory leak fixes
|
||||
*
|
||||
* Revision 2.9 2004/07/12 16:32:41 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.8 2004/03/05 09:01:52 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.7 2004/02/16 11:47:31 randomtiger
|
||||
* Removed a lot of files that we dont need anymore.
|
||||
* Changed htl to be on by default, command now -nohtl
|
||||
@@ -249,6 +265,8 @@
|
||||
#include "cfile/cfile.h"
|
||||
#include "cmdline/cmdline.h"
|
||||
|
||||
|
||||
|
||||
static color Color_xparent;
|
||||
|
||||
anim *first_anim = NULL;
|
||||
@@ -901,7 +919,7 @@ void anim_read_header(anim *ptr, CFILE *fp)
|
||||
floor_pow++;
|
||||
}
|
||||
|
||||
int floor_size = (int) pow(2, floor_pow);
|
||||
int floor_size = (int) pow(2.0, floor_pow);
|
||||
int diff = ptr->height - floor_size;
|
||||
float waste = 100.0f * float((floor_size - diff))/(2.0f *(float)floor_size);
|
||||
|
||||
@@ -1095,7 +1113,7 @@ int anim_free(anim *ptr)
|
||||
}
|
||||
|
||||
if ( !list )
|
||||
return -1;
|
||||
return -2;
|
||||
|
||||
// only free when ref_count is 0
|
||||
ptr->ref_count--;
|
||||
@@ -1115,11 +1133,15 @@ int anim_free(anim *ptr)
|
||||
cfclose(ptr->cfile_ptr);
|
||||
if ( ptr->cache ) {
|
||||
free(ptr->cache);
|
||||
ptr->cache = NULL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Assert(ptr->data);
|
||||
free(ptr->data);
|
||||
if ( ptr->data ) {
|
||||
free(ptr->data);
|
||||
ptr->data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
*prev_anim = ptr->next;
|
||||
|
||||
@@ -9,13 +9,18 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Anim/AnimPlay.h $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2003-12-08 22:30:02 $
|
||||
* $Author: randomtiger $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2004-08-11 05:06:18 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Header file for playing back anim files
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2003/12/08 22:30:02 randomtiger
|
||||
* Put render state and other direct D3D calls repetition check back in, provides speed boost.
|
||||
* Fixed bug that caused fullscreen only crash with DXT textures
|
||||
* Put dithering back in for tgas and jpgs
|
||||
*
|
||||
* Revision 2.2 2003/11/11 02:15:41 Goober5000
|
||||
* ubercommit - basically spelling and language fixes with some additional
|
||||
* warnings disabled
|
||||
@@ -107,6 +112,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __ANIMPLAY_H__
|
||||
#define __ANIMPLAY_H__
|
||||
|
||||
|
||||
@@ -9,15 +9,22 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Anim/PackUnpack.cpp $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-03-05 09:01:53 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2004-07-26 20:47:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for handling packing and unpacking in Hoffoss's RLE format, used for
|
||||
* Anim files. Also handles Anim loading, creating Anim instances (for
|
||||
* utilizing an Anim), and getting getting frames of the Anim.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.6 2004/07/12 16:32:41 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.5 2004/03/05 09:01:53 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.4 2004/02/14 00:18:29 randomtiger
|
||||
* Please note that from now on OGL will only run with a registry set by Launcher v4. See forum for details.
|
||||
* OK, these changes effect a lot of file, I suggest everyone updates ASAP:
|
||||
@@ -194,6 +201,9 @@
|
||||
#include "graphics/2d.h"
|
||||
#include "anim/animplay.h"
|
||||
|
||||
|
||||
|
||||
|
||||
int packer_code = PACKER_CODE;
|
||||
int transparent_code = 254;
|
||||
|
||||
|
||||
@@ -9,15 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Anim/PackUnpack.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-03-05 09:01:53 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-08-11 05:06:18 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for handling packing and unpacking in Hoffoss's RLE format, used for
|
||||
* Anim files. Also handles Anim loading, creating Anim instances (for
|
||||
* utilizing an Anim), and getting getting frames of the Anim.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2004/03/05 09:01:53 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -154,6 +158,7 @@
|
||||
#ifndef __PACKUNPACK_H__
|
||||
#define __PACKUNPACK_H__
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
struct CFILE;
|
||||
|
||||
@@ -9,13 +9,21 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Asteroid/Asteroid.cpp $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2004-03-31 05:42:25 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2004-07-26 20:47:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* C module for asteroid code
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2004/07/12 16:32:41 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.7 2004/03/31 05:42:25 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.6 2004/03/05 09:01:53 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
@@ -325,6 +333,8 @@
|
||||
#include "network/multi.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef FS2_DEMO
|
||||
|
||||
#define ASTEROID_OBJ_USED (1<<0) // flag used in asteroid_obj struct
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Asteroid/Asteroid.h $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2004-03-05 09:01:53 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-08-11 05:06:18 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Header file for asteroids
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2004/03/05 09:01:53 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.3 2003/10/15 22:03:23 Kazan
|
||||
* Da Species Update :D
|
||||
*
|
||||
@@ -132,6 +136,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __ASTEROID_H__
|
||||
#define __ASTEROID_H__
|
||||
|
||||
|
||||
@@ -0,0 +1,808 @@
|
||||
// Autopilot.cpp
|
||||
// Derek Meek
|
||||
// 4-30-2004
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Autopilot/Autopilot.cpp $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2004-10-03 21:41:10 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.13 2004/09/28 22:51:41 Kazan
|
||||
* fix autopilot formation bug
|
||||
*
|
||||
* Revision 1.12 2004/09/28 19:54:31 Kazan
|
||||
* | is binary or, || is boolean or - please use the right one
|
||||
* autopilot velocity ramping biasing
|
||||
* made debugged+k kill guardianed ships
|
||||
*
|
||||
* Revision 1.11 2004/07/29 23:41:21 Kazan
|
||||
* bugfixes
|
||||
*
|
||||
* Revision 1.10 2004/07/27 18:52:10 Kazan
|
||||
* squished another
|
||||
*
|
||||
* Revision 1.9 2004/07/27 18:04:09 Kazan
|
||||
* i love it when bugs go crunch (autopilot ai fixup)
|
||||
*
|
||||
* Revision 1.8 2004/07/26 20:47:24 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 1.7 2004/07/26 17:54:04 Kazan
|
||||
* Autopilot system completed -- i am dropping plans for GUI nav map
|
||||
* All builds should have ENABLE_AUTO_PILOT defined from now on (.dsp's i am committing reflect this) the system will only be noticed if the mission designer brings it online by defining a nav point
|
||||
* Fixed FPS counter during time compression
|
||||
*
|
||||
* Revision 1.6 2004/07/25 19:27:51 Kazan
|
||||
* only disable afterburning during AIM_WAYPOINTS and AIM_FLY_TO_SHIP while AutoPilotEngaged
|
||||
*
|
||||
* Revision 1.5 2004/07/25 18:46:28 Kazan
|
||||
* -fred_no_warn has become -no_warn and applies to both fred and fs2
|
||||
* added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
|
||||
* fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
|
||||
* made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
|
||||
*
|
||||
* Revision 1.4 2004/07/25 00:31:27 Kazan
|
||||
* i have absolutely nothing to say about that subject
|
||||
*
|
||||
* Revision 1.3 2004/07/12 16:32:42 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 1.2 2004/07/01 16:38:18 Kazan
|
||||
* working on autonav
|
||||
*
|
||||
* Revision 1.1 2004/05/07 23:50:14 Kazan
|
||||
* Sorry Guys!
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "Autopilot.h"
|
||||
#include "ship/ai.h"
|
||||
#include "ship/aigoals.h"
|
||||
#include "ship/ship.h"
|
||||
#include "object/object.h"
|
||||
#include "parse/sexp.h"
|
||||
|
||||
|
||||
|
||||
// Extern functions/variables
|
||||
extern int Player_use_ai;
|
||||
extern int sexp_distance2(int obj1, char *subj);
|
||||
extern int ai_goal_find_empty_slot( ai_goal *goals );
|
||||
|
||||
extern fix Game_time_compression;
|
||||
|
||||
|
||||
#if defined(ENABLE_AUTO_PILOT)
|
||||
|
||||
|
||||
|
||||
// Module variables
|
||||
bool AutoPilotEngaged;
|
||||
int CurrentNav;
|
||||
float ramp_bias;
|
||||
NavPoint Navs[MAX_NAVPOINTS];
|
||||
|
||||
// used for ramping time compression;
|
||||
int start_dist;
|
||||
|
||||
// ********************************************************************************************
|
||||
|
||||
void autopilot_ai_waypoint_goal_fixup(ai_goal* aigp)
|
||||
{
|
||||
// this function sets wp_index properly;
|
||||
for (int i = 0; i < Num_waypoint_lists; i++)
|
||||
{
|
||||
if (!stricmp(aigp->ship_name, Waypoint_lists[i].name))
|
||||
{
|
||||
aigp->wp_index = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ********************************************************************************************
|
||||
bool Sel_NextNav()
|
||||
{
|
||||
if (AutoPilotEngaged)
|
||||
return false;
|
||||
|
||||
int i;
|
||||
if (CurrentNav == -1)
|
||||
{
|
||||
for (i = 0; i < MAX_NAVPOINTS; i++)
|
||||
{
|
||||
if (Navs[i].flags & NP_VALIDTYPE && !(Navs[i].flags & NP_NOSELECT))
|
||||
{
|
||||
CurrentNav=i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = CurrentNav+1; i < MAX_NAVPOINTS+CurrentNav; i++)
|
||||
{
|
||||
if (Navs[i%MAX_NAVPOINTS].flags & NP_VALIDTYPE && !(Navs[i%MAX_NAVPOINTS].flags & NP_NOSELECT))
|
||||
{
|
||||
if (i != CurrentNav)
|
||||
{
|
||||
CurrentNav=i%MAX_NAVPOINTS;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ********************************************************************************************
|
||||
vector NavPoint::GetPosition()
|
||||
{
|
||||
vector position;
|
||||
|
||||
if (flags & NP_WAYPOINT)
|
||||
{
|
||||
position = ((waypoint_list*)target_obj)->waypoints[waypoint_num-1];
|
||||
}
|
||||
else
|
||||
{
|
||||
position = Objects[((ship*)target_obj)->objnum].pos;
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
char* NavPoint::GetInteralName()
|
||||
{
|
||||
char *NavName;
|
||||
char strtmp[3];
|
||||
|
||||
if (flags & NP_WAYPOINT)
|
||||
{
|
||||
NavName = new char[strlen(((waypoint_list*)target_obj)->name)+5];
|
||||
memset(NavName, 0, strlen(((waypoint_list*)target_obj)->name)+5);
|
||||
strcpy(NavName, ((waypoint_list*)target_obj)->name);
|
||||
|
||||
strcat(NavName, ":");
|
||||
strcat(NavName, itoa(waypoint_num, strtmp, 10));
|
||||
}
|
||||
else
|
||||
{
|
||||
NavName = new char[strlen(((ship*)target_obj)->ship_name)+1];
|
||||
memset(NavName, 0, strlen(((ship*)target_obj)->ship_name)+1);
|
||||
strcpy(NavName, ((ship*)target_obj)->ship_name);
|
||||
}
|
||||
|
||||
return NavName;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Tell us is autopilot is allow
|
||||
// This needs:
|
||||
// * Nav point selected
|
||||
// * No enemies within X distance
|
||||
// * Destination > 1,000 meters away
|
||||
bool CanAutopilot()
|
||||
{
|
||||
bool CanAuto = true;
|
||||
CanAuto = CanAuto && CurrentNav != -1;
|
||||
|
||||
int dist = sexp_distance2(Player_ship->objnum, "<any hostile>");
|
||||
|
||||
CanAuto = CanAuto && (5000 <= dist || dist == SEXP_NAN);
|
||||
|
||||
|
||||
if (CanAuto) // protect against no currentNav
|
||||
{
|
||||
char *name = Navs[CurrentNav].GetInteralName();
|
||||
CanAuto = CanAuto && (1000 <= sexp_distance2(Player_ship->objnum, name));
|
||||
delete[] name;
|
||||
}
|
||||
|
||||
return CanAuto;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Engages autopilot
|
||||
// This does:
|
||||
// * Control switched from player to AI
|
||||
// * Time compression to 32x
|
||||
// * Tell AI to fly to targetted Nav Point (for all nav-status wings/ships)
|
||||
// * Sets max waypoint speed to the best-speed of the slowest ship tagged
|
||||
void StartAutopilot()
|
||||
{
|
||||
if (!CanAutopilot())
|
||||
return;
|
||||
|
||||
AutoPilotEngaged = true;
|
||||
|
||||
Player_use_ai = 1;
|
||||
Game_time_compression = F1_0;
|
||||
|
||||
// determine speed cap
|
||||
int i,j;
|
||||
float speed_cap = 1000000.0; // 1m is a safe starting point
|
||||
|
||||
for (i = 0; i < MAX_SHIPS; i++)
|
||||
{
|
||||
if (Ships[i].objnum != -1 &&
|
||||
(Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
|
||||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY)
|
||||
)
|
||||
)
|
||||
{
|
||||
if (speed_cap > Ship_info[Ships[i].ship_info_index].max_vel.xyz.z)
|
||||
speed_cap = Ship_info[Ships[i].ship_info_index].max_vel.xyz.z;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// damp speed_cap to 90% of actual -- to make sure ships stay in formation
|
||||
speed_cap = 0.90f * speed_cap;
|
||||
ramp_bias = speed_cap/50.0f;
|
||||
|
||||
// assign ship goals
|
||||
// when assigning goals to individual ships only do so if Ships[shipnum].wingnum != -1
|
||||
// we will assign wing goals below
|
||||
|
||||
|
||||
for (i = 0; i < MAX_SHIPS; i++)
|
||||
{
|
||||
if (Ships[i].objnum != -1 &&
|
||||
(Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
|
||||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY)
|
||||
)
|
||||
)
|
||||
{
|
||||
|
||||
// clear the ship goals and cap the waypoint speed
|
||||
ai_clear_ship_goals(&Ai_info[Ships[i].ai_index]);
|
||||
Ai_info[Ships[i].ai_index].waypoint_speed_cap = (int)speed_cap;
|
||||
|
||||
|
||||
// if they're not part of a wing set their goal
|
||||
if (Ships[i].wingnum == -1)
|
||||
{
|
||||
if (Navs[CurrentNav].flags & NP_WAYPOINT)
|
||||
{
|
||||
|
||||
ai_add_ship_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_WAYPOINTS_ONCE, -1, ((waypoint_list*)Navs[CurrentNav].target_obj)->name, &Ai_info[Ships[i].ai_index] );
|
||||
|
||||
//fixup has to wait until after wing goals
|
||||
}
|
||||
else
|
||||
{
|
||||
ai_add_ship_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_FLY_TO_SHIP, -1, ((ship*)Navs[CurrentNav].target_obj)->ship_name, &Ai_info[Ships[i].ai_index] );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// assign wing goals
|
||||
for (i = 0; i < MAX_WINGS; i++)
|
||||
{
|
||||
if (Wings[i].flags & WF_NAV_CARRY )
|
||||
{
|
||||
//ai_add_ship_goal_player( int type, int mode, int submode, char *shipname, ai_info *aip );
|
||||
|
||||
//ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_STAY_NEAR_SHIP, 0, target_shipname, wingnum );
|
||||
//ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_WAYPOINTS_ONCE, 0, target_shipname, wingnum );
|
||||
//ai_clear_ship_goals( &(Ai_info[Ships[num].ai_index]) );
|
||||
|
||||
ai_clear_wing_goals( i );
|
||||
if (Navs[CurrentNav].flags & NP_WAYPOINT)
|
||||
{
|
||||
|
||||
ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_WAYPOINTS_ONCE, AIF_FORMATION_WING, ((waypoint_list*)Navs[CurrentNav].target_obj)->name, i );
|
||||
|
||||
|
||||
// "fix up" the goal
|
||||
for (j = 0; j < MAX_AI_GOALS; j++)
|
||||
{
|
||||
if (Wings[i].ai_goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
|
||||
Wings[i].ai_goals[j].ai_mode == AIM_WAYPOINTS )
|
||||
{
|
||||
autopilot_ai_waypoint_goal_fixup(&(Wings[i].ai_goals[j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_FLY_TO_SHIP, AIF_FORMATION_WING, ((ship*)Navs[CurrentNav].target_obj)->ship_name, i );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fixup has to go down here because ships are assigned goals during wing goals as well
|
||||
for (i = 0; i < MAX_SHIPS; i++)
|
||||
{
|
||||
if (Ships[i].objnum != -1)
|
||||
{
|
||||
if (Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
|
||||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY))
|
||||
for (j = 0; j < MAX_AI_GOALS; j++)
|
||||
{
|
||||
if (Ai_info[Ships[i].ai_index].goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
|
||||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AIM_WAYPOINTS)
|
||||
{
|
||||
autopilot_ai_waypoint_goal_fixup( &(Ai_info[Ships[i].ai_index].goals[j]) );
|
||||
|
||||
|
||||
// formation fixup
|
||||
//ai_form_on_wing(&Objects[Ships[i].objnum], &Objects[Player_ship->objnum]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
start_dist = DistanceTo(CurrentNav);
|
||||
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Checks if autopilot should automatically die
|
||||
// Returns true if:
|
||||
// * Targetted waypoint < 10,000 meters away
|
||||
// * Enemy < 10,000 meters
|
||||
bool Autopilot_AutoDiable()
|
||||
{
|
||||
return !CanAutopilot();
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Disengages autopilot
|
||||
// this does:
|
||||
// * Time compression to 1x
|
||||
// * Delete AI nav goal
|
||||
// * Control switched from AI to player
|
||||
void EndAutoPilot()
|
||||
{
|
||||
AutoPilotEngaged = false;
|
||||
|
||||
Game_time_compression = F1_0;
|
||||
Player_use_ai = 0;
|
||||
//Clear AI Goals
|
||||
|
||||
// assign ship goals
|
||||
// when assigning goals to individual ships only do so if Ships[shipnum].wingnum != -1
|
||||
// we will assign wing goals below
|
||||
int i,j;
|
||||
|
||||
for (i = 0; i < MAX_SHIPS; i++)
|
||||
|
||||
{
|
||||
if (Ships[i].objnum != -1 &&
|
||||
(
|
||||
Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
|
||||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY )
|
||||
)
|
||||
)
|
||||
{
|
||||
Ai_info[Ships[i].ai_index].waypoint_speed_cap = -1; // uncap their speed
|
||||
|
||||
// old "dumb" routine
|
||||
//ai_clear_ship_goals( &(Ai_info[Ships[i].ai_index]) );
|
||||
for (j = 0; j < MAX_AI_GOALS; j++)
|
||||
{
|
||||
if (Ai_info[Ships[i].ai_index].goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
|
||||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AI_GOAL_FLY_TO_SHIP ||
|
||||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AIM_WAYPOINTS ||
|
||||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AIM_FLY_TO_SHIP)
|
||||
{
|
||||
ai_remove_ship_goal( &(Ai_info[Ships[i].ai_index]), j );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// assign wing goals
|
||||
for (i = 0; i < MAX_WINGS; i++)
|
||||
{
|
||||
if (Wings[i].flags & WF_NAV_CARRY )
|
||||
{
|
||||
// old "dumb" routine
|
||||
//ai_clear_wing_goals( i );
|
||||
for (j = 0; j < MAX_AI_GOALS; j++)
|
||||
{
|
||||
if (Wings[i].ai_goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
|
||||
Wings[i].ai_goals[j].ai_mode == AI_GOAL_FLY_TO_SHIP ||
|
||||
Wings[i].ai_goals[j].ai_mode == AIM_WAYPOINTS ||
|
||||
Wings[i].ai_goals[j].ai_mode == AIM_FLY_TO_SHIP)
|
||||
{
|
||||
Wings[i].ai_goals[j].ai_mode = AI_GOAL_NONE;
|
||||
Wings[i].ai_goals[j].signature = -1;
|
||||
Wings[i].ai_goals[j].priority = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Checks for changes every NPS_TICKRATE milliseconds
|
||||
// Checks:
|
||||
// * if we've gotten close enough to a nav point for it to be counted as "Visited"
|
||||
// * If we're current AutoNavigating it checks if we need to autodisengage
|
||||
void NavSystem_Do()
|
||||
{
|
||||
static unsigned int last_update = 0;
|
||||
|
||||
if (clock () - last_update > NPS_TICKRATE)
|
||||
{
|
||||
if (AutoPilotEngaged)
|
||||
if (Autopilot_AutoDiable())
|
||||
EndAutoPilot();
|
||||
|
||||
// check if a NavPoints target has left, delete it if so
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_NAVPOINTS; i++)
|
||||
{
|
||||
if (Navs[i].flags & NP_SHIP)
|
||||
{
|
||||
if (((ship*)Navs[i].target_obj)->objnum == -1)
|
||||
DelNavPoint(i);
|
||||
}
|
||||
}
|
||||
|
||||
// check if we're reached a Node
|
||||
for (i = 0; i < MAX_NAVPOINTS; i++)
|
||||
{
|
||||
if (Navs[i].flags & NP_VALIDTYPE && DistanceTo(i) < 1000)
|
||||
Navs[i].flags |= NP_VISITED;
|
||||
}
|
||||
}
|
||||
|
||||
// ramp time compression
|
||||
if (AutoPilotEngaged)
|
||||
{
|
||||
int dstfrm_start = start_dist - DistanceTo(CurrentNav);
|
||||
|
||||
// Ramp UP time compression
|
||||
if (dstfrm_start < (3500*ramp_bias))
|
||||
{
|
||||
|
||||
if (dstfrm_start >= (3000*ramp_bias) && DistanceTo(CurrentNav) > 30000)
|
||||
Game_time_compression = F1_0 * 64;
|
||||
else if (dstfrm_start >= (2000*ramp_bias))
|
||||
Game_time_compression = F1_0 * 32;
|
||||
else if (dstfrm_start >= (1600*ramp_bias))
|
||||
Game_time_compression = F1_0 * 16;
|
||||
else if (dstfrm_start >= (1200*ramp_bias))
|
||||
Game_time_compression = F1_0 * 8;
|
||||
else if (dstfrm_start >= (800*ramp_bias))
|
||||
Game_time_compression = F1_0 * 4;
|
||||
else if (dstfrm_start >= (400*ramp_bias))
|
||||
Game_time_compression = F1_0 * 2;
|
||||
}
|
||||
|
||||
// Ramp DOWN time compression
|
||||
if (DistanceTo(CurrentNav) <= (7000*ramp_bias))
|
||||
{
|
||||
int dist = DistanceTo(CurrentNav);
|
||||
if (dist >= (5000*ramp_bias))
|
||||
Game_time_compression = F1_0 * 32;
|
||||
else if (dist >= (4000*ramp_bias))
|
||||
Game_time_compression = F1_0 * 16;
|
||||
else if (dist >= (3000*ramp_bias))
|
||||
Game_time_compression = F1_0 * 8;
|
||||
else if (dist >= (2000*ramp_bias))
|
||||
Game_time_compression = F1_0 * 4;
|
||||
else if (dist >= (1000*ramp_bias))
|
||||
Game_time_compression = F1_0 * 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ********************************************************************************************
|
||||
// Inits the Nav System
|
||||
void NavSystem_Init()
|
||||
{
|
||||
memset((char *)&Navs, 0, sizeof(Navs));
|
||||
AutoPilotEngaged = false;
|
||||
CurrentNav = -1;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Finds a Nav point by name
|
||||
int FindNav(char *Nav)
|
||||
{
|
||||
for (int i = 0; i < MAX_NAVPOINTS; i++)
|
||||
{
|
||||
if (!stricmp(Navs[i].NavName, Nav))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Set A Nav point to "ZERO"
|
||||
void ZeroNav(int i)
|
||||
{
|
||||
memset((char *)&Navs[i], 0, sizeof(NavPoint));
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Removes a Nav
|
||||
bool DelNavPoint(char *Nav)
|
||||
{
|
||||
int n = FindNav(Nav);
|
||||
|
||||
return DelNavPoint(n);
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool DelNavPoint(int nav)
|
||||
{
|
||||
if (nav != -1)
|
||||
{
|
||||
if (nav != MAX_NAVPOINTS-1)
|
||||
{
|
||||
for (int i = nav; i < MAX_NAVPOINTS-1; i++)
|
||||
{
|
||||
Navs[nav] = Navs[nav+1];
|
||||
}
|
||||
|
||||
}
|
||||
ZeroNav(MAX_NAVPOINTS-1);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// adds a Nav
|
||||
bool AddNav_Ship(char *Nav, char *TargetName, int flags)
|
||||
{
|
||||
// find an empty nav - should be the end
|
||||
|
||||
int empty = -1;
|
||||
|
||||
for (int i = 0; i < MAX_NAVPOINTS && empty == -1; i++)
|
||||
{
|
||||
if (Navs[i].flags == 0)
|
||||
empty = i;
|
||||
}
|
||||
|
||||
if (empty == -1) // no empty navpoint slots
|
||||
return false;
|
||||
|
||||
// Create the NavPoint struct
|
||||
NavPoint tnav;
|
||||
|
||||
strncpy(tnav.NavName, Nav, 32);
|
||||
tnav.flags = NP_SHIP | flags;
|
||||
|
||||
Assert(!(tnav.flags & NP_WAYPOINT));
|
||||
|
||||
|
||||
for (i = 0; i < MAX_SHIPS; i++)
|
||||
{
|
||||
if (Ships[i].objnum != -1 && !stricmp(TargetName, Ships[i].ship_name))
|
||||
{
|
||||
tnav.target_obj = (void *)&Ships[i];
|
||||
}
|
||||
}
|
||||
|
||||
tnav.waypoint_num = 0; // unused for NP_SHIP
|
||||
|
||||
|
||||
// copy it into it's location
|
||||
Navs[empty] = tnav;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool AddNav_Waypoint(char *Nav, char *WP_Path, int node, int flags)
|
||||
{
|
||||
// find an empty nav - should be the end
|
||||
|
||||
int empty = -1;
|
||||
|
||||
if (node == 0)
|
||||
node = 1;
|
||||
|
||||
for (int i = 0; i < MAX_NAVPOINTS && empty == -1; i++)
|
||||
{
|
||||
if (Navs[i].flags == 0)
|
||||
empty = i;
|
||||
}
|
||||
|
||||
if (empty == -1) // no empty navpoint slots
|
||||
return false;
|
||||
|
||||
// Create the NavPoint struct
|
||||
NavPoint tnav;
|
||||
|
||||
strncpy(tnav.NavName, Nav, 32);
|
||||
tnav.flags = NP_WAYPOINT | flags;
|
||||
|
||||
Assert(!(tnav.flags & NP_SHIP));
|
||||
|
||||
|
||||
for (i = 0; i < Num_waypoint_lists; i++)
|
||||
{
|
||||
if (!stricmp(WP_Path, Waypoint_lists[i].name))
|
||||
{
|
||||
tnav.target_obj = (void *)&Waypoint_lists[i];
|
||||
}
|
||||
}
|
||||
|
||||
tnav.waypoint_num = node;
|
||||
|
||||
// copy it into it's location
|
||||
Navs[empty] = tnav;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
//Change Flags
|
||||
bool Nav_Alt_Flags(char *Nav, int flags)
|
||||
{
|
||||
flags &= ~NP_VALIDTYPE; //clear the NP_SHIP and NP_WAYPOINT bits, make sure they haven't been set
|
||||
|
||||
int nav = FindNav(Nav);
|
||||
|
||||
if (nav != -1)
|
||||
{
|
||||
Navs[nav].flags &= NP_VALIDTYPE; // Clear all bits BUT NP_SHIP or NO_WAYPOINT
|
||||
Navs[nav].flags |= flags; // merge
|
||||
}
|
||||
|
||||
return (nav != -1);
|
||||
}
|
||||
|
||||
//Get Flags
|
||||
int Nav_Get_Flags(char *Nav)
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
int nav = FindNav(Nav);
|
||||
|
||||
if (nav != -1)
|
||||
flags = Navs[nav].flags;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
// Sexp Accessors
|
||||
|
||||
//Generic
|
||||
bool Nav_Set_Flag(char *Nav, int flag)
|
||||
{
|
||||
Assert(!(flag & NP_VALIDTYPE));
|
||||
int nav = FindNav(Nav);
|
||||
|
||||
if (nav != -1)
|
||||
{
|
||||
Navs[nav].flags |= flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool Nav_UnSet_Flag(char *Nav, int flag)
|
||||
{
|
||||
Assert(!(flag & NP_VALIDTYPE));
|
||||
|
||||
int nav = FindNav(Nav);
|
||||
|
||||
if (nav != -1)
|
||||
{
|
||||
Navs[nav].flags &= ~flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
//Named
|
||||
bool Nav_Set_Hidden(char *Nav)
|
||||
{
|
||||
return Nav_Set_Flag(Nav, NP_HIDDEN);
|
||||
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool Nav_Set_NoAccess(char *Nav)
|
||||
{
|
||||
return Nav_Set_Flag(Nav, NP_NOACCESS);
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool Nav_Set_Visited(char *Nav)
|
||||
{
|
||||
|
||||
return Nav_Set_Flag(Nav, NP_VISITED);
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool Nav_UnSet_Hidden(char *Nav)
|
||||
{
|
||||
return Nav_UnSet_Flag(Nav, NP_HIDDEN);
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool Nav_UnSet_NoAccess(char *Nav)
|
||||
{
|
||||
return Nav_UnSet_Flag(Nav, NP_NOACCESS);
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool Nav_UnSet_Visited(char *Nav)
|
||||
{
|
||||
return Nav_UnSet_Flag(Nav, NP_VISITED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
|
||||
unsigned int DistanceTo(char *nav)
|
||||
{
|
||||
int n = FindNav(nav);
|
||||
|
||||
return DistanceTo(n);
|
||||
}
|
||||
|
||||
unsigned int DistanceTo(int nav)
|
||||
{
|
||||
if (nav > MAX_NAVPOINTS && nav < 0)
|
||||
return 0xFFFFFFFF;
|
||||
|
||||
char *name = Navs[nav].GetInteralName();
|
||||
int distance = sexp_distance2(Player_ship->objnum, name);
|
||||
delete[] name;
|
||||
|
||||
if (distance == SEXP_NAN)
|
||||
return 0xFFFFFFFF;
|
||||
return distance;
|
||||
}
|
||||
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
bool IsVisited(char *nav)
|
||||
{
|
||||
int n = FindNav(nav);
|
||||
|
||||
return IsVisited(n);
|
||||
}
|
||||
|
||||
bool IsVisited(int nav)
|
||||
{
|
||||
if (nav > MAX_NAVPOINTS && nav < 0)
|
||||
return 0;
|
||||
|
||||
if (Navs[nav].flags & NP_VISITED)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
// Autopilot.h
|
||||
// Derek Meek
|
||||
// 4-30-2004
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Autopilot/Autopilot.h $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2004-08-11 05:06:18 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.5 2004/07/27 18:52:10 Kazan
|
||||
* squished another
|
||||
*
|
||||
* Revision 1.4 2004/07/25 19:27:51 Kazan
|
||||
* only disable afterburning during AIM_WAYPOINTS and AIM_FLY_TO_SHIP while AutoPilotEngaged
|
||||
*
|
||||
* Revision 1.3 2004/07/25 00:31:27 Kazan
|
||||
* i have absolutely nothing to say about that subject
|
||||
*
|
||||
* Revision 1.2 2004/07/01 16:38:18 Kazan
|
||||
* working on autonav
|
||||
*
|
||||
* Revision 1.1 2004/05/07 23:50:14 Kazan
|
||||
* Sorry Guys!
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#if !defined(_AUTOPILOT_H_)
|
||||
#define _AUTOPILOT_H_
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
// milliseconds between updates
|
||||
#define NPS_TICKRATE 250
|
||||
|
||||
#define MAX_NAVPOINTS 8
|
||||
|
||||
#define NP_WAYPOINT 0x0001 // Nav Point is bound to the poistion of a single node of a waypoint path
|
||||
#define NP_SHIP 0x0002 // Nav Point is bound to the poisiton of a certain ship
|
||||
#define NP_HIDDEN 0x0004 // Nav Point doesn't show on map and isn't selectable
|
||||
#define NP_NOACCESS 0x0008 // Nav Point isn't selectable
|
||||
#define NP_VISITED 0x0100 // Whether we've been within 1,000 meters of this waypoint
|
||||
|
||||
#define NP_NOSELECT ( NP_HIDDEN | NP_NOACCESS )
|
||||
#define NP_VALIDTYPE ( NP_WAYPOINT | NP_SHIP )
|
||||
|
||||
struct NavPoint
|
||||
{
|
||||
char NavName[32];
|
||||
int flags;
|
||||
|
||||
void *target_obj;
|
||||
int waypoint_num; //only used when flags & NP_WAYPOINT
|
||||
|
||||
vector GetPosition();
|
||||
char* GetInteralName();
|
||||
};
|
||||
|
||||
extern bool AutoPilotEngaged;
|
||||
extern int CurrentNav;
|
||||
extern NavPoint Navs[MAX_NAVPOINTS];
|
||||
|
||||
// Cycles through the NavPoint List
|
||||
bool Sel_NextNav();
|
||||
|
||||
|
||||
// Tell us is autopilot is allow
|
||||
// This needs:
|
||||
// * Nav point selected
|
||||
// * No enemies within 5,000 meters
|
||||
// * Destination > 1,000 meters away
|
||||
bool CanAutopilot();
|
||||
|
||||
// Engages autopilot
|
||||
// This does:
|
||||
// * Control switched from player to AI
|
||||
// * Time compression to 32x
|
||||
// * Tell AI to fly to targetted Nav Point (for all nav-status wings/ships)
|
||||
// * Sets max waypoint speed to the best-speed of the slowest ship tagged
|
||||
void StartAutopilot();
|
||||
|
||||
// Checks if autopilot should automatically die
|
||||
// Returns true if:
|
||||
// * Targetted waypoint < 1,000 meters away
|
||||
// * Enemy < 5,000 meters
|
||||
bool Autopilot_AutoDiable();
|
||||
|
||||
// Disengages autopilot
|
||||
// this does:
|
||||
// * Time compression to 1x
|
||||
// * Delete AI nav goal
|
||||
// * Control switched from AI to player
|
||||
void EndAutoPilot();
|
||||
|
||||
|
||||
// Checks for changes every NPS_TICKRATE milliseconds
|
||||
// Checks:
|
||||
// * if we've gotten close enough to a nav point for it to be counted as "Visited"
|
||||
// * If we're current AutoNavigating it checks if we need to autodisengage
|
||||
void NavSystem_Do();
|
||||
|
||||
|
||||
// Inits the Nav System
|
||||
void NavSystem_Init();
|
||||
|
||||
// Finds a Nav point by name
|
||||
int FindNav(char *Nav);
|
||||
|
||||
// Set A Nav point to "ZERO"
|
||||
void ZeroNav(int i);
|
||||
|
||||
// Removes a Nav
|
||||
bool DelNavPoint(char *Nav);
|
||||
bool DelNavPoint(int nav);
|
||||
|
||||
// adds a Nav
|
||||
bool AddNav_Ship(char *Nav, char *TargetName, int flags);
|
||||
bool AddNav_Waypoint(char *Nav, char *WP_Path, int node, int flags);
|
||||
|
||||
//Change Flags
|
||||
bool Nav_Alt_Flags(char *Nav, int flags);
|
||||
|
||||
// Sexp Accessors
|
||||
bool Nav_Set_Flag(char *Nav, int flag);
|
||||
bool Nav_UnSet_Flag(char *Nav, int flag);
|
||||
|
||||
bool Nav_Set_Hidden(char *Nav);
|
||||
bool Nav_Set_NoAccess(char *Nav);
|
||||
bool Nav_Set_Visited(char *Nav);
|
||||
|
||||
bool Nav_UnSet_Hidden(char *Nav);
|
||||
bool Nav_UnSet_NoAccess(char *Nav);
|
||||
bool Nav_UnSet_Visited(char *Nav);
|
||||
|
||||
// Useful functions
|
||||
unsigned int DistanceTo(char *nav);
|
||||
unsigned int DistanceTo(int nav);
|
||||
|
||||
bool IsVisited(char *nav);
|
||||
bool IsVisited(int nav);
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/bmpman/bm_internal.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2004-11-23 00:10:06 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* bmpman info that's internal to bmpman related files only
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
*
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __BM_INTERNAL_H__
|
||||
#define __BM_INTERNAL_H__
|
||||
|
||||
|
||||
// extra check to make sure this stuff doesn't end up in normal files
|
||||
// don't use any of this unless BMPMAN_INTERNAL is defined
|
||||
#ifdef BMPMAN_INTERNAL
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
#include "bmpman/bmpman.h"
|
||||
|
||||
|
||||
// keep this defined to use per-ship nondarkening pixels
|
||||
#define BMPMAN_SPECIAL_NONDARK
|
||||
|
||||
|
||||
#define BM_TYPE_NONE 0
|
||||
#define BM_TYPE_PCX 1
|
||||
#define BM_TYPE_USER 2
|
||||
#define BM_TYPE_ANI 3 // in-house ANI format
|
||||
#define BM_TYPE_EFF 4 // specifies any type of animated image, the EFF itself is just text
|
||||
|
||||
#define BM_TYPE_32_BIT_FORMATS 5 // everything after this could/should be 24/32-bit
|
||||
#define BM_TYPE_TGA 6 // 16 or 32 bit targa
|
||||
#define BM_TYPE_DDS 7 // generic identifier for DDS
|
||||
#define BM_TYPE_DXT1 8 // 24 bit with switchable alpha (compressed)
|
||||
#define BM_TYPE_DXT3 9 // 32 bit with 4 bit alpha (compressed)
|
||||
#define BM_TYPE_DXT5 10 // 32 bit with 8 bit alpha (compressed)
|
||||
#define BM_TYPE_JPG 11 // 32 bit jpeg
|
||||
|
||||
|
||||
/// Moved from cpp file ///////////////////
|
||||
// Consider these 'protected' structures and functions that should only be used by special bitmap functions
|
||||
typedef struct bm_extra_info {
|
||||
struct {
|
||||
// Stuff needed for animations
|
||||
int first_frame; // used for animations -- points to index of first frame
|
||||
ubyte num_frames; // used for animation -- number of frames in the animation
|
||||
ubyte fps; // used for animation -- frames per second
|
||||
} ani;
|
||||
struct {
|
||||
// Stuff needed for user bitmaps
|
||||
void *data; // For user bitmaps, this is where the data comes from
|
||||
ubyte bpp; // For user bitmaps, this is what format the data is
|
||||
ubyte flags; // Flags passed to bm_create
|
||||
} user;
|
||||
struct {
|
||||
// Stuff for static animations
|
||||
ubyte type; // type for individual images
|
||||
char filename[MAX_FILENAME_LEN]; // filename for individual images
|
||||
} eff;
|
||||
} bm_extra_info;
|
||||
|
||||
|
||||
typedef struct bitmap_entry {
|
||||
// identification
|
||||
char filename[MAX_FILENAME_LEN]; // filename for this bitmap
|
||||
|
||||
uint signature; // a unique signature identifying the data
|
||||
uint palette_checksum; // checksum used to be sure bitmap is in current palette
|
||||
int handle; // Handle = id*MAX_BITMAPS + bitmapnum
|
||||
int last_used; // When this bitmap was last used
|
||||
|
||||
ubyte type; // PCX, USER, ANI, etc
|
||||
signed char ref_count; // Number of locks on bitmap. Can't unload unless ref_count is 0.
|
||||
|
||||
int dir_type; // which directory this was loaded from (to skip other locations with same name)
|
||||
|
||||
// compressed bitmap stuff (.dds) - RT please take a look at this and tell me if we really need it
|
||||
int mem_taken; // How much memory does this bitmap use? - UnknownPlayer
|
||||
int num_mipmaps; // number of mipmap levels, we need to read all of them
|
||||
|
||||
// Stuff to keep track of usage
|
||||
ubyte preloaded; // If set, then this was loaded from the lst file
|
||||
int preload_count; // how many times this gets used in game, for unlocking
|
||||
ubyte used_flags; // What flags it was accessed thru
|
||||
|
||||
// Bitmap info
|
||||
bitmap bm;
|
||||
|
||||
// Data for animations and user bitmaps
|
||||
bm_extra_info info;
|
||||
|
||||
#ifdef BMPMAN_NDEBUG
|
||||
// bookeeping
|
||||
ubyte used_last_frame; // If set, then it was used last frame
|
||||
ubyte used_this_frame; // If set, then it was used this frame
|
||||
int data_size; // How much data this bitmap uses
|
||||
int used_count; // How many times it was accessed
|
||||
#endif
|
||||
} bitmap_entry;
|
||||
|
||||
extern bitmap_entry bm_bitmaps[MAX_BITMAPS];
|
||||
|
||||
|
||||
// image specific lock functions
|
||||
void bm_lock_ani( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
|
||||
void bm_lock_dds( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
|
||||
void bm_lock_jpg( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
|
||||
void bm_lock_pcx( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
|
||||
void bm_lock_tga( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
|
||||
void bm_lock_user( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
|
||||
|
||||
|
||||
#endif // BMPMAN_INTERNAL
|
||||
|
||||
#endif // __BM_INTERNAL_H__
|
||||
|
||||
+693
-625
File diff suppressed because it is too large.
Load diff
@@ -10,13 +10,28 @@
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Bmpman/BmpMan.h $
|
||||
*
|
||||
* $Revision: 2.13 $
|
||||
* $Date: 2004-05-06 22:35:26 $
|
||||
* $Revision: 2.18 $
|
||||
* $Date: 2004-11-23 00:10:06 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* Prototypes for Bitmap Manager functions
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.17 2004/11/21 15:59:45 Kazan
|
||||
* conflict res
|
||||
*
|
||||
* Revision 2.16 2004/10/31 21:26:27 taylor
|
||||
* bmpman merge, EFF animation support, better page in stuff, dozen or so smaller fixes and cleanup
|
||||
*
|
||||
* Revision 2.15 2004/10/06 22:02:54 Kazan
|
||||
* interface corruption fix - thanks taylor (MAX_BITMAPS upped to 7000)
|
||||
*
|
||||
* Revision 2.14 2004/08/11 05:06:18 Kazan
|
||||
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
|
||||
*
|
||||
* Revision 2.13 2004/05/06 22:35:26 taylor
|
||||
* DDS mipmap reading, remove unneeded bm_unlock() during page in
|
||||
*
|
||||
* Revision 2.12 2004/04/01 15:31:20 taylor
|
||||
* don't use interface anis as ship textures
|
||||
*
|
||||
@@ -280,6 +295,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _BMPMAN_H
|
||||
#define _BMPMAN_H
|
||||
|
||||
@@ -290,85 +306,34 @@
|
||||
#define BMPMAN_NDEBUG
|
||||
#endif
|
||||
|
||||
#define MAX_BITMAPS 3500 // How many bitmaps the game can handle
|
||||
|
||||
// this is causing problems - let's UP IT -- Kazan
|
||||
// bumped from 3500 to 4500 2004/09/21 - taylor
|
||||
//#define MAX_BITMAPS 3500 // How many bitmaps the game can handle
|
||||
#define MAX_BITMAPS 4500 // How many bitmaps the game can handle
|
||||
|
||||
|
||||
// 16 bit pixel formats
|
||||
#define BM_PIXEL_FORMAT_ARGB 0 // for glide - can assume certain things, like 1555 LFB writes, whee!
|
||||
#define BM_PIXEL_FORMAT_D3D 1 // d3d - card dependant. booo!
|
||||
#define BM_PIXEL_FORMAT_ARGB_D3D 2 // this card has nice 1555 textures like Glide - ahhhhh!
|
||||
|
||||
enum
|
||||
{
|
||||
BM_TYPE_NONE,
|
||||
BM_TYPE_PCX, // 16 bit PCX
|
||||
BM_TYPE_USER, // Data created at run time
|
||||
BM_TYPE_ANI, // In-house ANI format
|
||||
// Only list 32 bit formats after this flag please
|
||||
BM_TYPE_32_BIT_FORMATS,
|
||||
BM_TYPE_TGA,
|
||||
BM_TYPE_JPG,
|
||||
BM_TYPE_DDS,
|
||||
};
|
||||
|
||||
/// Moved from cpp file ///////////////////
|
||||
// Consider these 'protected' structures and functions that should only be used by special bitmap functions
|
||||
extern int bm_inited;
|
||||
|
||||
typedef union bm_extra_info {
|
||||
struct {
|
||||
// Stuff needed for animations
|
||||
int first_frame; // used for animations -- points to index of first frame
|
||||
ubyte num_frames; // used for animation -- number of frames in the animation
|
||||
ubyte fps; // used for animation -- frames per second
|
||||
} ani;
|
||||
struct {
|
||||
// Stuff needed for user bitmaps
|
||||
void *data; // For user bitmaps, this is where the data comes from
|
||||
ubyte bpp; // For user bitmaps, this is what format the data is
|
||||
ubyte flags; // Flags passed to bm_create
|
||||
} user;
|
||||
} bm_extra_info;
|
||||
extern int Bm_paging;
|
||||
|
||||
typedef struct bitmap_entry {
|
||||
// identification
|
||||
char filename[MAX_FILENAME_LEN]; // filename for this bitmap
|
||||
void bm_init();
|
||||
|
||||
uint signature; // a unique signature identifying the data
|
||||
uint palette_checksum; // checksum used to be sure bitmap is in current palette
|
||||
int handle; // Handle = id*MAX_BITMAPS + bitmapnum
|
||||
int last_used; // When this bitmap was last used
|
||||
void bm_close();
|
||||
|
||||
ubyte type; // PCX, USER, ANI, etc
|
||||
signed char ref_count; // Number of locks on bitmap. Can't unload unless ref_count is 0.
|
||||
int bm_get_cache_slot( int bitmap_id, int separate_ani_frames );
|
||||
|
||||
// compressed bitmap stuff (.dds) - RT please take a look at this and tell me if we really need it
|
||||
int mem_taken; // How much memory does this bitmap use? - UnknownPlayer
|
||||
int num_mipmaps; // number of mipmap levels, we need to read all of them
|
||||
int bm_get_next_handle();
|
||||
|
||||
// Stuff to keep track of usage
|
||||
ubyte preloaded; // If set, then this was loaded from the lst file
|
||||
ubyte used_flags; // What flags it was accessed thru
|
||||
void *bm_malloc(int n, int size);
|
||||
|
||||
// Bitmap info
|
||||
bitmap bm;
|
||||
|
||||
// Data for animations and user bitmaps
|
||||
bm_extra_info info;
|
||||
|
||||
#ifdef BMPMAN_NDEBUG
|
||||
// bookeeping
|
||||
ubyte used_last_frame; // If set, then it was used last frame
|
||||
ubyte used_this_frame; // If set, then it was used this frame
|
||||
int data_size; // How much data this bitmap uses
|
||||
int used_count; // How many times it was accessed
|
||||
#endif
|
||||
|
||||
} bitmap_entry;
|
||||
|
||||
void bm_gfx_init();
|
||||
void bm_gfx_close();
|
||||
int bm_gfx_get_cache_slot( int bitmap_id, int separate_ani_frames );
|
||||
|
||||
int bm_gfx_get_next_handle();
|
||||
void bm_update_memory_used(int n, int size);
|
||||
|
||||
// 16 bit pixel formats
|
||||
extern int Bm_pixel_format;
|
||||
@@ -382,12 +347,12 @@ extern int bm_texture_ram;
|
||||
// It returns a negative number if it couldn't load
|
||||
// the bitmap. On success, it returns the bitmap
|
||||
// number.
|
||||
int bm_gfx_load(char * filename);
|
||||
int bm_load(char * filename);
|
||||
|
||||
// special load function. basically allows you to load a bitmap which already exists (by filename).
|
||||
// this is useful because in some cases we need to have a bitmap which is locked in screen format
|
||||
// _and_ texture format, such as pilot pics and squad logos
|
||||
int bm_gfx_load_duplicate(char *filename);
|
||||
int bm_load_duplicate(char *filename);
|
||||
|
||||
// Creates a bitmap that exists in RAM somewhere, instead
|
||||
// of coming from a disk file. You pass in a pointer to a
|
||||
@@ -397,29 +362,29 @@ int bm_gfx_load_duplicate(char *filename);
|
||||
// On success, it returns the bitmap number. You cannot
|
||||
// free that RAM until bm_release is called on that bitmap.
|
||||
// See example at bottom of this file
|
||||
int bm_gfx_create( int bpp, int w, int h, void * data, int flags = 0);
|
||||
int bm_create( int bpp, int w, int h, void * data, int flags = 0);
|
||||
|
||||
// Frees up a bitmap's data, but bitmap number 'n' can
|
||||
// still be used, it will just have to be paged in next
|
||||
// time it is locked.
|
||||
int bm_gfx_unload( int n );
|
||||
int bm_unload( int n );
|
||||
|
||||
// Frees up a bitmap's data, and it's slot, so bitmap
|
||||
// number 'n' cannot be used anymore, and bm_load or
|
||||
// bm_create might reuse the slot.
|
||||
void bm_gfx_release(int n);
|
||||
void bm_release(int n);
|
||||
|
||||
// This loads a bitmap sequence so we can draw with it later.
|
||||
// It returns a negative number if it couldn't load
|
||||
// the bitmap. On success, it returns the bitmap
|
||||
// number of the first frame and nframes is set.
|
||||
extern int bm_gfx_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
|
||||
extern int bm_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
|
||||
|
||||
// This locks down a bitmap and returns a pointer to a bitmap
|
||||
// that can be accessed until you call bm_unlock. Only lock
|
||||
// a bitmap when you need it! This will convert it into the
|
||||
// appropriate format also.
|
||||
extern bitmap * bm_gfx_lock( int bitmapnum, ubyte bpp, ubyte flags );
|
||||
extern bitmap * bm_lock( int bitmapnum, ubyte bpp, ubyte flags );
|
||||
|
||||
// The signature is a field that gets filled in with
|
||||
// a unique signature for each bitmap. The signature for each bitmap
|
||||
@@ -427,10 +392,10 @@ extern bitmap * bm_gfx_lock( int bitmapnum, ubyte bpp, ubyte flags );
|
||||
extern uint bm_get_signature( int bitmapnum);
|
||||
|
||||
// Unlocks a bitmap
|
||||
extern void bm_gfx_unlock( int bitmapnum );
|
||||
extern void bm_unlock( int bitmapnum );
|
||||
|
||||
// Gets info. w,h,or flags,nframes or fps can be NULL if you don't care.
|
||||
extern void bm_gfx_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL, bitmap_section_info **sections = NULL );
|
||||
extern void bm_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL, bitmap_section_info **sections = NULL );
|
||||
|
||||
// get filename
|
||||
extern void bm_get_filename(int bitmapnum, char *filename);
|
||||
@@ -440,10 +405,10 @@ extern void bm_update();
|
||||
|
||||
// call to load all data for all bitmaps that have been requested to be loaded
|
||||
extern void bm_gfx_load_all();
|
||||
extern void bm_gfx_unload_all();
|
||||
extern void bm_unload_all();
|
||||
|
||||
// call to get the palette for a bitmap
|
||||
void bm_gfx_get_palette(int n, ubyte *pal, char *name);
|
||||
void bm_get_palette(int n, ubyte *pal, char *name);
|
||||
|
||||
// Hacked function to get a pixel from a bitmap.
|
||||
// Only works good in 8bpp mode.
|
||||
@@ -452,7 +417,7 @@ void bm_gfx_get_pixel( int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *
|
||||
// Returns number of bytes of bitmaps locked this frame
|
||||
// ntotal = number of bytes of bitmaps locked this frame
|
||||
// nnew = number of bytes of bitmaps locked this frame that weren't locked last frame
|
||||
void bm_gfx_get_frame_usage(int *ntotal, int *nnew);
|
||||
void bm_get_frame_usage(int *ntotal, int *nnew);
|
||||
|
||||
/*
|
||||
* Example on using bm_create
|
||||
@@ -499,28 +464,31 @@ void bm_gfx_get_frame_usage(int *ntotal, int *nnew);
|
||||
// Paging stuff
|
||||
//============================================================================
|
||||
|
||||
void bm_gfx_page_in_start();
|
||||
void bm_gfx_page_in_stop();
|
||||
void bm_page_in_start();
|
||||
void bm_page_in_stop();
|
||||
|
||||
// Paging code in a library should call these functions
|
||||
// in its page in function.
|
||||
|
||||
// Marks a texture as being used for this level
|
||||
// If num_frames is passed, assume this is an animation
|
||||
void bm_gfx_page_in_texture( int bitmapnum, int num_frames=1 );
|
||||
void bm_page_in_texture( int bitmapnum, int num_frames=1 );
|
||||
|
||||
// Marks a texture as being used for this level
|
||||
// If num_frames is passed, assume this is an animation
|
||||
void bm_gfx_page_in_nondarkening_texture( int bitmap, int num_frames=1 );
|
||||
void bm_page_in_nondarkening_texture( int bitmap, int num_frames=1 );
|
||||
|
||||
// marks a texture as being a transparent textyre used for this level
|
||||
// Marks a texture as being used for this level
|
||||
// If num_frames is passed, assume this is an animation
|
||||
void bm_gfx_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
|
||||
void bm_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
|
||||
|
||||
// Marks an aabitmap as being used for this level
|
||||
// If num_frames is passed, assume this is an animation
|
||||
void bm_gfx_page_in_aabitmap( int bitmapnum, int num_frames=1 );
|
||||
void bm_page_in_aabitmap( int bitmapnum, int num_frames=1 );
|
||||
|
||||
// unload a texture that was paged in
|
||||
void bm_page_out( int handle );
|
||||
|
||||
//
|
||||
// Mode: 0 = High memory
|
||||
@@ -544,21 +512,24 @@ void bm_set_components_argb_d3d_16_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *
|
||||
void bm_set_components_argb_d3d_32_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
|
||||
|
||||
// get the rgba components of a pixel, any of the parameters can be NULL
|
||||
void bm_gfx_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
|
||||
void bm_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
|
||||
|
||||
//============================================================================
|
||||
// section info stuff
|
||||
//============================================================================
|
||||
|
||||
// given a bitmap and a section, return the size (w, h)
|
||||
void bm_gfx_get_section_size(int bitmapnum, int sx, int sy, int *w, int *h);
|
||||
void bm_get_section_size(int bitmapnum, int sx, int sy, int *w, int *h);
|
||||
|
||||
extern int GLOWMAP; //this holds a reference to a map that is a fully lit version of it's index -Bobboau
|
||||
extern int SPECMAP; //this holds a reference to a map that is for specular mapping -Bobboau
|
||||
extern int ENVMAP; //this holds a reference to a map that is for environment mapping -Bobboau
|
||||
|
||||
int bm_is_compressed(int num);
|
||||
int bm_get_tcache_type(int num);
|
||||
int bm_get_size(int num);
|
||||
int bm_get_num_mipmaps(int num);
|
||||
|
||||
void bm_print_bitmaps();
|
||||
|
||||
#endif
|
||||
@@ -9,13 +9,41 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/cfile.cpp $
|
||||
* $Revision: 2.15 $
|
||||
* $Date: 2004-05-06 22:12:14 $
|
||||
* $Author: taylor $
|
||||
* $Revision: 2.24 $
|
||||
* $Date: 2004-12-25 00:22:54 $
|
||||
* $Author: wmcoolmon $
|
||||
*
|
||||
* Utilities for operating on files
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.23 2004/10/31 21:29:00 taylor
|
||||
* EFF animation support
|
||||
*
|
||||
* Revision 2.22 2004/10/09 18:08:33 taylor
|
||||
* almost forgot this for the IBX stuff
|
||||
*
|
||||
* Revision 2.21 2004/07/26 20:47:25 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.20 2004/07/17 09:03:29 taylor
|
||||
* make sure avi and mpg movies get added to file cache
|
||||
*
|
||||
* Revision 2.19 2004/07/12 16:32:42 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.18 2004/06/22 23:14:09 wmcoolmon
|
||||
* Nonworking OGG support for sound (not music) added, disabled load-only-used-weapons code, modification to sound system registry code.
|
||||
* OGG code has been commented out, so you don't need the SDK yet.
|
||||
*
|
||||
* Revision 2.17 2004/05/26 02:29:44 wmcoolmon
|
||||
* Scratch that - .tbm is a better extension
|
||||
*
|
||||
* Revision 2.16 2004/05/26 02:26:14 wmcoolmon
|
||||
* Added table chunk extension
|
||||
*
|
||||
* Revision 2.15 2004/05/06 22:12:14 taylor
|
||||
* make sure JPG and DDS files are added to the file cache for maps and effects
|
||||
*
|
||||
* Revision 2.14 2004/03/05 09:01:54 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
@@ -260,6 +288,8 @@
|
||||
#include "cfile/cfilesystem.h"
|
||||
#include "cfile/cfilearchive.h"
|
||||
|
||||
|
||||
|
||||
char Cfile_root_dir[CFILE_ROOT_DIRECTORY_LEN] = "";
|
||||
|
||||
// During cfile_init, verify that Pathtypes[n].index == n for each item
|
||||
@@ -272,32 +302,32 @@ cf_pathtype Pathtypes[CF_MAX_PATH_TYPES] = {
|
||||
// What type this is Path Extensions Parent type
|
||||
{ CF_TYPE_INVALID, NULL, NULL, CF_TYPE_INVALID },
|
||||
// Root must be index 1!!
|
||||
{ CF_TYPE_ROOT, "", ".mve", CF_TYPE_ROOT },
|
||||
{ CF_TYPE_ROOT, "", ".mve .avi .mpg", CF_TYPE_ROOT },
|
||||
{ CF_TYPE_DATA, "data", ".cfg .log .txt", CF_TYPE_ROOT },
|
||||
{ CF_TYPE_MAPS, "data" DIR_SEPARATOR_STR "maps", ".pcx .ani .tga .jpg .dds", CF_TYPE_DATA },
|
||||
{ CF_TYPE_MAPS, "data" DIR_SEPARATOR_STR "maps", ".pcx .ani .eff .tga .jpg .dds", CF_TYPE_DATA },
|
||||
{ CF_TYPE_TEXT, "data" DIR_SEPARATOR_STR "text", ".txt .net", CF_TYPE_DATA },
|
||||
{ CF_TYPE_MISSIONS, "data" DIR_SEPARATOR_STR "missions", ".fs2 .fc2 .ntl .ssv", CF_TYPE_DATA },
|
||||
{ CF_TYPE_MODELS, "data" DIR_SEPARATOR_STR "models", ".pof", CF_TYPE_DATA },
|
||||
{ CF_TYPE_TABLES, "data" DIR_SEPARATOR_STR "tables", ".tbl", CF_TYPE_DATA },
|
||||
{ CF_TYPE_SOUNDS, "data" DIR_SEPARATOR_STR "sounds", ".wav", CF_TYPE_DATA },
|
||||
{ CF_TYPE_SOUNDS_8B22K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "8b22k", ".wav", CF_TYPE_SOUNDS },
|
||||
{ CF_TYPE_SOUNDS_16B11K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "16b11k", ".wav", CF_TYPE_SOUNDS },
|
||||
{ CF_TYPE_TABLES, "data" DIR_SEPARATOR_STR "tables", ".tbl .tbm", CF_TYPE_DATA },
|
||||
{ CF_TYPE_SOUNDS, "data" DIR_SEPARATOR_STR "sounds", ".wav .ogg", CF_TYPE_DATA },
|
||||
{ CF_TYPE_SOUNDS_8B22K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "8b22k", ".wav .ogg", CF_TYPE_SOUNDS },
|
||||
{ CF_TYPE_SOUNDS_16B11K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "16b11k", ".wav .ogg", CF_TYPE_SOUNDS },
|
||||
{ CF_TYPE_VOICE, "data" DIR_SEPARATOR_STR "voice", "", CF_TYPE_DATA },
|
||||
{ CF_TYPE_VOICE_BRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "briefing", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_CMD_BRIEF, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "command_briefings", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_DEBRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "debriefing", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_PERSONAS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "personas", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_SPECIAL, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "special", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_TRAINING, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "training", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_MUSIC, "data" DIR_SEPARATOR_STR "music", ".wav", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_MOVIES, "data" DIR_SEPARATOR_STR "movies", ".mve .msb", CF_TYPE_DATA },
|
||||
{ CF_TYPE_VOICE_BRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "briefing", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_CMD_BRIEF, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "command_briefings", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_DEBRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "debriefing", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_PERSONAS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "personas", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_SPECIAL, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "special", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_VOICE_TRAINING, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "training", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_MUSIC, "data" DIR_SEPARATOR_STR "music", ".wav .ogg", CF_TYPE_VOICE },
|
||||
{ CF_TYPE_MOVIES, "data" DIR_SEPARATOR_STR "movies", ".mve .msb .avi .mpg", CF_TYPE_DATA },
|
||||
{ CF_TYPE_INTERFACE, "data" DIR_SEPARATOR_STR "interface", ".pcx .ani .tga", CF_TYPE_DATA },
|
||||
{ CF_TYPE_FONT, "data" DIR_SEPARATOR_STR "fonts", ".vf", CF_TYPE_DATA },
|
||||
{ CF_TYPE_EFFECTS, "data" DIR_SEPARATOR_STR "effects", ".ani .pcx .neb .tga .jpg .dds", CF_TYPE_DATA },
|
||||
{ CF_TYPE_EFFECTS, "data" DIR_SEPARATOR_STR "effects", ".ani .eff .pcx .neb .tga .jpg .dds", CF_TYPE_DATA },
|
||||
{ CF_TYPE_HUD, "data" DIR_SEPARATOR_STR "hud", ".ani .pcx .tga", CF_TYPE_DATA },
|
||||
{ CF_TYPE_PLAYER_MAIN, "data" DIR_SEPARATOR_STR "players", "", CF_TYPE_DATA },
|
||||
{ CF_TYPE_PLAYER_IMAGES_MAIN, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "images", ".pcx", CF_TYPE_PLAYER_MAIN },
|
||||
{ CF_TYPE_CACHE, "data" DIR_SEPARATOR_STR "cache", ".clr .tmp", CF_TYPE_DATA }, //clr=cached color
|
||||
{ CF_TYPE_CACHE, "data" DIR_SEPARATOR_STR "cache", ".clr .tmp .ibx", CF_TYPE_DATA }, //clr=cached color
|
||||
{ CF_TYPE_PLAYERS, "data" DIR_SEPARATOR_STR "players", ".hcf", CF_TYPE_DATA },
|
||||
{ CF_TYPE_SINGLE_PLAYERS, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "single", ".plr .csg .css", CF_TYPE_PLAYERS },
|
||||
{ CF_TYPE_MULTI_PLAYERS, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "multi", ".plr", CF_TYPE_DATA },
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/cfile.h $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2003-08-20 08:12:08 $
|
||||
* $Author: wmcoolmon $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2004-08-11 05:06:19 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* <insert description of file here>
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2004/05/26 21:02:26 wmcoolmon
|
||||
* Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages
|
||||
*
|
||||
* Revision 2.7 2003/08/20 08:12:08 wmcoolmon
|
||||
* Made cfile_delete return 0 on failure, 1 on success
|
||||
*
|
||||
* Revision 2.6 2002/11/10 16:29:53 DTP
|
||||
* -DTP reworked mod support,
|
||||
*
|
||||
@@ -356,6 +362,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __CFILE_H__
|
||||
#define __CFILE_H__
|
||||
|
||||
@@ -444,6 +451,7 @@ typedef struct {
|
||||
#define CF_SORT_NONE 0
|
||||
#define CF_SORT_NAME 1
|
||||
#define CF_SORT_TIME 2
|
||||
#define CF_SORT_REVERSE 3
|
||||
|
||||
#define cfread_fix(file) (fix)cfread_int(file)
|
||||
#define cfwrite_fix(i,file) cfwrite_int(i,file)
|
||||
|
||||
@@ -9,14 +9,21 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/CfileArchive.cpp $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2004-03-05 09:01:54 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2004-07-26 20:47:25 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Low-level code for reading data out of large archive files or normal files. All
|
||||
* reads/seeks come through here.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.5 2004/07/12 16:32:42 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.4 2004/03/05 09:01:54 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.3 2003/03/19 09:05:25 Goober5000
|
||||
* more housecleaning, this time for debug warnings
|
||||
* --Goober5000
|
||||
@@ -103,6 +110,8 @@
|
||||
#include "cfile/cfile.h"
|
||||
#include "cfile/cfilearchive.h"
|
||||
|
||||
|
||||
|
||||
#define CHECK_POSITION
|
||||
|
||||
// Called once to setup the low-level reading code.
|
||||
|
||||
@@ -9,14 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/CfileArchive.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-07-07 19:55:58 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-08-11 05:06:19 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* External def's for CfileArchive.cpp. This should only be used
|
||||
* internally by cfile stuff.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/07/07 19:55:58 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:21 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -48,6 +51,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _CFILEARCHIVE_H
|
||||
#define _CFILEARCHIVE_H
|
||||
|
||||
|
||||
@@ -9,13 +9,22 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/CfileList.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2002-08-01 01:41:04 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-07-26 20:47:25 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for doing directory lists and sorts
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2004/07/17 09:26:00 taylor
|
||||
* add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again
|
||||
*
|
||||
* Revision 2.3 2004/07/12 16:32:42 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.2 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
* Revision 2.1 2002/07/29 19:37:21 penguin
|
||||
* added #ifdef _WIN32 around windows-specific system headers
|
||||
*
|
||||
@@ -74,6 +83,9 @@
|
||||
#include "globalincs/pstypes.h"
|
||||
#include "cfile/cfile.h"
|
||||
|
||||
|
||||
|
||||
|
||||
// Sorts a list of filenames using the specified sorting method (CF_SORT_*).
|
||||
// n = number of filenames in list to sort
|
||||
// list = list of filenames to be sorted
|
||||
@@ -141,6 +153,22 @@ void cf_sort_filenames( int n, char **list, int sort, file_list_info *info )
|
||||
incr /= 2;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
} else if (sort == CF_SORT_REVERSE) {
|
||||
incr = n / 2;
|
||||
char buffer[MAX_FILENAME_LEN];
|
||||
|
||||
for (i = 0; i < incr; i++) {
|
||||
t = list[n - 1 - i];
|
||||
|
||||
if ( stricmp(list[i], t) > 0 ) {
|
||||
strcpy(buffer, list[i]);
|
||||
strcpy(list[i], t);
|
||||
strcpy(t, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+303
-127
@@ -9,9 +9,9 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/CfileSystem.cpp $
|
||||
* $Revision: 2.17 $
|
||||
* $Date: 2004-05-03 21:22:19 $
|
||||
* $Author: Kazan $
|
||||
* $Revision: 2.24 $
|
||||
* $Date: 2004-11-21 11:27:31 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* Functions to keep track of and find files that can exist
|
||||
* on the harddrive, cd-rom, or in a pack file on either of those.
|
||||
@@ -20,6 +20,29 @@
|
||||
* all those locations, inherently enforcing precedence orders.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.23 2004/10/31 21:28:38 taylor
|
||||
* support new pilot code, Linux code tree merge, don't use same pilot directory for Inferno builds
|
||||
*
|
||||
* Revision 2.22 2004/07/26 20:47:25 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.21 2004/07/17 09:26:00 taylor
|
||||
* add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again
|
||||
*
|
||||
* Revision 2.20 2004/07/12 16:32:42 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.19 2004/05/26 22:02:36 wmcoolmon
|
||||
* Fixed cf_matches_spec; small bug was introduced.
|
||||
*
|
||||
* Revision 2.18 2004/05/26 21:02:26 wmcoolmon
|
||||
* Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages
|
||||
*
|
||||
* Revision 2.17 2004/05/03 21:22:19 Kazan
|
||||
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
|
||||
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
|
||||
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
|
||||
*
|
||||
* Revision 2.16 2004/05/01 21:47:43 Kazan
|
||||
* bah! stupid me "NULL" not "null" - i hate when i do that
|
||||
*
|
||||
@@ -168,9 +191,14 @@
|
||||
#include <winbase.h> /* needed for memory mapping of file functions */
|
||||
#endif
|
||||
|
||||
#ifdef unix
|
||||
#ifdef SCP_UNIX
|
||||
#include <glob.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <fnmatch.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "cmdline/cmdline.h"
|
||||
@@ -178,9 +206,14 @@
|
||||
#include "cfile/cfilesystem.h"
|
||||
#include "localization/localize.h"
|
||||
|
||||
|
||||
|
||||
#define CF_ROOTTYPE_PATH 0
|
||||
#define CF_ROOTTYPE_PACK 1
|
||||
|
||||
// for a defined and specifically set location to get/send pilot/campaign files
|
||||
char *Pilot_file_path = NULL;
|
||||
|
||||
// Created by:
|
||||
// specifying hard drive tree
|
||||
// searching for pack files on hard drive // Found by searching all known paths
|
||||
@@ -208,7 +241,8 @@ typedef struct cf_root_block {
|
||||
|
||||
static int Num_roots = 0;
|
||||
static cf_root_block *Root_blocks[CF_MAX_ROOT_BLOCKS];
|
||||
|
||||
|
||||
static int Num_path_roots = 0;
|
||||
|
||||
// Created by searching all roots in order. This means Files is then sorted by precedence.
|
||||
typedef struct cf_file {
|
||||
@@ -299,10 +333,11 @@ int cf_get_packfile_count(cf_root *root)
|
||||
for (i=CF_TYPE_ROOT; i<CF_MAX_PATH_TYPES; i++ ) {
|
||||
strcpy( filespec, root->path );
|
||||
|
||||
if(strlen(Pathtypes[i].path)) {
|
||||
strcat( filespec, Pathtypes[i].path );
|
||||
if(strlen(Pathtypes[i].path)) {
|
||||
strcat( filespec, Pathtypes[i].path );
|
||||
if ( filespec[strlen(filespec)-1] != DIR_SEPARATOR_CHAR ) {
|
||||
strcat( filespec, DIR_SEPARATOR_STR );
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
#if defined _WIN32
|
||||
@@ -323,7 +358,7 @@ int cf_get_packfile_count(cf_root *root)
|
||||
|
||||
_findclose( find_handle );
|
||||
}
|
||||
#elif defined unix
|
||||
#elif defined SCP_UNIX
|
||||
strcat( filespec, "*.[vV][pP]" );
|
||||
|
||||
glob_t globinfo;
|
||||
@@ -391,7 +426,9 @@ void cf_build_pack_list( cf_root *root )
|
||||
|
||||
if(strlen(Pathtypes[i].path)) {
|
||||
strcat( filespec, Pathtypes[i].path );
|
||||
strcat( filespec, DIR_SEPARATOR_STR );
|
||||
if ( filespec[strlen(filespec)-1] != DIR_SEPARATOR_CHAR ) {
|
||||
strcat( filespec, DIR_SEPARATOR_STR );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -431,7 +468,7 @@ void cf_build_pack_list( cf_root *root )
|
||||
|
||||
_findclose( find_handle );
|
||||
}
|
||||
#elif defined unix
|
||||
#elif defined SCP_UNIX
|
||||
strcat( filespec, "*.[vV][pP]" );
|
||||
glob_t globinfo;
|
||||
memset(&globinfo, 0, sizeof(globinfo));
|
||||
@@ -485,10 +522,57 @@ void cf_build_pack_list( cf_root *root )
|
||||
void cf_build_root_list(char *cdrom_dir)
|
||||
{
|
||||
Num_roots = 0;
|
||||
Num_path_roots = 0;
|
||||
|
||||
cf_root *root;
|
||||
char str_temp[128], *cur_pos;
|
||||
|
||||
#ifdef SCP_UNIX
|
||||
// =========================================================================
|
||||
// now look for mods under the users HOME directory to use before system ones
|
||||
if (Cmdline_mod) {
|
||||
for (cur_pos=Cmdline_mod; strlen(cur_pos) != 0; cur_pos+= (strlen(cur_pos)+1))
|
||||
{
|
||||
memset(str_temp, 0, 128);
|
||||
strcpy(str_temp, cur_pos);
|
||||
|
||||
strcat(str_temp, DIR_SEPARATOR_STR);
|
||||
root = cf_create_root();
|
||||
|
||||
strcpy( root->path, Cfile_user_dir );
|
||||
|
||||
// do we already have a slash? as in the case of a root directory install
|
||||
if(strlen(root->path) && (root->path[strlen(root->path)-1] != DIR_SEPARATOR_CHAR)){
|
||||
strcat(root->path, DIR_SEPARATOR_STR); // put trailing backslash on for easier path construction
|
||||
}
|
||||
|
||||
strcat(root->path, str_temp);
|
||||
root->roottype = CF_ROOTTYPE_PATH;
|
||||
cf_build_pack_list(root);
|
||||
}
|
||||
}
|
||||
// =========================================================================
|
||||
|
||||
// =========================================================================
|
||||
// set users HOME directory as default for loading and saving files
|
||||
root = cf_create_root();
|
||||
strcpy( root->path, Cfile_user_dir );
|
||||
|
||||
// do we already have a slash? as in the case of a root directory install
|
||||
if(strlen(root->path) && (root->path[strlen(root->path)-1] != DIR_SEPARATOR_CHAR)){
|
||||
strcat(root->path, DIR_SEPARATOR_STR); // put trailing backslash on for easier path construction
|
||||
}
|
||||
root->roottype = CF_ROOTTYPE_PATH;
|
||||
|
||||
// set the default player location to here
|
||||
if ( Pilot_file_path == NULL )
|
||||
Pilot_file_path = root->path;
|
||||
|
||||
// Next, check any VP files under the current directory.
|
||||
cf_build_pack_list(root);
|
||||
// =========================================================================
|
||||
#endif
|
||||
|
||||
if(Cmdline_mod) {
|
||||
// stackable Mod support -- Kazan
|
||||
//This for statement is a work of art :D
|
||||
@@ -501,8 +585,6 @@ void cf_build_root_list(char *cdrom_dir)
|
||||
memset(str_temp, 0, 128);
|
||||
strcpy(str_temp, cur_pos);
|
||||
|
||||
|
||||
|
||||
strcat(str_temp, DIR_SEPARATOR_STR);
|
||||
root = cf_create_root();
|
||||
|
||||
@@ -535,6 +617,10 @@ void cf_build_root_list(char *cdrom_dir)
|
||||
|
||||
root->roottype = CF_ROOTTYPE_PATH;
|
||||
|
||||
// set the default path for pilot files
|
||||
if ( Pilot_file_path == NULL )
|
||||
Pilot_file_path = root->path;
|
||||
|
||||
//======================================================
|
||||
// Next, check any VP files under the current directory.
|
||||
cf_build_pack_list(root);
|
||||
@@ -583,11 +669,18 @@ void cf_search_root_path(int root_index)
|
||||
|
||||
for (i=CF_TYPE_ROOT; i<CF_MAX_PATH_TYPES; i++ ) {
|
||||
|
||||
// we don't want to add player files to the cache - taylor
|
||||
if ( (i == CF_TYPE_SINGLE_PLAYERS) || (i == CF_TYPE_MULTI_PLAYERS) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
strcpy( search_path, root->path );
|
||||
|
||||
if(strlen(Pathtypes[i].path)) {
|
||||
strcat( search_path, Pathtypes[i].path );
|
||||
strcat( search_path, DIR_SEPARATOR_STR );
|
||||
if ( search_path[strlen(search_path)-1] != DIR_SEPARATOR_CHAR ) {
|
||||
strcat( search_path, DIR_SEPARATOR_STR );
|
||||
}
|
||||
}
|
||||
|
||||
#if defined _WIN32
|
||||
@@ -626,37 +719,51 @@ void cf_search_root_path(int root_index)
|
||||
|
||||
_findclose( find_handle );
|
||||
}
|
||||
#elif defined unix
|
||||
strcat( search_path, "*" );
|
||||
glob_t globinfo;
|
||||
memset(&globinfo, 0, sizeof(globinfo));
|
||||
int status = glob(search_path, 0, NULL, &globinfo);
|
||||
if (status == 0) {
|
||||
for (unsigned int j = 0; j < globinfo.gl_pathc; j++) {
|
||||
// Determine if this is a regular file
|
||||
struct stat statbuf;
|
||||
memset(&statbuf, 0, sizeof(statbuf));
|
||||
stat(globinfo.gl_pathv[j], &statbuf);
|
||||
if (S_ISREG(statbuf.st_mode)) {
|
||||
char *ext = strchr(globinfo.gl_pathv[j], '.' );
|
||||
#elif defined SCP_UNIX
|
||||
DIR *dirp;
|
||||
struct dirent *dir;
|
||||
|
||||
dirp = opendir (search_path);
|
||||
if ( dirp ) {
|
||||
while ((dir = readdir (dirp)) != NULL)
|
||||
{
|
||||
if (!fnmatch ("*.*", dir->d_name, 0))
|
||||
{
|
||||
char fn[MAX_PATH];
|
||||
snprintf(fn, MAX_PATH-1, "%s%s", search_path, dir->d_name);
|
||||
fn[MAX_PATH-1] = 0;
|
||||
|
||||
struct stat buf;
|
||||
if (stat(fn, &buf) == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!S_ISREG(buf.st_mode)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
char *ext = strchr( dir->d_name, '.' );
|
||||
if ( ext ) {
|
||||
if ( is_ext_in_list( Pathtypes[i].extensions, ext ) ) {
|
||||
// Found a file!!!!
|
||||
cf_file *file = cf_create_file();
|
||||
|
||||
strcpy( file->name_ext, globinfo.gl_pathv[j] );
|
||||
|
||||
strcpy( file->name_ext, dir->d_name );
|
||||
file->root_index = root_index;
|
||||
file->pathtype_index = i;
|
||||
file->write_time = statbuf.st_mtime;
|
||||
file->size = statbuf.st_size;
|
||||
|
||||
|
||||
file->write_time = buf.st_mtime;
|
||||
file->size = buf.st_size;
|
||||
|
||||
file->pack_offset = 0; // Mark as a non-packed file
|
||||
|
||||
|
||||
//mprintf(( "Found file '%s'\n", file->name_ext ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
globfree(&globinfo);
|
||||
closedir(dirp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -674,7 +781,7 @@ typedef struct VP_FILE {
|
||||
int offset;
|
||||
int size;
|
||||
char filename[32];
|
||||
time_t write_time;
|
||||
_fs_time_t write_time;
|
||||
} VP_FILE;
|
||||
|
||||
void cf_search_root_pack(int root_index)
|
||||
@@ -695,6 +802,10 @@ void cf_search_root_pack(int root_index)
|
||||
Assert( sizeof(VP_header) == 16 );
|
||||
fread(&VP_header, 1, sizeof(VP_header), fp);
|
||||
|
||||
VP_header.version = INTEL_INT( VP_header.version );
|
||||
VP_header.index_offset = INTEL_INT( VP_header.index_offset );
|
||||
VP_header.num_files = INTEL_INT( VP_header.num_files );
|
||||
|
||||
// Read index info
|
||||
fseek(fp, VP_header.index_offset, SEEK_SET);
|
||||
|
||||
@@ -709,6 +820,10 @@ void cf_search_root_pack(int root_index)
|
||||
|
||||
fread( &find, sizeof(VP_FILE), 1, fp );
|
||||
|
||||
find.offset = INTEL_INT( find.offset );
|
||||
find.size = INTEL_INT( find.size );
|
||||
find.write_time = INTEL_INT( find.write_time );
|
||||
|
||||
if ( find.size == 0 ) {
|
||||
if ( !stricmp( find.filename, ".." )) {
|
||||
int l = strlen(search_path);
|
||||
@@ -718,8 +833,8 @@ void cf_search_root_pack(int root_index)
|
||||
}
|
||||
*p = 0;
|
||||
} else {
|
||||
if ( strlen(search_path) ) {
|
||||
strcat( search_path, DIR_SEPARATOR_STR );
|
||||
if ( strlen(search_path) && (search_path[strlen(search_path)-1] != DIR_SEPARATOR_CHAR) ) {
|
||||
strcat( search_path, DIR_SEPARATOR_STR );
|
||||
}
|
||||
strcat( search_path, find.filename );
|
||||
}
|
||||
@@ -859,18 +974,14 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
|
||||
// of the file
|
||||
|
||||
// NOTE: full path should also include localization, if so desired
|
||||
#ifdef SCP_UNIX
|
||||
if ( strpbrk(filespec, "/") ) { // do we have a full path already?
|
||||
#else
|
||||
if ( strpbrk(filespec,"/\\:") ) { // do we have a full path already?
|
||||
#endif
|
||||
FILE *fp = fopen(filespec, "rb" );
|
||||
if (fp) {
|
||||
if ( size ) {
|
||||
#if defined _WIN32
|
||||
*size = filelength(fileno(fp));
|
||||
#elif defined unix
|
||||
struct stat statbuf;
|
||||
fstat(fileno(fp), &statbuf);
|
||||
*size = statbuf.st_size;
|
||||
#endif
|
||||
}
|
||||
if ( size ) *size = filelength(fileno(fp));
|
||||
if ( offset ) *offset = 0;
|
||||
if ( pack_filename ) {
|
||||
strcpy( pack_filename, filespec );
|
||||
@@ -911,6 +1022,7 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
|
||||
case CF_TYPE_MULTI_PLAYERS:
|
||||
case CF_TYPE_MULTI_CACHE:
|
||||
case CF_TYPE_MISSIONS:
|
||||
case CF_TYPE_CACHE:
|
||||
cfs_slow_search = 1;
|
||||
break;
|
||||
|
||||
@@ -958,7 +1070,7 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#elif defined unix
|
||||
#elif defined SCP_UNIX
|
||||
FILE *fp = fopen(longname, "rb" );
|
||||
if (fp) {
|
||||
if ( size ) {
|
||||
@@ -1004,7 +1116,9 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
|
||||
strcpy( pack_filename, r->path );
|
||||
if ( f->pack_offset < 1 ) {
|
||||
strcat( pack_filename, Pathtypes[f->pathtype_index].path );
|
||||
strcat( pack_filename, DIR_SEPARATOR_STR );
|
||||
if ( pack_filename[strlen(pack_filename)-1] != DIR_SEPARATOR_CHAR ) {
|
||||
strcat( pack_filename, DIR_SEPARATOR_STR );
|
||||
}
|
||||
strcat( pack_filename, f->name_ext );
|
||||
}
|
||||
}
|
||||
@@ -1026,7 +1140,9 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
|
||||
|
||||
if(strlen(Pathtypes[f->pathtype_index].path)){
|
||||
strcat( pack_filename, Pathtypes[f->pathtype_index].path );
|
||||
strcat( pack_filename, DIR_SEPARATOR_STR );
|
||||
if ( pack_filename[strlen(pack_filename)-1] != DIR_SEPARATOR_CHAR ) {
|
||||
strcat( pack_filename, DIR_SEPARATOR_STR );
|
||||
}
|
||||
}
|
||||
|
||||
strcat( pack_filename, f->name_ext );
|
||||
@@ -1046,17 +1162,35 @@ int cf_matches_spec(char *filespec, char *filename)
|
||||
{
|
||||
char *src_ext, *dst_ext;
|
||||
|
||||
src_ext = strchr(filespec, '.');
|
||||
if (!src_ext)
|
||||
return 1;
|
||||
if (*src_ext == '*')
|
||||
return 1;
|
||||
src_ext = strrchr(filespec, '*');
|
||||
if(!src_ext)
|
||||
{
|
||||
src_ext = strchr(filespec, '.');
|
||||
if (!src_ext)
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
src_ext++;
|
||||
}
|
||||
|
||||
dst_ext = strchr(filename, '.');
|
||||
if(strlen(filespec) > strlen(filename))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dst_ext = filename + strlen(filename) - ((filespec + strlen(filespec)) - src_ext);
|
||||
if (!dst_ext)
|
||||
return 1;
|
||||
|
||||
return !stricmp(dst_ext, src_ext);
|
||||
if(src_ext == filespec)
|
||||
{
|
||||
return !stricmp(dst_ext, src_ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (!stricmp(dst_ext, src_ext) && !strnicmp(dst_ext, src_ext, src_ext - filespec));
|
||||
}
|
||||
}
|
||||
|
||||
int (*Get_file_list_filter)(char *filename) = NULL;
|
||||
@@ -1089,7 +1223,7 @@ int cf_file_already_in_list( int num_files, char **list, char *filename )
|
||||
int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort, file_list_info *info )
|
||||
{
|
||||
char *ptr;
|
||||
int i, l, find_handle, num_files = 0, own_flag = 0;
|
||||
int i, l, num_files = 0, own_flag = 0;
|
||||
|
||||
if (max < 1) {
|
||||
Get_file_list_filter = NULL;
|
||||
@@ -1106,10 +1240,12 @@ int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort
|
||||
|
||||
char filespec[MAX_PATH_LEN];
|
||||
|
||||
#if defined _WIN32
|
||||
cf_create_default_path_string( filespec, pathtype, filter );
|
||||
|
||||
#if defined _WIN32
|
||||
_finddata_t find;
|
||||
int find_handle;
|
||||
|
||||
find_handle = _findfirst( filespec, &find );
|
||||
if (find_handle != -1) {
|
||||
do {
|
||||
@@ -1140,41 +1276,53 @@ int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort
|
||||
_findclose( find_handle );
|
||||
}
|
||||
|
||||
#elif defined unix
|
||||
char base_filespec[MAX_PATH_LEN];
|
||||
cf_create_default_path_string( base_filespec, pathtype );
|
||||
int base_filespec_len = strlen(base_filespec);
|
||||
glob_t globinfo;
|
||||
memset(&globinfo, 0, sizeof(globinfo));
|
||||
int status = glob(filespec, 0, NULL, &globinfo);
|
||||
if (status == 0) {
|
||||
for (unsigned int i = 0; i < globinfo.gl_pathc; i++) {
|
||||
// Determine if this is a regular file
|
||||
struct stat statbuf;
|
||||
memset(&statbuf, 0, sizeof(statbuf));
|
||||
stat(globinfo.gl_pathv[i], &statbuf);
|
||||
if (S_ISREG(statbuf.st_mode)) {
|
||||
if ( !Get_file_list_filter || (*Get_file_list_filter)(globinfo.gl_pathv[i]) ) {
|
||||
char *found_file = globinfo.gl_pathv[i];
|
||||
Assert(strncmp(found_file, base_filespec, base_filespec_len) == 0);
|
||||
found_file += base_filespec_len;
|
||||
ptr = strrchr(found_file, '.');
|
||||
if (ptr)
|
||||
l = ptr - found_file;
|
||||
else
|
||||
l = strlen(found_file);
|
||||
|
||||
list[num_files] = (char *)malloc(l + 1);
|
||||
strncpy(list[num_files], found_file, l);
|
||||
list[num_files][l] = 0;
|
||||
if (info)
|
||||
info[num_files].write_time = statbuf.st_mtime;
|
||||
|
||||
num_files++;
|
||||
}
|
||||
#elif defined SCP_UNIX
|
||||
cf_create_default_path_string( filespec, pathtype, NULL );
|
||||
|
||||
DIR *dirp;
|
||||
struct dirent *dir;
|
||||
|
||||
dirp = opendir (filespec);
|
||||
if ( dirp ) {
|
||||
while ((dir = readdir (dirp)) != NULL)
|
||||
{
|
||||
if (num_files >= max)
|
||||
break;
|
||||
|
||||
if (fnmatch(filter, dir->d_name, 0) != 0)
|
||||
continue;
|
||||
|
||||
char fn[MAX_PATH];
|
||||
snprintf(fn, MAX_PATH-1, "%s/%s", filespec, dir->d_name);
|
||||
fn[MAX_PATH-1] = 0;
|
||||
|
||||
struct stat buf;
|
||||
if (stat(fn, &buf) == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!S_ISREG(buf.st_mode)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !Get_file_list_filter || (*Get_file_list_filter)(dir->d_name) ) {
|
||||
ptr = strrchr(dir->d_name, '.');
|
||||
if (ptr)
|
||||
l = ptr - dir->d_name;
|
||||
else
|
||||
l = strlen(dir->d_name);
|
||||
|
||||
list[num_files] = (char *)malloc(l + 1);
|
||||
strncpy(list[num_files], dir->d_name, l);
|
||||
list[num_files][l] = 0;
|
||||
if (info)
|
||||
info[num_files].write_time = buf.st_mtime;
|
||||
|
||||
num_files++;
|
||||
}
|
||||
globfree(&globinfo);
|
||||
}
|
||||
|
||||
closedir(dirp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1189,7 +1337,6 @@ int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort
|
||||
}
|
||||
|
||||
if (num_files >= max)
|
||||
|
||||
break;
|
||||
|
||||
if ( !cf_matches_spec( filter,f->name_ext)) {
|
||||
@@ -1287,12 +1434,12 @@ int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char *
|
||||
|
||||
char filespec[MAX_PATH_LEN];
|
||||
|
||||
// Search the default directories
|
||||
#if defined _WIN32
|
||||
cf_create_default_path_string( filespec, pathtype, filter );
|
||||
mprintf(("cf_get_file_list_preallocated looking for type=%d, filter=\"%s\"\n",
|
||||
pathtype, filter));
|
||||
|
||||
// Search the default directories
|
||||
#if defined _WIN32
|
||||
int find_handle;
|
||||
_finddata_t find;
|
||||
|
||||
@@ -1325,41 +1472,51 @@ int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char *
|
||||
_findclose( find_handle );
|
||||
}
|
||||
|
||||
#elif defined unix
|
||||
char base_filespec[MAX_PATH_LEN];
|
||||
cf_create_default_path_string( base_filespec, pathtype );
|
||||
int base_filespec_len = strlen(base_filespec);
|
||||
glob_t globinfo;
|
||||
memset(&globinfo, 0, sizeof(globinfo));
|
||||
int status = glob(filespec, 0, NULL, &globinfo);
|
||||
if (status == 0) {
|
||||
for (unsigned int i = 0; i < globinfo.gl_pathc; i++) {
|
||||
// Determine if this is a regular file
|
||||
struct stat statbuf;
|
||||
memset(&statbuf, 0, sizeof(statbuf));
|
||||
stat(globinfo.gl_pathv[i], &statbuf);
|
||||
if (S_ISREG(statbuf.st_mode)) {
|
||||
if ( !Get_file_list_filter || (*Get_file_list_filter)(globinfo.gl_pathv[i]) ) {
|
||||
|
||||
char *found_file = globinfo.gl_pathv[i];
|
||||
Assert(strncmp(found_file, base_filespec, base_filespec_len) == 0);
|
||||
found_file += base_filespec_len;
|
||||
#elif defined SCP_UNIX
|
||||
cf_create_default_path_string( filespec, pathtype, NULL );
|
||||
|
||||
strncpy(arr[num_files], found_file, MAX_FILENAME_LEN - 1 );
|
||||
char *ptr = strrchr(arr[num_files], '.');
|
||||
if ( ptr ) {
|
||||
*ptr = 0;
|
||||
}
|
||||
DIR *dirp;
|
||||
struct dirent *dir;
|
||||
|
||||
if (info) {
|
||||
info[num_files].write_time = statbuf.st_mtime;
|
||||
}
|
||||
|
||||
num_files++;
|
||||
dirp = opendir (filespec);
|
||||
if ( dirp ) {
|
||||
while ((dir = readdir (dirp)) != NULL)
|
||||
{
|
||||
if (num_files >= max)
|
||||
break;
|
||||
|
||||
if (fnmatch(filter, dir->d_name, 0) != 0)
|
||||
continue;
|
||||
|
||||
char fn[MAX_PATH];
|
||||
snprintf(fn, MAX_PATH-1, "%s/%s", filespec, dir->d_name);
|
||||
fn[MAX_PATH-1] = 0;
|
||||
|
||||
struct stat buf;
|
||||
if (stat(fn, &buf) == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!S_ISREG(buf.st_mode)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !Get_file_list_filter || (*Get_file_list_filter)(dir->d_name) ) {
|
||||
|
||||
strncpy(arr[num_files], dir->d_name, MAX_FILENAME_LEN - 1 );
|
||||
char *ptr = strrchr(arr[num_files], '.');
|
||||
if ( ptr ) {
|
||||
*ptr = 0;
|
||||
}
|
||||
|
||||
if (info) {
|
||||
info[num_files].write_time = buf.st_mtime;
|
||||
}
|
||||
|
||||
num_files++;
|
||||
}
|
||||
}
|
||||
globfree(&globinfo);
|
||||
closedir(dirp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1429,7 +1586,11 @@ int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char *
|
||||
// Output: path - Fully qualified pathname.
|
||||
void cf_create_default_path_string( char *path, int pathtype, char *filename, bool localize )
|
||||
{
|
||||
if ( filename && strpbrk(filename,"/\\:") ) {
|
||||
#ifdef SCP_UNIX
|
||||
if ( filename && strpbrk(filename,"/") ) {
|
||||
#else
|
||||
if ( filename && strpbrk(filename,"/\\:") ) {
|
||||
#endif
|
||||
// Already has full path
|
||||
strcpy( path, filename );
|
||||
|
||||
@@ -1443,14 +1604,30 @@ void cf_create_default_path_string( char *path, int pathtype, char *filename, bo
|
||||
|
||||
Assert(CF_TYPE_SPECIFIED(pathtype));
|
||||
|
||||
strcpy(path, root->path);
|
||||
// force a specific directory to search for player files
|
||||
if ( (pathtype == CF_TYPE_SINGLE_PLAYERS) || (pathtype == CF_TYPE_MULTI_PLAYERS) ) {
|
||||
strcpy(path, Pilot_file_path);
|
||||
} else {
|
||||
strcpy(path, root->path);
|
||||
}
|
||||
|
||||
strcat(path, Pathtypes[pathtype].path);
|
||||
|
||||
// Don't add slash for root directory
|
||||
if (Pathtypes[pathtype].path[0] != '\0') {
|
||||
strcat(path, DIR_SEPARATOR_STR);
|
||||
if ( path[strlen(path)-1] != DIR_SEPARATOR_CHAR ) {
|
||||
strcat(path, DIR_SEPARATOR_STR);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef INF_BUILD
|
||||
// keep pilot files separated for an Inferno build since they aren't compatible
|
||||
if ( pathtype == CF_TYPE_SINGLE_PLAYERS ) {
|
||||
strcat(path, "inferno");
|
||||
strcat(path, DIR_SEPARATOR_STR);
|
||||
}
|
||||
#endif
|
||||
|
||||
// add filename
|
||||
if (filename) {
|
||||
strcat(path, filename);
|
||||
@@ -1475,4 +1652,3 @@ void cf_create_default_path_string( char *path, int pathtype, char *filename, bo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CFile/CfileSystem.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2004-03-05 09:01:54 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-08-11 05:06:19 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Functions to keep track of and find files that can exist
|
||||
* on the harddrive, cd-rom, or in a pack file on either of those.
|
||||
@@ -20,6 +20,10 @@
|
||||
* all those locations, inherently enforcing precedence orders.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2004/03/05 09:01:54 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:21 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -46,6 +50,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _CFILESYSTEM_H
|
||||
#define _CFILESYSTEM_H
|
||||
|
||||
|
||||
@@ -9,11 +9,78 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Cmdline/cmdline.cpp $
|
||||
* $Revision: 2.70 $
|
||||
* $Date: 2004-05-01 22:47:23 $
|
||||
* $Author: randomtiger $
|
||||
* $Revision: 2.88 $
|
||||
* $Date: 2004-12-24 19:36:12 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.87 2004/12/11 09:37:17 wmcoolmon
|
||||
* Apparently I never commited -mpnoreturn...
|
||||
*
|
||||
* Revision 2.86 2004/12/02 11:20:33 taylor
|
||||
* text of -no_set_gamma cmdline option shouldn't specify D3D since it works in OGL too
|
||||
*
|
||||
* Revision 2.85 2004/11/29 18:04:53 taylor
|
||||
* little reorg to flags so Experimental won't show up twice
|
||||
* add/update the wiki links since none of them worked before
|
||||
* remove all options that require an argument since they won't work
|
||||
*
|
||||
* Revision 2.84 2004/11/23 19:29:13 taylor
|
||||
* fix 2d warp in D3D, add cmdline option for 3d warp
|
||||
*
|
||||
* Revision 2.83 2004/09/10 13:51:45 et1
|
||||
* Command line option for TBP for warp stuff, "-tbpwarpeffects"
|
||||
*
|
||||
* Revision 2.82 2004/08/08 02:56:54 phreak
|
||||
* fixed the -orbradar launcher string
|
||||
*
|
||||
* Revision 2.81 2004/08/02 22:40:59 phreak
|
||||
* added -orbradar to enable orb rendering for the radar
|
||||
*
|
||||
* Revision 2.80 2004/08/01 02:31:18 phreak
|
||||
* -phreak command line changed to -dualscanlines
|
||||
*
|
||||
* Revision 2.79 2004/07/29 03:49:44 Kazan
|
||||
* fs2_open.exe was suffering the same problem as fred2 -- it was just a little less obvious
|
||||
*
|
||||
* Revision 2.78 2004/07/26 20:47:25 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.77 2004/07/25 18:46:28 Kazan
|
||||
* -fred_no_warn has become -no_warn and applies to both fred and fs2
|
||||
* added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
|
||||
* fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
|
||||
* made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
|
||||
*
|
||||
* Revision 2.76 2004/07/12 16:32:42 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.75 2004/07/05 05:09:15 bobboau
|
||||
* FVF code, only the data that is needed is sent off to the card,,
|
||||
* OGL can take advantage of this if they want but it won't break
|
||||
* anything if they don't. also state block code has been implemented,
|
||||
* that's totaly internal to D3D no high level code is involved.
|
||||
*
|
||||
* Revision 2.74 2004/06/29 06:00:45 wmcoolmon
|
||||
* Added "-load_only_used", which makes FS2 load only used weapon data
|
||||
*
|
||||
* Revision 2.73 2004/06/26 00:28:05 wmcoolmon
|
||||
* Added "-targetinfo" to toggle info next to targeted object.
|
||||
*
|
||||
* Revision 2.72 2004/06/19 22:15:48 wmcoolmon
|
||||
* Added -nomotion debris command line option; also re-ordered categories.
|
||||
*
|
||||
* Revision 2.71 2004/06/06 12:25:19 randomtiger
|
||||
* Added new compression option -pcx32dds, build posted in RSB forum.
|
||||
* Changed flag because of launcher bug, have fixed launcher bug, will distribute later.
|
||||
* Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
|
||||
*
|
||||
* Revision 2.70 2004/05/01 22:47:23 randomtiger
|
||||
* FS2_open will now take flag settings from cmdline_fso.cfg not cmdline.cfg.
|
||||
* This means retail FS2 will not crash because of fs2_open flags.
|
||||
* The new version of the launcher (v5) must used to setup flags now.
|
||||
* Anyone distributing pre 3.6 builds should make this clear and 3.6 should come with Launcher v5.
|
||||
*
|
||||
* Revision 2.69 2004/05/01 17:10:18 Kazan
|
||||
* Multiple -mod - "-mod ModA,ModB,ModC" in order of priority
|
||||
* Giving you:
|
||||
@@ -538,6 +605,7 @@
|
||||
#include "species_defs/species_defs.h"
|
||||
#include "hud/hudconfig.h"
|
||||
|
||||
|
||||
// variables
|
||||
class cmdline_parm {
|
||||
public:
|
||||
@@ -555,6 +623,12 @@ public:
|
||||
char *str();
|
||||
};
|
||||
|
||||
float Cmdline_max_subdivide = 0.0f;
|
||||
|
||||
int Cmdline_env = 0;
|
||||
int Cmdline_decals = 0;
|
||||
int Cmdline_alpha_env = 0;
|
||||
|
||||
enum
|
||||
{
|
||||
// DO NOT CHANGE ANYTHING ABOUT THESE FIRST TWO OR WILL MESS UP THE LAUNCHER
|
||||
@@ -603,55 +677,67 @@ typedef struct
|
||||
// Please group them by type, ie Graphics, gameplay etc, maximum 20 different types
|
||||
Flag exe_params[] =
|
||||
{
|
||||
"-spec", "Enable specular", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
|
||||
"-glow", "Enable glowmaps", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "",
|
||||
"-pcx32", "Enable 32bit textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/32%20bit%20PCX%20textures",
|
||||
"-jpgtga", "Enable jpg,tga textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/JPG%20and%20TGA%20textures",
|
||||
"-d3dmipmap", "Enable mipmapping", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Mipmaping%2C%20blending%20textures%20over%20distance",
|
||||
"-cell", "Enable cell shading", true, 0, EASY_DEFAULT, "Graphics", "",
|
||||
"-phreak", "Enable Phreaks options", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
|
||||
"-ship_choice_3d","Enable models instead of ani", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
|
||||
"-d3d_no_vsync", "Disable vertical sync", true, 0, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Disable%20V-Sync",
|
||||
"-2d_poof", "Stops fog intersect hull", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
|
||||
"-spec", "Enable specular", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.spec",
|
||||
"-glow", "Enable glowmaps", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.glow",
|
||||
"-pcx32", "Enable 32bit textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.pcx32",
|
||||
"-jpgtga", "Enable jpg,tga textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.jpgtga",
|
||||
"-d3dmipmap", "Enable mipmapping", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.d3dmipmap",
|
||||
"-nomotiondebris","Disable motion debris", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nomotiondebris",
|
||||
"-2d_poof", "Stops fog intersect hull", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.2d_poof",
|
||||
"-cell", "Enable cell shading", true, 0, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.cell",
|
||||
|
||||
"-nobeampierce", "", true, EASY_ALL_ON, EASY_DEFAULT, "Gameplay", "",
|
||||
"-radar_reduce", "", true, EASY_ALL_ON, EASY_DEFAULT, "Gameplay", "",
|
||||
"-pcx2dds", "Compress pcx", true, 0, EASY_DEFAULT, "Game Speed", "",
|
||||
"-d3d_no_vsync", "Disable vertical sync", true, 0, EASY_DEFAULT, "Game Speed", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.d3d_no_vsync",
|
||||
|
||||
"-fps", "", false, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-window", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-timerbar", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-stats", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-coords", "", false, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-show_mem_usage","", true, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-pofspew", "", false, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-tablecrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
"-missioncrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
|
||||
|
||||
"-oldfire", "", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-nohtl", "Software mode (very slow)", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-nosound", "No sound or music", false, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-nomusic", "No music", false, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-no_set_gamma", "Disable D3D gamma", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-dnoshowvid", "Disable video playback", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-safeloading", "", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-query_speech", "", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-d3d_bad_tsys", "Enable inefficient textures", false, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-novbo", "Disable OpenGL VBO", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
|
||||
"-standalone", "", false, 0, EASY_DEFAULT, "Multi", "",
|
||||
"-startgame", "", false, 0, EASY_DEFAULT, "Multi", "",
|
||||
"-closed", "", false, 0, EASY_DEFAULT, "Multi", "",
|
||||
"-restricted", "", false, 0, EASY_DEFAULT, "Multi", "",
|
||||
"-multilog", "", false, 0, EASY_DEFAULT, "Multi", "",
|
||||
"-clientdamage", "", false, 0, EASY_DEFAULT, "Multi", "",
|
||||
|
||||
"-batch_3dunlit", "Batch dynamic data (in dev)", false, 0, EASY_DEFAULT, "Experimental", "",
|
||||
"-nobeampierce", "", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nobeampierce",
|
||||
"-dualscanlines", "Another pair of scanning lines", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.dualscanlines",
|
||||
"-ship_choice_3d","Use models for ship selection", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.ship_choice_3d",
|
||||
"-targetinfo", "Enable info next to target", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.targetinfo",
|
||||
"-orbradar", "Enables 3d radar", true, 0, EASY_DEFAULT, "Gameplay", "",
|
||||
"-3dwarp", "Enable 3d warp", true, 0, EASY_DEFAULT, "Gameplay", "",
|
||||
"-tbpwarpeffects","Enable TBP Warp Effects", true, 0, EASY_DEFAULT, "Gameplay", "", // TBP warp effects -Et1
|
||||
"-ballistic_gauge", "Enable ballistic ammo gauge", true, 0, EASY_DEFAULT, "Gameplay", "",
|
||||
|
||||
"-snd_preload", "Preload mission game sounds", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Audio", "",
|
||||
"-snd_preload", "Preload mission game sounds", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Audio", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.snd_preload",
|
||||
"-noaudio", "Disable sound and music", false, 0, EASY_DEFAULT, "Audio", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nosound",
|
||||
"-nomusic", "Disable music", false, 0, EASY_DEFAULT, "Audio", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nomusic",
|
||||
|
||||
"-standalone", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.standalone",
|
||||
"-startgame", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.startgame",
|
||||
"-closed", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.closed",
|
||||
"-restricted", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.restricted",
|
||||
"-multilog", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.multilog",
|
||||
"-clientdamage", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.clientdamage",
|
||||
"-mpnoreturn", "Disables flight deck option", true, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Command-Line%20Reference#-mpnoreturn",
|
||||
|
||||
"-oldfire", "", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.oldfire",
|
||||
"-nohtl", "Software mode (very slow)", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nohtl",
|
||||
"-no_set_gamma", "Disable setting of gamma", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
"-dnoshowvid", "Disable video playback", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.dnoshowvid",
|
||||
"-safeloading", "", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.safeloading",
|
||||
"-query_speech", "Does this build have speech?", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.query_speech",
|
||||
"-d3d_bad_tsys", "Enable inefficient textures", false, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.d3d_bad_tsys",
|
||||
"-novbo", "Disable OpenGL VBO", true, 0, EASY_DEFAULT, "Troubleshoot", "",
|
||||
|
||||
"-env", "environment mapping maping", true, 0, EASY_DEFAULT, "Experimental", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.env",
|
||||
"-alpha_env", "uses uses alpha for env maping", true, 0, EASY_DEFAULT, "Experimental", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.alpha_env",
|
||||
"-decals", "impact decals", true, 0, EASY_DEFAULT, "Experimental", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.decals",
|
||||
"-loadonlyused", "Loads only used weapons", true, 0, EASY_DEFAULT, "Experimental", "",
|
||||
|
||||
"-fps", "Show frames per seconds", false, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.fps",
|
||||
"-window", "Run in window", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.window",
|
||||
"-timerbar", "", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.timerbar",
|
||||
"-stats", "Show statistics", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.stats",
|
||||
"-coords", "Show coordinates", false, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.coords",
|
||||
"-show_mem_usage","Show memory usage", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.show_mem_usage",
|
||||
"-pofspew", "", false, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.pofspew",
|
||||
"-tablecrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.tablecrcs",
|
||||
"-missioncrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.missioncrcs",
|
||||
};
|
||||
|
||||
// here are the command line parameters that we will be using for FreeSpace
|
||||
cmdline_parm standalone_arg("-standalone", NULL);
|
||||
cmdline_parm mpnoreturn_arg("-mpnoreturn", NULL); //Removes 'Return to Flight Deck' in respawn dialog -C
|
||||
cmdline_parm nosound_arg("-nosound", NULL);
|
||||
cmdline_parm nomusic_arg("-nomusic", NULL);
|
||||
cmdline_parm startgame_arg("-startgame", NULL);
|
||||
@@ -672,7 +758,8 @@ cmdline_parm timeout("-timeout", NULL);
|
||||
cmdline_parm window("-window", NULL);
|
||||
cmdline_parm almission_arg("-almission", NULL); //DTP for autoload Multi mission
|
||||
cmdline_parm allslev_arg("-allslev", NULL); //Give access to all single player missions
|
||||
cmdline_parm phreak_arg("-phreak", NULL); // Change to phreaks options including new targetting code
|
||||
cmdline_parm dualscanlines_arg("-dualscanlines", NULL); // Change to phreaks options including new targetting code
|
||||
cmdline_parm targetinfo_arg("-targetinfo", NULL); //Adds ship name/class to right of target box -C
|
||||
cmdline_parm dnoshowvid_arg("-dnoshowvid", NULL); // Allows video streaming
|
||||
cmdline_parm mod_arg("-mod", NULL); //DTP modsupport
|
||||
cmdline_parm fps_arg("-fps", NULL);
|
||||
@@ -685,6 +772,7 @@ cmdline_parm spec_point_arg("-spec_point", NULL); // comand line FOV -Bobboau
|
||||
cmdline_parm spec_static_arg("-spec_static", NULL); // comand line FOV -Bobboau
|
||||
cmdline_parm spec_tube_arg("-spec_tube", NULL); // comand line FOV -Bobboau
|
||||
cmdline_parm safeloading_arg("-safeloading", NULL); //Uses old loading method -C
|
||||
cmdline_parm nomotiondebris_arg("-nomotiondebris", NULL); //Removes those ugly floating rocks -C
|
||||
cmdline_parm spec_arg("-spec", NULL); // use specular highlighting -Sticks
|
||||
cmdline_parm glow_arg("-glow", NULL); // use Bobs glow code
|
||||
cmdline_parm MissionCRCs("-missioncrcs", NULL);
|
||||
@@ -695,6 +783,7 @@ cmdline_parm jpgtga_arg("-jpgtga",NULL);
|
||||
cmdline_parm no_set_gamma_arg("-no_set_gamma",NULL);
|
||||
cmdline_parm d3d_no_vsync_arg("-d3d_no_vsync", NULL);
|
||||
cmdline_parm pcx32_arg("-pcx32",NULL);
|
||||
cmdline_parm pcx32dds_arg("-pcx2dds",NULL);
|
||||
cmdline_parm timerbar_arg("-timerbar", NULL);
|
||||
cmdline_parm stats_arg("-stats", NULL);
|
||||
cmdline_parm query_speech_arg("-query_speech", NULL);
|
||||
@@ -709,7 +798,18 @@ cmdline_parm get_flags_arg("-get_flags",NULL);
|
||||
cmdline_parm d3d_lesstmem_arg("-d3d_bad_tsys",NULL);
|
||||
cmdline_parm batch_3dunlit_arg("-batch_3dunlit",NULL);
|
||||
cmdline_parm fred2_htl_arg("-fredhtl",NULL);
|
||||
cmdline_parm fred2_nowarn_arg("-fred_no_warn", NULL);
|
||||
cmdline_parm nowarn_arg("-no_warn", NULL);
|
||||
cmdline_parm max_subdivide_arg("-max_subdivide", NULL); // comand line maximum level of tesleation for n-patches -Bobboau
|
||||
cmdline_parm env("-env", NULL);
|
||||
cmdline_parm alpha_env("-alpha_env", NULL);
|
||||
cmdline_parm decals("-decals", NULL);
|
||||
cmdline_parm orb_radar("-orbradar",NULL);
|
||||
cmdline_parm TBPWarpEffects( "-tbpwarpeffects", NULL ); // TBP warp effects -Et1
|
||||
cmdline_parm use_3dwarp("-3dwarp", NULL);
|
||||
cmdline_parm ballistic_gauge("-ballistic_gauge", NULL );
|
||||
|
||||
//Experimental
|
||||
cmdline_parm load_only_used("-loadonlyused", NULL);
|
||||
|
||||
cmdline_parm poof_2d_arg("-2d_poof", NULL);
|
||||
cmdline_parm Radar_Range_Clamp("-radar_reduce", NULL);
|
||||
@@ -719,6 +819,7 @@ cmdline_parm snd_preload_arg("-snd_preload", NULL);
|
||||
|
||||
cmdline_parm no_fpscap("-no_fps_capping", NULL);
|
||||
|
||||
int Cmdline_mpnoreturn = 0;
|
||||
int Cmdline_show_stats = 0;
|
||||
int Cmdline_timerbar = 0;
|
||||
int Cmdline_multi_stream_chat_to_file = 0;
|
||||
@@ -749,10 +850,14 @@ int Cmdline_SpewMission_CRCs = 0; // Kazan for making valid mission lists
|
||||
int Cmdline_SpewTable_CRCs = 0;
|
||||
int Cmdline_ship_choice_3d = 0;
|
||||
int Cmdline_d3d_particle = 0;
|
||||
int Cmdline_orb_radar = 0;
|
||||
int Cmdline_TBPWarpEffects = 0; // TBP warp effects -Et1
|
||||
int Cmdline_3dwarp = 0;
|
||||
|
||||
int Cmdline_window = 0;
|
||||
int Cmdline_allslev = 0;
|
||||
int Cmdline_phreak = 0;
|
||||
int Cmdline_dualscanlines = 0;
|
||||
int Cmdline_targetinfo = 0;
|
||||
int Cmdline_dnoshowvid = 0;
|
||||
int Cmdline_show_fps = 0;
|
||||
int Cmdline_safeloading = 0;
|
||||
@@ -773,6 +878,8 @@ int Cmdline_jpgtga = 0;
|
||||
int Cmdline_no_set_gamma = 0;
|
||||
int Cmdline_d3d_no_vsync = 0;
|
||||
int Cmdline_pcx32 = 0;
|
||||
int Cmdline_pcx32dds = 0;
|
||||
int Cmdline_nomotiondebris = 0;
|
||||
int Cmdline_query_speech = 0;
|
||||
|
||||
int Cmdline_show_mem_usage = 0;
|
||||
@@ -780,7 +887,12 @@ int Cmdline_d3d_lesstmem = 0;
|
||||
|
||||
int Cmdline_beams_no_pierce_shields = 0; // Goober5000
|
||||
int Cmdline_FRED2_htl = 0; // turn HTL on in fred - Kazan
|
||||
int CmdLine_FRED2_NoWarn = 0; // turn warnings off in FRED
|
||||
int CmdLine_NoWarn = 0; // turn warnings off in FRED
|
||||
|
||||
int Cmdline_ballistic_gauge = 0; // WMCoolmon's gauge thingy
|
||||
|
||||
//Experimental
|
||||
int Cmdline_load_only_used;
|
||||
|
||||
int Cmdline_novbo = 0; // turn off OGL VBO support, troubleshooting
|
||||
int Cmdline_snd_preload = 0; // preload game sounds during mission load
|
||||
@@ -1024,6 +1136,11 @@ bool SetCmdlineParams()
|
||||
Cmdline_NoFPSCap = 1;
|
||||
}
|
||||
|
||||
if(load_only_used.found())
|
||||
{
|
||||
Cmdline_load_only_used = 1;
|
||||
}
|
||||
|
||||
if(poof_2d_arg.found())
|
||||
{
|
||||
Cmdline_2d_poof = 1;
|
||||
@@ -1031,12 +1148,13 @@ bool SetCmdlineParams()
|
||||
|
||||
if (Radar_Range_Clamp.found())
|
||||
{
|
||||
Radar_ranges[RR_MAX_RANGES-1] = Radar_Range_Clamp.get_float();
|
||||
if (Radar_Range_Clamp.get_float() > 0.0f)
|
||||
Radar_ranges[RR_MAX_RANGES-1] = Radar_Range_Clamp.get_float();
|
||||
}
|
||||
|
||||
if (fred2_nowarn_arg.found())
|
||||
if (nowarn_arg.found())
|
||||
{
|
||||
CmdLine_FRED2_NoWarn = 1;
|
||||
CmdLine_NoWarn = 1;
|
||||
}
|
||||
|
||||
if (fred2_htl_arg.found())
|
||||
@@ -1062,6 +1180,10 @@ bool SetCmdlineParams()
|
||||
Is_standalone = 1;
|
||||
}
|
||||
|
||||
if(mpnoreturn_arg.found()) {
|
||||
Cmdline_mpnoreturn = 1;
|
||||
}
|
||||
|
||||
// run with no sound
|
||||
if ( nosound_arg.found() ) {
|
||||
Cmdline_freespace_no_sound = 1;
|
||||
@@ -1171,14 +1293,20 @@ bool SetCmdlineParams()
|
||||
Cmdline_allslev = 1;
|
||||
}
|
||||
|
||||
if(phreak_arg.found() ) {
|
||||
Cmdline_phreak = 1;
|
||||
if(dualscanlines_arg.found() ) {
|
||||
Cmdline_dualscanlines = 1;
|
||||
}
|
||||
|
||||
if(targetinfo_arg.found())
|
||||
{
|
||||
Cmdline_targetinfo = 1;
|
||||
}
|
||||
|
||||
if(dnoshowvid_arg.found() ) {
|
||||
Cmdline_dnoshowvid = 1;
|
||||
}
|
||||
|
||||
|
||||
if(mod_arg.found() ) {
|
||||
Cmdline_mod = mod_arg.str();
|
||||
|
||||
@@ -1195,10 +1323,11 @@ bool SetCmdlineParams()
|
||||
|
||||
// Ok - mod stacking support
|
||||
int len = strlen(Cmdline_mod);
|
||||
char *modlist = new char[len+1];
|
||||
char *modlist = new char[len+2];
|
||||
memset(modlist, 0, len+2);
|
||||
strcpy(modlist, Cmdline_mod);
|
||||
|
||||
modlist[len]= '\0'; // double null termination at the end
|
||||
//modlist[len]= '\0'; // double null termination at the end
|
||||
|
||||
// null terminate each individual
|
||||
for (int i = 0; i < len; i++)
|
||||
@@ -1221,6 +1350,10 @@ bool SetCmdlineParams()
|
||||
Cmdline_safeloading = 1;
|
||||
}
|
||||
|
||||
if ( nomotiondebris_arg.found() ) {
|
||||
Cmdline_nomotiondebris = 1;
|
||||
}
|
||||
|
||||
if( cache_ani_arg.found() ) {
|
||||
Cmdline_cache_ani = 1;
|
||||
}
|
||||
@@ -1241,6 +1374,22 @@ bool SetCmdlineParams()
|
||||
Viewer_zoom = VIEWER_ZOOM_DEFAULT = Cmdline_fov = fov_arg.get_float();
|
||||
}
|
||||
|
||||
if (orb_radar.found())
|
||||
{
|
||||
Cmdline_orb_radar = 1;
|
||||
}
|
||||
|
||||
// TBP warp effects -Et1
|
||||
if( TBPWarpEffects.found() )
|
||||
{
|
||||
|
||||
Cmdline_TBPWarpEffects = 1;
|
||||
|
||||
}
|
||||
|
||||
if ( use_3dwarp.found() ) {
|
||||
Cmdline_3dwarp = 1;
|
||||
}
|
||||
|
||||
//specular comand lines
|
||||
if ( spec_exp_arg.found() ) {
|
||||
@@ -1297,6 +1446,11 @@ bool SetCmdlineParams()
|
||||
Cmdline_pcx32 = 1;
|
||||
}
|
||||
|
||||
if(pcx32dds_arg.found() )
|
||||
{
|
||||
Cmdline_pcx32dds = 1;
|
||||
}
|
||||
|
||||
if(glow_arg.found() )
|
||||
{
|
||||
Cmdline_noglow = 0;
|
||||
@@ -1408,6 +1562,36 @@ bool SetCmdlineParams()
|
||||
Cmdline_snd_preload = 1;
|
||||
}
|
||||
|
||||
if ( max_subdivide_arg.found() ) {
|
||||
Cmdline_max_subdivide = max_subdivide_arg.get_float();
|
||||
}else{
|
||||
Cmdline_max_subdivide = 0;
|
||||
}
|
||||
|
||||
if ( alpha_env.found() ) {
|
||||
Cmdline_alpha_env = 1;
|
||||
}else{
|
||||
Cmdline_alpha_env = 0;
|
||||
}
|
||||
|
||||
if ( env.found() ) {
|
||||
Cmdline_env = 1;
|
||||
}else{
|
||||
Cmdline_env = 0;
|
||||
}
|
||||
|
||||
if ( decals.found() ) {
|
||||
Cmdline_decals = 1;
|
||||
}else{
|
||||
Cmdline_decals = 0;
|
||||
}
|
||||
|
||||
if ( ballistic_gauge.found() ) {
|
||||
Cmdline_ballistic_gauge = 1;
|
||||
} else {
|
||||
Cmdline_ballistic_gauge = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,49 @@
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Cmdline/cmdline.h $
|
||||
|
||||
* $Revision: 2.54 $
|
||||
* $Date: 2004-04-26 18:23:47 $
|
||||
* $Author: Kazan $
|
||||
* $Revision: 2.64 $
|
||||
* $Date: 2004-12-24 19:36:12 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.63 2004/11/23 19:29:13 taylor
|
||||
* fix 2d warp in D3D, add cmdline option for 3d warp
|
||||
*
|
||||
* Revision 2.62 2004/09/10 13:51:20 et1
|
||||
* Command line option for TBP for warp stuff, "-tbpwarpeffects"
|
||||
*
|
||||
* Revision 2.61 2004/08/11 05:06:19 Kazan
|
||||
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
|
||||
*
|
||||
* Revision 2.60 2004/08/02 22:40:59 phreak
|
||||
* added -orbradar to enable orb rendering for the radar
|
||||
*
|
||||
* Revision 2.59 2004/08/01 02:31:18 phreak
|
||||
* -phreak command line changed to -dualscanlines
|
||||
*
|
||||
* Revision 2.58 2004/07/25 18:46:28 Kazan
|
||||
* -fred_no_warn has become -no_warn and applies to both fred and fs2
|
||||
* added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
|
||||
* fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
|
||||
* made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
|
||||
*
|
||||
* Revision 2.57 2004/07/05 05:09:15 bobboau
|
||||
* FVF code, only the data that is needed is sent off to the card,,
|
||||
* OGL can take advantage of this if they want but it won't break
|
||||
* anything if they don't. also state block code has been implemented,
|
||||
* that's totaly internal to D3D no high level code is involved.
|
||||
*
|
||||
* Revision 2.56 2004/06/19 22:15:48 wmcoolmon
|
||||
* Added -nomotion debris command line option; also re-ordered categories.
|
||||
*
|
||||
* Revision 2.55 2004/06/06 12:25:19 randomtiger
|
||||
* Added new compression option -pcx32dds, build posted in RSB forum.
|
||||
* Changed flag because of launcher bug, have fixed launcher bug, will distribute later.
|
||||
* Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
|
||||
*
|
||||
* Revision 2.54 2004/04/26 18:23:47 Kazan
|
||||
* -no_fps_capping
|
||||
*
|
||||
* Revision 2.53 2004/04/26 00:23:26 taylor
|
||||
* novbo and snd_preload cmdline options, fix moddir getting appended space
|
||||
*
|
||||
@@ -408,7 +446,7 @@
|
||||
*
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef FS_CMDLINE_HEADER_FILE
|
||||
#define FS_CMDLINE_HEADER_FILE
|
||||
|
||||
@@ -454,13 +492,15 @@ extern int Cmdline_window;
|
||||
extern char *Cmdline_almission; //DTP for autoload mission
|
||||
extern int Cmdline_gf4fix; //DTP for Random tigers GF4fix.
|
||||
extern int Cmdline_allslev;
|
||||
extern int Cmdline_phreak;
|
||||
extern int Cmdline_dualscanlines;
|
||||
extern int Cmdline_dnoshowvid; //WMC Toggles movie playing support
|
||||
extern char *Cmdline_mod; //DTP for mod support
|
||||
extern int Cmdline_show_fps;//DTP moved here because it is the correct place for it to be.
|
||||
extern int Cmdline_show_stats;
|
||||
extern int Cmdline_safeloading;
|
||||
extern int Cmdline_nospec;
|
||||
extern int Cmdline_orb_radar;
|
||||
extern int Cmdline_TBPWarpEffects; // TBP warp effects -Et1
|
||||
|
||||
extern int Cmdline_cache_ani;
|
||||
extern int Cmdline_d3dmipmap;
|
||||
@@ -480,6 +520,8 @@ extern int Cmdline_jpgtga;
|
||||
extern int Cmdline_no_set_gamma;
|
||||
extern int Cmdline_d3d_no_vsync;
|
||||
extern int Cmdline_pcx32;
|
||||
extern int Cmdline_pcx32dds;
|
||||
extern int Cmdline_nomotiondebris;
|
||||
|
||||
extern int Cmdline_noglow;
|
||||
extern int Cmdline_timerbar;
|
||||
@@ -496,13 +538,22 @@ extern int Cmdline_d3d_lesstmem;
|
||||
extern int Cmdline_batch_3dunlit;
|
||||
|
||||
extern int Cmdline_2d_poof;
|
||||
extern int Cmdline_3dwarp;
|
||||
|
||||
extern int Cmdline_FRED2_htl;
|
||||
extern int CmdLine_FRED2_NoWarn;
|
||||
extern int CmdLine_NoWarn;
|
||||
|
||||
extern int Cmdline_novbo;
|
||||
extern int Cmdline_snd_preload;
|
||||
extern int Cmdline_NoFPSCap;
|
||||
|
||||
extern float Cmdline_max_subdivide;
|
||||
|
||||
extern int Cmdline_alpha_env;
|
||||
extern int Cmdline_env;
|
||||
extern int Cmdline_decals;
|
||||
|
||||
extern int Cmdline_ballistic_gauge;
|
||||
|
||||
//extern char FreeSpace_Directory[]; // allievating a cfilesystem problem caused by fred -- Kazan
|
||||
#endif
|
||||
@@ -9,13 +9,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CMeasure/CMeasure.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-03-05 09:01:57 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-07-26 20:47:25 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Counter measures. Created by Mike Kulas, May 12, 1997.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2004/07/12 16:32:43 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.3 2004/03/05 09:01:57 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.2 2003/03/18 10:07:00 unknownplayer
|
||||
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
|
||||
*
|
||||
@@ -228,6 +235,8 @@
|
||||
#include "math/staticrand.h"
|
||||
#include "object/object.h"
|
||||
|
||||
|
||||
|
||||
cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
|
||||
cmeasure Cmeasures[MAX_CMEASURES];
|
||||
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/CMeasure/CMeasure.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-03-05 09:01:57 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-08-11 05:06:19 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Counter measures. Created by Mike Kulas, May 12, 1997.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2004/03/05 09:01:57 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -115,6 +119,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _CMEASURE_H
|
||||
#define _CMEASURE_H
|
||||
|
||||
|
||||
+50
-14
@@ -41,12 +41,12 @@ 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 "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENGL" /D "MORE_SPECIES" /U "_DEBUG" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /Ob2 /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /U "_DEBUG" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"..\Release\Profile\code.bsc" "..\Release\Profile\*.sbr"
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
@@ -64,12 +64,12 @@ LIB32=link.exe -lib
|
||||
# PROP Intermediate_Dir "..\Debug\Profile"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "MORE_SPECIES" /D "_REPORT_MEM_LEAKS" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c
|
||||
# ADD CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o".\debug/profile/code.bsc"
|
||||
# ADD BSC32 /nologo /o"..\Debug\Profile\code.bsc" "..\Debug\Profile\*.sbr"
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
@@ -123,6 +123,10 @@ SOURCE=.\Bmpman\BmpMan.cpp
|
||||
|
||||
SOURCE=.\Bmpman\BmpMan.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bmpman\bm_internal.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "CFile"
|
||||
|
||||
@@ -543,23 +547,27 @@ SOURCE=.\Graphics\GrD3DTexture.cpp
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Graphics\GrOpenGL.h
|
||||
SOURCE=.\graphics\gropengl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenglExtension.h
|
||||
SOURCE=.\graphics\gropenglbmpman.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenGLlight.h
|
||||
SOURCE=.\graphics\gropenglextension.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenglTexture.h
|
||||
SOURCE=.\graphics\gropengllight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenGLTNL.h
|
||||
SOURCE=.\graphics\gropengltexture.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\gropengltnl.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "OpenGL CPPs"
|
||||
@@ -567,23 +575,27 @@ SOURCE=.\graphics\GrOpenGLTNL.h
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Graphics\GrOpenGL.cpp
|
||||
SOURCE=.\graphics\gropengl.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenglExtension.cpp
|
||||
SOURCE=.\graphics\gropenglbmpman.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenGLlight.cpp
|
||||
SOURCE=.\graphics\gropenglextension.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenglTexture.cpp
|
||||
SOURCE=.\graphics\gropengllight.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\GrOpenGLTNL.cpp
|
||||
SOURCE=.\graphics\gropengltexture.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\graphics\gropengltnl.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
@@ -701,6 +713,10 @@ SOURCE=.\Hud\HUDObserver.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hud\hudparse.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Hud\HUDreticle.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -1526,6 +1542,22 @@ SOURCE=.\Radar\Radar.cpp
|
||||
|
||||
SOURCE=.\Radar\Radar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\radar\radarorb.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\radar\radarorb.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\radar\radarsetup.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\radar\radarsetup.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Render"
|
||||
|
||||
@@ -2571,5 +2603,9 @@ SOURCE=.\Autopilot\Autopilot.cpp
|
||||
SOURCE=.\Autopilot\Autopilot.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PreProcDefines.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -9,13 +9,26 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.cpp $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-03-05 09:01:58 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2004-07-29 19:37:50 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* C module for keyboard, joystick and mouse configuration
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2004/07/26 20:47:26 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.7 2004/07/25 00:31:28 Kazan
|
||||
* i have absolutely nothing to say about that subject
|
||||
*
|
||||
* Revision 2.6 2004/07/12 16:32:43 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.5 2004/03/05 09:01:58 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.4 2003/11/11 02:15:43 Goober5000
|
||||
* ubercommit - basically spelling and language fixes with some additional
|
||||
* warnings disabled
|
||||
@@ -350,6 +363,8 @@
|
||||
#include "hud/hud.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define NUM_SYSTEM_KEYS 14
|
||||
#define NUM_BUTTONS 19
|
||||
#define NUM_TABS 4
|
||||
@@ -831,7 +846,13 @@ void control_config_list_prepare()
|
||||
if ((Control_config[z].tab == Tab) && control_config_valid_action(z)) {
|
||||
k = Control_config[z].key_id;
|
||||
j = Control_config[z].joy_id;
|
||||
Cc_lines[Num_cc_lines].label = XSTR(Control_config[z].text, CONTROL_CONFIG_XSTR + z);
|
||||
|
||||
if (Control_config[z].hasXSTR)
|
||||
Cc_lines[Num_cc_lines].label = XSTR(Control_config[z].text, CONTROL_CONFIG_XSTR + z);
|
||||
else
|
||||
Cc_lines[Num_cc_lines].label = Control_config[z].text;
|
||||
|
||||
|
||||
Cc_lines[Num_cc_lines].cc_index = z;
|
||||
Cc_lines[Num_cc_lines++].y = y;
|
||||
y += font_height + 2;
|
||||
@@ -2194,7 +2215,11 @@ void control_config_do_frame(float frametime)
|
||||
gr_get_string_size(&w, NULL, str);
|
||||
gr_printf(x - w / 2, y - font_height, str);
|
||||
|
||||
strcpy(buf, XSTR(Control_config[i].text, CONTROL_CONFIG_XSTR + i));
|
||||
if (Control_config[i].hasXSTR)
|
||||
strcpy(buf, XSTR(Control_config[i].text, CONTROL_CONFIG_XSTR + i));
|
||||
else
|
||||
strcpy(buf, Control_config[i].text);
|
||||
|
||||
gr_force_fit_string(buf, 255, Conflict_wnd_coords[gr_screen.res][CONTROL_W_COORD]);
|
||||
gr_get_string_size(&w, NULL, buf);
|
||||
gr_printf(x - w / 2, y, buf);
|
||||
@@ -2466,6 +2491,7 @@ int check_control(int id, int key)
|
||||
}
|
||||
|
||||
if ((Control_config[id].key_id == key) || joy_down_count(Control_config[id].joy_id, 1) || mouse_down_count(1 << Control_config[id].joy_id)) {
|
||||
//mprintf(("Key used %d", key));
|
||||
control_used(id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -9,13 +9,21 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.h $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2004-05-03 21:22:19 $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2004-08-11 05:06:19 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Header file for keyboard, joystick and mouse configuration
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2004/07/25 00:31:28 Kazan
|
||||
* i have absolutely nothing to say about that subject
|
||||
*
|
||||
* Revision 2.7 2004/05/03 21:22:19 Kazan
|
||||
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
|
||||
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
|
||||
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
|
||||
*
|
||||
* Revision 2.6 2004/04/06 03:09:01 phreak
|
||||
* added a control config option for the wireframe hud targetbox i enabled ages ago
|
||||
*
|
||||
@@ -286,6 +294,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef CONTROLS_CONFIG_H
|
||||
#define CONTROLS_CONFIG_H
|
||||
|
||||
@@ -317,6 +326,7 @@ typedef struct config_item {
|
||||
short key_default; // default key bound to action
|
||||
short joy_default; // default joystick button bound to action
|
||||
char tab; // what tab (category) it belongs in
|
||||
bool hasXSTR; // whether we should translate this with an XSTR
|
||||
char *text; // describes the action in the config screen
|
||||
char type; // manner control should be checked in
|
||||
short key_id; // actual key bound to action
|
||||
|
||||
@@ -9,13 +9,24 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfigCommon.cpp $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2004-05-03 21:22:19 $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2004-07-26 20:47:26 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* C module for keyboard, joystick and mouse configuration common stuff (between Fred and FreeSpace)
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2004/07/25 00:31:28 Kazan
|
||||
* i have absolutely nothing to say about that subject
|
||||
*
|
||||
* Revision 2.7 2004/07/12 16:32:43 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.6 2004/05/03 21:22:19 Kazan
|
||||
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
|
||||
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
|
||||
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
|
||||
*
|
||||
* Revision 2.5 2004/04/06 03:09:01 phreak
|
||||
* added a control config option for the wireframe hud targetbox i enabled ages ago
|
||||
*
|
||||
@@ -398,6 +409,7 @@
|
||||
#include "io/joy.h"
|
||||
#include "localization/localize.h"
|
||||
|
||||
|
||||
#define TARGET_TAB 0
|
||||
#define SHIP_TAB 1
|
||||
#define WEAPON_TAB 2
|
||||
@@ -420,155 +432,155 @@ int Invert_axis_defaults[JOY_NUM_AXES] = { 0, 0, 0, 0, 0, 0 };
|
||||
//XSTR:OFF
|
||||
config_item Control_config[CCFG_MAX + 1] = {
|
||||
// targeting a ship
|
||||
{ KEY_T, -1, TARGET_TAB, "Target Next Ship" },
|
||||
{ KEY_SHIFTED | KEY_T, -1, TARGET_TAB, "Target Previous Ship" },
|
||||
{ KEY_H, 2, TARGET_TAB, "Target Next Closest Hostile Ship" },
|
||||
{ KEY_SHIFTED | KEY_H, -1, TARGET_TAB, "Target Previous Closest Hostile Ship" },
|
||||
{ KEY_ALTED | KEY_H, -1, TARGET_TAB, "Toggle Auto Targeting" },
|
||||
{ KEY_F, -1, TARGET_TAB, "Target Next Closest Friendly Ship" },
|
||||
{ KEY_SHIFTED | KEY_F, -1, TARGET_TAB, "Target Previous Closest Friendly Ship" },
|
||||
{ KEY_Y, 4, TARGET_TAB, "Target Ship in Reticle" },
|
||||
{ KEY_G, -1, TARGET_TAB, "Target Target's Nearest Attacker" },
|
||||
{ KEY_ALTED | KEY_Y, -1, TARGET_TAB, "Target Last Ship to Send Transmission" },
|
||||
{ KEY_ALTED | KEY_T, -1, TARGET_TAB, "Turn Off Auto-Targeting" },
|
||||
{ KEY_T, -1, TARGET_TAB, true, "Target Next Ship" },
|
||||
{ KEY_SHIFTED | KEY_T, -1, TARGET_TAB, true, "Target Previous Ship" },
|
||||
{ KEY_H, 2, TARGET_TAB, true, "Target Next Closest Hostile Ship" },
|
||||
{ KEY_SHIFTED | KEY_H, -1, TARGET_TAB, true, "Target Previous Closest Hostile Ship" },
|
||||
{ KEY_ALTED | KEY_H, -1, TARGET_TAB, true, "Toggle Auto Targeting" },
|
||||
{ KEY_F, -1, TARGET_TAB, true, "Target Next Closest Friendly Ship" },
|
||||
{ KEY_SHIFTED | KEY_F, -1, TARGET_TAB, true, "Target Previous Closest Friendly Ship" },
|
||||
{ KEY_Y, 4, TARGET_TAB, true, "Target Ship in Reticle" },
|
||||
{ KEY_G, -1, TARGET_TAB, true, "Target Target's Nearest Attacker" },
|
||||
{ KEY_ALTED | KEY_Y, -1, TARGET_TAB, true, "Target Last Ship to Send Transmission" },
|
||||
{ KEY_ALTED | KEY_T, -1, TARGET_TAB, true, "Turn Off Auto-Targeting" },
|
||||
|
||||
// targeting a ship's subsystem
|
||||
{ KEY_V, -1, TARGET_TAB, "Target Subsystem in Reticle" },
|
||||
{ KEY_S, -1, TARGET_TAB, "Target Next Subsystem" },
|
||||
{ KEY_SHIFTED | KEY_S, -1, TARGET_TAB, "Target Previous Subsystem" },
|
||||
{ KEY_ALTED | KEY_S, -1, TARGET_TAB, "Turn Off Auto-Targeting of Subsystems" },
|
||||
{ KEY_V, -1, TARGET_TAB, true, "Target Subsystem in Reticle" },
|
||||
{ KEY_S, -1, TARGET_TAB, true, "Target Next Subsystem" },
|
||||
{ KEY_SHIFTED | KEY_S, -1, TARGET_TAB, true, "Target Previous Subsystem" },
|
||||
{ KEY_ALTED | KEY_S, -1, TARGET_TAB, true, "Turn Off Auto-Targeting of Subsystems" },
|
||||
|
||||
// matching speed
|
||||
{ KEY_M, -1, COMPUTER_TAB, "Match Target Speed" },
|
||||
{ KEY_ALTED | KEY_M, -1, COMPUTER_TAB, "Toggle Auto Speed Matching" },
|
||||
{ KEY_M, -1, COMPUTER_TAB, true, "Match Target Speed" },
|
||||
{ KEY_ALTED | KEY_M, -1, COMPUTER_TAB, true, "Toggle Auto Speed Matching" },
|
||||
|
||||
// weapons
|
||||
{ KEY_LCTRL, 0, WEAPON_TAB, "Fire Primary Weapon", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_SPACEBAR, 1, WEAPON_TAB, "Fire Secondary Weapon", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PERIOD, -1, WEAPON_TAB, "Cycle Forward Primary Weapon" },
|
||||
{ KEY_COMMA, -1, WEAPON_TAB, "Cycle Backward Primary Weapon" },
|
||||
{ KEY_DIVIDE, -1, WEAPON_TAB, "Cycle Secondary Weapon Bank" },
|
||||
{ KEY_SHIFTED | KEY_DIVIDE, -1, WEAPON_TAB, "Cycle Secondary Weapon Firing Rate" },
|
||||
{ KEY_X, 3, WEAPON_TAB, "Launch Countermeasure" },
|
||||
{ KEY_LCTRL, 0, WEAPON_TAB, true, "Fire Primary Weapon", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_SPACEBAR, 1, WEAPON_TAB, true, "Fire Secondary Weapon", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PERIOD, -1, WEAPON_TAB, true, "Cycle Forward Primary Weapon" },
|
||||
{ KEY_COMMA, -1, WEAPON_TAB, true, "Cycle Backward Primary Weapon" },
|
||||
{ KEY_DIVIDE, -1, WEAPON_TAB, true, "Cycle Secondary Weapon Bank" },
|
||||
{ KEY_SHIFTED | KEY_DIVIDE, -1, WEAPON_TAB, true, "Cycle Secondary Weapon Firing Rate" },
|
||||
{ KEY_X, 3, WEAPON_TAB, true, "Launch Countermeasure" },
|
||||
|
||||
// controls
|
||||
{ KEY_A, -1, SHIP_TAB, "Forward Thrust", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_Z, -1, SHIP_TAB, "Reverse Thrust", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD7, -1, SHIP_TAB, "Bank Left", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD9, -1, SHIP_TAB, "Bank Right", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD8, -1, SHIP_TAB, "Pitch Forward", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD2, -1, SHIP_TAB, "Pitch Backward", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD4, -1, SHIP_TAB, "Turn Left", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD6, -1, SHIP_TAB, "Turn Right", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_A, -1, SHIP_TAB, true, "Forward Thrust", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_Z, -1, SHIP_TAB, true, "Reverse Thrust", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD7, -1, SHIP_TAB, true, "Bank Left", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD9, -1, SHIP_TAB, true, "Bank Right", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD8, -1, SHIP_TAB, true, "Pitch Forward", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD2, -1, SHIP_TAB, true, "Pitch Backward", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD4, -1, SHIP_TAB, true, "Turn Left", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD6, -1, SHIP_TAB, true, "Turn Right", CC_TYPE_CONTINUOUS },
|
||||
|
||||
// throttle controls
|
||||
{ KEY_BACKSP, -1, SHIP_TAB, "Set Throttle to Zero" },
|
||||
{ KEY_SLASH, -1, SHIP_TAB, "Set Throttle to Max" },
|
||||
{ KEY_LBRACKET, -1, SHIP_TAB, "Set Throttle to One-Third" },
|
||||
{ KEY_RBRACKET, -1, SHIP_TAB, "Set Throttle to Two-Thirds" },
|
||||
{ KEY_EQUAL, -1, SHIP_TAB, "Increase Throttle 5 Percent" },
|
||||
{ KEY_MINUS, -1, SHIP_TAB, "Decrease Throttle 5 Percent" },
|
||||
{ KEY_BACKSP, -1, SHIP_TAB, true, "Set Throttle to Zero" },
|
||||
{ KEY_SLASH, -1, SHIP_TAB, true, "Set Throttle to Max" },
|
||||
{ KEY_LBRACKET, -1, SHIP_TAB, true, "Set Throttle to One-Third" },
|
||||
{ KEY_RBRACKET, -1, SHIP_TAB, true, "Set Throttle to Two-Thirds" },
|
||||
{ KEY_EQUAL, -1, SHIP_TAB, true, "Increase Throttle 5 Percent" },
|
||||
{ KEY_MINUS, -1, SHIP_TAB, true, "Decrease Throttle 5 Percent" },
|
||||
|
||||
// squadmate messaging
|
||||
{ KEY_SHIFTED | KEY_A, -1, COMPUTER_TAB, "Attack My Target" },
|
||||
{ KEY_SHIFTED | KEY_Z, -1, COMPUTER_TAB, "Disarm My Target" },
|
||||
{ KEY_SHIFTED | KEY_D, -1, COMPUTER_TAB, "Disable My Target" },
|
||||
{ KEY_SHIFTED | KEY_V, -1, COMPUTER_TAB, "Attack my Subsystem" },
|
||||
{ KEY_SHIFTED | KEY_X, -1, COMPUTER_TAB, "Capture My Target" },
|
||||
{ KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, "Engage Enemy" },
|
||||
{ KEY_SHIFTED | KEY_W, -1, COMPUTER_TAB, "Form on my Wing" },
|
||||
{ KEY_SHIFTED | KEY_I, -1, COMPUTER_TAB, "Ignore my Target" },
|
||||
{ KEY_SHIFTED | KEY_P, -1, COMPUTER_TAB, "Protect my Target" },
|
||||
{ KEY_SHIFTED | KEY_C, -1, COMPUTER_TAB, "Cover me" },
|
||||
{ KEY_SHIFTED | KEY_J, -1, COMPUTER_TAB, "Return to base" },
|
||||
{ KEY_SHIFTED | KEY_R, -1, COMPUTER_TAB, "Rearm me" },
|
||||
{ KEY_SHIFTED | KEY_A, -1, COMPUTER_TAB, true, "Attack My Target" },
|
||||
{ KEY_SHIFTED | KEY_Z, -1, COMPUTER_TAB, true, "Disarm My Target" },
|
||||
{ KEY_SHIFTED | KEY_D, -1, COMPUTER_TAB, true, "Disable My Target" },
|
||||
{ KEY_SHIFTED | KEY_V, -1, COMPUTER_TAB, true, "Attack my Subsystem" },
|
||||
{ KEY_SHIFTED | KEY_X, -1, COMPUTER_TAB, true, "Capture My Target" },
|
||||
{ KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, true, "Engage Enemy" },
|
||||
{ KEY_SHIFTED | KEY_W, -1, COMPUTER_TAB, true, "Form on my Wing" },
|
||||
{ KEY_SHIFTED | KEY_I, -1, COMPUTER_TAB, true, "Ignore my Target" },
|
||||
{ KEY_SHIFTED | KEY_P, -1, COMPUTER_TAB, true, "Protect my Target" },
|
||||
{ KEY_SHIFTED | KEY_C, -1, COMPUTER_TAB, true, "Cover me" },
|
||||
{ KEY_SHIFTED | KEY_J, -1, COMPUTER_TAB, true, "Return to base" },
|
||||
{ KEY_SHIFTED | KEY_R, -1, COMPUTER_TAB, true, "Rearm me" },
|
||||
|
||||
{ KEY_R, 6, TARGET_TAB, "Target Closest Attacking Ship" },
|
||||
{ KEY_R, 6, TARGET_TAB, true, "Target Closest Attacking Ship" },
|
||||
|
||||
// Views
|
||||
{ KEY_PADMULTIPLY, -1, COMPUTER_TAB, "Chase View" },
|
||||
{ KEY_PADPERIOD, -1, COMPUTER_TAB, "External View"},
|
||||
{ KEY_PADENTER, -1, COMPUTER_TAB, "Toggle External Camera Lock"},
|
||||
{ KEY_PAD0, -1, COMPUTER_TAB, "Free Look View", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PADDIVIDE, -1, COMPUTER_TAB, "Current Target View" },
|
||||
{ KEY_PADPLUS, -1, COMPUTER_TAB, "Increase View Distance", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PADMINUS, -1, COMPUTER_TAB, "Decrease View Distance", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD5, -1, COMPUTER_TAB, "Center View", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 33, COMPUTER_TAB, "View Up", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 32, COMPUTER_TAB, "View Rear", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 34, COMPUTER_TAB, "View Left", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 35, COMPUTER_TAB, "View Right", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PADMULTIPLY, -1, COMPUTER_TAB, true, "Chase View" },
|
||||
{ KEY_PADPERIOD, -1, COMPUTER_TAB, true, "External View"},
|
||||
{ KEY_PADENTER, -1, COMPUTER_TAB, true, "Toggle External Camera Lock"},
|
||||
{ KEY_PAD0, -1, COMPUTER_TAB, true, "Free Look View", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PADDIVIDE, -1, COMPUTER_TAB, true, "Current Target View" },
|
||||
{ KEY_PADPLUS, -1, COMPUTER_TAB, true, "Increase View Distance", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PADMINUS, -1, COMPUTER_TAB, true, "Decrease View Distance", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_PAD5, -1, COMPUTER_TAB, true, "Center View", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 33, COMPUTER_TAB, true, "View Up", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 32, COMPUTER_TAB, true, "View Rear", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 34, COMPUTER_TAB, true, "View Left", CC_TYPE_CONTINUOUS },
|
||||
{ -1, 35, COMPUTER_TAB, true, "View Right", CC_TYPE_CONTINUOUS },
|
||||
|
||||
{ KEY_RAPOSTRO, -1, COMPUTER_TAB, "Cycle Radar Range" },
|
||||
{ KEY_C, -1, COMPUTER_TAB, "Communications Menu" },
|
||||
{ -1, -1, -1, "Show Objectives" },
|
||||
{ KEY_ALTED | KEY_J, -1, COMPUTER_TAB, "Enter Subspace (End Mission)" },
|
||||
{ KEY_J, -1, TARGET_TAB, "Target Target's Target" },
|
||||
{ KEY_TAB, 5, SHIP_TAB, "Afterburner", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_RAPOSTRO, -1, COMPUTER_TAB, true, "Cycle Radar Range" },
|
||||
{ KEY_C, -1, COMPUTER_TAB, true, "Communications Menu" },
|
||||
{ -1, -1, -1, true, "Show Objectives" },
|
||||
{ KEY_ALTED | KEY_J, -1, COMPUTER_TAB, true, "Enter Subspace (End Mission)" },
|
||||
{ KEY_J, -1, TARGET_TAB, true, "Target Target's Target" },
|
||||
{ KEY_TAB, 5, SHIP_TAB, true, "Afterburner", CC_TYPE_CONTINUOUS },
|
||||
|
||||
{ KEY_INSERT, -1, COMPUTER_TAB, "Increase Weapon Energy" },
|
||||
{ KEY_DELETE, -1, COMPUTER_TAB, "Decrease Weapon Energy" },
|
||||
{ KEY_HOME, -1, COMPUTER_TAB, "Increase Shield Energy" },
|
||||
{ KEY_END, -1, COMPUTER_TAB, "Decrease Shield Energy" },
|
||||
{ KEY_PAGEUP, -1, COMPUTER_TAB, "Increase Engine Energy" },
|
||||
{ KEY_PAGEDOWN, -1, COMPUTER_TAB, "Decrease Engine Energy" },
|
||||
{ KEY_ALTED | KEY_D, -1, COMPUTER_TAB, "Equalize Energy Settings" },
|
||||
{ KEY_INSERT, -1, COMPUTER_TAB, true, "Increase Weapon Energy" },
|
||||
{ KEY_DELETE, -1, COMPUTER_TAB, true, "Decrease Weapon Energy" },
|
||||
{ KEY_HOME, -1, COMPUTER_TAB, true, "Increase Shield Energy" },
|
||||
{ KEY_END, -1, COMPUTER_TAB, true, "Decrease Shield Energy" },
|
||||
{ KEY_PAGEUP, -1, COMPUTER_TAB, true, "Increase Engine Energy" },
|
||||
{ KEY_PAGEDOWN, -1, COMPUTER_TAB, true, "Decrease Engine Energy" },
|
||||
{ KEY_ALTED | KEY_D, -1, COMPUTER_TAB, true, "Equalize Energy Settings" },
|
||||
|
||||
{ KEY_Q, 7, COMPUTER_TAB, "Equalize Shield" },
|
||||
{ KEY_UP, -1, COMPUTER_TAB, "Augment Forward Shield" },
|
||||
{ KEY_DOWN, -1, COMPUTER_TAB, "Augment Rear Shield" },
|
||||
{ KEY_LEFT, -1, COMPUTER_TAB, "Augment Left Shield" },
|
||||
{ KEY_RIGHT, -1, COMPUTER_TAB, "Augment Right Shield" },
|
||||
{ KEY_SCROLLOCK, -1, COMPUTER_TAB, "Transfer Energy Laser->Shield" },
|
||||
{ KEY_SHIFTED | KEY_SCROLLOCK, -1, COMPUTER_TAB, "Transfer Energy Shield->Laser" },
|
||||
{ -1, -1, -1, "Show Damage Popup Window" },
|
||||
{ KEY_Q, 7, COMPUTER_TAB, true, "Equalize Shield" },
|
||||
{ KEY_UP, -1, COMPUTER_TAB, true, "Augment Forward Shield" },
|
||||
{ KEY_DOWN, -1, COMPUTER_TAB, true, "Augment Rear Shield" },
|
||||
{ KEY_LEFT, -1, COMPUTER_TAB, true, "Augment Left Shield" },
|
||||
{ KEY_RIGHT, -1, COMPUTER_TAB, true, "Augment Right Shield" },
|
||||
{ KEY_SCROLLOCK, -1, COMPUTER_TAB, true, "Transfer Energy Laser->Shield" },
|
||||
{ KEY_SHIFTED | KEY_SCROLLOCK, -1, COMPUTER_TAB, true, "Transfer Energy Shield->Laser" },
|
||||
{ -1, -1, -1, true, "Show Damage Popup Window" },
|
||||
|
||||
{ -1, -1, SHIP_TAB, "Bank When Pressed", CC_TYPE_CONTINUOUS },
|
||||
{ -1, -1, -1, "Show NavMap" },
|
||||
{ KEY_ALTED | KEY_E, -1, COMPUTER_TAB, "Add or Remove Escort" },
|
||||
{ KEY_ALTED | KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, "Clear Escort List" },
|
||||
{ KEY_E, -1, TARGET_TAB, "Target Next Escort Ship" },
|
||||
{ KEY_ALTED | KEY_R, -1, TARGET_TAB, "Target Closest Repair Ship" },
|
||||
{ -1, -1, SHIP_TAB, true, "Bank When Pressed", CC_TYPE_CONTINUOUS },
|
||||
{ -1, -1, -1, true, "Show NavMap" },
|
||||
{ KEY_ALTED | KEY_E, -1, COMPUTER_TAB, true, "Add or Remove Escort" },
|
||||
{ KEY_ALTED | KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, true, "Clear Escort List" },
|
||||
{ KEY_E, -1, TARGET_TAB, true, "Target Next Escort Ship" },
|
||||
{ KEY_ALTED | KEY_R, -1, TARGET_TAB, true, "Target Closest Repair Ship" },
|
||||
|
||||
{ KEY_U, -1, TARGET_TAB, "Target Next Uninspected Cargo" },
|
||||
{ KEY_SHIFTED | KEY_U, -1, TARGET_TAB, "Target Previous Uninspected Cargo" },
|
||||
{ KEY_N, -1, TARGET_TAB, "Target Newest Ship In Area" },
|
||||
{ KEY_K, -1, TARGET_TAB, "Target Next Live Turret" },
|
||||
{ KEY_SHIFTED | KEY_K, -1, TARGET_TAB, "Target Previous Live Turret" },
|
||||
{ KEY_U, -1, TARGET_TAB, true, "Target Next Uninspected Cargo" },
|
||||
{ KEY_SHIFTED | KEY_U, -1, TARGET_TAB, true, "Target Previous Uninspected Cargo" },
|
||||
{ KEY_N, -1, TARGET_TAB, true, "Target Newest Ship In Area" },
|
||||
{ KEY_K, -1, TARGET_TAB, true, "Target Next Live Turret" },
|
||||
{ KEY_SHIFTED | KEY_K, -1, TARGET_TAB, true, "Target Previous Live Turret" },
|
||||
|
||||
{ KEY_B, -1, TARGET_TAB, "Target Next Hostile Bomb or Bomber" },
|
||||
{ KEY_SHIFTED | KEY_B, -1, TARGET_TAB, "Target Previous Hostile Bomb or Bomber" },
|
||||
{ KEY_B, -1, TARGET_TAB, true, "Target Next Hostile Bomb or Bomber" },
|
||||
{ KEY_SHIFTED | KEY_B, -1, TARGET_TAB, true, "Target Previous Hostile Bomb or Bomber" },
|
||||
|
||||
// multiplayer messaging keys
|
||||
{ KEY_1, -1, COMPUTER_TAB, "(Multiplayer) Message All", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_2, -1, COMPUTER_TAB, "(Multiplayer) Message Friendly", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_3, -1, COMPUTER_TAB, "(Multiplayer) Message Hostile", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_4, -1, COMPUTER_TAB, "(Multiplayer) Message Target", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_ALTED | KEY_X, -1, COMPUTER_TAB, "(Multiplayer) Observer zoom to target"},
|
||||
{ KEY_1, -1, COMPUTER_TAB, true, "(Multiplayer) Message All", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_2, -1, COMPUTER_TAB, true, "(Multiplayer) Message Friendly", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_3, -1, COMPUTER_TAB, true, "(Multiplayer) Message Hostile", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_4, -1, COMPUTER_TAB, true, "(Multiplayer) Message Target", CC_TYPE_CONTINUOUS },
|
||||
{ KEY_ALTED | KEY_X, -1, COMPUTER_TAB, true, "(Multiplayer) Observer zoom to target"},
|
||||
|
||||
{ KEY_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, "Increase time compression" },
|
||||
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, "Decrease time compression" },
|
||||
{ KEY_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, true, "Increase time compression" },
|
||||
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, true, "Decrease time compression" },
|
||||
|
||||
{ KEY_L, -1, COMPUTER_TAB, "Toggle high HUD contrast" },
|
||||
{ KEY_L, -1, COMPUTER_TAB, true, "Toggle high HUD contrast" },
|
||||
|
||||
{ KEY_SHIFTED | KEY_N, -1, COMPUTER_TAB, "(Multiplayer) Toggle network info"},
|
||||
{ KEY_SHIFTED | KEY_END, -1, COMPUTER_TAB, "(Multiplayer) Self destruct"},
|
||||
{ KEY_SHIFTED | KEY_N, -1, COMPUTER_TAB, true, "(Multiplayer) Toggle network info"},
|
||||
{ KEY_SHIFTED | KEY_END, -1, COMPUTER_TAB, true, "(Multiplayer) Self destruct"},
|
||||
|
||||
// Misc
|
||||
{ KEY_SHIFTED | KEY_O, -1, COMPUTER_TAB, "Toggle HUD"},
|
||||
{ KEY_SHIFTED | KEY_3, -1, SHIP_TAB, "Right Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_SHIFTED | KEY_1, -1, SHIP_TAB, "Left Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, "Up Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, "Down Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, "Toggle HUD Wireframe Targetbox"},
|
||||
{ KEY_SHIFTED | KEY_O, -1, COMPUTER_TAB, true, "Toggle HUD"},
|
||||
{ KEY_SHIFTED | KEY_3, -1, SHIP_TAB, true, "Right Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_SHIFTED | KEY_1, -1, SHIP_TAB, true, "Left Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, true, "Up Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, true, "Down Thrust", CC_TYPE_CONTINUOUS},
|
||||
{ KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, true, "Toggle HUD Wireframe Targetbox"},
|
||||
|
||||
#if defined(ENABLE_AUTO_PILOT)
|
||||
// Auto Navigation Systen
|
||||
{ KEY_ALTED | KEY_A, -1, COMPUTER_TAB, "Toggle Auto Pilot"},
|
||||
{ KEY_ALTED | KEY_N, -1, COMPUTER_TAB, "Cycle Nav Points"},
|
||||
{ KEY_ALTED | KEY_A, -1, COMPUTER_TAB, false, "Toggle Auto Pilot"},
|
||||
{ KEY_ALTED | KEY_N, -1, COMPUTER_TAB, false, "Cycle Nav Points"},
|
||||
#endif
|
||||
|
||||
{ -1, -1, -1, "" }
|
||||
{ -1, -1, -1, false, "" }
|
||||
};
|
||||
|
||||
char *Scan_code_text_german[] = {
|
||||
|
||||
@@ -9,16 +9,22 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.cpp $
|
||||
* $Revision: 2.11 $
|
||||
* $Date: 2004-04-26 13:11:11 $
|
||||
* $Author: taylor $
|
||||
* $Revision: 2.11 $
|
||||
* $Date: 2004-04-26 13:11:11 $
|
||||
* $Author: taylor $
|
||||
* $Revision: 2.13 $
|
||||
* $Date: 2004-07-26 20:47:26 $
|
||||
* $Author: Kazan $
|
||||
* $Revision: 2.13 $
|
||||
* $Date: 2004-07-26 20:47:26 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for the cutscenes viewer screen
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.12 2004/07/12 16:32:43 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.11 2004/04/26 13:11:11 taylor
|
||||
* mark view cutscenes ignoring extension and file case
|
||||
*
|
||||
* Revision 2.10 2004/03/05 09:01:58 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
@@ -219,6 +225,7 @@
|
||||
#include "localization/localize.h"
|
||||
#include "parse/parselo.h"
|
||||
|
||||
|
||||
char *Cutscene_bitmap_name[GR_NUM_RESOLUTIONS] = {
|
||||
"ViewFootage",
|
||||
"2_ViewFootage"
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-03-05 09:01:58 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-08-11 05:06:20 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for the cutscenes viewer screen
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.2 2004/03/05 09:01:58 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -53,6 +57,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
|
||||
#define _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
|
||||
|
||||
|
||||
@@ -9,13 +9,22 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/cutscene/movie.cpp $
|
||||
* $Revision: 2.20 $
|
||||
* $Date: 2004-04-26 13:09:20 $
|
||||
* $Revision: 2.23 $
|
||||
* $Date: 2004-11-27 10:42:18 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* movie player code
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.22 2004/07/26 20:47:26 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.21 2004/07/12 16:32:43 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.20 2004/04/26 13:09:20 taylor
|
||||
* cvs log header, mark cutscenes viewable for later, gr_flip() to fix OGL white flash
|
||||
*
|
||||
*
|
||||
*
|
||||
* $NoKeywords: $
|
||||
@@ -32,6 +41,8 @@
|
||||
#include "cutscene/cutscenes.h" // cutscene_mark_viewable()
|
||||
#include "freespace2/freespace.h" // for Game_mode, etc.
|
||||
|
||||
|
||||
|
||||
// This module links freespace movie calls to the actual API calls the play the movie.
|
||||
// This module handles all the different requires of OS and gfx API and finding the file to play
|
||||
#ifdef _WIN32
|
||||
@@ -101,12 +112,6 @@ bool movie_play(char *name)
|
||||
cutscene_mark_viewable(name);
|
||||
}
|
||||
|
||||
// reset the gr_* stuff before trying to play a movie
|
||||
// fixes white flash in OGL and possibly other wierd stuff
|
||||
gr_reset_clip();
|
||||
gr_clear();
|
||||
gr_flip();
|
||||
|
||||
extern int Is_standalone;
|
||||
if(Is_standalone) return false;
|
||||
if(Cmdline_dnoshowvid) return false;
|
||||
@@ -132,9 +137,13 @@ bool movie_play(char *name)
|
||||
GlobalD3DVars::D3D_activate = 0;
|
||||
GlobalD3DVars::lpD3DDevice->EndScene();
|
||||
GlobalD3DVars::lpD3DDevice->Present(NULL,NULL,NULL,NULL);
|
||||
d3d_lost_device();
|
||||
// d3d_lost_device();
|
||||
}
|
||||
|
||||
// reset the gr_* stuff before trying to play a movie
|
||||
gr_flip(); // in the case of D3D this should recover the device
|
||||
gr_clear();
|
||||
|
||||
// This clears the screen
|
||||
InvalidateRect((HWND) os_get_window(), NULL, TRUE);
|
||||
PAINTSTRUCT paint_info;
|
||||
@@ -217,7 +226,11 @@ bool movie_play(char *name)
|
||||
|
||||
// We finished playing the movie
|
||||
CloseClip((HWND) os_get_window());
|
||||
GlobalD3DVars::D3D_activate = 1;
|
||||
|
||||
if (gr_screen.mode == GR_DIRECT3D) {
|
||||
GlobalD3DVars::D3D_activate = 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef _MOVIE_HEADER_FILE
|
||||
#define _MOVIE_HEADER_FILE
|
||||
|
||||
|
||||
+128
-107
@@ -1,142 +1,172 @@
|
||||
#include "ddsutils/ddsutils.h"
|
||||
#include "cfile/cfile.h"
|
||||
|
||||
|
||||
|
||||
int Texture_compression_enabled=0;
|
||||
|
||||
static int dds_read_header_internal(LPDDSURFACEDESC2 lpddsd, char *filename, int *width, int *height, int *bpp, int *compression_type, int *levels)
|
||||
|
||||
int dds_read_header(char *filename, CFILE *img_cfp, int *width, int *height, int *bpp, int *compression_type, int *levels, int *size)
|
||||
{
|
||||
DDSURFACEDESC2 dds_header;
|
||||
char code[5];
|
||||
CFILE *ddsfile;
|
||||
char real_name[MAX_FILENAME_LEN];
|
||||
char *p;
|
||||
int retval=DDS_ERROR_NONE;
|
||||
int ct;
|
||||
int bits=0;
|
||||
int retval = DDS_ERROR_NONE;
|
||||
int ct = DDS_UNCOMPRESSED;
|
||||
int bits = 0;
|
||||
|
||||
//this better not happen.. ever
|
||||
Assert(filename!=NULL);
|
||||
if (img_cfp == NULL) {
|
||||
// this better not happen.. ever
|
||||
Assert(filename != NULL);
|
||||
|
||||
//make sure there is an extension
|
||||
strcpy(real_name, filename);
|
||||
p=strchr(real_name, '.');
|
||||
if (p) *p=0;
|
||||
strcat(real_name, ".dds");
|
||||
// make sure there is an extension
|
||||
strcpy(real_name, filename);
|
||||
char *p = strchr(real_name, '.');
|
||||
if (p) { *p=0; }
|
||||
strcat(real_name, ".dds");
|
||||
|
||||
memset(code,0,sizeof(code));
|
||||
//try to open the file
|
||||
ddsfile = cfopen(real_name, "rb");
|
||||
// try to open the file
|
||||
ddsfile = cfopen(real_name, "rb");
|
||||
|
||||
//file not found
|
||||
if (!ddsfile)
|
||||
{
|
||||
return DDS_ERROR_INVALID_FILENAME;
|
||||
// file not found
|
||||
if (ddsfile == NULL)
|
||||
return DDS_ERROR_INVALID_FILENAME;
|
||||
} else {
|
||||
ddsfile = img_cfp;
|
||||
}
|
||||
|
||||
//read the code
|
||||
cfread(code,1,4,ddsfile);
|
||||
code[4]=0;
|
||||
memset(code, 0, sizeof(code));
|
||||
|
||||
//check it
|
||||
if (strncmp(code,DDS_FILECODE,4)!=0)
|
||||
{
|
||||
|
||||
// read the code
|
||||
cfread(code, 1, 4, ddsfile);
|
||||
code[4] = 0;
|
||||
|
||||
// check it
|
||||
if (strncmp(code, DDS_FILECODE, 4) != 0)
|
||||
return DDS_ERROR_BAD_HEADER;
|
||||
|
||||
// read the header
|
||||
cfread(&dds_header, sizeof(DDSURFACEDESC2), 1, ddsfile);
|
||||
|
||||
// calculate the type and size of the data
|
||||
if (dds_header.ddpfPixelFormat.dwFlags & DDPF_FOURCC) {
|
||||
*size = dds_header.dwMipMapCount > 1 ? dds_header.dwPitchOrLinearSize * 2 : dds_header.dwPitchOrLinearSize;
|
||||
|
||||
switch (dds_header.ddpfPixelFormat.dwFourCC) {
|
||||
case FOURCC_DXT1:
|
||||
bits=24;
|
||||
ct=DDS_DXT1;
|
||||
break;
|
||||
|
||||
case FOURCC_DXT3:
|
||||
bits=32;
|
||||
ct=DDS_DXT3;
|
||||
break;
|
||||
|
||||
case FOURCC_DXT5:
|
||||
bits=32;
|
||||
ct=DDS_DXT5;
|
||||
break;
|
||||
|
||||
// dxt2 and dxt4 aren't supported
|
||||
case FOURCC_DXT2:
|
||||
case FOURCC_DXT4:
|
||||
retval = DDS_ERROR_INVALID_FORMAT;
|
||||
ct = DDS_DXT_INVALID;
|
||||
break;
|
||||
|
||||
// none of the above
|
||||
default:
|
||||
retval = DDS_ERROR_UNSUPPORTED;
|
||||
ct = DDS_DXT_INVALID;
|
||||
break;
|
||||
}
|
||||
} else if (dds_header.ddpfPixelFormat.dwFlags & DDPF_RGB) {
|
||||
if (dds_header.dwDepth == 0)
|
||||
dds_header.dwDepth = 1;
|
||||
|
||||
*size = dds_header.dwWidth * dds_header.dwHeight * dds_header.dwDepth * (dds_header.ddpfPixelFormat.dwRGBBitCount / 8);
|
||||
|
||||
bits = dds_header.ddpfPixelFormat.dwRGBBitCount;
|
||||
ct = DDS_UNCOMPRESSED;
|
||||
} else {
|
||||
// it's not a readable format
|
||||
retval = DDS_ERROR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//read the header
|
||||
cfread(lpddsd,sizeof(DDSURFACEDESC2),1,ddsfile);
|
||||
// stuff important info
|
||||
if (bpp)
|
||||
*bpp = bits;
|
||||
|
||||
if (compression_type)
|
||||
*compression_type = ct;
|
||||
|
||||
//stuff important info
|
||||
if (width)
|
||||
*width = lpddsd->dwWidth;
|
||||
*width = dds_header.dwWidth;
|
||||
|
||||
if (height)
|
||||
*height = lpddsd->dwHeight;
|
||||
*height = dds_header.dwHeight;
|
||||
|
||||
if (levels)
|
||||
*levels = lpddsd->dwMipMapCount;
|
||||
*levels = dds_header.dwMipMapCount;
|
||||
|
||||
switch(lpddsd->ddpfPixelFormat.dwFourCC)
|
||||
{
|
||||
case FOURCC_DXT1:
|
||||
bits=24;
|
||||
ct=DDS_DXT1;
|
||||
break;
|
||||
|
||||
case FOURCC_DXT3:
|
||||
bits=32;
|
||||
ct=DDS_DXT3;
|
||||
break;
|
||||
|
||||
case FOURCC_DXT5:
|
||||
bits=32;
|
||||
ct=DDS_DXT5;
|
||||
break;
|
||||
|
||||
//dxt2 and dxt4 aren't supported
|
||||
case FOURCC_DXT2:
|
||||
case FOURCC_DXT4:
|
||||
retval=DDS_ERROR_INVALID_FORMAT;
|
||||
ct=DDS_DXT_INVALID;
|
||||
break;
|
||||
|
||||
//none of the above
|
||||
default:
|
||||
retval=DDS_ERROR_UNCOMPRESSED;
|
||||
ct=DDS_DXT_INVALID;
|
||||
break;
|
||||
if (img_cfp == NULL) {
|
||||
// close file and return
|
||||
cfclose(ddsfile);
|
||||
ddsfile = NULL;
|
||||
}
|
||||
|
||||
if (bpp) *bpp=bits;
|
||||
if (compression_type) *compression_type=ct;
|
||||
|
||||
//close file and return
|
||||
cfclose(ddsfile);
|
||||
return retval;
|
||||
}
|
||||
|
||||
int dds_read_header(char *filename, int *width, int *height, int *bpp, int *compression_type, int *levels)
|
||||
{
|
||||
DDSURFACEDESC2 ddsd;
|
||||
return dds_read_header_internal(&ddsd, filename, width, height, bpp, compression_type, levels);
|
||||
}
|
||||
|
||||
//reads pixel info from a dds file
|
||||
int dds_read_bitmap(char *filename, int *size, uint* data)
|
||||
int dds_read_bitmap(char *filename, ubyte **data, ubyte *bpp)
|
||||
{
|
||||
int retval;
|
||||
DDSURFACEDESC2 ddsd;
|
||||
int w,h,ct,lvl,bpp;
|
||||
int w,h,ct,lvl;
|
||||
int size = 0, bits = 0;
|
||||
CFILE *cfp;
|
||||
ubyte* tmp;
|
||||
char real_name[MAX_FILENAME_LEN];
|
||||
|
||||
//this must be set
|
||||
Assert(size!=NULL);
|
||||
|
||||
//read the header -- if its at this stage, it should be legal.
|
||||
retval=dds_read_header_internal(&ddsd, filename, &w, &h, &bpp, &ct, &lvl);
|
||||
Assert(retval==DDS_ERROR_NONE);
|
||||
// this better not happen.. ever
|
||||
Assert(filename != NULL);
|
||||
|
||||
//get some more info from the surface
|
||||
*size=ddsd.dwMipMapCount > 1 ? ddsd.dwLinearSize * 2 : ddsd.dwLinearSize;
|
||||
// make sure there is an extension
|
||||
strcpy(real_name, filename);
|
||||
char *p = strchr(real_name, '.');
|
||||
if (p) { *p = 0; }
|
||||
strcat(real_name, ".dds");
|
||||
|
||||
//open it up and go to the data section
|
||||
cfp=cfopen(filename,"rb");
|
||||
cfseek(cfp,DDS_OFFSET, CF_SEEK_SET);
|
||||
// open it up and go to the data section
|
||||
cfp = cfopen(real_name, "rb");
|
||||
|
||||
//get the data
|
||||
tmp=(ubyte*)malloc(*size);
|
||||
|
||||
if (!tmp)
|
||||
{
|
||||
cfclose(cfp);
|
||||
return DDS_ERROR_NO_MEM; //barf
|
||||
// just in case
|
||||
if (cfp == NULL)
|
||||
return DDS_ERROR_INVALID_FILENAME;
|
||||
|
||||
// read the header -- if its at this stage, it should be legal.
|
||||
retval = dds_read_header(real_name, cfp, &w, &h, &bits, &ct, &lvl, &size);
|
||||
|
||||
Assert(retval == DDS_ERROR_NONE);
|
||||
|
||||
// this really shouldn't be needed but better safe than sorry
|
||||
if (retval != DDS_ERROR_NONE) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
cfread(tmp,1,*size,cfp);
|
||||
cfseek(cfp, DDS_OFFSET, CF_SEEK_SET);
|
||||
|
||||
*data=(uint)tmp;
|
||||
//we look done here
|
||||
// read in the data
|
||||
cfread(*data, 1, size, cfp);
|
||||
|
||||
if (bpp)
|
||||
*bpp = (ubyte)bits;
|
||||
|
||||
// we look done here
|
||||
cfclose(cfp);
|
||||
|
||||
return DDS_ERROR_NONE;
|
||||
}
|
||||
|
||||
@@ -160,8 +190,8 @@ const char *dds_error_string(int code)
|
||||
case DDS_ERROR_INVALID_FORMAT:
|
||||
return "File was compressed, but it was DXT2 or DXT4";
|
||||
|
||||
case DDS_ERROR_UNCOMPRESSED:
|
||||
return "*.DDS files must be compressed and use DXT1, DXT3, or DXT5 compression";
|
||||
case DDS_ERROR_UNSUPPORTED:
|
||||
return "*.DDS files must be uncompressed or use DXT1, DXT3, or DXT5 compression";
|
||||
|
||||
default:
|
||||
return "Abort, retry, fail?";
|
||||
@@ -170,12 +200,3 @@ const char *dds_error_string(int code)
|
||||
//get a warning otherwise
|
||||
return "Abort, retry, fail?";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,18 +4,24 @@
|
||||
#ifndef __DDS_H
|
||||
#define __DDS_H
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#include "globalincs/pstypes.h"
|
||||
#ifdef _WIN32
|
||||
#include "directx/vddraw.h"
|
||||
#endif
|
||||
|
||||
struct CFILE;
|
||||
|
||||
#define DDS_ERROR_NONE 0 //everything went fine
|
||||
#define DDS_ERROR_INVALID_FILENAME 1 //bad filename
|
||||
#define DDS_ERROR_NO_MEM 2 //not enough mem to load
|
||||
#define DDS_ERROR_UNCOMPRESSED 3 //not using dxtc compression
|
||||
#define DDS_ERROR_UNSUPPORTED 3 //not a readable format
|
||||
#define DDS_ERROR_INVALID_FORMAT 4 //can only use dxtc1, dxtc3, dxtc5
|
||||
#define DDS_ERROR_BAD_HEADER 5 //header was not "DDS "
|
||||
|
||||
|
||||
#define DDS_DXT_INVALID -1
|
||||
#define DDS_UNCOMPRESSED 0
|
||||
#define DDS_DXT1 1
|
||||
#define DDS_DXT3 3
|
||||
#define DDS_DXT5 5
|
||||
@@ -43,18 +49,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//these structures are the headers for a dds file
|
||||
typedef struct _DDSCAPS2
|
||||
{
|
||||
DWORD dwCaps; // capabilities of surface wanted
|
||||
DWORD dwCaps2;
|
||||
DWORD dwCaps3;
|
||||
union
|
||||
{
|
||||
DWORD dwCaps4;
|
||||
DWORD dwVolumeDepth;
|
||||
} DUMMYUNIONNAMEN(1);
|
||||
DWORD dwCaps1;
|
||||
DWORD dwCaps2;
|
||||
DWORD Reserved[2];
|
||||
} DDSCAPS2;
|
||||
|
||||
typedef struct _DDSURFACEDESC2
|
||||
@@ -63,41 +63,13 @@ typedef struct _DDSURFACEDESC2
|
||||
DWORD dwFlags; // determines what fields are valid
|
||||
DWORD dwHeight; // height of surface to be created
|
||||
DWORD dwWidth; // width of input surface
|
||||
union
|
||||
{
|
||||
LONG lPitch; // distance to start of next line (return value only)
|
||||
DWORD dwLinearSize; // Formless late-allocated optimized surface size
|
||||
} DUMMYUNIONNAMEN(1);
|
||||
union
|
||||
{
|
||||
DWORD dwBackBufferCount; // number of back buffers requested
|
||||
DWORD dwDepth; // the depth if this is a volume texture
|
||||
} DUMMYUNIONNAMEN(5);
|
||||
union
|
||||
{
|
||||
DWORD dwMipMapCount; // number of mip-map levels requestde
|
||||
// dwZBufferBitDepth removed, use ddpfPixelFormat one instead
|
||||
DWORD dwRefreshRate; // refresh rate (used when display mode is described)
|
||||
DWORD dwSrcVBHandle; // The source used in VB::Optimize
|
||||
} DUMMYUNIONNAMEN(2);
|
||||
DWORD dwAlphaBitDepth; // depth of alpha buffer requested
|
||||
DWORD dwReserved; // reserved
|
||||
LPVOID lpSurface; // pointer to the associated surface memory
|
||||
union
|
||||
{
|
||||
DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
|
||||
DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces
|
||||
} DUMMYUNIONNAMEN(3);
|
||||
DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
|
||||
DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
|
||||
DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
|
||||
union
|
||||
{
|
||||
DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
|
||||
DWORD dwFVF; // vertex format description of vertex buffers
|
||||
} DUMMYUNIONNAMEN(4);
|
||||
DWORD dwPitchOrLinearSize;
|
||||
DWORD dwDepth;
|
||||
DWORD dwMipMapCount;
|
||||
DWORD dwReserved1[11];
|
||||
DDPIXELFORMAT ddpfPixelFormat;
|
||||
DDSCAPS2 ddsCaps; // direct draw surface capabilities
|
||||
DWORD dwTextureStage; // stage in multitexture cascade
|
||||
DWORD dwReserved2;
|
||||
} DDSURFACEDESC2, FAR* LPDDSURFACEDESC2;
|
||||
|
||||
#define DDS_OFFSET 4+sizeof(DDSURFACEDESC2) //place where the data starts -- should be 128
|
||||
@@ -105,11 +77,11 @@ typedef struct _DDSURFACEDESC2
|
||||
//reads a dds header
|
||||
//returns one of the error values
|
||||
//'compression_type' comes back as one of the DDS_DXTC* defines
|
||||
int dds_read_header(char *filename, int *width, int *height, int *bpp, int *compression_type, int *levels);
|
||||
int dds_read_header(char *filename, CFILE *img_cfp = NULL, int *width = 0, int *height = 0, int *bpp = 0, int *compression_type = 0, int *levels = 0, int *size = 0);
|
||||
|
||||
//reads bitmap
|
||||
//size of the data it stored in size
|
||||
int dds_read_bitmap(char *filename, int *size, uint* data);
|
||||
int dds_read_bitmap(char *filename, ubyte **data, ubyte *bpp);
|
||||
|
||||
//returns a string from a DDS error code
|
||||
const char* dds_error_string(int code);
|
||||
|
||||
@@ -9,13 +9,25 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Debris/Debris.cpp $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.9 $
|
||||
* $Date: 2004-07-26 20:47:26 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for the pieces of exploding object debris.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.8 2004/07/12 16:32:44 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.7 2004/07/01 01:52:20 phreak
|
||||
* function pointer radar update.
|
||||
* will enable us to make different radar styles that we can switch between
|
||||
*
|
||||
* Revision 2.6 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.5 2004/03/05 09:01:59 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
@@ -252,6 +264,7 @@
|
||||
#include "io/timer.h"
|
||||
#include "species_defs/species_defs.h"
|
||||
#include "ship/ship.h"
|
||||
#include "radar/radarsetup.h"
|
||||
|
||||
#ifndef NO_NETWORK
|
||||
#include "network/multi.h"
|
||||
@@ -259,6 +272,9 @@
|
||||
#include "network/multiutil.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define MAX_LIFE 10.0f
|
||||
#define MIN_RADIUS_FOR_PERSISTANT_DEBRIS 50 // ship radius at which debris from it becomes persistant
|
||||
#define DEBRIS_SOUND_DELAY 2000 // time to start debris sound after created
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Debris/Debris.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2004-03-05 09:01:59 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-08-11 05:06:20 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code for the pieces of exploding object debris.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2004/03/05 09:01:59 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:21 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -141,6 +145,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _DEBRIS_H
|
||||
#define _DEBRIS_H
|
||||
|
||||
|
||||
@@ -9,13 +9,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/DebugConsole/Console.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-03-05 09:01:58 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-07-26 20:47:27 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Routines for managing the debug console window.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2004/07/12 16:32:44 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.3 2004/03/05 09:01:58 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.2 2003/03/18 10:07:01 unknownplayer
|
||||
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
|
||||
*
|
||||
@@ -124,6 +131,7 @@
|
||||
#include "osapi/osapi.h"
|
||||
#include "debugconsole/dbugfile.h"
|
||||
|
||||
|
||||
#define MAX_COMMANDS 300
|
||||
|
||||
static int Num_debug_commands = 0;
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "dbugfile.h"
|
||||
|
||||
|
||||
|
||||
#pragma warning(disable:4711) // function selected for inlining
|
||||
|
||||
int dbugfile_counters[MAX_COUNTERS];
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef _DBUGFILE_HEADER_
|
||||
#define _DBUGFILE_HEADER_
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "timerbar.h"
|
||||
#include "globalincs\pstypes.h"
|
||||
|
||||
|
||||
// Internal structure for handling frame data
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -8,11 +8,18 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/debugconsole/timerbar.h $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2004-02-16 11:47:31 $
|
||||
* $Author: randomtiger $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2004-08-11 05:06:20 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.8 2004/02/16 11:47:31 randomtiger
|
||||
* Removed a lot of files that we dont need anymore.
|
||||
* Changed htl to be on by default, command now -nohtl
|
||||
* Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system.
|
||||
* Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing.
|
||||
* Removed old dshow code and took away timerbar compile flag condition since it uses a runtime flag now.
|
||||
*
|
||||
* Revision 1.7 2003/11/19 20:37:23 randomtiger
|
||||
* Almost fully working 32 bit pcx, use -pcx32 flag to activate.
|
||||
* Made some commandline variables fit the naming standard.
|
||||
@@ -43,6 +50,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _TIMERBAR_HEADER_
|
||||
#define _TIMERBAR_HEADER_
|
||||
|
||||
|
||||
+1788
-441
File diff suppressed because it is too large.
Load diff
@@ -1,14 +1,27 @@
|
||||
//header file for makeing decals-Bobboau
|
||||
//header file for making decals-Bobboau
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef _DECAL_H
|
||||
#define _DECAL_H
|
||||
|
||||
#define MAX_DECAL_POLY 20
|
||||
|
||||
#include "object/object.h"
|
||||
|
||||
//#define DECALS_ENABLED
|
||||
|
||||
#define MAX_DECAL_POLY 40
|
||||
#define MAX_DECAL_POLY_POINT 10
|
||||
#define MAX_DECAL_DEFPOINTS 1000
|
||||
#define MAX_DECAL_DEFPOINTS 10000
|
||||
#define MAX_DECAL_POINT 10
|
||||
#define MAX_SHIP_DECALS 25
|
||||
#define MAX_GLOBAL_DECAL_POLYS 11000
|
||||
#define QUICKFIND_SUBDIVISION 100
|
||||
#define QUICKFIND_SEGMENT_LENGTH (MAX_GLOBAL_DECAL_POLYS/QUICKFIND_SUBDIVISION)
|
||||
#define MAX_GLOBAL_DECALS 5000
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
//#include "ship/ship.h"
|
||||
|
||||
#define DP_EOF 0
|
||||
#define DP_DEFPOINTS 1
|
||||
@@ -17,63 +30,82 @@
|
||||
#define DP_SORTNORM 4
|
||||
#define DP_BOUNDBOX 5
|
||||
|
||||
typedef struct decal_model{ //this will store a triangulated version of the ships polygons
|
||||
struct{
|
||||
int point[3]; //an index to the vert list-Bobboau
|
||||
vector center; //the center of the poly
|
||||
float radius; //the max radius of the poly
|
||||
}poly[MAX_DECAL_POLY];
|
||||
vector vert[MAX_DECAL_DEFPOINTS]; //the defpoints-Bobboau
|
||||
int n_polys;
|
||||
}decal_model;
|
||||
struct decal;
|
||||
struct decal_list;
|
||||
struct decal_list_controle;
|
||||
|
||||
//extern decal_model d_model;
|
||||
struct decal_poly{
|
||||
vector norm[3];
|
||||
vertex point[3];
|
||||
decal_poly *next;
|
||||
decal* parent;
|
||||
int idx;
|
||||
};
|
||||
|
||||
typedef struct decal{
|
||||
struct{
|
||||
int backfaced; //flag that this poly uses the backfaced texture
|
||||
uv_pair uv[MAX_DECAL_POLY_POINT]; //uv coordanants
|
||||
int point[MAX_DECAL_POLY_POINT]; //an index to the vert list-Bobboau
|
||||
int n_poly;
|
||||
vector norm; //the normal used for lighting
|
||||
}poly[MAX_DECAL_POLY];
|
||||
vector position;
|
||||
struct decal{
|
||||
int n_poly;
|
||||
int timestamp; //when this decal was created
|
||||
int burn_time; //how long it takes for the glow texture to fade
|
||||
int vertex_buffer_start; //were is the start of this decal's polys in the vertex buffer
|
||||
decal_poly* poly;
|
||||
decal_poly* add_poly();
|
||||
decal_poly* get_last_poly();
|
||||
void remove_last_poly();
|
||||
decal_list_controle *parent;
|
||||
};
|
||||
|
||||
struct decal_list{
|
||||
decal dec;
|
||||
decal_list *next;
|
||||
};
|
||||
|
||||
struct decal_item{
|
||||
decal_list dec;
|
||||
bool used;
|
||||
};
|
||||
|
||||
struct decal_list_controle{
|
||||
int n_decals;
|
||||
int buffer;
|
||||
int texture;
|
||||
int n_poly;
|
||||
int burn_texture;
|
||||
int glow_texture;
|
||||
bool modifyed;
|
||||
decal_list *d_list;
|
||||
decal_list *end;
|
||||
decal_list *add_new();
|
||||
void trim();
|
||||
void clear();
|
||||
~decal_list_controle();
|
||||
decal_list_controle();
|
||||
};
|
||||
|
||||
struct decal_system{
|
||||
decal_list_controle *decals;
|
||||
int n_decal_textures;
|
||||
bool decals_modified;
|
||||
int max_decals;
|
||||
decal_system():decals(NULL),n_decal_textures(0),decals_modified(false){};
|
||||
};
|
||||
|
||||
|
||||
//this is used to give all the data to the generation data to the functions that make them
|
||||
|
||||
struct decal_point{
|
||||
vector pnt;
|
||||
matrix orient;
|
||||
float radius;
|
||||
int submodel_parent; //the submodel this is part of
|
||||
vector vert[1000]; //the defpoints-Bobboau
|
||||
int frames; //number of frames in an animation
|
||||
int fps; //frames per second
|
||||
int starting_keyframe; //the frame that indicates the end of the inital nonlooped portion and the start of the middle looped part
|
||||
int ending_keyframe; //the frame that indicates the end of the loopable portion and the start of the end part
|
||||
int texture; //the texture to be used, first in animation
|
||||
int backfaced_texture; //the texture to be used by backfaced polys, first in animation
|
||||
int is_valid; //this means it is a good decal that should be rendered-Bobboau
|
||||
int n_poly; //the number of polys
|
||||
int timestamp; //this is when the decal was made-Bobboau
|
||||
int lifetime; //this is how long the decal should be alive for-Bobboau
|
||||
int importance; //this is for big things large beam marks and bomb craters should last longer than the odd laser impacts-Bobboau
|
||||
int state; //1 starting, 2 looping(mostly for beams), 3 ending, 4 static
|
||||
}decal;
|
||||
};
|
||||
|
||||
typedef struct decal_point{
|
||||
vector pnt;
|
||||
matrix orient;
|
||||
float radius;
|
||||
}decal_point;
|
||||
|
||||
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1);//makes the decal
|
||||
|
||||
#endif
|
||||
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1, int glow_texture = -1, int burn_texture = -1, int burn_time = 1000);//makes the decal
|
||||
|
||||
int decal_create_simple(object * obj, decal_point *point, int texture);//makes a simple non-clipped decal
|
||||
|
||||
void decal_render_all(object * obj); //renders all decals
|
||||
|
||||
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture);//makes the decal
|
||||
|
||||
int decal_create_sub(void *model_ptr);
|
||||
|
||||
/*
|
||||
void clear_decals(decal_system *system);
|
||||
|
||||
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
|
||||
*/
|
||||
#endif
|
||||
@@ -9,12 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Demo/Demo.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-03-05 09:01:59 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-07-26 20:47:27 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2004/07/12 16:32:45 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.3 2004/03/05 09:01:59 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.2 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -64,6 +71,8 @@
|
||||
#include "ship/shiphit.h"
|
||||
#include "cfile/cfile.h"
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------------------
|
||||
// DEMO DEFINES/VARS
|
||||
//
|
||||
|
||||
@@ -9,12 +9,15 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Demo/Demo.h $
|
||||
* $Revision: 2.0 $
|
||||
* $Date: 2002-06-03 04:02:21 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2004-08-11 05:06:21 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.0 2002/06/03 04:02:21 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
* Revision 1.1 2002/05/02 18:03:04 mharris
|
||||
* Initial checkin - converted filenames and includes to lower case
|
||||
*
|
||||
@@ -31,6 +34,8 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef _FS2_DEMO_SYSTEM_HEADER_FILE
|
||||
#define _FS2_DEMO_SYSTEM_HEADER_FILE
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
//#include <atlbase.h> // No dependecy on ATL!!!
|
||||
|
||||
|
||||
|
||||
enum PLAYSTATE {Stopped, Paused, Running, Init};
|
||||
@@ -93,7 +94,7 @@ BOOL IsAudioOnly()
|
||||
|
||||
HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
// USES_CONVERSION;
|
||||
WCHAR wFile[MAX_PATH];
|
||||
HRESULT hr;
|
||||
|
||||
@@ -101,7 +102,8 @@ HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
|
||||
UpdateWindow(ghApp);
|
||||
|
||||
// Convert filename to wide character string
|
||||
wcscpy(wFile, T2W(szFile));
|
||||
// wcscpy(wFile, T2W(szFile)); // requires ATL
|
||||
swprintf(wFile, L"%s", szFile); // Uses libc to convert instead
|
||||
|
||||
// Get the interface for DirectShow's GraphBuilder
|
||||
JIF(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef _DX8SHOW_HEADER_FILE
|
||||
#define _DX8SHOW_HEADER_FILE
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* File: async.h
|
||||
* Content: AsyncData object include file
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __ASYNC_INCLUDED__
|
||||
#define __ASYNC_INCLUDED__
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _D3DTYPES_H_
|
||||
#define _D3DTYPES_H_
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __DDRAW_INCLUDED__
|
||||
#define __DDRAW_INCLUDED__
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __DINPUT_INCLUDED__
|
||||
#define __DINPUT_INCLUDED__
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __DPLAY_INCLUDED__
|
||||
#define __DPLAY_INCLUDED__
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* File: dplobby.h
|
||||
* Content: DirectPlayLobby include file
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __DPLOBBY_INCLUDED__
|
||||
#define __DPLOBBY_INCLUDED__
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* Content: DirectXSetup, error codes and flags
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef __DSETUP_H__
|
||||
#define __DSETUP_H__
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef __DSOUND_INCLUDED__
|
||||
#define __DSOUND_INCLUDED__
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
|
||||
#ifndef __DVP_INCLUDED__
|
||||
#define __DVP_INCLUDED__
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
|
||||
@@ -9,13 +9,21 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.cpp $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2004-07-26 20:47:27 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Main file for dealing with exception handling
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.6 2004/07/12 16:32:45 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.5 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.4 2004/03/06 23:28:22 bobboau
|
||||
* fixed motion debris
|
||||
* animated laser textures
|
||||
@@ -68,6 +76,8 @@ on how to hook it in.
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
#pragma warning(disable:4711) // function selected for inlining
|
||||
|
||||
// --------------------
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.h $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2002-07-07 19:55:58 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-08-11 05:06:22 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Header file for program exception handling
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.1 2002/07/07 19:55:58 penguin
|
||||
* Back-port to MSVC
|
||||
*
|
||||
* Revision 2.0 2002/06/03 04:02:22 penguin
|
||||
* Warpcore CVS sync
|
||||
*
|
||||
@@ -35,6 +38,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifdef _MSC_VER
|
||||
#pragma once // Include this file only once
|
||||
#endif
|
||||
|
||||
@@ -9,13 +9,38 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Fireball/FireBalls.cpp $
|
||||
* $Revision: 2.12 $
|
||||
* $Date: 2004-05-12 22:49:14 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.19 $
|
||||
* $Date: 2004-11-01 20:57:03 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* Code to move, render and otherwise deal with fireballs.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.18 2004/10/31 02:26:15 Goober5000
|
||||
* whoops
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.17 2004/10/31 02:04:33 Goober5000
|
||||
* added Knossos_warp_ani_used flag for taylor
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.16 2004/09/17 07:12:22 Goober5000
|
||||
* changed around the logic for the 3D warp effect
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.15 2004/08/23 04:32:39 Goober5000
|
||||
* warp effect is back to FS2 default
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.14 2004/07/26 20:47:28 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.13 2004/07/12 16:32:45 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.12 2004/05/12 22:49:14 phreak
|
||||
* renamed the warp model variable from 'wm' to 'Warp_model'
|
||||
*
|
||||
* Revision 2.11 2004/03/17 04:07:29 bobboau
|
||||
* new fighter beam code
|
||||
* fixed old after burner trails
|
||||
@@ -388,7 +413,9 @@
|
||||
#include "cmdline/cmdline.h"
|
||||
#include "parse/parselo.h"
|
||||
|
||||
|
||||
int Warp_model;
|
||||
int Knossos_warp_ani_used;
|
||||
|
||||
#define WARPHOLE_GROW_TIME (3.5f) // time for warphole to reach max size (also time to shrink to nothing once it begins to shrink)
|
||||
|
||||
@@ -564,6 +591,9 @@ void fireball_init()
|
||||
Fireballs[i].objnum = -1;
|
||||
}
|
||||
|
||||
// Goober5000 - reset Knossos warp flag
|
||||
Knossos_warp_ani_used = 0;
|
||||
|
||||
mprintf(("loading warp model"));
|
||||
Warp_model = -1;
|
||||
Warp_model = model_load("warp.pof", 0, NULL, 0);
|
||||
@@ -652,7 +682,7 @@ void fireball_render(object * obj)
|
||||
// obj->alt_rad = rad;
|
||||
|
||||
|
||||
warpin_render(obj, &obj->orient, &obj->pos, Fireballs[num].current_bitmap, rad, percent_life, obj->radius, (Fireballs[num].flags & FBF_WARP_FORCE_OLD) );
|
||||
warpin_render(obj, &obj->orient, &obj->pos, Fireballs[num].current_bitmap, rad, percent_life, obj->radius, (Fireballs[num].flags & FBF_WARP_3D) );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1191,7 +1221,11 @@ void fireballs_page_in()
|
||||
for ( i = 0; i < MAX_FIREBALL_TYPES ; i++ ) {
|
||||
fd = &Fireball_info[i];
|
||||
|
||||
for(idx=0; idx<fd->lod_count; idx++){
|
||||
// if this is a Knossos ani, only load if Knossos_warp_ani_used is true
|
||||
if ( (i == FIREBALL_KNOSSOS_EFFECT) && !Knossos_warp_ani_used)
|
||||
continue;
|
||||
|
||||
for(idx=0; idx<fd->lod_count; idx++) {
|
||||
bm_page_in_texture( fd->lod[idx].bitmap_id, fd->lod[idx].num_frames );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,27 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Fireball/FireBalls.h $
|
||||
* $Revision: 2.7 $
|
||||
* $Date: 2004-05-12 22:49:13 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.11 $
|
||||
* $Date: 2004-10-31 02:04:33 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* Prototypes for fireball functions
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.10 2004/09/17 07:12:22 Goober5000
|
||||
* changed around the logic for the 3D warp effect
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.9 2004/08/23 04:32:39 Goober5000
|
||||
* warp effect is back to FS2 default
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.8 2004/08/11 05:06:22 Kazan
|
||||
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
|
||||
*
|
||||
* Revision 2.7 2004/05/12 22:49:13 phreak
|
||||
* renamed the warp model variable from 'wm' to 'Warp_model'
|
||||
*
|
||||
* Revision 2.6 2004/03/17 04:07:29 bobboau
|
||||
* new fighter beam code
|
||||
* fixed old after burner trails
|
||||
@@ -184,6 +198,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _FIREBALLS_H
|
||||
#define _FIREBALLS_H
|
||||
|
||||
@@ -220,7 +235,7 @@ typedef struct fireball_info {
|
||||
#define FBF_WARP_CLOSE_SOUND_PLAYED (1<<0)
|
||||
#define FBF_WARP_CAPITAL_SIZE (1<<1)
|
||||
#define FBF_WARP_CRUISER_SIZE (1<<2)
|
||||
#define FBF_WARP_FORCE_OLD (1<<3) // Goober5000
|
||||
#define FBF_WARP_3D (1<<3) // Goober5000
|
||||
#define FBF_WARP_VIA_SEXP (1<<4) // Goober5000
|
||||
|
||||
typedef struct fireball {
|
||||
@@ -265,9 +280,12 @@ float fireball_lifeleft( object *obj );
|
||||
float fireball_lifeleft_percent( object *obj );
|
||||
|
||||
// internal function to draw warp grid.
|
||||
extern void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int force_old = 0 );
|
||||
extern void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int warp_3d = 0 );
|
||||
extern int Warp_glow_bitmap; // Internal
|
||||
|
||||
extern int Warp_model;
|
||||
|
||||
// Goober5000
|
||||
extern int Knossos_warp_ani_used;
|
||||
|
||||
#endif /* _FIREBALLS_H */
|
||||
@@ -9,13 +9,39 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Fireball/WarpInEffect.cpp $
|
||||
* $Revision: 2.15 $
|
||||
* $Date: 2004-05-12 22:49:13 $
|
||||
* $Author: phreak $
|
||||
* $Revision: 2.22 $
|
||||
* $Date: 2004-11-23 19:29:13 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* Code for rendering the warp in effects for ships
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.21 2004/09/17 07:12:22 Goober5000
|
||||
* changed around the logic for the 3D warp effect
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.20 2004/08/23 04:32:39 Goober5000
|
||||
* warp effect is back to FS2 default
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.19 2004/07/26 20:47:28 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.18 2004/07/17 09:29:13 taylor
|
||||
* make old warpmap and new glow bitmap 3D unlit to render right in OGL
|
||||
*
|
||||
* Revision 2.17 2004/07/12 16:32:46 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.16 2004/07/05 05:09:18 bobboau
|
||||
* FVF code, only the data that is needed is sent off to the card,,
|
||||
* OGL can take advantage of this if they want but it won't break
|
||||
* anything if they don't. also state block code has been implemented,
|
||||
* that's totaly internal to D3D no high level code is involved.
|
||||
*
|
||||
* Revision 2.15 2004/05/12 22:49:13 phreak
|
||||
* renamed the warp model variable from 'wm' to 'Warp_model'
|
||||
*
|
||||
* Revision 2.14 2004/05/08 01:08:48 Goober5000
|
||||
* small fix
|
||||
* --Goober5000
|
||||
@@ -189,7 +215,10 @@
|
||||
#include "Nebula/Neb.h"
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
|
||||
extern int Warp_model;
|
||||
extern int Cmdline_nohtl;
|
||||
extern int Cmdline_3dwarp;
|
||||
|
||||
DCF(norm,"normalize a zero length vector")
|
||||
{
|
||||
@@ -215,7 +244,7 @@ void draw_face( vertex *v1, vertex *v2, vertex *v3 )
|
||||
vertlist[2] = v3;
|
||||
}
|
||||
|
||||
g3_draw_poly( 3, vertlist, TMAP_FLAG_TEXTURED );
|
||||
g3_draw_poly( 3, vertlist, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
|
||||
|
||||
}
|
||||
|
||||
@@ -223,7 +252,7 @@ void draw_face( vertex *v1, vertex *v2, vertex *v3 )
|
||||
#define wR_VERTICES() do { g3_rotate_vertex(verts[0], &bottom1); g3_rotate_vertex(verts[1], &bottom2); g3_rotate_vertex(verts[2], &top2); g3_rotate_vertex(verts[3], &top1); } while(0);
|
||||
#define wP_VERTICES() do { for(idx=0; idx<4; idx++){ g3_project_vertex(verts[idx]); } } while(0);
|
||||
|
||||
void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int force_old)
|
||||
void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int warp_3d)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -242,7 +271,62 @@ void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_
|
||||
vector vecs[5];
|
||||
vertex verts[5];
|
||||
|
||||
if(Warp_model > -1 && !force_old && !(The_mission.flags & MISSION_FLAG_OLD_WARP_EFFECT)){
|
||||
vecs[4] = center; //this is for the warp glow-Bobboau
|
||||
verts[4].u = 0.5f; verts[4].v = 0.5f;
|
||||
|
||||
if (Cmdline_nohtl) {
|
||||
g3_rotate_vertex( &verts[4], &vecs[4] );
|
||||
} else {
|
||||
g3_transfer_vertex( &verts[4], &vecs[4] );
|
||||
}
|
||||
|
||||
if ( Warp_glow_bitmap != -1 ) {
|
||||
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, (The_mission.flags & MISSION_FLAG_FULLNEB)?(1.0f - neb2_get_fog_intensity(obj)):1.0f );
|
||||
|
||||
float r = radius;
|
||||
|
||||
int render_it;
|
||||
|
||||
#define OUT_PERCENT1 0.80f
|
||||
#define OUT_PERCENT2 0.90f
|
||||
|
||||
#define IN_PERCENT1 0.10f
|
||||
#define IN_PERCENT2 0.20f
|
||||
|
||||
if ( life_percent < IN_PERCENT1 ) {
|
||||
// do nothing
|
||||
render_it = 0;
|
||||
} else if ( life_percent < IN_PERCENT2 ) {
|
||||
r *= ( life_percent-IN_PERCENT1 ) / (IN_PERCENT2-IN_PERCENT1);
|
||||
render_it = 1;
|
||||
} else if ( life_percent < OUT_PERCENT1 ) {
|
||||
// do nothing
|
||||
render_it = 1;
|
||||
} else if ( life_percent < OUT_PERCENT2 ) {
|
||||
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2-OUT_PERCENT1);
|
||||
render_it = 1;
|
||||
} else {
|
||||
// do nothing
|
||||
render_it = 0;
|
||||
}
|
||||
|
||||
if (render_it) {
|
||||
int saved_gr_zbuffering = gr_zbuffer_get();
|
||||
gr_zbuffer_set(GR_ZBUFF_READ);
|
||||
|
||||
// Add in noise
|
||||
//float Noise[NOISE_NUM_FRAMES] = {
|
||||
int noise_frame = fl2i(Missiontime/15.0f) % NOISE_NUM_FRAMES;
|
||||
|
||||
r *= (0.40f + Noise[noise_frame]*0.30f);
|
||||
|
||||
g3_draw_bitmap( &verts[4], 0,r, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
|
||||
gr_zbuffer_set(saved_gr_zbuffering);
|
||||
}
|
||||
}
|
||||
|
||||
if(Warp_model > -1 && (warp_3d || (The_mission.flags & MISSION_FLAG_3D_WARP_EFFECT) || Cmdline_3dwarp))
|
||||
{
|
||||
float model_Interp_scale_x = radius /20;
|
||||
float model_Interp_scale_y = radius /20;
|
||||
float model_Interp_scale_z = radius /20;
|
||||
@@ -303,9 +387,6 @@ void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_
|
||||
gr_set_cull(1);
|
||||
*/
|
||||
|
||||
vecs[4] = center; //this is for the warp glow-Bobboau
|
||||
verts[4].u = 0.5f; verts[4].v = 0.5f;
|
||||
g3_rotate_vertex( &verts[4], &vecs[4] );
|
||||
|
||||
}else{
|
||||
gr_set_bitmap( texture_bitmap_num, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
|
||||
@@ -336,59 +417,20 @@ void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_
|
||||
verts[4].u = 0.5f; verts[4].v = 0.5f;
|
||||
|
||||
for (i=0; i<5; i++ ) {
|
||||
g3_rotate_vertex( &verts[i], &vecs[i] );
|
||||
if (Cmdline_nohtl) {
|
||||
g3_rotate_vertex( &verts[i], &vecs[i] );
|
||||
} else {
|
||||
g3_transfer_vertex( &verts[i], &vecs[i] );
|
||||
}
|
||||
}
|
||||
|
||||
gr_set_cull(0); // fixes rendering problem in D3D - taylor
|
||||
draw_face( &verts[0], &verts[4], &verts[1] );
|
||||
draw_face( &verts[1], &verts[4], &verts[2] );
|
||||
draw_face( &verts[4], &verts[3], &verts[2] );
|
||||
draw_face( &verts[0], &verts[3], &verts[4] );
|
||||
gr_set_cull(1);
|
||||
}
|
||||
if ( Warp_glow_bitmap != -1 ) {
|
||||
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, (The_mission.flags & MISSION_FLAG_FULLNEB)?(1.0f - neb2_get_fog_intensity(obj)):1.0f );
|
||||
|
||||
float r = radius;
|
||||
|
||||
int render_it;
|
||||
|
||||
#define OUT_PERCENT1 0.80f
|
||||
#define OUT_PERCENT2 0.90f
|
||||
|
||||
#define IN_PERCENT1 0.10f
|
||||
#define IN_PERCENT2 0.20f
|
||||
|
||||
if ( life_percent < IN_PERCENT1 ) {
|
||||
// do nothing
|
||||
render_it = 0;
|
||||
} else if ( life_percent < IN_PERCENT2 ) {
|
||||
r *= ( life_percent-IN_PERCENT1 ) / (IN_PERCENT2-IN_PERCENT1);
|
||||
render_it = 1;
|
||||
} else if ( life_percent < OUT_PERCENT1 ) {
|
||||
// do nothing
|
||||
render_it = 1;
|
||||
} else if ( life_percent < OUT_PERCENT2 ) {
|
||||
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2-OUT_PERCENT1);
|
||||
render_it = 1;
|
||||
} else {
|
||||
// do nothing
|
||||
render_it = 0;
|
||||
}
|
||||
|
||||
if (render_it) {
|
||||
int saved_gr_zbuffering = gr_zbuffer_get();
|
||||
gr_zbuffer_set(GR_ZBUFF_READ);
|
||||
|
||||
// Add in noise
|
||||
//float Noise[NOISE_NUM_FRAMES] = {
|
||||
int noise_frame = fl2i(Missiontime/15.0f) % NOISE_NUM_FRAMES;
|
||||
|
||||
r *= (0.40f + Noise[noise_frame]*0.30f);
|
||||
|
||||
g3_draw_bitmap( &verts[4], 0,r, TMAP_FLAG_TEXTURED );
|
||||
gr_zbuffer_set(saved_gr_zbuffering);
|
||||
}
|
||||
}
|
||||
|
||||
gr_zbuffer_set( saved_gr_zbuffering );
|
||||
}
|
||||
|
||||
@@ -9,13 +9,101 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Freespace2/FreeSpace.cpp $
|
||||
* $Revision: 2.91 $
|
||||
* $Date: 2004-05-03 21:22:20 $
|
||||
* $Author: Kazan $
|
||||
* $Revision: 2.116 $
|
||||
* $Date: 2004-12-25 09:28:41 $
|
||||
* $Author: wmcoolmon $
|
||||
*
|
||||
* Freespace main body
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.115 2004/12/25 09:24:54 wmcoolmon
|
||||
* Fix to modular tables workaround with Fs2NetD
|
||||
*
|
||||
* Revision 2.114 2004/12/10 17:21:00 taylor
|
||||
* dymanic allocation of Personas
|
||||
*
|
||||
* Revision 2.113 2004/12/02 11:18:14 taylor
|
||||
* make OGL use same gamma reg setting as D3D since it's the same ramp
|
||||
* have OGL respect the -no_set_gamma cmdline option
|
||||
* reset gamma to default on OGL exit to make sure the desktop doesn't stay wrong
|
||||
*
|
||||
* Revision 2.112 2004/11/26 08:41:11 taylor
|
||||
* couple of LAN game vs. FS2NetD fixes
|
||||
*
|
||||
* Revision 2.111 2004/10/31 21:31:34 taylor
|
||||
* bump COUNT_ESTIMATE, reset time compression at the start of a mission, new pilot file support, add feature_disabled popup
|
||||
*
|
||||
* Revision 2.110 2004/08/23 07:48:08 Goober5000
|
||||
* fix0red some warnings
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.109 2004/08/05 02:15:27 phreak
|
||||
* forgot to commit orb change
|
||||
*
|
||||
* Revision 2.108 2004/07/26 21:19:05 Goober5000
|
||||
* updated launcher link
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.107 2004/07/26 20:47:28 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 2.106 2004/07/26 17:54:04 Kazan
|
||||
* Autopilot system completed -- i am dropping plans for GUI nav map
|
||||
* All builds should have ENABLE_AUTO_PILOT defined from now on (.dsp's i am committing reflect this) the system will only be noticed if the mission designer brings it online by defining a nav point
|
||||
* Fixed FPS counter during time compression
|
||||
*
|
||||
* Revision 2.105 2004/07/18 04:07:26 Kazan
|
||||
* nothing major
|
||||
*
|
||||
* Revision 2.104 2004/07/17 18:46:06 taylor
|
||||
* various OGL and memory leak fixes
|
||||
*
|
||||
* Revision 2.103 2004/07/12 16:32:46 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.102 2004/07/12 03:19:15 Kazan
|
||||
* removed a couple pointless useless messages from the debug console
|
||||
*
|
||||
* Revision 2.101 2004/07/11 03:22:47 bobboau
|
||||
* added the working decal code
|
||||
*
|
||||
* Revision 2.100 2004/07/08 22:08:21 wmcoolmon
|
||||
* Moved set_current_hud, as well as added a conditional to hud_positions_it; it shouldn't and won't be executed on a standalone server.
|
||||
*
|
||||
* Revision 2.99 2004/07/01 16:38:18 Kazan
|
||||
* working on autonav
|
||||
*
|
||||
* Revision 2.98 2004/07/01 02:06:31 phreak
|
||||
* function pointer radar update.
|
||||
* will enable us to make different radar styles that we can switch between
|
||||
*
|
||||
* Revision 2.97 2004/07/01 01:12:31 bobboau
|
||||
* implemented index buffered background bitmaps,
|
||||
* OGL people you realy should get this implemented
|
||||
*
|
||||
* Revision 2.96 2004/06/22 23:14:09 wmcoolmon
|
||||
* Nonworking OGG support for sound (not music) added, disabled load-only-used-weapons code, modification to sound system registry code.
|
||||
* OGG code has been commented out, so you don't need the SDK yet.
|
||||
*
|
||||
* Revision 2.95 2004/06/19 12:45:47 randomtiger
|
||||
* Changed startup code to catch D3D9 request from launcher.
|
||||
* No actual startup code has been implemented.
|
||||
*
|
||||
* Revision 2.94 2004/06/18 04:59:53 wmcoolmon
|
||||
* Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values
|
||||
*
|
||||
* Revision 2.93 2004/05/30 08:04:48 wmcoolmon
|
||||
* Final draft of the HUD parsing system structure. May change how individual coord positions are specified in the TBL. -C
|
||||
*
|
||||
* Revision 2.92 2004/05/27 00:49:25 wmcoolmon
|
||||
* Made HUD.tbl obsolete. Info is now taken directly from $Shield_icon in ships.tbl
|
||||
* Now this table can be used for something more useful...say, hud gauge positions?
|
||||
*
|
||||
* Revision 2.91 2004/05/03 21:22:20 Kazan
|
||||
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
|
||||
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
|
||||
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
|
||||
*
|
||||
* Revision 2.90 2004/04/27 20:41:58 taylor
|
||||
* add NULL check to game_hacked_data() to prevent crash
|
||||
*
|
||||
@@ -975,6 +1063,7 @@ static const char RCS_Name[] = "$Name: not supported by cvs2svn $";
|
||||
#include "hud/hudmessage.h"
|
||||
#include "hud/hudshield.h"
|
||||
#include "hud/hudtargetbox.h"
|
||||
#include "hud/hudparse.h"
|
||||
#include "io/joy.h"
|
||||
#include "io/joy_ff.h"
|
||||
#include "io/key.h"
|
||||
@@ -1047,6 +1136,7 @@ static const char RCS_Name[] = "$Name: not supported by cvs2svn $";
|
||||
#include "weapon/muzzleflash.h"
|
||||
#include "weapon/shockwave.h"
|
||||
#include "weapon/weapon.h"
|
||||
#include "radar/radarsetup.h"
|
||||
|
||||
#if defined(ENABLE_AUTO_PILOT)
|
||||
#include "autopilot/autopilot.h"
|
||||
@@ -1071,6 +1161,8 @@ extern int Om_tracker_flag; // needed for FS2OpenPXO config
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NDEBUG
|
||||
#ifdef FRED
|
||||
#error macro FRED is defined when trying to build release Fred. Please undefine FRED macro in build settings
|
||||
@@ -1115,6 +1207,8 @@ void multi_spew_table_checksums(int max_files, char *outfile);
|
||||
|
||||
extern bool frame_rate_display;
|
||||
|
||||
bool cube_map_drawen = false;
|
||||
|
||||
void game_level_init(int seed = -1);
|
||||
void game_post_level_init();
|
||||
void game_do_frame();
|
||||
@@ -1508,7 +1602,7 @@ float Game_shudder_intensity = 0.0f; // should be between 0.0 and 100.0
|
||||
#ifndef NO_SOUND
|
||||
// EAX stuff
|
||||
sound_env Game_sound_env;
|
||||
sound_env Game_default_sound_env = {SND_ENV_GENERIC, 0.2F,0.2F,1.0F};
|
||||
sound_env Game_default_sound_env = {SND_ENV_BATHROOM, 0.2F,0.2F,1.0F};
|
||||
int Game_sound_env_update_timestamp;
|
||||
#endif
|
||||
|
||||
@@ -1881,7 +1975,6 @@ void game_level_close()
|
||||
|
||||
// De-Initialize the game subsystems
|
||||
sexp_music_close(); // Goober5000
|
||||
message_mission_shutdown();
|
||||
event_music_level_close();
|
||||
game_stop_looped_sounds();
|
||||
snd_stop_all();
|
||||
@@ -1890,6 +1983,7 @@ void game_level_close()
|
||||
#endif
|
||||
gamesnd_unload_gameplay_sounds(); // unload gameplay sounds from memory
|
||||
anim_level_close(); // stop and clean up any anim instances
|
||||
message_mission_shutdown(); // called after anim_level_close() to make sure instances are clear
|
||||
shockwave_level_close();
|
||||
fireball_level_close();
|
||||
shield_hit_close();
|
||||
@@ -1901,12 +1995,13 @@ void game_level_close()
|
||||
ct_level_close();
|
||||
beam_level_close();
|
||||
mflash_level_close();
|
||||
mission_brief_common_reset(); // close out parsed briefing/mission stuff
|
||||
|
||||
audiostream_unpause_all();
|
||||
Game_paused = 0;
|
||||
}
|
||||
|
||||
|
||||
void init_decals();
|
||||
// intializes game stuff and loads the mission. Returns 0 on failure, 1 on success
|
||||
// input: seed => DEFAULT PARAMETER (value -1). Only set by demo playback code.
|
||||
void game_level_init(int seed)
|
||||
@@ -1954,6 +2049,12 @@ void game_level_init(int seed)
|
||||
model_free_all(); // Free all existing models
|
||||
mission_brief_common_init(); // Free all existing briefing/debriefing text
|
||||
weapon_level_init();
|
||||
init_decals();
|
||||
|
||||
#if defined(ENABLE_AUTO_PILOT)
|
||||
NavSystem_Init(); // zero out the nav system
|
||||
#endif
|
||||
|
||||
ai_level_init(); // Call this before ship_init() because it reads ai.tbl.
|
||||
ship_level_init();
|
||||
player_level_init();
|
||||
@@ -1992,9 +2093,7 @@ void game_level_init(int seed)
|
||||
ssm_level_init();
|
||||
supernova_level_init();
|
||||
|
||||
#if defined(ENABLE_AUTO_PILOT)
|
||||
NavSystem_Init(); // zero out the nav system
|
||||
#endif
|
||||
|
||||
|
||||
// multiplayer dogfight hack
|
||||
dogfight_blown = 0;
|
||||
@@ -2010,6 +2109,10 @@ void game_level_init(int seed)
|
||||
|
||||
// campaign wasn't ended
|
||||
Campaign_ended_in_mission = 0;
|
||||
|
||||
cube_map_drawen = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// called when a mission is over -- does server specific stuff.
|
||||
@@ -2105,7 +2208,8 @@ void game_post_level_init()
|
||||
// of game_busy_callback(NULL), which I conveniently print out to the
|
||||
// debug output window with the '=== ENDING LOAD ==' stuff.
|
||||
//#define COUNT_ESTIMATE 3706
|
||||
#define COUNT_ESTIMATE 1111
|
||||
//#define COUNT_ESTIMATE 1111
|
||||
#define COUNT_ESTIMATE 2311
|
||||
|
||||
int Game_loading_callback_inited = 0;
|
||||
|
||||
@@ -2235,7 +2339,7 @@ void game_maybe_update_sound_environment()
|
||||
//
|
||||
void game_assign_sound_environment()
|
||||
{
|
||||
/*
|
||||
/*
|
||||
if (The_mission.flags & MISSION_FLAG_SUBSPACE) {
|
||||
Game_sound_env.id = SND_ENV_DRUGGED;
|
||||
Game_sound_env.volume = 0.800f;
|
||||
@@ -2551,12 +2655,12 @@ DCF(gamma,"Sets Gamma factor")
|
||||
|
||||
void run_launcher()
|
||||
{
|
||||
const char *launcher_link = "explorer.exe \"http://www.randomtiger.pwp.blueyonder.co.uk/freespace/Launcher4.rar\"";
|
||||
const char *launcher_link = "explorer.exe \"http://www.randomtiger.pwp.blueyonder.co.uk/freespace/Launcher5.rar\"";
|
||||
|
||||
int download = MessageBox((HWND)os_get_window(),
|
||||
"Run the fs2_open launcher to fix your problem. "
|
||||
"Would you like to download the latest version of the launcher? "
|
||||
"You must have at least v4.0 to run OGL and v3.0 to run D3D8.",
|
||||
"You must have at least version 5.0 to run fs2_open versions above 3.6.",
|
||||
"Question", MB_YESNO | MB_ICONQUESTION);
|
||||
|
||||
if(download == IDYES)
|
||||
@@ -2566,6 +2670,9 @@ void run_launcher()
|
||||
return;
|
||||
}
|
||||
|
||||
// This now crashes the launcher since fs2_open is still open
|
||||
return;
|
||||
|
||||
// fire up the UpdateLauncher executable
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
@@ -2589,7 +2696,7 @@ void run_launcher()
|
||||
if (!launcher_ran)
|
||||
{
|
||||
download = MessageBox((HWND)os_get_window(),
|
||||
"The Launcher could not be started, you cant run fs2_open without it. "
|
||||
"The Launcher could not be started. You cannot run fs2_open without it. "
|
||||
"Would you like to download it?", "FS2_Open Startup Error", MB_YESNO | MB_ICONQUESTION);
|
||||
|
||||
if(download == IDYES)
|
||||
@@ -2602,6 +2709,8 @@ void run_launcher()
|
||||
|
||||
void game_init()
|
||||
{
|
||||
|
||||
|
||||
char *ptr;
|
||||
|
||||
Game_current_mission_filename[0] = 0;
|
||||
@@ -2706,9 +2815,11 @@ void game_init()
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!Is_standalone) {
|
||||
|
||||
snd_init(use_a3d, use_eax);
|
||||
if (!Is_standalone)
|
||||
{
|
||||
unsigned short UserSampleRate = (unsigned short) os_config_read_uint(NULL, "SoundSampleRate", 22050);
|
||||
unsigned short UserSampleBits = (unsigned short) os_config_read_uint(NULL, "SoundSampleBits", 16);
|
||||
snd_init(use_a3d, use_eax, UserSampleRate, UserSampleBits);
|
||||
}
|
||||
|
||||
if(fsspeech_init() == false) {
|
||||
@@ -2776,7 +2887,24 @@ void game_init()
|
||||
bool is_640x480 = strstr(ptr, "640") && strstr(ptr, "480");
|
||||
int res = (!is_640x480 && has_sparky_hi) ? GR_1024 : GR_640;
|
||||
|
||||
if (strstr(ptr, NOX("D3D8-") ))
|
||||
// D3D9 should run on a seperate path to D3D8
|
||||
// This will allow users to play D3D8 while we develope D3D9
|
||||
if (strstr(ptr, NOX("D3D9-") ))
|
||||
{
|
||||
int adapter, aatype;
|
||||
|
||||
if(sscanf(ptr, "D3D9-(%dx%d)x%d bit ad%d aa%d", &width, &height, &cdepth, &adapter, &aatype) != 5)
|
||||
strcpy(Device_init_error, "Cant understand 'videocardFs2open' D3D9 reg entry.");
|
||||
else
|
||||
{
|
||||
sprintf(Device_init_error,
|
||||
"This build does not support D3D9.\n\n"
|
||||
"Adapter num: %d\n"
|
||||
"Mode: %dx%dx%d\n"
|
||||
"AA type: %d\n", adapter, width, height, cdepth, aatype);
|
||||
}
|
||||
}
|
||||
else if (strstr(ptr, NOX("D3D8-") ))
|
||||
{
|
||||
if(sscanf(ptr, "D3D8-(%dx%d)x%d bit", &width, &height, &cdepth) != 3)
|
||||
strcpy(Device_init_error, "Cant understand 'videocardFs2open' D3D8 reg entry.");
|
||||
@@ -2836,7 +2964,7 @@ void game_init()
|
||||
// ENVMAP = bm_load("environment");
|
||||
|
||||
// Set the gamma
|
||||
if(gr_screen.mode == GR_DIRECT3D)
|
||||
if( (gr_screen.mode == GR_DIRECT3D) || (gr_screen.mode == GR_OPENGL) )
|
||||
{
|
||||
// D3D's gamma system now works differently. 1.0 is the default value
|
||||
ptr = os_config_read_string(NULL, NOX("GammaD3D"), NOX("1.0"));
|
||||
@@ -2917,7 +3045,7 @@ void game_init()
|
||||
Init_Species_Definitions(); // Load up the Species defs - this needs to be done FIRST -- Kazan
|
||||
|
||||
// hud shield icon stuff
|
||||
hud_shield_game_init();
|
||||
//hud_shield_game_init(); No longer needed; see ships.tbl -C
|
||||
|
||||
control_config_common_init(); // sets up localization stuff in the control config
|
||||
|
||||
@@ -2933,7 +3061,7 @@ void game_init()
|
||||
gamesnd_parse_soundstbl();
|
||||
|
||||
if (!Is_standalone)
|
||||
radar_init();
|
||||
select_radar_mode(Cmdline_orb_radar);
|
||||
|
||||
gameseq_init();
|
||||
|
||||
@@ -2956,13 +3084,16 @@ void game_init()
|
||||
weapon_init();
|
||||
ai_init();
|
||||
ship_init(); // read in ships.tbl
|
||||
void ship_info_close();
|
||||
atexit(ship_info_close);
|
||||
|
||||
player_init();
|
||||
mission_campaign_init(); // load in the default campaign
|
||||
anim_init();
|
||||
context_help_init();
|
||||
techroom_intel_init(); // parse species.tbl, load intel info
|
||||
if(!Is_standalone)
|
||||
{
|
||||
hud_positions_init(); //Setup hud positions
|
||||
}
|
||||
|
||||
#ifndef NO_NETWORK
|
||||
// initialize psnet
|
||||
@@ -3003,6 +3134,8 @@ void game_init()
|
||||
|
||||
mprintf(("cfile_init() took %d\n", e1 - s1));
|
||||
// mprintf(("1000 cfopens() took %d\n", e2 - s2));
|
||||
|
||||
|
||||
}
|
||||
|
||||
char transfer_text[128];
|
||||
@@ -3055,7 +3188,7 @@ void game_get_framerate()
|
||||
Framerate = FRAME_FILTER / frametotal;
|
||||
else
|
||||
Framerate = Framecount / frametotal;
|
||||
sprintf( text, NOX("FPS: %.1f"), Framerate );
|
||||
sprintf( text, NOX("FPS: %.1f"), Framerate * (Game_time_compression>>16));
|
||||
} else {
|
||||
sprintf( text, NOX("FPS: ?") );
|
||||
}
|
||||
@@ -3958,6 +4091,62 @@ extern void compute_slew_matrix(matrix *orient, angles *a); // TODO: move code t
|
||||
// Player's velocity just before he blew up. Used to keep camera target moving.
|
||||
vector Dead_player_last_vel = {1.0f, 1.0f, 1.0f};
|
||||
|
||||
|
||||
#define render_environment {gr_set_environment_mapping(i);g3_set_view_matrix( &nv, &new_orient, new_zoom );gr_set_proj_matrix( (PI/2.0f), 1.0f, 1.0f, 30000.0f);if ( Game_subspace_effect ){stars_draw(0,0,0,1,1);} else {stars_draw(1,1,1,0,1);}i++;}
|
||||
|
||||
extern float View_zoom, Canv_w2, Canv_h2;
|
||||
void setup_environment_mapping(vector *eye_pos, matrix *eye_orient){
|
||||
if(gr_screen.mode != GR_DIRECT3D)return;
|
||||
if(!Cmdline_nohtl){
|
||||
// matrix old_orient = Eye_matrix;
|
||||
// vector old_position = Eye_position;
|
||||
matrix new_orient;
|
||||
float old_zoom = View_zoom, new_zoom = 0.925f;
|
||||
vector nv = ZERO_VECTOR;
|
||||
|
||||
{
|
||||
int i = 0;
|
||||
new_orient.vec.fvec.xyz.x = 1.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = 0.0f;
|
||||
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
|
||||
vm_fix_matrix(&new_orient);
|
||||
render_environment
|
||||
|
||||
new_orient.vec.fvec.xyz.x = -1.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = 0.0f;
|
||||
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
|
||||
vm_fix_matrix(&new_orient);
|
||||
render_environment
|
||||
|
||||
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = 1.0f;new_orient.vec.fvec.xyz.z = 0.0f;
|
||||
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 0.0f;new_orient.vec.uvec.xyz.z = -1.0f;
|
||||
vm_fix_matrix(&new_orient);
|
||||
render_environment
|
||||
|
||||
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = -1.0f;new_orient.vec.fvec.xyz.z = 0.0f;
|
||||
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 0.0f;new_orient.vec.uvec.xyz.z = 1.0f;
|
||||
vm_fix_matrix(&new_orient);
|
||||
render_environment
|
||||
|
||||
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = 1.0f;
|
||||
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
|
||||
vm_fix_matrix(&new_orient);
|
||||
render_environment
|
||||
|
||||
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = -1.0f;
|
||||
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
|
||||
vm_fix_matrix(&new_orient);
|
||||
render_environment
|
||||
|
||||
}
|
||||
|
||||
// View_zoom = old_zoom;
|
||||
g3_set_view_matrix( eye_pos, eye_orient, old_zoom );
|
||||
gr_set_proj_matrix( ((4.0f/9.0f)*(PI)*View_zoom), Canv_w2/Canv_h2, 1.0f, 30000.0f);
|
||||
gr_set_environment_mapping(-1);
|
||||
// first_frame = false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
// Set eye_pos and eye_orient based on view mode.
|
||||
void game_render_frame_setup(vector *eye_pos, matrix *eye_orient)
|
||||
{
|
||||
@@ -4233,20 +4422,24 @@ void game_render_frame( vector * eye_pos, matrix * eye_orient )
|
||||
}
|
||||
#endif
|
||||
|
||||
//fugly hack. this will make the skybox render in HT&L
|
||||
//i want the stars_draw() function to get ported to HT&L quick
|
||||
int nohtl_save = Cmdline_nohtl;
|
||||
Cmdline_nohtl = 1;
|
||||
// don't set proj/view matrix before this call, breaks OGL
|
||||
gr_setup_background_fog(true);
|
||||
if ( Game_subspace_effect ) {
|
||||
stars_draw(0,0,0,1);
|
||||
stars_draw(0,0,0,1,0);
|
||||
} else {
|
||||
stars_draw(1,1,1,0);
|
||||
stars_draw(1,1,1,0,0);
|
||||
}
|
||||
Cmdline_nohtl = nohtl_save;
|
||||
gr_setup_background_fog(false);
|
||||
|
||||
if((!cube_map_drawen || Game_subspace_effect) && Cmdline_env){
|
||||
setup_environment_mapping(eye_pos, eye_orient);
|
||||
cube_map_drawen = true;
|
||||
}
|
||||
|
||||
if (!Cmdline_nohtl) gr_set_proj_matrix( (4.0f/9.0f) * 3.14159f * View_zoom, gr_screen.aspect*(float)gr_screen.clip_width/(float)gr_screen.clip_height, MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
|
||||
if (!Cmdline_nohtl) gr_set_view_matrix(&Eye_position, &Eye_matrix);
|
||||
if (!Cmdline_nohtl) {
|
||||
gr_set_proj_matrix( (4.0f/9.0f) * 3.14159f * View_zoom, gr_screen.aspect*(float)gr_screen.clip_width/(float)gr_screen.clip_height, MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
|
||||
gr_set_view_matrix(&Eye_position, &Eye_matrix);
|
||||
}
|
||||
|
||||
obj_render_all(obj_render);
|
||||
beam_render_all(); // render all beam weapons
|
||||
@@ -5438,8 +5631,8 @@ int game_poll()
|
||||
}
|
||||
|
||||
k = key_inkey();
|
||||
if (k)
|
||||
mprintf(("game_poll(): got key 0x%02x\n", k));
|
||||
//if (k)
|
||||
// mprintf(("game_poll(): got key 0x%02x\n", k));
|
||||
|
||||
#ifdef FS2_DEMO
|
||||
demo_maybe_show_trailer(k);
|
||||
@@ -6682,6 +6875,9 @@ void game_enter_state( int old_state, int new_state )
|
||||
break;
|
||||
|
||||
case GS_STATE_GAME_PLAY:
|
||||
// reset time compression to default level so it's right at the beginning of a mission - taylor
|
||||
Game_time_compression = F1_0;
|
||||
|
||||
// coming from the gameplay state or the main menu, we might need to load the mission
|
||||
if ( (Game_mode & GM_NORMAL) && ((old_state == GS_STATE_MAIN_MENU) || (old_state == GS_STATE_GAME_PLAY) || (old_state == GS_STATE_DEATH_BLEW_UP)) ) {
|
||||
if ( !game_start_mission() ) // this should put us into a new state.
|
||||
@@ -6724,6 +6920,13 @@ void game_enter_state( int old_state, int new_state )
|
||||
}
|
||||
player_restore_target_and_weapon_link_prefs();
|
||||
|
||||
//Set the current hud
|
||||
#ifdef NEW_HUD
|
||||
set_current_hud(Player_ship);
|
||||
#else
|
||||
set_current_hud(Player_ship->ship_info_index);
|
||||
#endif
|
||||
|
||||
Game_mode |= GM_IN_MISSION;
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -7516,6 +7719,8 @@ int WinMainSub(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
void memblockinfo_output_memleak();
|
||||
atexit(memblockinfo_output_memleak);
|
||||
@@ -7628,6 +7833,7 @@ int WinMainSub(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
game_init();
|
||||
|
||||
game_stop_time();
|
||||
|
||||
if (Cmdline_SpewMission_CRCs) // -missioncrcs
|
||||
@@ -7691,6 +7897,8 @@ int WinMainSub(int argc, char *argv[])
|
||||
if ( state == GS_STATE_QUIT_GAME ){
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef FS2_DEMO
|
||||
@@ -7703,6 +7911,7 @@ int WinMainSub(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
game_shutdown();
|
||||
|
||||
#ifdef _WIN32
|
||||
return 1;
|
||||
#else
|
||||
@@ -7716,6 +7925,8 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdSh
|
||||
int main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _DEBUG
|
||||
void memblockinfo_output_memleak();
|
||||
@@ -7759,7 +7970,7 @@ int main(int argc, char *argv[])
|
||||
#ifdef _WIN32
|
||||
_CrtDumpMemoryLeaks();
|
||||
#endif
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -7824,6 +8035,7 @@ void game_shutdown(void)
|
||||
// a player, Player will be NULL, in which case we shouldn't write the player file out!
|
||||
if (!(Game_mode & GM_STANDALONE_SERVER) && (Player!=NULL) && !Is_standalone){
|
||||
write_pilot_file();
|
||||
mission_campaign_savefile_save();
|
||||
}
|
||||
|
||||
#ifndef NO_NETWORK
|
||||
@@ -7838,6 +8050,7 @@ void game_shutdown(void)
|
||||
unload_animating_pointer();// frees the frames used for the animating mouse pointer
|
||||
bm_unload_all(); // free bitmaps
|
||||
mission_campaign_close(); // close out the campaign stuff
|
||||
message_mission_close(); // clear loaded table data from message.tbl
|
||||
#ifndef NO_NETWORK
|
||||
multi_voice_close(); // close down multiplayer voice (including freeing buffers, etc)
|
||||
multi_log_close();
|
||||
@@ -7853,6 +8066,9 @@ void game_shutdown(void)
|
||||
training_menu_close();
|
||||
gr_close();
|
||||
|
||||
// free left over memory from table parsing
|
||||
player_tips_close();
|
||||
|
||||
joy_close();
|
||||
|
||||
audiostream_close();
|
||||
@@ -8426,6 +8642,12 @@ void game_feature_not_in_demo_popup()
|
||||
popup(PF_USE_AFFIRMATIVE_ICON|PF_BODY_BIG, 1, POPUP_OK, XSTR( "Sorry, this feature is available only in the retail version", 200));
|
||||
}
|
||||
|
||||
// Call this function when you want to inform the player that a feature is disabled in this build
|
||||
void game_feature_disabled_popup()
|
||||
{
|
||||
popup(PF_USE_AFFIRMATIVE_ICON|PF_BODY_BIG, 1, POPUP_OK, XSTR( "Sorry, the requested feature is currently disabled in this build", -1));
|
||||
}
|
||||
|
||||
// format the specified time (fixed point) into a nice string
|
||||
void game_format_time(fix m_time,char *time_str)
|
||||
{
|
||||
@@ -9588,13 +9810,27 @@ DCF(wepspew, "display the checksum for the current weapons.tbl")
|
||||
|
||||
// if the game is running using hacked data
|
||||
void multi_update_valid_tables(); // in multiutil.obj
|
||||
extern bool modular_tables_loaded;
|
||||
|
||||
int game_hacked_data()
|
||||
{
|
||||
// hacked!
|
||||
/*if(!Game_weapons_tbl_valid || !Game_ships_tbl_valid){
|
||||
int retval = 0;
|
||||
|
||||
#ifndef NO_NETWORK
|
||||
//omfg modular tables
|
||||
if(modular_tables_loaded)
|
||||
{
|
||||
return 1;
|
||||
}*/
|
||||
}
|
||||
|
||||
// LAN game, only check if weapon and ship are valid since we can't or don't
|
||||
// won't to validate against PXO server
|
||||
if (!Om_tracker_flag) {
|
||||
if (!Game_weapons_tbl_valid || !Game_ships_tbl_valid)
|
||||
retval = 1;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (!cf_exist( "tvalid.cfg", CF_TYPE_DATA ))
|
||||
{
|
||||
@@ -9613,8 +9849,6 @@ int game_hacked_data()
|
||||
char *buffer = new char[cfilelength(tvalid_cfg)];
|
||||
cfread(buffer, 1, cfilelength(tvalid_cfg), tvalid_cfg);
|
||||
|
||||
int retval = 0;
|
||||
|
||||
if (strstr(buffer, "invalid")) // got hacked data
|
||||
retval = 1;
|
||||
|
||||
@@ -9623,6 +9857,8 @@ int game_hacked_data()
|
||||
|
||||
if (tvalid_cfg != NULL)
|
||||
cfclose(tvalid_cfg);
|
||||
#endif
|
||||
|
||||
// not hacked
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/FREESPACE2/FreeSpace.h $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-04-07 03:31:53 $
|
||||
* $Author: righteous1 $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2004-10-31 21:31:34 $
|
||||
* $Author: taylor $
|
||||
*
|
||||
* FreeSpace, the game, not the project, header information.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.3 2004/08/11 05:06:22 Kazan
|
||||
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
|
||||
*
|
||||
* Revision 2.2 2004/04/07 03:31:53 righteous1
|
||||
* Updated to add alt_tab_pause() function to draw pause screen and discontinue sounds when the game is minimized. -R1
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -149,6 +155,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _FREESPACE_H
|
||||
#define _FREESPACE_H
|
||||
#ifndef STAMPER_PROGRAM // because of all the dependancies, I have to do this...yuck!!! MWA 7/21/97
|
||||
@@ -344,6 +351,9 @@ int game_do_cd_mission_check(char *filename);
|
||||
// Used to tell the player that a feature isn't available in the demo version of FreeSpace
|
||||
void game_feature_not_in_demo_popup();
|
||||
|
||||
// Used to tell the player that a feature is disabled by build settings
|
||||
void game_feature_disabled_popup();
|
||||
|
||||
// Return version string for demo or full version, depending on build.
|
||||
void get_version_string(char *str);
|
||||
|
||||
|
||||
@@ -9,13 +9,27 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/Freespace2/LevelPaging.cpp $
|
||||
* $Revision: 2.2 $
|
||||
* $Date: 2004-03-05 09:02:01 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2004-07-26 20:47:29 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code to page in all the bitmaps at the beginning of a level.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.5 2004/07/12 16:32:46 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.4 2004/07/01 01:53:00 phreak
|
||||
* function pointer radar update.
|
||||
* will enable us to make different radar styles that we can switch between
|
||||
*
|
||||
* Revision 2.3 2004/06/18 04:59:53 wmcoolmon
|
||||
* Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values
|
||||
*
|
||||
* Revision 2.2 2004/03/05 09:02:01 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.1 2002/08/01 01:41:04 penguin
|
||||
* The big include file move
|
||||
*
|
||||
@@ -62,13 +76,14 @@
|
||||
#include "freespace2/freespace.h"
|
||||
#include "freespace2/levelpaging.h"
|
||||
|
||||
|
||||
// All the page in functions
|
||||
extern void ship_page_in();
|
||||
extern void debris_page_in();
|
||||
extern void particle_page_in();
|
||||
extern void stars_page_in();
|
||||
extern void hud_page_in();
|
||||
extern void radar_page_in();
|
||||
extern void (*radar_page_in)();
|
||||
extern void weapons_page_in();
|
||||
extern void fireballs_page_in();
|
||||
extern void shockwave_page_in();
|
||||
@@ -91,6 +106,7 @@ void level_page_in()
|
||||
|
||||
// Most important ones first
|
||||
ship_page_in();
|
||||
//Must be called after paging in ships
|
||||
weapons_page_in();
|
||||
fireballs_page_in();
|
||||
particle_page_in();
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/FREESPACE2/LevelPaging.h $
|
||||
* $Revision: 2.0 $
|
||||
* $Date: 2002-06-03 04:02:22 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2004-08-11 05:06:22 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Code to page in all the bitmaps at the beginning of a level.
|
||||
*
|
||||
* $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:07 mharris
|
||||
* Initial checkin - converted filenames and includes to lower case
|
||||
*
|
||||
@@ -30,6 +33,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef _LEVELPAGING_H
|
||||
#define _LEVELPAGING_H
|
||||
|
||||
|
||||
@@ -10,12 +10,22 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/Client.cpp $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2004-03-07 23:07:20 $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2004-11-21 16:07:22 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.15 2004/11/18 00:05:36 Goober5000
|
||||
* #pragma'd a bunch of warnings
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.14 2004/05/25 00:21:39 wmcoolmon
|
||||
* Updated to use <iostream> instead of <iostream.h>
|
||||
*
|
||||
* Revision 1.13 2004/03/07 23:07:20 Kazan
|
||||
* [Incomplete] Readd of Software renderer so Standalone server works
|
||||
*
|
||||
* Revision 1.12 2004/03/05 09:01:56 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
@@ -51,10 +61,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// 4711 = function selected for automatic inline expansion
|
||||
#pragma warning(disable: 4711)
|
||||
|
||||
#include "Client.h"
|
||||
//#include "protocol.h"
|
||||
#include "udpsocket.h"
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
#include <time.h>
|
||||
#include "network/multi_log.h"
|
||||
#include "playerman/player.h"
|
||||
@@ -408,7 +421,7 @@ int Fs2OpenPXO_Login(const char* username, const char* password, UDP_Socket &Soc
|
||||
|
||||
if (Socket.SendPacket((char *) &loginpckt, sizeof(loginpckt), sender, port) == -1)
|
||||
{
|
||||
cout << "Error Sending Packet" << endl;
|
||||
std::cout << "Error Sending Packet" << std::endl;
|
||||
}
|
||||
|
||||
// await reply
|
||||
@@ -457,8 +470,8 @@ void SendHeartBeat(const char* masterserver, int targetport, UDP_Socket &Socket,
|
||||
hbpack.players = (short) players;
|
||||
hbpack.port = port;
|
||||
|
||||
|
||||
Socket.SendPacket((char *) &hbpack, sizeof(serverlist_hb_packet), std::string(masterserver), targetport);
|
||||
std::string ms = masterserver;
|
||||
Socket.SendPacket((char *) &hbpack, sizeof(serverlist_hb_packet), ms, targetport);
|
||||
}
|
||||
|
||||
|
||||
@@ -541,7 +554,7 @@ int Ping(const char* target)
|
||||
UDP_Socket Socket(FS2OPEN_CLIENT_PORT);
|
||||
if (!Socket.InitSocket())
|
||||
{
|
||||
cout << "Initialization Error!" << endl;
|
||||
std::cout << "Initialization Error!" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/Client.h $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2004-08-11 05:06:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.15 2004/07/07 21:00:06 Kazan
|
||||
* FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages
|
||||
*
|
||||
* Revision 1.14 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.13 2004/03/09 00:02:16 Kazan
|
||||
* more fs2netd stuff
|
||||
*
|
||||
@@ -49,6 +57,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#pragma warning(disable:4018) // signed/unsigned mismatch
|
||||
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
#pragma warning(disable:4511) // copy constructor could not be generated
|
||||
@@ -115,10 +124,14 @@ int Ping(const char* target, TCP_Socket &Socket);
|
||||
void SendHeartBeat(const char* masterserver, int targetport, TCP_Socket &Socket, const char* myName, const char* MisName, const char* title, int flags, int port, int players);
|
||||
int Fs2OpenPXO_Login(const char* username, const char* password, TCP_Socket &Socket, const char* masterserver, int port=FS2OPEN_PXO_PORT, int timeout=15);
|
||||
int GetPingReply(TCP_Socket &Socket);
|
||||
void SendPingReply(TCP_Socket &Socket, int tstamp);
|
||||
|
||||
// longer timeouts - mySQL operations
|
||||
file_record* GetTablesList(int &numTables, const char *masterserver, TCP_Socket &Socket, int port=FS2OPEN_PXO_PORT, int timeout=30);
|
||||
file_record* GetMissionsList(int &numMissions, const char *masterserver, TCP_Socket &Socket, int port=FS2OPEN_PXO_PORT, int timeout=30);
|
||||
|
||||
fs2open_banmask* GetBanList(int &numBanMasks, TCP_Socket &Socket, int timeout=15);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,34 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/TCP_Client.cpp $
|
||||
* $Revision: 1.15 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Revision: 1.22 $
|
||||
* $Date: 2004-11-18 00:05:36 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.21 2004/07/26 20:47:29 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 1.20 2004/07/12 16:32:46 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 1.19 2004/07/09 22:05:32 Kazan
|
||||
* fs2netd 1.0 RC5 full support - Rank and Medal updates
|
||||
*
|
||||
* Revision 1.18 2004/07/07 21:00:06 Kazan
|
||||
* FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages
|
||||
*
|
||||
* Revision 1.17 2004/07/06 23:45:34 Kazan
|
||||
* minor multi fix
|
||||
*
|
||||
* Revision 1.16 2004/05/25 00:21:39 wmcoolmon
|
||||
* Updated to use <iostream> instead of <iostream.h>
|
||||
*
|
||||
* Revision 1.15 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.14 2004/03/09 17:59:01 Kazan
|
||||
* Disabled multithreaded TCP_Socket in favor of safer single threaded
|
||||
* FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
|
||||
@@ -73,18 +96,20 @@
|
||||
// 4018 = signed/unsigned mismatch
|
||||
// 4663 = new template specification syntax
|
||||
// 4245 = signed/unsigned mismatch in conversion of const value
|
||||
#pragma warning(disable: 4663 4018 4663 4245)
|
||||
// 4711 = function selected for automatic inline expansion
|
||||
#pragma warning(disable: 4663 4018 4663 4245 4711)
|
||||
|
||||
#include "Client.h"
|
||||
#include "protocol.h"
|
||||
#include "TCP_Socket.h"
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
#include "playerman/player.h"
|
||||
#include "ship/ship.h"
|
||||
#include <time.h>
|
||||
#include "network/multi_log.h"
|
||||
|
||||
|
||||
|
||||
#define PXO_ADDINT(n) *((int *)cur) = (n); cur += sizeof(int);
|
||||
#define PXO_ADDSTRING(x, y) memcpy(cur, x, y); cur += y;
|
||||
|
||||
@@ -163,10 +188,11 @@ int SendPlayerData(int SID, const char* player_name, const char* user, player *p
|
||||
// char *cur = PacketBuffer;
|
||||
|
||||
fs2open_pilot_update *p_update = (fs2open_pilot_update *) PacketBuffer;
|
||||
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + (sizeof(fs2open_pilot_update) - sizeof(fs2open_ship_typekill *)));
|
||||
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + 204);
|
||||
int *medals = (int*)(PacketBuffer + 204 + (sizeof(fs2open_ship_typekill) * MAX_SHIP_TYPES));
|
||||
|
||||
|
||||
p_update->pid = PCKT_PILOT_UPDATE;
|
||||
p_update->pid = PCKT_PILOT_UPDATE2;
|
||||
p_update->sid = SID;
|
||||
|
||||
strncpy(p_update->name, player_name, 65);
|
||||
@@ -186,17 +212,27 @@ int SendPlayerData(int SID, const char* player_name, const char* user, player *p
|
||||
p_update->SecHits = pl->stats.s_shots_hit;
|
||||
p_update->SecFHits = pl->stats.s_bonehead_hits;
|
||||
p_update->ship_types = MAX_SHIP_TYPES;
|
||||
p_update->num_medals = NUM_MEDALS;
|
||||
p_update->rank = pl->stats.rank;
|
||||
|
||||
for (int i = 0; i < MAX_SHIP_TYPES; i++)
|
||||
int i;
|
||||
for (i = 0; i < MAX_SHIP_TYPES; i++)
|
||||
{
|
||||
|
||||
strncpy(type_kills[i].name, Ship_info[i].name, 32);
|
||||
type_kills[i].kills = pl->stats.kills[i];
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < NUM_MEDALS; i++)
|
||||
{
|
||||
|
||||
int packet_size = 194; // size of all the ints only
|
||||
medals[i] = pl->stats.medals[i];
|
||||
}
|
||||
|
||||
int packet_size = 204; // size of all the ints only
|
||||
packet_size += sizeof(fs2open_ship_typekill) * MAX_SHIP_TYPES; // add the size of the ship_kills array
|
||||
packet_size += sizeof(int) * NUM_MEDALS; // add the size of the ship_kills array
|
||||
|
||||
// send Packet
|
||||
if (Socket.SendData(PacketBuffer, packet_size) == -1)
|
||||
@@ -241,7 +277,7 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
timeout = timeout * CLK_TCK;
|
||||
|
||||
memset((char *) &prq_packet, 0, sizeof(fs2open_get_pilot));
|
||||
prq_packet.pid = PCKT_PILOT_GET;
|
||||
prq_packet.pid = PCKT_PILOT_GET2;
|
||||
prq_packet.sid = SID;
|
||||
strncpy(prq_packet.pilotname, player_name, 64);
|
||||
prq_packet.create = CanCreate;
|
||||
@@ -255,9 +291,10 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
char PacketBuffer[16384]; // 16K should be enough i think..... I HOPE!
|
||||
fs2open_pilot_reply *p_reply = (fs2open_pilot_reply *) PacketBuffer;
|
||||
memset(PacketBuffer, 0, 16384);
|
||||
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + sizeof(fs2open_pilot_reply) - sizeof(fs2open_ship_typekill *));
|
||||
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + 72);
|
||||
int *medals = NULL; //(int*)(PacketBuffer+72+(sizeof(fs2open_ship_typekill) * pilotrep.ship_types));
|
||||
|
||||
int CheckSize = sizeof(fs2open_pilot_reply) - sizeof(fs2open_ship_typekill *) - 2; //2 for the weird stinking msvc stuff
|
||||
int CheckSize = 72, i;
|
||||
int recvsize = 0, rs2;
|
||||
Sleep(2); // give them a second
|
||||
int starttime = clock();
|
||||
@@ -274,7 +311,10 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
continue;
|
||||
}
|
||||
|
||||
CheckSize += sizeof(fs2open_ship_typekill) * p_reply->ship_types;
|
||||
if (p_reply->replytype == 0)
|
||||
CheckSize += (sizeof(fs2open_ship_typekill) * p_reply->ship_types) + (sizeof(int) * p_reply->num_medals);
|
||||
else
|
||||
CheckSize = 8;
|
||||
|
||||
ml_printf("Precompletion Pilot Update: CheckSize = %d, recvsize = %d", CheckSize, recvsize);
|
||||
while (CheckSize - recvsize > 0 && (clock() - starttime) <= timeout)
|
||||
@@ -295,7 +335,8 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
medals = (int*)(PacketBuffer+72+(sizeof(fs2open_ship_typekill) * p_reply->ship_types));
|
||||
|
||||
|
||||
if (p_reply->replytype > 1)
|
||||
@@ -315,6 +356,7 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
pl->stats.s_shots_fired = p_reply->SecShots;
|
||||
pl->stats.s_shots_hit = p_reply->SecHits;
|
||||
pl->stats.s_bonehead_hits = p_reply->SecFHits;
|
||||
pl->stats.rank = p_reply->rank;
|
||||
|
||||
|
||||
if (p_reply->ship_types == 0)
|
||||
@@ -322,12 +364,22 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
else
|
||||
{
|
||||
// i should really assert p_reply->ship_types == MAX_SHIP_TYPES
|
||||
for (int i = 0; i < MAX_SHIP_TYPES && p_reply->ship_types; i++)
|
||||
for (i = 0; i < MAX_SHIP_TYPES && p_reply->ship_types; i++)
|
||||
{
|
||||
pl->stats.kills[i] = type_kills[i].kills;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (p_reply->num_medals == 0)
|
||||
memset(pl->stats.medals, 0, sizeof(int) * NUM_MEDALS);
|
||||
else
|
||||
{
|
||||
// i should really assert p_reply->ship_types == MAX_SHIP_TYPES
|
||||
for (i = 0; i < NUM_MEDALS && p_reply->num_medals; i++)
|
||||
{
|
||||
pl->stats.medals[i] = medals[i];
|
||||
}
|
||||
}
|
||||
|
||||
// ignored on load... fs2 doesn't need this
|
||||
// type_kills[index].name[65] = Ship_info[index].name[32]
|
||||
@@ -342,7 +394,87 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
|
||||
|
||||
return -1;
|
||||
}
|
||||
//**************************************************************************************************************************************************
|
||||
|
||||
|
||||
|
||||
fs2open_banmask* GetBanList(int &numBanMasks, TCP_Socket &Socket, int timeout)
|
||||
{
|
||||
// Clear any old dead crap data
|
||||
Socket.IgnorePackets();
|
||||
|
||||
fs2open_banlist_request br_packet;
|
||||
br_packet.pid = PCKT_BANLIST_RQST;
|
||||
br_packet.reserved = 0;
|
||||
|
||||
|
||||
timeout = timeout * CLK_TCK;
|
||||
|
||||
//std::string sender = masterserver;
|
||||
|
||||
// send Packet
|
||||
if (Socket.SendData((char *)&br_packet, sizeof(fs2open_banlist_request)) == -1)
|
||||
return NULL;
|
||||
|
||||
char PacketBuffer[16384]; // 16K should be enough i think..... I HOPE!
|
||||
fs2open_banlist_reply *banreply_ptr = (fs2open_banlist_reply *) PacketBuffer;
|
||||
|
||||
fs2open_banmask *masks = NULL;
|
||||
numBanMasks = 0;
|
||||
Sleep(1); //lets give them a second
|
||||
|
||||
int starttime = clock();
|
||||
|
||||
int recvsize = 0, rs2;
|
||||
int CheckSize = sizeof(int) * 2;
|
||||
|
||||
|
||||
while ((clock() - starttime) <= timeout)
|
||||
{
|
||||
|
||||
if (Socket.DataReady() && (recvsize = Socket.GetData(PacketBuffer, 16384)) != -1)
|
||||
{
|
||||
if (banreply_ptr->pid != PCKT_BANLIST_RPLY)
|
||||
{
|
||||
continue; // skip and ignore this packet
|
||||
}
|
||||
|
||||
|
||||
CheckSize += banreply_ptr->num_ban_masks * sizeof(fs2open_banmask);
|
||||
|
||||
ml_printf("Precompletion Table Get: CheckSize = %d, recvsize = %d", CheckSize, recvsize);
|
||||
while (CheckSize - recvsize > 0 && (clock() - starttime) <= timeout)
|
||||
{
|
||||
if (Socket.DataReady())
|
||||
{
|
||||
rs2 = Socket.GetData(PacketBuffer+recvsize, 16384-recvsize);
|
||||
ml_printf("Banlist Completetion: Got Additional %u bytes", rs2);
|
||||
recvsize += rs2;
|
||||
}
|
||||
}
|
||||
ml_printf("PostCompletion Banlist Get: CheckSize = %u, recvsize = %u", CheckSize, recvsize);
|
||||
|
||||
if ((clock() - starttime) >= timeout)
|
||||
{
|
||||
ml_printf("Banlist Transfer completetion timed out");
|
||||
break;
|
||||
}
|
||||
|
||||
masks = new fs2open_banmask[banreply_ptr->num_ban_masks];
|
||||
memcpy(masks, PacketBuffer + 8, sizeof(fs2open_banmask) * banreply_ptr->num_ban_masks); // packet buffer will be two ints then the array;
|
||||
numBanMasks = banreply_ptr->num_ban_masks;
|
||||
|
||||
|
||||
return masks;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
}
|
||||
//**************************************************************************************************************************************************
|
||||
|
||||
|
||||
@@ -546,7 +678,7 @@ int Fs2OpenPXO_Login(const char* username, const char* password, TCP_Socket &Soc
|
||||
|
||||
if (Socket.SendData((char *) &loginpckt, sizeof(loginpckt)) == -1)
|
||||
{
|
||||
cout << "Error Sending Packet" << endl;
|
||||
std::cout << "Error Sending Packet" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -699,4 +831,17 @@ int GetPingReply(TCP_Socket &Socket)
|
||||
Socket.GetData((char *)&rping, sizeof(fs2open_pingreply));
|
||||
|
||||
return int( float(clock() - rping.time)/2.0 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************************************************************************************
|
||||
|
||||
void SendPingReply(TCP_Socket &Socket, int tstamp)
|
||||
{
|
||||
|
||||
fs2open_pingreply rping;
|
||||
rping.pid = PCKT_PINGREPLY;
|
||||
rping.time = tstamp;
|
||||
|
||||
Socket.SendData((char*)&rping, sizeof(rping));
|
||||
}
|
||||
@@ -10,12 +10,23 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/TCP_Socket.cpp $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2004-11-18 00:05:36 $
|
||||
* $Author: Goober5000 $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.11 2004/07/26 20:47:29 Kazan
|
||||
* remove MCD complete
|
||||
*
|
||||
* Revision 1.10 2004/07/12 16:32:46 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 1.9 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.8 2004/03/09 17:59:01 Kazan
|
||||
* Disabled multithreaded TCP_Socket in favor of safer single threaded
|
||||
* FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
|
||||
@@ -47,16 +58,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
#pragma warning(disable:4511) // copy constructor could not be generated
|
||||
#pragma warning(disable:4512) // assignment operator could not be generated
|
||||
#pragma warning(disable:4711) // function selected for inlining
|
||||
// 4100 = unreferenced formal parameter
|
||||
// 4511 = copy constructor could not be generated
|
||||
// 4512 = assignment operator could not be generated
|
||||
// 4711 = function selected for inlining
|
||||
#pragma warning(disable:4100 4511 4512 4711)
|
||||
|
||||
#include "TCP_Socket.h"
|
||||
//#include <process.h>
|
||||
//#include <iostream.h>
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TCP_Socket Implementation
|
||||
//**************************************************************************
|
||||
|
||||
@@ -11,12 +11,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/TCP_Socket.h $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2004-08-11 05:06:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.6 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.5 2004/03/09 17:59:01 Kazan
|
||||
* Disabled multithreaded TCP_Socket in favor of safer single threaded
|
||||
* FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
|
||||
@@ -31,6 +36,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
// Enable Multithread
|
||||
//#define MT_TCP_Socket
|
||||
|
||||
|
||||
@@ -10,12 +10,23 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/protocol.h $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2004-08-11 05:06:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.13 2004/07/09 22:05:32 Kazan
|
||||
* fs2netd 1.0 RC5 full support - Rank and Medal updates
|
||||
*
|
||||
* Revision 1.12 2004/07/07 21:00:06 Kazan
|
||||
* FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages
|
||||
*
|
||||
* Revision 1.11 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.10 2004/03/07 23:07:20 Kazan
|
||||
* [Incomplete] Readd of Software renderer so Standalone server works
|
||||
*
|
||||
@@ -36,6 +47,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#if !defined(__pxo_protocol_h_)
|
||||
#define __pxo_protocol_h_
|
||||
|
||||
@@ -65,6 +77,17 @@
|
||||
#define PCKT_MISSION_CHECK 0xF
|
||||
#define PCKT_MCHECK_REPLY 0x10
|
||||
|
||||
#define PCKT_BANLIST_RQST 0x11
|
||||
#define PCKT_BANLIST_RPLY 0x12
|
||||
|
||||
// this only goes from the server out
|
||||
#define PCKT_NETOWRK_WALL 0x13
|
||||
|
||||
// more advanced version of this packet
|
||||
// different ID's for backward compat
|
||||
#define PCKT_PILOT_UPDATE2 0x14
|
||||
#define PCKT_PILOT_GET2 0x15
|
||||
|
||||
#define FS2OPEN_PXO_PORT 12000
|
||||
#define FS2OPEN_CLIENT_PORT FS2OPEN_PXO_PORT + 1
|
||||
|
||||
@@ -184,6 +207,7 @@ struct fs2open_pxo_missreply
|
||||
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
|
||||
|
||||
// ----- Pilot Management -----
|
||||
|
||||
|
||||
@@ -191,6 +215,7 @@ struct fs2open_pxo_missreply
|
||||
struct fs2open_get_pilot
|
||||
{
|
||||
int pid; // 0x9 ( PCKT_PILOT_GET )
|
||||
// 0x15 (PCKT_PILOT_GET2)
|
||||
int sid; // session id returned upon login
|
||||
char pilotname[65];
|
||||
bool create; // create pilot
|
||||
@@ -226,7 +251,18 @@ struct fs2open_pilot_reply
|
||||
unsigned int SecFHits;
|
||||
|
||||
unsigned int ship_types;
|
||||
|
||||
|
||||
// if request was a PCKT_PILOT_GET2
|
||||
int rank;
|
||||
int num_medals;
|
||||
// ----------------------
|
||||
|
||||
fs2open_ship_typekill *type_kills;
|
||||
|
||||
// if request was a PCKT_PILOT_GET2
|
||||
int *medals;
|
||||
// ----------------------
|
||||
};
|
||||
|
||||
|
||||
@@ -234,7 +270,8 @@ struct fs2open_pilot_reply
|
||||
struct fs2open_pilot_update
|
||||
{
|
||||
int pid; // 0x0B (PCKT_PILOT_UPDATE)
|
||||
int sid; // session id
|
||||
// 0x14 (PCKT_PILOT_UPDATE2)
|
||||
int sid; //session id
|
||||
|
||||
char name[65];
|
||||
char user[65];
|
||||
@@ -253,10 +290,22 @@ struct fs2open_pilot_update
|
||||
unsigned int SecShots;
|
||||
unsigned int SecHits;
|
||||
unsigned int SecFHits;
|
||||
|
||||
unsigned int ship_types;
|
||||
fs2open_ship_typekill *type_kills;
|
||||
|
||||
unsigned int ship_types;
|
||||
|
||||
// if PCKT_PILOT_UPDATE2
|
||||
int rank;
|
||||
int num_medals;
|
||||
// ----------------------
|
||||
|
||||
// added with update2.. but always been there TYVM MSVC
|
||||
short reserved; // realign to 4-byte boundry --- MSVC does this automagically.. let's force it
|
||||
|
||||
fs2open_ship_typekill *type_kills;
|
||||
|
||||
// if PCKT_PILOT_UPDATE2
|
||||
int *medals;
|
||||
// ----------------------
|
||||
|
||||
};
|
||||
|
||||
@@ -268,6 +317,7 @@ struct fs2open_pilot_updatereply
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ---------------- Generic Ping -----------------
|
||||
|
||||
// ping time is in ticks returned by clock()
|
||||
@@ -283,5 +333,34 @@ struct fs2open_pingreply
|
||||
int time;
|
||||
};
|
||||
|
||||
// ---------------- Banlist Packets -----------------
|
||||
|
||||
struct fs2open_banlist_request
|
||||
{
|
||||
int pid; // 0x11 (PCKT_BANLIST_RQST)
|
||||
int reserved;
|
||||
};
|
||||
|
||||
|
||||
struct fs2open_banmask
|
||||
{
|
||||
char ip_mask[16]; // up to 15 chars (123.123.123.123) and a NULL
|
||||
};
|
||||
|
||||
struct fs2open_banlist_reply
|
||||
{
|
||||
int pid; // 0x12 (PCKT_BANLIST_RPLY)
|
||||
int num_ban_masks;
|
||||
fs2open_banmask* masks;
|
||||
};
|
||||
|
||||
// ---------------- Global Message Packet -----------------
|
||||
|
||||
|
||||
struct fs2open_network_wall
|
||||
{
|
||||
int pid; // 0x13 (PCKT_NETOWRK_WALL)
|
||||
char message[252];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -10,12 +10,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/udpsocket.cpp $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2004-07-26 20:47:29 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.6 2004/07/12 16:32:46 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 1.5 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.4 2004/02/21 00:59:43 Kazan
|
||||
* FS2NETD License Comments
|
||||
*
|
||||
@@ -36,6 +44,9 @@
|
||||
|
||||
#include "udpsocket.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(WIN32)
|
||||
//*******************************************************************************
|
||||
// Windows Version
|
||||
|
||||
@@ -10,12 +10,17 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/fs2open_pxo/udpsocket.h $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2004-03-31 05:42:26 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2004-08-11 05:06:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.4 2004/03/31 05:42:26 Goober5000
|
||||
* got rid of all those nasty warnings from xlocale and so forth; also added comments
|
||||
* for #pragma warning disable to indicate the message being disabled
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 1.3 2004/02/21 00:59:43 Kazan
|
||||
* FS2NETD License Comments
|
||||
*
|
||||
@@ -26,6 +31,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#if !defined(__protocol_h_)
|
||||
#define __protocol_h_
|
||||
|
||||
|
||||
@@ -9,13 +9,19 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/GameHelp/ContextHelp.cpp $
|
||||
* $Revision: 2.4 $
|
||||
* $Date: 2004-03-08 22:02:38 $
|
||||
* $Revision: 2.6 $
|
||||
* $Date: 2004-07-26 20:47:30 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Functions to drive the context-sensitive help
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.5 2004/07/12 16:32:47 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.4 2004/03/08 22:02:38 Kazan
|
||||
* Lobby GUI screen restored
|
||||
*
|
||||
* Revision 2.3 2004/03/05 09:01:58 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
@@ -132,6 +138,7 @@
|
||||
#include "globalincs/systemvars.h"
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// private function prototypes / structs
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __CONTEXTHELP_H__
|
||||
#define __CONTEXTHELP_H__
|
||||
|
||||
|
||||
@@ -9,13 +9,20 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/GameHelp/GameplayHelp.cpp $
|
||||
* $Revision: 2.3 $
|
||||
* $Date: 2004-03-05 09:01:58 $
|
||||
* $Author: Goober5000 $
|
||||
* $Revision: 2.5 $
|
||||
* $Date: 2004-07-26 20:47:30 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Module for displaying in-game help
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 2.4 2004/07/12 16:32:47 Kazan
|
||||
* MCD - define _MCD_CHECK to use memory tracking
|
||||
*
|
||||
* Revision 2.3 2004/03/05 09:01:58 Goober5000
|
||||
* Uber pass at reducing #includes
|
||||
* --Goober5000
|
||||
*
|
||||
* Revision 2.2 2003/03/18 10:07:02 unknownplayer
|
||||
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
|
||||
*
|
||||
@@ -141,6 +148,8 @@
|
||||
#include "weapon/beam.h"
|
||||
#include "sound/audiostr.h"
|
||||
|
||||
|
||||
|
||||
// text positioning constats
|
||||
#define TITLE_Y 35
|
||||
#define Y_START 70
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
/*
|
||||
* $Logfile: /Freespace2/code/GameHelp/GameplayHelp.h $
|
||||
* $Revision: 2.0 $
|
||||
* $Date: 2002-06-03 04:02:22 $
|
||||
* $Author: penguin $
|
||||
* $Revision: 2.1 $
|
||||
* $Date: 2004-08-11 05:06:23 $
|
||||
* $Author: Kazan $
|
||||
*
|
||||
* Header for displaying in-game help
|
||||
*
|
||||
* $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:07 mharris
|
||||
* Initial checkin - converted filenames and includes to lower case
|
||||
*
|
||||
@@ -33,6 +36,7 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "PreProcDefines.h"
|
||||
#ifndef __GAMEPLAY_HELP_H__
|
||||
#define __GAMEPLAY_HELP_H__
|
||||
|
||||
|
||||
Loaded 100 of 557 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user