initial source commit
|
@ -0,0 +1,183 @@
|
|||
##### DP_MAKE_TARGET autodetection and arch specific variables #####
|
||||
|
||||
.ifndef DP_MAKE_TARGET
|
||||
|
||||
DP_MAKE_TARGET=bsd
|
||||
|
||||
.endif
|
||||
DP_ARCH != uname
|
||||
|
||||
# Makefile name
|
||||
MAKEFILE=BSDmakefile
|
||||
|
||||
# Commands
|
||||
CMD_RM=$(CMD_UNIXRM)
|
||||
CMD_CP=$(CMD_UNIXCP)
|
||||
CMD_MKDIR=$(CMD_UNIXMKDIR)
|
||||
|
||||
# default targets
|
||||
TARGETS_DEBUG=sv-debug cl-debug sdl-debug
|
||||
TARGETS_PROFILE=sv-profile cl-profile sdl-profile
|
||||
TARGETS_RELEASE=sv-release cl-release sdl-release
|
||||
TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile
|
||||
TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz
|
||||
|
||||
# Link options
|
||||
DP_LINK_ZLIB?=shared
|
||||
DP_LINK_JPEG?=shared
|
||||
DP_LINK_ODE?=dlopen
|
||||
DP_LINK_CRYPTO?=dlopen
|
||||
DP_LINK_CRYPTO_RIJNDAEL?=dlopen
|
||||
|
||||
###### Optional features #####
|
||||
DP_CDDA?=enabled
|
||||
.if $(DP_CDDA) == "enabled"
|
||||
OBJ_SDLCD=$(OBJ_CD_COMMON) cd_sdl.o
|
||||
OBJ_BSDCD=$(OBJ_CD_COMMON) cd_bsd.o
|
||||
.else
|
||||
OBJ_SDLCD=$(OBJ_CD_COMMON) $(OBJ_NOCD)
|
||||
OBJ_BSDCD=$(OBJ_CD_COMMON) $(OBJ_NOCD)
|
||||
.endif
|
||||
|
||||
DP_VIDEO_CAPTURE?=enabled
|
||||
.if $(DP_VIDEO_CAPTURE) == "enabled"
|
||||
CFLAGS_VIDEO_CAPTURE=-DCONFIG_VIDEO_CAPTURE
|
||||
OBJ_VIDEO_CAPTURE = cap_avi.o cap_ogg.o
|
||||
.else
|
||||
CFLAGS_VIDEO_CAPTURE=
|
||||
OBJ_VIDEO_CAPTURE =
|
||||
.endif
|
||||
|
||||
# X11 libs
|
||||
UNIX_X11LIBPATH=/usr/X11R6/lib
|
||||
|
||||
# BSD configuration
|
||||
.if $(DP_MAKE_TARGET) == "bsd"
|
||||
|
||||
# FreeBSD uses OSS
|
||||
.if $(DP_ARCH) == "FreeBSD"
|
||||
DEFAULT_SNDAPI=OSS
|
||||
.else
|
||||
DEFAULT_SNDAPI=BSD
|
||||
.endif
|
||||
OBJ_CD=$(OBJ_BSDCD)
|
||||
|
||||
OBJ_CL=$(OBJ_GLX)
|
||||
OBJ_ICON=
|
||||
OBJ_ICON_NEXUIZ=
|
||||
|
||||
LDFLAGS_CL=$(LDFLAGS_BSDCL)
|
||||
LDFLAGS_SV=$(LDFLAGS_BSDSV)
|
||||
LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
|
||||
|
||||
SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
|
||||
SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
|
||||
SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
|
||||
|
||||
EXE_CL=$(EXE_UNIXCL)
|
||||
EXE_SV=$(EXE_UNIXSV)
|
||||
EXE_SDL=$(EXE_UNIXSDL)
|
||||
EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
|
||||
EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
|
||||
EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
|
||||
|
||||
# set these to "" if you want to use dynamic loading instead
|
||||
# zlib
|
||||
.if $(DP_LINK_ZLIB) == "shared"
|
||||
CFLAGS_LIBZ=-DLINK_TO_ZLIB
|
||||
LIB_Z=-lz
|
||||
.else
|
||||
CFLAGS_LIBZ=
|
||||
LIB_Z=
|
||||
.endif
|
||||
|
||||
# jpeg
|
||||
.if $(DP_LINK_JPEG) == "shared"
|
||||
CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
|
||||
LIB_JPEG=-ljpeg
|
||||
.else
|
||||
CFLAGS_LIBJPEG=
|
||||
LIB_JPEG=
|
||||
.endif
|
||||
|
||||
# ode
|
||||
.if $(DP_LINK_ODE) == "shared"
|
||||
ODE_CONFIG?=ode-config
|
||||
LIB_ODE=`$(ODE_CONFIG) --libs`
|
||||
CFLAGS_ODE=`$(ODE_CONFIG) --cflags` -DUSEODE -DLINK_TO_LIBODE
|
||||
.else
|
||||
LIB_ODE=
|
||||
CFLAGS_ODE=-DUSEODE
|
||||
.endif
|
||||
|
||||
# d0_blind_id
|
||||
.if $(DP_LINK_CRYPTO) == "shared"
|
||||
LIB_CRYPTO=-ld0_blind_id
|
||||
CFLAGS_CRYPTO=-DLINK_TO_CRYPTO
|
||||
.else
|
||||
LIB_CRYPTO=
|
||||
CFLAGS_CRYPTO=
|
||||
.endif
|
||||
.if $(DP_LINK_CRYPTO_RIJNDAEL) == "shared"
|
||||
LIB_CRYPTO_RIJNDAEL=-ld0_rijndael
|
||||
CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_CRYPTO_RIJNDAEL
|
||||
.else
|
||||
LIB_CRYPTO_RIJNDAEL=
|
||||
CFLAGS_CRYPTO_RIJNDAEL=
|
||||
.endif
|
||||
|
||||
.endif
|
||||
|
||||
|
||||
##### Sound configuration #####
|
||||
|
||||
.ifndef DP_SOUND_API
|
||||
DP_SOUND_API=$(DEFAULT_SNDAPI)
|
||||
.endif
|
||||
|
||||
# NULL: no sound
|
||||
.if $(DP_SOUND_API) == "NULL"
|
||||
OBJ_SOUND=$(OBJ_SND_NULL)
|
||||
LIB_SOUND=$(LIB_SND_NULL)
|
||||
.endif
|
||||
|
||||
# OSS: Open Sound System
|
||||
.if $(DP_SOUND_API) == "OSS"
|
||||
OBJ_SOUND=$(OBJ_SND_OSS)
|
||||
LIB_SOUND=$(LIB_SND_OSS)
|
||||
.endif
|
||||
|
||||
# BSD: BSD / Sun audio API
|
||||
.if $(DP_SOUND_API) == "BSD"
|
||||
OBJ_SOUND=$(OBJ_SND_BSD)
|
||||
LIB_SOUND=$(LIB_SND_BSD)
|
||||
.endif
|
||||
|
||||
|
||||
##### Extra CFLAGS #####
|
||||
|
||||
CFLAGS_MAKEDEP=-MD
|
||||
.ifdef DP_FS_BASEDIR
|
||||
CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
|
||||
.else
|
||||
CFLAGS_FS=
|
||||
.endif
|
||||
|
||||
CFLAGS_PRELOAD=
|
||||
.ifdef DP_PRELOAD_DEPENDENCIES
|
||||
LDFLAGS_CL+=$(LDFLAGS_UNIXCL_PRELOAD)
|
||||
LDFLAGS_SV+=$(LDFLAGS_UNIXSV_PRELOAD)
|
||||
LDFLAGS_SDL+=$(LDFLAGS_UNIXSDL_PRELOAD)
|
||||
CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
|
||||
.endif
|
||||
|
||||
|
||||
##### BSD Make specific definitions #####
|
||||
|
||||
MAKE:=$(MAKE) -f BSDmakefile
|
||||
|
||||
DO_LD=$(CC) -o ../../../$@ $> $(LDFLAGS)
|
||||
|
||||
|
||||
##### Definitions shared by all makefiles #####
|
||||
.include "makefile.inc"
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,867 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
|
||||
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
|
||||
74063A3E1751ADDB0015D12C /* mod_skeletal_animatevertices_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = 74063A3C1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.c */; };
|
||||
74063A401751B0250015D12C /* cd_null.c in Sources */ = {isa = PBXBuildFile; fileRef = 74063A3F1751B0250015D12C /* cd_null.c */; };
|
||||
74063A421751B0AF0015D12C /* clvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 74063A411751B0AF0015D12C /* clvm_cmds.c */; };
|
||||
74063A491751B9B60015D12C /* libSDL2-ios-armv7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74063A471751B9B60015D12C /* libSDL2-ios-armv7.a */; };
|
||||
74063A4A1751B9B60015D12C /* libSDL2-ios-simulator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74063A481751B9B60015D12C /* libSDL2-ios-simulator.a */; };
|
||||
74063A511751C4560015D12C /* gamedata in Resources */ = {isa = PBXBuildFile; fileRef = 74063A501751C4560015D12C /* gamedata */; };
|
||||
7463B77812F9CE6B00983F6A /* bih.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C012F9CE6B00983F6A /* bih.c */; };
|
||||
7463B77912F9CE6B00983F6A /* cap_avi.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C312F9CE6B00983F6A /* cap_avi.c */; };
|
||||
7463B77A12F9CE6B00983F6A /* cap_ogg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C512F9CE6B00983F6A /* cap_ogg.c */; };
|
||||
7463B77C12F9CE6B00983F6A /* cd_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C812F9CE6B00983F6A /* cd_shared.c */; };
|
||||
7463B77D12F9CE6B00983F6A /* cl_collision.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CA12F9CE6B00983F6A /* cl_collision.c */; };
|
||||
7463B77E12F9CE6B00983F6A /* cl_demo.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CC12F9CE6B00983F6A /* cl_demo.c */; };
|
||||
7463B77F12F9CE6B00983F6A /* cl_dyntexture.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CD12F9CE6B00983F6A /* cl_dyntexture.c */; };
|
||||
7463B78112F9CE6B00983F6A /* cl_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D112F9CE6B00983F6A /* cl_input.c */; };
|
||||
7463B78212F9CE6B00983F6A /* cl_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D212F9CE6B00983F6A /* cl_main.c */; };
|
||||
7463B78312F9CE6B00983F6A /* cl_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D312F9CE6B00983F6A /* cl_parse.c */; };
|
||||
7463B78412F9CE6B00983F6A /* cl_particles.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D412F9CE6B00983F6A /* cl_particles.c */; };
|
||||
7463B78512F9CE6B00983F6A /* cl_screen.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D512F9CE6B00983F6A /* cl_screen.c */; };
|
||||
7463B78612F9CE6B00983F6A /* cl_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D712F9CE6B00983F6A /* cl_video.c */; };
|
||||
7463B78712F9CE6B00983F6A /* cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6DC12F9CE6B00983F6A /* cmd.c */; };
|
||||
7463B78812F9CE6B00983F6A /* collision.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6DE12F9CE6B00983F6A /* collision.c */; };
|
||||
7463B78912F9CE6B00983F6A /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E012F9CE6B00983F6A /* common.c */; };
|
||||
7463B78A12F9CE6B00983F6A /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E212F9CE6B00983F6A /* console.c */; };
|
||||
7463B78B12F9CE6B00983F6A /* crypto.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E412F9CE6B00983F6A /* crypto.c */; };
|
||||
7463B78C12F9CE6B00983F6A /* csprogs.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E612F9CE6B00983F6A /* csprogs.c */; };
|
||||
7463B78D12F9CE6B00983F6A /* curves.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E812F9CE6B00983F6A /* curves.c */; };
|
||||
7463B78E12F9CE6B00983F6A /* cvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6EA12F9CE6B00983F6A /* cvar.c */; };
|
||||
7463B78F12F9CE6B00983F6A /* dpsoftrast.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6EC12F9CE6B00983F6A /* dpsoftrast.c */; };
|
||||
7463B79012F9CE6B00983F6A /* dpvsimpledecode.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6EE12F9CE6B00983F6A /* dpvsimpledecode.c */; };
|
||||
7463B79112F9CE6B00983F6A /* filematch.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F112F9CE6B00983F6A /* filematch.c */; };
|
||||
7463B79212F9CE6B00983F6A /* fractalnoise.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F212F9CE6B00983F6A /* fractalnoise.c */; };
|
||||
7463B79312F9CE6B00983F6A /* fs.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F312F9CE6B00983F6A /* fs.c */; };
|
||||
7463B79412F9CE6B00983F6A /* ft2.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F712F9CE6B00983F6A /* ft2.c */; };
|
||||
7463B79512F9CE6B00983F6A /* gl_backend.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F912F9CE6B00983F6A /* gl_backend.c */; };
|
||||
7463B79612F9CE6B00983F6A /* gl_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FB12F9CE6B00983F6A /* gl_draw.c */; };
|
||||
7463B79712F9CE6B00983F6A /* gl_rmain.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FC12F9CE6B00983F6A /* gl_rmain.c */; };
|
||||
7463B79812F9CE6B00983F6A /* gl_rsurf.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FD12F9CE6B00983F6A /* gl_rsurf.c */; };
|
||||
7463B79912F9CE6B00983F6A /* gl_textures.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FE12F9CE6B00983F6A /* gl_textures.c */; };
|
||||
7463B79A12F9CE6B00983F6A /* hmac.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70012F9CE6B00983F6A /* hmac.c */; };
|
||||
7463B79B12F9CE6B00983F6A /* host_cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70212F9CE6B00983F6A /* host_cmd.c */; };
|
||||
7463B79C12F9CE6B00983F6A /* host.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70312F9CE6B00983F6A /* host.c */; };
|
||||
7463B79D12F9CE6B00983F6A /* image_png.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70412F9CE6B00983F6A /* image_png.c */; };
|
||||
7463B79E12F9CE6B00983F6A /* image.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70612F9CE6B00983F6A /* image.c */; };
|
||||
7463B79F12F9CE6B00983F6A /* jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70A12F9CE6B00983F6A /* jpeg.c */; };
|
||||
7463B7A012F9CE6B00983F6A /* keys.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70C12F9CE6B00983F6A /* keys.c */; };
|
||||
7463B7A112F9CE6B00983F6A /* lhnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70F12F9CE6B00983F6A /* lhnet.c */; };
|
||||
7463B7A212F9CE6B00983F6A /* libcurl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71112F9CE6B00983F6A /* libcurl.c */; };
|
||||
7463B7A312F9CE6B00983F6A /* mathlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71312F9CE6B00983F6A /* mathlib.c */; };
|
||||
7463B7A412F9CE6B00983F6A /* matrixlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71512F9CE6B00983F6A /* matrixlib.c */; };
|
||||
7463B7A512F9CE6B00983F6A /* mdfour.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71712F9CE6B00983F6A /* mdfour.c */; };
|
||||
7463B7A612F9CE6B00983F6A /* menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71912F9CE6B00983F6A /* menu.c */; };
|
||||
7463B7A712F9CE6B00983F6A /* meshqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71B12F9CE6B00983F6A /* meshqueue.c */; };
|
||||
7463B7A812F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71D12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c */; };
|
||||
7463B7A912F9CE6B00983F6A /* model_alias.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71F12F9CE6B00983F6A /* model_alias.c */; };
|
||||
7463B7AA12F9CE6B00983F6A /* model_brush.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72112F9CE6B00983F6A /* model_brush.c */; };
|
||||
7463B7AB12F9CE6B00983F6A /* model_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72612F9CE6B00983F6A /* model_shared.c */; };
|
||||
7463B7AC12F9CE6B00983F6A /* model_sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72812F9CE6B00983F6A /* model_sprite.c */; };
|
||||
7463B7AD12F9CE6B00983F6A /* mvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72D12F9CE6B00983F6A /* mvm_cmds.c */; };
|
||||
7463B7AE12F9CE6B00983F6A /* netconn.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72E12F9CE6B00983F6A /* netconn.c */; };
|
||||
7463B7AF12F9CE6B00983F6A /* palette.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73012F9CE6B00983F6A /* palette.c */; };
|
||||
7463B7B012F9CE6B00983F6A /* polygon.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73212F9CE6B00983F6A /* polygon.c */; };
|
||||
7463B7B112F9CE6B00983F6A /* portals.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73412F9CE6B00983F6A /* portals.c */; };
|
||||
7463B7B212F9CE6B00983F6A /* protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73A12F9CE6B00983F6A /* protocol.c */; };
|
||||
7463B7B312F9CE6B00983F6A /* prvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73C12F9CE6B00983F6A /* prvm_cmds.c */; };
|
||||
7463B7B412F9CE6B00983F6A /* prvm_edict.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73E12F9CE6B00983F6A /* prvm_edict.c */; };
|
||||
7463B7B512F9CE6B00983F6A /* prvm_exec.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73F12F9CE6B00983F6A /* prvm_exec.c */; };
|
||||
7463B7B612F9CE6B00983F6A /* r_explosion.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74312F9CE6B00983F6A /* r_explosion.c */; };
|
||||
7463B7B712F9CE6B00983F6A /* r_lightning.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74412F9CE6B00983F6A /* r_lightning.c */; };
|
||||
7463B7B812F9CE6B00983F6A /* r_modules.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74512F9CE6B00983F6A /* r_modules.c */; };
|
||||
7463B7B912F9CE6B00983F6A /* r_shadow.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74712F9CE6B00983F6A /* r_shadow.c */; };
|
||||
7463B7BA12F9CE6B00983F6A /* r_sky.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74912F9CE6B00983F6A /* r_sky.c */; };
|
||||
7463B7BB12F9CE6B00983F6A /* r_sprites.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74A12F9CE6B00983F6A /* r_sprites.c */; };
|
||||
7463B7BC12F9CE6B00983F6A /* sbar.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74E12F9CE6B00983F6A /* sbar.c */; };
|
||||
7463B7BD12F9CE6B00983F6A /* snd_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75212F9CE6B00983F6A /* snd_main.c */; };
|
||||
7463B7BE12F9CE6B00983F6A /* snd_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75412F9CE6B00983F6A /* snd_mem.c */; };
|
||||
7463B7BF12F9CE6B00983F6A /* snd_mix.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75512F9CE6B00983F6A /* snd_mix.c */; };
|
||||
7463B7C112F9CE6B00983F6A /* snd_ogg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75812F9CE6B00983F6A /* snd_ogg.c */; };
|
||||
7463B7C212F9CE6B00983F6A /* snd_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75A12F9CE6B00983F6A /* snd_sdl.c */; };
|
||||
7463B7C312F9CE6B00983F6A /* snd_wav.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75B12F9CE6B00983F6A /* snd_wav.c */; };
|
||||
7463B7C412F9CE6B00983F6A /* sv_demo.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75F12F9CE6B00983F6A /* sv_demo.c */; };
|
||||
7463B7C512F9CE6B00983F6A /* sv_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76112F9CE6B00983F6A /* sv_main.c */; };
|
||||
7463B7C612F9CE6B00983F6A /* sv_move.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76212F9CE6B00983F6A /* sv_move.c */; };
|
||||
7463B7C712F9CE6B00983F6A /* sv_phys.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76312F9CE6B00983F6A /* sv_phys.c */; };
|
||||
7463B7C812F9CE6B00983F6A /* sv_user.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76412F9CE6B00983F6A /* sv_user.c */; };
|
||||
7463B7C912F9CE6B00983F6A /* svbsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76512F9CE6B00983F6A /* svbsp.c */; };
|
||||
7463B7CA12F9CE6B00983F6A /* svvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76712F9CE6B00983F6A /* svvm_cmds.c */; };
|
||||
7463B7CB12F9CE6B00983F6A /* sys_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76812F9CE6B00983F6A /* sys_sdl.c */; };
|
||||
7463B7CC12F9CE6B00983F6A /* sys_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76912F9CE6B00983F6A /* sys_shared.c */; };
|
||||
7463B7CD12F9CE6B00983F6A /* utf8lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76C12F9CE6B00983F6A /* utf8lib.c */; };
|
||||
7463B7CE12F9CE6B00983F6A /* vid_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76E12F9CE6B00983F6A /* vid_sdl.c */; };
|
||||
7463B7CF12F9CE6B00983F6A /* vid_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76F12F9CE6B00983F6A /* vid_shared.c */; };
|
||||
7463B7D012F9CE6B00983F6A /* view.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77112F9CE6B00983F6A /* view.c */; };
|
||||
7463B7D112F9CE6B00983F6A /* wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77212F9CE6B00983F6A /* wad.c */; };
|
||||
7463B7D212F9CE6B00983F6A /* world.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77412F9CE6B00983F6A /* world.c */; };
|
||||
7463B7D312F9CE6B00983F6A /* zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77612F9CE6B00983F6A /* zone.c */; };
|
||||
7463B7D912F9CF8F00983F6A /* darkplaces64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 7463B7D812F9CF8F00983F6A /* darkplaces64x64.png */; };
|
||||
7463B7EF12F9D17D00983F6A /* builddate.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B7ED12F9D17D00983F6A /* builddate.c */; };
|
||||
7463B7F012F9D17D00983F6A /* (null) in Sources */ = {isa = PBXBuildFile; };
|
||||
7487D481130102AA00AEE909 /* thread_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7487D47F130102AA00AEE909 /* thread_sdl.c */; };
|
||||
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD779EDD0E26BA1200F39101 /* CoreAudio.framework */; };
|
||||
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD77A0840E26BDB800F39101 /* AudioToolbox.framework */; };
|
||||
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
1D6058910D05DD3D006BFB54 /* DPiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DPiOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
74063A3C1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mod_skeletal_animatevertices_sse.c; sourceTree = "<group>"; };
|
||||
74063A3D1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mod_skeletal_animatevertices_sse.h; sourceTree = "<group>"; };
|
||||
74063A3F1751B0250015D12C /* cd_null.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cd_null.c; sourceTree = "<group>"; };
|
||||
74063A411751B0AF0015D12C /* clvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = clvm_cmds.c; sourceTree = "<group>"; };
|
||||
74063A471751B9B60015D12C /* libSDL2-ios-armv7.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libSDL2-ios-armv7.a"; path = "lib/libSDL2-ios-armv7.a"; sourceTree = "<group>"; };
|
||||
74063A481751B9B60015D12C /* libSDL2-ios-simulator.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libSDL2-ios-simulator.a"; path = "lib/libSDL2-ios-simulator.a"; sourceTree = "<group>"; };
|
||||
74063A501751C4560015D12C /* gamedata */ = {isa = PBXFileReference; lastKnownFileType = folder; path = gamedata; sourceTree = "<group>"; };
|
||||
7463B6C012F9CE6B00983F6A /* bih.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bih.c; sourceTree = "<group>"; };
|
||||
7463B6C112F9CE6B00983F6A /* bih.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bih.h; sourceTree = "<group>"; };
|
||||
7463B6C212F9CE6B00983F6A /* bspfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bspfile.h; sourceTree = "<group>"; };
|
||||
7463B6C312F9CE6B00983F6A /* cap_avi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cap_avi.c; sourceTree = "<group>"; };
|
||||
7463B6C412F9CE6B00983F6A /* cap_avi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cap_avi.h; sourceTree = "<group>"; };
|
||||
7463B6C512F9CE6B00983F6A /* cap_ogg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cap_ogg.c; sourceTree = "<group>"; };
|
||||
7463B6C612F9CE6B00983F6A /* cap_ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cap_ogg.h; sourceTree = "<group>"; };
|
||||
7463B6C812F9CE6B00983F6A /* cd_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cd_shared.c; sourceTree = "<group>"; };
|
||||
7463B6C912F9CE6B00983F6A /* cdaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cdaudio.h; sourceTree = "<group>"; };
|
||||
7463B6CA12F9CE6B00983F6A /* cl_collision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_collision.c; sourceTree = "<group>"; };
|
||||
7463B6CB12F9CE6B00983F6A /* cl_collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_collision.h; sourceTree = "<group>"; };
|
||||
7463B6CC12F9CE6B00983F6A /* cl_demo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_demo.c; sourceTree = "<group>"; };
|
||||
7463B6CD12F9CE6B00983F6A /* cl_dyntexture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_dyntexture.c; sourceTree = "<group>"; };
|
||||
7463B6CE12F9CE6B00983F6A /* cl_dyntexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_dyntexture.h; sourceTree = "<group>"; };
|
||||
7463B6D112F9CE6B00983F6A /* cl_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_input.c; sourceTree = "<group>"; };
|
||||
7463B6D212F9CE6B00983F6A /* cl_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_main.c; sourceTree = "<group>"; };
|
||||
7463B6D312F9CE6B00983F6A /* cl_parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_parse.c; sourceTree = "<group>"; };
|
||||
7463B6D412F9CE6B00983F6A /* cl_particles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_particles.c; sourceTree = "<group>"; };
|
||||
7463B6D512F9CE6B00983F6A /* cl_screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_screen.c; sourceTree = "<group>"; };
|
||||
7463B6D612F9CE6B00983F6A /* cl_screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_screen.h; sourceTree = "<group>"; };
|
||||
7463B6D712F9CE6B00983F6A /* cl_video.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_video.c; sourceTree = "<group>"; };
|
||||
7463B6D812F9CE6B00983F6A /* cl_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_video.h; sourceTree = "<group>"; };
|
||||
7463B6D912F9CE6B00983F6A /* client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = client.h; sourceTree = "<group>"; };
|
||||
7463B6DA12F9CE6B00983F6A /* clprogdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clprogdefs.h; sourceTree = "<group>"; };
|
||||
7463B6DB12F9CE6B00983F6A /* clvm_cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clvm_cmds.h; sourceTree = "<group>"; };
|
||||
7463B6DC12F9CE6B00983F6A /* cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cmd.c; sourceTree = "<group>"; };
|
||||
7463B6DD12F9CE6B00983F6A /* cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmd.h; sourceTree = "<group>"; };
|
||||
7463B6DE12F9CE6B00983F6A /* collision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = collision.c; sourceTree = "<group>"; };
|
||||
7463B6DF12F9CE6B00983F6A /* collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collision.h; sourceTree = "<group>"; };
|
||||
7463B6E012F9CE6B00983F6A /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = "<group>"; };
|
||||
7463B6E112F9CE6B00983F6A /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
7463B6E212F9CE6B00983F6A /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = console.c; sourceTree = "<group>"; };
|
||||
7463B6E312F9CE6B00983F6A /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = console.h; sourceTree = "<group>"; };
|
||||
7463B6E412F9CE6B00983F6A /* crypto.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crypto.c; sourceTree = "<group>"; };
|
||||
7463B6E512F9CE6B00983F6A /* crypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto.h; sourceTree = "<group>"; };
|
||||
7463B6E612F9CE6B00983F6A /* csprogs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = csprogs.c; sourceTree = "<group>"; };
|
||||
7463B6E712F9CE6B00983F6A /* csprogs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = csprogs.h; sourceTree = "<group>"; };
|
||||
7463B6E812F9CE6B00983F6A /* curves.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = curves.c; sourceTree = "<group>"; };
|
||||
7463B6E912F9CE6B00983F6A /* curves.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = curves.h; sourceTree = "<group>"; };
|
||||
7463B6EA12F9CE6B00983F6A /* cvar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cvar.c; sourceTree = "<group>"; };
|
||||
7463B6EB12F9CE6B00983F6A /* cvar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cvar.h; sourceTree = "<group>"; };
|
||||
7463B6EC12F9CE6B00983F6A /* dpsoftrast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dpsoftrast.c; sourceTree = "<group>"; };
|
||||
7463B6ED12F9CE6B00983F6A /* dpsoftrast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dpsoftrast.h; sourceTree = "<group>"; };
|
||||
7463B6EE12F9CE6B00983F6A /* dpvsimpledecode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dpvsimpledecode.c; sourceTree = "<group>"; };
|
||||
7463B6EF12F9CE6B00983F6A /* dpvsimpledecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dpvsimpledecode.h; sourceTree = "<group>"; };
|
||||
7463B6F012F9CE6B00983F6A /* draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = draw.h; sourceTree = "<group>"; };
|
||||
7463B6F112F9CE6B00983F6A /* filematch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = filematch.c; sourceTree = "<group>"; };
|
||||
7463B6F212F9CE6B00983F6A /* fractalnoise.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fractalnoise.c; sourceTree = "<group>"; };
|
||||
7463B6F312F9CE6B00983F6A /* fs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fs.c; sourceTree = "<group>"; };
|
||||
7463B6F412F9CE6B00983F6A /* fs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fs.h; sourceTree = "<group>"; };
|
||||
7463B6F512F9CE6B00983F6A /* ft2_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2_defs.h; sourceTree = "<group>"; };
|
||||
7463B6F612F9CE6B00983F6A /* ft2_fontdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2_fontdefs.h; sourceTree = "<group>"; };
|
||||
7463B6F712F9CE6B00983F6A /* ft2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ft2.c; sourceTree = "<group>"; };
|
||||
7463B6F812F9CE6B00983F6A /* ft2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2.h; sourceTree = "<group>"; };
|
||||
7463B6F912F9CE6B00983F6A /* gl_backend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_backend.c; sourceTree = "<group>"; };
|
||||
7463B6FA12F9CE6B00983F6A /* gl_backend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gl_backend.h; sourceTree = "<group>"; };
|
||||
7463B6FB12F9CE6B00983F6A /* gl_draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_draw.c; sourceTree = "<group>"; };
|
||||
7463B6FC12F9CE6B00983F6A /* gl_rmain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_rmain.c; sourceTree = "<group>"; };
|
||||
7463B6FD12F9CE6B00983F6A /* gl_rsurf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_rsurf.c; sourceTree = "<group>"; };
|
||||
7463B6FE12F9CE6B00983F6A /* gl_textures.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_textures.c; sourceTree = "<group>"; };
|
||||
7463B6FF12F9CE6B00983F6A /* glquake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glquake.h; sourceTree = "<group>"; };
|
||||
7463B70012F9CE6B00983F6A /* hmac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hmac.c; sourceTree = "<group>"; };
|
||||
7463B70112F9CE6B00983F6A /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hmac.h; sourceTree = "<group>"; };
|
||||
7463B70212F9CE6B00983F6A /* host_cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = host_cmd.c; sourceTree = "<group>"; };
|
||||
7463B70312F9CE6B00983F6A /* host.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = host.c; sourceTree = "<group>"; };
|
||||
7463B70412F9CE6B00983F6A /* image_png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = image_png.c; sourceTree = "<group>"; };
|
||||
7463B70512F9CE6B00983F6A /* image_png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = image_png.h; sourceTree = "<group>"; };
|
||||
7463B70612F9CE6B00983F6A /* image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = image.c; sourceTree = "<group>"; };
|
||||
7463B70712F9CE6B00983F6A /* image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = image.h; sourceTree = "<group>"; };
|
||||
7463B70812F9CE6B00983F6A /* input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = input.h; sourceTree = "<group>"; };
|
||||
7463B70912F9CE6B00983F6A /* intoverflow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intoverflow.h; sourceTree = "<group>"; };
|
||||
7463B70A12F9CE6B00983F6A /* jpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jpeg.c; sourceTree = "<group>"; };
|
||||
7463B70B12F9CE6B00983F6A /* jpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jpeg.h; sourceTree = "<group>"; };
|
||||
7463B70C12F9CE6B00983F6A /* keys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keys.c; sourceTree = "<group>"; };
|
||||
7463B70D12F9CE6B00983F6A /* keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keys.h; sourceTree = "<group>"; };
|
||||
7463B70E12F9CE6B00983F6A /* lhfont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lhfont.h; sourceTree = "<group>"; };
|
||||
7463B70F12F9CE6B00983F6A /* lhnet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lhnet.c; sourceTree = "<group>"; };
|
||||
7463B71012F9CE6B00983F6A /* lhnet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lhnet.h; sourceTree = "<group>"; };
|
||||
7463B71112F9CE6B00983F6A /* libcurl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = libcurl.c; sourceTree = "<group>"; };
|
||||
7463B71212F9CE6B00983F6A /* libcurl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libcurl.h; sourceTree = "<group>"; };
|
||||
7463B71312F9CE6B00983F6A /* mathlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mathlib.c; sourceTree = "<group>"; };
|
||||
7463B71412F9CE6B00983F6A /* mathlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mathlib.h; sourceTree = "<group>"; };
|
||||
7463B71512F9CE6B00983F6A /* matrixlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = matrixlib.c; sourceTree = "<group>"; };
|
||||
7463B71612F9CE6B00983F6A /* matrixlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = matrixlib.h; sourceTree = "<group>"; };
|
||||
7463B71712F9CE6B00983F6A /* mdfour.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mdfour.c; sourceTree = "<group>"; };
|
||||
7463B71812F9CE6B00983F6A /* mdfour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mdfour.h; sourceTree = "<group>"; };
|
||||
7463B71912F9CE6B00983F6A /* menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = menu.c; sourceTree = "<group>"; };
|
||||
7463B71A12F9CE6B00983F6A /* menu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = menu.h; sourceTree = "<group>"; };
|
||||
7463B71B12F9CE6B00983F6A /* meshqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = meshqueue.c; sourceTree = "<group>"; };
|
||||
7463B71C12F9CE6B00983F6A /* meshqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = meshqueue.h; sourceTree = "<group>"; };
|
||||
7463B71D12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mod_skeletal_animatevertices_generic.c; sourceTree = "<group>"; };
|
||||
7463B71E12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mod_skeletal_animatevertices_generic.h; sourceTree = "<group>"; };
|
||||
7463B71F12F9CE6B00983F6A /* model_alias.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_alias.c; sourceTree = "<group>"; };
|
||||
7463B72012F9CE6B00983F6A /* model_alias.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_alias.h; sourceTree = "<group>"; };
|
||||
7463B72112F9CE6B00983F6A /* model_brush.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_brush.c; sourceTree = "<group>"; };
|
||||
7463B72212F9CE6B00983F6A /* model_brush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_brush.h; sourceTree = "<group>"; };
|
||||
7463B72312F9CE6B00983F6A /* model_dpmodel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_dpmodel.h; sourceTree = "<group>"; };
|
||||
7463B72412F9CE6B00983F6A /* model_iqm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_iqm.h; sourceTree = "<group>"; };
|
||||
7463B72512F9CE6B00983F6A /* model_psk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_psk.h; sourceTree = "<group>"; };
|
||||
7463B72612F9CE6B00983F6A /* model_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_shared.c; sourceTree = "<group>"; };
|
||||
7463B72712F9CE6B00983F6A /* model_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_shared.h; sourceTree = "<group>"; };
|
||||
7463B72812F9CE6B00983F6A /* model_sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_sprite.c; sourceTree = "<group>"; };
|
||||
7463B72912F9CE6B00983F6A /* model_sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_sprite.h; sourceTree = "<group>"; };
|
||||
7463B72A12F9CE6B00983F6A /* model_zymotic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_zymotic.h; sourceTree = "<group>"; };
|
||||
7463B72B12F9CE6B00983F6A /* modelgen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modelgen.h; sourceTree = "<group>"; };
|
||||
7463B72C12F9CE6B00983F6A /* mprogdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mprogdefs.h; sourceTree = "<group>"; };
|
||||
7463B72D12F9CE6B00983F6A /* mvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mvm_cmds.c; sourceTree = "<group>"; };
|
||||
7463B72E12F9CE6B00983F6A /* netconn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = netconn.c; sourceTree = "<group>"; };
|
||||
7463B72F12F9CE6B00983F6A /* netconn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = netconn.h; sourceTree = "<group>"; };
|
||||
7463B73012F9CE6B00983F6A /* palette.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = palette.c; sourceTree = "<group>"; };
|
||||
7463B73112F9CE6B00983F6A /* palette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = palette.h; sourceTree = "<group>"; };
|
||||
7463B73212F9CE6B00983F6A /* polygon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = polygon.c; sourceTree = "<group>"; };
|
||||
7463B73312F9CE6B00983F6A /* polygon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = polygon.h; sourceTree = "<group>"; };
|
||||
7463B73412F9CE6B00983F6A /* portals.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = portals.c; sourceTree = "<group>"; };
|
||||
7463B73512F9CE6B00983F6A /* portals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = portals.h; sourceTree = "<group>"; };
|
||||
7463B73612F9CE6B00983F6A /* pr_comp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pr_comp.h; sourceTree = "<group>"; };
|
||||
7463B73712F9CE6B00983F6A /* progdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progdefs.h; sourceTree = "<group>"; };
|
||||
7463B73812F9CE6B00983F6A /* progs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progs.h; sourceTree = "<group>"; };
|
||||
7463B73912F9CE6B00983F6A /* progsvm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progsvm.h; sourceTree = "<group>"; };
|
||||
7463B73A12F9CE6B00983F6A /* protocol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = protocol.c; sourceTree = "<group>"; };
|
||||
7463B73B12F9CE6B00983F6A /* protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = "<group>"; };
|
||||
7463B73C12F9CE6B00983F6A /* prvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prvm_cmds.c; sourceTree = "<group>"; };
|
||||
7463B73D12F9CE6B00983F6A /* prvm_cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prvm_cmds.h; sourceTree = "<group>"; };
|
||||
7463B73E12F9CE6B00983F6A /* prvm_edict.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prvm_edict.c; sourceTree = "<group>"; };
|
||||
7463B73F12F9CE6B00983F6A /* prvm_exec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prvm_exec.c; sourceTree = "<group>"; };
|
||||
7463B74012F9CE6B00983F6A /* prvm_execprogram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prvm_execprogram.h; sourceTree = "<group>"; };
|
||||
7463B74112F9CE6B00983F6A /* qtypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = qtypes.h; sourceTree = "<group>"; };
|
||||
7463B74212F9CE6B00983F6A /* quakedef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = quakedef.h; sourceTree = "<group>"; };
|
||||
7463B74312F9CE6B00983F6A /* r_explosion.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_explosion.c; sourceTree = "<group>"; };
|
||||
7463B74412F9CE6B00983F6A /* r_lightning.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_lightning.c; sourceTree = "<group>"; };
|
||||
7463B74512F9CE6B00983F6A /* r_modules.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_modules.c; sourceTree = "<group>"; };
|
||||
7463B74612F9CE6B00983F6A /* r_modules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r_modules.h; sourceTree = "<group>"; };
|
||||
7463B74712F9CE6B00983F6A /* r_shadow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_shadow.c; sourceTree = "<group>"; };
|
||||
7463B74812F9CE6B00983F6A /* r_shadow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r_shadow.h; sourceTree = "<group>"; };
|
||||
7463B74912F9CE6B00983F6A /* r_sky.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_sky.c; sourceTree = "<group>"; };
|
||||
7463B74A12F9CE6B00983F6A /* r_sprites.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_sprites.c; sourceTree = "<group>"; };
|
||||
7463B74B12F9CE6B00983F6A /* r_textures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r_textures.h; sourceTree = "<group>"; };
|
||||
7463B74C12F9CE6B00983F6A /* render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = render.h; sourceTree = "<group>"; };
|
||||
7463B74E12F9CE6B00983F6A /* sbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sbar.c; sourceTree = "<group>"; };
|
||||
7463B74F12F9CE6B00983F6A /* sbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sbar.h; sourceTree = "<group>"; };
|
||||
7463B75012F9CE6B00983F6A /* screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screen.h; sourceTree = "<group>"; };
|
||||
7463B75112F9CE6B00983F6A /* server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = server.h; sourceTree = "<group>"; };
|
||||
7463B75212F9CE6B00983F6A /* snd_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_main.c; sourceTree = "<group>"; };
|
||||
7463B75312F9CE6B00983F6A /* snd_main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_main.h; sourceTree = "<group>"; };
|
||||
7463B75412F9CE6B00983F6A /* snd_mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_mem.c; sourceTree = "<group>"; };
|
||||
7463B75512F9CE6B00983F6A /* snd_mix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_mix.c; sourceTree = "<group>"; };
|
||||
7463B75812F9CE6B00983F6A /* snd_ogg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_ogg.c; sourceTree = "<group>"; };
|
||||
7463B75912F9CE6B00983F6A /* snd_ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_ogg.h; sourceTree = "<group>"; };
|
||||
7463B75A12F9CE6B00983F6A /* snd_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_sdl.c; sourceTree = "<group>"; };
|
||||
7463B75B12F9CE6B00983F6A /* snd_wav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_wav.c; sourceTree = "<group>"; };
|
||||
7463B75C12F9CE6B00983F6A /* snd_wav.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_wav.h; sourceTree = "<group>"; };
|
||||
7463B75D12F9CE6B00983F6A /* sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sound.h; sourceTree = "<group>"; };
|
||||
7463B75E12F9CE6B00983F6A /* spritegn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spritegn.h; sourceTree = "<group>"; };
|
||||
7463B75F12F9CE6B00983F6A /* sv_demo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_demo.c; sourceTree = "<group>"; };
|
||||
7463B76012F9CE6B00983F6A /* sv_demo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sv_demo.h; sourceTree = "<group>"; };
|
||||
7463B76112F9CE6B00983F6A /* sv_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_main.c; sourceTree = "<group>"; };
|
||||
7463B76212F9CE6B00983F6A /* sv_move.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_move.c; sourceTree = "<group>"; };
|
||||
7463B76312F9CE6B00983F6A /* sv_phys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_phys.c; sourceTree = "<group>"; };
|
||||
7463B76412F9CE6B00983F6A /* sv_user.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_user.c; sourceTree = "<group>"; };
|
||||
7463B76512F9CE6B00983F6A /* svbsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = svbsp.c; sourceTree = "<group>"; };
|
||||
7463B76612F9CE6B00983F6A /* svbsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = svbsp.h; sourceTree = "<group>"; };
|
||||
7463B76712F9CE6B00983F6A /* svvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = svvm_cmds.c; sourceTree = "<group>"; };
|
||||
7463B76812F9CE6B00983F6A /* sys_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sys_sdl.c; sourceTree = "<group>"; };
|
||||
7463B76912F9CE6B00983F6A /* sys_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sys_shared.c; sourceTree = "<group>"; };
|
||||
7463B76A12F9CE6B00983F6A /* sys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sys.h; sourceTree = "<group>"; };
|
||||
7463B76C12F9CE6B00983F6A /* utf8lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utf8lib.c; sourceTree = "<group>"; };
|
||||
7463B76D12F9CE6B00983F6A /* utf8lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8lib.h; sourceTree = "<group>"; };
|
||||
7463B76E12F9CE6B00983F6A /* vid_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vid_sdl.c; sourceTree = "<group>"; };
|
||||
7463B76F12F9CE6B00983F6A /* vid_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vid_shared.c; sourceTree = "<group>"; };
|
||||
7463B77012F9CE6B00983F6A /* vid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vid.h; sourceTree = "<group>"; };
|
||||
7463B77112F9CE6B00983F6A /* view.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = view.c; sourceTree = "<group>"; };
|
||||
7463B77212F9CE6B00983F6A /* wad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wad.c; sourceTree = "<group>"; };
|
||||
7463B77312F9CE6B00983F6A /* wad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wad.h; sourceTree = "<group>"; };
|
||||
7463B77412F9CE6B00983F6A /* world.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = world.c; sourceTree = "<group>"; };
|
||||
7463B77512F9CE6B00983F6A /* world.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = world.h; sourceTree = "<group>"; };
|
||||
7463B77612F9CE6B00983F6A /* zone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zone.c; sourceTree = "<group>"; };
|
||||
7463B77712F9CE6B00983F6A /* zone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zone.h; sourceTree = "<group>"; };
|
||||
7463B7D812F9CF8F00983F6A /* darkplaces64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = darkplaces64x64.png; sourceTree = "<group>"; };
|
||||
7463B7ED12F9D17D00983F6A /* builddate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = builddate.c; sourceTree = "<group>"; };
|
||||
7487D47F130102AA00AEE909 /* thread_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = thread_sdl.c; sourceTree = "<group>"; };
|
||||
7487D480130102AA00AEE909 /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread.h; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
FD779EDD0E26BA1200F39101 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
FD77A0840E26BDB800F39101 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
||||
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */,
|
||||
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
|
||||
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */,
|
||||
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */,
|
||||
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */,
|
||||
74063A491751B9B60015D12C /* libSDL2-ios-armv7.a in Frameworks */,
|
||||
74063A4A1751B9B60015D12C /* libSDL2-ios-simulator.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D6058910D05DD3D006BFB54 /* DPiOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97315FDCFA39411CA2CEA /* Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
FD779EC50E26B99E00F39101 /* Libraries */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = CustomTemplate;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
74063A411751B0AF0015D12C /* clvm_cmds.c */,
|
||||
74063A3F1751B0250015D12C /* cd_null.c */,
|
||||
7463B6C012F9CE6B00983F6A /* bih.c */,
|
||||
7463B6C112F9CE6B00983F6A /* bih.h */,
|
||||
7463B6C212F9CE6B00983F6A /* bspfile.h */,
|
||||
7463B7ED12F9D17D00983F6A /* builddate.c */,
|
||||
7463B6C312F9CE6B00983F6A /* cap_avi.c */,
|
||||
7463B6C412F9CE6B00983F6A /* cap_avi.h */,
|
||||
7463B6C512F9CE6B00983F6A /* cap_ogg.c */,
|
||||
7463B6C612F9CE6B00983F6A /* cap_ogg.h */,
|
||||
7463B6C812F9CE6B00983F6A /* cd_shared.c */,
|
||||
7463B6C912F9CE6B00983F6A /* cdaudio.h */,
|
||||
7463B6CA12F9CE6B00983F6A /* cl_collision.c */,
|
||||
7463B6CB12F9CE6B00983F6A /* cl_collision.h */,
|
||||
7463B6CC12F9CE6B00983F6A /* cl_demo.c */,
|
||||
7463B6CD12F9CE6B00983F6A /* cl_dyntexture.c */,
|
||||
7463B6CE12F9CE6B00983F6A /* cl_dyntexture.h */,
|
||||
7463B6D112F9CE6B00983F6A /* cl_input.c */,
|
||||
7463B6D212F9CE6B00983F6A /* cl_main.c */,
|
||||
7463B6D312F9CE6B00983F6A /* cl_parse.c */,
|
||||
7463B6D412F9CE6B00983F6A /* cl_particles.c */,
|
||||
7463B6D512F9CE6B00983F6A /* cl_screen.c */,
|
||||
7463B6D612F9CE6B00983F6A /* cl_screen.h */,
|
||||
7463B6D712F9CE6B00983F6A /* cl_video.c */,
|
||||
7463B6D812F9CE6B00983F6A /* cl_video.h */,
|
||||
7463B6D912F9CE6B00983F6A /* client.h */,
|
||||
7463B6DA12F9CE6B00983F6A /* clprogdefs.h */,
|
||||
7463B6DB12F9CE6B00983F6A /* clvm_cmds.h */,
|
||||
7463B6DC12F9CE6B00983F6A /* cmd.c */,
|
||||
7463B6DD12F9CE6B00983F6A /* cmd.h */,
|
||||
7463B6DE12F9CE6B00983F6A /* collision.c */,
|
||||
7463B6DF12F9CE6B00983F6A /* collision.h */,
|
||||
7463B6E012F9CE6B00983F6A /* common.c */,
|
||||
7463B6E112F9CE6B00983F6A /* common.h */,
|
||||
7463B6E212F9CE6B00983F6A /* console.c */,
|
||||
7463B6E312F9CE6B00983F6A /* console.h */,
|
||||
7463B6E412F9CE6B00983F6A /* crypto.c */,
|
||||
7463B6E512F9CE6B00983F6A /* crypto.h */,
|
||||
7463B6E612F9CE6B00983F6A /* csprogs.c */,
|
||||
7463B6E712F9CE6B00983F6A /* csprogs.h */,
|
||||
7463B6E812F9CE6B00983F6A /* curves.c */,
|
||||
7463B6E912F9CE6B00983F6A /* curves.h */,
|
||||
7463B6EA12F9CE6B00983F6A /* cvar.c */,
|
||||
7463B6EB12F9CE6B00983F6A /* cvar.h */,
|
||||
7463B6EC12F9CE6B00983F6A /* dpsoftrast.c */,
|
||||
7463B6ED12F9CE6B00983F6A /* dpsoftrast.h */,
|
||||
7463B6EE12F9CE6B00983F6A /* dpvsimpledecode.c */,
|
||||
7463B6EF12F9CE6B00983F6A /* dpvsimpledecode.h */,
|
||||
7463B6F012F9CE6B00983F6A /* draw.h */,
|
||||
7463B6F112F9CE6B00983F6A /* filematch.c */,
|
||||
7463B6F212F9CE6B00983F6A /* fractalnoise.c */,
|
||||
7463B6F312F9CE6B00983F6A /* fs.c */,
|
||||
7463B6F412F9CE6B00983F6A /* fs.h */,
|
||||
7463B6F712F9CE6B00983F6A /* ft2.c */,
|
||||
7463B6F812F9CE6B00983F6A /* ft2.h */,
|
||||
7463B6F512F9CE6B00983F6A /* ft2_defs.h */,
|
||||
7463B6F612F9CE6B00983F6A /* ft2_fontdefs.h */,
|
||||
7463B6F912F9CE6B00983F6A /* gl_backend.c */,
|
||||
7463B6FA12F9CE6B00983F6A /* gl_backend.h */,
|
||||
7463B6FB12F9CE6B00983F6A /* gl_draw.c */,
|
||||
7463B6FC12F9CE6B00983F6A /* gl_rmain.c */,
|
||||
7463B6FD12F9CE6B00983F6A /* gl_rsurf.c */,
|
||||
7463B6FE12F9CE6B00983F6A /* gl_textures.c */,
|
||||
7463B6FF12F9CE6B00983F6A /* glquake.h */,
|
||||
7463B70012F9CE6B00983F6A /* hmac.c */,
|
||||
7463B70112F9CE6B00983F6A /* hmac.h */,
|
||||
7463B70312F9CE6B00983F6A /* host.c */,
|
||||
7463B70212F9CE6B00983F6A /* host_cmd.c */,
|
||||
7463B70612F9CE6B00983F6A /* image.c */,
|
||||
7463B70712F9CE6B00983F6A /* image.h */,
|
||||
7463B70412F9CE6B00983F6A /* image_png.c */,
|
||||
7463B70512F9CE6B00983F6A /* image_png.h */,
|
||||
7463B70812F9CE6B00983F6A /* input.h */,
|
||||
7463B70912F9CE6B00983F6A /* intoverflow.h */,
|
||||
7463B70A12F9CE6B00983F6A /* jpeg.c */,
|
||||
7463B70B12F9CE6B00983F6A /* jpeg.h */,
|
||||
7463B70C12F9CE6B00983F6A /* keys.c */,
|
||||
7463B70D12F9CE6B00983F6A /* keys.h */,
|
||||
7463B70E12F9CE6B00983F6A /* lhfont.h */,
|
||||
7463B70F12F9CE6B00983F6A /* lhnet.c */,
|
||||
7463B71012F9CE6B00983F6A /* lhnet.h */,
|
||||
7463B71112F9CE6B00983F6A /* libcurl.c */,
|
||||
7463B71212F9CE6B00983F6A /* libcurl.h */,
|
||||
7463B71312F9CE6B00983F6A /* mathlib.c */,
|
||||
7463B71412F9CE6B00983F6A /* mathlib.h */,
|
||||
7463B71512F9CE6B00983F6A /* matrixlib.c */,
|
||||
7463B71612F9CE6B00983F6A /* matrixlib.h */,
|
||||
7463B71712F9CE6B00983F6A /* mdfour.c */,
|
||||
7463B71812F9CE6B00983F6A /* mdfour.h */,
|
||||
7463B71912F9CE6B00983F6A /* menu.c */,
|
||||
7463B71A12F9CE6B00983F6A /* menu.h */,
|
||||
7463B71B12F9CE6B00983F6A /* meshqueue.c */,
|
||||
7463B71C12F9CE6B00983F6A /* meshqueue.h */,
|
||||
7463B71D12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c */,
|
||||
7463B71E12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.h */,
|
||||
74063A3C1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.c */,
|
||||
74063A3D1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.h */,
|
||||
7463B71F12F9CE6B00983F6A /* model_alias.c */,
|
||||
7463B72012F9CE6B00983F6A /* model_alias.h */,
|
||||
7463B72112F9CE6B00983F6A /* model_brush.c */,
|
||||
7463B72212F9CE6B00983F6A /* model_brush.h */,
|
||||
7463B72312F9CE6B00983F6A /* model_dpmodel.h */,
|
||||
7463B72412F9CE6B00983F6A /* model_iqm.h */,
|
||||
7463B72512F9CE6B00983F6A /* model_psk.h */,
|
||||
7463B72612F9CE6B00983F6A /* model_shared.c */,
|
||||
7463B72712F9CE6B00983F6A /* model_shared.h */,
|
||||
7463B72812F9CE6B00983F6A /* model_sprite.c */,
|
||||
7463B72912F9CE6B00983F6A /* model_sprite.h */,
|
||||
7463B72A12F9CE6B00983F6A /* model_zymotic.h */,
|
||||
7463B72B12F9CE6B00983F6A /* modelgen.h */,
|
||||
7463B72C12F9CE6B00983F6A /* mprogdefs.h */,
|
||||
7463B72D12F9CE6B00983F6A /* mvm_cmds.c */,
|
||||
7463B72E12F9CE6B00983F6A /* netconn.c */,
|
||||
7463B72F12F9CE6B00983F6A /* netconn.h */,
|
||||
7463B73012F9CE6B00983F6A /* palette.c */,
|
||||
7463B73112F9CE6B00983F6A /* palette.h */,
|
||||
7463B73212F9CE6B00983F6A /* polygon.c */,
|
||||
7463B73312F9CE6B00983F6A /* polygon.h */,
|
||||
7463B73412F9CE6B00983F6A /* portals.c */,
|
||||
7463B73512F9CE6B00983F6A /* portals.h */,
|
||||
7463B73612F9CE6B00983F6A /* pr_comp.h */,
|
||||
7463B73712F9CE6B00983F6A /* progdefs.h */,
|
||||
7463B73812F9CE6B00983F6A /* progs.h */,
|
||||
7463B73912F9CE6B00983F6A /* progsvm.h */,
|
||||
7463B73A12F9CE6B00983F6A /* protocol.c */,
|
||||
7463B73B12F9CE6B00983F6A /* protocol.h */,
|
||||
7463B73C12F9CE6B00983F6A /* prvm_cmds.c */,
|
||||
7463B73D12F9CE6B00983F6A /* prvm_cmds.h */,
|
||||
7463B73E12F9CE6B00983F6A /* prvm_edict.c */,
|
||||
7463B73F12F9CE6B00983F6A /* prvm_exec.c */,
|
||||
7463B74012F9CE6B00983F6A /* prvm_execprogram.h */,
|
||||
7463B74112F9CE6B00983F6A /* qtypes.h */,
|
||||
7463B74212F9CE6B00983F6A /* quakedef.h */,
|
||||
7463B74312F9CE6B00983F6A /* r_explosion.c */,
|
||||
7463B74412F9CE6B00983F6A /* r_lightning.c */,
|
||||
7463B74512F9CE6B00983F6A /* r_modules.c */,
|
||||
7463B74612F9CE6B00983F6A /* r_modules.h */,
|
||||
7463B74712F9CE6B00983F6A /* r_shadow.c */,
|
||||
7463B74812F9CE6B00983F6A /* r_shadow.h */,
|
||||
7463B74912F9CE6B00983F6A /* r_sky.c */,
|
||||
7463B74A12F9CE6B00983F6A /* r_sprites.c */,
|
||||
7463B74B12F9CE6B00983F6A /* r_textures.h */,
|
||||
7463B74C12F9CE6B00983F6A /* render.h */,
|
||||
7463B74E12F9CE6B00983F6A /* sbar.c */,
|
||||
7463B74F12F9CE6B00983F6A /* sbar.h */,
|
||||
7463B75012F9CE6B00983F6A /* screen.h */,
|
||||
7463B75112F9CE6B00983F6A /* server.h */,
|
||||
7463B75212F9CE6B00983F6A /* snd_main.c */,
|
||||
7463B75312F9CE6B00983F6A /* snd_main.h */,
|
||||
7463B75412F9CE6B00983F6A /* snd_mem.c */,
|
||||
7463B75512F9CE6B00983F6A /* snd_mix.c */,
|
||||
7463B75812F9CE6B00983F6A /* snd_ogg.c */,
|
||||
7463B75912F9CE6B00983F6A /* snd_ogg.h */,
|
||||
7463B75A12F9CE6B00983F6A /* snd_sdl.c */,
|
||||
7463B75B12F9CE6B00983F6A /* snd_wav.c */,
|
||||
7463B75C12F9CE6B00983F6A /* snd_wav.h */,
|
||||
7463B75D12F9CE6B00983F6A /* sound.h */,
|
||||
7463B75E12F9CE6B00983F6A /* spritegn.h */,
|
||||
7463B75F12F9CE6B00983F6A /* sv_demo.c */,
|
||||
7463B76012F9CE6B00983F6A /* sv_demo.h */,
|
||||
7463B76112F9CE6B00983F6A /* sv_main.c */,
|
||||
7463B76212F9CE6B00983F6A /* sv_move.c */,
|
||||
7463B76312F9CE6B00983F6A /* sv_phys.c */,
|
||||
7463B76412F9CE6B00983F6A /* sv_user.c */,
|
||||
7463B76512F9CE6B00983F6A /* svbsp.c */,
|
||||
7463B76612F9CE6B00983F6A /* svbsp.h */,
|
||||
7463B76712F9CE6B00983F6A /* svvm_cmds.c */,
|
||||
7463B76A12F9CE6B00983F6A /* sys.h */,
|
||||
7463B76812F9CE6B00983F6A /* sys_sdl.c */,
|
||||
7463B76912F9CE6B00983F6A /* sys_shared.c */,
|
||||
7487D480130102AA00AEE909 /* thread.h */,
|
||||
7487D47F130102AA00AEE909 /* thread_sdl.c */,
|
||||
7463B76C12F9CE6B00983F6A /* utf8lib.c */,
|
||||
7463B76D12F9CE6B00983F6A /* utf8lib.h */,
|
||||
7463B77012F9CE6B00983F6A /* vid.h */,
|
||||
7463B76E12F9CE6B00983F6A /* vid_sdl.c */,
|
||||
7463B76F12F9CE6B00983F6A /* vid_shared.c */,
|
||||
7463B77112F9CE6B00983F6A /* view.c */,
|
||||
7463B77212F9CE6B00983F6A /* wad.c */,
|
||||
7463B77312F9CE6B00983F6A /* wad.h */,
|
||||
7463B77412F9CE6B00983F6A /* world.c */,
|
||||
7463B77512F9CE6B00983F6A /* world.h */,
|
||||
7463B77612F9CE6B00983F6A /* zone.c */,
|
||||
7463B77712F9CE6B00983F6A /* zone.h */,
|
||||
);
|
||||
name = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
74063A501751C4560015D12C /* gamedata */,
|
||||
7463B7D812F9CF8F00983F6A /* darkplaces64x64.png */,
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */,
|
||||
FD77A0840E26BDB800F39101 /* AudioToolbox.framework */,
|
||||
FD779EDD0E26BA1200F39101 /* CoreAudio.framework */,
|
||||
28FD15070DC6FC5B0079059D /* QuartzCore.framework */,
|
||||
28FD14FF0DC6FC520079059D /* OpenGLES.framework */,
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD779EC50E26B99E00F39101 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
74063A471751B9B60015D12C /* libSDL2-ios-armv7.a */,
|
||||
74063A481751B9B60015D12C /* libSDL2-ios-simulator.a */,
|
||||
);
|
||||
name = Libraries;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1D6058900D05DD3D006BFB54 /* DPiOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "DPiOS" */;
|
||||
buildPhases = (
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */,
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */,
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = DPiOS;
|
||||
productName = DPiOS;
|
||||
productReference = 1D6058910D05DD3D006BFB54 /* DPiOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0420;
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DPiOS" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1D6058900D05DD3D006BFB54 /* DPiOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7463B7D912F9CF8F00983F6A /* darkplaces64x64.png in Resources */,
|
||||
74063A511751C4560015D12C /* gamedata in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7463B77812F9CE6B00983F6A /* bih.c in Sources */,
|
||||
7463B77912F9CE6B00983F6A /* cap_avi.c in Sources */,
|
||||
7463B77A12F9CE6B00983F6A /* cap_ogg.c in Sources */,
|
||||
7463B77C12F9CE6B00983F6A /* cd_shared.c in Sources */,
|
||||
7463B77D12F9CE6B00983F6A /* cl_collision.c in Sources */,
|
||||
7463B77E12F9CE6B00983F6A /* cl_demo.c in Sources */,
|
||||
7463B77F12F9CE6B00983F6A /* cl_dyntexture.c in Sources */,
|
||||
7463B78112F9CE6B00983F6A /* cl_input.c in Sources */,
|
||||
7463B78212F9CE6B00983F6A /* cl_main.c in Sources */,
|
||||
7463B78312F9CE6B00983F6A /* cl_parse.c in Sources */,
|
||||
7463B78412F9CE6B00983F6A /* cl_particles.c in Sources */,
|
||||
7463B78512F9CE6B00983F6A /* cl_screen.c in Sources */,
|
||||
7463B78612F9CE6B00983F6A /* cl_video.c in Sources */,
|
||||
7463B78712F9CE6B00983F6A /* cmd.c in Sources */,
|
||||
7463B78812F9CE6B00983F6A /* collision.c in Sources */,
|
||||
7463B78912F9CE6B00983F6A /* common.c in Sources */,
|
||||
7463B78A12F9CE6B00983F6A /* console.c in Sources */,
|
||||
7463B78B12F9CE6B00983F6A /* crypto.c in Sources */,
|
||||
7463B78C12F9CE6B00983F6A /* csprogs.c in Sources */,
|
||||
7463B78D12F9CE6B00983F6A /* curves.c in Sources */,
|
||||
7463B78E12F9CE6B00983F6A /* cvar.c in Sources */,
|
||||
7463B78F12F9CE6B00983F6A /* dpsoftrast.c in Sources */,
|
||||
7463B79012F9CE6B00983F6A /* dpvsimpledecode.c in Sources */,
|
||||
7463B79112F9CE6B00983F6A /* filematch.c in Sources */,
|
||||
7463B79212F9CE6B00983F6A /* fractalnoise.c in Sources */,
|
||||
7463B79312F9CE6B00983F6A /* fs.c in Sources */,
|
||||
7463B79412F9CE6B00983F6A /* ft2.c in Sources */,
|
||||
7463B79512F9CE6B00983F6A /* gl_backend.c in Sources */,
|
||||
7463B79612F9CE6B00983F6A /* gl_draw.c in Sources */,
|
||||
7463B79712F9CE6B00983F6A /* gl_rmain.c in Sources */,
|
||||
7463B79812F9CE6B00983F6A /* gl_rsurf.c in Sources */,
|
||||
7463B79912F9CE6B00983F6A /* gl_textures.c in Sources */,
|
||||
7463B79A12F9CE6B00983F6A /* hmac.c in Sources */,
|
||||
7463B79B12F9CE6B00983F6A /* host_cmd.c in Sources */,
|
||||
7463B79C12F9CE6B00983F6A /* host.c in Sources */,
|
||||
7463B79D12F9CE6B00983F6A /* image_png.c in Sources */,
|
||||
7463B79E12F9CE6B00983F6A /* image.c in Sources */,
|
||||
7463B79F12F9CE6B00983F6A /* jpeg.c in Sources */,
|
||||
7463B7A012F9CE6B00983F6A /* keys.c in Sources */,
|
||||
7463B7A112F9CE6B00983F6A /* lhnet.c in Sources */,
|
||||
7463B7A212F9CE6B00983F6A /* libcurl.c in Sources */,
|
||||
7463B7A312F9CE6B00983F6A /* mathlib.c in Sources */,
|
||||
7463B7A412F9CE6B00983F6A /* matrixlib.c in Sources */,
|
||||
7463B7A512F9CE6B00983F6A /* mdfour.c in Sources */,
|
||||
7463B7A612F9CE6B00983F6A /* menu.c in Sources */,
|
||||
7463B7A712F9CE6B00983F6A /* meshqueue.c in Sources */,
|
||||
7463B7A812F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c in Sources */,
|
||||
7463B7A912F9CE6B00983F6A /* model_alias.c in Sources */,
|
||||
7463B7AA12F9CE6B00983F6A /* model_brush.c in Sources */,
|
||||
7463B7AB12F9CE6B00983F6A /* model_shared.c in Sources */,
|
||||
7463B7AC12F9CE6B00983F6A /* model_sprite.c in Sources */,
|
||||
7463B7AD12F9CE6B00983F6A /* mvm_cmds.c in Sources */,
|
||||
7463B7AE12F9CE6B00983F6A /* netconn.c in Sources */,
|
||||
7463B7AF12F9CE6B00983F6A /* palette.c in Sources */,
|
||||
7463B7B012F9CE6B00983F6A /* polygon.c in Sources */,
|
||||
7463B7B112F9CE6B00983F6A /* portals.c in Sources */,
|
||||
7463B7B212F9CE6B00983F6A /* protocol.c in Sources */,
|
||||
7463B7B312F9CE6B00983F6A /* prvm_cmds.c in Sources */,
|
||||
7463B7B412F9CE6B00983F6A /* prvm_edict.c in Sources */,
|
||||
7463B7B512F9CE6B00983F6A /* prvm_exec.c in Sources */,
|
||||
7463B7B612F9CE6B00983F6A /* r_explosion.c in Sources */,
|
||||
7463B7B712F9CE6B00983F6A /* r_lightning.c in Sources */,
|
||||
7463B7B812F9CE6B00983F6A /* r_modules.c in Sources */,
|
||||
7463B7B912F9CE6B00983F6A /* r_shadow.c in Sources */,
|
||||
7463B7BA12F9CE6B00983F6A /* r_sky.c in Sources */,
|
||||
7463B7BB12F9CE6B00983F6A /* r_sprites.c in Sources */,
|
||||
7463B7BC12F9CE6B00983F6A /* sbar.c in Sources */,
|
||||
7463B7BD12F9CE6B00983F6A /* snd_main.c in Sources */,
|
||||
7463B7BE12F9CE6B00983F6A /* snd_mem.c in Sources */,
|
||||
7463B7BF12F9CE6B00983F6A /* snd_mix.c in Sources */,
|
||||
7463B7C112F9CE6B00983F6A /* snd_ogg.c in Sources */,
|
||||
7463B7C212F9CE6B00983F6A /* snd_sdl.c in Sources */,
|
||||
7463B7C312F9CE6B00983F6A /* snd_wav.c in Sources */,
|
||||
7463B7C412F9CE6B00983F6A /* sv_demo.c in Sources */,
|
||||
7463B7C512F9CE6B00983F6A /* sv_main.c in Sources */,
|
||||
7463B7C612F9CE6B00983F6A /* sv_move.c in Sources */,
|
||||
7463B7C712F9CE6B00983F6A /* sv_phys.c in Sources */,
|
||||
7463B7C812F9CE6B00983F6A /* sv_user.c in Sources */,
|
||||
7463B7C912F9CE6B00983F6A /* svbsp.c in Sources */,
|
||||
7463B7CA12F9CE6B00983F6A /* svvm_cmds.c in Sources */,
|
||||
7463B7CB12F9CE6B00983F6A /* sys_sdl.c in Sources */,
|
||||
7463B7CC12F9CE6B00983F6A /* sys_shared.c in Sources */,
|
||||
7463B7CD12F9CE6B00983F6A /* utf8lib.c in Sources */,
|
||||
7463B7CE12F9CE6B00983F6A /* vid_sdl.c in Sources */,
|
||||
7463B7CF12F9CE6B00983F6A /* vid_shared.c in Sources */,
|
||||
7463B7D012F9CE6B00983F6A /* view.c in Sources */,
|
||||
7463B7D112F9CE6B00983F6A /* wad.c in Sources */,
|
||||
7463B7D212F9CE6B00983F6A /* world.c in Sources */,
|
||||
7463B7D312F9CE6B00983F6A /* zone.c in Sources */,
|
||||
7463B7EF12F9D17D00983F6A /* builddate.c in Sources */,
|
||||
7463B7F012F9D17D00983F6A /* (null) in Sources */,
|
||||
7487D481130102AA00AEE909 /* thread_sdl.c in Sources */,
|
||||
74063A3E1751ADDB0015D12C /* mod_skeletal_animatevertices_sse.c in Sources */,
|
||||
74063A401751B0250015D12C /* cd_null.c in Sources */,
|
||||
74063A421751B0AF0015D12C /* clvm_cmds.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D6058940D05DD3E006BFB54 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
__IPHONEOS__,
|
||||
USE_GLES2,
|
||||
"FORCEGAME=\\\"steelstorm\\\"",
|
||||
"DP_FS_BASEDIR=\\\"\\\"",
|
||||
"DP_GAME_STEELSTORM=1",
|
||||
);
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/lib\"",
|
||||
);
|
||||
PRODUCT_NAME = DPiOS;
|
||||
TARGETED_DEVICE_FAMILY = 2;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1D6058950D05DD3E006BFB54 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
__IPHONEOS__,
|
||||
USE_GLES2,
|
||||
"FORCEGAME=\\\"steelstorm\\\"",
|
||||
"DP_FS_BASEDIR=\\\"\\\"",
|
||||
"DP_GAME_STEELSTORM=1",
|
||||
);
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/lib\"",
|
||||
);
|
||||
PRODUCT_NAME = DPiOS;
|
||||
TARGETED_DEVICE_FAMILY = 2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_C_LANGUAGE_STANDARD = "compiler-default";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/include";
|
||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/lib";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lz",
|
||||
);
|
||||
PRODUCT_NAME = Darkplaces;
|
||||
SDKROOT = iphoneos;
|
||||
VALID_ARCHS = armv7;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_C_LANGUAGE_STANDARD = "compiler-default";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/include";
|
||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/lib";
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lz",
|
||||
);
|
||||
PRODUCT_NAME = Darkplaces;
|
||||
SDKROOT = iphoneos;
|
||||
VALID_ARCHS = armv7;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "DPiOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1D6058940D05DD3E006BFB54 /* Debug */,
|
||||
1D6058950D05DD3E006BFB54 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DPiOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:DPiOS.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>darkplaces-osx-sdl</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Darkplaces</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
APPL????
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>darkplaces64x64</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.ghdigital.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,6 @@
|
|||
To build DarkPlaces for iOS, you need to extract this zip into the source folder:
|
||||
http://ghdigital.com/~havoc/SDLiOS20110208.zip
|
||||
|
||||
This is built from the in-development version of SDL 1.3, to make an updated include folder and libSDL*.a files, you need to get the SDL 1.3 source (from hg or a nightly build or whatever), then simply open Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj and build libSDL for both simulator and device and then the SDL Application xcode template.
|
||||
|
||||
Then copy the include folder and two libSDL*.a files from the Xcode-iPhoneOS/SDL/build/Debug-template (or Release-template) into the darkplaces source folder, and it will build with your updated files.
|
|
@ -0,0 +1,11 @@
|
|||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SDLMain : NSObject
|
||||
@end
|
|
@ -0,0 +1,381 @@
|
|||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDLMain.h"
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <unistd.h>
|
||||
|
||||
/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
|
||||
but the method still is there and works. To avoid warnings, we declare
|
||||
it ourselves here. */
|
||||
@interface NSApplication(SDL_Missing_Methods)
|
||||
- (void)setAppleMenu:(NSMenu *)menu;
|
||||
@end
|
||||
|
||||
/* Use this flag to determine whether we use SDLMain.nib or not */
|
||||
#define SDL_USE_NIB_FILE 0
|
||||
|
||||
/* Use this flag to determine whether we use CPS (docking) or not */
|
||||
#define SDL_USE_CPS 1
|
||||
#ifdef SDL_USE_CPS
|
||||
/* Portions of CPS.h */
|
||||
typedef struct CPSProcessSerNum
|
||||
{
|
||||
UInt32 lo;
|
||||
UInt32 hi;
|
||||
} CPSProcessSerNum;
|
||||
|
||||
extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
|
||||
extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
||||
extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
||||
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
static int gArgc;
|
||||
static char **gArgv;
|
||||
static BOOL gFinderLaunch;
|
||||
static BOOL gCalledAppMainline = FALSE;
|
||||
|
||||
static NSString *getApplicationName(void)
|
||||
{
|
||||
const NSDictionary *dict;
|
||||
NSString *appName = 0;
|
||||
|
||||
/* Determine the application name */
|
||||
dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
|
||||
if (dict)
|
||||
appName = [dict objectForKey: @"CFBundleName"];
|
||||
|
||||
if (![appName length])
|
||||
appName = [[NSProcessInfo processInfo] processName];
|
||||
|
||||
return appName;
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
/* A helper category for NSString */
|
||||
@interface NSString (ReplaceSubString)
|
||||
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
|
||||
@end
|
||||
#endif
|
||||
|
||||
@interface NSApplication (SDLApplication)
|
||||
@end
|
||||
|
||||
@implementation NSApplication (SDLApplication)
|
||||
/* Invoked from the Quit menu item */
|
||||
- (void)terminate:(id)sender
|
||||
{
|
||||
/* Post a SDL_QUIT event */
|
||||
SDL_Event event;
|
||||
event.type = SDL_QUIT;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
@end
|
||||
|
||||
/* The main class of the application, the application's delegate */
|
||||
@implementation SDLMain
|
||||
|
||||
/* Set the working directory to the .app's parent directory */
|
||||
- (void) setupWorkingDirectory:(BOOL)shouldChdir
|
||||
{
|
||||
if (shouldChdir)
|
||||
{
|
||||
char parentdir[MAXPATHLEN];
|
||||
CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
|
||||
if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) {
|
||||
chdir(parentdir); /* chdir to the binary app's parent */
|
||||
}
|
||||
CFRelease(url);
|
||||
CFRelease(url2);
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
|
||||
/* Fix menu to contain the real app name instead of "SDL App" */
|
||||
- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
|
||||
{
|
||||
NSRange aRange;
|
||||
NSEnumerator *enumerator;
|
||||
NSMenuItem *menuItem;
|
||||
|
||||
aRange = [[aMenu title] rangeOfString:@"SDL App"];
|
||||
if (aRange.length != 0)
|
||||
[aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
|
||||
|
||||
enumerator = [[aMenu itemArray] objectEnumerator];
|
||||
while ((menuItem = [enumerator nextObject]))
|
||||
{
|
||||
aRange = [[menuItem title] rangeOfString:@"SDL App"];
|
||||
if (aRange.length != 0)
|
||||
[menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
|
||||
if ([menuItem hasSubmenu])
|
||||
[self fixMenu:[menuItem submenu] withAppName:appName];
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void setApplicationMenu(void)
|
||||
{
|
||||
/* warning: this code is very odd */
|
||||
NSMenu *appleMenu;
|
||||
NSMenuItem *menuItem;
|
||||
NSString *title;
|
||||
NSString *appName;
|
||||
|
||||
appName = getApplicationName();
|
||||
appleMenu = [[NSMenu alloc] initWithTitle:@""];
|
||||
|
||||
/* Add menu items */
|
||||
title = [@"About " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
|
||||
|
||||
[appleMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
title = [@"Hide " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
|
||||
|
||||
menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
|
||||
[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
|
||||
|
||||
[appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
|
||||
|
||||
[appleMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
title = [@"Quit " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
|
||||
|
||||
|
||||
/* Put menu into the menubar */
|
||||
menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
|
||||
[menuItem setSubmenu:appleMenu];
|
||||
[[NSApp mainMenu] addItem:menuItem];
|
||||
|
||||
/* Tell the application object that this is now the application menu */
|
||||
[NSApp setAppleMenu:appleMenu];
|
||||
|
||||
/* Finally give up our references to the objects */
|
||||
[appleMenu release];
|
||||
[menuItem release];
|
||||
}
|
||||
|
||||
/* Create a window menu */
|
||||
static void setupWindowMenu(void)
|
||||
{
|
||||
NSMenu *windowMenu;
|
||||
NSMenuItem *windowMenuItem;
|
||||
NSMenuItem *menuItem;
|
||||
|
||||
windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
|
||||
|
||||
/* "Minimize" item */
|
||||
menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
|
||||
[windowMenu addItem:menuItem];
|
||||
[menuItem release];
|
||||
|
||||
/* Put menu into the menubar */
|
||||
windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
|
||||
[windowMenuItem setSubmenu:windowMenu];
|
||||
[[NSApp mainMenu] addItem:windowMenuItem];
|
||||
|
||||
/* Tell the application object that this is now the window menu */
|
||||
[NSApp setWindowsMenu:windowMenu];
|
||||
|
||||
/* Finally give up our references to the objects */
|
||||
[windowMenu release];
|
||||
[windowMenuItem release];
|
||||
}
|
||||
|
||||
/* Replacement for NSApplicationMain */
|
||||
static void CustomApplicationMain (int argc, char **argv)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
SDLMain *sdlMain;
|
||||
|
||||
/* Ensure the application object is initialised */
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
#ifdef SDL_USE_CPS
|
||||
{
|
||||
CPSProcessSerNum PSN;
|
||||
/* Tell the dock about us */
|
||||
if (!CPSGetCurrentProcess(&PSN))
|
||||
if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
|
||||
if (!CPSSetFrontProcess(&PSN))
|
||||
[NSApplication sharedApplication];
|
||||
}
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
/* Set up the menubar */
|
||||
[NSApp setMainMenu:[[NSMenu alloc] init]];
|
||||
setApplicationMenu();
|
||||
setupWindowMenu();
|
||||
|
||||
/* Create SDLMain and make it the app delegate */
|
||||
sdlMain = [[SDLMain alloc] init];
|
||||
[NSApp setDelegate:sdlMain];
|
||||
|
||||
/* Start the main event loop */
|
||||
[NSApp run];
|
||||
|
||||
[sdlMain release];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Catch document open requests...this lets us notice files when the app
|
||||
* was launched by double-clicking a document, or when a document was
|
||||
* dragged/dropped on the app's icon. You need to have a
|
||||
* CFBundleDocumentsType section in your Info.plist to get this message,
|
||||
* apparently.
|
||||
*
|
||||
* Files are added to gArgv, so to the app, they'll look like command line
|
||||
* arguments. Previously, apps launched from the finder had nothing but
|
||||
* an argv[0].
|
||||
*
|
||||
* This message may be received multiple times to open several docs on launch.
|
||||
*
|
||||
* This message is ignored once the app's mainline has been called.
|
||||
*/
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||
{
|
||||
const char *temparg;
|
||||
size_t arglen;
|
||||
char *arg;
|
||||
char **newargv;
|
||||
|
||||
if (!gFinderLaunch) /* MacOS is passing command line args. */
|
||||
return FALSE;
|
||||
|
||||
if (gCalledAppMainline) /* app has started, ignore this document. */
|
||||
return FALSE;
|
||||
|
||||
temparg = [filename UTF8String];
|
||||
arglen = SDL_strlen(temparg) + 1;
|
||||
arg = (char *) SDL_malloc(arglen);
|
||||
if (arg == NULL)
|
||||
return FALSE;
|
||||
|
||||
newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
|
||||
if (newargv == NULL)
|
||||
{
|
||||
SDL_free(arg);
|
||||
return FALSE;
|
||||
}
|
||||
gArgv = newargv;
|
||||
|
||||
SDL_strlcpy(arg, temparg, arglen);
|
||||
gArgv[gArgc++] = arg;
|
||||
gArgv[gArgc] = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* Called when the internal event loop has just started running */
|
||||
- (void) applicationDidFinishLaunching: (NSNotification *) note
|
||||
{
|
||||
int status;
|
||||
|
||||
/* Set the working directory to the .app's parent directory */
|
||||
[self setupWorkingDirectory:gFinderLaunch];
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
/* Set the main menu to contain the real app name instead of "SDL App" */
|
||||
[self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
|
||||
#endif
|
||||
|
||||
/* Hand off to main application code */
|
||||
gCalledAppMainline = TRUE;
|
||||
status = SDL_main (gArgc, gArgv);
|
||||
|
||||
/* We're done, thank you for playing */
|
||||
exit(status);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSString (ReplaceSubString)
|
||||
|
||||
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
|
||||
{
|
||||
unsigned int bufferSize;
|
||||
unsigned int selfLen = [self length];
|
||||
unsigned int aStringLen = [aString length];
|
||||
unichar *buffer;
|
||||
NSRange localRange;
|
||||
NSString *result;
|
||||
|
||||
bufferSize = selfLen + aStringLen - aRange.length;
|
||||
buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
|
||||
|
||||
/* Get first part into buffer */
|
||||
localRange.location = 0;
|
||||
localRange.length = aRange.location;
|
||||
[self getCharacters:buffer range:localRange];
|
||||
|
||||
/* Get middle part into buffer */
|
||||
localRange.location = 0;
|
||||
localRange.length = aStringLen;
|
||||
[aString getCharacters:(buffer+aRange.location) range:localRange];
|
||||
|
||||
/* Get last part into buffer */
|
||||
localRange.location = aRange.location + aRange.length;
|
||||
localRange.length = selfLen - localRange.location;
|
||||
[self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
|
||||
|
||||
/* Build output string */
|
||||
result = [NSString stringWithCharacters:buffer length:bufferSize];
|
||||
|
||||
NSDeallocateMemoryPages(buffer, bufferSize);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif
|
||||
|
||||
|
||||
/* Main entry point to executable - should *not* be SDL_main! */
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
/* Copy the arguments into a global variable */
|
||||
/* This is passed if we are launched by double-clicking */
|
||||
if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
|
||||
gArgv = (char **) SDL_malloc(sizeof (char *) * 2);
|
||||
gArgv[0] = argv[0];
|
||||
gArgv[1] = NULL;
|
||||
gArgc = 1;
|
||||
gFinderLaunch = YES;
|
||||
} else {
|
||||
int i;
|
||||
gArgc = argc;
|
||||
gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1));
|
||||
for (i = 0; i <= argc; i++)
|
||||
gArgv[i] = argv[i];
|
||||
gFinderLaunch = NO;
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
NSApplicationMain (argc, argv);
|
||||
#else
|
||||
CustomApplicationMain (argc, argv);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
|
||||
// This code written in 2010 by Forest Hale (lordhavoc ghdigital com), and placed into public domain.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "bih.h"
|
||||
|
||||
static int BIH_BuildNode(bih_t *bih, int numchildren, int *leaflist, float *totalmins, float *totalmaxs)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int longestaxis;
|
||||
int axis = 0;
|
||||
int nodenum;
|
||||
int front = 0;
|
||||
int back = 0;
|
||||
bih_node_t *node;
|
||||
bih_leaf_t *child;
|
||||
float splitdist;
|
||||
float d;
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
float size[3];
|
||||
float frontmins[3];
|
||||
float frontmaxs[3];
|
||||
float backmins[3];
|
||||
float backmaxs[3];
|
||||
// calculate bounds of children
|
||||
child = bih->leafs + leaflist[0];
|
||||
mins[0] = child->mins[0];
|
||||
mins[1] = child->mins[1];
|
||||
mins[2] = child->mins[2];
|
||||
maxs[0] = child->maxs[0];
|
||||
maxs[1] = child->maxs[1];
|
||||
maxs[2] = child->maxs[2];
|
||||
for (i = 1;i < numchildren;i++)
|
||||
{
|
||||
child = bih->leafs + leaflist[i];
|
||||
if (mins[0] > child->mins[0]) mins[0] = child->mins[0];
|
||||
if (mins[1] > child->mins[1]) mins[1] = child->mins[1];
|
||||
if (mins[2] > child->mins[2]) mins[2] = child->mins[2];
|
||||
if (maxs[0] < child->maxs[0]) maxs[0] = child->maxs[0];
|
||||
if (maxs[1] < child->maxs[1]) maxs[1] = child->maxs[1];
|
||||
if (maxs[2] < child->maxs[2]) maxs[2] = child->maxs[2];
|
||||
}
|
||||
size[0] = maxs[0] - mins[0];
|
||||
size[1] = maxs[1] - mins[1];
|
||||
size[2] = maxs[2] - mins[2];
|
||||
// provide bounds to caller
|
||||
totalmins[0] = mins[0];
|
||||
totalmins[1] = mins[1];
|
||||
totalmins[2] = mins[2];
|
||||
totalmaxs[0] = maxs[0];
|
||||
totalmaxs[1] = maxs[1];
|
||||
totalmaxs[2] = maxs[2];
|
||||
// if we run out of nodes it's the caller's fault, but don't crash
|
||||
if (bih->numnodes == bih->maxnodes)
|
||||
{
|
||||
if (!bih->error)
|
||||
bih->error = BIHERROR_OUT_OF_NODES;
|
||||
return 0;
|
||||
}
|
||||
nodenum = bih->numnodes++;
|
||||
node = bih->nodes + nodenum;
|
||||
// store bounds for node
|
||||
node->mins[0] = mins[0];
|
||||
node->mins[1] = mins[1];
|
||||
node->mins[2] = mins[2];
|
||||
node->maxs[0] = maxs[0];
|
||||
node->maxs[1] = maxs[1];
|
||||
node->maxs[2] = maxs[2];
|
||||
node->front = 0;
|
||||
node->back = 0;
|
||||
node->frontmin = 0;
|
||||
node->backmax = 0;
|
||||
memset(node->children, -1, sizeof(node->children));
|
||||
// check if there are few enough children to store an unordered node
|
||||
if (numchildren <= BIH_MAXUNORDEREDCHILDREN)
|
||||
{
|
||||
node->type = BIH_UNORDERED;
|
||||
for (j = 0;j < numchildren;j++)
|
||||
node->children[j] = leaflist[j];
|
||||
return nodenum;
|
||||
}
|
||||
// pick longest axis
|
||||
longestaxis = 0;
|
||||
if (size[0] < size[1]) longestaxis = 1;
|
||||
if (size[longestaxis] < size[2]) longestaxis = 2;
|
||||
// iterate possible split axis choices, starting with the longest axis, if
|
||||
// all fail it means all children have the same bounds and we simply split
|
||||
// the list in half because each node can only have two children.
|
||||
for (j = 0;j < 3;j++)
|
||||
{
|
||||
// pick an axis
|
||||
axis = (longestaxis + j) % 3;
|
||||
// sort children into front and back lists
|
||||
splitdist = (node->mins[axis] + node->maxs[axis]) * 0.5f;
|
||||
front = 0;
|
||||
back = 0;
|
||||
for (i = 0;i < numchildren;i++)
|
||||
{
|
||||
child = bih->leafs + leaflist[i];
|
||||
d = (child->mins[axis] + child->maxs[axis]) * 0.5f;
|
||||
if (d < splitdist)
|
||||
bih->leafsortscratch[back++] = leaflist[i];
|
||||
else
|
||||
leaflist[front++] = leaflist[i];
|
||||
}
|
||||
// now copy the back ones into the space made in the leaflist for them
|
||||
if (back)
|
||||
memcpy(leaflist + front, bih->leafsortscratch, back*sizeof(leaflist[0]));
|
||||
// if both sides have some children, it's good enough for us.
|
||||
if (front && back)
|
||||
break;
|
||||
}
|
||||
if (j == 3)
|
||||
{
|
||||
// somewhat common case: no good choice, divide children arbitrarily
|
||||
axis = 0;
|
||||
back = numchildren >> 1;
|
||||
front = numchildren - back;
|
||||
}
|
||||
|
||||
// we now have front and back children divided in leaflist...
|
||||
node->type = (bih_nodetype_t)((int)BIH_SPLITX + axis);
|
||||
node->front = BIH_BuildNode(bih, front, leaflist, frontmins, frontmaxs);
|
||||
node->frontmin = frontmins[axis];
|
||||
node->back = BIH_BuildNode(bih, back, leaflist + front, backmins, backmaxs);
|
||||
node->backmax = backmaxs[axis];
|
||||
return nodenum;
|
||||
}
|
||||
|
||||
int BIH_Build(bih_t *bih, int numleafs, bih_leaf_t *leafs, int maxnodes, bih_node_t *nodes, int *temp_leafsort, int *temp_leafsortscratch)
|
||||
{
|
||||
int i;
|
||||
|
||||
memset(bih, 0, sizeof(*bih));
|
||||
bih->numleafs = numleafs;
|
||||
bih->leafs = leafs;
|
||||
bih->leafsort = temp_leafsort;
|
||||
bih->leafsortscratch = temp_leafsortscratch;
|
||||
bih->numnodes = 0;
|
||||
bih->maxnodes = maxnodes;
|
||||
bih->nodes = nodes;
|
||||
|
||||
// clear things we intend to rebuild
|
||||
memset(bih->nodes, 0, sizeof(bih->nodes[0]) * bih->maxnodes);
|
||||
for (i = 0;i < bih->numleafs;i++)
|
||||
bih->leafsort[i] = i;
|
||||
|
||||
bih->rootnode = BIH_BuildNode(bih, bih->numleafs, bih->leafsort, bih->mins, bih->maxs);
|
||||
return bih->error;
|
||||
}
|
||||
|
||||
static void BIH_GetTriangleListForBox_Node(const bih_t *bih, int nodenum, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, int *numtrianglespointer, const float *mins, const float *maxs)
|
||||
{
|
||||
int axis;
|
||||
bih_node_t *node;
|
||||
bih_leaf_t *leaf;
|
||||
for(;;)
|
||||
{
|
||||
node = bih->nodes + nodenum;
|
||||
// check if this is an unordered node (which holds an array of leaf numbers)
|
||||
if (node->type == BIH_UNORDERED)
|
||||
{
|
||||
for (axis = 0;axis < BIH_MAXUNORDEREDCHILDREN && node->children[axis] >= 0;axis++)
|
||||
{
|
||||
leaf = bih->leafs + node->children[axis];
|
||||
if (mins[0] > leaf->maxs[0] || maxs[0] < leaf->mins[0]
|
||||
|| mins[1] > leaf->maxs[1] || maxs[1] < leaf->mins[1]
|
||||
|| mins[2] > leaf->maxs[2] || maxs[2] < leaf->mins[2])
|
||||
continue;
|
||||
switch(leaf->type)
|
||||
{
|
||||
case BIH_RENDERTRIANGLE:
|
||||
if (*numtrianglespointer >= maxtriangles)
|
||||
{
|
||||
++*numtrianglespointer; // so the caller can detect overflow
|
||||
break;
|
||||
}
|
||||
if(trianglelist_surf)
|
||||
trianglelist_surf[*numtrianglespointer] = leaf->surfaceindex;
|
||||
trianglelist_idx[*numtrianglespointer] = leaf->itemindex;
|
||||
++*numtrianglespointer;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
// splitting node
|
||||
axis = node->type - BIH_SPLITX;
|
||||
if (mins[axis] < node->backmax)
|
||||
{
|
||||
if (maxs[axis] > node->frontmin)
|
||||
BIH_GetTriangleListForBox_Node(bih, node->front, maxtriangles, trianglelist_idx, trianglelist_surf, numtrianglespointer, mins, maxs);
|
||||
nodenum = node->back;
|
||||
continue;
|
||||
}
|
||||
if (maxs[axis] > node->frontmin)
|
||||
{
|
||||
nodenum = node->front;
|
||||
continue;
|
||||
}
|
||||
// fell between the child groups, nothing here
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int BIH_GetTriangleListForBox(const bih_t *bih, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, const float *mins, const float *maxs)
|
||||
{
|
||||
int numtriangles = 0;
|
||||
BIH_GetTriangleListForBox_Node(bih, bih->rootnode, maxtriangles, trianglelist_idx, trianglelist_surf, &numtriangles, mins, maxs);
|
||||
return numtriangles;
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
|
||||
// This code written in 2010 by Forest Hale (lordhavoc ghdigital com), and placed into public domain.
|
||||
|
||||
// Based on information in http://zach.in.tu-clausthal.de/papers/vrst02.html (in particular vrst02_boxtree.pdf)
|
||||
|
||||
#ifndef BIH_H
|
||||
#define BIH_H
|
||||
|
||||
#define BIH_MAXUNORDEREDCHILDREN 8
|
||||
|
||||
typedef enum biherror_e
|
||||
{
|
||||
BIHERROR_OK, // no error, be happy
|
||||
BIHERROR_OUT_OF_NODES // could not produce complete hierarchy, maxnodes too low (should be roughly half of numleafs)
|
||||
}
|
||||
biherror_t;
|
||||
|
||||
typedef enum bih_nodetype_e
|
||||
{
|
||||
BIH_SPLITX = 0,
|
||||
BIH_SPLITY = 1,
|
||||
BIH_SPLITZ = 2,
|
||||
BIH_UNORDERED = 3,
|
||||
}
|
||||
bih_nodetype_t;
|
||||
|
||||
typedef enum bih_leaftype_e
|
||||
{
|
||||
BIH_BRUSH = 4,
|
||||
BIH_COLLISIONTRIANGLE = 5,
|
||||
BIH_RENDERTRIANGLE = 6
|
||||
}
|
||||
bih_leaftype_t;
|
||||
|
||||
typedef struct bih_node_s
|
||||
{
|
||||
bih_nodetype_t type; // = BIH_SPLITX and similar values
|
||||
// TODO: store just one float for distance, and have BIH_SPLITMINX and BIH_SPLITMAXX distinctions, to reduce memory footprint and traversal time, as described in the paper (vrst02_boxtree.pdf)
|
||||
// TODO: move bounds data to parent node and remove it from leafs?
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
// node indexes of children (always > this node's index)
|
||||
int front;
|
||||
int back;
|
||||
// interval of children
|
||||
float frontmin; // children[0]
|
||||
float backmax; // children[1]
|
||||
// BIH_UNORDERED uses this for a list of leafindex (all >= 0), -1 = end of list
|
||||
int children[BIH_MAXUNORDEREDCHILDREN];
|
||||
}
|
||||
bih_node_t;
|
||||
|
||||
typedef struct bih_leaf_s
|
||||
{
|
||||
bih_leaftype_t type; // = BIH_BRUSH And similar values
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
// data past this point is generic and entirely up to the caller...
|
||||
int textureindex;
|
||||
int surfaceindex;
|
||||
int itemindex; // triangle or brush index
|
||||
}
|
||||
bih_leaf_t;
|
||||
|
||||
typedef struct bih_s
|
||||
{
|
||||
// permanent fields
|
||||
// leafs are constructed by caller before calling BIH_Build
|
||||
int numleafs;
|
||||
bih_leaf_t *leafs;
|
||||
// nodes are constructed by BIH_Build
|
||||
int numnodes;
|
||||
bih_node_t *nodes;
|
||||
int rootnode; // 0 if numnodes > 0, -1 otherwise
|
||||
// bounds calculated by BIH_Build
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
|
||||
// fields used only during BIH_Build:
|
||||
int maxnodes;
|
||||
int error; // set to a value if an error occurs in building (such as numnodes == maxnodes)
|
||||
int *leafsort;
|
||||
int *leafsortscratch;
|
||||
}
|
||||
bih_t;
|
||||
|
||||
int BIH_Build(bih_t *bih, int numleafs, bih_leaf_t *leafs, int maxnodes, bih_node_t *nodes, int *temp_leafsort, int *temp_leafsortscratch);
|
||||
|
||||
int BIH_GetTriangleListForBox(const bih_t *bih, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, const float *mins, const float *maxs);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,321 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#define MAX_MAP_HULLS 16 // Q1BSP has 4, Hexen2 Q1BSP has 8, MCBSP has 16
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#define BSPVERSION 29
|
||||
|
||||
typedef struct lump_s
|
||||
{
|
||||
int fileofs, filelen;
|
||||
} lump_t;
|
||||
|
||||
#define LUMP_ENTITIES 0
|
||||
#define LUMP_PLANES 1
|
||||
#define LUMP_TEXTURES 2
|
||||
#define LUMP_VERTEXES 3
|
||||
#define LUMP_VISIBILITY 4
|
||||
#define LUMP_NODES 5
|
||||
#define LUMP_TEXINFO 6
|
||||
#define LUMP_FACES 7
|
||||
#define LUMP_LIGHTING 8
|
||||
#define LUMP_CLIPNODES 9
|
||||
#define LUMP_LEAFS 10
|
||||
#define LUMP_MARKSURFACES 11
|
||||
#define LUMP_EDGES 12
|
||||
#define LUMP_SURFEDGES 13
|
||||
#define LUMP_MODELS 14
|
||||
#define HEADER_LUMPS 15
|
||||
|
||||
typedef struct hullinfo_s
|
||||
{
|
||||
int filehulls;
|
||||
float hullsizes[MAX_MAP_HULLS][2][3];
|
||||
} hullinfo_t;
|
||||
|
||||
typedef struct mmodel_s
|
||||
{
|
||||
float mins[3], maxs[3];
|
||||
float origin[3];
|
||||
int headnode[MAX_MAP_HULLS];
|
||||
int visleafs; // not including the solid leaf 0
|
||||
int firstface, numfaces;
|
||||
} mmodel_t;
|
||||
|
||||
/*
|
||||
// WARNING: this struct does NOT match q1bsp's disk format because MAX_MAP_HULLS has been changed by Sajt's MCBSP code, this struct is only being used in memory as a result
|
||||
typedef struct dmodel_s
|
||||
{
|
||||
float mins[3], maxs[3];
|
||||
float origin[3];
|
||||
int headnode[MAX_MAP_HULLS];
|
||||
int visleafs; // not including the solid leaf 0
|
||||
int firstface, numfaces;
|
||||
} dmodel_t;
|
||||
|
||||
typedef struct dheader_s
|
||||
{
|
||||
int version;
|
||||
lump_t lumps[HEADER_LUMPS];
|
||||
} dheader_t;
|
||||
|
||||
typedef struct dmiptexlump_s
|
||||
{
|
||||
int nummiptex;
|
||||
int dataofs[4]; // [nummiptex]
|
||||
} dmiptexlump_t;
|
||||
*/
|
||||
|
||||
#define MIPLEVELS 4
|
||||
/*
|
||||
typedef struct miptex_s
|
||||
{
|
||||
char name[16];
|
||||
unsigned width, height;
|
||||
unsigned offsets[MIPLEVELS]; // four mip maps stored
|
||||
} miptex_t;
|
||||
|
||||
|
||||
typedef struct dvertex_s
|
||||
{
|
||||
float point[3];
|
||||
} dvertex_t;
|
||||
*/
|
||||
|
||||
|
||||
// 0-2 are axial planes
|
||||
#define PLANE_X 0
|
||||
#define PLANE_Y 1
|
||||
#define PLANE_Z 2
|
||||
|
||||
// 3-5 are non-axial planes snapped to the nearest
|
||||
#define PLANE_ANYX 3
|
||||
#define PLANE_ANYY 4
|
||||
#define PLANE_ANYZ 5
|
||||
|
||||
/*
|
||||
typedef struct dplane_s
|
||||
{
|
||||
float normal[3];
|
||||
float dist;
|
||||
int type; // PLANE_X - PLANE_ANYZ ?remove? trivial to regenerate
|
||||
} dplane_t;
|
||||
*/
|
||||
|
||||
|
||||
// contents values in Q1 maps
|
||||
#define CONTENTS_EMPTY -1
|
||||
#define CONTENTS_SOLID -2
|
||||
#define CONTENTS_WATER -3
|
||||
#define CONTENTS_SLIME -4
|
||||
#define CONTENTS_LAVA -5
|
||||
#define CONTENTS_SKY -6
|
||||
// these were #ifdef QUAKE2 in the quake source
|
||||
#define CONTENTS_ORIGIN -7 // removed at csg time
|
||||
#define CONTENTS_CLIP -8 // changed to contents_solid
|
||||
#define CONTENTS_CURRENT_0 -9
|
||||
#define CONTENTS_CURRENT_90 -10
|
||||
#define CONTENTS_CURRENT_180 -11
|
||||
#define CONTENTS_CURRENT_270 -12
|
||||
#define CONTENTS_CURRENT_UP -13
|
||||
#define CONTENTS_CURRENT_DOWN -14
|
||||
|
||||
//contents flags in Q2 maps
|
||||
#define CONTENTSQ2_SOLID 0x00000001 // an eye is never valid in a solid
|
||||
#define CONTENTSQ2_WINDOW 0x00000002 // translucent, but not watery
|
||||
#define CONTENTSQ2_AUX 0x00000004
|
||||
#define CONTENTSQ2_LAVA 0x00000008
|
||||
#define CONTENTSQ2_SLIME 0x00000010
|
||||
#define CONTENTSQ2_WATER 0x00000020
|
||||
#define CONTENTSQ2_MIST 0x00000040
|
||||
#define CONTENTSQ2_AREAPORTAL 0x00008000
|
||||
#define CONTENTSQ2_PLAYERCLIP 0x00010000
|
||||
#define CONTENTSQ2_MONSTERCLIP 0x00020000
|
||||
#define CONTENTSQ2_CURRENT_0 0x00040000
|
||||
#define CONTENTSQ2_CURRENT_90 0x00080000
|
||||
#define CONTENTSQ2_CURRENT_180 0x00100000
|
||||
#define CONTENTSQ2_CURRENT_270 0x00200000
|
||||
#define CONTENTSQ2_CURRENT_UP 0x00400000
|
||||
#define CONTENTSQ2_CURRENT_DOWN 0x00800000
|
||||
#define CONTENTSQ2_ORIGIN 0x01000000 // removed before bsping an entity
|
||||
#define CONTENTSQ2_MONSTER 0x02000000 // should never be on a brush, only in game
|
||||
#define CONTENTSQ2_DEADMONSTER 0x04000000
|
||||
#define CONTENTSQ2_DETAIL 0x08000000 // brushes to be added after vis leafs
|
||||
#define CONTENTSQ2_TRANSLUCENT 0x10000000 // auto set if any surface has trans
|
||||
#define CONTENTSQ2_LADDER 0x20000000
|
||||
|
||||
//contents flags in Q3 maps
|
||||
#define CONTENTSQ3_SOLID 0x00000001 // solid (opaque and transparent)
|
||||
#define CONTENTSQ3_LAVA 0x00000008 // lava
|
||||
#define CONTENTSQ3_SLIME 0x00000010 // slime
|
||||
#define CONTENTSQ3_WATER 0x00000020 // water
|
||||
#define CONTENTSQ3_FOG 0x00000040 // unused?
|
||||
#define CONTENTSQ3_AREAPORTAL 0x00008000 // areaportal (separates areas)
|
||||
#define CONTENTSQ3_PLAYERCLIP 0x00010000 // block players
|
||||
#define CONTENTSQ3_MONSTERCLIP 0x00020000 // block monsters
|
||||
#define CONTENTSQ3_TELEPORTER 0x00040000 // hint for Q3's bots
|
||||
#define CONTENTSQ3_JUMPPAD 0x00080000 // hint for Q3's bots
|
||||
#define CONTENTSQ3_CLUSTERPORTAL 0x00100000 // hint for Q3's bots
|
||||
#define CONTENTSQ3_DONOTENTER 0x00200000 // hint for Q3's bots
|
||||
#define CONTENTSQ3_BOTCLIP 0x00400000 // hint for Q3's bots
|
||||
#define CONTENTSQ3_ORIGIN 0x01000000 // used by origin brushes to indicate origin of bmodel (removed by map compiler)
|
||||
#define CONTENTSQ3_BODY 0x02000000 // used by bbox entities (should never be on a brush)
|
||||
#define CONTENTSQ3_CORPSE 0x04000000 // used by dead bodies (SOLID_CORPSE in darkplaces)
|
||||
#define CONTENTSQ3_DETAIL 0x08000000 // brushes that do not split the bsp tree (decorations)
|
||||
#define CONTENTSQ3_STRUCTURAL 0x10000000 // brushes that split the bsp tree
|
||||
#define CONTENTSQ3_TRANSLUCENT 0x20000000 // leaves surfaces that are inside for rendering
|
||||
#define CONTENTSQ3_TRIGGER 0x40000000 // used by trigger entities
|
||||
#define CONTENTSQ3_NODROP 0x80000000 // remove items that fall into this brush
|
||||
|
||||
#define SUPERCONTENTS_SOLID 0x00000001
|
||||
#define SUPERCONTENTS_WATER 0x00000002
|
||||
#define SUPERCONTENTS_SLIME 0x00000004
|
||||
#define SUPERCONTENTS_LAVA 0x00000008
|
||||
#define SUPERCONTENTS_SKY 0x00000010
|
||||
#define SUPERCONTENTS_BODY 0x00000020
|
||||
#define SUPERCONTENTS_CORPSE 0x00000040
|
||||
#define SUPERCONTENTS_NODROP 0x00000080
|
||||
#define SUPERCONTENTS_PLAYERCLIP 0x00000100
|
||||
#define SUPERCONTENTS_MONSTERCLIP 0x00000200
|
||||
#define SUPERCONTENTS_DONOTENTER 0x00000400
|
||||
#define SUPERCONTENTS_BOTCLIP 0x00000800
|
||||
#define SUPERCONTENTS_OPAQUE 0x00001000
|
||||
// TODO: is there any reason to define:
|
||||
// fog?
|
||||
// areaportal?
|
||||
// teleporter?
|
||||
// jumppad?
|
||||
// clusterportal?
|
||||
// detail? (div0) no, game code should not be allowed to differentiate between structural and detail
|
||||
// structural? (div0) no, game code should not be allowed to differentiate between structural and detail
|
||||
// trigger? (div0) no, as these are always solid anyway, and that's all that matters for trigger brushes
|
||||
#define SUPERCONTENTS_LIQUIDSMASK (SUPERCONTENTS_LAVA | SUPERCONTENTS_SLIME | SUPERCONTENTS_WATER)
|
||||
#define SUPERCONTENTS_VISBLOCKERMASK SUPERCONTENTS_OPAQUE
|
||||
|
||||
/*
|
||||
#define SUPERCONTENTS_DEADMONSTER 0x00000000
|
||||
#define SUPERCONTENTS_CURRENT_0 0x00000000
|
||||
#define SUPERCONTENTS_CURRENT_90 0x00000000
|
||||
#define SUPERCONTENTS_CURRENT_180 0x00000000
|
||||
#define SUPERCONTENTS_CURRENT_270 0x00000000
|
||||
#define SUPERCONTENTS_CURRENT_DOWN 0x00000000
|
||||
#define SUPERCONTENTS_CURRENT_UP 0x00000000
|
||||
#define SUPERCONTENTS_AREAPORTAL 0x00000000
|
||||
#define SUPERCONTENTS_AUX 0x00000000
|
||||
#define SUPERCONTENTS_CLUSTERPORTAL 0x00000000
|
||||
#define SUPERCONTENTS_DETAIL 0x00000000
|
||||
#define SUPERCONTENTS_STRUCTURAL 0x00000000
|
||||
#define SUPERCONTENTS_DONOTENTER 0x00000000
|
||||
#define SUPERCONTENTS_JUMPPAD 0x00000000
|
||||
#define SUPERCONTENTS_LADDER 0x00000000
|
||||
#define SUPERCONTENTS_MONSTER 0x00000000
|
||||
#define SUPERCONTENTS_MONSTERCLIP 0x00000000
|
||||
#define SUPERCONTENTS_PLAYERCLIP 0x00000000
|
||||
#define SUPERCONTENTS_TELEPORTER 0x00000000
|
||||
#define SUPERCONTENTS_TRANSLUCENT 0x00000000
|
||||
#define SUPERCONTENTS_TRIGGER 0x00000000
|
||||
#define SUPERCONTENTS_WINDOW 0x00000000
|
||||
*/
|
||||
|
||||
/*
|
||||
typedef struct dnode_s
|
||||
{
|
||||
int planenum;
|
||||
short children[2]; // negative numbers are -(leafs+1), not nodes
|
||||
short mins[3]; // for sphere culling
|
||||
short maxs[3];
|
||||
unsigned short firstface;
|
||||
unsigned short numfaces; // counting both sides
|
||||
} dnode_t;
|
||||
|
||||
typedef struct dclipnode_s
|
||||
{
|
||||
int planenum;
|
||||
short children[2]; // negative numbers are contents
|
||||
} dclipnode_t;
|
||||
|
||||
|
||||
typedef struct texinfo_s
|
||||
{
|
||||
float vecs[2][4]; // [s/t][xyz offset]
|
||||
int miptex;
|
||||
int flags;
|
||||
} texinfo_t;
|
||||
*/
|
||||
#define TEX_SPECIAL 1 // sky or slime, no lightmap or 256 subdivision
|
||||
|
||||
// note that edge 0 is never used, because negative edge nums are used for
|
||||
// counterclockwise use of the edge in a face
|
||||
/*
|
||||
typedef struct dedge_s
|
||||
{
|
||||
unsigned short v[2]; // vertex numbers
|
||||
} dedge_t;
|
||||
*/
|
||||
|
||||
#define MAXLIGHTMAPS 4
|
||||
/*
|
||||
typedef struct dface_s
|
||||
{
|
||||
// LordHavoc: changed from short to unsigned short for q2 support
|
||||
unsigned short planenum;
|
||||
short side;
|
||||
|
||||
int firstedge; // we must support > 64k edges
|
||||
short numedges;
|
||||
short texinfo;
|
||||
|
||||
// lighting info
|
||||
unsigned char styles[MAXLIGHTMAPS];
|
||||
int lightofs; // start of [numstyles*surfsize] samples
|
||||
} dface_t;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#define AMBIENT_WATER 0
|
||||
#define AMBIENT_SKY 1
|
||||
#define AMBIENT_SLIME 2
|
||||
#define AMBIENT_LAVA 3
|
||||
|
||||
#define NUM_AMBIENTS 4 // automatic ambient sounds
|
||||
|
||||
// leaf 0 is the generic CONTENTS_SOLID leaf, used for all solid areas
|
||||
// all other leafs need visibility info
|
||||
/*
|
||||
typedef struct dleaf_s
|
||||
{
|
||||
int contents;
|
||||
int visofs; // -1 = no visibility info
|
||||
|
||||
short mins[3]; // for frustum culling
|
||||
short maxs[3];
|
||||
|
||||
unsigned short firstmarksurface;
|
||||
unsigned short nummarksurfaces;
|
||||
|
||||
unsigned char ambient_level[NUM_AMBIENTS];
|
||||
} dleaf_t;
|
||||
*/
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#define STRINGIFY2(arg) #arg
|
||||
#define STRINGIFY(arg) STRINGIFY2(arg)
|
||||
|
||||
extern const char *buildstring;
|
||||
const char *buildstring =
|
||||
#ifndef NO_BUILD_TIMESTAMPS
|
||||
__TIME__ " " __DATE__ " "
|
||||
#endif
|
||||
#ifdef SVNREVISION
|
||||
STRINGIFY(SVNREVISION)
|
||||
#else
|
||||
"-"
|
||||
#endif
|
||||
#ifdef BUILDTYPE
|
||||
" " STRINGIFY(BUILDTYPE)
|
||||
#endif
|
||||
;
|
|
@ -0,0 +1,720 @@
|
|||
#include "quakedef.h"
|
||||
#include "cap_avi.h"
|
||||
|
||||
#define AVI_MASTER_INDEX_SIZE 640 // GB ought to be enough for anyone
|
||||
|
||||
typedef struct capturevideostate_avi_formatspecific_s
|
||||
{
|
||||
// AVI stuff
|
||||
fs_offset_t videofile_firstchunkframes_offset;
|
||||
fs_offset_t videofile_totalframes_offset1;
|
||||
fs_offset_t videofile_totalframes_offset2;
|
||||
fs_offset_t videofile_totalsampleframes_offset;
|
||||
int videofile_ix_master_audio_inuse;
|
||||
fs_offset_t videofile_ix_master_audio_inuse_offset;
|
||||
fs_offset_t videofile_ix_master_audio_start_offset;
|
||||
int videofile_ix_master_video_inuse;
|
||||
fs_offset_t videofile_ix_master_video_inuse_offset;
|
||||
fs_offset_t videofile_ix_master_video_start_offset;
|
||||
fs_offset_t videofile_ix_movistart;
|
||||
fs_offset_t position;
|
||||
qboolean canseek;
|
||||
sizebuf_t riffbuffer;
|
||||
unsigned char riffbufferdata[128];
|
||||
sizebuf_t riffindexbuffer;
|
||||
int riffstacklevel;
|
||||
fs_offset_t riffstackstartoffset[4];
|
||||
fs_offset_t riffstacksizehint[4];
|
||||
const char *riffstackfourcc[4];
|
||||
}
|
||||
capturevideostate_avi_formatspecific_t;
|
||||
#define LOAD_FORMATSPECIFIC_AVI() capturevideostate_avi_formatspecific_t *format = (capturevideostate_avi_formatspecific_t *) cls.capturevideo.formatspecific
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Start(void)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
memset(&format->riffbuffer, 0, sizeof(sizebuf_t));
|
||||
format->riffbuffer.maxsize = sizeof(format->riffbufferdata);
|
||||
format->riffbuffer.data = format->riffbufferdata;
|
||||
format->position = 0;
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Flush(void)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (format->riffbuffer.cursize > 0)
|
||||
{
|
||||
if (!FS_Write(cls.capturevideo.videofile, format->riffbuffer.data, format->riffbuffer.cursize))
|
||||
cls.capturevideo.error = true;
|
||||
format->position += format->riffbuffer.cursize;
|
||||
format->riffbuffer.cursize = 0;
|
||||
format->riffbuffer.overflowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_FlushNoIncrease(void)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (format->riffbuffer.cursize > 0)
|
||||
{
|
||||
if (!FS_Write(cls.capturevideo.videofile, format->riffbuffer.data, format->riffbuffer.cursize))
|
||||
cls.capturevideo.error = true;
|
||||
format->riffbuffer.cursize = 0;
|
||||
format->riffbuffer.overflowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_WriteBytes(const unsigned char *data, size_t size)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
if (!FS_Write(cls.capturevideo.videofile, data, size))
|
||||
cls.capturevideo.error = true;
|
||||
format->position += size;
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Write32(int n)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (format->riffbuffer.cursize + 4 > format->riffbuffer.maxsize)
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
MSG_WriteLong(&format->riffbuffer, n);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Write16(int n)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (format->riffbuffer.cursize + 2 > format->riffbuffer.maxsize)
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
MSG_WriteShort(&format->riffbuffer, n);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_WriteFourCC(const char *chunkfourcc)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (format->riffbuffer.cursize + (int)strlen(chunkfourcc) > format->riffbuffer.maxsize)
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
MSG_WriteUnterminatedString(&format->riffbuffer, chunkfourcc);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_WriteTerminatedString(const char *string)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (format->riffbuffer.cursize + (int)strlen(string) > format->riffbuffer.maxsize)
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
MSG_WriteString(&format->riffbuffer, string);
|
||||
}
|
||||
|
||||
static fs_offset_t SCR_CaptureVideo_RIFF_GetPosition(void)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
//return FS_Tell(cls.capturevideo.videofile);
|
||||
return format->position;
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Push(const char *chunkfourcc, const char *listtypefourcc, fs_offset_t sizeHint)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if (listtypefourcc && sizeHint >= 0)
|
||||
sizeHint += 4; // size hint is for INNER size
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC(chunkfourcc);
|
||||
SCR_CaptureVideo_RIFF_Write32(sizeHint);
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
format->riffstacksizehint[format->riffstacklevel] = sizeHint;
|
||||
format->riffstackstartoffset[format->riffstacklevel] = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
format->riffstackfourcc[format->riffstacklevel] = chunkfourcc;
|
||||
++format->riffstacklevel;
|
||||
if (listtypefourcc)
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC(listtypefourcc);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Pop(void)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
fs_offset_t offset, sizehint;
|
||||
int x;
|
||||
unsigned char sizebytes[4];
|
||||
// write out the chunk size and then return to the current file position
|
||||
format->riffstacklevel--;
|
||||
offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
|
||||
sizehint = format->riffstacksizehint[format->riffstacklevel];
|
||||
x = (int)(offset - (format->riffstackstartoffset[format->riffstacklevel]));
|
||||
|
||||
if(x != sizehint)
|
||||
{
|
||||
if(sizehint != -1)
|
||||
{
|
||||
int i;
|
||||
Con_Printf("WARNING: invalid size hint %d when writing video data (actual size: %d)\n", (int) sizehint, x);
|
||||
for(i = 0; i <= format->riffstacklevel; ++i)
|
||||
{
|
||||
Con_Printf(" RIFF level %d = %s\n", i, format->riffstackfourcc[i]);
|
||||
}
|
||||
}
|
||||
sizebytes[0] = (x) & 0xff;sizebytes[1] = (x >> 8) & 0xff;sizebytes[2] = (x >> 16) & 0xff;sizebytes[3] = (x >> 24) & 0xff;
|
||||
if(FS_Seek(cls.capturevideo.videofile, -(x + 4), SEEK_END) >= 0)
|
||||
{
|
||||
FS_Write(cls.capturevideo.videofile, sizebytes, 4);
|
||||
}
|
||||
FS_Seek(cls.capturevideo.videofile, 0, SEEK_END);
|
||||
}
|
||||
|
||||
if (offset & 1)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_WriteBytes((unsigned char *) "\0", 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void GrowBuf(sizebuf_t *buf, int extralen)
|
||||
{
|
||||
if(buf->cursize + extralen > buf->maxsize)
|
||||
{
|
||||
int oldsize = buf->maxsize;
|
||||
unsigned char *olddata;
|
||||
olddata = buf->data;
|
||||
buf->maxsize = max(buf->maxsize * 2, 4096);
|
||||
buf->data = (unsigned char *) Mem_Alloc(tempmempool, buf->maxsize);
|
||||
if(olddata)
|
||||
{
|
||||
memcpy(buf->data, olddata, oldsize);
|
||||
Mem_Free(olddata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_IndexEntry(const char *chunkfourcc, int chunksize, int flags)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
if(!format->canseek)
|
||||
Sys_Error("SCR_CaptureVideo_RIFF_IndexEntry called on non-seekable AVI");
|
||||
|
||||
if (format->riffstacklevel != 2)
|
||||
Sys_Error("SCR_Capturevideo_RIFF_IndexEntry: RIFF stack level is %i (should be 2)\n", format->riffstacklevel);
|
||||
GrowBuf(&format->riffindexbuffer, 16);
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
MSG_WriteUnterminatedString(&format->riffindexbuffer, chunkfourcc);
|
||||
MSG_WriteLong(&format->riffindexbuffer, flags);
|
||||
MSG_WriteLong(&format->riffindexbuffer, (int)FS_Tell(cls.capturevideo.videofile) - format->riffstackstartoffset[1]);
|
||||
MSG_WriteLong(&format->riffindexbuffer, chunksize);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_MakeIxChunk(const char *fcc, const char *dwChunkId, fs_offset_t masteridx_counter, int *masteridx_count, fs_offset_t masteridx_start)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
int nMatching;
|
||||
int i;
|
||||
fs_offset_t ix = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
fs_offset_t pos, sz;
|
||||
|
||||
if(!format->canseek)
|
||||
Sys_Error("SCR_CaptureVideo_RIFF_MakeIxChunk called on non-seekable AVI");
|
||||
|
||||
if(*masteridx_count >= AVI_MASTER_INDEX_SIZE)
|
||||
return;
|
||||
|
||||
nMatching = 0; // go through index and enumerate them
|
||||
for(i = 0; i < format->riffindexbuffer.cursize; i += 16)
|
||||
if(!memcmp(format->riffindexbuffer.data + i, dwChunkId, 4))
|
||||
++nMatching;
|
||||
|
||||
sz = 2+2+4+4+4+4+4;
|
||||
for(i = 0; i < format->riffindexbuffer.cursize; i += 16)
|
||||
if(!memcmp(format->riffindexbuffer.data + i, dwChunkId, 4))
|
||||
sz += 8;
|
||||
|
||||
SCR_CaptureVideo_RIFF_Push(fcc, NULL, sz);
|
||||
SCR_CaptureVideo_RIFF_Write16(2); // wLongsPerEntry
|
||||
SCR_CaptureVideo_RIFF_Write16(0x0100); // bIndexType=1, bIndexSubType=0
|
||||
SCR_CaptureVideo_RIFF_Write32(nMatching); // nEntriesInUse
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC(dwChunkId); // dwChunkId
|
||||
SCR_CaptureVideo_RIFF_Write32(format->videofile_ix_movistart & (fs_offset_t) 0xFFFFFFFFu);
|
||||
SCR_CaptureVideo_RIFF_Write32(((fs_offset_t) format->videofile_ix_movistart) >> 32);
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved
|
||||
|
||||
for(i = 0; i < format->riffindexbuffer.cursize; i += 16)
|
||||
if(!memcmp(format->riffindexbuffer.data + i, dwChunkId, 4))
|
||||
{
|
||||
unsigned int *p = (unsigned int *) (format->riffindexbuffer.data + i);
|
||||
unsigned int flags = p[1];
|
||||
unsigned int rpos = p[2];
|
||||
unsigned int size = p[3];
|
||||
size &= ~0x80000000;
|
||||
if(!(flags & 0x10)) // no keyframe?
|
||||
size |= 0x80000000;
|
||||
SCR_CaptureVideo_RIFF_Write32(rpos + 8);
|
||||
SCR_CaptureVideo_RIFF_Write32(size);
|
||||
}
|
||||
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
pos = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
|
||||
if(FS_Seek(cls.capturevideo.videofile, masteridx_start + 16 * *masteridx_count, SEEK_SET) >= 0)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Write32(ix & (fs_offset_t) 0xFFFFFFFFu);
|
||||
SCR_CaptureVideo_RIFF_Write32(((fs_offset_t) ix) >> 32);
|
||||
SCR_CaptureVideo_RIFF_Write32(pos - ix);
|
||||
SCR_CaptureVideo_RIFF_Write32(nMatching);
|
||||
SCR_CaptureVideo_RIFF_FlushNoIncrease();
|
||||
}
|
||||
|
||||
if(FS_Seek(cls.capturevideo.videofile, masteridx_counter, SEEK_SET) >= 0)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Write32(++*masteridx_count);
|
||||
SCR_CaptureVideo_RIFF_FlushNoIncrease();
|
||||
}
|
||||
|
||||
FS_Seek(cls.capturevideo.videofile, 0, SEEK_END); // return value doesn't matter here
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_Finish(qboolean final)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
// close the "movi" list
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
if(format->videofile_ix_master_video_inuse_offset)
|
||||
SCR_CaptureVideo_RIFF_MakeIxChunk("ix00", "00dc", format->videofile_ix_master_video_inuse_offset, &format->videofile_ix_master_video_inuse, format->videofile_ix_master_video_start_offset);
|
||||
if(format->videofile_ix_master_audio_inuse_offset)
|
||||
SCR_CaptureVideo_RIFF_MakeIxChunk("ix01", "01wb", format->videofile_ix_master_audio_inuse_offset, &format->videofile_ix_master_audio_inuse, format->videofile_ix_master_audio_start_offset);
|
||||
// write the idx1 chunk that we've been building while saving the frames (for old style players)
|
||||
if(final && format->videofile_firstchunkframes_offset)
|
||||
// TODO replace index creating by OpenDML ix##/##ix/indx chunk so it works for more than one AVI part too
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Push("idx1", NULL, format->riffindexbuffer.cursize);
|
||||
SCR_CaptureVideo_RIFF_WriteBytes(format->riffindexbuffer.data, format->riffindexbuffer.cursize);
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
format->riffindexbuffer.cursize = 0;
|
||||
// pop the RIFF chunk itself
|
||||
while (format->riffstacklevel > 0)
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
if(format->videofile_firstchunkframes_offset)
|
||||
{
|
||||
Con_DPrintf("Finishing first chunk (%d frames)\n", cls.capturevideo.frame);
|
||||
if(FS_Seek(cls.capturevideo.videofile, format->videofile_firstchunkframes_offset, SEEK_SET) >= 0)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.frame);
|
||||
SCR_CaptureVideo_RIFF_FlushNoIncrease();
|
||||
}
|
||||
FS_Seek(cls.capturevideo.videofile, 0, SEEK_END);
|
||||
format->videofile_firstchunkframes_offset = 0;
|
||||
}
|
||||
else
|
||||
Con_DPrintf("Finishing another chunk (%d frames)\n", cls.capturevideo.frame);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_RIFF_OverflowCheck(int framesize)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
fs_offset_t cursize;
|
||||
//fs_offset_t curfilesize;
|
||||
if (format->riffstacklevel != 2)
|
||||
Sys_Error("SCR_CaptureVideo_RIFF_OverflowCheck: chunk stack leakage!\n");
|
||||
|
||||
if(!format->canseek)
|
||||
return;
|
||||
|
||||
// check where we are in the file
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
cursize = SCR_CaptureVideo_RIFF_GetPosition() - format->riffstackstartoffset[0];
|
||||
//curfilesize = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
|
||||
// if this would overflow the windows limit of 1GB per RIFF chunk, we need
|
||||
// to close the current RIFF chunk and open another for future frames
|
||||
if (8 + cursize + framesize + format->riffindexbuffer.cursize + 8 + format->riffindexbuffer.cursize + 64 > 1<<30) // note that the Ix buffer takes less space... I just don't dare to / 2 here now... sorry, maybe later
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Finish(false);
|
||||
// begin a new 1GB extended section of the AVI
|
||||
SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX", -1);
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "movi", -1);
|
||||
format->videofile_ix_movistart = format->riffstackstartoffset[1];
|
||||
}
|
||||
}
|
||||
|
||||
// converts from BGRA32 to I420 colorspace (identical to YV12 except chroma plane order is reversed), this colorspace is handled by the Intel(r) 4:2:0 codec on Windows
|
||||
static void SCR_CaptureVideo_ConvertFrame_BGRA_to_I420_flip(int width, int height, unsigned char *instart, unsigned char *outstart)
|
||||
{
|
||||
int x, y;
|
||||
int blockr, blockg, blockb;
|
||||
int outoffset = (width/2)*(height/2);
|
||||
unsigned char *b, *out;
|
||||
// process one line at a time, and CbCr every other line at 2 pixel intervals
|
||||
for (y = 0;y < height;y++)
|
||||
{
|
||||
// 1x1 Y
|
||||
for (b = instart + (height-1-y)*width*4, out = outstart + y*width, x = 0;x < width;x++, b += 4, out++)
|
||||
{
|
||||
blockr = b[2];
|
||||
blockg = b[1];
|
||||
blockb = b[0];
|
||||
*out = cls.capturevideo.yuvnormalizetable[0][cls.capturevideo.rgbtoyuvscaletable[0][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[0][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[0][2][blockb]];
|
||||
}
|
||||
if ((y & 1) == 0 && y/2 < height/2) // if h is odd, this skips the last row
|
||||
{
|
||||
// 2x2 Cr and Cb planes
|
||||
int inpitch = width*4;
|
||||
for (b = instart + (height-2-y)*width*4, out = outstart + width*height + (y/2)*(width/2), x = 0;x < width/2;x++, b += 8, out++)
|
||||
{
|
||||
blockr = (b[2] + b[6] + b[inpitch+2] + b[inpitch+6]) >> 2;
|
||||
blockg = (b[1] + b[5] + b[inpitch+1] + b[inpitch+5]) >> 2;
|
||||
blockb = (b[0] + b[4] + b[inpitch+0] + b[inpitch+4]) >> 2;
|
||||
// Cr
|
||||
out[0 ] = cls.capturevideo.yuvnormalizetable[1][cls.capturevideo.rgbtoyuvscaletable[1][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[1][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[1][2][blockb] + 128];
|
||||
// Cb
|
||||
out[outoffset] = cls.capturevideo.yuvnormalizetable[2][cls.capturevideo.rgbtoyuvscaletable[2][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[2][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[2][2][blockb] + 128];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_Avi_VideoFrames(int num)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
int x = 0, width = cls.capturevideo.width, height = cls.capturevideo.height;
|
||||
unsigned char *in, *out;
|
||||
// FIXME: width/height must be multiple of 2, enforce this?
|
||||
in = cls.capturevideo.outbuffer;
|
||||
out = cls.capturevideo.outbuffer + width*height*4;
|
||||
SCR_CaptureVideo_ConvertFrame_BGRA_to_I420_flip(width, height, in, out);
|
||||
x = width*height+(width/2)*(height/2)*2;
|
||||
while(num-- > 0)
|
||||
{
|
||||
if(format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_OverflowCheck(8 + x);
|
||||
SCR_CaptureVideo_RIFF_IndexEntry("00dc", x, 0x10); // AVIIF_KEYFRAME
|
||||
}
|
||||
|
||||
if(!format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX", 12+8+x);
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "movi", 8+x);
|
||||
}
|
||||
SCR_CaptureVideo_RIFF_Push("00dc", NULL, x);
|
||||
SCR_CaptureVideo_RIFF_WriteBytes(out, x);
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
if(!format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_Avi_EndVideo(void)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
|
||||
if(format->canseek)
|
||||
{
|
||||
// close any open chunks
|
||||
SCR_CaptureVideo_RIFF_Finish(true);
|
||||
|
||||
// go back and fix the video frames and audio samples fields
|
||||
if(format->videofile_totalframes_offset1)
|
||||
if(FS_Seek(cls.capturevideo.videofile, format->videofile_totalframes_offset1, SEEK_SET) >= 0)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.frame);
|
||||
SCR_CaptureVideo_RIFF_FlushNoIncrease();
|
||||
}
|
||||
if(format->videofile_totalframes_offset2)
|
||||
if(FS_Seek(cls.capturevideo.videofile, format->videofile_totalframes_offset2, SEEK_SET) >= 0)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.frame);
|
||||
SCR_CaptureVideo_RIFF_FlushNoIncrease();
|
||||
}
|
||||
if (cls.capturevideo.soundrate)
|
||||
{
|
||||
if(format->videofile_totalsampleframes_offset)
|
||||
if(FS_Seek(cls.capturevideo.videofile, format->videofile_totalsampleframes_offset, SEEK_SET) >= 0)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundsampleframe);
|
||||
SCR_CaptureVideo_RIFF_FlushNoIncrease();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (format->riffindexbuffer.data)
|
||||
{
|
||||
Mem_Free(format->riffindexbuffer.data);
|
||||
format->riffindexbuffer.data = NULL;
|
||||
}
|
||||
|
||||
FS_Close(cls.capturevideo.videofile);
|
||||
cls.capturevideo.videofile = NULL;
|
||||
|
||||
Mem_Free(format);
|
||||
}
|
||||
|
||||
static void SCR_CaptureVideo_Avi_SoundFrame(const portable_sampleframe_t *paintbuffer, size_t length)
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
int x;
|
||||
unsigned char bufstereo16le[PAINTBUFFER_SIZE * 4];
|
||||
unsigned char* out_ptr;
|
||||
size_t i;
|
||||
|
||||
// write the sound buffer as little endian 16bit interleaved stereo
|
||||
for(i = 0, out_ptr = bufstereo16le; i < length; i++, out_ptr += 4)
|
||||
{
|
||||
int n0, n1;
|
||||
|
||||
n0 = paintbuffer[i].sample[0] * 32768.0f;
|
||||
n0 = bound(-32768, n0, 32767);
|
||||
out_ptr[0] = (unsigned char)n0;
|
||||
out_ptr[1] = (unsigned char)(n0 >> 8);
|
||||
|
||||
n1 = paintbuffer[i].sample[1] * 32768.0f;
|
||||
n1 = bound(-32768, n1, 32767);
|
||||
out_ptr[2] = (unsigned char)n1;
|
||||
out_ptr[3] = (unsigned char)(n1 >> 8);
|
||||
}
|
||||
|
||||
x = length*4;
|
||||
if(format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_OverflowCheck(8 + x);
|
||||
SCR_CaptureVideo_RIFF_IndexEntry("01wb", x, 0x10); // AVIIF_KEYFRAME
|
||||
}
|
||||
|
||||
if(!format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX", 12+8+x);
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "movi", 8+x);
|
||||
}
|
||||
SCR_CaptureVideo_RIFF_Push("01wb", NULL, x);
|
||||
SCR_CaptureVideo_RIFF_WriteBytes(bufstereo16le, x);
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
if(!format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
void SCR_CaptureVideo_Avi_BeginVideo(void)
|
||||
{
|
||||
int width = cls.capturevideo.width;
|
||||
int height = cls.capturevideo.height;
|
||||
int n, d;
|
||||
unsigned int i;
|
||||
double aspect;
|
||||
char vabuf[1024];
|
||||
|
||||
aspect = vid.width / (vid.height * vid_pixelheight.value);
|
||||
|
||||
cls.capturevideo.format = CAPTUREVIDEOFORMAT_AVI_I420;
|
||||
cls.capturevideo.formatextension = "avi";
|
||||
cls.capturevideo.videofile = FS_OpenRealFile(va(vabuf, sizeof(vabuf), "%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension), "wb", false);
|
||||
cls.capturevideo.endvideo = SCR_CaptureVideo_Avi_EndVideo;
|
||||
cls.capturevideo.videoframes = SCR_CaptureVideo_Avi_VideoFrames;
|
||||
cls.capturevideo.soundframe = SCR_CaptureVideo_Avi_SoundFrame;
|
||||
cls.capturevideo.formatspecific = Mem_Alloc(tempmempool, sizeof(capturevideostate_avi_formatspecific_t));
|
||||
{
|
||||
LOAD_FORMATSPECIFIC_AVI();
|
||||
format->canseek = (FS_Seek(cls.capturevideo.videofile, 0, SEEK_SET) == 0);
|
||||
SCR_CaptureVideo_RIFF_Start();
|
||||
// enclosing RIFF chunk (there can be multiple of these in >1GB files, the later ones are "AVIX" instead of "AVI " and have no header/stream info)
|
||||
SCR_CaptureVideo_RIFF_Push("RIFF", "AVI ", format->canseek ? -1 : 12+(8+56+12+(12+52+8+40+8+68)+(cls.capturevideo.soundrate?(12+12+52+8+18):0)+12+(8+4))+12+(8+(((int) strlen(engineversion) | 1) + 1))+12);
|
||||
// AVI main header
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "hdrl", format->canseek ? -1 : 8+56+12+(12+52+8+40+8+68)+(cls.capturevideo.soundrate?(12+12+52+8+18):0)+12+(8+4));
|
||||
SCR_CaptureVideo_RIFF_Push("avih", NULL, 56);
|
||||
SCR_CaptureVideo_RIFF_Write32((int)(1000000.0 / (cls.capturevideo.framerate / cls.capturevideo.framestep))); // microseconds per frame
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // max bytes per second
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // padding granularity
|
||||
SCR_CaptureVideo_RIFF_Write32(0x910); // flags (AVIF_HASINDEX | AVIF_ISINTERLEAVED | AVIF_TRUSTCKTYPE)
|
||||
format->videofile_firstchunkframes_offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // total frames
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // initial frames
|
||||
if (cls.capturevideo.soundrate)
|
||||
SCR_CaptureVideo_RIFF_Write32(2); // number of streams
|
||||
else
|
||||
SCR_CaptureVideo_RIFF_Write32(1); // number of streams
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // suggested buffer size
|
||||
SCR_CaptureVideo_RIFF_Write32(width); // width
|
||||
SCR_CaptureVideo_RIFF_Write32(height); // height
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // reserved[0]
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // reserved[1]
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // reserved[2]
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // reserved[3]
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// video stream info
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "strl", format->canseek ? -1 : 12+52+8+40+8+68);
|
||||
SCR_CaptureVideo_RIFF_Push("strh", "vids", 52);
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC("I420"); // stream fourcc (I420 colorspace, uncompressed)
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // flags
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // priority
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // language
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // initial frames
|
||||
// find an ideal divisor for the framerate
|
||||
FindFraction(cls.capturevideo.framerate / cls.capturevideo.framestep, &n, &d, 1000);
|
||||
SCR_CaptureVideo_RIFF_Write32(d); // samples/second divisor
|
||||
SCR_CaptureVideo_RIFF_Write32(n); // samples/second multiplied by divisor
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // start
|
||||
format->videofile_totalframes_offset1 = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
SCR_CaptureVideo_RIFF_Write32(0xFFFFFFFF); // length
|
||||
SCR_CaptureVideo_RIFF_Write32(width*height+(width/2)*(height/2)*2); // suggested buffer size
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // quality
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // sample size
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // frame left
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // frame top
|
||||
SCR_CaptureVideo_RIFF_Write16(width); // frame right
|
||||
SCR_CaptureVideo_RIFF_Write16(height); // frame bottom
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// video stream format
|
||||
SCR_CaptureVideo_RIFF_Push("strf", NULL, 40);
|
||||
SCR_CaptureVideo_RIFF_Write32(40); // BITMAPINFO struct size
|
||||
SCR_CaptureVideo_RIFF_Write32(width); // width
|
||||
SCR_CaptureVideo_RIFF_Write32(height); // height
|
||||
SCR_CaptureVideo_RIFF_Write16(3); // planes
|
||||
SCR_CaptureVideo_RIFF_Write16(12); // bitcount
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC("I420"); // compression
|
||||
SCR_CaptureVideo_RIFF_Write32(width*height+(width/2)*(height/2)*2); // size of image
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // x pixels per meter
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // y pixels per meter
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // color used
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // color important
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// master index
|
||||
if(format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Push("indx", NULL, -1);
|
||||
SCR_CaptureVideo_RIFF_Write16(4); // wLongsPerEntry
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // bIndexSubType=0, bIndexType=0
|
||||
format->videofile_ix_master_video_inuse_offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // nEntriesInUse
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC("00dc"); // dwChunkId
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved1
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved2
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved3
|
||||
format->videofile_ix_master_video_start_offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
for(i = 0; i < AVI_MASTER_INDEX_SIZE * 4; ++i)
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // fill up later
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
// extended format (aspect!)
|
||||
SCR_CaptureVideo_RIFF_Push("vprp", NULL, 68);
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // VideoFormatToken
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // VideoStandard
|
||||
SCR_CaptureVideo_RIFF_Write32((int)(cls.capturevideo.framerate / cls.capturevideo.framestep)); // dwVerticalRefreshRate (bogus)
|
||||
SCR_CaptureVideo_RIFF_Write32(width); // dwHTotalInT
|
||||
SCR_CaptureVideo_RIFF_Write32(height); // dwVTotalInLines
|
||||
FindFraction(aspect, &n, &d, 1000);
|
||||
SCR_CaptureVideo_RIFF_Write32((n << 16) | d); // dwFrameAspectRatio // TODO a word
|
||||
SCR_CaptureVideo_RIFF_Write32(width); // dwFrameWidthInPixels
|
||||
SCR_CaptureVideo_RIFF_Write32(height); // dwFrameHeightInLines
|
||||
SCR_CaptureVideo_RIFF_Write32(1); // nFieldPerFrame
|
||||
SCR_CaptureVideo_RIFF_Write32(width); // CompressedBMWidth
|
||||
SCR_CaptureVideo_RIFF_Write32(height); // CompressedBMHeight
|
||||
SCR_CaptureVideo_RIFF_Write32(width); // ValidBMHeight
|
||||
SCR_CaptureVideo_RIFF_Write32(height); // ValidBMWidth
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // ValidBMXOffset
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // ValidBMYOffset
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // ValidBMXOffsetInT
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // ValidBMYValidStartLine
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
if (cls.capturevideo.soundrate)
|
||||
{
|
||||
// audio stream info
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "strl", format->canseek ? -1 : 12+52+8+18);
|
||||
SCR_CaptureVideo_RIFF_Push("strh", "auds", 52);
|
||||
SCR_CaptureVideo_RIFF_Write32(1); // stream fourcc (PCM audio, uncompressed)
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // flags
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // priority
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // language
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // initial frames
|
||||
SCR_CaptureVideo_RIFF_Write32(1); // samples/second divisor
|
||||
SCR_CaptureVideo_RIFF_Write32((int)(cls.capturevideo.soundrate)); // samples/second multiplied by divisor
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // start
|
||||
format->videofile_totalsampleframes_offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
SCR_CaptureVideo_RIFF_Write32(0xFFFFFFFF); // length
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundrate * 2); // suggested buffer size (this is a half second)
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // quality
|
||||
SCR_CaptureVideo_RIFF_Write32(4); // sample size
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // frame left
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // frame top
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // frame right
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // frame bottom
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// audio stream format
|
||||
SCR_CaptureVideo_RIFF_Push("strf", NULL, 18);
|
||||
SCR_CaptureVideo_RIFF_Write16(1); // format (uncompressed PCM?)
|
||||
SCR_CaptureVideo_RIFF_Write16(2); // channels (stereo)
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundrate); // sampleframes per second
|
||||
SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundrate * 4); // average bytes per second
|
||||
SCR_CaptureVideo_RIFF_Write16(4); // block align
|
||||
SCR_CaptureVideo_RIFF_Write16(16); // bits per sample
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // size
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// master index
|
||||
if(format->canseek)
|
||||
{
|
||||
SCR_CaptureVideo_RIFF_Push("indx", NULL, -1);
|
||||
SCR_CaptureVideo_RIFF_Write16(4); // wLongsPerEntry
|
||||
SCR_CaptureVideo_RIFF_Write16(0); // bIndexSubType=0, bIndexType=0
|
||||
format->videofile_ix_master_audio_inuse_offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // nEntriesInUse
|
||||
SCR_CaptureVideo_RIFF_WriteFourCC("01wb"); // dwChunkId
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved1
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved2
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // dwReserved3
|
||||
format->videofile_ix_master_audio_start_offset = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
for(i = 0; i < AVI_MASTER_INDEX_SIZE * 4; ++i)
|
||||
SCR_CaptureVideo_RIFF_Write32(0); // fill up later
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
|
||||
format->videofile_ix_master_audio_inuse = format->videofile_ix_master_video_inuse = 0;
|
||||
|
||||
// extended header (for total #frames)
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "odml", 8+4);
|
||||
SCR_CaptureVideo_RIFF_Push("dmlh", NULL, 4);
|
||||
format->videofile_totalframes_offset2 = SCR_CaptureVideo_RIFF_GetPosition();
|
||||
SCR_CaptureVideo_RIFF_Write32(0xFFFFFFFF);
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
|
||||
// close the AVI header list
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// software that produced this AVI video file
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "INFO", 8+((strlen(engineversion) | 1) + 1));
|
||||
SCR_CaptureVideo_RIFF_Push("ISFT", NULL, strlen(engineversion) + 1);
|
||||
SCR_CaptureVideo_RIFF_WriteTerminatedString(engineversion);
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// enable this junk filler if you like the LIST movi to always begin at 4KB in the file (why?)
|
||||
#if 0
|
||||
SCR_CaptureVideo_RIFF_Push("JUNK", NULL);
|
||||
x = 4096 - SCR_CaptureVideo_RIFF_GetPosition();
|
||||
while (x > 0)
|
||||
{
|
||||
const char *junkfiller = "[ DarkPlaces junk data ]";
|
||||
int i = min(x, (int)strlen(junkfiller));
|
||||
SCR_CaptureVideo_RIFF_WriteBytes((const unsigned char *)junkfiller, i);
|
||||
x -= i;
|
||||
}
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
#endif
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// begin the actual video section now
|
||||
SCR_CaptureVideo_RIFF_Push("LIST", "movi", format->canseek ? -1 : 0);
|
||||
format->videofile_ix_movistart = format->riffstackstartoffset[1];
|
||||
// we're done with the headers now...
|
||||
SCR_CaptureVideo_RIFF_Flush();
|
||||
if (format->riffstacklevel != 2)
|
||||
Sys_Error("SCR_CaptureVideo_BeginVideo: broken AVI writing code (stack level is %i (should be 2) at end of headers)\n", format->riffstacklevel);
|
||||
|
||||
if(!format->canseek)
|
||||
{
|
||||
// close the movi immediately
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
// close the AVI immediately (we'll put all frames into AVIX)
|
||||
SCR_CaptureVideo_RIFF_Pop();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
void SCR_CaptureVideo_Ogg_Init(void);
|
||||
qboolean SCR_CaptureVideo_Ogg_Available(void);
|
||||
void SCR_CaptureVideo_Ogg_BeginVideo(void);
|
||||
void SCR_CaptureVideo_Ogg_CloseDLL(void);
|
|
@ -0,0 +1,283 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#ifndef __FreeBSD__
|
||||
# include <util.h>
|
||||
#endif
|
||||
|
||||
#include "cdaudio.h"
|
||||
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
# define DEFAULT_CD_DEVICE _PATH_DEV "cd0"
|
||||
#else
|
||||
# define DEFAULT_CD_DEVICE "/dev/acd0c"
|
||||
#endif
|
||||
|
||||
static int cdfile = -1;
|
||||
static char cd_dev[64] = DEFAULT_CD_DEVICE;
|
||||
|
||||
|
||||
void CDAudio_SysEject (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return;
|
||||
|
||||
ioctl(cdfile, CDIOCALLOW);
|
||||
if (ioctl(cdfile, CDIOCEJECT) == -1)
|
||||
Con_Print("ioctl CDIOCEJECT failed\n");
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysCloseDoor (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return;
|
||||
|
||||
ioctl(cdfile, CDIOCALLOW);
|
||||
if (ioctl(cdfile, CDIOCCLOSE) == -1)
|
||||
Con_Print("ioctl CDIOCCLOSE failed\n");
|
||||
}
|
||||
|
||||
int CDAudio_SysGetAudioDiskInfo (void)
|
||||
{
|
||||
struct ioc_toc_header tochdr;
|
||||
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOREADTOCHEADER failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tochdr.starting_track < 1)
|
||||
{
|
||||
Con_Print("CDAudio: no music tracks\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return tochdr.ending_track;
|
||||
}
|
||||
|
||||
|
||||
float CDAudio_SysGetVolume (void)
|
||||
{
|
||||
struct ioc_vol vol;
|
||||
|
||||
if (cdfile == -1)
|
||||
return -1.0f;
|
||||
|
||||
if (ioctl (cdfile, CDIOCGETVOL, &vol) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOCGETVOL failed\n");
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
return (vol.vol[0] + vol.vol[1]) / 2.0f / 255.0f;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysSetVolume (float volume)
|
||||
{
|
||||
struct ioc_vol vol;
|
||||
|
||||
if (cdfile == -1)
|
||||
return;
|
||||
|
||||
vol.vol[0] = vol.vol[1] = volume * 255;
|
||||
vol.vol[2] = vol.vol[3] = 0;
|
||||
|
||||
if (ioctl (cdfile, CDIOCSETVOL, &vol) == -1)
|
||||
Con_Printf ("ioctl CDIOCSETVOL failed\n");
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPlay (int track)
|
||||
{
|
||||
struct ioc_read_toc_entry rte;
|
||||
struct cd_toc_entry entry;
|
||||
struct ioc_play_track ti;
|
||||
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
// don't try to play a non-audio track
|
||||
rte.address_format = CD_MSF_FORMAT;
|
||||
rte.starting_track = track;
|
||||
rte.data_len = sizeof(entry);
|
||||
rte.data = &entry;
|
||||
if (ioctl(cdfile, CDIOREADTOCENTRYS, &rte) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOREADTOCENTRYS failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (entry.control & 4) // if it's a data track
|
||||
{
|
||||
Con_Printf("CDAudio: track %i is not audio\n", track);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cdPlaying)
|
||||
CDAudio_Stop();
|
||||
|
||||
ti.start_track = track;
|
||||
ti.end_track = track;
|
||||
ti.start_index = 1;
|
||||
ti.end_index = 99;
|
||||
|
||||
if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOCPLAYTRACKS failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ioctl(cdfile, CDIOCRESUME) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOCRESUME failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysStop (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDIOCSTOP) == -1)
|
||||
{
|
||||
Con_Printf("ioctl CDIOCSTOP failed (%d)\n", errno);
|
||||
return -1;
|
||||
}
|
||||
ioctl(cdfile, CDIOCALLOW);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDAudio_SysPause (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDIOCPAUSE) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOCPAUSE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysResume (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDIOCRESUME) == -1)
|
||||
Con_Print("ioctl CDIOCRESUME failed\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDAudio_SysUpdate (void)
|
||||
{
|
||||
static time_t lastchk = 0;
|
||||
struct ioc_read_subchannel subchnl;
|
||||
struct cd_sub_channel_info data;
|
||||
|
||||
if (cdPlaying && lastchk < time(NULL))
|
||||
{
|
||||
lastchk = time(NULL) + 2; //two seconds between chks
|
||||
|
||||
bzero(&subchnl, sizeof(subchnl));
|
||||
subchnl.data = &data;
|
||||
subchnl.data_len = sizeof(data);
|
||||
subchnl.address_format = CD_MSF_FORMAT;
|
||||
subchnl.data_format = CD_CURRENT_POSITION;
|
||||
|
||||
if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDIOCREADSUBCHANNEL failed\n");
|
||||
cdPlaying = false;
|
||||
return -1;
|
||||
}
|
||||
if (data.header.audio_status != CD_AS_PLAY_IN_PROGRESS &&
|
||||
data.header.audio_status != CD_AS_PLAY_PAUSED)
|
||||
{
|
||||
cdPlaying = false;
|
||||
if (cdPlayLooping)
|
||||
CDAudio_Play(cdPlayTrack, true);
|
||||
}
|
||||
else
|
||||
cdPlayTrack = data.what.position.track_number;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysInit (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// COMMANDLINEOPTION: BSD Sound: -cddev <devicepath> chooses which CD drive to use
|
||||
if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1)
|
||||
strlcpy(cd_dev, com_argv[i + 1], sizeof(cd_dev));
|
||||
}
|
||||
|
||||
int CDAudio_SysStartup (void)
|
||||
{
|
||||
#ifndef __FreeBSD__
|
||||
char buff [80];
|
||||
|
||||
if ((cdfile = opendisk(cd_dev, O_RDONLY, buff, sizeof(buff), 0)) == -1)
|
||||
#else
|
||||
if ((cdfile = open(cd_dev, O_RDONLY)) < 0)
|
||||
#endif
|
||||
{
|
||||
Con_Printf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n",
|
||||
cd_dev, errno);
|
||||
cdfile = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysShutdown (void)
|
||||
{
|
||||
close(cdfile);
|
||||
cdfile = -1;
|
||||
}
|
|
@ -0,0 +1,256 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
|
||||
// rights reserved.
|
||||
|
||||
// suggested by Zero_Dogg to fix a compile problem on Mandriva Linux
|
||||
#include "quakedef.h"
|
||||
|
||||
#include <linux/cdrom.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "cdaudio.h"
|
||||
|
||||
|
||||
static int cdfile = -1;
|
||||
static char cd_dev[64] = "/dev/cdrom";
|
||||
|
||||
|
||||
void CDAudio_SysEject (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return;
|
||||
|
||||
if (ioctl(cdfile, CDROMEJECT) == -1)
|
||||
Con_Print("ioctl CDROMEJECT failed\n");
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysCloseDoor (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return;
|
||||
|
||||
if (ioctl(cdfile, CDROMCLOSETRAY) == -1)
|
||||
Con_Print("ioctl CDROMCLOSETRAY failed\n");
|
||||
}
|
||||
|
||||
int CDAudio_SysGetAudioDiskInfo (void)
|
||||
{
|
||||
struct cdrom_tochdr tochdr;
|
||||
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMREADTOCHDR failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tochdr.cdth_trk0 < 1)
|
||||
{
|
||||
Con_Print("CDAudio: no music tracks\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return tochdr.cdth_trk1;
|
||||
}
|
||||
|
||||
|
||||
float CDAudio_SysGetVolume (void)
|
||||
{
|
||||
struct cdrom_volctrl vol;
|
||||
|
||||
if (cdfile == -1)
|
||||
return -1.0f;
|
||||
|
||||
if (ioctl (cdfile, CDROMVOLREAD, &vol) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMVOLREAD failed\n");
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
return (vol.channel0 + vol.channel1) / 2.0f / 255.0f;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysSetVolume (float volume)
|
||||
{
|
||||
struct cdrom_volctrl vol;
|
||||
|
||||
if (cdfile == -1)
|
||||
return;
|
||||
|
||||
vol.channel0 = vol.channel1 = (__u8)(volume * 255);
|
||||
vol.channel2 = vol.channel3 = 0;
|
||||
|
||||
if (ioctl (cdfile, CDROMVOLCTRL, &vol) == -1)
|
||||
Con_Print("ioctl CDROMVOLCTRL failed\n");
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPlay (int track)
|
||||
{
|
||||
struct cdrom_tocentry entry;
|
||||
struct cdrom_ti ti;
|
||||
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
// don't try to play a non-audio track
|
||||
entry.cdte_track = track;
|
||||
entry.cdte_format = CDROM_MSF;
|
||||
if (ioctl(cdfile, CDROMREADTOCENTRY, &entry) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMREADTOCENTRY failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (entry.cdte_ctrl == CDROM_DATA_TRACK)
|
||||
{
|
||||
Con_Printf("CDAudio: track %i is not audio\n", track);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cdPlaying)
|
||||
CDAudio_Stop();
|
||||
|
||||
ti.cdti_trk0 = track;
|
||||
ti.cdti_trk1 = track;
|
||||
ti.cdti_ind0 = 1;
|
||||
ti.cdti_ind1 = 99;
|
||||
|
||||
if (ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMPLAYTRKIND failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ioctl(cdfile, CDROMRESUME) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMRESUME failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysStop (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDROMSTOP) == -1)
|
||||
{
|
||||
Con_Printf("ioctl CDROMSTOP failed (%d)\n", errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDAudio_SysPause (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDROMPAUSE) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMPAUSE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysResume (void)
|
||||
{
|
||||
if (cdfile == -1)
|
||||
return -1;
|
||||
|
||||
if (ioctl(cdfile, CDROMRESUME) == -1)
|
||||
Con_Print("ioctl CDROMRESUME failed\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDAudio_SysUpdate (void)
|
||||
{
|
||||
struct cdrom_subchnl subchnl;
|
||||
static time_t lastchk = 0;
|
||||
|
||||
if (cdPlaying && lastchk < time(NULL) && cdfile != -1)
|
||||
{
|
||||
lastchk = time(NULL) + 2; //two seconds between chks
|
||||
subchnl.cdsc_format = CDROM_MSF;
|
||||
if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1)
|
||||
{
|
||||
Con_Print("ioctl CDROMSUBCHNL failed\n");
|
||||
cdPlaying = false;
|
||||
return -1;
|
||||
}
|
||||
if (subchnl.cdsc_audiostatus != CDROM_AUDIO_PLAY &&
|
||||
subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED)
|
||||
{
|
||||
cdPlaying = false;
|
||||
if (cdPlayLooping)
|
||||
CDAudio_Play(cdPlayTrack, true);
|
||||
}
|
||||
else
|
||||
cdPlayTrack = subchnl.cdsc_trk;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysInit (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// COMMANDLINEOPTION: Linux Sound: -cddev <devicepath> chooses which CD drive to use
|
||||
if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1)
|
||||
strlcpy(cd_dev, com_argv[i + 1], sizeof(cd_dev));
|
||||
}
|
||||
|
||||
int CDAudio_SysStartup (void)
|
||||
{
|
||||
if ((cdfile = open(cd_dev, O_RDONLY | O_NONBLOCK)) == -1)
|
||||
{
|
||||
Con_Printf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n",
|
||||
cd_dev, errno);
|
||||
cdfile = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysShutdown (void)
|
||||
{
|
||||
close(cdfile);
|
||||
cdfile = -1;
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "cdaudio.h"
|
||||
|
||||
|
||||
void CDAudio_SysEject (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysCloseDoor (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysGetAudioDiskInfo (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
float CDAudio_SysGetVolume (void)
|
||||
{
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysSetVolume (float volume)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPlay (int track)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysStop (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPause (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CDAudio_SysResume (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CDAudio_SysUpdate (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysInit (void)
|
||||
{
|
||||
}
|
||||
|
||||
int CDAudio_SysStartup (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CDAudio_SysShutdown (void)
|
||||
{
|
||||
}
|
|
@ -0,0 +1,283 @@
|
|||
/*
|
||||
Copyright (C) 2004 Andreas Kirsch (used cd_null.c as template)
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "cdaudio.h"
|
||||
|
||||
#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2
|
||||
// SDL 1.2 has CD audio
|
||||
|
||||
#include <SDL.h>
|
||||
#include <time.h>
|
||||
|
||||
// If one of the functions fails, it returns -1, if not 0
|
||||
|
||||
// SDL supports multiple cd devices - so we are going to support this, too.
|
||||
static void CDAudio_SDL_CDDrive_f( void );
|
||||
|
||||
// we only support playing one CD at a time
|
||||
static SDL_CD *cd;
|
||||
|
||||
static int ValidateDrive( void )
|
||||
{
|
||||
if( cd && SDL_CDStatus( cd ) > 0 )
|
||||
return cdValid = true;
|
||||
|
||||
return cdValid = false;
|
||||
}
|
||||
|
||||
void CDAudio_SysEject (void)
|
||||
{
|
||||
SDL_CDEject( cd );
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysCloseDoor (void)
|
||||
{
|
||||
//NO SDL FUNCTION
|
||||
}
|
||||
|
||||
int CDAudio_SysGetAudioDiskInfo (void)
|
||||
{
|
||||
if( ValidateDrive() ) // everything > 0 is ok, 0 is trayempty and -1 is error
|
||||
return cd->numtracks;
|
||||
return -1;
|
||||
}
|
||||
|
||||
float CDAudio_SysGetVolume (void)
|
||||
{
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
void CDAudio_SysSetVolume (float volume)
|
||||
{
|
||||
//NO SDL FUNCTION
|
||||
}
|
||||
|
||||
int CDAudio_SysPlay (int track)
|
||||
{
|
||||
return SDL_CDPlayTracks(cd, track-1, 0, 1, 0);
|
||||
}
|
||||
|
||||
int CDAudio_SysStop (void)
|
||||
{
|
||||
return SDL_CDStop( cd );
|
||||
}
|
||||
|
||||
int CDAudio_SysPause (void)
|
||||
{
|
||||
return SDL_CDPause( cd );
|
||||
}
|
||||
|
||||
int CDAudio_SysResume (void)
|
||||
{
|
||||
return SDL_CDResume( cd );
|
||||
}
|
||||
|
||||
int CDAudio_SysUpdate (void)
|
||||
{
|
||||
static time_t lastchk = 0;
|
||||
|
||||
if (cdPlaying && lastchk < time(NULL))
|
||||
{
|
||||
lastchk = time(NULL) + 2; //two seconds between chks
|
||||
if( !cd || cd->status <= 0 ) {
|
||||
cdValid = false;
|
||||
return -1;
|
||||
}
|
||||
if (SDL_CDStatus( cd ) == CD_STOPPED)
|
||||
{
|
||||
if( cdPlayLooping )
|
||||
CDAudio_SysPlay( cdPlayTrack );
|
||||
else
|
||||
cdPlaying = false;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysInit (void)
|
||||
{
|
||||
if( SDL_InitSubSystem( SDL_INIT_CDROM ) == -1 )
|
||||
Con_Print( "Failed to init the CDROM SDL subsystem!\n" );
|
||||
|
||||
Cmd_AddCommand( "cddrive", CDAudio_SDL_CDDrive_f, "select an SDL-detected CD drive by number" );
|
||||
}
|
||||
|
||||
static int IsAudioCD( void )
|
||||
{
|
||||
int i;
|
||||
for( i = 0 ; i < cd->numtracks ; i++ )
|
||||
if( cd->track[ i ].type == SDL_AUDIO_TRACK )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int CDAudio_SysStartup (void)
|
||||
{
|
||||
int i;
|
||||
int numdrives;
|
||||
|
||||
numdrives = SDL_CDNumDrives();
|
||||
if( numdrives == -1 ) // was the CDROM system initialized correctly?
|
||||
return -1;
|
||||
|
||||
Con_Printf( "Found %i cdrom drives.\n", numdrives );
|
||||
|
||||
for( i = 0 ; i < numdrives ; i++, cd = NULL ) {
|
||||
cd = SDL_CDOpen( i );
|
||||
if( !cd ) {
|
||||
Con_Printf( "CD drive %i is invalid.\n", i );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( CD_INDRIVE( SDL_CDStatus( cd ) ) )
|
||||
if( IsAudioCD() )
|
||||
break;
|
||||
else
|
||||
Con_Printf( "The CD in drive %i is not an audio cd.\n", i );
|
||||
else
|
||||
Con_Printf( "No CD in drive %i.\n", i );
|
||||
|
||||
SDL_CDClose( cd );
|
||||
}
|
||||
|
||||
if( i == numdrives && !cd )
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysShutdown (void)
|
||||
{
|
||||
if( cd )
|
||||
SDL_CDClose( cd );
|
||||
}
|
||||
|
||||
void CDAudio_SDL_CDDrive_f( void )
|
||||
{
|
||||
int i;
|
||||
int numdrives = SDL_CDNumDrives();
|
||||
|
||||
if( Cmd_Argc() != 2 ) {
|
||||
Con_Print( "cddrive <drivenr>\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
i = atoi( Cmd_Argv( 1 ) );
|
||||
if( i >= numdrives ) {
|
||||
Con_Printf("Only %i drives!\n", numdrives );
|
||||
return;
|
||||
}
|
||||
|
||||
if( cd )
|
||||
SDL_CDClose( cd );
|
||||
|
||||
cd = SDL_CDOpen( i );
|
||||
if( !cd ) {
|
||||
Con_Printf( "Couldn't open drive %i.\n", i );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !CD_INDRIVE( SDL_CDStatus( cd ) ) )
|
||||
Con_Printf( "No cd in drive %i.\n", i );
|
||||
else if( !IsAudioCD() )
|
||||
Con_Printf( "The CD in drive %i is not an audio CD.\n", i );
|
||||
|
||||
ValidateDrive();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#else
|
||||
// SDL 1.3 does not have CD audio
|
||||
|
||||
void CDAudio_SysEject (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysCloseDoor (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysGetAudioDiskInfo (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
float CDAudio_SysGetVolume (void)
|
||||
{
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysSetVolume (float volume)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPlay (int track)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysStop (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPause (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CDAudio_SysResume (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CDAudio_SysUpdate (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysInit (void)
|
||||
{
|
||||
}
|
||||
|
||||
int CDAudio_SysStartup (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CDAudio_SysShutdown (void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,783 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
|
||||
// rights reserved.
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "cdaudio.h"
|
||||
#include "sound.h"
|
||||
|
||||
// used by menu to ghost CD audio slider
|
||||
cvar_t cdaudioinitialized = {CVAR_READONLY,"cdaudioinitialized","0","indicates if CD Audio system is active"};
|
||||
cvar_t cdaudio = {CVAR_SAVE,"cdaudio","1","CD playing mode (0 = never access CD drive, 1 = play CD tracks if no replacement available, 2 = play fake tracks if no CD track available, 3 = play only real CD tracks, 4 = play real CD tracks even instead of named fake tracks)"};
|
||||
|
||||
#define MAX_PLAYLISTS 10
|
||||
int music_playlist_active = -1;
|
||||
int music_playlist_playing = 0; // 0 = not playing, 1 = playing, -1 = tried and failed
|
||||
|
||||
cvar_t music_playlist_index = {0, "music_playlist_index", "-1", "selects which of the music_playlist_ variables is the active one, -1 disables playlists"};
|
||||
cvar_t music_playlist_list[MAX_PLAYLISTS] =
|
||||
{
|
||||
{0, "music_playlist_list0", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list1", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list2", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list3", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list4", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list5", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list6", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list7", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list8", "", "list of tracks to play"},
|
||||
{0, "music_playlist_list9", "", "list of tracks to play"}
|
||||
};
|
||||
cvar_t music_playlist_current[MAX_PLAYLISTS] =
|
||||
{
|
||||
{0, "music_playlist_current0", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current1", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current2", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current3", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current4", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current5", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current6", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current7", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current8", "0", "current track index to play in list"},
|
||||
{0, "music_playlist_current9", "0", "current track index to play in list"},
|
||||
};
|
||||
cvar_t music_playlist_random[MAX_PLAYLISTS] =
|
||||
{
|
||||
{0, "music_playlist_random0", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random1", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random2", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random3", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random4", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random5", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random6", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random7", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random8", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
{0, "music_playlist_random9", "0", "enables random play order if 1, 0 is sequential play"},
|
||||
};
|
||||
cvar_t music_playlist_sampleposition[MAX_PLAYLISTS] =
|
||||
{
|
||||
{0, "music_playlist_sampleposition0", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition1", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition2", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition3", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition4", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition5", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition6", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition7", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition8", "-1", "resume position for track, -1 restarts every time"},
|
||||
{0, "music_playlist_sampleposition9", "-1", "resume position for track, -1 restarts every time"},
|
||||
};
|
||||
|
||||
static qboolean wasPlaying = false;
|
||||
static qboolean initialized = false;
|
||||
static qboolean enabled = false;
|
||||
static float cdvolume;
|
||||
typedef char filename_t[MAX_QPATH];
|
||||
#ifdef MAXTRACKS
|
||||
static filename_t remap[MAXTRACKS];
|
||||
#endif
|
||||
static unsigned char maxTrack;
|
||||
static int faketrack = -1;
|
||||
|
||||
static float saved_vol = 1.0f;
|
||||
|
||||
// exported variables
|
||||
qboolean cdValid = false;
|
||||
qboolean cdPlaying = false;
|
||||
qboolean cdPlayLooping = false;
|
||||
unsigned char cdPlayTrack;
|
||||
|
||||
cl_cdstate_t cd;
|
||||
|
||||
static void CDAudio_Eject (void)
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
if(cdaudio.integer == 0)
|
||||
return;
|
||||
|
||||
CDAudio_SysEject();
|
||||
}
|
||||
|
||||
|
||||
static void CDAudio_CloseDoor (void)
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
if(cdaudio.integer == 0)
|
||||
return;
|
||||
|
||||
CDAudio_SysCloseDoor();
|
||||
}
|
||||
|
||||
static int CDAudio_GetAudioDiskInfo (void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
cdValid = false;
|
||||
|
||||
if(cdaudio.integer == 0)
|
||||
return -1;
|
||||
|
||||
ret = CDAudio_SysGetAudioDiskInfo();
|
||||
if (ret < 1)
|
||||
return -1;
|
||||
|
||||
cdValid = true;
|
||||
maxTrack = ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static qboolean CDAudio_Play_real (int track, qboolean looping, qboolean complain)
|
||||
{
|
||||
if(track < 1)
|
||||
{
|
||||
if(complain)
|
||||
Con_Print("Could not load BGM track.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!cdValid)
|
||||
{
|
||||
CDAudio_GetAudioDiskInfo();
|
||||
if (!cdValid)
|
||||
{
|
||||
if(complain)
|
||||
Con_DPrint ("No CD in player.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (track > maxTrack)
|
||||
{
|
||||
if(complain)
|
||||
Con_DPrintf("CDAudio: Bad track number %u.\n", track);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (CDAudio_SysPlay(track) == -1)
|
||||
return false;
|
||||
|
||||
if(cdaudio.integer != 3)
|
||||
Con_DPrintf ("CD track %u playing...\n", track);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CDAudio_Play_byName (const char *trackname, qboolean looping, qboolean tryreal, float startposition)
|
||||
{
|
||||
unsigned int track;
|
||||
sfx_t* sfx;
|
||||
char filename[MAX_QPATH];
|
||||
|
||||
Host_StartVideo();
|
||||
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
if(tryreal && strspn(trackname, "0123456789") == strlen(trackname))
|
||||
{
|
||||
track = (unsigned char) atoi(trackname);
|
||||
#ifdef MAXTRACKS
|
||||
if(track > 0 && track < MAXTRACKS)
|
||||
if(*remap[track])
|
||||
{
|
||||
if(strspn(remap[track], "0123456789") == strlen(remap[track]))
|
||||
{
|
||||
trackname = remap[track];
|
||||
}
|
||||
else
|
||||
{
|
||||
// ignore remappings to fake tracks if we're going to play a real track
|
||||
switch(cdaudio.integer)
|
||||
{
|
||||
case 0: // we never access CD
|
||||
case 1: // we have a replacement
|
||||
trackname = remap[track];
|
||||
break;
|
||||
case 2: // we only use fake track replacement if CD track is invalid
|
||||
CDAudio_GetAudioDiskInfo();
|
||||
if(!cdValid || track > maxTrack)
|
||||
trackname = remap[track];
|
||||
break;
|
||||
case 3: // we always play from CD - ignore this remapping then
|
||||
case 4: // we randomize anyway
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if(tryreal && strspn(trackname, "0123456789") == strlen(trackname))
|
||||
{
|
||||
track = (unsigned char) atoi(trackname);
|
||||
if (track < 1)
|
||||
{
|
||||
Con_DPrintf("CDAudio: Bad track number %u.\n", track);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
track = 0;
|
||||
|
||||
// div0: I assume this code was intentionally there. Maybe turn it into a cvar?
|
||||
if (cdPlaying && cdPlayTrack == track && faketrack == -1)
|
||||
return;
|
||||
CDAudio_Stop ();
|
||||
|
||||
if(track >= 1)
|
||||
{
|
||||
if(cdaudio.integer == 3) // only play real CD tracks at all
|
||||
{
|
||||
if(CDAudio_Play_real(track, looping, true))
|
||||
goto success;
|
||||
return;
|
||||
}
|
||||
|
||||
if(cdaudio.integer == 2) // prefer real CD track over fake
|
||||
{
|
||||
if(CDAudio_Play_real(track, looping, false))
|
||||
goto success;
|
||||
}
|
||||
}
|
||||
|
||||
if(cdaudio.integer == 4) // only play real CD tracks, EVEN instead of fake tracks!
|
||||
{
|
||||
if(CDAudio_Play_real(track, looping, false))
|
||||
goto success;
|
||||
|
||||
if(cdValid && maxTrack > 0)
|
||||
{
|
||||
track = 1 + (rand() % maxTrack);
|
||||
if(CDAudio_Play_real(track, looping, true))
|
||||
goto success;
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_DPrint ("No CD in player.\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Try playing a fake track (sound file) first
|
||||
if(track >= 1)
|
||||
{
|
||||
dpsnprintf(filename, sizeof(filename), "sound/cdtracks/track%03u.wav", track);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/cdtracks/track%03u.ogg", track);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "music/track%03u.ogg", track);// added by motorsep
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "music/cdtracks/track%03u.ogg", track);// added by motorsep
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/cdtracks/track%02u.wav", track);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/cdtracks/track%02u.ogg", track);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "music/track%02u.ogg", track);// added by motorsep
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "music/cdtracks/track%02u.ogg", track);// added by motorsep
|
||||
}
|
||||
else
|
||||
{
|
||||
dpsnprintf(filename, sizeof(filename), "%s", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "%s.wav", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "%s.ogg", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/%s", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/%s.wav", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/%s.ogg", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/cdtracks/%s", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/cdtracks/%s.wav", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "sound/cdtracks/%s.ogg", trackname);
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "music/%s.ogg", trackname); // added by motorsep
|
||||
if (!FS_FileExists(filename)) dpsnprintf(filename, sizeof(filename), "music/cdtracks/%s.ogg", trackname); // added by motorsep
|
||||
}
|
||||
if (FS_FileExists(filename) && (sfx = S_PrecacheSound (filename, false, false)))
|
||||
{
|
||||
faketrack = S_StartSound_StartPosition_Flags (-1, 0, sfx, vec3_origin, cdvolume, 0, startposition, (looping ? CHANNELFLAG_FORCELOOP : 0) | CHANNELFLAG_FULLVOLUME | CHANNELFLAG_LOCALSOUND, 1.0f);
|
||||
if (faketrack != -1)
|
||||
{
|
||||
if(track >= 1)
|
||||
{
|
||||
if(cdaudio.integer != 0) // we don't need these messages if only fake tracks can be played anyway
|
||||
Con_DPrintf ("Fake CD track %u playing...\n", track);
|
||||
}
|
||||
else
|
||||
Con_DPrintf ("BGM track %s playing...\n", trackname);
|
||||
}
|
||||
}
|
||||
|
||||
// If we can't play a fake CD track, try the real one
|
||||
if (faketrack == -1)
|
||||
{
|
||||
if(cdaudio.integer == 0 || track < 1)
|
||||
{
|
||||
Con_Print("Could not load BGM track.\n");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!CDAudio_Play_real(track, looping, true))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
success:
|
||||
cdPlayLooping = looping;
|
||||
cdPlayTrack = track;
|
||||
cdPlaying = true;
|
||||
|
||||
if (cdvolume == 0.0 || bgmvolume.value == 0)
|
||||
CDAudio_Pause ();
|
||||
}
|
||||
|
||||
void CDAudio_Play (int track, qboolean looping)
|
||||
{
|
||||
char buf[20];
|
||||
if (music_playlist_index.integer >= 0)
|
||||
return;
|
||||
dpsnprintf(buf, sizeof(buf), "%d", (int) track);
|
||||
CDAudio_Play_byName(buf, looping, true, 0);
|
||||
}
|
||||
|
||||
float CDAudio_GetPosition (void)
|
||||
{
|
||||
if(faketrack != -1)
|
||||
return S_GetChannelPosition(faketrack);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void CDAudio_StopPlaylistTrack(void);
|
||||
|
||||
void CDAudio_Stop (void)
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
// save the playlist position
|
||||
CDAudio_StopPlaylistTrack();
|
||||
|
||||
if (faketrack != -1)
|
||||
{
|
||||
S_StopChannel (faketrack, true, true);
|
||||
faketrack = -1;
|
||||
}
|
||||
else if (cdPlaying && (CDAudio_SysStop() == -1))
|
||||
return;
|
||||
else if(wasPlaying)
|
||||
{
|
||||
CDAudio_Resume(); // needed by SDL - can't stop while paused there (causing pause/stop to fail after play, pause, stop, play otherwise)
|
||||
if (cdPlaying && (CDAudio_SysStop() == -1))
|
||||
return;
|
||||
}
|
||||
|
||||
wasPlaying = false;
|
||||
cdPlaying = false;
|
||||
}
|
||||
|
||||
void CDAudio_Pause (void)
|
||||
{
|
||||
if (!enabled || !cdPlaying)
|
||||
return;
|
||||
|
||||
if (faketrack != -1)
|
||||
S_SetChannelFlag (faketrack, CHANNELFLAG_PAUSED, true);
|
||||
else if (CDAudio_SysPause() == -1)
|
||||
return;
|
||||
|
||||
wasPlaying = cdPlaying;
|
||||
cdPlaying = false;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_Resume (void)
|
||||
{
|
||||
if (!enabled || cdPlaying || !wasPlaying)
|
||||
return;
|
||||
|
||||
if (faketrack != -1)
|
||||
S_SetChannelFlag (faketrack, CHANNELFLAG_PAUSED, false);
|
||||
else if (CDAudio_SysResume() == -1)
|
||||
return;
|
||||
cdPlaying = true;
|
||||
}
|
||||
|
||||
static void CD_f (void)
|
||||
{
|
||||
const char *command;
|
||||
#ifdef MAXTRACKS
|
||||
int ret;
|
||||
int n;
|
||||
#endif
|
||||
|
||||
command = Cmd_Argv (1);
|
||||
|
||||
if (strcasecmp(command, "remap") != 0)
|
||||
Host_StartVideo();
|
||||
|
||||
if (strcasecmp(command, "on") == 0)
|
||||
{
|
||||
enabled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "off") == 0)
|
||||
{
|
||||
CDAudio_Stop();
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "reset") == 0)
|
||||
{
|
||||
enabled = true;
|
||||
CDAudio_Stop();
|
||||
#ifdef MAXTRACKS
|
||||
for (n = 0; n < MAXTRACKS; n++)
|
||||
*remap[n] = 0; // empty string, that is, unremapped
|
||||
#endif
|
||||
CDAudio_GetAudioDiskInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "rescan") == 0)
|
||||
{
|
||||
CDAudio_Shutdown();
|
||||
CDAudio_Startup();
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "remap") == 0)
|
||||
{
|
||||
#ifdef MAXTRACKS
|
||||
ret = Cmd_Argc() - 2;
|
||||
if (ret <= 0)
|
||||
{
|
||||
for (n = 1; n < MAXTRACKS; n++)
|
||||
if (*remap[n])
|
||||
Con_Printf(" %u -> %s\n", n, remap[n]);
|
||||
return;
|
||||
}
|
||||
for (n = 1; n <= ret; n++)
|
||||
strlcpy(remap[n], Cmd_Argv (n+1), sizeof(*remap));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "close") == 0)
|
||||
{
|
||||
CDAudio_CloseDoor();
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "play") == 0)
|
||||
{
|
||||
if (music_playlist_index.integer >= 0)
|
||||
return;
|
||||
CDAudio_Play_byName(Cmd_Argv (2), false, true, (Cmd_Argc() > 3) ? atof( Cmd_Argv(3) ) : 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "loop") == 0)
|
||||
{
|
||||
if (music_playlist_index.integer >= 0)
|
||||
return;
|
||||
CDAudio_Play_byName(Cmd_Argv (2), true, true, (Cmd_Argc() > 3) ? atof( Cmd_Argv(3) ) : 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "stop") == 0)
|
||||
{
|
||||
if (music_playlist_index.integer >= 0)
|
||||
return;
|
||||
CDAudio_Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "pause") == 0)
|
||||
{
|
||||
if (music_playlist_index.integer >= 0)
|
||||
return;
|
||||
CDAudio_Pause();
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "resume") == 0)
|
||||
{
|
||||
if (music_playlist_index.integer >= 0)
|
||||
return;
|
||||
CDAudio_Resume();
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "eject") == 0)
|
||||
{
|
||||
if (faketrack == -1)
|
||||
CDAudio_Stop();
|
||||
CDAudio_Eject();
|
||||
cdValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcasecmp(command, "info") == 0)
|
||||
{
|
||||
CDAudio_GetAudioDiskInfo ();
|
||||
if (cdValid)
|
||||
Con_Printf("%u tracks on CD.\n", maxTrack);
|
||||
else
|
||||
Con_Print ("No CD in player.\n");
|
||||
if (cdPlaying)
|
||||
Con_Printf("Currently %s track %u\n", cdPlayLooping ? "looping" : "playing", cdPlayTrack);
|
||||
else if (wasPlaying)
|
||||
Con_Printf("Paused %s track %u\n", cdPlayLooping ? "looping" : "playing", cdPlayTrack);
|
||||
if (cdvolume >= 0)
|
||||
Con_Printf("Volume is %f\n", cdvolume);
|
||||
else
|
||||
Con_Printf("Can't get CD volume\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Con_Printf("CD commands:\n");
|
||||
Con_Printf("cd on - enables CD audio system\n");
|
||||
Con_Printf("cd off - stops and disables CD audio system\n");
|
||||
Con_Printf("cd reset - resets CD audio system (clears track remapping and re-reads disc information)\n");
|
||||
Con_Printf("cd rescan - rescans disks in drives (to use another disc)\n");
|
||||
Con_Printf("cd remap <remap1> [remap2] [remap3] [...] - chooses (possibly emulated) CD tracks to play when a map asks for a particular track, this has many uses\n");
|
||||
Con_Printf("cd close - closes CD tray\n");
|
||||
Con_Printf("cd eject - stops playing music and opens CD tray to allow you to change disc\n");
|
||||
Con_Printf("cd play <tracknumber> <startposition> - plays selected track in remapping table\n");
|
||||
Con_Printf("cd loop <tracknumber> <startposition> - plays and repeats selected track in remapping table\n");
|
||||
Con_Printf("cd stop - stops playing current CD track\n");
|
||||
Con_Printf("cd pause - pauses CD playback\n");
|
||||
Con_Printf("cd resume - unpauses CD playback\n");
|
||||
Con_Printf("cd info - prints basic disc information (number of tracks, currently playing track, volume level)\n");
|
||||
}
|
||||
|
||||
static void CDAudio_SetVolume (float newvol)
|
||||
{
|
||||
// If the volume hasn't changed
|
||||
if (newvol == cdvolume)
|
||||
return;
|
||||
|
||||
// If the CD has been muted
|
||||
if (newvol == 0.0f)
|
||||
CDAudio_Pause ();
|
||||
else
|
||||
{
|
||||
// If the CD has been unmuted
|
||||
if (cdvolume == 0.0f)
|
||||
CDAudio_Resume ();
|
||||
|
||||
if (faketrack != -1)
|
||||
S_SetChannelVolume (faketrack, newvol);
|
||||
else
|
||||
CDAudio_SysSetVolume (newvol * mastervolume.value);
|
||||
}
|
||||
|
||||
cdvolume = newvol;
|
||||
}
|
||||
|
||||
static void CDAudio_StopPlaylistTrack(void)
|
||||
{
|
||||
if (music_playlist_active >= 0 && music_playlist_active < MAX_PLAYLISTS && music_playlist_sampleposition[music_playlist_active].value >= 0)
|
||||
{
|
||||
// save position for resume
|
||||
float position = CDAudio_GetPosition();
|
||||
Cvar_SetValueQuick(&music_playlist_sampleposition[music_playlist_active], position >= 0 ? position : 0);
|
||||
}
|
||||
music_playlist_active = -1;
|
||||
music_playlist_playing = 0; // not playing
|
||||
}
|
||||
|
||||
void CDAudio_StartPlaylist(qboolean resume)
|
||||
{
|
||||
const char *list;
|
||||
const char *t;
|
||||
int index;
|
||||
int current;
|
||||
int randomplay;
|
||||
int count;
|
||||
int listindex;
|
||||
float position;
|
||||
char trackname[MAX_QPATH];
|
||||
CDAudio_Stop();
|
||||
index = music_playlist_index.integer;
|
||||
if (index >= 0 && index < MAX_PLAYLISTS && bgmvolume.value > 0)
|
||||
{
|
||||
list = music_playlist_list[index].string;
|
||||
current = music_playlist_current[index].integer;
|
||||
randomplay = music_playlist_random[index].integer;
|
||||
position = music_playlist_sampleposition[index].value;
|
||||
count = 0;
|
||||
trackname[0] = 0;
|
||||
if (list && list[0])
|
||||
{
|
||||
for (t = list;;count++)
|
||||
{
|
||||
if (!COM_ParseToken_Console(&t))
|
||||
break;
|
||||
// if we don't find the desired track, use the first one
|
||||
if (count == 0)
|
||||
strlcpy(trackname, com_token, sizeof(trackname));
|
||||
}
|
||||
}
|
||||
if (count > 0)
|
||||
{
|
||||
// position < 0 means never resume track
|
||||
if (position < 0)
|
||||
position = 0;
|
||||
// advance to next track in playlist if the last one ended
|
||||
if (!resume)
|
||||
{
|
||||
position = 0;
|
||||
current++;
|
||||
if (randomplay)
|
||||
current = (int)lhrandom(0, count);
|
||||
}
|
||||
// wrap playlist position if needed
|
||||
if (current >= count)
|
||||
current = 0;
|
||||
// set current
|
||||
Cvar_SetValueQuick(&music_playlist_current[index], current);
|
||||
// get the Nth trackname
|
||||
if (current >= 0 && current < count)
|
||||
{
|
||||
for (listindex = 0, t = list;;listindex++)
|
||||
{
|
||||
if (!COM_ParseToken_Console(&t))
|
||||
break;
|
||||
if (listindex == current)
|
||||
{
|
||||
strlcpy(trackname, com_token, sizeof(trackname));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (trackname[0])
|
||||
{
|
||||
CDAudio_Play_byName(trackname, false, false, position);
|
||||
if (faketrack != -1)
|
||||
music_playlist_active = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
music_playlist_playing = music_playlist_active >= 0 ? 1 : -1;
|
||||
}
|
||||
|
||||
void CDAudio_Update (void)
|
||||
{
|
||||
static int lastplaylist = -1;
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
CDAudio_SetVolume (bgmvolume.value);
|
||||
if (music_playlist_playing > 0 && CDAudio_GetPosition() < 0)
|
||||
{
|
||||
// this track ended, start a new track from the beginning
|
||||
CDAudio_StartPlaylist(false);
|
||||
lastplaylist = music_playlist_index.integer;
|
||||
}
|
||||
else if (lastplaylist != music_playlist_index.integer
|
||||
|| (bgmvolume.value > 0 && !music_playlist_playing && music_playlist_index.integer >= 0))
|
||||
{
|
||||
// active playlist changed, save position and switch track
|
||||
CDAudio_StartPlaylist(true);
|
||||
lastplaylist = music_playlist_index.integer;
|
||||
}
|
||||
|
||||
if (faketrack == -1 && cdaudio.integer != 0 && bgmvolume.value != 0)
|
||||
CDAudio_SysUpdate();
|
||||
}
|
||||
|
||||
int CDAudio_Init (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (cls.state == ca_dedicated)
|
||||
return -1;
|
||||
|
||||
// COMMANDLINEOPTION: Sound: -nocdaudio disables CD audio support
|
||||
if (COM_CheckParm("-nocdaudio"))
|
||||
return -1;
|
||||
|
||||
CDAudio_SysInit();
|
||||
|
||||
#ifdef MAXTRACKS
|
||||
for (i = 0; i < MAXTRACKS; i++)
|
||||
*remap[i] = 0;
|
||||
#endif
|
||||
|
||||
Cvar_RegisterVariable(&cdaudio);
|
||||
Cvar_RegisterVariable(&cdaudioinitialized);
|
||||
Cvar_SetValueQuick(&cdaudioinitialized, true);
|
||||
enabled = true;
|
||||
|
||||
Cvar_RegisterVariable(&music_playlist_index);
|
||||
for (i = 0;i < MAX_PLAYLISTS;i++)
|
||||
{
|
||||
Cvar_RegisterVariable(&music_playlist_list[i]);
|
||||
Cvar_RegisterVariable(&music_playlist_current[i]);
|
||||
Cvar_RegisterVariable(&music_playlist_random[i]);
|
||||
Cvar_RegisterVariable(&music_playlist_sampleposition[i]);
|
||||
}
|
||||
|
||||
Cmd_AddCommand("cd", CD_f, "execute a CD drive command (cd on/off/reset/remap/close/play/loop/stop/pause/resume/eject/info) - use cd by itself for usage");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDAudio_Startup (void)
|
||||
{
|
||||
if (COM_CheckParm("-nocdaudio"))
|
||||
return -1;
|
||||
|
||||
CDAudio_SysStartup ();
|
||||
|
||||
if (CDAudio_GetAudioDiskInfo())
|
||||
{
|
||||
Con_Print("CDAudio_Init: No CD in player.\n");
|
||||
cdValid = false;
|
||||
}
|
||||
|
||||
saved_vol = CDAudio_SysGetVolume ();
|
||||
if (saved_vol < 0.0f)
|
||||
{
|
||||
Con_Print ("Can't get initial CD volume\n");
|
||||
saved_vol = 1.0f;
|
||||
}
|
||||
else
|
||||
Con_Printf ("Initial CD volume: %g\n", saved_vol);
|
||||
|
||||
initialized = true;
|
||||
|
||||
Con_Print("CD Audio Initialized\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_Shutdown (void)
|
||||
{
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
CDAudio_SysSetVolume (saved_vol);
|
||||
|
||||
CDAudio_Stop();
|
||||
CDAudio_SysShutdown();
|
||||
initialized = false;
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
|
||||
// rights reserved.
|
||||
|
||||
#include "quakedef.h"
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include "cdaudio.h"
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
typedef DWORD DWORD_PTR;
|
||||
#endif
|
||||
|
||||
extern HWND mainwindow;
|
||||
|
||||
UINT wDeviceID;
|
||||
|
||||
void CDAudio_SysEject(void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
|
||||
if ((dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD_PTR)NULL)))
|
||||
Con_Printf("MCI_SET_DOOR_OPEN failed (%x)\n", (unsigned)dwReturn);
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysCloseDoor(void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
|
||||
if ((dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD_PTR)NULL)))
|
||||
Con_Printf("MCI_SET_DOOR_CLOSED failed (%x)\n", (unsigned)dwReturn);
|
||||
}
|
||||
|
||||
int CDAudio_SysGetAudioDiskInfo(void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
MCI_STATUS_PARMS mciStatusParms;
|
||||
|
||||
mciStatusParms.dwItem = MCI_STATUS_READY;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD_PTR) (LPVOID) &mciStatusParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Print("CDAudio_SysGetAudioDiskInfo: drive ready test - get status failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (!mciStatusParms.dwReturn)
|
||||
{
|
||||
Con_Print("CDAudio_SysGetAudioDiskInfo: drive not ready\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mciStatusParms.dwItem = MCI_STATUS_NUMBER_OF_TRACKS;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD_PTR) (LPVOID) &mciStatusParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Print("CDAudio_SysGetAudioDiskInfo: get tracks - status failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (mciStatusParms.dwReturn < 1)
|
||||
{
|
||||
Con_Print("CDAudio_SysGetAudioDiskInfo: no music tracks\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return mciStatusParms.dwReturn;
|
||||
}
|
||||
|
||||
|
||||
float CDAudio_SysGetVolume (void)
|
||||
{
|
||||
// IMPLEMENTME
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
|
||||
void CDAudio_SysSetVolume (float volume)
|
||||
{
|
||||
// IMPLEMENTME
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysPlay (int track)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
MCI_PLAY_PARMS mciPlayParms;
|
||||
MCI_STATUS_PARMS mciStatusParms;
|
||||
|
||||
// don't try to play a non-audio track
|
||||
mciStatusParms.dwItem = MCI_CDA_STATUS_TYPE_TRACK;
|
||||
mciStatusParms.dwTrack = track;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD_PTR) (LPVOID) &mciStatusParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Printf("CDAudio_SysPlay: MCI_STATUS failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO)
|
||||
{
|
||||
Con_Printf("CDAudio_SysPlay: track %i is not audio\n", track);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cdPlaying)
|
||||
CDAudio_Stop();
|
||||
|
||||
// get the length of the track to be played
|
||||
mciStatusParms.dwItem = MCI_STATUS_LENGTH;
|
||||
mciStatusParms.dwTrack = track;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD_PTR) (LPVOID) &mciStatusParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Printf("CDAudio_SysPlay: MCI_STATUS failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mciPlayParms.dwFrom = MCI_MAKE_TMSF(track, 0, 0, 0);
|
||||
mciPlayParms.dwTo = (mciStatusParms.dwReturn << 8) | track;
|
||||
mciPlayParms.dwCallback = (DWORD_PTR)mainwindow;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)(LPVOID) &mciPlayParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Printf("CDAudio_SysPlay: MCI_PLAY failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysStop (void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
|
||||
if ((dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD_PTR)NULL)))
|
||||
{
|
||||
Con_Printf("MCI_STOP failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CDAudio_SysPause (void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
MCI_GENERIC_PARMS mciGenericParms;
|
||||
|
||||
mciGenericParms.dwCallback = (DWORD_PTR)mainwindow;
|
||||
if ((dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD_PTR)(LPVOID) &mciGenericParms)))
|
||||
{
|
||||
Con_Printf("MCI_PAUSE failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysResume (void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
MCI_PLAY_PARMS mciPlayParms;
|
||||
|
||||
mciPlayParms.dwFrom = MCI_MAKE_TMSF(cdPlayTrack, 0, 0, 0);
|
||||
mciPlayParms.dwTo = MCI_MAKE_TMSF(cdPlayTrack + 1, 0, 0, 0);
|
||||
mciPlayParms.dwCallback = (DWORD_PTR)mainwindow;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY, (DWORD_PTR)(LPVOID) &mciPlayParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Printf("CDAudio_SysResume: MCI_PLAY failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LONG CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (lParam != (LPARAM)wDeviceID)
|
||||
return 1;
|
||||
|
||||
switch (wParam)
|
||||
{
|
||||
case MCI_NOTIFY_SUCCESSFUL:
|
||||
if (cdPlaying)
|
||||
{
|
||||
cdPlaying = false;
|
||||
if (cdPlayLooping)
|
||||
CDAudio_Play(cdPlayTrack, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case MCI_NOTIFY_ABORTED:
|
||||
case MCI_NOTIFY_SUPERSEDED:
|
||||
break;
|
||||
|
||||
case MCI_NOTIFY_FAILURE:
|
||||
Con_Print("MCI_NOTIFY_FAILURE\n");
|
||||
CDAudio_Stop ();
|
||||
cdValid = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
Con_Printf("Unexpected MM_MCINOTIFY type (%i)\n", (int)wParam);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CDAudio_SysUpdate (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysInit (void)
|
||||
{
|
||||
}
|
||||
|
||||
int CDAudio_SysStartup (void)
|
||||
{
|
||||
DWORD dwReturn;
|
||||
MCI_OPEN_PARMS mciOpenParms;
|
||||
MCI_SET_PARMS mciSetParms;
|
||||
|
||||
mciOpenParms.lpstrDeviceType = "cdaudio";
|
||||
if ((dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD_PTR) (LPVOID) &mciOpenParms)))
|
||||
{
|
||||
Con_Printf("CDAudio_SysStartup: MCI_OPEN failed (%x)\n", (unsigned)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
wDeviceID = mciOpenParms.wDeviceID;
|
||||
|
||||
// Set the time format to track/minute/second/frame (TMSF).
|
||||
mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF;
|
||||
if ((dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD_PTR)(LPVOID) &mciSetParms)))
|
||||
{
|
||||
Con_Printf("CDAudio_SysStartup: MCI_SET_TIME_FORMAT failed (%x)\n", (unsigned)dwReturn);
|
||||
mciSendCommand(wDeviceID, MCI_CLOSE, 0, (DWORD_PTR)NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CDAudio_SysShutdown (void)
|
||||
{
|
||||
if (mciSendCommand(wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)NULL))
|
||||
Con_Print("CDAudio_SysShutdown: MCI_CLOSE failed\n");
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
typedef struct cl_cdstate_s
|
||||
{
|
||||
qboolean Valid;
|
||||
qboolean Playing;
|
||||
qboolean PlayLooping;
|
||||
unsigned char PlayTrack;
|
||||
}
|
||||
cl_cdstate_t;
|
||||
|
||||
//extern cl_cdstate_t cd;
|
||||
|
||||
extern qboolean cdValid;
|
||||
extern qboolean cdPlaying;
|
||||
extern qboolean cdPlayLooping;
|
||||
extern unsigned char cdPlayTrack;
|
||||
|
||||
extern cvar_t cdaudioinitialized;
|
||||
|
||||
int CDAudio_Init(void);
|
||||
void CDAudio_Open(void);
|
||||
void CDAudio_Close(void);
|
||||
void CDAudio_Play(int track, qboolean looping);
|
||||
void CDAudio_Play_byName (const char *trackname, qboolean looping, qboolean tryreal, float startposition);
|
||||
void CDAudio_Stop(void);
|
||||
void CDAudio_Pause(void);
|
||||
void CDAudio_Resume(void);
|
||||
int CDAudio_Startup(void);
|
||||
void CDAudio_Shutdown(void);
|
||||
void CDAudio_Update(void);
|
||||
float CDAudio_GetPosition(void);
|
||||
void CDAudio_StartPlaylist(qboolean resume);
|
||||
|
||||
// Prototypes of the system dependent functions
|
||||
void CDAudio_SysEject (void);
|
||||
void CDAudio_SysCloseDoor (void);
|
||||
int CDAudio_SysGetAudioDiskInfo (void);
|
||||
float CDAudio_SysGetVolume (void);
|
||||
void CDAudio_SysSetVolume (float volume);
|
||||
int CDAudio_SysPlay (int track);
|
||||
int CDAudio_SysStop (void);
|
||||
int CDAudio_SysPause (void);
|
||||
int CDAudio_SysResume (void);
|
||||
int CDAudio_SysUpdate (void);
|
||||
void CDAudio_SysInit (void);
|
||||
int CDAudio_SysStartup (void);
|
||||
void CDAudio_SysShutdown (void);
|
|
@ -0,0 +1,970 @@
|
|||
|
||||
#include "quakedef.h"
|
||||
#include "cl_collision.h"
|
||||
|
||||
float CL_SelectTraceLine(const vec3_t start, const vec3_t end, vec3_t impact, vec3_t normal, int *hitent, entity_render_t *ignoreent)
|
||||
{
|
||||
float maxfrac;
|
||||
int n;
|
||||
entity_render_t *ent;
|
||||
vec_t tracemins[3], tracemaxs[3];
|
||||
trace_t trace;
|
||||
vec_t tempnormal[3], starttransformed[3], endtransformed[3];
|
||||
|
||||
memset (&trace, 0 , sizeof(trace_t));
|
||||
trace.fraction = 1;
|
||||
VectorCopy (end, trace.endpos);
|
||||
|
||||
if (hitent)
|
||||
*hitent = 0;
|
||||
if (cl.worldmodel && cl.worldmodel->TraceLine)
|
||||
cl.worldmodel->TraceLine(cl.worldmodel, NULL, NULL, &trace, start, end, SUPERCONTENTS_SOLID);
|
||||
|
||||
if (normal)
|
||||
VectorCopy(trace.plane.normal, normal);
|
||||
maxfrac = trace.fraction;
|
||||
|
||||
tracemins[0] = min(start[0], end[0]);
|
||||
tracemaxs[0] = max(start[0], end[0]);
|
||||
tracemins[1] = min(start[1], end[1]);
|
||||
tracemaxs[1] = max(start[1], end[1]);
|
||||
tracemins[2] = min(start[2], end[2]);
|
||||
tracemaxs[2] = max(start[2], end[2]);
|
||||
|
||||
// look for embedded bmodels
|
||||
for (n = 0;n < cl.num_entities;n++)
|
||||
{
|
||||
if (!cl.entities_active[n])
|
||||
continue;
|
||||
ent = &cl.entities[n].render;
|
||||
if (!BoxesOverlap(ent->mins, ent->maxs, tracemins, tracemaxs))
|
||||
continue;
|
||||
if (!ent->model || !ent->model->TraceLine)
|
||||
continue;
|
||||
if ((ent->flags & RENDER_EXTERIORMODEL) && !chase_active.integer)
|
||||
continue;
|
||||
// if transparent and not selectable, skip entity
|
||||
if (!(cl.entities[n].state_current.effects & EF_SELECTABLE) && (ent->alpha < 1 || (ent->effects & (EF_ADDITIVE | EF_NODEPTHTEST))))
|
||||
continue;
|
||||
if (ent == ignoreent)
|
||||
continue;
|
||||
Matrix4x4_Transform(&ent->inversematrix, start, starttransformed);
|
||||
Matrix4x4_Transform(&ent->inversematrix, end, endtransformed);
|
||||
Collision_ClipTrace_Box(&trace, ent->model->normalmins, ent->model->normalmaxs, starttransformed, vec3_origin, vec3_origin, endtransformed, SUPERCONTENTS_SOLID, SUPERCONTENTS_SOLID, 0, NULL);
|
||||
if (maxfrac < trace.fraction)
|
||||
continue;
|
||||
|
||||
ent->model->TraceLine(ent->model, ent->frameblend, ent->skeleton, &trace, starttransformed, endtransformed, SUPERCONTENTS_SOLID);
|
||||
|
||||
if (maxfrac > trace.fraction)
|
||||
{
|
||||
if (hitent)
|
||||
*hitent = n;
|
||||
maxfrac = trace.fraction;
|
||||
if (normal)
|
||||
{
|
||||
VectorCopy(trace.plane.normal, tempnormal);
|
||||
Matrix4x4_Transform3x3(&ent->matrix, tempnormal, normal);
|
||||
}
|
||||
}
|
||||
}
|
||||
maxfrac = bound(0, maxfrac, 1);
|
||||
//maxrealfrac = bound(0, maxrealfrac, 1);
|
||||
//if (maxfrac < 0 || maxfrac > 1) Con_Printf("fraction out of bounds %f %s:%d\n", maxfrac, __FILE__, __LINE__);
|
||||
if (impact)
|
||||
VectorLerp(start, maxfrac, end, impact);
|
||||
return maxfrac;
|
||||
}
|
||||
|
||||
void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius)
|
||||
{
|
||||
// FIXME: check multiple brush models
|
||||
if (cl.worldmodel && cl.worldmodel->brush.FindNonSolidLocation)
|
||||
cl.worldmodel->brush.FindNonSolidLocation(cl.worldmodel, in, out, radius);
|
||||
}
|
||||
|
||||
dp_model_t *CL_GetModelByIndex(int modelindex)
|
||||
{
|
||||
if(!modelindex)
|
||||
return NULL;
|
||||
if (modelindex < 0)
|
||||
{
|
||||
modelindex = -(modelindex+1);
|
||||
if (modelindex < MAX_MODELS)
|
||||
return cl.csqc_model_precache[modelindex];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(modelindex < MAX_MODELS)
|
||||
return cl.model_precache[modelindex];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dp_model_t *CL_GetModelFromEdict(prvm_edict_t *ed)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
if (!ed || ed->priv.server->free)
|
||||
return NULL;
|
||||
return CL_GetModelByIndex((int)PRVM_clientedictfloat(ed, modelindex));
|
||||
}
|
||||
|
||||
void CL_LinkEdict(prvm_edict_t *ent)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
vec3_t mins, maxs;
|
||||
|
||||
if (ent == prog->edicts)
|
||||
return; // don't add the world
|
||||
|
||||
if (ent->priv.server->free)
|
||||
return;
|
||||
|
||||
// set the abs box
|
||||
|
||||
if (PRVM_clientedictfloat(ent, solid) == SOLID_BSP)
|
||||
{
|
||||
dp_model_t *model = CL_GetModelByIndex( (int)PRVM_clientedictfloat(ent, modelindex) );
|
||||
if (model == NULL)
|
||||
{
|
||||
Con_Printf("edict %i: SOLID_BSP with invalid modelindex!\n", PRVM_NUM_FOR_EDICT(ent));
|
||||
|
||||
model = CL_GetModelByIndex( 0 );
|
||||
}
|
||||
|
||||
if( model != NULL )
|
||||
{
|
||||
if (!model->TraceBox)
|
||||
Con_DPrintf("edict %i: SOLID_BSP with non-collidable model\n", PRVM_NUM_FOR_EDICT(ent));
|
||||
|
||||
if (PRVM_clientedictvector(ent, angles)[0] || PRVM_clientedictvector(ent, angles)[2] || PRVM_clientedictvector(ent, avelocity)[0] || PRVM_clientedictvector(ent, avelocity)[2])
|
||||
{
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), model->rotatedmins, mins);
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), model->rotatedmaxs, maxs);
|
||||
}
|
||||
else if (PRVM_clientedictvector(ent, angles)[1] || PRVM_clientedictvector(ent, avelocity)[1])
|
||||
{
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), model->yawmins, mins);
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), model->yawmaxs, maxs);
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), model->normalmins, mins);
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), model->normalmaxs, maxs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// SOLID_BSP with no model is valid, mainly because some QC setup code does so temporarily
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, mins), mins);
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, maxs), maxs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, mins), mins);
|
||||
VectorAdd(PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, maxs), maxs);
|
||||
}
|
||||
|
||||
VectorCopy(mins, PRVM_clientedictvector(ent, absmin));
|
||||
VectorCopy(maxs, PRVM_clientedictvector(ent, absmax));
|
||||
|
||||
World_LinkEdict(&cl.world, ent, mins, maxs);
|
||||
}
|
||||
|
||||
int CL_GenericHitSuperContentsMask(const prvm_edict_t *passedict)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
if (passedict)
|
||||
{
|
||||
int dphitcontentsmask = (int)PRVM_clientedictfloat(passedict, dphitcontentsmask);
|
||||
if (dphitcontentsmask)
|
||||
return dphitcontentsmask;
|
||||
else if (PRVM_clientedictfloat(passedict, solid) == SOLID_SLIDEBOX)
|
||||
{
|
||||
if ((int)PRVM_clientedictfloat(passedict, flags) & FL_MONSTER)
|
||||
return SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_MONSTERCLIP;
|
||||
else
|
||||
return SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP;
|
||||
}
|
||||
else if (PRVM_clientedictfloat(passedict, solid) == SOLID_CORPSE)
|
||||
return SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY;
|
||||
else if (PRVM_clientedictfloat(passedict, solid) == SOLID_TRIGGER)
|
||||
return SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY;
|
||||
else
|
||||
return SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_CORPSE;
|
||||
}
|
||||
else
|
||||
return SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_CORPSE;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CL_Move
|
||||
==================
|
||||
*/
|
||||
trace_t CL_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int hitsupercontentsmask, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
int i, bodysupercontents;
|
||||
int passedictprog;
|
||||
prvm_edict_t *traceowner, *touch;
|
||||
trace_t trace;
|
||||
// temporary storage because prvm_vec_t may need conversion
|
||||
vec3_t touchmins, touchmaxs;
|
||||
// bounding box of entire move area
|
||||
vec3_t clipboxmins, clipboxmaxs;
|
||||
// size when clipping against monsters
|
||||
vec3_t clipmins2, clipmaxs2;
|
||||
// start and end origin of move
|
||||
vec3_t clipstart;
|
||||
// trace results
|
||||
trace_t cliptrace;
|
||||
// matrices to transform into/out of other entity's space
|
||||
matrix4x4_t matrix, imatrix;
|
||||
// model of other entity
|
||||
dp_model_t *model;
|
||||
// list of entities to test for collisions
|
||||
int numtouchedicts;
|
||||
static prvm_edict_t *touchedicts[MAX_EDICTS];
|
||||
|
||||
if (hitnetworkentity)
|
||||
*hitnetworkentity = 0;
|
||||
|
||||
VectorCopy(start, clipstart);
|
||||
VectorClear(clipmins2);
|
||||
VectorClear(clipmaxs2);
|
||||
#if COLLISIONPARANOID >= 3
|
||||
Con_Printf("move(%f %f %f)", clipstart[0], clipstart[1], clipstart[2]);
|
||||
#endif
|
||||
|
||||
// clip to world
|
||||
Collision_ClipPointToWorld(&cliptrace, cl.worldmodel, clipstart, hitsupercontentsmask);
|
||||
cliptrace.worldstartsolid = cliptrace.bmodelstartsolid = cliptrace.startsolid;
|
||||
if (cliptrace.startsolid || cliptrace.fraction < 1)
|
||||
cliptrace.ent = prog ? prog->edicts : NULL;
|
||||
if (type == MOVE_WORLDONLY)
|
||||
goto finished;
|
||||
|
||||
if (type == MOVE_MISSILE)
|
||||
{
|
||||
// LordHavoc: modified this, was = -15, now -= 15
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipmins2[i] -= 15;
|
||||
clipmaxs2[i] += 15;
|
||||
}
|
||||
}
|
||||
|
||||
// create the bounding box of the entire move
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipboxmins[i] = clipstart[i] - 1;
|
||||
clipboxmaxs[i] = clipstart[i] + 1;
|
||||
}
|
||||
|
||||
// debug override to test against everything
|
||||
if (sv_debugmove.integer)
|
||||
{
|
||||
clipboxmins[0] = clipboxmins[1] = clipboxmins[2] = -999999999;
|
||||
clipboxmaxs[0] = clipboxmaxs[1] = clipboxmaxs[2] = 999999999;
|
||||
}
|
||||
|
||||
// if the passedict is world, make it NULL (to avoid two checks each time)
|
||||
// this checks prog because this function is often called without a CSQC
|
||||
// VM context
|
||||
if (prog == NULL || passedict == prog->edicts)
|
||||
passedict = NULL;
|
||||
// precalculate prog value for passedict for comparisons
|
||||
passedictprog = prog != NULL ? PRVM_EDICT_TO_PROG(passedict) : 0;
|
||||
// precalculate passedict's owner edict pointer for comparisons
|
||||
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_clientedictedict(passedict, owner)) : NULL;
|
||||
|
||||
// collide against network entities
|
||||
if (hitnetworkbrushmodels)
|
||||
{
|
||||
for (i = 0;i < cl.num_brushmodel_entities;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
|
||||
continue;
|
||||
Collision_ClipPointToGenericEntity(&trace, ent->model, ent->frameblend, ent->skeleton, vec3_origin, vec3_origin, 0, &ent->matrix, &ent->inversematrix, start, hitsupercontentsmask);
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = cl.brushmodel_entities[i];
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
// collide against player entities
|
||||
if (hitnetworkplayers)
|
||||
{
|
||||
vec3_t origin, entmins, entmaxs;
|
||||
matrix4x4_t entmatrix, entinversematrix;
|
||||
|
||||
if(IS_OLDNEXUIZ_DERIVED(gamemode))
|
||||
{
|
||||
// don't hit network players, if we are a nonsolid player
|
||||
if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
|
||||
goto skipnetworkplayers;
|
||||
}
|
||||
|
||||
for (i = 1;i <= cl.maxclients;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[i].render;
|
||||
|
||||
// don't hit ourselves
|
||||
if (i == cl.playerentity)
|
||||
continue;
|
||||
|
||||
// don't hit players that don't exist
|
||||
if (!cl.scores[i-1].name[0])
|
||||
continue;
|
||||
|
||||
if(IS_OLDNEXUIZ_DERIVED(gamemode))
|
||||
{
|
||||
// don't hit spectators or nonsolid players
|
||||
if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
|
||||
continue;
|
||||
}
|
||||
|
||||
Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
|
||||
VectorAdd(origin, cl.playerstandmins, entmins);
|
||||
VectorAdd(origin, cl.playerstandmaxs, entmaxs);
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, entmins, entmaxs))
|
||||
continue;
|
||||
Matrix4x4_CreateTranslate(&entmatrix, origin[0], origin[1], origin[2]);
|
||||
Matrix4x4_CreateTranslate(&entinversematrix, -origin[0], -origin[1], -origin[2]);
|
||||
Collision_ClipPointToGenericEntity(&trace, NULL, NULL, NULL, cl.playerstandmins, cl.playerstandmaxs, SUPERCONTENTS_BODY, &entmatrix, &entinversematrix, start, hitsupercontentsmask);
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = i;
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, false);
|
||||
}
|
||||
|
||||
skipnetworkplayers:
|
||||
;
|
||||
}
|
||||
|
||||
// clip to entities
|
||||
// because this uses World_EntitiestoBox, we know all entity boxes overlap
|
||||
// the clip region, so we can skip culling checks in the loop below
|
||||
// note: if prog is NULL then there won't be any linked entities
|
||||
numtouchedicts = 0;
|
||||
if (hitcsqcentities && prog != NULL)
|
||||
{
|
||||
numtouchedicts = World_EntitiesInBox(&cl.world, clipboxmins, clipboxmaxs, MAX_EDICTS, touchedicts);
|
||||
if (numtouchedicts > MAX_EDICTS)
|
||||
{
|
||||
// this never happens
|
||||
Con_Printf("CL_EntitiesInBox returned %i edicts, max was %i\n", numtouchedicts, MAX_EDICTS);
|
||||
numtouchedicts = MAX_EDICTS;
|
||||
}
|
||||
}
|
||||
for (i = 0;i < numtouchedicts;i++)
|
||||
{
|
||||
touch = touchedicts[i];
|
||||
|
||||
if (PRVM_clientedictfloat(touch, solid) < SOLID_BBOX)
|
||||
continue;
|
||||
if (type == MOVE_NOMONSTERS && PRVM_clientedictfloat(touch, solid) != SOLID_BSP)
|
||||
continue;
|
||||
|
||||
if (passedict)
|
||||
{
|
||||
// don't clip against self
|
||||
if (passedict == touch)
|
||||
continue;
|
||||
// don't clip owned entities against owner
|
||||
if (traceowner == touch)
|
||||
continue;
|
||||
// don't clip owner against owned entities
|
||||
if (passedictprog == PRVM_clientedictedict(touch, owner))
|
||||
continue;
|
||||
// don't clip points against points (they can't collide)
|
||||
if (VectorCompare(PRVM_clientedictvector(touch, mins), PRVM_clientedictvector(touch, maxs)) && (type != MOVE_MISSILE || !((int)PRVM_clientedictfloat(touch, flags) & FL_MONSTER)))
|
||||
continue;
|
||||
}
|
||||
|
||||
bodysupercontents = PRVM_clientedictfloat(touch, solid) == SOLID_CORPSE ? SUPERCONTENTS_CORPSE : SUPERCONTENTS_BODY;
|
||||
|
||||
// might interact, so do an exact clip
|
||||
model = NULL;
|
||||
if ((int) PRVM_clientedictfloat(touch, solid) == SOLID_BSP || type == MOVE_HITMODEL)
|
||||
model = CL_GetModelFromEdict(touch);
|
||||
if (model)
|
||||
Matrix4x4_CreateFromQuakeEntity(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2], PRVM_clientedictvector(touch, angles)[0], PRVM_clientedictvector(touch, angles)[1], PRVM_clientedictvector(touch, angles)[2], 1);
|
||||
else
|
||||
Matrix4x4_CreateTranslate(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2]);
|
||||
Matrix4x4_Invert_Simple(&imatrix, &matrix);
|
||||
VectorCopy(PRVM_clientedictvector(touch, mins), touchmins);
|
||||
VectorCopy(PRVM_clientedictvector(touch, maxs), touchmaxs);
|
||||
if ((int)PRVM_clientedictfloat(touch, flags) & FL_MONSTER)
|
||||
Collision_ClipToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touchmins, touchmaxs, bodysupercontents, &matrix, &imatrix, clipstart, clipmins2, clipmaxs2, clipstart, hitsupercontentsmask, 0.0f);
|
||||
else
|
||||
Collision_ClipPointToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touchmins, touchmaxs, bodysupercontents, &matrix, &imatrix, clipstart, hitsupercontentsmask);
|
||||
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = 0;
|
||||
Collision_CombineTraces(&cliptrace, &trace, (void *)touch, PRVM_clientedictfloat(touch, solid) == SOLID_BSP);
|
||||
}
|
||||
|
||||
finished:
|
||||
return cliptrace;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CL_TraceLine
|
||||
==================
|
||||
*/
|
||||
trace_t CL_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, float extend, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities, qboolean hitsurfaces)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
int i, bodysupercontents;
|
||||
int passedictprog;
|
||||
prvm_edict_t *traceowner, *touch;
|
||||
trace_t trace;
|
||||
// temporary storage because prvm_vec_t may need conversion
|
||||
vec3_t touchmins, touchmaxs;
|
||||
// bounding box of entire move area
|
||||
vec3_t clipboxmins, clipboxmaxs;
|
||||
// size when clipping against monsters
|
||||
vec3_t clipmins2, clipmaxs2;
|
||||
// start and end origin of move
|
||||
vec3_t clipstart, clipend;
|
||||
// trace results
|
||||
trace_t cliptrace;
|
||||
// matrices to transform into/out of other entity's space
|
||||
matrix4x4_t matrix, imatrix;
|
||||
// model of other entity
|
||||
dp_model_t *model;
|
||||
// list of entities to test for collisions
|
||||
int numtouchedicts;
|
||||
static prvm_edict_t *touchedicts[MAX_EDICTS];
|
||||
if (VectorCompare(start, end))
|
||||
return CL_TracePoint(start, type, passedict, hitsupercontentsmask, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities);
|
||||
|
||||
if (hitnetworkentity)
|
||||
*hitnetworkentity = 0;
|
||||
|
||||
VectorCopy(start, clipstart);
|
||||
VectorCopy(end, clipend);
|
||||
VectorClear(clipmins2);
|
||||
VectorClear(clipmaxs2);
|
||||
#if COLLISIONPARANOID >= 3
|
||||
Con_Printf("move(%f %f %f,%f %f %f)", clipstart[0], clipstart[1], clipstart[2], clipend[0], clipend[1], clipend[2]);
|
||||
#endif
|
||||
|
||||
// clip to world
|
||||
Collision_ClipLineToWorld(&cliptrace, cl.worldmodel, clipstart, clipend, hitsupercontentsmask, extend, hitsurfaces);
|
||||
cliptrace.worldstartsolid = cliptrace.bmodelstartsolid = cliptrace.startsolid;
|
||||
if (cliptrace.startsolid || cliptrace.fraction < 1)
|
||||
cliptrace.ent = prog ? prog->edicts : NULL;
|
||||
if (type == MOVE_WORLDONLY)
|
||||
goto finished;
|
||||
|
||||
if (type == MOVE_MISSILE)
|
||||
{
|
||||
// LordHavoc: modified this, was = -15, now -= 15
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipmins2[i] -= 15;
|
||||
clipmaxs2[i] += 15;
|
||||
}
|
||||
}
|
||||
|
||||
// create the bounding box of the entire move
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipboxmins[i] = min(clipstart[i], cliptrace.endpos[i]) + clipmins2[i] - 1;
|
||||
clipboxmaxs[i] = max(clipstart[i], cliptrace.endpos[i]) + clipmaxs2[i] + 1;
|
||||
}
|
||||
|
||||
// debug override to test against everything
|
||||
if (sv_debugmove.integer)
|
||||
{
|
||||
clipboxmins[0] = clipboxmins[1] = clipboxmins[2] = -999999999;
|
||||
clipboxmaxs[0] = clipboxmaxs[1] = clipboxmaxs[2] = 999999999;
|
||||
}
|
||||
|
||||
// if the passedict is world, make it NULL (to avoid two checks each time)
|
||||
// this checks prog because this function is often called without a CSQC
|
||||
// VM context
|
||||
if (prog == NULL || passedict == prog->edicts)
|
||||
passedict = NULL;
|
||||
// precalculate prog value for passedict for comparisons
|
||||
passedictprog = prog != NULL ? PRVM_EDICT_TO_PROG(passedict) : 0;
|
||||
// precalculate passedict's owner edict pointer for comparisons
|
||||
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_clientedictedict(passedict, owner)) : NULL;
|
||||
|
||||
// collide against network entities
|
||||
if (hitnetworkbrushmodels)
|
||||
{
|
||||
for (i = 0;i < cl.num_brushmodel_entities;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
|
||||
continue;
|
||||
Collision_ClipLineToGenericEntity(&trace, ent->model, ent->frameblend, ent->skeleton, vec3_origin, vec3_origin, 0, &ent->matrix, &ent->inversematrix, start, end, hitsupercontentsmask, extend, hitsurfaces);
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = cl.brushmodel_entities[i];
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
// collide against player entities
|
||||
if (hitnetworkplayers)
|
||||
{
|
||||
vec3_t origin, entmins, entmaxs;
|
||||
matrix4x4_t entmatrix, entinversematrix;
|
||||
|
||||
if(IS_OLDNEXUIZ_DERIVED(gamemode))
|
||||
{
|
||||
// don't hit network players, if we are a nonsolid player
|
||||
if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
|
||||
goto skipnetworkplayers;
|
||||
}
|
||||
|
||||
for (i = 1;i <= cl.maxclients;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[i].render;
|
||||
|
||||
// don't hit ourselves
|
||||
if (i == cl.playerentity)
|
||||
continue;
|
||||
|
||||
// don't hit players that don't exist
|
||||
if (!cl.scores[i-1].name[0])
|
||||
continue;
|
||||
|
||||
if(IS_OLDNEXUIZ_DERIVED(gamemode))
|
||||
{
|
||||
// don't hit spectators or nonsolid players
|
||||
if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
|
||||
continue;
|
||||
}
|
||||
|
||||
Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
|
||||
VectorAdd(origin, cl.playerstandmins, entmins);
|
||||
VectorAdd(origin, cl.playerstandmaxs, entmaxs);
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, entmins, entmaxs))
|
||||
continue;
|
||||
Matrix4x4_CreateTranslate(&entmatrix, origin[0], origin[1], origin[2]);
|
||||
Matrix4x4_CreateTranslate(&entinversematrix, -origin[0], -origin[1], -origin[2]);
|
||||
Collision_ClipLineToGenericEntity(&trace, NULL, NULL, NULL, cl.playerstandmins, cl.playerstandmaxs, SUPERCONTENTS_BODY, &entmatrix, &entinversematrix, start, end, hitsupercontentsmask, extend, hitsurfaces);
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = i;
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, false);
|
||||
}
|
||||
|
||||
skipnetworkplayers:
|
||||
;
|
||||
}
|
||||
|
||||
// clip to entities
|
||||
// because this uses World_EntitiestoBox, we know all entity boxes overlap
|
||||
// the clip region, so we can skip culling checks in the loop below
|
||||
// note: if prog is NULL then there won't be any linked entities
|
||||
numtouchedicts = 0;
|
||||
if (hitcsqcentities && prog != NULL)
|
||||
{
|
||||
numtouchedicts = World_EntitiesInBox(&cl.world, clipboxmins, clipboxmaxs, MAX_EDICTS, touchedicts);
|
||||
if (numtouchedicts > MAX_EDICTS)
|
||||
{
|
||||
// this never happens
|
||||
Con_Printf("CL_EntitiesInBox returned %i edicts, max was %i\n", numtouchedicts, MAX_EDICTS);
|
||||
numtouchedicts = MAX_EDICTS;
|
||||
}
|
||||
}
|
||||
for (i = 0;i < numtouchedicts;i++)
|
||||
{
|
||||
touch = touchedicts[i];
|
||||
|
||||
if (PRVM_clientedictfloat(touch, solid) < SOLID_BBOX)
|
||||
continue;
|
||||
if (type == MOVE_NOMONSTERS && PRVM_clientedictfloat(touch, solid) != SOLID_BSP)
|
||||
continue;
|
||||
|
||||
if (passedict)
|
||||
{
|
||||
// don't clip against self
|
||||
if (passedict == touch)
|
||||
continue;
|
||||
// don't clip owned entities against owner
|
||||
if (traceowner == touch)
|
||||
continue;
|
||||
// don't clip owner against owned entities
|
||||
if (passedictprog == PRVM_clientedictedict(touch, owner))
|
||||
continue;
|
||||
// don't clip points against points (they can't collide)
|
||||
if (VectorCompare(PRVM_clientedictvector(touch, mins), PRVM_clientedictvector(touch, maxs)) && (type != MOVE_MISSILE || !((int)PRVM_clientedictfloat(touch, flags) & FL_MONSTER)))
|
||||
continue;
|
||||
}
|
||||
|
||||
bodysupercontents = PRVM_clientedictfloat(touch, solid) == SOLID_CORPSE ? SUPERCONTENTS_CORPSE : SUPERCONTENTS_BODY;
|
||||
|
||||
// might interact, so do an exact clip
|
||||
model = NULL;
|
||||
if ((int) PRVM_clientedictfloat(touch, solid) == SOLID_BSP || type == MOVE_HITMODEL)
|
||||
model = CL_GetModelFromEdict(touch);
|
||||
if (model)
|
||||
Matrix4x4_CreateFromQuakeEntity(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2], PRVM_clientedictvector(touch, angles)[0], PRVM_clientedictvector(touch, angles)[1], PRVM_clientedictvector(touch, angles)[2], 1);
|
||||
else
|
||||
Matrix4x4_CreateTranslate(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2]);
|
||||
Matrix4x4_Invert_Simple(&imatrix, &matrix);
|
||||
VectorCopy(PRVM_clientedictvector(touch, mins), touchmins);
|
||||
VectorCopy(PRVM_clientedictvector(touch, maxs), touchmaxs);
|
||||
if (type == MOVE_MISSILE && (int)PRVM_clientedictfloat(touch, flags) & FL_MONSTER)
|
||||
Collision_ClipToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touchmins, touchmaxs, bodysupercontents, &matrix, &imatrix, clipstart, clipmins2, clipmaxs2, clipend, hitsupercontentsmask, extend);
|
||||
else
|
||||
Collision_ClipLineToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touchmins, touchmaxs, bodysupercontents, &matrix, &imatrix, clipstart, clipend, hitsupercontentsmask, extend, hitsurfaces);
|
||||
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = 0;
|
||||
Collision_CombineTraces(&cliptrace, &trace, (void *)touch, PRVM_clientedictfloat(touch, solid) == SOLID_BSP);
|
||||
}
|
||||
|
||||
finished:
|
||||
return cliptrace;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CL_Move
|
||||
==================
|
||||
*/
|
||||
trace_t CL_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, float extend, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
vec3_t hullmins, hullmaxs;
|
||||
int i, bodysupercontents;
|
||||
int passedictprog;
|
||||
qboolean pointtrace;
|
||||
prvm_edict_t *traceowner, *touch;
|
||||
trace_t trace;
|
||||
// temporary storage because prvm_vec_t may need conversion
|
||||
vec3_t touchmins, touchmaxs;
|
||||
// bounding box of entire move area
|
||||
vec3_t clipboxmins, clipboxmaxs;
|
||||
// size of the moving object
|
||||
vec3_t clipmins, clipmaxs;
|
||||
// size when clipping against monsters
|
||||
vec3_t clipmins2, clipmaxs2;
|
||||
// start and end origin of move
|
||||
vec3_t clipstart, clipend;
|
||||
// trace results
|
||||
trace_t cliptrace;
|
||||
// matrices to transform into/out of other entity's space
|
||||
matrix4x4_t matrix, imatrix;
|
||||
// model of other entity
|
||||
dp_model_t *model;
|
||||
// list of entities to test for collisions
|
||||
int numtouchedicts;
|
||||
static prvm_edict_t *touchedicts[MAX_EDICTS];
|
||||
if (VectorCompare(mins, maxs))
|
||||
{
|
||||
vec3_t shiftstart, shiftend;
|
||||
VectorAdd(start, mins, shiftstart);
|
||||
VectorAdd(end, mins, shiftend);
|
||||
if (VectorCompare(start, end))
|
||||
trace = CL_TracePoint(shiftstart, type, passedict, hitsupercontentsmask, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities);
|
||||
else
|
||||
trace = CL_TraceLine(shiftstart, shiftend, type, passedict, hitsupercontentsmask, extend, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities, false);
|
||||
VectorSubtract(trace.endpos, mins, trace.endpos);
|
||||
return trace;
|
||||
}
|
||||
|
||||
if (hitnetworkentity)
|
||||
*hitnetworkentity = 0;
|
||||
|
||||
VectorCopy(start, clipstart);
|
||||
VectorCopy(end, clipend);
|
||||
VectorCopy(mins, clipmins);
|
||||
VectorCopy(maxs, clipmaxs);
|
||||
VectorCopy(mins, clipmins2);
|
||||
VectorCopy(maxs, clipmaxs2);
|
||||
#if COLLISIONPARANOID >= 3
|
||||
Con_Printf("move(%f %f %f,%f %f %f)", clipstart[0], clipstart[1], clipstart[2], clipend[0], clipend[1], clipend[2]);
|
||||
#endif
|
||||
|
||||
// clip to world
|
||||
Collision_ClipToWorld(&cliptrace, cl.worldmodel, clipstart, clipmins, clipmaxs, clipend, hitsupercontentsmask, extend);
|
||||
cliptrace.worldstartsolid = cliptrace.bmodelstartsolid = cliptrace.startsolid;
|
||||
if (cliptrace.startsolid || cliptrace.fraction < 1)
|
||||
cliptrace.ent = prog ? prog->edicts : NULL;
|
||||
if (type == MOVE_WORLDONLY)
|
||||
goto finished;
|
||||
|
||||
if (type == MOVE_MISSILE)
|
||||
{
|
||||
// LordHavoc: modified this, was = -15, now -= 15
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipmins2[i] -= 15;
|
||||
clipmaxs2[i] += 15;
|
||||
}
|
||||
}
|
||||
|
||||
// get adjusted box for bmodel collisions if the world is q1bsp or hlbsp
|
||||
if (cl.worldmodel && cl.worldmodel->brush.RoundUpToHullSize)
|
||||
cl.worldmodel->brush.RoundUpToHullSize(cl.worldmodel, clipmins, clipmaxs, hullmins, hullmaxs);
|
||||
else
|
||||
{
|
||||
VectorCopy(clipmins, hullmins);
|
||||
VectorCopy(clipmaxs, hullmaxs);
|
||||
}
|
||||
|
||||
// create the bounding box of the entire move
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipboxmins[i] = min(clipstart[i], cliptrace.endpos[i]) + min(hullmins[i], clipmins2[i]) - 1;
|
||||
clipboxmaxs[i] = max(clipstart[i], cliptrace.endpos[i]) + max(hullmaxs[i], clipmaxs2[i]) + 1;
|
||||
}
|
||||
|
||||
// debug override to test against everything
|
||||
if (sv_debugmove.integer)
|
||||
{
|
||||
clipboxmins[0] = clipboxmins[1] = clipboxmins[2] = -999999999;
|
||||
clipboxmaxs[0] = clipboxmaxs[1] = clipboxmaxs[2] = 999999999;
|
||||
}
|
||||
|
||||
// if the passedict is world, make it NULL (to avoid two checks each time)
|
||||
// this checks prog because this function is often called without a CSQC
|
||||
// VM context
|
||||
if (prog == NULL || passedict == prog->edicts)
|
||||
passedict = NULL;
|
||||
// precalculate prog value for passedict for comparisons
|
||||
passedictprog = prog != NULL ? PRVM_EDICT_TO_PROG(passedict) : 0;
|
||||
// figure out whether this is a point trace for comparisons
|
||||
pointtrace = VectorCompare(clipmins, clipmaxs);
|
||||
// precalculate passedict's owner edict pointer for comparisons
|
||||
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_clientedictedict(passedict, owner)) : NULL;
|
||||
|
||||
// collide against network entities
|
||||
if (hitnetworkbrushmodels)
|
||||
{
|
||||
for (i = 0;i < cl.num_brushmodel_entities;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
|
||||
continue;
|
||||
Collision_ClipToGenericEntity(&trace, ent->model, ent->frameblend, ent->skeleton, vec3_origin, vec3_origin, 0, &ent->matrix, &ent->inversematrix, start, mins, maxs, end, hitsupercontentsmask, extend);
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = cl.brushmodel_entities[i];
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
// collide against player entities
|
||||
if (hitnetworkplayers)
|
||||
{
|
||||
vec3_t origin, entmins, entmaxs;
|
||||
matrix4x4_t entmatrix, entinversematrix;
|
||||
|
||||
if(IS_OLDNEXUIZ_DERIVED(gamemode))
|
||||
{
|
||||
// don't hit network players, if we are a nonsolid player
|
||||
if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
|
||||
goto skipnetworkplayers;
|
||||
}
|
||||
|
||||
for (i = 1;i <= cl.maxclients;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[i].render;
|
||||
|
||||
// don't hit ourselves
|
||||
if (i == cl.playerentity)
|
||||
continue;
|
||||
|
||||
// don't hit players that don't exist
|
||||
if (!cl.scores[i-1].name[0])
|
||||
continue;
|
||||
|
||||
if(IS_OLDNEXUIZ_DERIVED(gamemode))
|
||||
{
|
||||
// don't hit spectators or nonsolid players
|
||||
if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
|
||||
continue;
|
||||
}
|
||||
|
||||
Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
|
||||
VectorAdd(origin, cl.playerstandmins, entmins);
|
||||
VectorAdd(origin, cl.playerstandmaxs, entmaxs);
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, entmins, entmaxs))
|
||||
continue;
|
||||
Matrix4x4_CreateTranslate(&entmatrix, origin[0], origin[1], origin[2]);
|
||||
Matrix4x4_CreateTranslate(&entinversematrix, -origin[0], -origin[1], -origin[2]);
|
||||
Collision_ClipToGenericEntity(&trace, NULL, NULL, NULL, cl.playerstandmins, cl.playerstandmaxs, SUPERCONTENTS_BODY, &entmatrix, &entinversematrix, start, mins, maxs, end, hitsupercontentsmask, extend);
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = i;
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, false);
|
||||
}
|
||||
|
||||
skipnetworkplayers:
|
||||
;
|
||||
}
|
||||
|
||||
// clip to entities
|
||||
// because this uses World_EntitiestoBox, we know all entity boxes overlap
|
||||
// the clip region, so we can skip culling checks in the loop below
|
||||
// note: if prog is NULL then there won't be any linked entities
|
||||
numtouchedicts = 0;
|
||||
if (hitcsqcentities && prog != NULL)
|
||||
{
|
||||
numtouchedicts = World_EntitiesInBox(&cl.world, clipboxmins, clipboxmaxs, MAX_EDICTS, touchedicts);
|
||||
if (numtouchedicts > MAX_EDICTS)
|
||||
{
|
||||
// this never happens
|
||||
Con_Printf("CL_EntitiesInBox returned %i edicts, max was %i\n", numtouchedicts, MAX_EDICTS);
|
||||
numtouchedicts = MAX_EDICTS;
|
||||
}
|
||||
}
|
||||
for (i = 0;i < numtouchedicts;i++)
|
||||
{
|
||||
touch = touchedicts[i];
|
||||
|
||||
if (PRVM_clientedictfloat(touch, solid) < SOLID_BBOX)
|
||||
continue;
|
||||
if (type == MOVE_NOMONSTERS && PRVM_clientedictfloat(touch, solid) != SOLID_BSP)
|
||||
continue;
|
||||
|
||||
if (passedict)
|
||||
{
|
||||
// don't clip against self
|
||||
if (passedict == touch)
|
||||
continue;
|
||||
// don't clip owned entities against owner
|
||||
if (traceowner == touch)
|
||||
continue;
|
||||
// don't clip owner against owned entities
|
||||
if (passedictprog == PRVM_clientedictedict(touch, owner))
|
||||
continue;
|
||||
// don't clip points against points (they can't collide)
|
||||
if (pointtrace && VectorCompare(PRVM_clientedictvector(touch, mins), PRVM_clientedictvector(touch, maxs)) && (type != MOVE_MISSILE || !((int)PRVM_clientedictfloat(touch, flags) & FL_MONSTER)))
|
||||
continue;
|
||||
}
|
||||
|
||||
bodysupercontents = PRVM_clientedictfloat(touch, solid) == SOLID_CORPSE ? SUPERCONTENTS_CORPSE : SUPERCONTENTS_BODY;
|
||||
|
||||
// might interact, so do an exact clip
|
||||
model = NULL;
|
||||
if ((int) PRVM_clientedictfloat(touch, solid) == SOLID_BSP || type == MOVE_HITMODEL)
|
||||
model = CL_GetModelFromEdict(touch);
|
||||
if (model)
|
||||
Matrix4x4_CreateFromQuakeEntity(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2], PRVM_clientedictvector(touch, angles)[0], PRVM_clientedictvector(touch, angles)[1], PRVM_clientedictvector(touch, angles)[2], 1);
|
||||
else
|
||||
Matrix4x4_CreateTranslate(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2]);
|
||||
Matrix4x4_Invert_Simple(&imatrix, &matrix);
|
||||
VectorCopy(PRVM_clientedictvector(touch, mins), touchmins);
|
||||
VectorCopy(PRVM_clientedictvector(touch, maxs), touchmaxs);
|
||||
if ((int)PRVM_clientedictfloat(touch, flags) & FL_MONSTER)
|
||||
Collision_ClipToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touchmins, touchmaxs, bodysupercontents, &matrix, &imatrix, clipstart, clipmins2, clipmaxs2, clipend, hitsupercontentsmask, extend);
|
||||
else
|
||||
Collision_ClipToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touchmins, touchmaxs, bodysupercontents, &matrix, &imatrix, clipstart, clipmins, clipmaxs, clipend, hitsupercontentsmask, extend);
|
||||
|
||||
if (cliptrace.fraction > trace.fraction && hitnetworkentity)
|
||||
*hitnetworkentity = 0;
|
||||
Collision_CombineTraces(&cliptrace, &trace, (void *)touch, PRVM_clientedictfloat(touch, solid) == SOLID_BSP);
|
||||
}
|
||||
|
||||
finished:
|
||||
return cliptrace;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CL_Cache_TraceLine
|
||||
==================
|
||||
*/
|
||||
trace_t CL_Cache_TraceLineSurfaces(const vec3_t start, const vec3_t end, int type, int hitsupercontentsmask)
|
||||
{
|
||||
prvm_prog_t *prog = CLVM_prog;
|
||||
int i;
|
||||
prvm_edict_t *touch;
|
||||
trace_t trace;
|
||||
// bounding box of entire move area
|
||||
vec3_t clipboxmins, clipboxmaxs;
|
||||
// start and end origin of move
|
||||
vec3_t clipstart, clipend;
|
||||
// trace results
|
||||
trace_t cliptrace;
|
||||
// matrices to transform into/out of other entity's space
|
||||
matrix4x4_t matrix, imatrix;
|
||||
// model of other entity
|
||||
dp_model_t *model;
|
||||
// list of entities to test for collisions
|
||||
int numtouchedicts;
|
||||
static prvm_edict_t *touchedicts[MAX_EDICTS];
|
||||
|
||||
VectorCopy(start, clipstart);
|
||||
VectorCopy(end, clipend);
|
||||
#if COLLISIONPARANOID >= 3
|
||||
Con_Printf("move(%f %f %f,%f %f %f)", clipstart[0], clipstart[1], clipstart[2], clipend[0], clipend[1], clipend[2]);
|
||||
#endif
|
||||
|
||||
// clip to world
|
||||
Collision_Cache_ClipLineToWorldSurfaces(&cliptrace, cl.worldmodel, clipstart, clipend, hitsupercontentsmask);
|
||||
cliptrace.worldstartsolid = cliptrace.bmodelstartsolid = cliptrace.startsolid;
|
||||
if (cliptrace.startsolid || cliptrace.fraction < 1)
|
||||
cliptrace.ent = prog ? prog->edicts : NULL;
|
||||
if (type == MOVE_WORLDONLY)
|
||||
goto finished;
|
||||
|
||||
// create the bounding box of the entire move
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
clipboxmins[i] = min(clipstart[i], cliptrace.endpos[i]) - 1;
|
||||
clipboxmaxs[i] = max(clipstart[i], cliptrace.endpos[i]) + 1;
|
||||
}
|
||||
|
||||
// if the passedict is world, make it NULL (to avoid two checks each time)
|
||||
// this checks prog because this function is often called without a CSQC
|
||||
// VM context
|
||||
|
||||
// collide against network entities
|
||||
for (i = 0;i < cl.num_brushmodel_entities;i++)
|
||||
{
|
||||
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
|
||||
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
|
||||
continue;
|
||||
Collision_Cache_ClipLineToGenericEntitySurfaces(&trace, ent->model, &ent->matrix, &ent->inversematrix, start, end, hitsupercontentsmask);
|
||||
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
|
||||
}
|
||||
|
||||
// clip to entities
|
||||
// because this uses World_EntitiestoBox, we know all entity boxes overlap
|
||||
// the clip region, so we can skip culling checks in the loop below
|
||||
// note: if prog is NULL then there won't be any linked entities
|
||||
numtouchedicts = 0;
|
||||
if (prog != NULL)
|
||||
{
|
||||
numtouchedicts = World_EntitiesInBox(&cl.world, clipboxmins, clipboxmaxs, MAX_EDICTS, touchedicts);
|
||||
if (numtouchedicts > MAX_EDICTS)
|
||||
{
|
||||
// this never happens
|
||||
Con_Printf("CL_EntitiesInBox returned %i edicts, max was %i\n", numtouchedicts, MAX_EDICTS);
|
||||
numtouchedicts = MAX_EDICTS;
|
||||
}
|
||||
}
|
||||
for (i = 0;i < numtouchedicts;i++)
|
||||
{
|
||||
touch = touchedicts[i];
|
||||
// might interact, so do an exact clip
|
||||
// only hit entity models, not collision shapes
|
||||
model = CL_GetModelFromEdict(touch);
|
||||
if (!model)
|
||||
continue;
|
||||
// animated models are too slow to collide against and can't be cached
|
||||
if (touch->priv.server->frameblend || touch->priv.server->skeleton.relativetransforms)
|
||||
continue;
|
||||
if (type == MOVE_NOMONSTERS && PRVM_clientedictfloat(touch, solid) != SOLID_BSP)
|
||||
continue;
|
||||
Matrix4x4_CreateFromQuakeEntity(&matrix, PRVM_clientedictvector(touch, origin)[0], PRVM_clientedictvector(touch, origin)[1], PRVM_clientedictvector(touch, origin)[2], PRVM_clientedictvector(touch, angles)[0], PRVM_clientedictvector(touch, angles)[1], PRVM_clientedictvector(touch, angles)[2], 1);
|
||||
Matrix4x4_Invert_Simple(&imatrix, &matrix);
|
||||
Collision_Cache_ClipLineToGenericEntitySurfaces(&trace, model, &matrix, &imatrix, clipstart, clipend, hitsupercontentsmask);
|
||||
Collision_CombineTraces(&cliptrace, &trace, (void *)touch, PRVM_clientedictfloat(touch, solid) == SOLID_BSP);
|
||||
}
|
||||
|
||||
finished:
|
||||
return cliptrace;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
#ifndef CL_COLLISION_H
|
||||
#define CL_COLLISION_H
|
||||
|
||||
float CL_SelectTraceLine(const vec3_t start, const vec3_t end, vec3_t impact, vec3_t normal, int *hitent, entity_render_t *ignoreent);
|
||||
void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius);
|
||||
|
||||
dp_model_t *CL_GetModelByIndex(int modelindex);
|
||||
dp_model_t *CL_GetModelFromEdict(prvm_edict_t *ed);
|
||||
|
||||
void CL_LinkEdict(prvm_edict_t *ent);
|
||||
int CL_GenericHitSuperContentsMask(const prvm_edict_t *edict);
|
||||
trace_t CL_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, float extend, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities);
|
||||
trace_t CL_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, float extend, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities, qboolean hitsurfaces);
|
||||
trace_t CL_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int hitsupercontentsmask, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities);
|
||||
trace_t CL_Cache_TraceLineSurfaces(const vec3_t start, const vec3_t end, int type, int hitsupercontentsmask);
|
||||
#define CL_PointSuperContents(point) (CL_TracePoint((point), sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL, 0, true, false, NULL, false).startsupercontents)
|
||||
|
||||
#endif
|
|
@ -0,0 +1,621 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
#ifdef CONFIG_VIDEO_CAPTURE
|
||||
extern cvar_t cl_capturevideo;
|
||||
extern cvar_t cl_capturevideo_demo_stop;
|
||||
#endif
|
||||
int old_vsync = 0;
|
||||
|
||||
static void CL_FinishTimeDemo (void);
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
DEMO CODE
|
||||
|
||||
When a demo is playing back, all outgoing network messages are skipped, and
|
||||
incoming messages are read from the demo file.
|
||||
|
||||
Whenever cl.time gets past the last received message, another message is
|
||||
read from the demo file.
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
=====================
|
||||
CL_NextDemo
|
||||
|
||||
Called to play the next demo in the demo loop
|
||||
=====================
|
||||
*/
|
||||
void CL_NextDemo (void)
|
||||
{
|
||||
char str[MAX_INPUTLINE];
|
||||
|
||||
if (cls.demonum == -1)
|
||||
return; // don't play demos
|
||||
|
||||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS)
|
||||
{
|
||||
cls.demonum = 0;
|
||||
if (!cls.demos[cls.demonum][0])
|
||||
{
|
||||
Con_Print("No demos listed with startdemos\n");
|
||||
cls.demonum = -1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
dpsnprintf (str, sizeof(str), "playdemo %s\n", cls.demos[cls.demonum]);
|
||||
Cbuf_InsertText (str);
|
||||
cls.demonum++;
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
CL_StopPlayback
|
||||
|
||||
Called when a demo file runs out, or the user starts a game
|
||||
==============
|
||||
*/
|
||||
// LordHavoc: now called only by CL_Disconnect
|
||||
void CL_StopPlayback (void)
|
||||
{
|
||||
#ifdef CONFIG_VIDEO_CAPTURE
|
||||
if (cl_capturevideo_demo_stop.integer)
|
||||
Cvar_Set("cl_capturevideo", "0");
|
||||
#endif
|
||||
|
||||
if (!cls.demoplayback)
|
||||
return;
|
||||
|
||||
FS_Close (cls.demofile);
|
||||
cls.demoplayback = false;
|
||||
cls.demofile = NULL;
|
||||
|
||||
if (cls.timedemo)
|
||||
CL_FinishTimeDemo ();
|
||||
|
||||
if (!cls.demostarting) // only quit if not starting another demo
|
||||
if (COM_CheckParm("-demo") || COM_CheckParm("-capturedemo"))
|
||||
Host_Quit_f();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_WriteDemoMessage
|
||||
|
||||
Dumps the current net message, prefixed by the length and view angles
|
||||
#====================
|
||||
*/
|
||||
void CL_WriteDemoMessage (sizebuf_t *message)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
float f;
|
||||
|
||||
if (cls.demopaused) // LordHavoc: pausedemo
|
||||
return;
|
||||
|
||||
len = LittleLong (message->cursize);
|
||||
FS_Write (cls.demofile, &len, 4);
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
f = LittleFloat (cl.viewangles[i]);
|
||||
FS_Write (cls.demofile, &f, 4);
|
||||
}
|
||||
FS_Write (cls.demofile, message->data, message->cursize);
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_CutDemo
|
||||
|
||||
Dumps the current demo to a buffer, and resets the demo to its starting point.
|
||||
Used to insert csprogs.dat files as a download to the beginning of a demo file.
|
||||
====================
|
||||
*/
|
||||
void CL_CutDemo (unsigned char **buf, fs_offset_t *filesize)
|
||||
{
|
||||
*buf = NULL;
|
||||
*filesize = 0;
|
||||
|
||||
FS_Close(cls.demofile);
|
||||
*buf = FS_LoadFile(cls.demoname, tempmempool, false, filesize);
|
||||
|
||||
// restart the demo recording
|
||||
cls.demofile = FS_OpenRealFile(cls.demoname, "wb", false);
|
||||
if(!cls.demofile)
|
||||
Sys_Error("failed to reopen the demo file");
|
||||
FS_Printf(cls.demofile, "%i\n", cls.forcetrack);
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_PasteDemo
|
||||
|
||||
Adds the cut stuff back to the demo. Also frees the buffer.
|
||||
Used to insert csprogs.dat files as a download to the beginning of a demo file.
|
||||
====================
|
||||
*/
|
||||
void CL_PasteDemo (unsigned char **buf, fs_offset_t *filesize)
|
||||
{
|
||||
fs_offset_t startoffset = 0;
|
||||
|
||||
if(!*buf)
|
||||
return;
|
||||
|
||||
// skip cdtrack
|
||||
while(startoffset < *filesize && ((char *)(*buf))[startoffset] != '\n')
|
||||
++startoffset;
|
||||
if(startoffset < *filesize)
|
||||
++startoffset;
|
||||
|
||||
FS_Write(cls.demofile, *buf + startoffset, *filesize - startoffset);
|
||||
|
||||
Mem_Free(*buf);
|
||||
*buf = NULL;
|
||||
*filesize = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_ReadDemoMessage
|
||||
|
||||
Handles playback of demos
|
||||
====================
|
||||
*/
|
||||
void CL_ReadDemoMessage(void)
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
|
||||
if (!cls.demoplayback)
|
||||
return;
|
||||
|
||||
// LordHavoc: pausedemo
|
||||
if (cls.demopaused)
|
||||
return;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// decide if it is time to grab the next message
|
||||
// always grab until fully connected
|
||||
if (cls.signon == SIGNONS)
|
||||
{
|
||||
if (cls.timedemo)
|
||||
{
|
||||
cls.td_frames++;
|
||||
cls.td_onesecondframes++;
|
||||
// if this is the first official frame we can now grab the real
|
||||
// td_starttime so the bogus time on the first frame doesn't
|
||||
// count against the final report
|
||||
if (cls.td_frames == 0)
|
||||
{
|
||||
cls.td_starttime = realtime;
|
||||
cls.td_onesecondnexttime = cl.time + 1;
|
||||
cls.td_onesecondrealtime = realtime;
|
||||
cls.td_onesecondframes = 0;
|
||||
cls.td_onesecondminfps = 0;
|
||||
cls.td_onesecondmaxfps = 0;
|
||||
cls.td_onesecondavgfps = 0;
|
||||
cls.td_onesecondavgcount = 0;
|
||||
}
|
||||
if (cl.time >= cls.td_onesecondnexttime)
|
||||
{
|
||||
double fps = cls.td_onesecondframes / (realtime - cls.td_onesecondrealtime);
|
||||
if (cls.td_onesecondavgcount == 0)
|
||||
{
|
||||
cls.td_onesecondminfps = fps;
|
||||
cls.td_onesecondmaxfps = fps;
|
||||
}
|
||||
cls.td_onesecondrealtime = realtime;
|
||||
cls.td_onesecondminfps = min(cls.td_onesecondminfps, fps);
|
||||
cls.td_onesecondmaxfps = max(cls.td_onesecondmaxfps, fps);
|
||||
cls.td_onesecondavgfps += fps;
|
||||
cls.td_onesecondavgcount++;
|
||||
cls.td_onesecondframes = 0;
|
||||
cls.td_onesecondnexttime++;
|
||||
}
|
||||
}
|
||||
else if (cl.time <= cl.mtime[0])
|
||||
{
|
||||
// don't need another message yet
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// get the next message
|
||||
FS_Read(cls.demofile, &cl_message.cursize, 4);
|
||||
cl_message.cursize = LittleLong(cl_message.cursize);
|
||||
if(cl_message.cursize & DEMOMSG_CLIENT_TO_SERVER) // This is a client->server message! Ignore for now!
|
||||
{
|
||||
// skip over demo packet
|
||||
FS_Seek(cls.demofile, 12 + (cl_message.cursize & (~DEMOMSG_CLIENT_TO_SERVER)), SEEK_CUR);
|
||||
continue;
|
||||
}
|
||||
if (cl_message.cursize > cl_message.maxsize)
|
||||
{
|
||||
Con_Printf("Demo message (%i) > cl_message.maxsize (%i)", cl_message.cursize, cl_message.maxsize);
|
||||
cl_message.cursize = 0;
|
||||
CL_Disconnect();
|
||||
return;
|
||||
}
|
||||
VectorCopy(cl.mviewangles[0], cl.mviewangles[1]);
|
||||
for (i = 0;i < 3;i++)
|
||||
{
|
||||
FS_Read(cls.demofile, &f, 4);
|
||||
cl.mviewangles[0][i] = LittleFloat(f);
|
||||
}
|
||||
|
||||
if (FS_Read(cls.demofile, cl_message.data, cl_message.cursize) == cl_message.cursize)
|
||||
{
|
||||
MSG_BeginReading(&cl_message);
|
||||
CL_ParseServerMessage();
|
||||
|
||||
if (cls.signon != SIGNONS)
|
||||
Cbuf_Execute(); // immediately execute svc_stufftext if in the demo before connect!
|
||||
|
||||
// In case the demo contains a "svc_disconnect" message
|
||||
if (!cls.demoplayback)
|
||||
return;
|
||||
|
||||
if (cls.timedemo)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
CL_Disconnect();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_Stop_f
|
||||
|
||||
stop recording a demo
|
||||
====================
|
||||
*/
|
||||
void CL_Stop_f (void)
|
||||
{
|
||||
sizebuf_t buf;
|
||||
unsigned char bufdata[64];
|
||||
|
||||
if (!cls.demorecording)
|
||||
{
|
||||
Con_Print("Not recording a demo.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// write a disconnect message to the demo file
|
||||
// LordHavoc: don't replace the cl_message when doing this
|
||||
buf.data = bufdata;
|
||||
buf.maxsize = sizeof(bufdata);
|
||||
SZ_Clear(&buf);
|
||||
MSG_WriteByte(&buf, svc_disconnect);
|
||||
CL_WriteDemoMessage(&buf);
|
||||
|
||||
// finish up
|
||||
if(cl_autodemo.integer && (cl_autodemo_delete.integer & 1))
|
||||
{
|
||||
FS_RemoveOnClose(cls.demofile);
|
||||
Con_Print("Completed and deleted demo\n");
|
||||
}
|
||||
else
|
||||
Con_Print("Completed demo\n");
|
||||
FS_Close (cls.demofile);
|
||||
cls.demofile = NULL;
|
||||
cls.demorecording = false;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_Record_f
|
||||
|
||||
record <demoname> <map> [cd track]
|
||||
====================
|
||||
*/
|
||||
void CL_Record_f (void)
|
||||
{
|
||||
int c, track;
|
||||
char name[MAX_OSPATH];
|
||||
char vabuf[1024];
|
||||
|
||||
c = Cmd_Argc();
|
||||
if (c != 2 && c != 3 && c != 4)
|
||||
{
|
||||
Con_Print("record <demoname> [<map> [cd track]]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strstr(Cmd_Argv(1), ".."))
|
||||
{
|
||||
Con_Print("Relative pathnames are not allowed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (c == 2 && cls.state == ca_connected)
|
||||
{
|
||||
Con_Print("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (cls.state == ca_connected)
|
||||
CL_Disconnect();
|
||||
|
||||
// write the forced cd track number, or -1
|
||||
if (c == 4)
|
||||
{
|
||||
track = atoi(Cmd_Argv(3));
|
||||
Con_Printf("Forcing CD track to %i\n", cls.forcetrack);
|
||||
}
|
||||
else
|
||||
track = -1;
|
||||
|
||||
// get the demo name
|
||||
strlcpy (name, Cmd_Argv(1), sizeof (name));
|
||||
FS_DefaultExtension (name, ".dem", sizeof (name));
|
||||
|
||||
// start the map up
|
||||
if (c > 2)
|
||||
Cmd_ExecuteString ( va(vabuf, sizeof(vabuf), "map %s", Cmd_Argv(2)), src_command, false);
|
||||
|
||||
// open the demo file
|
||||
Con_Printf("recording to %s.\n", name);
|
||||
cls.demofile = FS_OpenRealFile(name, "wb", false);
|
||||
if (!cls.demofile)
|
||||
{
|
||||
Con_Print("ERROR: couldn't open.\n");
|
||||
return;
|
||||
}
|
||||
strlcpy(cls.demoname, name, sizeof(cls.demoname));
|
||||
|
||||
cls.forcetrack = track;
|
||||
FS_Printf(cls.demofile, "%i\n", cls.forcetrack);
|
||||
|
||||
cls.demorecording = true;
|
||||
cls.demo_lastcsprogssize = -1;
|
||||
cls.demo_lastcsprogscrc = -1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_PlayDemo_f
|
||||
|
||||
play [demoname]
|
||||
====================
|
||||
*/
|
||||
void CL_PlayDemo_f (void)
|
||||
{
|
||||
char name[MAX_QPATH];
|
||||
int c;
|
||||
qboolean neg = false;
|
||||
qfile_t *f;
|
||||
|
||||
if (Cmd_Argc() != 2)
|
||||
{
|
||||
Con_Print("play <demoname> : plays a demo\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// open the demo file
|
||||
strlcpy (name, Cmd_Argv(1), sizeof (name));
|
||||
FS_DefaultExtension (name, ".dem", sizeof (name));
|
||||
f = FS_OpenVirtualFile(name, false);
|
||||
if (!f)
|
||||
{
|
||||
Con_Printf("ERROR: couldn't open %s.\n", name);
|
||||
cls.demonum = -1; // stop demo loop
|
||||
return;
|
||||
}
|
||||
|
||||
cls.demostarting = true;
|
||||
|
||||
// disconnect from server
|
||||
CL_Disconnect ();
|
||||
Host_ShutdownServer ();
|
||||
|
||||
// update networking ports (this is mainly just needed at startup)
|
||||
NetConn_UpdateSockets();
|
||||
|
||||
cls.protocol = PROTOCOL_QUAKE;
|
||||
|
||||
Con_Printf("Playing demo %s.\n", name);
|
||||
cls.demofile = f;
|
||||
strlcpy(cls.demoname, name, sizeof(cls.demoname));
|
||||
|
||||
cls.demoplayback = true;
|
||||
cls.state = ca_connected;
|
||||
cls.forcetrack = 0;
|
||||
|
||||
while ((c = FS_Getc (cls.demofile)) != '\n')
|
||||
if (c == '-')
|
||||
neg = true;
|
||||
else
|
||||
cls.forcetrack = cls.forcetrack * 10 + (c - '0');
|
||||
|
||||
if (neg)
|
||||
cls.forcetrack = -cls.forcetrack;
|
||||
|
||||
cls.demostarting = false;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int frames;
|
||||
double time, totalfpsavg;
|
||||
double fpsmin, fpsavg, fpsmax;
|
||||
}
|
||||
benchmarkhistory_t;
|
||||
static size_t doublecmp_offset;
|
||||
static int doublecmp_withoffset(const void *a_, const void *b_)
|
||||
{
|
||||
const double *a = (const double *) ((const char *) a_ + doublecmp_offset);
|
||||
const double *b = (const double *) ((const char *) b_ + doublecmp_offset);
|
||||
if(*a > *b)
|
||||
return +1;
|
||||
if(*a < *b)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_FinishTimeDemo
|
||||
|
||||
====================
|
||||
*/
|
||||
static void CL_FinishTimeDemo (void)
|
||||
{
|
||||
int frames;
|
||||
int i;
|
||||
double time, totalfpsavg;
|
||||
double fpsmin, fpsavg, fpsmax; // report min/avg/max fps
|
||||
static int benchmark_runs = 0;
|
||||
char vabuf[1024];
|
||||
|
||||
cls.timedemo = false;
|
||||
|
||||
frames = cls.td_frames;
|
||||
time = realtime - cls.td_starttime;
|
||||
totalfpsavg = time > 0 ? frames / time : 0;
|
||||
fpsmin = cls.td_onesecondminfps;
|
||||
fpsavg = cls.td_onesecondavgcount ? cls.td_onesecondavgfps / cls.td_onesecondavgcount : 0;
|
||||
fpsmax = cls.td_onesecondmaxfps;
|
||||
// LordHavoc: timedemo now prints out 7 digits of fraction, and min/avg/max
|
||||
Con_Printf("%i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
|
||||
Log_Printf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | run %d | result %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), buildstring, cls.demoname, cmdline.string, benchmark_runs + 1, frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
|
||||
if (COM_CheckParm("-benchmark"))
|
||||
{
|
||||
++benchmark_runs;
|
||||
i = COM_CheckParm("-benchmarkruns");
|
||||
if(i && i + 1 < com_argc)
|
||||
{
|
||||
static benchmarkhistory_t *history = NULL;
|
||||
if(!history)
|
||||
history = (benchmarkhistory_t *)Z_Malloc(sizeof(*history) * atoi(com_argv[i + 1]));
|
||||
|
||||
history[benchmark_runs - 1].frames = frames;
|
||||
history[benchmark_runs - 1].time = time;
|
||||
history[benchmark_runs - 1].totalfpsavg = totalfpsavg;
|
||||
history[benchmark_runs - 1].fpsmin = fpsmin;
|
||||
history[benchmark_runs - 1].fpsavg = fpsavg;
|
||||
history[benchmark_runs - 1].fpsmax = fpsmax;
|
||||
|
||||
if(atoi(com_argv[i + 1]) > benchmark_runs)
|
||||
{
|
||||
// restart the benchmark
|
||||
Cbuf_AddText(va(vabuf, sizeof(vabuf), "timedemo %s\n", cls.demoname));
|
||||
// cannot execute here
|
||||
}
|
||||
else
|
||||
{
|
||||
// print statistics
|
||||
int first = COM_CheckParm("-benchmarkruns_skipfirst") ? 1 : 0;
|
||||
if(benchmark_runs > first)
|
||||
{
|
||||
#define DO_MIN(f) \
|
||||
for(i = first; i < benchmark_runs; ++i) if((i == first) || (history[i].f < f)) f = history[i].f
|
||||
|
||||
#define DO_MAX(f) \
|
||||
for(i = first; i < benchmark_runs; ++i) if((i == first) || (history[i].f > f)) f = history[i].f
|
||||
|
||||
#define DO_MED(f) \
|
||||
doublecmp_offset = (char *)&history->f - (char *)history; \
|
||||
qsort(history + first, benchmark_runs - first, sizeof(*history), doublecmp_withoffset); \
|
||||
if((first + benchmark_runs) & 1) \
|
||||
f = history[(first + benchmark_runs - 1) / 2].f; \
|
||||
else \
|
||||
f = (history[(first + benchmark_runs - 2) / 2].f + history[(first + benchmark_runs) / 2].f) / 2
|
||||
|
||||
DO_MIN(frames);
|
||||
DO_MAX(time);
|
||||
DO_MIN(totalfpsavg);
|
||||
DO_MIN(fpsmin);
|
||||
DO_MIN(fpsavg);
|
||||
DO_MIN(fpsmax);
|
||||
Con_Printf("MIN: %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
|
||||
|
||||
DO_MED(frames);
|
||||
DO_MED(time);
|
||||
DO_MED(totalfpsavg);
|
||||
DO_MED(fpsmin);
|
||||
DO_MED(fpsavg);
|
||||
DO_MED(fpsmax);
|
||||
Con_Printf("MED: %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
|
||||
|
||||
DO_MAX(frames);
|
||||
DO_MIN(time);
|
||||
DO_MAX(totalfpsavg);
|
||||
DO_MAX(fpsmin);
|
||||
DO_MAX(fpsavg);
|
||||
DO_MAX(fpsmax);
|
||||
Con_Printf("MAX: %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
|
||||
}
|
||||
Z_Free(history);
|
||||
history = NULL;
|
||||
Host_Quit_f();
|
||||
}
|
||||
}
|
||||
else
|
||||
Host_Quit_f();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
CL_TimeDemo_f
|
||||
|
||||
timedemo [demoname]
|
||||
====================
|
||||
*/
|
||||
void CL_TimeDemo_f (void)
|
||||
{
|
||||
if (Cmd_Argc() != 2)
|
||||
{
|
||||
Con_Print("timedemo <demoname> : gets demo speeds\n");
|
||||
return;
|
||||
}
|
||||
|
||||
srand(0); // predictable random sequence for benchmarking
|
||||
|
||||
CL_PlayDemo_f ();
|
||||
|
||||
// cls.td_starttime will be grabbed at the second frame of the demo, so
|
||||
// all the loading time doesn't get counted
|
||||
|
||||
// instantly hide console and deactivate it
|
||||
key_dest = key_game;
|
||||
key_consoleactive = 0;
|
||||
scr_con_current = 0;
|
||||
|
||||
cls.timedemo = true;
|
||||
cls.td_frames = -2; // skip the first frame
|
||||
cls.demonum = -1; // stop demo loop
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
// Andreas Kirsch 07
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "cl_dyntexture.h"
|
||||
|
||||
typedef struct dyntexture_s {
|
||||
// everything after DYNAMIC_TEXTURE_PATH_PREFIX
|
||||
char name[ MAX_QPATH + 32 ];
|
||||
// texture pointer (points to r_texture_white at first)
|
||||
rtexture_t *texture;
|
||||
} dyntexture_t;
|
||||
|
||||
static dyntexture_t dyntextures[ MAX_DYNAMIC_TEXTURE_COUNT ];
|
||||
static unsigned dyntexturecount;
|
||||
|
||||
#define DEFAULT_DYNTEXTURE r_texture_grey128
|
||||
|
||||
static dyntexture_t * cl_finddyntexture( const char *name, qboolean warnonfailure ) {
|
||||
unsigned i;
|
||||
dyntexture_t *dyntexture = NULL;
|
||||
|
||||
// sanity checks - make sure its actually a dynamic texture path
|
||||
if( !name || !*name || strncmp( name, CLDYNTEXTUREPREFIX, sizeof( CLDYNTEXTUREPREFIX ) - 1 ) != 0 ) {
|
||||
// TODO: print a warning or something
|
||||
if (warnonfailure)
|
||||
Con_Printf( "cl_finddyntexture: Bad dynamic texture name '%s'\n", name );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for( i = 0 ; i < dyntexturecount ; i++ ) {
|
||||
dyntexture = &dyntextures[ i ];
|
||||
if( dyntexture->name && strcmp( dyntexture->name, name ) == 0 ) {
|
||||
return dyntexture;
|
||||
}
|
||||
}
|
||||
|
||||
if( dyntexturecount == MAX_DYNAMIC_TEXTURE_COUNT ) {
|
||||
// TODO: warn or expand the array, etc.
|
||||
return NULL;
|
||||
}
|
||||
dyntexture = &dyntextures[ dyntexturecount++ ];
|
||||
strlcpy( dyntexture->name, name, sizeof( dyntexture->name ) );
|
||||
dyntexture->texture = DEFAULT_DYNTEXTURE;
|
||||
return dyntexture;
|
||||
}
|
||||
|
||||
rtexture_t * CL_GetDynTexture( const char *name ) {
|
||||
dyntexture_t *dyntexture = cl_finddyntexture( name, false );
|
||||
if( dyntexture ) {
|
||||
return dyntexture->texture;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void CL_LinkDynTexture( const char *name, rtexture_t *texture ) {
|
||||
dyntexture_t *dyntexture;
|
||||
cachepic_t *cachepic;
|
||||
skinframe_t *skinframe;
|
||||
|
||||
dyntexture = cl_finddyntexture( name, true );
|
||||
if( !dyntexture ) {
|
||||
Con_Printf( "CL_LinkDynTexture: internal error in cl_finddyntexture!\n" );
|
||||
return;
|
||||
}
|
||||
// TODO: assert dyntexture != NULL!
|
||||
if( dyntexture->texture != texture ) {
|
||||
dyntexture->texture = texture;
|
||||
|
||||
cachepic = Draw_CachePic_Flags( name, CACHEPICFLAG_NOTPERSISTENT );
|
||||
// TODO: assert cachepic and skinframe should be valid pointers...
|
||||
// TODO: assert cachepic->tex = dyntexture->texture
|
||||
cachepic->tex = texture;
|
||||
// update cachepic's size, too
|
||||
cachepic->width = R_TextureWidth( texture );
|
||||
cachepic->height = R_TextureHeight( texture );
|
||||
|
||||
// update skinframes
|
||||
skinframe = NULL;
|
||||
while( (skinframe = R_SkinFrame_FindNextByName( skinframe, name )) != NULL ) {
|
||||
skinframe->base = texture;
|
||||
// simply reset the compare* attributes of skinframe
|
||||
skinframe->comparecrc = 0;
|
||||
skinframe->comparewidth = skinframe->compareheight = 0;
|
||||
// this is kind of hacky
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CL_UnlinkDynTexture( const char *name ) {
|
||||
CL_LinkDynTexture( name, DEFAULT_DYNTEXTURE );
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
// Andreas 'Black' Kirsch 07
|
||||
#ifndef CL_DYNTEXTURE_H
|
||||
#define CL_DYNTEXTURE_H
|
||||
|
||||
#define CLDYNTEXTUREPREFIX "_dynamic/"
|
||||
|
||||
// always path fully specified names to the dynamic texture functions! (ie. with the _dynamic/ prefix, etc.!)
|
||||
|
||||
// return a valid texture handle for a dynamic texture (might be filler texture if it hasnt been initialized yet)
|
||||
// or NULL if its not a valid dynamic texture name
|
||||
rtexture_t * CL_GetDynTexture( const char *name );
|
||||
|
||||
// link a texture handle as dynamic texture and update texture handles in the renderer and draw_* accordingly
|
||||
void CL_LinkDynTexture( const char *name, rtexture_t *texture );
|
||||
|
||||
// unlink a texture handle from its name
|
||||
void CL_UnlinkDynTexture( const char *name );
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
#ifndef CL_SCREEN_H
|
||||
#define CL_SCREEN_H
|
||||
|
||||
void SHOWLMP_decodehide(void);
|
||||
void SHOWLMP_decodeshow(void);
|
||||
void SHOWLMP_drawall(void);
|
||||
|
||||
extern cvar_t vid_conwidth;
|
||||
extern cvar_t vid_conheight;
|
||||
extern cvar_t vid_pixelheight;
|
||||
extern cvar_t scr_screenshot_jpeg;
|
||||
extern cvar_t scr_screenshot_jpeg_quality;
|
||||
extern cvar_t scr_screenshot_png;
|
||||
extern cvar_t scr_screenshot_gammaboost;
|
||||
extern cvar_t scr_screenshot_name;
|
||||
|
||||
void CL_Screen_NewMap(void);
|
||||
void CL_Screen_Init(void);
|
||||
void CL_Screen_Shutdown(void);
|
||||
void CL_UpdateScreen(void);
|
||||
|
||||
qboolean R_Stereo_Active(void);
|
||||
qboolean R_Stereo_ColorMasking(void);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,743 @@
|
|||
|
||||
#include "quakedef.h"
|
||||
#include "cl_dyntexture.h"
|
||||
#include "cl_video.h"
|
||||
|
||||
// cvars
|
||||
cvar_t cl_video_subtitles = {CVAR_SAVE, "cl_video_subtitles", "0", "show subtitles for videos (if they are present)"};
|
||||
cvar_t cl_video_subtitles_lines = {CVAR_SAVE, "cl_video_subtitles_lines", "4", "how many lines to occupy for subtitles"};
|
||||
cvar_t cl_video_subtitles_textsize = {CVAR_SAVE, "cl_video_subtitles_textsize", "16", "textsize for subtitles"};
|
||||
cvar_t cl_video_scale = {CVAR_SAVE, "cl_video_scale", "1", "scale of video, 1 = fullscreen, 0.75 - 3/4 of screen etc."};
|
||||
cvar_t cl_video_scale_vpos = {CVAR_SAVE, "cl_video_scale_vpos", "0", "vertical align of scaled video, -1 is top, 1 is bottom"};
|
||||
cvar_t cl_video_stipple = {CVAR_SAVE, "cl_video_stipple", "0", "draw interlacing-like effect on videos, similar to scr_stipple but static and used only with video playing."};
|
||||
cvar_t cl_video_brightness = {CVAR_SAVE, "cl_video_brightness", "1", "brightness of video, 1 = fullbright, 0.75 - 3/4 etc."};
|
||||
cvar_t cl_video_keepaspectratio = {CVAR_SAVE, "cl_video_keepaspectratio", "0", "keeps aspect ratio of fullscreen videos, leaving black color on unfilled areas, a value of 2 let video to be stretched horizontally with top & bottom being sliced out"};
|
||||
cvar_t cl_video_fadein = {CVAR_SAVE, "cl_video_fadein", "0", "fading-from-black effect once video is started, in seconds"};
|
||||
cvar_t cl_video_fadeout = {CVAR_SAVE, "cl_video_fadeout", "0", "fading-to-black effect once video is ended, in seconds"};
|
||||
|
||||
cvar_t v_glslgamma_video = {CVAR_SAVE, "v_glslgamma_video", "1", "applies GLSL gamma to played video, could be a fraction, requires r_glslgamma_2d 1."};
|
||||
|
||||
// DPV stream decoder
|
||||
#include "dpvsimpledecode.h"
|
||||
|
||||
// VorteX: libavcodec implementation
|
||||
#include "cl_video_libavw.c"
|
||||
|
||||
// JAM video decoder used by Blood Omnicide
|
||||
#ifdef JAMVIDEO
|
||||
#include "cl_video_jamdecode.c"
|
||||
#endif
|
||||
|
||||
// constants (and semi-constants)
|
||||
static int cl_videormask;
|
||||
static int cl_videobmask;
|
||||
static int cl_videogmask;
|
||||
static int cl_videobytesperpixel;
|
||||
|
||||
static int cl_num_videos;
|
||||
static clvideo_t cl_videos[ MAXCLVIDEOS ];
|
||||
static rtexturepool_t *cl_videotexturepool;
|
||||
|
||||
static clvideo_t *FindUnusedVid( void )
|
||||
{
|
||||
int i;
|
||||
for( i = 1 ; i < MAXCLVIDEOS ; i++ )
|
||||
if( cl_videos[ i ].state == CLVIDEO_UNUSED )
|
||||
return &cl_videos[ i ];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static qboolean OpenStream( clvideo_t * video )
|
||||
{
|
||||
const char *errorstring;
|
||||
|
||||
video->stream = dpvsimpledecode_open( video, video->filename, &errorstring);
|
||||
if (video->stream)
|
||||
return true;
|
||||
|
||||
#ifdef JAMVIDEO
|
||||
video->stream = jam_open( video, video->filename, &errorstring);
|
||||
if (video->stream)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
video->stream = LibAvW_OpenVideo( video, video->filename, &errorstring);
|
||||
if (video->stream)
|
||||
return true;
|
||||
|
||||
Con_Printf("unable to open \"%s\", error: %s\n", video->filename, errorstring);
|
||||
return false;
|
||||
}
|
||||
|
||||
static void VideoUpdateCallback(rtexture_t *rt, void *data)
|
||||
{
|
||||
clvideo_t *video = (clvideo_t *) data;
|
||||
R_UpdateTexture( video->cpif.tex, (unsigned char *)video->imagedata, 0, 0, 0, video->cpif.width, video->cpif.height, 1 );
|
||||
}
|
||||
|
||||
static void LinkVideoTexture( clvideo_t *video )
|
||||
{
|
||||
video->cpif.tex = R_LoadTexture2D( cl_videotexturepool, video->cpif.name, video->cpif.width, video->cpif.height, NULL, TEXTYPE_BGRA, TEXF_PERSISTENT | TEXF_CLAMP, -1, NULL );
|
||||
R_MakeTextureDynamic( video->cpif.tex, VideoUpdateCallback, video );
|
||||
CL_LinkDynTexture( video->cpif.name, video->cpif.tex );
|
||||
}
|
||||
|
||||
static void UnlinkVideoTexture( clvideo_t *video )
|
||||
{
|
||||
CL_UnlinkDynTexture( video->cpif.name );
|
||||
// free the texture
|
||||
R_FreeTexture( video->cpif.tex );
|
||||
video->cpif.tex = NULL;
|
||||
// free the image data
|
||||
Mem_Free( video->imagedata );
|
||||
}
|
||||
|
||||
static void SuspendVideo( clvideo_t * video )
|
||||
{
|
||||
if (video->suspended)
|
||||
return;
|
||||
video->suspended = true;
|
||||
UnlinkVideoTexture(video);
|
||||
// if we are in firstframe mode, also close the stream
|
||||
if (video->state == CLVIDEO_FIRSTFRAME)
|
||||
{
|
||||
if (video->stream)
|
||||
video->close(video->stream);
|
||||
video->stream = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static qboolean WakeVideo( clvideo_t * video )
|
||||
{
|
||||
if( !video->suspended )
|
||||
return true;
|
||||
video->suspended = false;
|
||||
|
||||
if( video->state == CLVIDEO_FIRSTFRAME )
|
||||
if( !OpenStream( video ) ) {
|
||||
video->state = CLVIDEO_UNUSED;
|
||||
return false;
|
||||
}
|
||||
|
||||
video->imagedata = Mem_Alloc( cls.permanentmempool, video->cpif.width * video->cpif.height * cl_videobytesperpixel );
|
||||
LinkVideoTexture( video );
|
||||
|
||||
// update starttime
|
||||
video->starttime += realtime - video->lasttime;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void LoadSubtitles( clvideo_t *video, const char *subtitlesfile )
|
||||
{
|
||||
char *subtitle_text;
|
||||
const char *data;
|
||||
float subtime, sublen;
|
||||
int numsubs = 0;
|
||||
|
||||
if (gamemode == GAME_BLOODOMNICIDE)
|
||||
{
|
||||
char overridename[MAX_QPATH];
|
||||
cvar_t *langcvar;
|
||||
|
||||
langcvar = Cvar_FindVar("language");
|
||||
subtitle_text = NULL;
|
||||
if (langcvar)
|
||||
{
|
||||
dpsnprintf(overridename, sizeof(overridename), "locale/%s/%s", langcvar->string, subtitlesfile);
|
||||
subtitle_text = (char *)FS_LoadFile(overridename, cls.permanentmempool, false, NULL);
|
||||
}
|
||||
if (!subtitle_text)
|
||||
subtitle_text = (char *)FS_LoadFile(subtitlesfile, cls.permanentmempool, false, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
subtitle_text = (char *)FS_LoadFile(subtitlesfile, cls.permanentmempool, false, NULL);
|
||||
}
|
||||
if (!subtitle_text)
|
||||
{
|
||||
Con_DPrintf( "LoadSubtitles: can't open subtitle file '%s'!\n", subtitlesfile );
|
||||
return;
|
||||
}
|
||||
|
||||
// parse subtitle_text
|
||||
// line is: x y "text" where
|
||||
// x - start time
|
||||
// y - seconds last (if 0 - last thru next sub, if negative - last to next sub - this amount of seconds)
|
||||
|
||||
data = subtitle_text;
|
||||
for (;;)
|
||||
{
|
||||
if (!COM_ParseToken_QuakeC(&data, false))
|
||||
break;
|
||||
subtime = atof( com_token );
|
||||
if (!COM_ParseToken_QuakeC(&data, false))
|
||||
break;
|
||||
sublen = atof( com_token );
|
||||
if (!COM_ParseToken_QuakeC(&data, false))
|
||||
break;
|
||||
if (!com_token[0])
|
||||
continue;
|
||||
// check limits
|
||||
if (video->subtitles == CLVIDEO_MAX_SUBTITLES)
|
||||
{
|
||||
Con_Printf("WARNING: CLVIDEO_MAX_SUBTITLES = %i reached when reading subtitles from '%s'\n", CLVIDEO_MAX_SUBTITLES, subtitlesfile);
|
||||
break;
|
||||
}
|
||||
// add a sub
|
||||
video->subtitle_text[numsubs] = (char *) Mem_Alloc(cls.permanentmempool, strlen(com_token) + 1);
|
||||
memcpy(video->subtitle_text[numsubs], com_token, strlen(com_token) + 1);
|
||||
video->subtitle_start[numsubs] = subtime;
|
||||
video->subtitle_end[numsubs] = sublen;
|
||||
if (numsubs > 0) // make true len for prev sub, autofix overlapping subtitles
|
||||
{
|
||||
if (video->subtitle_end[numsubs-1] <= 0)
|
||||
video->subtitle_end[numsubs-1] = max(video->subtitle_start[numsubs-1], video->subtitle_start[numsubs] + video->subtitle_end[numsubs-1]);
|
||||
else
|
||||
video->subtitle_end[numsubs-1] = min(video->subtitle_start[numsubs-1] + video->subtitle_end[numsubs-1], video->subtitle_start[numsubs]);
|
||||
}
|
||||
numsubs++;
|
||||
// todo: check timing for consistency?
|
||||
}
|
||||
if (numsubs > 0) // make true len for prev sub, autofix overlapping subtitles
|
||||
{
|
||||
if (video->subtitle_end[numsubs-1] <= 0)
|
||||
video->subtitle_end[numsubs-1] = 99999999; // fixme: make it end when video ends?
|
||||
else
|
||||
video->subtitle_end[numsubs-1] = video->subtitle_start[numsubs-1] + video->subtitle_end[numsubs-1];
|
||||
}
|
||||
Z_Free( subtitle_text );
|
||||
video->subtitles = numsubs;
|
||||
/*
|
||||
Con_Printf( "video->subtitles: %i\n", video->subtitles );
|
||||
for (numsubs = 0; numsubs < video->subtitles; numsubs++)
|
||||
Con_Printf( " %03.2f %03.2f : %s\n", video->subtitle_start[numsubs], video->subtitle_end[numsubs], video->subtitle_text[numsubs] );
|
||||
*/
|
||||
}
|
||||
|
||||
static clvideo_t* OpenVideo( clvideo_t *video, const char *filename, const char *name, int owner, const char *subtitlesfile )
|
||||
{
|
||||
strlcpy( video->filename, filename, sizeof(video->filename) );
|
||||
video->ownertag = owner;
|
||||
if( strncmp( name, CLVIDEOPREFIX, sizeof( CLVIDEOPREFIX ) - 1 ) )
|
||||
return NULL;
|
||||
strlcpy( video->cpif.name, name, sizeof(video->cpif.name) );
|
||||
|
||||
if( !OpenStream( video ) )
|
||||
return NULL;
|
||||
|
||||
video->state = CLVIDEO_FIRSTFRAME;
|
||||
video->framenum = -1;
|
||||
video->framerate = video->getframerate( video->stream );
|
||||
video->lasttime = realtime;
|
||||
video->subtitles = 0;
|
||||
|
||||
video->cpif.width = video->getwidth( video->stream );
|
||||
video->cpif.height = video->getheight( video->stream );
|
||||
video->imagedata = Mem_Alloc( cls.permanentmempool, video->cpif.width * video->cpif.height * cl_videobytesperpixel );
|
||||
LinkVideoTexture( video );
|
||||
|
||||
// VorteX: load simple subtitle_text file
|
||||
if (subtitlesfile[0])
|
||||
LoadSubtitles( video, subtitlesfile );
|
||||
|
||||
return video;
|
||||
}
|
||||
|
||||
clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner, const char *subtitlesfile )
|
||||
{
|
||||
clvideo_t *video;
|
||||
// sanity check
|
||||
if( !name || !*name || strncmp( name, CLVIDEOPREFIX, sizeof( CLVIDEOPREFIX ) - 1 ) != 0 ) {
|
||||
Con_DPrintf( "CL_OpenVideo: Bad video texture name '%s'!\n", name );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
video = FindUnusedVid();
|
||||
if( !video ) {
|
||||
Con_Printf( "CL_OpenVideo: unable to open video \"%s\" - video limit reached\n", filename );
|
||||
return NULL;
|
||||
}
|
||||
video = OpenVideo( video, filename, name, owner, subtitlesfile );
|
||||
// expand the active range to include the new entry
|
||||
if (video) {
|
||||
cl_num_videos = max(cl_num_videos, (int)(video - cl_videos) + 1);
|
||||
}
|
||||
return video;
|
||||
}
|
||||
|
||||
static clvideo_t* CL_GetVideoBySlot( int slot )
|
||||
{
|
||||
clvideo_t *video = &cl_videos[ slot ];
|
||||
|
||||
if( video->suspended )
|
||||
{
|
||||
if( !WakeVideo( video ) )
|
||||
return NULL;
|
||||
else if( video->state == CLVIDEO_RESETONWAKEUP )
|
||||
video->framenum = -1;
|
||||
}
|
||||
|
||||
video->lasttime = realtime;
|
||||
|
||||
return video;
|
||||
}
|
||||
|
||||
clvideo_t *CL_GetVideoByName( const char *name )
|
||||
{
|
||||
int i;
|
||||
|
||||
for( i = 0 ; i < cl_num_videos ; i++ )
|
||||
if( cl_videos[ i ].state != CLVIDEO_UNUSED
|
||||
&& !strcmp( cl_videos[ i ].cpif.name , name ) )
|
||||
break;
|
||||
if( i != cl_num_videos )
|
||||
return CL_GetVideoBySlot( i );
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CL_SetVideoState(clvideo_t *video, clvideostate_t state)
|
||||
{
|
||||
if (!video)
|
||||
return;
|
||||
|
||||
video->lasttime = realtime;
|
||||
video->state = state;
|
||||
if (state == CLVIDEO_FIRSTFRAME)
|
||||
CL_RestartVideo(video);
|
||||
}
|
||||
|
||||
void CL_RestartVideo(clvideo_t *video)
|
||||
{
|
||||
if (!video)
|
||||
return;
|
||||
|
||||
// reset time
|
||||
video->starttime = video->lasttime = realtime;
|
||||
video->framenum = -1;
|
||||
|
||||
// reopen stream
|
||||
if (video->stream)
|
||||
video->close(video->stream);
|
||||
video->stream = NULL;
|
||||
if (!OpenStream(video))
|
||||
video->state = CLVIDEO_UNUSED;
|
||||
}
|
||||
|
||||
// close video
|
||||
void CL_CloseVideo(clvideo_t * video)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!video || video->state == CLVIDEO_UNUSED)
|
||||
return;
|
||||
|
||||
// close stream
|
||||
if (!video->suspended || video->state != CLVIDEO_FIRSTFRAME)
|
||||
{
|
||||
if (video->stream)
|
||||
video->close(video->stream);
|
||||
video->stream = NULL;
|
||||
}
|
||||
// unlink texture
|
||||
if (!video->suspended)
|
||||
UnlinkVideoTexture(video);
|
||||
// purge subtitles
|
||||
if (video->subtitles)
|
||||
{
|
||||
for (i = 0; i < video->subtitles; i++)
|
||||
Z_Free( video->subtitle_text[i] );
|
||||
video->subtitles = 0;
|
||||
}
|
||||
video->state = CLVIDEO_UNUSED;
|
||||
}
|
||||
|
||||
// update all videos
|
||||
void CL_Video_Frame(void)
|
||||
{
|
||||
clvideo_t *video;
|
||||
int destframe;
|
||||
int i;
|
||||
|
||||
if (!cl_num_videos)
|
||||
return;
|
||||
for (video = cl_videos, i = 0 ; i < cl_num_videos ; video++, i++)
|
||||
{
|
||||
if (video->state != CLVIDEO_UNUSED && !video->suspended)
|
||||
{
|
||||
if (realtime - video->lasttime > CLTHRESHOLD)
|
||||
{
|
||||
SuspendVideo(video);
|
||||
continue;
|
||||
}
|
||||
if (video->state == CLVIDEO_PAUSE)
|
||||
{
|
||||
video->starttime = realtime - video->framenum * video->framerate;
|
||||
continue;
|
||||
}
|
||||
// read video frame from stream if time has come
|
||||
if (video->state == CLVIDEO_FIRSTFRAME )
|
||||
destframe = 0;
|
||||
else
|
||||
destframe = (int)((realtime - video->starttime) * video->framerate);
|
||||
if (destframe < 0)
|
||||
destframe = 0;
|
||||
if (video->framenum < destframe)
|
||||
{
|
||||
do {
|
||||
video->framenum++;
|
||||
if (video->decodeframe(video->stream, video->imagedata, cl_videormask, cl_videogmask, cl_videobmask, cl_videobytesperpixel, cl_videobytesperpixel * video->cpif.width))
|
||||
{
|
||||
// finished?
|
||||
CL_RestartVideo(video);
|
||||
if (video->state == CLVIDEO_PLAY)
|
||||
video->state = CLVIDEO_FIRSTFRAME;
|
||||
return;
|
||||
}
|
||||
} while(video->framenum < destframe);
|
||||
R_MarkDirtyTexture(video->cpif.tex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// stop main video
|
||||
if (cl_videos->state == CLVIDEO_FIRSTFRAME)
|
||||
CL_VideoStop();
|
||||
|
||||
// reduce range to exclude unnecessary entries
|
||||
while(cl_num_videos > 0 && cl_videos[cl_num_videos-1].state == CLVIDEO_UNUSED)
|
||||
cl_num_videos--;
|
||||
}
|
||||
|
||||
void CL_PurgeOwner( int owner )
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0 ; i < cl_num_videos ; i++)
|
||||
if (cl_videos[i].ownertag == owner)
|
||||
CL_CloseVideo(&cl_videos[i]);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dp_font_t *font;
|
||||
float x;
|
||||
float y;
|
||||
float width;
|
||||
float height;
|
||||
float alignment; // 0 = left, 0.5 = center, 1 = right
|
||||
float fontsize;
|
||||
float textalpha;
|
||||
}
|
||||
cl_video_subtitle_info_t;
|
||||
|
||||
static float CL_DrawVideo_WordWidthFunc(void *passthrough, const char *w, size_t *length, float maxWidth)
|
||||
{
|
||||
cl_video_subtitle_info_t *si = (cl_video_subtitle_info_t *) passthrough;
|
||||
|
||||
if(w == NULL)
|
||||
return si->fontsize * si->font->maxwidth;
|
||||
if(maxWidth >= 0)
|
||||
return DrawQ_TextWidth_UntilWidth(w, length, si->fontsize, si->fontsize, false, si->font, -maxWidth); // -maxWidth: we want at least one char
|
||||
else if(maxWidth == -1)
|
||||
return DrawQ_TextWidth(w, *length, si->fontsize, si->fontsize, false, si->font);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int CL_DrawVideo_DisplaySubtitleLine(void *passthrough, const char *line, size_t length, float width, qboolean isContinuation)
|
||||
{
|
||||
cl_video_subtitle_info_t *si = (cl_video_subtitle_info_t *) passthrough;
|
||||
|
||||
int x = (int) (si->x + (si->width - width) * si->alignment);
|
||||
if (length > 0)
|
||||
DrawQ_String(x, si->y, line, length, si->fontsize, si->fontsize, 1.0, 1.0, 1.0, si->textalpha, 0, NULL, false, si->font);
|
||||
si->y += si->fontsize;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cl_videoplaying = false; // old, but still supported
|
||||
|
||||
void CL_DrawVideo(void)
|
||||
{
|
||||
clvideo_t *video;
|
||||
float videotime, px, py, sx, sy, st[8], b;
|
||||
cl_video_subtitle_info_t si;
|
||||
int i;
|
||||
|
||||
if (!cl_videoplaying)
|
||||
return;
|
||||
|
||||
video = CL_GetVideoBySlot( 0 );
|
||||
|
||||
// fix cvars
|
||||
if (cl_video_scale.value <= 0 || cl_video_scale.value > 1)
|
||||
Cvar_SetValueQuick( &cl_video_scale, 1);
|
||||
if (cl_video_brightness.value <= 0 || cl_video_brightness.value > 10)
|
||||
Cvar_SetValueQuick( &cl_video_brightness, 1);
|
||||
|
||||
// calc video proportions
|
||||
px = 0;
|
||||
py = 0;
|
||||
sx = vid_conwidth.integer;
|
||||
sy = vid_conheight.integer;
|
||||
st[0] = 0.0; st[1] = 0.0;
|
||||
st[2] = 1.0; st[3] = 0.0;
|
||||
st[4] = 0.0; st[5] = 1.0;
|
||||
st[6] = 1.0; st[7] = 1.0;
|
||||
if (cl_video_keepaspectratio.integer)
|
||||
{
|
||||
float a = video->getaspectratio(video->stream) / ((float)vid.width / (float)vid.height);
|
||||
if (cl_video_keepaspectratio.integer >= 2)
|
||||
{
|
||||
// clip instead of scale
|
||||
if (a < 1.0) // clip horizontally
|
||||
{
|
||||
st[1] = st[3] = (1 - a)*0.5;
|
||||
st[5] = st[7] = 1 - (1 - a)*0.5;
|
||||
}
|
||||
else if (a > 1.0) // clip vertically
|
||||
{
|
||||
st[0] = st[4] = (1 - 1/a)*0.5;
|
||||
st[2] = st[6] = (1/a)*0.5;
|
||||
}
|
||||
}
|
||||
else if (a < 1.0) // scale horizontally
|
||||
{
|
||||
px += sx * (1 - a) * 0.5;
|
||||
sx *= a;
|
||||
}
|
||||
else if (a > 1.0) // scale vertically
|
||||
{
|
||||
a = 1 / a;
|
||||
py += sy * (1 - a);
|
||||
sy *= a;
|
||||
}
|
||||
}
|
||||
|
||||
if (cl_video_scale.value != 1)
|
||||
{
|
||||
px += sx * (1 - cl_video_scale.value) * 0.5;
|
||||
py += sy * (1 - cl_video_scale.value) * ((bound(-1, cl_video_scale_vpos.value, 1) + 1) / 2);
|
||||
sx *= cl_video_scale.value;
|
||||
sy *= cl_video_scale.value;
|
||||
}
|
||||
|
||||
// calc brightness for fadein and fadeout effects
|
||||
b = cl_video_brightness.value;
|
||||
if (cl_video_fadein.value && (realtime - video->starttime) < cl_video_fadein.value)
|
||||
b = pow((realtime - video->starttime)/cl_video_fadein.value, 2);
|
||||
else if (cl_video_fadeout.value && ((video->starttime + video->framenum * video->framerate) - realtime) < cl_video_fadeout.value)
|
||||
b = pow(((video->starttime + video->framenum * video->framerate) - realtime)/cl_video_fadeout.value, 2);
|
||||
|
||||
// draw black bg in case stipple is active or video is scaled
|
||||
if (cl_video_stipple.integer || px != 0 || py != 0 || sx != vid_conwidth.integer || sy != vid_conheight.integer)
|
||||
DrawQ_Fill(0, 0, vid_conwidth.integer, vid_conheight.integer, 0, 0, 0, 1, 0);
|
||||
|
||||
#ifndef USE_GLES2
|
||||
// enable video-only polygon stipple (of global stipple is not active)
|
||||
if (qglPolygonStipple && !scr_stipple.integer && cl_video_stipple.integer)
|
||||
{
|
||||
GLubyte stipple[128];
|
||||
int i, s, width, parts;
|
||||
|
||||
s = cl_video_stipple.integer;
|
||||
parts = (s & 007);
|
||||
width = (s & 070) >> 3;
|
||||
qglEnable(GL_POLYGON_STIPPLE);CHECKGLERROR // 0x0B42
|
||||
for(i = 0; i < 128; ++i)
|
||||
{
|
||||
int line = i/4;
|
||||
stipple[i] = ((line >> width) & ((1 << parts) - 1)) ? 0x00 : 0xFF;
|
||||
}
|
||||
qglPolygonStipple(stipple);CHECKGLERROR
|
||||
}
|
||||
#endif
|
||||
|
||||
// draw video
|
||||
if (v_glslgamma_video.value >= 1)
|
||||
DrawQ_SuperPic(px, py, &video->cpif, sx, sy, st[0], st[1], b, b, b, 1, st[2], st[3], b, b, b, 1, st[4], st[5], b, b, b, 1, st[6], st[7], b, b, b, 1, 0);
|
||||
else
|
||||
{
|
||||
DrawQ_SuperPic(px, py, &video->cpif, sx, sy, st[0], st[1], b, b, b, 1, st[2], st[3], b, b, b, 1, st[4], st[5], b, b, b, 1, st[6], st[7], b, b, b, 1, DRAWFLAG_NOGAMMA);
|
||||
if (v_glslgamma_video.value > 0.0)
|
||||
DrawQ_SuperPic(px, py, &video->cpif, sx, sy, st[0], st[1], b, b, b, v_glslgamma_video.value, st[2], st[3], b, b, b, v_glslgamma_video.value, st[4], st[5], b, b, b, v_glslgamma_video.value, st[6], st[7], b, b, b, v_glslgamma_video.value, 0);
|
||||
}
|
||||
|
||||
#ifndef USE_GLES2
|
||||
// disable video-only stipple
|
||||
if (qglPolygonStipple && !scr_stipple.integer && cl_video_stipple.integer)
|
||||
qglDisable(GL_POLYGON_STIPPLE);CHECKGLERROR
|
||||
#endif
|
||||
|
||||
// VorteX: draw subtitle_text
|
||||
if (!video->subtitles || !cl_video_subtitles.integer)
|
||||
return;
|
||||
|
||||
// find current subtitle
|
||||
videotime = realtime - video->starttime;
|
||||
for (i = 0; i < video->subtitles; i++)
|
||||
{
|
||||
if (videotime >= video->subtitle_start[i] && videotime <= video->subtitle_end[i])
|
||||
{
|
||||
// found, draw it
|
||||
si.font = FONT_NOTIFY;
|
||||
si.x = vid_conwidth.integer * 0.1;
|
||||
si.y = vid_conheight.integer - (max(1, cl_video_subtitles_lines.value) * cl_video_subtitles_textsize.value);
|
||||
si.width = vid_conwidth.integer * 0.8;
|
||||
si.height = max(1, cl_video_subtitles_lines.integer) * cl_video_subtitles_textsize.value;
|
||||
si.alignment = 0.5;
|
||||
si.fontsize = cl_video_subtitles_textsize.value;
|
||||
si.textalpha = min(1, (videotime - video->subtitle_start[i])/0.5) * min(1, ((video->subtitle_end[i] - videotime)/0.3)); // fade in and fade out
|
||||
COM_Wordwrap(video->subtitle_text[i], strlen(video->subtitle_text[i]), 0, si.width, CL_DrawVideo_WordWidthFunc, &si, CL_DrawVideo_DisplaySubtitleLine, &si);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CL_VideoStart(char *filename, const char *subtitlesfile)
|
||||
{
|
||||
char vabuf[1024];
|
||||
Host_StartVideo();
|
||||
|
||||
if( cl_videos->state != CLVIDEO_UNUSED )
|
||||
CL_CloseVideo( cl_videos );
|
||||
// already contains video/
|
||||
if( !OpenVideo( cl_videos, filename, va(vabuf, sizeof(vabuf), CLDYNTEXTUREPREFIX "%s", filename ), 0, subtitlesfile ) )
|
||||
return;
|
||||
// expand the active range to include the new entry
|
||||
cl_num_videos = max(cl_num_videos, 1);
|
||||
|
||||
cl_videoplaying = true;
|
||||
|
||||
CL_SetVideoState( cl_videos, CLVIDEO_PLAY );
|
||||
CL_RestartVideo( cl_videos );
|
||||
}
|
||||
|
||||
void CL_Video_KeyEvent( int key, int ascii, qboolean down )
|
||||
{
|
||||
// only react to up events, to allow the user to delay the abortion point if it suddenly becomes interesting..
|
||||
if( !down ) {
|
||||
if( key == K_ESCAPE || key == K_ENTER || key == K_SPACE ) {
|
||||
CL_VideoStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CL_VideoStop(void)
|
||||
{
|
||||
cl_videoplaying = false;
|
||||
|
||||
CL_CloseVideo( cl_videos );
|
||||
}
|
||||
|
||||
static void CL_PlayVideo_f(void)
|
||||
{
|
||||
char name[MAX_QPATH], subtitlesfile[MAX_QPATH];
|
||||
const char *extension;
|
||||
|
||||
Host_StartVideo();
|
||||
|
||||
if (COM_CheckParm("-benchmark"))
|
||||
return;
|
||||
|
||||
if (Cmd_Argc() < 2)
|
||||
{
|
||||
Con_Print("usage: playvideo <videoname> [custom_subtitles_file]\nplays video named video/<videoname>.dpv\nif custom subtitles file is not presented\nit tries video/<videoname>.sub");
|
||||
return;
|
||||
}
|
||||
|
||||
extension = FS_FileExtension(Cmd_Argv(1));
|
||||
if (extension[0])
|
||||
dpsnprintf(name, sizeof(name), "video/%s", Cmd_Argv(1));
|
||||
else
|
||||
dpsnprintf(name, sizeof(name), "video/%s.dpv", Cmd_Argv(1));
|
||||
if ( Cmd_Argc() > 2)
|
||||
CL_VideoStart(name, Cmd_Argv(2));
|
||||
else
|
||||
{
|
||||
dpsnprintf(subtitlesfile, sizeof(subtitlesfile), "video/%s.dpsubs", Cmd_Argv(1));
|
||||
CL_VideoStart(name, subtitlesfile);
|
||||
}
|
||||
}
|
||||
|
||||
static void CL_StopVideo_f(void)
|
||||
{
|
||||
CL_VideoStop();
|
||||
}
|
||||
|
||||
static void cl_video_start( void )
|
||||
{
|
||||
int i;
|
||||
clvideo_t *video;
|
||||
|
||||
cl_videotexturepool = R_AllocTexturePool();
|
||||
|
||||
for( video = cl_videos, i = 0 ; i < cl_num_videos ; i++, video++ )
|
||||
if( video->state != CLVIDEO_UNUSED && !video->suspended )
|
||||
LinkVideoTexture( video );
|
||||
}
|
||||
|
||||
static void cl_video_shutdown( void )
|
||||
{
|
||||
int i;
|
||||
clvideo_t *video;
|
||||
|
||||
for( video = cl_videos, i = 0 ; i < cl_num_videos ; i++, video++ )
|
||||
if( video->state != CLVIDEO_UNUSED && !video->suspended )
|
||||
SuspendVideo( video );
|
||||
R_FreeTexturePool( &cl_videotexturepool );
|
||||
}
|
||||
|
||||
static void cl_video_newmap( void )
|
||||
{
|
||||
}
|
||||
|
||||
void CL_Video_Init( void )
|
||||
{
|
||||
union
|
||||
{
|
||||
unsigned char b[4];
|
||||
unsigned int i;
|
||||
}
|
||||
bgra;
|
||||
|
||||
cl_num_videos = 0;
|
||||
cl_videobytesperpixel = 4;
|
||||
|
||||
// set masks in an endian-independent way (as they really represent bytes)
|
||||
bgra.i = 0;bgra.b[0] = 0xFF;cl_videobmask = bgra.i;
|
||||
bgra.i = 0;bgra.b[1] = 0xFF;cl_videogmask = bgra.i;
|
||||
bgra.i = 0;bgra.b[2] = 0xFF;cl_videormask = bgra.i;
|
||||
|
||||
Cmd_AddCommand( "playvideo", CL_PlayVideo_f, "play a .dpv video file" );
|
||||
Cmd_AddCommand( "stopvideo", CL_StopVideo_f, "stop playing a .dpv video file" );
|
||||
|
||||
Cvar_RegisterVariable(&cl_video_subtitles);
|
||||
Cvar_RegisterVariable(&cl_video_subtitles_lines);
|
||||
Cvar_RegisterVariable(&cl_video_subtitles_textsize);
|
||||
Cvar_RegisterVariable(&cl_video_scale);
|
||||
Cvar_RegisterVariable(&cl_video_scale_vpos);
|
||||
Cvar_RegisterVariable(&cl_video_brightness);
|
||||
Cvar_RegisterVariable(&cl_video_stipple);
|
||||
Cvar_RegisterVariable(&cl_video_keepaspectratio);
|
||||
Cvar_RegisterVariable(&cl_video_fadein);
|
||||
Cvar_RegisterVariable(&cl_video_fadeout);
|
||||
|
||||
Cvar_RegisterVariable(&v_glslgamma_video);
|
||||
|
||||
R_RegisterModule( "CL_Video", cl_video_start, cl_video_shutdown, cl_video_newmap, NULL, NULL );
|
||||
|
||||
LibAvW_OpenLibrary();
|
||||
}
|
||||
|
||||
void CL_Video_Shutdown( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0 ; i < cl_num_videos ; i++)
|
||||
CL_CloseVideo(&cl_videos[ i ]);
|
||||
|
||||
LibAvW_CloseLibrary();
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
#ifndef CL_VIDEO_H
|
||||
#define CL_VIDEO_H
|
||||
|
||||
#include "cl_dyntexture.h"
|
||||
|
||||
// yields DYNAMIC_TEXTURE_PATH_PREFIX CLVIDEOPREFIX video name for a path
|
||||
#define CLVIDEOPREFIX CLDYNTEXTUREPREFIX "video/"
|
||||
#define CLTHRESHOLD 2.0
|
||||
|
||||
#define MENUOWNER 1
|
||||
|
||||
typedef enum clvideostate_e
|
||||
{
|
||||
CLVIDEO_UNUSED,
|
||||
CLVIDEO_PLAY,
|
||||
CLVIDEO_LOOP,
|
||||
CLVIDEO_PAUSE,
|
||||
CLVIDEO_FIRSTFRAME,
|
||||
CLVIDEO_RESETONWAKEUP,
|
||||
CLVIDEO_STATECOUNT
|
||||
} clvideostate_t;
|
||||
|
||||
#define CLVIDEO_MAX_SUBTITLES 512
|
||||
|
||||
extern cvar_t cl_video_subtitles;
|
||||
extern cvar_t cl_video_subtitles_lines;
|
||||
extern cvar_t cl_video_subtitles_textsize;
|
||||
extern cvar_t cl_video_scale;
|
||||
extern cvar_t cl_video_scale_vpos;
|
||||
extern cvar_t cl_video_stipple;
|
||||
extern cvar_t cl_video_brightness;
|
||||
extern cvar_t cl_video_keepaspectratio;
|
||||
|
||||
typedef struct clvideo_s
|
||||
{
|
||||
int ownertag;
|
||||
clvideostate_t state;
|
||||
|
||||
// private stuff
|
||||
void *stream;
|
||||
|
||||
double starttime;
|
||||
int framenum;
|
||||
double framerate;
|
||||
|
||||
void *imagedata;
|
||||
|
||||
cachepic_t cpif;
|
||||
|
||||
// VorteX: subtitles array
|
||||
int subtitles;
|
||||
char *subtitle_text[CLVIDEO_MAX_SUBTITLES];
|
||||
float subtitle_start[CLVIDEO_MAX_SUBTITLES];
|
||||
float subtitle_end[CLVIDEO_MAX_SUBTITLES];
|
||||
|
||||
// this functions gets filled by video format module
|
||||
void (*close) (void *stream);
|
||||
unsigned int (*getwidth) (void *stream);
|
||||
unsigned int (*getheight) (void *stream);
|
||||
double (*getframerate) (void *stream);
|
||||
double (*getaspectratio) (void *stream);
|
||||
int (*decodeframe) (void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow);
|
||||
|
||||
// if a video is suspended, it is automatically paused (else we'd still have to process the frames)
|
||||
// used to determine whether the video's resources should be freed or not
|
||||
double lasttime;
|
||||
// when lasttime - realtime > THRESHOLD, all but the stream is freed
|
||||
qboolean suspended;
|
||||
|
||||
char filename[MAX_QPATH];
|
||||
} clvideo_t;
|
||||
|
||||
clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner, const char *subtitlesfile );
|
||||
clvideo_t* CL_GetVideoByName( const char *name );
|
||||
void CL_SetVideoState( clvideo_t *video, clvideostate_t state );
|
||||
void CL_RestartVideo( clvideo_t *video );
|
||||
|
||||
void CL_CloseVideo( clvideo_t * video );
|
||||
void CL_PurgeOwner( int owner );
|
||||
|
||||
void CL_Video_Frame( void ); // update all videos
|
||||
void CL_Video_Init( void );
|
||||
void CL_Video_Shutdown( void );
|
||||
|
||||
// old interface
|
||||
extern int cl_videoplaying;
|
||||
|
||||
void CL_DrawVideo( void );
|
||||
void CL_VideoStart( char *filename, const char *subtitlesfile );
|
||||
void CL_VideoStop( void );
|
||||
|
||||
// new function used for fullscreen videos
|
||||
// TODO: Andreas Kirsch: move this subsystem somewhere else (preferably host) since the cl_video system shouldnt do such work like managing key events..
|
||||
void CL_Video_KeyEvent( int key, int ascii, qboolean down );
|
||||
|
||||
#endif
|
|
@ -0,0 +1,378 @@
|
|||
// JAM format decoder, used by Blood Omnicide
|
||||
|
||||
#ifdef LIBAVCODEC
|
||||
//#define JAM_USELIBAVCODECSCALE
|
||||
#endif
|
||||
|
||||
typedef struct jamdecodestream_s
|
||||
{
|
||||
qfile_t *file;
|
||||
double info_framerate;
|
||||
unsigned int info_frames;
|
||||
unsigned int info_imagewidth;
|
||||
unsigned int info_imageheight;
|
||||
double info_aspectratio;
|
||||
float colorscale;
|
||||
unsigned char colorsub;
|
||||
|
||||
// info used during decoding
|
||||
unsigned char *frame;
|
||||
unsigned char *frame_prev;
|
||||
unsigned char frame_palette[768];
|
||||
unsigned char *frame_compressed;
|
||||
unsigned int framesize;
|
||||
unsigned int framenum;
|
||||
|
||||
// libavcodec scaling
|
||||
#ifdef JAM_USELIBAVCODECSCALE
|
||||
unsigned char *frame_output_buffer;
|
||||
AVFrame *frame_output;
|
||||
AVFrame *frame_output_scale;
|
||||
unsigned int framewidth;
|
||||
unsigned int frameheight;
|
||||
#endif
|
||||
|
||||
// channel the sound file is being played on
|
||||
int sndchan;
|
||||
}
|
||||
jamdecodestream_t;
|
||||
|
||||
// opens a stream
|
||||
void jam_close(void *stream);
|
||||
unsigned int jam_getwidth(void *stream);
|
||||
unsigned int jam_getheight(void *stream);
|
||||
double jam_getframerate(void *stream);
|
||||
double jam_getaspectratio(void *stream);
|
||||
int jam_video(void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow);
|
||||
void *jam_open(clvideo_t *video, char *filename, const char **errorstring)
|
||||
{
|
||||
char jamHead[16];
|
||||
jamdecodestream_t *s;
|
||||
char *wavename;
|
||||
|
||||
// allocate stream structure
|
||||
s = (jamdecodestream_t *)Z_Malloc(sizeof(jamdecodestream_t));
|
||||
memset(s, 0, sizeof(jamdecodestream_t));
|
||||
if (s == NULL)
|
||||
{
|
||||
*errorstring = "unable to allocate memory for stream info structure";
|
||||
return NULL;
|
||||
}
|
||||
s->sndchan = -1;
|
||||
|
||||
// open file
|
||||
s->file = FS_OpenVirtualFile(filename, true);
|
||||
if (!s->file)
|
||||
{
|
||||
*errorstring = "unable to open videofile";
|
||||
jam_close(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// read header
|
||||
if (!FS_Read(s->file, jamHead, 16))
|
||||
{
|
||||
*errorstring = "JamDecoder: unexpected EOF reading header";
|
||||
jam_close(s);
|
||||
return NULL;
|
||||
}
|
||||
if (memcmp(jamHead, "JAM", 4))
|
||||
{
|
||||
*errorstring = "JamDecoder: not a JAM file";
|
||||
jam_close(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s->info_imagewidth = LittleLong(*(jamHead + 4));
|
||||
s->info_imageheight = LittleLong(*(jamHead + 8));
|
||||
s->info_frames = LittleLong(*(jamHead + 12)) - 1;
|
||||
s->info_framerate = 15;
|
||||
s->info_aspectratio = (double)s->info_imagewidth / (double)s->info_imageheight;
|
||||
s->colorscale = 0.90;
|
||||
s->colorsub = 4;
|
||||
s->framesize = s->info_imagewidth * s->info_imageheight;
|
||||
|
||||
// allocate frame input/output
|
||||
if (s->framesize < 0)
|
||||
{
|
||||
*errorstring = "JamDecoder: bad framesize";
|
||||
jam_close(s);
|
||||
return NULL;
|
||||
}
|
||||
s->frame = (unsigned char *)Z_Malloc(s->framesize * 2);
|
||||
s->frame_prev = (unsigned char *)Z_Malloc(s->framesize * 2);
|
||||
s->frame_compressed = (unsigned char *)Z_Malloc(s->framesize);
|
||||
if (s->frame_compressed == NULL || s->frame == NULL || s->frame_prev == NULL)
|
||||
{
|
||||
*errorstring = "JamDecoder: unable to allocate memory for video decoder";
|
||||
jam_close(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// scale support provided by libavcodec
|
||||
#ifdef JAM_USELIBAVCODECSCALE
|
||||
s->framewidth = s->info_imagewidth;
|
||||
s->frameheight = s->info_imageheight;
|
||||
|
||||
// min size
|
||||
if (cl_video_libavcodec_minwidth.integer > 0)
|
||||
s->info_imagewidth = max(s->info_imagewidth, (unsigned int)cl_video_libavcodec_minwidth.integer);
|
||||
if (cl_video_libavcodec_minheight.integer > 0)
|
||||
s->info_imageheight = max(s->info_imageheight, (unsigned int)cl_video_libavcodec_minheight.integer);
|
||||
|
||||
// allocate output
|
||||
s->frame_output_buffer = (unsigned char *)Z_Malloc(s->framesize * 4);
|
||||
s->frame_output = AvCodec_AllocFrame();
|
||||
s->frame_output_scale = AvCodec_AllocFrame();
|
||||
if (!s->frame_output_buffer || !s->frame_output || !s->frame_output_scale)
|
||||
{
|
||||
*errorstring = "JamDecoder: failed to allocate LibAvcodec frame";
|
||||
jam_close(s);
|
||||
Z_Free(s);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
// everything is ok
|
||||
// set the module functions
|
||||
s->framenum = 0;
|
||||
video->close = jam_close;
|
||||
video->getwidth = jam_getwidth;
|
||||
video->getheight = jam_getheight;
|
||||
video->getframerate = jam_getframerate;
|
||||
video->decodeframe = jam_video;
|
||||
video->getaspectratio = jam_getaspectratio;
|
||||
|
||||
// set sound
|
||||
size_t namelen;
|
||||
namelen = strlen(filename) + 10;
|
||||
wavename = (char *)Z_Malloc(namelen);
|
||||
if (wavename)
|
||||
{
|
||||
sfx_t* sfx;
|
||||
FS_StripExtension(filename, wavename, namelen);
|
||||
strlcat(wavename, ".wav", namelen);
|
||||
sfx = S_PrecacheSound(wavename, false, false);
|
||||
if (sfx != NULL)
|
||||
s->sndchan = S_StartSound (-1, 0, sfx, vec3_origin, 1.0f, 0);
|
||||
else
|
||||
s->sndchan = -1;
|
||||
Z_Free(wavename);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
// closes a stream
|
||||
void jam_close(void *stream)
|
||||
{
|
||||
jamdecodestream_t *s = (jamdecodestream_t *)stream;
|
||||
if (s == NULL)
|
||||
return;
|
||||
if (s->frame_compressed)
|
||||
Z_Free(s->frame_compressed);
|
||||
s->frame_compressed = NULL;
|
||||
if (s->frame)
|
||||
Z_Free(s->frame);
|
||||
s->frame = NULL;
|
||||
if (s->frame_prev)
|
||||
Z_Free(s->frame_prev);
|
||||
s->frame_prev = NULL;
|
||||
if (s->sndchan != -1)
|
||||
S_StopChannel(s->sndchan, true, true);
|
||||
s->sndchan = -1;
|
||||
if (s->file)
|
||||
FS_Close(s->file);
|
||||
s->file = NULL;
|
||||
#ifdef JAM_USELIBAVCODECSCALE
|
||||
if (s->frame_output_buffer)
|
||||
Z_Free(s->frame_output_buffer);
|
||||
s->frame_output_buffer = NULL;
|
||||
if (s->frame_output)
|
||||
AvUtil_Free(s->frame_output);
|
||||
s->frame_output = NULL;
|
||||
if (s->frame_output_scale)
|
||||
AvUtil_Free(s->frame_output_scale);
|
||||
s->frame_output_scale = NULL;
|
||||
#endif
|
||||
Z_Free(s);
|
||||
}
|
||||
|
||||
// returns the width of the image data
|
||||
unsigned int jam_getwidth(void *stream)
|
||||
{
|
||||
jamdecodestream_t *s = (jamdecodestream_t *)stream;
|
||||
return s->info_imagewidth;
|
||||
}
|
||||
|
||||
// returns the height of the image data
|
||||
unsigned int jam_getheight(void *stream)
|
||||
{
|
||||
jamdecodestream_t *s = (jamdecodestream_t *)stream;
|
||||
return s->info_imageheight;
|
||||
}
|
||||
|
||||
// returns the framerate of the stream
|
||||
double jam_getframerate(void *stream)
|
||||
{
|
||||
jamdecodestream_t *s = (jamdecodestream_t *)stream;
|
||||
return s->info_framerate;
|
||||
}
|
||||
|
||||
// returns aspect ration of the stream
|
||||
double jam_getaspectratio(void *stream)
|
||||
{
|
||||
jamdecodestream_t *s = (jamdecodestream_t *)stream;
|
||||
return s->info_aspectratio;
|
||||
}
|
||||
|
||||
// decode JAM frame
|
||||
static void jam_decodeframe(unsigned char *inbuf, unsigned char *outbuf, unsigned char *prevbuf, int outsize, int frametype)
|
||||
{
|
||||
unsigned char *srcptr, *destptr, *prevptr;
|
||||
int bytesleft;
|
||||
unsigned int mark;
|
||||
unsigned short int bits;
|
||||
int rep;
|
||||
int backoffs;
|
||||
unsigned char *back;
|
||||
int i;
|
||||
|
||||
srcptr = inbuf;
|
||||
destptr = outbuf;
|
||||
prevptr = prevbuf;
|
||||
bytesleft = outsize;
|
||||
|
||||
if (frametype == 2)
|
||||
{
|
||||
memcpy(outbuf, inbuf, outsize);
|
||||
return;
|
||||
}
|
||||
while(bytesleft > 0)
|
||||
{
|
||||
memcpy(&mark, srcptr, 4);
|
||||
srcptr += 4;
|
||||
for(i=0; i<32 && bytesleft > 0; i++,mark=mark>>1)
|
||||
{
|
||||
if(mark & 1)
|
||||
{
|
||||
*destptr = *srcptr;
|
||||
destptr ++;
|
||||
prevptr ++;
|
||||
srcptr ++;
|
||||
bytesleft --;
|
||||
}
|
||||
else
|
||||
{
|
||||
bits = srcptr[0] + 256*srcptr[1];
|
||||
rep = (bits >> 11) + 3;
|
||||
if(frametype == 1)
|
||||
{
|
||||
backoffs = 0x821 - (bits & 0x7ff);
|
||||
back = destptr - backoffs;
|
||||
}
|
||||
else
|
||||
{
|
||||
backoffs = 0x400 - (bits & 0x7ff);
|
||||
back = prevptr - backoffs;
|
||||
}
|
||||
srcptr += 2;
|
||||
memcpy(destptr, back, rep);
|
||||
destptr += rep;
|
||||
prevptr += rep;
|
||||
bytesleft -= rep;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// decodes a video frame to the supplied output pixels
|
||||
int jam_video(void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow)
|
||||
{
|
||||
unsigned char frameHead[16], *b;
|
||||
unsigned int compsize, outsize, i;
|
||||
jamdecodestream_t *s = (jamdecodestream_t *)stream;
|
||||
|
||||
// EOF
|
||||
if (s->framenum >= s->info_frames)
|
||||
return 1;
|
||||
s->framenum++;
|
||||
|
||||
readframe:
|
||||
// read frame header
|
||||
if (!FS_Read(s->file, &frameHead, 16))
|
||||
{
|
||||
Con_Printf("JamDecoder: unexpected EOF on frame %i\n", s->framenum);
|
||||
return 1;
|
||||
}
|
||||
compsize = LittleLong(*(frameHead + 8)) - 16;
|
||||
outsize = LittleLong(*(frameHead + 12));
|
||||
if (compsize > s->framesize || outsize > s->framesize)
|
||||
{
|
||||
Con_Printf("JamDecoder: got bogus header on frame %i\n", s->framenum);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// read frame contents
|
||||
if (!FS_Read(s->file, s->frame_compressed, compsize))
|
||||
{
|
||||
Con_Printf("JamDecoder: unexpected EOF on frame %i\n", s->framenum);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// palette goes interleaved with special flag
|
||||
if (frameHead[0] == 2)
|
||||
{
|
||||
if (compsize == 768)
|
||||
{
|
||||
memcpy(s->frame_palette, s->frame_compressed, 768);
|
||||
for(i = 0; i < 768; i++)
|
||||
s->frame_palette[i] = (unsigned char)(bound(0, (s->frame_palette[i] * s->colorscale) - s->colorsub, 255));
|
||||
goto readframe;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// decode frame
|
||||
// shift buffers to provide current and previous one, decode
|
||||
b = s->frame_prev;
|
||||
s->frame_prev = s->frame;
|
||||
s->frame = b;
|
||||
jam_decodeframe(s->frame_compressed, s->frame, s->frame_prev, outsize, frameHead[4]);
|
||||
#ifdef JAM_USELIBAVCODECSCALE
|
||||
// make BGRA imagepixels from 8bit palettized frame
|
||||
b = (unsigned char *)s->frame_output_buffer;
|
||||
for(i = 0; i < s->framesize; i++)
|
||||
{
|
||||
*b++ = s->frame_palette[s->frame[i]*3 + 2];
|
||||
*b++ = s->frame_palette[s->frame[i]*3 + 1];
|
||||
*b++ = s->frame_palette[s->frame[i]*3];
|
||||
*b++ = 255;
|
||||
}
|
||||
// scale
|
||||
AvCodec_FillPicture((AVPicture *)s->frame_output, (uint8_t *)s->frame_output_buffer, PIX_FMT_BGRA, s->framewidth, s->frameheight);
|
||||
AvCodec_FillPicture((AVPicture *)s->frame_output_scale, (uint8_t *)imagedata, PIX_FMT_BGRA, s->info_imagewidth, s->info_imageheight);
|
||||
SwsContext *scale_context = SwScale_GetCachedContext(NULL, s->framewidth, s->frameheight, PIX_FMT_BGRA, s->info_imagewidth, s->info_imageheight, PIX_FMT_BGRA, libavcodec_scalers[max(0, min(LIBAVCODEC_SCALERS, cl_video_libavcodec_scaler.integer))], NULL, NULL, NULL);
|
||||
if (!scale_context)
|
||||
{
|
||||
Con_Printf("JamDecoder: LibAvcodec: error creating scale context frame %i\n", s->framenum);
|
||||
return 1;
|
||||
}
|
||||
if (!SwScale_Scale(scale_context, s->frame_output->data, s->frame_output->linesize, 0, s->frameheight, s->frame_output_scale->data, s->frame_output_scale->linesize))
|
||||
Con_Printf("JamDecoder: LibAvcodec : error scaling frame\n", s->framenum);
|
||||
SwScale_FreeContext(scale_context);
|
||||
#else
|
||||
// make BGRA imagepixels from 8bit palettized frame
|
||||
b = (unsigned char *)imagedata;
|
||||
for(i = 0; i < s->framesize; i++)
|
||||
{
|
||||
// bgra
|
||||
*b++ = s->frame_palette[s->frame[i]*3 + 2];
|
||||
*b++ = s->frame_palette[s->frame[i]*3 + 1];
|
||||
*b++ = s->frame_palette[s->frame[i]*3];
|
||||
*b++ = 255;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,386 @@
|
|||
/*
|
||||
Libavcodec integration for Darkplaces by Timofeyev Pavel
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
// LordHavoc: for some reason this is being #include'd rather than treated as its own file...
|
||||
// LordHavoc: adapted to not require stdint.h as this is not available on MSVC++, using unsigned char instead of uint8_t and fs_offset_t instead of int64_t.
|
||||
|
||||
// scaler type
|
||||
#define LIBAVW_SCALER_BILINEAR 0
|
||||
#define LIBAVW_SCALER_BICUBIC 1
|
||||
#define LIBAVW_SCALER_X 2
|
||||
#define LIBAVW_SCALER_POINT 3
|
||||
#define LIBAVW_SCALER_AREA 4
|
||||
#define LIBAVW_SCALER_BICUBLIN 5
|
||||
#define LIBAVW_SCALER_GAUSS 6
|
||||
#define LIBAVW_SCALER_SINC 7
|
||||
#define LIBAVW_SCALER_LANCZOS 8
|
||||
#define LIBAVW_SCALER_SPLINE 9
|
||||
// output format
|
||||
#define LIBAVW_PIXEL_FORMAT_BGR 0
|
||||
#define LIBAVW_PIXEL_FORMAT_BGRA 1
|
||||
// print levels
|
||||
#define LIBAVW_PRINT_WARNING 1
|
||||
#define LIBAVW_PRINT_ERROR 2
|
||||
#define LIBAVW_PRINT_FATAL 3
|
||||
#define LIBAVW_PRINT_PANIC 4
|
||||
// exported callback functions:
|
||||
typedef void avwCallbackPrint(int, const char *);
|
||||
typedef int avwCallbackIoRead(void *, unsigned char *, int);
|
||||
typedef fs_offset_t avwCallbackIoSeek(void *, fs_offset_t, int);
|
||||
typedef fs_offset_t avwCallbackIoSeekSize(void *);
|
||||
// exported functions:
|
||||
int (*qLibAvW_Init)(avwCallbackPrint *printfunction); // init library, returns error code
|
||||
const char *(*qLibAvW_ErrorString)(int errorcode); // get string for error code
|
||||
const char *(*qLibAvW_AvcVersion)(void); // get a string containing libavcodec version wrapper was built for
|
||||
float (*qLibAvW_Version)(void); // get wrapper version
|
||||
int (*qLibAvW_CreateStream)(void **stream); // create stream, returns error code
|
||||
void (*qLibAvW_RemoveStream)(void *stream); // flush and remove stream
|
||||
int (*qLibAvW_StreamGetVideoWidth)(void *stream); // get video parameters of stream
|
||||
int (*qLibAvW_StreamGetVideoHeight)(void *stream);
|
||||
double (*qLibAvW_StreamGetFramerate)(void *stream);
|
||||
int (*qLibAvW_StreamGetError)(void *stream); // get last function errorcode from stream
|
||||
// simple API to play video
|
||||
int (*qLibAvW_PlayVideo)(void *stream, void *file, avwCallbackIoRead *IoRead, avwCallbackIoSeek *IoSeek, avwCallbackIoSeekSize *IoSeekSize);
|
||||
int (*qLibAvW_PlaySeekNextFrame)(void *stream);
|
||||
int (*qLibAvW_PlayGetFrameImage)(void *stream, int pixel_format, void *imagedata, int imagewidth, int imageheight, int scaler);
|
||||
|
||||
static dllfunction_t libavwfuncs[] =
|
||||
{
|
||||
{"LibAvW_Init", (void **) &qLibAvW_Init },
|
||||
{"LibAvW_ErrorString", (void **) &qLibAvW_ErrorString },
|
||||
{"LibAvW_AvcVersion", (void **) &qLibAvW_AvcVersion },
|
||||
{"LibAvW_Version", (void **) &qLibAvW_Version },
|
||||
{"LibAvW_CreateStream", (void **) &qLibAvW_CreateStream },
|
||||
{"LibAvW_RemoveStream", (void **) &qLibAvW_RemoveStream },
|
||||
{"LibAvW_StreamGetVideoWidth", (void **) &qLibAvW_StreamGetVideoWidth },
|
||||
{"LibAvW_StreamGetVideoHeight",(void **) &qLibAvW_StreamGetVideoHeight },
|
||||
{"LibAvW_StreamGetFramerate", (void **) &qLibAvW_StreamGetFramerate },
|
||||
{"LibAvW_StreamGetError", (void **) &qLibAvW_StreamGetError },
|
||||
{"LibAvW_PlayVideo", (void **) &qLibAvW_PlayVideo },
|
||||
{"LibAvW_PlaySeekNextFrame", (void **) &qLibAvW_PlaySeekNextFrame },
|
||||
{"LibAvW_PlayGetFrameImage", (void **) &qLibAvW_PlayGetFrameImage },
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
const char* dllnames_libavw[] =
|
||||
{
|
||||
#if defined(WIN32)
|
||||
"libavw.dll",
|
||||
#elif defined(MACOSX)
|
||||
"libavw.dylib",
|
||||
#else
|
||||
"libavw.so.1",
|
||||
"libavw.so",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
static dllhandle_t libavw_dll = NULL;
|
||||
|
||||
// DP videostream
|
||||
typedef struct libavwstream_s
|
||||
{
|
||||
qfile_t *file;
|
||||
double info_framerate;
|
||||
unsigned int info_imagewidth;
|
||||
unsigned int info_imageheight;
|
||||
double info_aspectratio;
|
||||
void *stream;
|
||||
|
||||
// channel the sound file is being played on
|
||||
sfx_t *sfx;
|
||||
int sndchan;
|
||||
int sndstarted;
|
||||
}
|
||||
libavwstream_t;
|
||||
|
||||
cvar_t cl_video_libavw_minwidth = {CVAR_SAVE, "cl_video_libavw_minwidth", "0", "if videos width is lesser than minimal, thay will be upscaled"};
|
||||
cvar_t cl_video_libavw_minheight = {CVAR_SAVE, "cl_video_libavw_minheight", "0", "if videos height is lesser than minimal, thay will be upscaled"};
|
||||
cvar_t cl_video_libavw_scaler = {CVAR_SAVE, "cl_video_libavw_scaler", "1", "selects a scaler for libavcode played videos. Scalers are: 0 - bilinear, 1 - bicubic, 2 - x, 3 - point, 4 - area, 5 - bicublin, 6 - gauss, 7 - sinc, 8 - lanczos, 9 - spline."};
|
||||
|
||||
// video extensions
|
||||
const char* libavw_extensions[] =
|
||||
{
|
||||
"ogv",
|
||||
"avi",
|
||||
"mpg",
|
||||
"mp4",
|
||||
"mkv",
|
||||
"webm",
|
||||
"bik",
|
||||
"roq",
|
||||
"flv",
|
||||
"wmv",
|
||||
"mpeg",
|
||||
"mjpeg",
|
||||
"mpeg4",
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
=================================================================
|
||||
|
||||
Video decoding
|
||||
a features that is not supported yet and likely to be done
|
||||
- streaming audio from videofiles
|
||||
- streaming subtitles
|
||||
|
||||
=================================================================
|
||||
*/
|
||||
|
||||
unsigned int libavw_getwidth(void *stream);
|
||||
unsigned int libavw_getheight(void *stream);
|
||||
double libavw_getframerate(void *stream);
|
||||
double libavw_getaspectratio(void *stream);
|
||||
void libavw_close(void *stream);
|
||||
|
||||
static int libavw_decodeframe(void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow)
|
||||
{
|
||||
int pixel_format = LIBAVW_PIXEL_FORMAT_BGR;
|
||||
int errorcode;
|
||||
|
||||
libavwstream_t *s = (libavwstream_t *)stream;
|
||||
|
||||
// start sound
|
||||
if (!s->sndstarted)
|
||||
{
|
||||
if (s->sfx != NULL)
|
||||
s->sndchan = S_StartSound(-1, 0, s->sfx, vec3_origin, 1.0f, 0);
|
||||
s->sndstarted = 1;
|
||||
}
|
||||
|
||||
// read frame
|
||||
if (!qLibAvW_PlaySeekNextFrame(s->stream))
|
||||
{
|
||||
// got error or file end
|
||||
errorcode = qLibAvW_StreamGetError(s->stream);
|
||||
if (errorcode)
|
||||
Con_Printf("LibAvW: %s\n", qLibAvW_ErrorString(errorcode));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// decode into bgr texture
|
||||
if (bytesperpixel == 4)
|
||||
pixel_format = LIBAVW_PIXEL_FORMAT_BGRA;
|
||||
else if (bytesperpixel == 3)
|
||||
pixel_format = LIBAVW_PIXEL_FORMAT_BGR;
|
||||
else
|
||||
{
|
||||
Con_Printf("LibAvW: cannot determine pixel format for bpp %i\n", bytesperpixel);
|
||||
return 1;
|
||||
}
|
||||
if (!qLibAvW_PlayGetFrameImage(s->stream, pixel_format, imagedata, s->info_imagewidth, s->info_imageheight, min(9, max(0, cl_video_libavw_scaler.integer))))
|
||||
Con_Printf("LibAvW: %s\n", qLibAvW_ErrorString(qLibAvW_StreamGetError(s->stream)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// get stream info
|
||||
unsigned int libavw_getwidth(void *stream)
|
||||
{
|
||||
return ((libavwstream_t *)stream)->info_imagewidth;
|
||||
}
|
||||
|
||||
unsigned int libavw_getheight(void *stream)
|
||||
{
|
||||
return ((libavwstream_t *)stream)->info_imageheight;
|
||||
}
|
||||
|
||||
double libavw_getframerate(void *stream)
|
||||
{
|
||||
return ((libavwstream_t *)stream)->info_framerate;
|
||||
}
|
||||
|
||||
double libavw_getaspectratio(void *stream)
|
||||
{
|
||||
return ((libavwstream_t *)stream)->info_aspectratio;
|
||||
}
|
||||
|
||||
// close stream
|
||||
void libavw_close(void *stream)
|
||||
{
|
||||
libavwstream_t *s = (libavwstream_t *)stream;
|
||||
|
||||
if (s->stream)
|
||||
qLibAvW_RemoveStream(s->stream);
|
||||
s->stream = NULL;
|
||||
if (s->file)
|
||||
FS_Close(s->file);
|
||||
s->file = NULL;
|
||||
if (s->sndchan >= 0)
|
||||
S_StopChannel(s->sndchan, true, true);
|
||||
s->sndchan = -1;
|
||||
}
|
||||
|
||||
// IO wrapper
|
||||
static int LibAvW_FS_Read(void *opaque, unsigned char *buf, int buf_size)
|
||||
{
|
||||
return FS_Read((qfile_t *)opaque, buf, buf_size);
|
||||
}
|
||||
static fs_offset_t LibAvW_FS_Seek(void *opaque, fs_offset_t pos, int whence)
|
||||
{
|
||||
return (fs_offset_t)FS_Seek((qfile_t *)opaque, pos, whence);
|
||||
}
|
||||
static fs_offset_t LibAvW_FS_SeekSize(void *opaque)
|
||||
{
|
||||
return (fs_offset_t)FS_FileSize((qfile_t *)opaque);
|
||||
}
|
||||
|
||||
// open as DP video stream
|
||||
static void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring)
|
||||
{
|
||||
libavwstream_t *s;
|
||||
char filebase[MAX_OSPATH], check[MAX_OSPATH];
|
||||
unsigned int i;
|
||||
int errorcode;
|
||||
char *wavename;
|
||||
size_t len;
|
||||
|
||||
if (!libavw_dll)
|
||||
return NULL;
|
||||
|
||||
// allocate stream
|
||||
s = (libavwstream_t *)Z_Malloc(sizeof(libavwstream_t));
|
||||
if (s == NULL)
|
||||
{
|
||||
*errorstring = "unable to allocate memory for stream info structure";
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(libavwstream_t));
|
||||
s->sndchan = -1;
|
||||
|
||||
// open file
|
||||
s->file = FS_OpenVirtualFile(filename, true);
|
||||
if (!s->file)
|
||||
{
|
||||
FS_StripExtension(filename, filebase, sizeof(filebase));
|
||||
// we tried .dpv, try another extensions
|
||||
for (i = 0; libavw_extensions[i] != NULL; i++)
|
||||
{
|
||||
dpsnprintf(check, sizeof(check), "%s.%s", filebase, libavw_extensions[i]);
|
||||
s->file = FS_OpenVirtualFile(check, true);
|
||||
if (s->file)
|
||||
break;
|
||||
}
|
||||
if (!s->file)
|
||||
{
|
||||
*errorstring = "unable to open videofile";
|
||||
libavw_close(s);
|
||||
Z_Free(s);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// allocate libavw stream
|
||||
if ((errorcode = qLibAvW_CreateStream(&s->stream)))
|
||||
{
|
||||
*errorstring = qLibAvW_ErrorString(errorcode);
|
||||
libavw_close(s);
|
||||
Z_Free(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// open video for playing
|
||||
if (!qLibAvW_PlayVideo(s->stream, s->file, &LibAvW_FS_Read, &LibAvW_FS_Seek, &LibAvW_FS_SeekSize))
|
||||
{
|
||||
*errorstring = qLibAvW_ErrorString(qLibAvW_StreamGetError(s->stream));
|
||||
libavw_close(s);
|
||||
Z_Free(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// all right, start codec
|
||||
s->info_imagewidth = qLibAvW_StreamGetVideoWidth(s->stream);
|
||||
s->info_imageheight = qLibAvW_StreamGetVideoHeight(s->stream);
|
||||
s->info_framerate = qLibAvW_StreamGetFramerate(s->stream);
|
||||
s->info_aspectratio = (double)s->info_imagewidth / (double)s->info_imageheight;
|
||||
video->close = libavw_close;
|
||||
video->getwidth = libavw_getwidth;
|
||||
video->getheight = libavw_getheight;
|
||||
video->getframerate = libavw_getframerate;
|
||||
video->decodeframe = libavw_decodeframe;
|
||||
video->getaspectratio = libavw_getaspectratio;
|
||||
|
||||
// apply min-width, min-height, keep aspect rate
|
||||
if (cl_video_libavw_minwidth.integer > 0)
|
||||
s->info_imagewidth = max(s->info_imagewidth, (unsigned int)cl_video_libavw_minwidth.integer);
|
||||
if (cl_video_libavw_minheight.integer > 0)
|
||||
s->info_imageheight = max(s->info_imageheight, (unsigned int)cl_video_libavw_minheight.integer);
|
||||
|
||||
// provide sound in separate .wav
|
||||
len = strlen(filename) + 10;
|
||||
wavename = (char *)Z_Malloc(len);
|
||||
if (wavename)
|
||||
{
|
||||
FS_StripExtension(filename, wavename, len-1);
|
||||
strlcat(wavename, ".wav", len);
|
||||
s->sfx = S_PrecacheSound(wavename, false, false);
|
||||
s->sndchan = -1;
|
||||
Z_Free(wavename);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
static void libavw_message(int level, const char *message)
|
||||
{
|
||||
if (level == LIBAVW_PRINT_WARNING)
|
||||
Con_Printf("LibAvcodec warning: %s\n", message);
|
||||
else if (level == LIBAVW_PRINT_ERROR)
|
||||
Con_Printf("LibAvcodec error: %s\n", message);
|
||||
else if (level == LIBAVW_PRINT_FATAL)
|
||||
Con_Printf("LibAvcodec fatal error: %s\n", message);
|
||||
else
|
||||
Con_Printf("LibAvcodec panic: %s\n", message);
|
||||
}
|
||||
|
||||
static qboolean LibAvW_OpenLibrary(void)
|
||||
{
|
||||
int errorcode;
|
||||
|
||||
// COMMANDLINEOPTION: Video: -nolibavw disables libavcodec wrapper support
|
||||
if (COM_CheckParm("-nolibavw"))
|
||||
return false;
|
||||
|
||||
// load DLL's
|
||||
Sys_LoadLibrary(dllnames_libavw, &libavw_dll, libavwfuncs);
|
||||
if (!libavw_dll)
|
||||
return false;
|
||||
|
||||
// initialize libav wrapper
|
||||
if ((errorcode = qLibAvW_Init(&libavw_message)))
|
||||
{
|
||||
Con_Printf("LibAvW failed to initialize: %s\n", qLibAvW_ErrorString(errorcode));
|
||||
Sys_UnloadLibrary(&libavw_dll);
|
||||
}
|
||||
|
||||
Cvar_RegisterVariable(&cl_video_libavw_minwidth);
|
||||
Cvar_RegisterVariable(&cl_video_libavw_minheight);
|
||||
Cvar_RegisterVariable(&cl_video_libavw_scaler);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void LibAvW_CloseLibrary(void)
|
||||
{
|
||||
Sys_UnloadLibrary(&libavw_dll);
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
/* file generated by qcc, do not modify */
|
||||
|
||||
|
||||
#ifndef CLPROGDEFS_H
|
||||
#define CLPROGDEFS_H
|
||||
|
||||
/*
|
||||
typedef struct cl_globalvars_s
|
||||
{
|
||||
int pad[28];
|
||||
int self;
|
||||
int other;
|
||||
int world;
|
||||
float time;
|
||||
float frametime;
|
||||
float player_localentnum;
|
||||
float player_localnum;
|
||||
float maxclients;
|
||||
float clientcommandframe;
|
||||
float servercommandframe;
|
||||
string_t mapname;
|
||||
vec3_t v_forward;
|
||||
vec3_t v_up;
|
||||
vec3_t v_right;
|
||||
float trace_allsolid;
|
||||
float trace_startsolid;
|
||||
float trace_fraction;
|
||||
vec3_t trace_endpos;
|
||||
vec3_t trace_plane_normal;
|
||||
float trace_plane_dist;
|
||||
int trace_ent;
|
||||
float trace_inopen;
|
||||
float trace_inwater;
|
||||
func_t CSQC_Init;
|
||||
func_t CSQC_Shutdown;
|
||||
func_t CSQC_InputEvent;
|
||||
func_t CSQC_UpdateView;
|
||||
func_t CSQC_ConsoleCommand;
|
||||
vec3_t pmove_org;
|
||||
vec3_t pmove_vel;
|
||||
vec3_t pmove_mins;
|
||||
vec3_t pmove_maxs;
|
||||
float input_timelength;
|
||||
vec3_t input_angles;
|
||||
vec3_t input_movevalues;
|
||||
float input_buttons;
|
||||
float movevar_gravity;
|
||||
float movevar_stopspeed;
|
||||
float movevar_maxspeed;
|
||||
float movevar_spectatormaxspeed;
|
||||
float movevar_accelerate;
|
||||
float movevar_airaccelerate;
|
||||
float movevar_wateraccelerate;
|
||||
float movevar_friction;
|
||||
float movevar_waterfriction;
|
||||
float movevar_entgravity;
|
||||
} cl_globalvars_t;
|
||||
|
||||
typedef struct cl_entvars_s
|
||||
{
|
||||
float modelindex;
|
||||
vec3_t absmin;
|
||||
vec3_t absmax;
|
||||
float entnum;
|
||||
float drawmask;
|
||||
func_t predraw;
|
||||
float movetype;
|
||||
float solid;
|
||||
vec3_t origin;
|
||||
vec3_t oldorigin;
|
||||
vec3_t velocity;
|
||||
vec3_t angles;
|
||||
vec3_t avelocity;
|
||||
string_t classname;
|
||||
string_t model;
|
||||
float frame;
|
||||
float skin;
|
||||
float effects;
|
||||
vec3_t mins;
|
||||
vec3_t maxs;
|
||||
vec3_t size;
|
||||
func_t touch;
|
||||
func_t use;
|
||||
func_t think;
|
||||
func_t blocked;
|
||||
float nextthink;
|
||||
int chain;
|
||||
string_t netname;
|
||||
int enemy;
|
||||
float flags;
|
||||
float colormap;
|
||||
int owner;
|
||||
} cl_entvars_t;
|
||||
|
||||
#define CL_PROGHEADER_CRC 52195
|
||||
*/
|
||||
|
||||
#endif
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __CLVM_CMDS_H__
|
||||
#define __CLVM_CMDS_H__
|
||||
|
||||
/* These are VM built-ins that originate in the client-side programs support
|
||||
but are reused by the other programs (usually the menu). */
|
||||
|
||||
void VM_CL_setmodel (void);
|
||||
void VM_CL_precache_model (void);
|
||||
void VM_CL_setorigin (void);
|
||||
|
||||
void VM_CL_R_AddDynamicLight (void);
|
||||
void VM_CL_R_ClearScene (void);
|
||||
void VM_CL_R_AddEntities (void);
|
||||
void VM_CL_R_AddEntity (void);
|
||||
void VM_CL_R_SetView (void);
|
||||
void VM_CL_R_RenderScene (void);
|
||||
void VM_CL_R_LoadWorldModel (void);
|
||||
|
||||
void VM_CL_R_PolygonBegin (void);
|
||||
void VM_CL_R_PolygonVertex (void);
|
||||
void VM_CL_R_PolygonEnd (void);
|
||||
|
||||
void VM_CL_setattachment(void);
|
||||
void VM_CL_gettagindex(void);
|
||||
void VM_CL_gettaginfo(void);
|
||||
|
||||
#endif /* __CLVM_CMDS_H__ */
|
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
// cmd.h -- Command buffer and command execution
|
||||
|
||||
//===========================================================================
|
||||
|
||||
/*
|
||||
|
||||
Any number of commands can be added in a frame, from several different sources.
|
||||
Most commands come from either keybindings or console line input, but remote
|
||||
servers can also send across commands and entire text files can be execed.
|
||||
|
||||
The + command line options are also added to the command buffer.
|
||||
|
||||
The game starts with a Cbuf_AddText ("exec quake.rc\n"); Cbuf_Execute ();
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CMD_H
|
||||
#define CMD_H
|
||||
|
||||
extern void *cmd_text_mutex;
|
||||
#define Cbuf_LockThreadMutex() (void)(cmd_text_mutex ? Thread_LockMutex(cmd_text_mutex) : 0)
|
||||
#define Cbuf_UnlockThreadMutex() (void)(cmd_text_mutex ? Thread_UnlockMutex(cmd_text_mutex) : 0)
|
||||
|
||||
/// allocates an initial text buffer that will grow as needed
|
||||
void Cbuf_Init (void);
|
||||
|
||||
void Cmd_Init_Commands (void);
|
||||
|
||||
void Cbuf_Shutdown (void);
|
||||
|
||||
/*! as new commands are generated from the console or keybindings,
|
||||
* the text is added to the end of the command buffer.
|
||||
*/
|
||||
void Cbuf_AddText (const char *text);
|
||||
|
||||
/*! when a command wants to issue other commands immediately, the text is
|
||||
* inserted at the beginning of the buffer, before any remaining unexecuted
|
||||
* commands.
|
||||
*/
|
||||
void Cbuf_InsertText (const char *text);
|
||||
|
||||
/*! Pulls off terminated lines of text from the command buffer and sends
|
||||
* them through Cmd_ExecuteString. Stops when the buffer is empty.
|
||||
* Normally called once per frame, but may be explicitly invoked.
|
||||
* \note Do not call inside a command function!
|
||||
*/
|
||||
void Cbuf_Execute (void);
|
||||
/*! Performs deferred commands and runs Cbuf_Execute, called by Host_Main */
|
||||
void Cbuf_Frame (void);
|
||||
|
||||
//===========================================================================
|
||||
|
||||
/*
|
||||
|
||||
Command execution takes a null terminated string, breaks it into tokens,
|
||||
then searches for a command or variable that matches the first token.
|
||||
|
||||
Commands can come from three sources, but the handler functions may choose
|
||||
to dissallow the action or forward it to a remote server if the source is
|
||||
not apropriate.
|
||||
|
||||
*/
|
||||
|
||||
typedef void (*xcommand_t) (void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
src_client, ///< came in over a net connection as a clc_stringcmd
|
||||
///< host_client will be valid during this state.
|
||||
src_command ///< from the command buffer
|
||||
} cmd_source_t;
|
||||
|
||||
extern cmd_source_t cmd_source;
|
||||
|
||||
void Cmd_Init (void);
|
||||
void Cmd_Shutdown (void);
|
||||
|
||||
// called by Host_Init, this marks cvars, commands and aliases with their init values
|
||||
void Cmd_SaveInitState (void);
|
||||
// called by FS_GameDir_f, this restores cvars, commands and aliases to init values
|
||||
void Cmd_RestoreInitState (void);
|
||||
|
||||
void Cmd_AddCommand_WithClientCommand (const char *cmd_name, xcommand_t consolefunction, xcommand_t clientfunction, const char *description);
|
||||
void Cmd_AddCommand (const char *cmd_name, xcommand_t function, const char *description);
|
||||
// called by the init functions of other parts of the program to
|
||||
// register commands and functions to call for them.
|
||||
// The cmd_name is referenced later, so it should not be in temp memory
|
||||
|
||||
/// used by the cvar code to check for cvar / command name overlap
|
||||
qboolean Cmd_Exists (const char *cmd_name);
|
||||
|
||||
/// attempts to match a partial command for automatic command line completion
|
||||
/// returns NULL if nothing fits
|
||||
const char *Cmd_CompleteCommand (const char *partial);
|
||||
|
||||
int Cmd_CompleteAliasCountPossible (const char *partial);
|
||||
|
||||
const char **Cmd_CompleteAliasBuildList (const char *partial);
|
||||
|
||||
int Cmd_CompleteCountPossible (const char *partial);
|
||||
|
||||
const char **Cmd_CompleteBuildList (const char *partial);
|
||||
|
||||
void Cmd_CompleteCommandPrint (const char *partial);
|
||||
|
||||
const char *Cmd_CompleteAlias (const char *partial);
|
||||
|
||||
void Cmd_CompleteAliasPrint (const char *partial);
|
||||
|
||||
// Enhanced console completion by Fett erich@heintz.com
|
||||
|
||||
// Added by EvilTypeGuy eviltypeguy@qeradiant.com
|
||||
|
||||
int Cmd_Argc (void);
|
||||
const char *Cmd_Argv (int arg);
|
||||
const char *Cmd_Args (void);
|
||||
// The functions that execute commands get their parameters with these
|
||||
// functions. Cmd_Argv () will return an empty string, not a NULL
|
||||
// if arg > argc, so string operations are always safe.
|
||||
|
||||
/// Returns the position (1 to argc-1) in the command's argument list
|
||||
/// where the given parameter apears, or 0 if not present
|
||||
int Cmd_CheckParm (const char *parm);
|
||||
|
||||
//void Cmd_TokenizeString (char *text);
|
||||
// Takes a null terminated string. Does not need to be /n terminated.
|
||||
// breaks the string up into arg tokens.
|
||||
|
||||
/// Parses a single line of text into arguments and tries to execute it.
|
||||
/// The text can come from the command buffer, a remote client, or stdin.
|
||||
void Cmd_ExecuteString (const char *text, cmd_source_t src, qboolean lockmutex);
|
||||
|
||||
/// adds the string as a clc_stringcmd to the client message.
|
||||
/// (used when there is no reason to generate a local command to do it)
|
||||
void Cmd_ForwardStringToServer (const char *s);
|
||||
|
||||
/// adds the current command line as a clc_stringcmd to the client message.
|
||||
/// things like godmode, noclip, etc, are commands directed to the server,
|
||||
/// so when they are typed in at the console, they will need to be forwarded.
|
||||
void Cmd_ForwardToServer (void);
|
||||
|
||||
/// used by command functions to send output to either the graphics console or
|
||||
/// passed as a print message to the client
|
||||
void Cmd_Print(const char *text);
|
||||
|
||||
/// quotes a string so that it can be used as a command argument again;
|
||||
/// quoteset is a string that contains one or more of ", \, $ and specifies
|
||||
/// the characters to be quoted (you usually want to either pass "\"\\" or
|
||||
/// "\"\\$"). Returns true on success, and false on overrun (in which case out
|
||||
/// will contain a part of the quoted string). If putquotes is set, the
|
||||
/// enclosing quote marks are also put.
|
||||
qboolean Cmd_QuoteString(char *out, size_t outlen, const char *in, const char *quoteset, qboolean putquotes);
|
||||
|
||||
void Cmd_ClearCsqcFuncs (void);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
|
||||
#ifndef COLLISION_H
|
||||
#define COLLISION_H
|
||||
|
||||
typedef struct plane_s
|
||||
{
|
||||
vec3_t normal;
|
||||
float dist;
|
||||
}
|
||||
plane_t;
|
||||
|
||||
struct texture_s;
|
||||
typedef struct trace_s
|
||||
{
|
||||
// if true, the entire trace was in solid (see hitsupercontentsmask)
|
||||
int allsolid;
|
||||
// if true, the initial point was in solid (see hitsupercontentsmask)
|
||||
int startsolid;
|
||||
// this is set to true in world.c if startsolid was set in a trace against world
|
||||
int worldstartsolid;
|
||||
// this is set to true in world.c if startsolid was set in a trace against a SOLID_BSP entity, in other words this is true if the entity is stuck in a door or wall, but not if stuck in another normal entity
|
||||
int bmodelstartsolid;
|
||||
// if true, the trace passed through empty somewhere
|
||||
// (set only by Q1BSP tracing)
|
||||
int inopen;
|
||||
// if true, the trace passed through water/slime/lava somewhere
|
||||
// (set only by Q1BSP tracing)
|
||||
int inwater;
|
||||
// fraction of the total distance that was traveled before impact
|
||||
// in case of impact this is actually nudged a bit off the surface
|
||||
// (1.0 = did not hit anything)
|
||||
double fraction;
|
||||
// final position of the trace (simply a point between start and end)
|
||||
double endpos[3];
|
||||
// surface normal at impact (not really correct for edge collisions)
|
||||
plane_t plane;
|
||||
// entity the surface is on
|
||||
// (not set by trace functions, only by physics)
|
||||
void *ent;
|
||||
// which SUPERCONTENTS bits to collide with, I.E. to consider solid
|
||||
// (this also affects startsolid/allsolid)
|
||||
int hitsupercontentsmask;
|
||||
// the supercontents mask at the start point
|
||||
int startsupercontents;
|
||||
// the supercontents of the impacted surface
|
||||
int hitsupercontents;
|
||||
// the q3 surfaceflags of the impacted surface
|
||||
int hitq3surfaceflags;
|
||||
// the texture of the impacted surface
|
||||
const struct texture_s *hittexture;
|
||||
// initially false, set when the start leaf is found
|
||||
// (set only by Q1BSP tracing and entity box tracing)
|
||||
int startfound;
|
||||
// if startsolid, contains the minimum penetration depth found in the
|
||||
// trace, and the normal needed to push it out of that solid
|
||||
double startdepth;
|
||||
double startdepthnormal[3];
|
||||
}
|
||||
trace_t;
|
||||
|
||||
void Collision_Init(void);
|
||||
void Collision_ClipTrace_Box(trace_t *trace, const vec3_t cmins, const vec3_t cmaxs, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask, int boxsupercontents, int boxq3surfaceflags, const texture_t *boxtexture);
|
||||
void Collision_ClipTrace_Point(trace_t *trace, const vec3_t cmins, const vec3_t cmaxs, const vec3_t start, int hitsupercontentsmask, int boxsupercontents, int boxq3surfaceflags, const texture_t *boxtexture);
|
||||
|
||||
void Collision_Cache_Reset(qboolean resetlimits);
|
||||
void Collision_Cache_Init(mempool_t *mempool);
|
||||
void Collision_Cache_NewFrame(void);
|
||||
|
||||
typedef struct colpointf_s
|
||||
{
|
||||
vec3_t v;
|
||||
}
|
||||
colpointf_t;
|
||||
|
||||
typedef struct colplanef_s
|
||||
{
|
||||
const struct texture_s *texture;
|
||||
int q3surfaceflags;
|
||||
vec3_t normal;
|
||||
vec_t dist;
|
||||
}
|
||||
colplanef_t;
|
||||
|
||||
typedef struct colbrushf_s
|
||||
{
|
||||
// culling box
|
||||
vec3_t mins;
|
||||
vec3_t maxs;
|
||||
// used to avoid tracing against the same brush more than once per sweep
|
||||
int markframe;
|
||||
// the content flags of this brush
|
||||
int supercontents;
|
||||
// bounding planes (face planes) of this brush
|
||||
int numplanes;
|
||||
colplanef_t *planes;
|
||||
// edge directions (normals) of this brush
|
||||
int numedgedirs;
|
||||
colpointf_t *edgedirs;
|
||||
// points (corners) of this brush
|
||||
int numpoints;
|
||||
colpointf_t *points;
|
||||
// renderable triangles representing this brush, using the points
|
||||
int numtriangles;
|
||||
int *elements;
|
||||
// texture data for cases where an edgedir is used
|
||||
const struct texture_s *texture;
|
||||
int q3surfaceflags;
|
||||
// optimized collisions for common cases
|
||||
int isaabb; // indicates this is an axis aligned box
|
||||
int hasaabbplanes; // indicates this has precomputed planes for AABB collisions
|
||||
}
|
||||
colbrushf_t;
|
||||
|
||||
typedef struct colboxbrushf_s
|
||||
{
|
||||
colpointf_t points[8];
|
||||
colpointf_t edgedirs[6];
|
||||
colplanef_t planes[6];
|
||||
colbrushf_t brush;
|
||||
}
|
||||
colboxbrushf_t;
|
||||
|
||||
void Collision_CalcPlanesForTriangleBrushFloat(colbrushf_t *brush);
|
||||
colbrushf_t *Collision_AllocBrushFromPermanentPolygonFloat(mempool_t *mempool, int numpoints, float *points, int supercontents, int q3surfaceflags, const texture_t *texture);
|
||||
colbrushf_t *Collision_NewBrushFromPlanes(mempool_t *mempool, int numoriginalplanes, const colplanef_t *originalplanes, int supercontents, int q3surfaceflags, const texture_t *texture, int hasaabbplanes);
|
||||
void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *thisbrush_start, const colbrushf_t *thisbrush_end, const colbrushf_t *thatbrush_start, const colbrushf_t *thatbrush_end);
|
||||
void Collision_TraceBrushTriangleMeshFloat(trace_t *trace, const colbrushf_t *thisbrush_start, const colbrushf_t *thisbrush_end, int numtriangles, const int *element3i, const float *vertex3f, int stride, float *bbox6f, int supercontents, int q3surfaceflags, const texture_t *texture, const vec3_t segmentmins, const vec3_t segmentmaxs);
|
||||
void Collision_TraceLineBrushFloat(trace_t *trace, const vec3_t linestart, const vec3_t lineend, const colbrushf_t *thatbrush_start, const colbrushf_t *thatbrush_end);
|
||||
void Collision_TraceLineTriangleMeshFloat(trace_t *trace, const vec3_t linestart, const vec3_t lineend, int numtriangles, const int *element3i, const float *vertex3f, int stride, float *bbox6f, int supercontents, int q3surfaceflags, const texture_t *texture, const vec3_t segmentmins, const vec3_t segmentmaxs);
|
||||
void Collision_TracePointBrushFloat(trace_t *trace, const vec3_t point, const colbrushf_t *thatbrush);
|
||||
qboolean Collision_PointInsideBrushFloat(const vec3_t point, const colbrushf_t *brush);
|
||||
|
||||
void Collision_BrushForBox(colboxbrushf_t *boxbrush, const vec3_t mins, const vec3_t maxs, int supercontents, int q3surfaceflags, const texture_t *texture);
|
||||
|
||||
void Collision_BoundingBoxOfBrushTraceSegment(const colbrushf_t *start, const colbrushf_t *end, vec3_t mins, vec3_t maxs, float startfrac, float endfrac);
|
||||
|
||||
float Collision_ClipTrace_Line_Sphere(double *linestart, double *lineend, double *sphereorigin, double sphereradius, double *impactpoint, double *impactnormal);
|
||||
void Collision_TraceLineTriangleFloat(trace_t *trace, const vec3_t linestart, const vec3_t lineend, const float *point0, const float *point1, const float *point2, int supercontents, int q3surfaceflags, const texture_t *texture);
|
||||
void Collision_TraceBrushTriangleFloat(trace_t *trace, const colbrushf_t *thisbrush_start, const colbrushf_t *thisbrush_end, const float *v0, const float *v1, const float *v2, int supercontents, int q3surfaceflags, const texture_t *texture);
|
||||
|
||||
// traces a box move against a single entity
|
||||
// mins and maxs are relative
|
||||
//
|
||||
// if the entire move stays in a single solid brush, trace.allsolid will be set
|
||||
//
|
||||
// if the starting point is in a solid, it will be allowed to move out to an
|
||||
// open area, and trace.startsolid will be set
|
||||
//
|
||||
// type is one of the MOVE_ values such as MOVE_NOMONSTERS which skips box
|
||||
// entities, only colliding with SOLID_BSP entities (doors, lifts)
|
||||
//
|
||||
// passedict is excluded from clipping checks
|
||||
struct frameblend_s;
|
||||
struct skeleton_s;
|
||||
void Collision_ClipToGenericEntity(trace_t *trace, dp_model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask, float extend);
|
||||
void Collision_ClipLineToGenericEntity(trace_t *trace, dp_model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t end, int hitsupercontentsmask, float extend, qboolean hitsurfaces);
|
||||
void Collision_ClipPointToGenericEntity(trace_t *trace, dp_model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, int hitsupercontentsmask);
|
||||
// like above but does not do a transform and does nothing if model is NULL
|
||||
void Collision_ClipToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontents, float extend);
|
||||
void Collision_ClipLineToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t end, int hitsupercontents, float extend, qboolean hitsurfaces);
|
||||
void Collision_ClipPointToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, int hitsupercontents);
|
||||
// caching surface trace for renderer (NOT THREAD SAFE)
|
||||
void Collision_Cache_ClipLineToGenericEntitySurfaces(trace_t *trace, dp_model_t *model, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t end, int hitsupercontentsmask);
|
||||
void Collision_Cache_ClipLineToWorldSurfaces(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t end, int hitsupercontents);
|
||||
// combines data from two traces:
|
||||
// merges contents flags, startsolid, allsolid, inwater
|
||||
// updates fraction, endpos, plane and surface info if new fraction is shorter
|
||||
void Collision_CombineTraces(trace_t *cliptrace, const trace_t *trace, void *touch, qboolean isbmodel);
|
||||
|
||||
// this enables rather large debugging spew!
|
||||
// settings:
|
||||
// 0 = no spew
|
||||
// 1 = spew trace calls if something odd is happening
|
||||
// 2 = spew trace calls always
|
||||
// 3 = spew detailed trace flow (bsp tree recursion info)
|
||||
#define COLLISIONPARANOID 0
|
||||
|
||||
extern cvar_t collision_impactnudge;
|
||||
extern cvar_t collision_extendtracelinelength;
|
||||
extern cvar_t collision_extendtraceboxlength;
|
||||
extern cvar_t collision_extendmovelength;
|
||||
|
||||
#endif
|
|
@ -0,0 +1,390 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
|
||||
/// MSVC has a different name for several standard functions
|
||||
#ifdef WIN32
|
||||
# define strcasecmp _stricmp
|
||||
# define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
// Create our own define for Mac OS X
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
# define MACOSX
|
||||
#endif
|
||||
|
||||
#ifdef SUNOS
|
||||
#include <sys/file.h> ///< Needed for FNDELAY
|
||||
#endif
|
||||
|
||||
//============================================================================
|
||||
|
||||
typedef struct sizebuf_s
|
||||
{
|
||||
qboolean allowoverflow; ///< if false, do a Sys_Error
|
||||
qboolean overflowed; ///< set to true if the buffer size failed
|
||||
unsigned char *data;
|
||||
int maxsize;
|
||||
int cursize;
|
||||
int readcount;
|
||||
qboolean badread; // set if a read goes beyond end of message
|
||||
} sizebuf_t;
|
||||
|
||||
void SZ_Clear (sizebuf_t *buf);
|
||||
unsigned char *SZ_GetSpace (sizebuf_t *buf, int length);
|
||||
void SZ_Write (sizebuf_t *buf, const unsigned char *data, int length);
|
||||
void SZ_HexDumpToConsole(const sizebuf_t *buf);
|
||||
|
||||
void Com_HexDumpToConsole(const unsigned char *data, int size);
|
||||
|
||||
unsigned short CRC_Block(const unsigned char *data, size_t size);
|
||||
unsigned short CRC_Block_CaseInsensitive(const unsigned char *data, size_t size); // for hash lookup functions that use strcasecmp for comparison
|
||||
|
||||
unsigned char COM_BlockSequenceCRCByteQW(unsigned char *base, int length, int sequence);
|
||||
|
||||
// these are actually md4sum (mdfour.c)
|
||||
unsigned Com_BlockChecksum (void *buffer, int length);
|
||||
void Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf);
|
||||
|
||||
void COM_Init_Commands(void);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Endianess handling
|
||||
//============================================================================
|
||||
|
||||
// check mem_bigendian if you need to know the system byte order
|
||||
|
||||
/*! \name Byte order functions.
|
||||
* @{
|
||||
*/
|
||||
|
||||
// unaligned memory access crashes on some platform, so always read bytes...
|
||||
#define BigShort(l) BuffBigShort((unsigned char *)&(l))
|
||||
#define LittleShort(l) BuffLittleShort((unsigned char *)&(l))
|
||||
#define BigLong(l) BuffBigLong((unsigned char *)&(l))
|
||||
#define LittleLong(l) BuffLittleLong((unsigned char *)&(l))
|
||||
#define BigFloat(l) BuffBigFloat((unsigned char *)&(l))
|
||||
#define LittleFloat(l) BuffLittleFloat((unsigned char *)&(l))
|
||||
|
||||
/// Extract a big endian 32bit float from the given \p buffer.
|
||||
float BuffBigFloat (const unsigned char *buffer);
|
||||
|
||||
/// Extract a big endian 32bit int from the given \p buffer.
|
||||
int BuffBigLong (const unsigned char *buffer);
|
||||
|
||||
/// Extract a big endian 16bit short from the given \p buffer.
|
||||
short BuffBigShort (const unsigned char *buffer);
|
||||
|
||||
/// Extract a little endian 32bit float from the given \p buffer.
|
||||
float BuffLittleFloat (const unsigned char *buffer);
|
||||
|
||||
/// Extract a little endian 32bit int from the given \p buffer.
|
||||
int BuffLittleLong (const unsigned char *buffer);
|
||||
|
||||
/// Extract a little endian 16bit short from the given \p buffer.
|
||||
short BuffLittleShort (const unsigned char *buffer);
|
||||
|
||||
/// Encode a big endian 32bit int to the given \p buffer
|
||||
void StoreBigLong (unsigned char *buffer, unsigned int i);
|
||||
|
||||
/// Encode a big endian 16bit int to the given \p buffer
|
||||
void StoreBigShort (unsigned char *buffer, unsigned short i);
|
||||
|
||||
/// Encode a little endian 32bit int to the given \p buffer
|
||||
void StoreLittleLong (unsigned char *buffer, unsigned int i);
|
||||
|
||||
/// Encode a little endian 16bit int to the given \p buffer
|
||||
void StoreLittleShort (unsigned char *buffer, unsigned short i);
|
||||
//@}
|
||||
|
||||
//============================================================================
|
||||
|
||||
// these versions are purely for internal use, never sent in network protocol
|
||||
// (use Protocol_EnumForNumber and Protocol_NumberToEnum to convert)
|
||||
typedef enum protocolversion_e
|
||||
{
|
||||
PROTOCOL_UNKNOWN,
|
||||
PROTOCOL_DARKPLACES7, ///< added QuakeWorld-style movement protocol to allow more consistent prediction
|
||||
PROTOCOL_DARKPLACES6, ///< various changes
|
||||
PROTOCOL_DARKPLACES5, ///< uses EntityFrame5 entity snapshot encoder/decoder which is based on a Tribes networking article at http://www.garagegames.com/articles/networking1/
|
||||
PROTOCOL_DARKPLACES4, ///< various changes
|
||||
PROTOCOL_DARKPLACES3, ///< uses EntityFrame4 entity snapshot encoder/decoder which is broken, this attempted to do partial snapshot updates on a QuakeWorld-like protocol, but it is broken and impossible to fix
|
||||
PROTOCOL_DARKPLACES2, ///< various changes
|
||||
PROTOCOL_DARKPLACES1, ///< uses EntityFrame entity snapshot encoder/decoder which is a QuakeWorld-like entity snapshot delta compression method
|
||||
PROTOCOL_QUAKEDP, ///< darkplaces extended quake protocol (used by TomazQuake and others), backwards compatible as long as no extended features are used
|
||||
PROTOCOL_NEHAHRAMOVIE, ///< Nehahra movie protocol, a big nasty hack dating back to early days of the Quake Standards Group (but only ever used by neh_gl.exe), this is potentially backwards compatible with quake protocol as long as no extended features are used (but in actuality the neh_gl.exe which wrote this protocol ALWAYS wrote the extended information)
|
||||
PROTOCOL_QUAKE, ///< quake (aka netquake/normalquake/nq) protocol
|
||||
PROTOCOL_QUAKEWORLD, ///< quakeworld protocol
|
||||
PROTOCOL_NEHAHRABJP, ///< same as QUAKEDP but with 16bit modelindex
|
||||
PROTOCOL_NEHAHRABJP2, ///< same as NEHAHRABJP but with 16bit soundindex
|
||||
PROTOCOL_NEHAHRABJP3 ///< same as NEHAHRABJP2 but with some changes
|
||||
}
|
||||
protocolversion_t;
|
||||
|
||||
/*! \name Message IO functions.
|
||||
* Handles byte ordering and avoids alignment errors
|
||||
* @{
|
||||
*/
|
||||
|
||||
void MSG_InitReadBuffer (sizebuf_t *buf, unsigned char *data, int size);
|
||||
void MSG_WriteChar (sizebuf_t *sb, int c);
|
||||
void MSG_WriteByte (sizebuf_t *sb, int c);
|
||||
void MSG_WriteShort (sizebuf_t *sb, int c);
|
||||
void MSG_WriteLong (sizebuf_t *sb, int c);
|
||||
void MSG_WriteFloat (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteString (sizebuf_t *sb, const char *s);
|
||||
void MSG_WriteUnterminatedString (sizebuf_t *sb, const char *s);
|
||||
void MSG_WriteAngle8i (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteAngle16i (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteAngle32f (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteCoord13i (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteCoord16i (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteCoord32f (sizebuf_t *sb, vec_t f);
|
||||
void MSG_WriteCoord (sizebuf_t *sb, vec_t f, protocolversion_t protocol);
|
||||
void MSG_WriteVector (sizebuf_t *sb, const vec3_t v, protocolversion_t protocol);
|
||||
void MSG_WriteAngle (sizebuf_t *sb, vec_t f, protocolversion_t protocol);
|
||||
|
||||
void MSG_BeginReading (sizebuf_t *sb);
|
||||
int MSG_ReadLittleShort (sizebuf_t *sb);
|
||||
int MSG_ReadBigShort (sizebuf_t *sb);
|
||||
int MSG_ReadLittleLong (sizebuf_t *sb);
|
||||
int MSG_ReadBigLong (sizebuf_t *sb);
|
||||
float MSG_ReadLittleFloat (sizebuf_t *sb);
|
||||
float MSG_ReadBigFloat (sizebuf_t *sb);
|
||||
char *MSG_ReadString (sizebuf_t *sb, char *string, size_t maxstring);
|
||||
int MSG_ReadBytes (sizebuf_t *sb, int numbytes, unsigned char *out);
|
||||
|
||||
#define MSG_ReadChar(sb) ((sb)->readcount >= (sb)->cursize ? ((sb)->badread = true, -1) : (signed char)(sb)->data[(sb)->readcount++])
|
||||
#define MSG_ReadByte(sb) ((sb)->readcount >= (sb)->cursize ? ((sb)->badread = true, -1) : (unsigned char)(sb)->data[(sb)->readcount++])
|
||||
#define MSG_ReadShort MSG_ReadLittleShort
|
||||
#define MSG_ReadLong MSG_ReadLittleLong
|
||||
#define MSG_ReadFloat MSG_ReadLittleFloat
|
||||
|
||||
float MSG_ReadAngle8i (sizebuf_t *sb);
|
||||
float MSG_ReadAngle16i (sizebuf_t *sb);
|
||||
float MSG_ReadAngle32f (sizebuf_t *sb);
|
||||
float MSG_ReadCoord13i (sizebuf_t *sb);
|
||||
float MSG_ReadCoord16i (sizebuf_t *sb);
|
||||
float MSG_ReadCoord32f (sizebuf_t *sb);
|
||||
float MSG_ReadCoord (sizebuf_t *sb, protocolversion_t protocol);
|
||||
void MSG_ReadVector (sizebuf_t *sb, vec3_t v, protocolversion_t protocol);
|
||||
float MSG_ReadAngle (sizebuf_t *sb, protocolversion_t protocol);
|
||||
//@}
|
||||
//============================================================================
|
||||
|
||||
typedef float (*COM_WordWidthFunc_t) (void *passthrough, const char *w, size_t *length, float maxWidth); // length is updated to the longest fitting string into maxWidth; if maxWidth < 0, all characters are used and length is used as is
|
||||
typedef int (*COM_LineProcessorFunc) (void *passthrough, const char *line, size_t length, float width, qboolean isContination);
|
||||
int COM_Wordwrap(const char *string, size_t length, float continuationSize, float maxWidth, COM_WordWidthFunc_t wordWidth, void *passthroughCW, COM_LineProcessorFunc processLine, void *passthroughPL);
|
||||
|
||||
extern char com_token[MAX_INPUTLINE];
|
||||
|
||||
int COM_ParseToken_Simple(const char **datapointer, qboolean returnnewline, qboolean parsebackslash, qboolean parsecomments);
|
||||
int COM_ParseToken_QuakeC(const char **datapointer, qboolean returnnewline);
|
||||
int COM_ParseToken_VM_Tokenize(const char **datapointer, qboolean returnnewline);
|
||||
int COM_ParseToken_Console(const char **datapointer);
|
||||
|
||||
extern int com_argc;
|
||||
extern const char **com_argv;
|
||||
extern int com_selffd;
|
||||
|
||||
int COM_CheckParm (const char *parm);
|
||||
void COM_Init (void);
|
||||
void COM_Shutdown (void);
|
||||
void COM_InitGameType (void);
|
||||
|
||||
char *va(char *buf, size_t buflen, const char *format, ...) DP_FUNC_PRINTF(3);
|
||||
// does a varargs printf into provided buffer, returns buffer (so it can be called in-line unlike dpsnprintf)
|
||||
|
||||
|
||||
// snprintf and vsnprintf are NOT portable. Use their DP counterparts instead
|
||||
#ifdef snprintf
|
||||
# undef snprintf
|
||||
#endif
|
||||
#define snprintf DO_NOT_USE_SNPRINTF__USE_DPSNPRINTF
|
||||
#ifdef vsnprintf
|
||||
# undef vsnprintf
|
||||
#endif
|
||||
#define vsnprintf DO_NOT_USE_VSNPRINTF__USE_DPVSNPRINTF
|
||||
|
||||
// dpsnprintf and dpvsnprintf
|
||||
// return the number of printed characters, excluding the final '\0'
|
||||
// or return -1 if the buffer isn't big enough to contain the entire string.
|
||||
// buffer is ALWAYS null-terminated
|
||||
extern int dpsnprintf (char *buffer, size_t buffersize, const char *format, ...) DP_FUNC_PRINTF(3);
|
||||
extern int dpvsnprintf (char *buffer, size_t buffersize, const char *format, va_list args);
|
||||
|
||||
// A bunch of functions are forbidden for security reasons (and also to please MSVS 2005, for some of them)
|
||||
// LordHavoc: added #undef lines here to avoid warnings in Linux
|
||||
#undef strcat
|
||||
#define strcat DO_NOT_USE_STRCAT__USE_STRLCAT_OR_MEMCPY
|
||||
#undef strncat
|
||||
#define strncat DO_NOT_USE_STRNCAT__USE_STRLCAT_OR_MEMCPY
|
||||
#undef strcpy
|
||||
#define strcpy DO_NOT_USE_STRCPY__USE_STRLCPY_OR_MEMCPY
|
||||
#undef strncpy
|
||||
#define strncpy DO_NOT_USE_STRNCPY__USE_STRLCPY_OR_MEMCPY
|
||||
//#undef sprintf
|
||||
//#define sprintf DO_NOT_USE_SPRINTF__USE_DPSNPRINTF
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
extern struct cvar_s registered;
|
||||
extern struct cvar_s cmdline;
|
||||
|
||||
typedef enum userdirmode_e
|
||||
{
|
||||
USERDIRMODE_NOHOME, // basedir only
|
||||
USERDIRMODE_HOME, // Windows basedir, general POSIX (~/.)
|
||||
USERDIRMODE_MYGAMES, // pre-Vista (My Documents/My Games/), general POSIX (~/.)
|
||||
USERDIRMODE_SAVEDGAMES, // Vista (%USERPROFILE%/Saved Games/), OSX (~/Library/Application Support/), Linux (~/.config)
|
||||
USERDIRMODE_COUNT
|
||||
}
|
||||
userdirmode_t;
|
||||
|
||||
typedef enum gamemode_e
|
||||
{
|
||||
GAME_NORMAL,
|
||||
GAME_HIPNOTIC,
|
||||
GAME_ROGUE,
|
||||
GAME_QUOTH,
|
||||
GAME_NEHAHRA,
|
||||
GAME_NEXUIZ,
|
||||
GAME_XONOTIC,
|
||||
GAME_TRANSFUSION,
|
||||
GAME_GOODVSBAD2,
|
||||
GAME_TEU,
|
||||
GAME_BATTLEMECH,
|
||||
GAME_ZYMOTIC,
|
||||
GAME_SETHERAL,
|
||||
GAME_TENEBRAE, // full of evil hackery
|
||||
GAME_NEOTERIC,
|
||||
GAME_OPENQUARTZ, //this game sucks
|
||||
GAME_PRYDON,
|
||||
GAME_DELUXEQUAKE,
|
||||
GAME_THEHUNTED,
|
||||
GAME_DEFEATINDETAIL2,
|
||||
GAME_DARSANA,
|
||||
GAME_CONTAGIONTHEORY,
|
||||
GAME_EDU2P,
|
||||
GAME_PROPHECY,
|
||||
GAME_BLOODOMNICIDE,
|
||||
GAME_STEELSTORM, // added by motorsep
|
||||
GAME_STEELSTORM2, // added by motorsep
|
||||
GAME_SSAMMO, // added by motorsep
|
||||
GAME_TOMESOFMEPHISTOPHELES, // added by motorsep
|
||||
GAME_STRAPBOMB, // added by motorsep for Urre
|
||||
GAME_MOONHELM,
|
||||
GAME_VORETOURNAMENT,
|
||||
GAME_WRATH,
|
||||
GAME_COUNT
|
||||
}
|
||||
gamemode_t;
|
||||
|
||||
// Master switch for some hacks/changes that eventually should become cvars.
|
||||
#define IS_NEXUIZ_DERIVED(g) ((g) == GAME_NEXUIZ || (g) == GAME_XONOTIC || (g) == GAME_VORETOURNAMENT)
|
||||
// Pre-csqcmodels era.
|
||||
#define IS_OLDNEXUIZ_DERIVED(g) ((g) == GAME_NEXUIZ || (g) == GAME_VORETOURNAMENT)
|
||||
|
||||
extern gamemode_t gamemode;
|
||||
extern const char *gamename;
|
||||
extern const char *gamenetworkfiltername;
|
||||
extern const char *gamedirname1;
|
||||
extern const char *gamedirname2;
|
||||
extern const char *gamescreenshotname;
|
||||
extern const char *gameuserdirname;
|
||||
extern char com_modname[MAX_OSPATH];
|
||||
|
||||
void COM_ChangeGameTypeForGameDirs(void);
|
||||
|
||||
void COM_ToLowerString (const char *in, char *out, size_t size_out);
|
||||
void COM_ToUpperString (const char *in, char *out, size_t size_out);
|
||||
int COM_StringBeginsWith(const char *s, const char *match);
|
||||
|
||||
int COM_ReadAndTokenizeLine(const char **text, char **argv, int maxargc, char *tokenbuf, int tokenbufsize, const char *commentprefix);
|
||||
|
||||
size_t COM_StringLengthNoColors(const char *s, size_t size_s, qboolean *valid);
|
||||
qboolean COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out, qboolean escape_carets);
|
||||
void COM_ToLowerString (const char *in, char *out, size_t size_out);
|
||||
void COM_ToUpperString (const char *in, char *out, size_t size_out);
|
||||
|
||||
typedef struct stringlist_s
|
||||
{
|
||||
/// maxstrings changes as needed, causing reallocation of strings[] array
|
||||
int maxstrings;
|
||||
int numstrings;
|
||||
char **strings;
|
||||
} stringlist_t;
|
||||
|
||||
int matchpattern(const char *in, const char *pattern, int caseinsensitive);
|
||||
int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, qboolean wildcard_least_one);
|
||||
void stringlistinit(stringlist_t *list);
|
||||
void stringlistfreecontents(stringlist_t *list);
|
||||
void stringlistappend(stringlist_t *list, const char *text);
|
||||
void stringlistsort(stringlist_t *list, qboolean uniq);
|
||||
void listdirectory(stringlist_t *list, const char *basepath, const char *path);
|
||||
|
||||
char *InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuelength);
|
||||
void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, const char *value);
|
||||
void InfoString_Print(char *buffer);
|
||||
|
||||
// strlcat and strlcpy, from OpenBSD
|
||||
// Most (all?) BSDs already have them
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACOSX)
|
||||
# define HAVE_STRLCAT 1
|
||||
# define HAVE_STRLCPY 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
/*!
|
||||
* Appends src to string dst of size siz (unlike strncat, siz is the
|
||||
* full size of dst, not space left). At most siz-1 characters
|
||||
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
|
||||
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
|
||||
* If retval >= siz, truncation occurred.
|
||||
*/
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif // #ifndef HAVE_STRLCAT
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
/*!
|
||||
* Copy src to string dst of size siz. At most siz-1 characters
|
||||
* will be copied. Always NUL terminates (unless siz == 0).
|
||||
* Returns strlen(src); if retval >= siz, truncation occurred.
|
||||
*/
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
|
||||
#endif // #ifndef HAVE_STRLCPY
|
||||
|
||||
void FindFraction(double val, int *num, int *denom, int denomMax);
|
||||
|
||||
// decodes XPM file to XPM array (as if #include'd)
|
||||
char **XPM_DecodeString(const char *in);
|
||||
|
||||
size_t base64_encode(unsigned char *buf, size_t buflen, size_t outbuflen);
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,365 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// conproc.c
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
#include "conproc.h"
|
||||
|
||||
HANDLE heventDone;
|
||||
HANDLE hfileBuffer;
|
||||
HANDLE heventChildSend;
|
||||
HANDLE heventParentSend;
|
||||
HANDLE hStdout;
|
||||
HANDLE hStdin;
|
||||
|
||||
DWORD RequestProc (DWORD dwNichts);
|
||||
LPVOID GetMappedBuffer (HANDLE hfileBuffer);
|
||||
void ReleaseMappedBuffer (LPVOID pBuffer);
|
||||
BOOL GetScreenBufferLines (int *piLines);
|
||||
BOOL SetScreenBufferLines (int iLines);
|
||||
BOOL ReadText (LPTSTR pszText, int iBeginLine, int iEndLine);
|
||||
BOOL WriteText (LPCTSTR szText);
|
||||
int CharToCode (int c);
|
||||
BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy);
|
||||
|
||||
|
||||
void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild)
|
||||
{
|
||||
DWORD dwID;
|
||||
|
||||
// ignore if we don't have all the events.
|
||||
if (!hFile || !heventParent || !heventChild)
|
||||
return;
|
||||
|
||||
hfileBuffer = hFile;
|
||||
heventParentSend = heventParent;
|
||||
heventChildSend = heventChild;
|
||||
|
||||
// so we'll know when to go away.
|
||||
heventDone = CreateEvent (NULL, false, false, NULL);
|
||||
|
||||
if (!heventDone)
|
||||
{
|
||||
Con_Print("Couldn't create heventDone\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CreateThread (NULL,
|
||||
0,
|
||||
(LPTHREAD_START_ROUTINE) RequestProc,
|
||||
0,
|
||||
0,
|
||||
&dwID))
|
||||
{
|
||||
CloseHandle (heventDone);
|
||||
Con_Print("Couldn't create QHOST thread\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// save off the input/output handles.
|
||||
hStdout = GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
hStdin = GetStdHandle (STD_INPUT_HANDLE);
|
||||
|
||||
// force 80 character width, at least 25 character height
|
||||
SetConsoleCXCY (hStdout, 80, 25);
|
||||
}
|
||||
|
||||
|
||||
void DeinitConProc (void)
|
||||
{
|
||||
if (heventDone)
|
||||
SetEvent (heventDone);
|
||||
}
|
||||
|
||||
|
||||
DWORD RequestProc (DWORD dwNichts)
|
||||
{
|
||||
int *pBuffer;
|
||||
DWORD dwRet;
|
||||
HANDLE heventWait[2];
|
||||
int iBeginLine, iEndLine;
|
||||
|
||||
heventWait[0] = heventParentSend;
|
||||
heventWait[1] = heventDone;
|
||||
|
||||
while (1)
|
||||
{
|
||||
dwRet = WaitForMultipleObjects (2, heventWait, false, INFINITE);
|
||||
|
||||
// heventDone fired, so we're exiting.
|
||||
if (dwRet == WAIT_OBJECT_0 + 1)
|
||||
break;
|
||||
|
||||
pBuffer = (int *) GetMappedBuffer (hfileBuffer);
|
||||
|
||||
// hfileBuffer is invalid. Just leave.
|
||||
if (!pBuffer)
|
||||
{
|
||||
Con_Print("Invalid hfileBuffer\n");
|
||||
break;
|
||||
}
|
||||
|
||||
switch (pBuffer[0])
|
||||
{
|
||||
case CCOM_WRITE_TEXT:
|
||||
// Param1 : Text
|
||||
pBuffer[0] = WriteText ((LPCTSTR) (pBuffer + 1));
|
||||
break;
|
||||
|
||||
case CCOM_GET_TEXT:
|
||||
// Param1 : Begin line
|
||||
// Param2 : End line
|
||||
iBeginLine = pBuffer[1];
|
||||
iEndLine = pBuffer[2];
|
||||
pBuffer[0] = ReadText ((LPTSTR) (pBuffer + 1), iBeginLine,
|
||||
iEndLine);
|
||||
break;
|
||||
|
||||
case CCOM_GET_SCR_LINES:
|
||||
// No params
|
||||
pBuffer[0] = GetScreenBufferLines (&pBuffer[1]);
|
||||
break;
|
||||
|
||||
case CCOM_SET_SCR_LINES:
|
||||
// Param1 : Number of lines
|
||||
pBuffer[0] = SetScreenBufferLines (pBuffer[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
ReleaseMappedBuffer (pBuffer);
|
||||
SetEvent (heventChildSend);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
LPVOID GetMappedBuffer (HANDLE hfileBuffer)
|
||||
{
|
||||
LPVOID pBuffer;
|
||||
|
||||
pBuffer = MapViewOfFile (hfileBuffer,
|
||||
FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
||||
|
||||
return pBuffer;
|
||||
}
|
||||
|
||||
|
||||
void ReleaseMappedBuffer (LPVOID pBuffer)
|
||||
{
|
||||
UnmapViewOfFile (pBuffer);
|
||||
}
|
||||
|
||||
|
||||
BOOL GetScreenBufferLines (int *piLines)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO info;
|
||||
BOOL bRet;
|
||||
|
||||
bRet = GetConsoleScreenBufferInfo (hStdout, &info);
|
||||
|
||||
if (bRet)
|
||||
*piLines = info.dwSize.Y;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
BOOL SetScreenBufferLines (int iLines)
|
||||
{
|
||||
|
||||
return SetConsoleCXCY (hStdout, 80, iLines);
|
||||
}
|
||||
|
||||
|
||||
BOOL ReadText (LPTSTR pszText, int iBeginLine, int iEndLine)
|
||||
{
|
||||
COORD coord;
|
||||
DWORD dwRead;
|
||||
BOOL bRet;
|
||||
|
||||
coord.X = 0;
|
||||
coord.Y = iBeginLine;
|
||||
|
||||
bRet = ReadConsoleOutputCharacter(
|
||||
hStdout,
|
||||
pszText,
|
||||
80 * (iEndLine - iBeginLine + 1),
|
||||
coord,
|
||||
&dwRead);
|
||||
|
||||
// Make sure it's null terminated.
|
||||
if (bRet)
|
||||
pszText[dwRead] = '\0';
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
BOOL WriteText (LPCTSTR szText)
|
||||
{
|
||||
DWORD dwWritten;
|
||||
INPUT_RECORD rec;
|
||||
char upper, *sz;
|
||||
|
||||
sz = (LPTSTR) szText;
|
||||
|
||||
while (*sz)
|
||||
{
|
||||
// 13 is the code for a carriage return (\n) instead of 10.
|
||||
if (*sz == 10)
|
||||
*sz = 13;
|
||||
|
||||
upper = toupper(*sz);
|
||||
|
||||
rec.EventType = KEY_EVENT;
|
||||
rec.Event.KeyEvent.bKeyDown = true;
|
||||
rec.Event.KeyEvent.wRepeatCount = 1;
|
||||
rec.Event.KeyEvent.wVirtualKeyCode = upper;
|
||||
rec.Event.KeyEvent.wVirtualScanCode = CharToCode (*sz);
|
||||
rec.Event.KeyEvent.uChar.AsciiChar = *sz;
|
||||
rec.Event.KeyEvent.uChar.UnicodeChar = *sz;
|
||||
rec.Event.KeyEvent.dwControlKeyState = isupper(*sz) ? 0x80 : 0x0;
|
||||
|
||||
WriteConsoleInput(
|
||||
hStdin,
|
||||
&rec,
|
||||
1,
|
||||
&dwWritten);
|
||||
|
||||
rec.Event.KeyEvent.bKeyDown = false;
|
||||
|
||||
WriteConsoleInput(
|
||||
hStdin,
|
||||
&rec,
|
||||
1,
|
||||
&dwWritten);
|
||||
|
||||
sz++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int CharToCode (int c)
|
||||
{
|
||||
char upper;
|
||||
|
||||
upper = toupper(c);
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 13:
|
||||
return 28;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (isalpha(c))
|
||||
return (30 + upper - 65);
|
||||
|
||||
if (isdigit(c))
|
||||
return (1 + upper - 47);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO info;
|
||||
COORD coordMax;
|
||||
|
||||
coordMax = GetLargestConsoleWindowSize(hStdout);
|
||||
|
||||
if (cy > coordMax.Y)
|
||||
cy = coordMax.Y;
|
||||
|
||||
if (cx > coordMax.X)
|
||||
cx = coordMax.X;
|
||||
|
||||
if (!GetConsoleScreenBufferInfo(hStdout, &info))
|
||||
return false;
|
||||
|
||||
// height
|
||||
info.srWindow.Left = 0;
|
||||
info.srWindow.Right = info.dwSize.X - 1;
|
||||
info.srWindow.Top = 0;
|
||||
info.srWindow.Bottom = cy - 1;
|
||||
|
||||
if (cy < info.dwSize.Y)
|
||||
{
|
||||
if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
|
||||
return false;
|
||||
|
||||
info.dwSize.Y = cy;
|
||||
|
||||
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
|
||||
return false;
|
||||
}
|
||||
else if (cy > info.dwSize.Y)
|
||||
{
|
||||
info.dwSize.Y = cy;
|
||||
|
||||
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
|
||||
return false;
|
||||
|
||||
if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!GetConsoleScreenBufferInfo(hStdout, &info))
|
||||
return false;
|
||||
|
||||
// width
|
||||
info.srWindow.Left = 0;
|
||||
info.srWindow.Right = cx - 1;
|
||||
info.srWindow.Top = 0;
|
||||
info.srWindow.Bottom = info.dwSize.Y - 1;
|
||||
|
||||
if (cx < info.dwSize.X)
|
||||
{
|
||||
if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
|
||||
return false;
|
||||
|
||||
info.dwSize.X = cx;
|
||||
|
||||
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
|
||||
return false;
|
||||
}
|
||||
else if (cx > info.dwSize.X)
|
||||
{
|
||||
info.dwSize.X = cx;
|
||||
|
||||
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
|
||||
return false;
|
||||
|
||||
if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// conproc.h
|
||||
|
||||
#ifndef CONPROC_H
|
||||
#define CONPROC_H
|
||||
|
||||
#define CCOM_WRITE_TEXT 0x2
|
||||
// Param1 : Text
|
||||
|
||||
#define CCOM_GET_TEXT 0x3
|
||||
// Param1 : Begin line
|
||||
// Param2 : End line
|
||||
|
||||
#define CCOM_GET_SCR_LINES 0x4
|
||||
// No params
|
||||
|
||||
#define CCOM_SET_SCR_LINES 0x5
|
||||
// Param1 : Number of lines
|
||||
|
||||
void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild);
|
||||
void DeinitConProc (void);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CONSOLE_H
|
||||
#define CONSOLE_H
|
||||
|
||||
//
|
||||
// console
|
||||
//
|
||||
extern int con_totallines;
|
||||
extern int con_backscroll;
|
||||
extern qboolean con_initialized;
|
||||
|
||||
void Con_Rcon_Redirect_Init(lhnetsocket_t *sock, lhnetaddress_t *dest, qboolean proquakeprotocol);
|
||||
void Con_Rcon_Redirect_End(void);
|
||||
void Con_Rcon_Redirect_Abort(void);
|
||||
|
||||
/// If the line width has changed, reformat the buffer.
|
||||
void Con_CheckResize (void);
|
||||
void Con_Init (void);
|
||||
void Con_Init_Commands (void);
|
||||
void Con_Shutdown (void);
|
||||
void Con_DrawConsole (int lines);
|
||||
|
||||
/// Prints to a chosen console target
|
||||
void Con_MaskPrint(int mask, const char *msg);
|
||||
|
||||
// Prints to a chosen console target
|
||||
void Con_MaskPrintf(int mask, const char *fmt, ...) DP_FUNC_PRINTF(2);
|
||||
|
||||
/// Prints to all appropriate console targets, and adds timestamps
|
||||
void Con_Print(const char *txt);
|
||||
|
||||
/// Prints to all appropriate console targets.
|
||||
void Con_Printf(const char *fmt, ...) DP_FUNC_PRINTF(1);
|
||||
|
||||
/// A Con_Print that only shows up if the "developer" cvar is set.
|
||||
void Con_DPrint(const char *msg);
|
||||
|
||||
/// A Con_Printf that only shows up if the "developer" cvar is set
|
||||
void Con_DPrintf(const char *fmt, ...) DP_FUNC_PRINTF(1);
|
||||
void Con_Clear_f (void);
|
||||
void Con_DrawNotify (void);
|
||||
|
||||
/// Clear all notify lines.
|
||||
void Con_ClearNotify (void);
|
||||
void Con_ToggleConsole_f (void);
|
||||
|
||||
int Nicks_CompleteChatLine(char *buffer, size_t size, unsigned int pos);
|
||||
|
||||
qboolean GetMapList (const char *s, char *completedname, int completednamebufferlength);
|
||||
|
||||
/// wrapper function to attempt to either complete the command line
|
||||
/// or to list possible matches grouped by type
|
||||
/// (i.e. will display possible variables, aliases, commands
|
||||
/// that match what they've typed so far)
|
||||
void Con_CompleteCommandLine(void);
|
||||
|
||||
/// Generic libs/util/console.c function to display a list
|
||||
/// formatted in columns on the console
|
||||
void Con_DisplayList(const char **list);
|
||||
|
||||
|
||||
/*! \name log
|
||||
* @{
|
||||
*/
|
||||
void Log_Init (void);
|
||||
void Log_Close (void);
|
||||
void Log_Start (void);
|
||||
void Log_DestBuffer_Flush (void); ///< call this once per frame to send out replies to rcon streaming clients
|
||||
|
||||
void Log_Printf(const char *logfilename, const char *fmt, ...) DP_FUNC_PRINTF(2);
|
||||
//@}
|
||||
|
||||
// CON_MASK_PRINT is the default (Con_Print/Con_Printf)
|
||||
// CON_MASK_DEVELOPER is used by Con_DPrint/Con_DPrintf
|
||||
#define CON_MASK_HIDENOTIFY 128
|
||||
#define CON_MASK_CHAT 1
|
||||
#define CON_MASK_INPUT 2
|
||||
#define CON_MASK_DEVELOPER 4
|
||||
#define CON_MASK_PRINT 8
|
||||
|
||||
typedef struct con_lineinfo_s
|
||||
{
|
||||
char *start;
|
||||
size_t len;
|
||||
int mask;
|
||||
|
||||
/// used only by console.c
|
||||
double addtime;
|
||||
int height; ///< recalculated line height when needed (-1 to unset)
|
||||
}
|
||||
con_lineinfo_t;
|
||||
|
||||
typedef struct conbuffer_s
|
||||
{
|
||||
qboolean active;
|
||||
int textsize;
|
||||
char *text;
|
||||
int maxlines;
|
||||
con_lineinfo_t *lines;
|
||||
int lines_first;
|
||||
int lines_count; ///< cyclic buffer
|
||||
}
|
||||
conbuffer_t;
|
||||
|
||||
#define CONBUFFER_LINES(buf, i) (buf)->lines[((buf)->lines_first + (i)) % (buf)->maxlines]
|
||||
#define CONBUFFER_LINES_COUNT(buf) ((buf)->lines_count)
|
||||
#define CONBUFFER_LINES_LAST(buf) CONBUFFER_LINES(buf, CONBUFFER_LINES_COUNT(buf) - 1)
|
||||
|
||||
void ConBuffer_Init(conbuffer_t *buf, int textsize, int maxlines, mempool_t *mempool);
|
||||
void ConBuffer_Clear (conbuffer_t *buf);
|
||||
void ConBuffer_Shutdown(conbuffer_t *buf);
|
||||
|
||||
/*! Notifies the console code about the current time
|
||||
* (and shifts back times of other entries when the time
|
||||
* went backwards)
|
||||
*/
|
||||
void ConBuffer_FixTimes(conbuffer_t *buf);
|
||||
|
||||
/// Deletes the first line from the console history.
|
||||
void ConBuffer_DeleteLine(conbuffer_t *buf);
|
||||
|
||||
/// Deletes the last line from the console history.
|
||||
void ConBuffer_DeleteLastLine(conbuffer_t *buf);
|
||||
|
||||
/// Appends a given string as a new line to the console.
|
||||
void ConBuffer_AddLine(conbuffer_t *buf, const char *line, int len, int mask);
|
||||
int ConBuffer_FindPrevLine(conbuffer_t *buf, int mask_must, int mask_mustnot, int start);
|
||||
int ConBuffer_FindNextLine(conbuffer_t *buf, int mask_must, int mask_mustnot, int start);
|
||||
const char *ConBuffer_GetLine(conbuffer_t *buf, int i);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/sh
|
||||
|
||||
outfile=$1; shift
|
||||
hosts=$1; shift
|
||||
|
||||
on()
|
||||
{
|
||||
case "$1" in
|
||||
localhost)
|
||||
shift
|
||||
exec "$@"
|
||||
;;
|
||||
*)
|
||||
exec ssh "$@"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
pids=
|
||||
mainpid=$$
|
||||
trap 'kill $pids' EXIT
|
||||
trap 'exit 1' INT USR1
|
||||
|
||||
n=0
|
||||
for h in $hosts; do
|
||||
nn=`on "$h" cat /proc/cpuinfo | grep -c '^processor[ :]'`
|
||||
n=$(($nn + $n))
|
||||
done
|
||||
|
||||
rm -f bruteforce-*
|
||||
i=0
|
||||
for h in $hosts; do
|
||||
nn=`on "$h" cat /proc/cpuinfo | grep -c '^processor[ :]'`
|
||||
ii=$(($nn + $i))
|
||||
while [ $i -lt $ii ]; do
|
||||
i=$(($i+1))
|
||||
(
|
||||
on "$h" ./crypto-keygen-standalone -n $n -o /dev/stdout "$@" > bruteforce-$i &
|
||||
pid=$!
|
||||
trap 'kill $pid' TERM
|
||||
wait
|
||||
if [ -s "bruteforce-$i" ]; then
|
||||
trap - TERM
|
||||
mv "bruteforce-$i" "$outfile"
|
||||
kill -USR1 $mainpid
|
||||
else
|
||||
rm -f "bruteforce-$i"
|
||||
fi
|
||||
) &
|
||||
pids="$pids $!"
|
||||
done
|
||||
done
|
||||
wait
|
|
@ -0,0 +1,773 @@
|
|||
#define _GNU_SOURCE
|
||||
|
||||
#include <d0_blind_id/d0_blind_id.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
// BEGIN stuff shared with crypto.c
|
||||
#define FOURCC_D0PK (('d' << 0) | ('0' << 8) | ('p' << 16) | ('k' << 24))
|
||||
#define FOURCC_D0SK (('d' << 0) | ('0' << 8) | ('s' << 16) | ('k' << 24))
|
||||
#define FOURCC_D0PI (('d' << 0) | ('0' << 8) | ('p' << 16) | ('i' << 24))
|
||||
#define FOURCC_D0SI (('d' << 0) | ('0' << 8) | ('s' << 16) | ('i' << 24))
|
||||
#define FOURCC_D0IQ (('d' << 0) | ('0' << 8) | ('i' << 16) | ('q' << 24))
|
||||
#define FOURCC_D0IR (('d' << 0) | ('0' << 8) | ('i' << 16) | ('r' << 24))
|
||||
#define FOURCC_D0ER (('d' << 0) | ('0' << 8) | ('e' << 16) | ('r' << 24))
|
||||
#define FOURCC_D0IC (('d' << 0) | ('0' << 8) | ('i' << 16) | ('c' << 24))
|
||||
|
||||
static unsigned long Crypto_LittleLong(const char *data)
|
||||
{
|
||||
return
|
||||
((unsigned char) data[0]) |
|
||||
(((unsigned char) data[1]) << 8) |
|
||||
(((unsigned char) data[2]) << 16) |
|
||||
(((unsigned char) data[3]) << 24);
|
||||
}
|
||||
|
||||
static void Crypto_UnLittleLong(char *data, unsigned long l)
|
||||
{
|
||||
data[0] = l & 0xFF;
|
||||
data[1] = (l >> 8) & 0xFF;
|
||||
data[2] = (l >> 16) & 0xFF;
|
||||
data[3] = (l >> 24) & 0xFF;
|
||||
}
|
||||
|
||||
static size_t Crypto_ParsePack(const char *buf, size_t len, unsigned long header, const char **lumps, size_t *lumpsize, size_t nlumps)
|
||||
{
|
||||
size_t i;
|
||||
size_t pos;
|
||||
pos = 0;
|
||||
if(header)
|
||||
{
|
||||
if(len < 4)
|
||||
return 0;
|
||||
if(Crypto_LittleLong(buf) != header)
|
||||
return 0;
|
||||
pos += 4;
|
||||
}
|
||||
for(i = 0; i < nlumps; ++i)
|
||||
{
|
||||
if(pos + 4 > len)
|
||||
return 0;
|
||||
lumpsize[i] = Crypto_LittleLong(&buf[pos]);
|
||||
pos += 4;
|
||||
if(pos + lumpsize[i] > len)
|
||||
return 0;
|
||||
lumps[i] = &buf[pos];
|
||||
pos += lumpsize[i];
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
static size_t Crypto_UnParsePack(char *buf, size_t len, unsigned long header, const char *const *lumps, const size_t *lumpsize, size_t nlumps)
|
||||
{
|
||||
size_t i;
|
||||
size_t pos;
|
||||
pos = 0;
|
||||
if(header)
|
||||
{
|
||||
if(len < 4)
|
||||
return 0;
|
||||
Crypto_UnLittleLong(buf, header);
|
||||
pos += 4;
|
||||
}
|
||||
for(i = 0; i < nlumps; ++i)
|
||||
{
|
||||
if(pos + 4 + lumpsize[i] > len)
|
||||
return 0;
|
||||
Crypto_UnLittleLong(&buf[pos], lumpsize[i]);
|
||||
pos += 4;
|
||||
memcpy(&buf[pos], lumps[i], lumpsize[i]);
|
||||
pos += lumpsize[i];
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
void file2buf(const char *fn, char **data, size_t *datasize)
|
||||
{
|
||||
FILE *f;
|
||||
*data = NULL;
|
||||
*datasize = 0;
|
||||
size_t n = 0, dn = 0;
|
||||
if(!strncmp(fn, "/dev/fd/", 8))
|
||||
f = fdopen(atoi(fn + 8), "rb");
|
||||
else
|
||||
f = fopen(fn, "rb");
|
||||
if(!f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for(;;)
|
||||
{
|
||||
*data = realloc(*data, *datasize += 8192);
|
||||
if(!*data)
|
||||
{
|
||||
*datasize = 0;
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
dn = fread(*data + n, 1, *datasize - n, f);
|
||||
if(!dn)
|
||||
break;
|
||||
n += dn;
|
||||
}
|
||||
fclose(f);
|
||||
*datasize = n;
|
||||
}
|
||||
|
||||
int buf2file(const char *fn, const char *data, size_t n)
|
||||
{
|
||||
FILE *f;
|
||||
if(!strncmp(fn, "/dev/fd/", 8))
|
||||
f = fdopen(atoi(fn + 8), "wb");
|
||||
else
|
||||
f = fopen(fn, "wb");
|
||||
if(!f)
|
||||
return 0;
|
||||
n = fwrite(data, n, 1, f);
|
||||
if(fclose(f) || !n)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void file2lumps(const char *fn, unsigned long header, const char **lumps, size_t *lumpsize, size_t nlumps)
|
||||
{
|
||||
char *buf;
|
||||
size_t n;
|
||||
file2buf(fn, &buf, &n);
|
||||
if(!buf)
|
||||
{
|
||||
fprintf(stderr, "could not open %s\n", fn);
|
||||
exit(1);
|
||||
}
|
||||
if(!Crypto_ParsePack(buf, n, header, lumps, lumpsize, nlumps))
|
||||
{
|
||||
fprintf(stderr, "could not parse %s as %c%c%c%c (%d lumps expected)\n", fn, (int) header & 0xFF, (int) (header >> 8) & 0xFF, (int) (header >> 16) & 0xFF, (int) (header >> 24) & 0xFF, (int) nlumps);
|
||||
free(buf);
|
||||
exit(1);
|
||||
}
|
||||
free(buf);
|
||||
}
|
||||
|
||||
mode_t umask_save;
|
||||
void lumps2file(const char *fn, unsigned long header, const char *const *lumps, size_t *lumpsize, size_t nlumps, D0_BOOL private)
|
||||
{
|
||||
char buf[65536];
|
||||
size_t n;
|
||||
if(private)
|
||||
umask(umask_save | 0077);
|
||||
else
|
||||
umask(umask_save);
|
||||
if(!(n = Crypto_UnParsePack(buf, sizeof(buf), header, lumps, lumpsize, nlumps)))
|
||||
{
|
||||
fprintf(stderr, "could not unparse for %s\n", fn);
|
||||
exit(1);
|
||||
}
|
||||
if(!buf2file(fn, buf, n))
|
||||
{
|
||||
fprintf(stderr, "could not write %s\n", fn);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void USAGE(const char *me)
|
||||
{
|
||||
printf("Usage:\n"
|
||||
"%s [-F] [-b bits] [-n progress-denominator] [-x prefix] [-X infix] [-C] -o private.d0sk\n"
|
||||
"%s -P private.d0sk -o public.d0pk\n"
|
||||
"%s [-n progress-denominator] [-x prefix] [-X infix] [-C] -p public.d0pk -o idkey-unsigned.d0si\n"
|
||||
"%s -p public.d0pk -I idkey-unsigned.d0si -o request.d0iq -O camouflage.d0ic\n"
|
||||
"%s -P private.d0sk -j request.d0iq -o response.d0ir\n"
|
||||
"%s -p public.d0pk -I idkey-unsigned.d0si -c camouflage.d0ic -J response.d0ir -o idkey.d0si\n"
|
||||
"%s -P private.d0sk -I idkey-unsigned.d0si -o idkey.d0si\n"
|
||||
"%s -I idkey.d0si -o id.d0pi\n"
|
||||
"%s -p public.d0pk\n"
|
||||
"%s -P private.d0sk\n"
|
||||
"%s -p public.d0pk -i id.d0pi\n"
|
||||
"%s -p public.d0pk -I idkey.d0si\n"
|
||||
"%s -0 -p public.d0pk -I idkey.d0si\n"
|
||||
"%s -0 -p public.d0pk\n"
|
||||
"%s -p public.d0pk -I idkey.d0si -d file-to-sign.dat -o file-signed.dat\n"
|
||||
"%s -p public.d0pk -s file-signed.dat -o file-content.dat [-O id.d0pi]\n"
|
||||
"%s -p public.d0pk -I idkey.d0si -d file-to-sign.dat -O signature.dat\n"
|
||||
"%s -p public.d0pk -d file-to-sign.dat -s signature.dat [-O id.d0pi]\n",
|
||||
me, me, me, me, me, me, me, me, me, me, me, me, me, me, me, me, me, me
|
||||
);
|
||||
}
|
||||
|
||||
unsigned int seconds;
|
||||
unsigned int generated;
|
||||
unsigned int ntasks = 1;
|
||||
double generated_offset;
|
||||
double guesscount;
|
||||
double guessfactor;
|
||||
void print_generated(int signo)
|
||||
{
|
||||
(void) signo;
|
||||
++seconds;
|
||||
if(generated >= 1000000000)
|
||||
{
|
||||
generated_offset += generated;
|
||||
generated = 0;
|
||||
}
|
||||
fprintf(stderr, "Generated: %.0f (about %.0f, %.1f/s, about %.2f hours for %.0f)\n",
|
||||
// nasty and dishonest hack:
|
||||
// we are adjusting the values "back", so the total count is
|
||||
// divided by guessfactor (as the check function is called
|
||||
// guessfactor as often as it would be if no fastreject were
|
||||
// done)
|
||||
// so the values indicate the relative speed of fastreject vs
|
||||
// normal!
|
||||
(generated + generated_offset) / guessfactor,
|
||||
(generated + generated_offset) * ntasks / guessfactor,
|
||||
(generated + generated_offset) * ntasks / (guessfactor * seconds),
|
||||
guesscount * ((guessfactor * seconds) / (generated + generated_offset) / ntasks) / 3600.0,
|
||||
guesscount);
|
||||
alarm(1);
|
||||
}
|
||||
|
||||
#define CHECK(x) if(!(x)) { fprintf(stderr, "error exit: error returned by %s\n", #x); exit(2); }
|
||||
|
||||
const char *prefix = NULL, *infix = NULL;
|
||||
size_t prefixlen = 0;
|
||||
int ignorecase;
|
||||
typedef D0_BOOL (*fingerprint_func) (const d0_blind_id_t *ctx, char *outbuf, size_t *outbuflen);
|
||||
D0_BOOL fastreject(const d0_blind_id_t *ctx, void *pass)
|
||||
{
|
||||
static char fp64[513]; size_t fp64size = 512;
|
||||
CHECK(((fingerprint_func) pass)(ctx, fp64, &fp64size));
|
||||
++generated;
|
||||
if(ignorecase)
|
||||
{
|
||||
if(prefixlen)
|
||||
if(strncasecmp(fp64, prefix, prefixlen))
|
||||
return 1;
|
||||
if(infix)
|
||||
{
|
||||
fp64[fp64size] = 0;
|
||||
if(!strcasestr(fp64, infix))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(prefixlen)
|
||||
if(memcmp(fp64, prefix, prefixlen))
|
||||
return 1;
|
||||
if(infix)
|
||||
{
|
||||
fp64[fp64size] = 0;
|
||||
if(!strstr(fp64, infix))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int opt;
|
||||
size_t lumpsize[2];
|
||||
const char *lumps[2];
|
||||
char *databuf_in; size_t databufsize_in;
|
||||
char *databuf_out; size_t databufsize_out;
|
||||
char *databuf_sig; size_t databufsize_sig;
|
||||
char lumps_w0[65536];
|
||||
char lumps_w1[65536];
|
||||
const char *pubkeyfile = NULL, *privkeyfile = NULL, *pubidfile = NULL, *prividfile = NULL, *idreqfile = NULL, *idresfile = NULL, *outfile = NULL, *outfile2 = NULL, *camouflagefile = NULL, *datafile = NULL, *sigfile = NULL;
|
||||
char fp64[513]; size_t fp64size = 512;
|
||||
int mask = 0;
|
||||
int bits = 1024;
|
||||
int i;
|
||||
D0_BOOL do_fastreject = 1;
|
||||
d0_blind_id_t *ctx;
|
||||
if(!d0_blind_id_INITIALIZE())
|
||||
{
|
||||
fprintf(stderr, "could not initialize\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
umask_save = umask(0022);
|
||||
|
||||
ctx = d0_blind_id_new();
|
||||
while((opt = getopt(argc, argv, "d:s:p:P:i:I:j:J:o:O:c:b:x:X:y:Fn:C0")) != -1)
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'C':
|
||||
ignorecase = 1;
|
||||
break;
|
||||
case 'n':
|
||||
ntasks = atoi(optarg);
|
||||
break;
|
||||
case 'b':
|
||||
bits = atoi(optarg);
|
||||
break;
|
||||
case 'p': // d0pk = <pubkey> <modulus>
|
||||
pubkeyfile = optarg;
|
||||
mask |= 1;
|
||||
break;
|
||||
case 'P': // d0sk = <privkey> <modulus>
|
||||
privkeyfile = optarg;
|
||||
mask |= 2;
|
||||
break;
|
||||
case 'i': // d0pi = <pubid>
|
||||
pubidfile = optarg;
|
||||
mask |= 4;
|
||||
break;
|
||||
case 'I': // d0si = <privid>
|
||||
prividfile = optarg;
|
||||
mask |= 8;
|
||||
break;
|
||||
case 'j': // d0iq = <req>
|
||||
idreqfile = optarg;
|
||||
mask |= 0x10;
|
||||
break;
|
||||
case 'J': // d0ir = <resp>
|
||||
idresfile = optarg;
|
||||
mask |= 0x20;
|
||||
break;
|
||||
case 'o':
|
||||
outfile = optarg;
|
||||
mask |= 0x40;
|
||||
break;
|
||||
case 'O':
|
||||
outfile2 = optarg;
|
||||
mask |= 0x80;
|
||||
break;
|
||||
case 'c':
|
||||
camouflagefile = optarg;
|
||||
mask |= 0x100;
|
||||
break;
|
||||
case 'x':
|
||||
prefix = optarg;
|
||||
prefixlen = strlen(prefix);
|
||||
break;
|
||||
case '0':
|
||||
// test mode
|
||||
mask |= 0x200;
|
||||
break;
|
||||
case 'd':
|
||||
datafile = optarg;
|
||||
mask |= 0x400;
|
||||
break;
|
||||
case 's':
|
||||
sigfile = optarg;
|
||||
mask |= 0x800;
|
||||
break;
|
||||
case 'X':
|
||||
infix = optarg;
|
||||
break;
|
||||
case 'F':
|
||||
do_fastreject = 0;
|
||||
break;
|
||||
default:
|
||||
USAGE(*argv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// fastreject is a slight slowdown when rejecting nothing at all
|
||||
if(!infix && !prefixlen)
|
||||
do_fastreject = 0;
|
||||
|
||||
guesscount = pow(64.0, prefixlen);
|
||||
if(infix)
|
||||
guesscount /= (1 - pow(1 - pow(1/64.0, strlen(infix)), 44 - prefixlen - strlen(infix)));
|
||||
// 44 chars; prefix is assumed to not match the infix (although it theoretically could)
|
||||
// 43'th char however is always '=' and does not count
|
||||
if(ignorecase)
|
||||
{
|
||||
if(infix)
|
||||
for(i = 0; infix[i]; ++i)
|
||||
if(toupper(infix[i]) != tolower(infix[i]))
|
||||
guesscount /= 2;
|
||||
for(i = 0; i < (int)prefixlen; ++i)
|
||||
if(toupper(prefix[i]) != tolower(prefix[i]))
|
||||
guesscount /= 2;
|
||||
}
|
||||
|
||||
if(do_fastreject)
|
||||
{
|
||||
// fastreject: reject function gets called about log(2^bits) times more often
|
||||
guessfactor = bits * log(2) / 2;
|
||||
// so guess function gets called guesscount * guessfactor times, and it tests as many valid keys as guesscount
|
||||
}
|
||||
|
||||
if(mask & 1)
|
||||
{
|
||||
file2lumps(pubkeyfile, FOURCC_D0PK, lumps, lumpsize, 2);
|
||||
if(!d0_blind_id_read_public_key(ctx, lumps[0], lumpsize[0]))
|
||||
{
|
||||
fprintf(stderr, "could not decode public key\n");
|
||||
exit(1);
|
||||
}
|
||||
if(!d0_blind_id_read_private_id_modulus(ctx, lumps[1], lumpsize[1]))
|
||||
{
|
||||
fprintf(stderr, "could not decode modulus\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if(mask & 2)
|
||||
{
|
||||
file2lumps(privkeyfile, FOURCC_D0SK, lumps, lumpsize, 2);
|
||||
if(!d0_blind_id_read_private_key(ctx, lumps[0], lumpsize[0]))
|
||||
{
|
||||
fprintf(stderr, "could not decode private key\n");
|
||||
exit(1);
|
||||
}
|
||||
if(!d0_blind_id_read_private_id_modulus(ctx, lumps[1], lumpsize[1]))
|
||||
{
|
||||
fprintf(stderr, "could not decode modulus\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(mask & 4)
|
||||
{
|
||||
file2lumps(pubidfile, FOURCC_D0PI, lumps, lumpsize, 1);
|
||||
if(!d0_blind_id_read_public_id(ctx, lumps[0], lumpsize[0]))
|
||||
{
|
||||
fprintf(stderr, "could not decode public ID\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if(mask & 8)
|
||||
{
|
||||
file2lumps(prividfile, FOURCC_D0SI, lumps, lumpsize, 1);
|
||||
if(!d0_blind_id_read_private_id(ctx, lumps[0], lumpsize[0]))
|
||||
{
|
||||
fprintf(stderr, "could not decode private ID\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(mask & 0x10)
|
||||
{
|
||||
file2lumps(idreqfile, FOURCC_D0IQ, lumps, lumpsize, 1);
|
||||
lumpsize[1] = sizeof(lumps_w1);
|
||||
lumps[1] = lumps_w1;
|
||||
if(!d0_blind_id_answer_private_id_request(ctx, lumps[0], lumpsize[0], lumps_w1, &lumpsize[1]))
|
||||
{
|
||||
fprintf(stderr, "could not answer private ID request\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if((mask & 0x120) == 0x120)
|
||||
{
|
||||
file2lumps(camouflagefile, FOURCC_D0IC, lumps, lumpsize, 1);
|
||||
if(!d0_blind_id_read_private_id_request_camouflage(ctx, lumps[0], lumpsize[0]))
|
||||
{
|
||||
fprintf(stderr, "could not decode camouflage\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
file2lumps(idresfile, FOURCC_D0IR, lumps, lumpsize, 1);
|
||||
if(!d0_blind_id_finish_private_id_request(ctx, lumps[0], lumpsize[0]))
|
||||
{
|
||||
fprintf(stderr, "could not finish private ID request\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(mask & 0x400)
|
||||
{
|
||||
file2buf(datafile, &databuf_in, &databufsize_in);
|
||||
if(!databuf_in)
|
||||
{
|
||||
fprintf(stderr, "could not decode data\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(mask & 0x800)
|
||||
{
|
||||
file2buf(sigfile, &databuf_sig, &databufsize_sig);
|
||||
if(!databuf_sig)
|
||||
{
|
||||
fprintf(stderr, "could not decode signature\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
switch(mask)
|
||||
{
|
||||
// modes of operation:
|
||||
case 0x40:
|
||||
// nothing -> private key file (incl modulus), print fingerprint
|
||||
generated = 0;
|
||||
generated_offset = 0;
|
||||
seconds = 0;
|
||||
signal(SIGALRM, print_generated);
|
||||
alarm(1);
|
||||
if(do_fastreject)
|
||||
{
|
||||
CHECK(d0_blind_id_generate_private_key_fastreject(ctx, bits, fastreject, d0_blind_id_fingerprint64_public_key));
|
||||
}
|
||||
else
|
||||
{
|
||||
guessfactor = 1; // no fastreject here
|
||||
do
|
||||
{
|
||||
CHECK(d0_blind_id_generate_private_key(ctx, bits));
|
||||
}
|
||||
while(fastreject(ctx, d0_blind_id_fingerprint64_public_key));
|
||||
}
|
||||
alarm(0);
|
||||
signal(SIGALRM, NULL);
|
||||
CHECK(d0_blind_id_generate_private_id_modulus(ctx));
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
lumps[1] = lumps_w1;
|
||||
lumpsize[1] = sizeof(lumps_w1);
|
||||
CHECK(d0_blind_id_write_private_key(ctx, lumps_w0, &lumpsize[0]));
|
||||
CHECK(d0_blind_id_write_private_id_modulus(ctx, lumps_w1, &lumpsize[1]));
|
||||
lumps2file(outfile, FOURCC_D0SK, lumps, lumpsize, 2, 1);
|
||||
break;
|
||||
case 0x42:
|
||||
// private key file -> public key file (incl modulus)
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
lumps[1] = lumps_w1;
|
||||
lumpsize[1] = sizeof(lumps_w1);
|
||||
CHECK(d0_blind_id_write_public_key(ctx, lumps_w0, &lumpsize[0]));
|
||||
CHECK(d0_blind_id_write_private_id_modulus(ctx, lumps_w1, &lumpsize[1]));
|
||||
lumps2file(outfile, FOURCC_D0PK, lumps, lumpsize, 2, 0);
|
||||
break;
|
||||
case 0x41:
|
||||
// public key file -> unsigned private ID file
|
||||
generated = 0;
|
||||
generated_offset = 0;
|
||||
seconds = 0;
|
||||
signal(SIGALRM, print_generated);
|
||||
alarm(1);
|
||||
guessfactor = 1; // no fastreject here
|
||||
do
|
||||
{
|
||||
CHECK(d0_blind_id_generate_private_id_start(ctx));
|
||||
}
|
||||
while(fastreject(ctx, d0_blind_id_fingerprint64_public_id));
|
||||
alarm(0);
|
||||
signal(SIGALRM, 0);
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
CHECK(d0_blind_id_write_private_id(ctx, lumps_w0, &lumpsize[0]));
|
||||
lumps2file(outfile, FOURCC_D0SI, lumps, lumpsize, 1, 1);
|
||||
break;
|
||||
case 0xC9:
|
||||
// public key file, unsigned private ID file -> ID request file and camouflage file
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
CHECK(d0_blind_id_generate_private_id_request(ctx, lumps_w0, &lumpsize[0]));
|
||||
lumps2file(outfile, FOURCC_D0IQ, lumps, lumpsize, 1, 0);
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
CHECK(d0_blind_id_write_private_id_request_camouflage(ctx, lumps_w0, &lumpsize[0]));
|
||||
lumps2file(outfile2, FOURCC_D0IC, lumps, lumpsize, 1, 1);
|
||||
break;
|
||||
case 0x52:
|
||||
// private key file, ID request file -> ID response file
|
||||
lumps2file(outfile, FOURCC_D0IR, lumps+1, lumpsize+1, 1, 0);
|
||||
break;
|
||||
case 0x169:
|
||||
// public key file, ID response file, private ID file -> signed private ID file
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
CHECK(d0_blind_id_write_private_id(ctx, lumps_w0, &lumpsize[0]));
|
||||
lumps2file(outfile, FOURCC_D0SI, lumps, lumpsize, 1, 1);
|
||||
break;
|
||||
case 0x4A:
|
||||
// private key file, private ID file -> signed private ID file
|
||||
{
|
||||
char buf[65536]; size_t bufsize;
|
||||
char buf2[65536]; size_t buf2size;
|
||||
D0_BOOL status;
|
||||
d0_blind_id_t *ctx2 = d0_blind_id_new();
|
||||
CHECK(d0_blind_id_copy(ctx2, ctx));
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_start(ctx, 1, 1, "hello world", 11, buf, &bufsize));
|
||||
buf2size = sizeof(buf2);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_challenge(ctx2, 1, 1, buf, bufsize, buf2, &buf2size, &status));
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_response(ctx, buf2, buf2size, buf, &bufsize));
|
||||
buf2size = sizeof(buf2);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_verify(ctx2, buf, bufsize, buf2, &buf2size, &status));
|
||||
CHECK(status == 0);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_generate_missing_signature(ctx2));
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
CHECK(d0_blind_id_write_private_id(ctx2, lumps_w0, &lumpsize[0]));
|
||||
lumps2file(outfile, FOURCC_D0SI, lumps, lumpsize, 1, 1);
|
||||
}
|
||||
break;
|
||||
case 0x48:
|
||||
// private ID file -> public ID file
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
CHECK(d0_blind_id_write_public_id(ctx, lumps_w0, &lumpsize[0]));
|
||||
lumps2file(outfile, FOURCC_D0PI, lumps, lumpsize, 1, 0);
|
||||
break;
|
||||
case 0x01:
|
||||
case 0x02:
|
||||
// public/private key file -> fingerprint
|
||||
CHECK(d0_blind_id_fingerprint64_public_key(ctx, fp64, &fp64size));
|
||||
printf("%.*s\n", (int)fp64size, fp64);
|
||||
break;
|
||||
case 0x05:
|
||||
case 0x09:
|
||||
// public/private ID file -> fingerprint
|
||||
CHECK(d0_blind_id_fingerprint64_public_id(ctx, fp64, &fp64size));
|
||||
printf("%.*s\n", (int)fp64size, fp64);
|
||||
break;
|
||||
case 0x449:
|
||||
// public key, private ID, data -> signed data
|
||||
databufsize_out = databufsize_in + 8192;
|
||||
databuf_out = malloc(databufsize_out);
|
||||
CHECK(d0_blind_id_sign_with_private_id_sign(ctx, 1, 0, databuf_in, databufsize_in, databuf_out, &databufsize_out));
|
||||
buf2file(outfile, databuf_out, databufsize_out);
|
||||
break;
|
||||
case 0x489:
|
||||
// public key, private ID, data -> signature
|
||||
databufsize_out = databufsize_in + 8192;
|
||||
databuf_out = malloc(databufsize_out);
|
||||
CHECK(d0_blind_id_sign_with_private_id_sign_detached(ctx, 1, 0, databuf_in, databufsize_in, databuf_out, &databufsize_out));
|
||||
buf2file(outfile2, databuf_out, databufsize_out);
|
||||
break;
|
||||
case 0x841:
|
||||
case 0x8C1:
|
||||
// public key, signed data -> data, optional public ID
|
||||
{
|
||||
D0_BOOL status;
|
||||
databufsize_out = databufsize_sig;
|
||||
databuf_out = malloc(databufsize_out);
|
||||
CHECK(d0_blind_id_sign_with_private_id_verify(ctx, 1, 0, databuf_sig, databufsize_sig, databuf_out, &databufsize_out, &status));
|
||||
CHECK(d0_blind_id_fingerprint64_public_id(ctx, fp64, &fp64size));
|
||||
printf("%d\n", (int)status);
|
||||
printf("%.*s\n", (int)fp64size, fp64);
|
||||
buf2file(outfile, databuf_out, databufsize_out);
|
||||
|
||||
if(outfile2)
|
||||
{
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
lumps[1] = lumps_w1;
|
||||
lumpsize[1] = sizeof(lumps_w1);
|
||||
CHECK(d0_blind_id_write_public_key(ctx, lumps_w0, &lumpsize[0]));
|
||||
CHECK(d0_blind_id_write_private_id_modulus(ctx, lumps_w1, &lumpsize[1]));
|
||||
lumps2file(outfile2, FOURCC_D0PK, lumps, lumpsize, 2, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0xC01:
|
||||
case 0xC81:
|
||||
// public key, signature, signed data -> optional public ID
|
||||
{
|
||||
D0_BOOL status;
|
||||
CHECK(d0_blind_id_sign_with_private_id_verify_detached(ctx, 1, 0, databuf_sig, databufsize_sig, databuf_in, databufsize_in, &status));
|
||||
CHECK(d0_blind_id_fingerprint64_public_id(ctx, fp64, &fp64size));
|
||||
printf("%d\n", (int)status);
|
||||
printf("%.*s\n", (int)fp64size, fp64);
|
||||
|
||||
if(outfile2)
|
||||
{
|
||||
lumps[0] = lumps_w0;
|
||||
lumpsize[0] = sizeof(lumps_w0);
|
||||
lumps[1] = lumps_w1;
|
||||
lumpsize[1] = sizeof(lumps_w1);
|
||||
CHECK(d0_blind_id_write_public_key(ctx, lumps_w0, &lumpsize[0]));
|
||||
CHECK(d0_blind_id_write_private_id_modulus(ctx, lumps_w1, &lumpsize[1]));
|
||||
lumps2file(outfile2, FOURCC_D0PK, lumps, lumpsize, 2, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case 0x09:
|
||||
// public key, private ID file -> test whether key is properly signed
|
||||
{
|
||||
char buf[65536]; size_t bufsize;
|
||||
char buf2[65536]; size_t buf2size;
|
||||
D0_BOOL status;
|
||||
d0_blind_id_t *ctx2 = d0_blind_id_new();
|
||||
CHECK(d0_blind_id_copy(ctx2, ctx));
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_start(ctx, 1, 1, "hello world", 11, buf, &bufsize));
|
||||
buf2size = sizeof(buf2);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_challenge(ctx2, 1, 1, buf, bufsize, buf2, &buf2size, &status));
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_response(ctx, buf2, buf2size, buf, &bufsize));
|
||||
buf2size = sizeof(buf2);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_verify(ctx2, buf, bufsize, buf2, &buf2size, &status));
|
||||
if(status)
|
||||
printf("OK\n");
|
||||
else
|
||||
printf("EPIC FAIL\n");
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case 0x209:
|
||||
// protocol client
|
||||
{
|
||||
char hexbuf[131073];
|
||||
const char hex[] = "0123456789abcdef";
|
||||
char buf[65536]; size_t bufsize;
|
||||
char buf2[65536]; size_t buf2size;
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_start(ctx, 1, 1, "hello world", 11, buf, &bufsize));
|
||||
for(i = 0; i < (int)bufsize; ++i)
|
||||
sprintf(&hexbuf[2*i], "%02x", (unsigned char)buf[i]);
|
||||
printf("%s\n", hexbuf);
|
||||
fgets(hexbuf, sizeof(hexbuf), stdin);
|
||||
buf2size = strlen(hexbuf) / 2;
|
||||
for(i = 0; i < (int)buf2size; ++i)
|
||||
buf2[i] = ((strchr(hex, hexbuf[2*i]) - hex) << 4) | (strchr(hex, hexbuf[2*i+1]) - hex);
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_response(ctx, buf2, buf2size, buf, &bufsize));
|
||||
for(i = 0; i < (int)bufsize; ++i)
|
||||
sprintf(&hexbuf[2*i], "%02x", (unsigned char)buf[i]);
|
||||
printf("%s\n", hexbuf);
|
||||
}
|
||||
break;
|
||||
case 0x201:
|
||||
// protocol server
|
||||
{
|
||||
char hexbuf[131073];
|
||||
const char hex[] = "0123456789abcdef";
|
||||
char buf[65536]; size_t bufsize;
|
||||
char buf2[65536]; size_t buf2size;
|
||||
D0_BOOL status;
|
||||
fgets(hexbuf, sizeof(hexbuf), stdin);
|
||||
buf2size = strlen(hexbuf) / 2;
|
||||
for(i = 0; i < (int)buf2size; ++i)
|
||||
buf2[i] = ((strchr(hex, hexbuf[2*i]) - hex) << 4) | (strchr(hex, hexbuf[2*i+1]) - hex);
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_challenge(ctx, 1, 1, buf2, buf2size, buf, &bufsize, &status));
|
||||
for(i = 0; i < (int)bufsize; ++i)
|
||||
sprintf(&hexbuf[2*i], "%02x", (unsigned char)buf[i]);
|
||||
printf("%s\n", hexbuf);
|
||||
fgets(hexbuf, sizeof(hexbuf), stdin);
|
||||
buf2size = strlen(hexbuf) / 2;
|
||||
for(i = 0; i < (int)buf2size; ++i)
|
||||
buf2[i] = ((strchr(hex, hexbuf[2*i]) - hex) << 4) | (strchr(hex, hexbuf[2*i+1]) - hex);
|
||||
bufsize = sizeof(buf);
|
||||
CHECK(d0_blind_id_authenticate_with_private_id_verify(ctx, buf2, buf2size, buf, &bufsize, &status));
|
||||
printf("verify status: %d\n", status);
|
||||
|
||||
CHECK(d0_blind_id_fingerprint64_public_id(ctx, fp64, &fp64size));
|
||||
printf("%.*s\n", (int)fp64size, fp64);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
USAGE(*argv);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
d0_blind_id_SHUTDOWN();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
#ifndef CRYPTO_H
|
||||
#define CRYPTO_H
|
||||
|
||||
extern cvar_t crypto_developer;
|
||||
extern cvar_t crypto_aeslevel;
|
||||
#define ENCRYPTION_REQUIRED (crypto_aeslevel.integer >= 3)
|
||||
|
||||
extern int crypto_keyfp_recommended_length; // applies to LOCAL IDs, and to ALL keys
|
||||
|
||||
#define CRYPTO_HEADERSIZE 31
|
||||
// AES case causes 16 to 31 bytes overhead
|
||||
// SHA256 case causes 16 bytes overhead as we truncate to 128bit
|
||||
|
||||
#include "lhnet.h"
|
||||
|
||||
#define FP64_SIZE 44
|
||||
#define DHKEY_SIZE 16
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char dhkey[DHKEY_SIZE]; // shared key, not NUL terminated
|
||||
char client_idfp[FP64_SIZE+1];
|
||||
char client_keyfp[FP64_SIZE+1]; // NULL if signature fail
|
||||
char server_idfp[FP64_SIZE+1];
|
||||
char server_keyfp[FP64_SIZE+1]; // NULL if signature fail
|
||||
qboolean authenticated;
|
||||
qboolean use_aes;
|
||||
void *data;
|
||||
}
|
||||
crypto_t;
|
||||
|
||||
void Crypto_Init(void);
|
||||
void Crypto_Init_Commands(void);
|
||||
void Crypto_LoadKeys(void); // NOTE: when this is called, the SV_LockThreadMutex MUST be active
|
||||
void Crypto_Shutdown(void);
|
||||
qboolean Crypto_Available(void);
|
||||
void sha256(unsigned char *out, const unsigned char *in, int n); // may ONLY be called if Crypto_Available()
|
||||
const void *Crypto_EncryptPacket(crypto_t *crypto, const void *data_src, size_t len_src, void *data_dst, size_t *len_dst, size_t len);
|
||||
const void *Crypto_DecryptPacket(crypto_t *crypto, const void *data_src, size_t len_src, void *data_dst, size_t *len_dst, size_t len);
|
||||
#define CRYPTO_NOMATCH 0 // process as usual (packet was not used)
|
||||
#define CRYPTO_MATCH 1 // process as usual (packet was used)
|
||||
#define CRYPTO_DISCARD 2 // discard this packet
|
||||
#define CRYPTO_REPLACE 3 // make the buffer the current packet
|
||||
int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, lhnetaddress_t *peeraddress);
|
||||
int Crypto_ServerParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, lhnetaddress_t *peeraddress);
|
||||
|
||||
// if len_out is nonzero, the packet is to be sent to the client
|
||||
|
||||
qboolean Crypto_ServerAppendToChallenge(const char *data_in, size_t len_in, char *data_out, size_t *len_out, size_t maxlen);
|
||||
crypto_t *Crypto_ServerGetInstance(lhnetaddress_t *peeraddress);
|
||||
qboolean Crypto_FinishInstance(crypto_t *out, crypto_t *in); // also clears allocated memory, and frees the instance received by ServerGetInstance
|
||||
const char *Crypto_GetInfoResponseDataString(void);
|
||||
|
||||
// retrieves a host key for an address (can be exposed to menuqc, or used by the engine to look up stored keys e.g. for server bookmarking)
|
||||
// pointers may be NULL
|
||||
qboolean Crypto_RetrieveHostKey(lhnetaddress_t *peeraddress, int *keyid, char *keyfp, size_t keyfplen, char *idfp, size_t idfplen, int *aeslevel);
|
||||
int Crypto_RetrieveLocalKey(int keyid, char *keyfp, size_t keyfplen, char *idfp, size_t idfplen, qboolean *issigned); // return value: -1 if more to come, +1 if valid, 0 if end of list
|
||||
|
||||
size_t Crypto_SignData(const void *data, size_t datasize, int keyid, void *signed_data, size_t signed_size);
|
||||
size_t Crypto_SignDataDetached(const void *data, size_t datasize, int keyid, void *signed_data, size_t signed_size);
|
||||
|
||||
// netconn protocol:
|
||||
// non-crypto:
|
||||
// getchallenge >
|
||||
// < challenge
|
||||
// connect >
|
||||
// < accept (or: reject)
|
||||
// crypto:
|
||||
// getchallenge >
|
||||
// < challenge SP <challenge> NUL vlen <size> d0pk <fingerprints I can auth to> NUL NUL <other fingerprints I accept>
|
||||
//
|
||||
// IF serverfp:
|
||||
// d0pk\cnt\0\challenge\<challenge>\aeslevel\<level> NUL <serverfp> NUL <clientfp>
|
||||
// >
|
||||
// check if client would get accepted; if not, do "reject" now
|
||||
// require non-control packets to be encrypted require non-control packets to be encrypted
|
||||
// do not send anything yet do not send anything yet
|
||||
// RESET to serverfp RESET to serverfp
|
||||
// d0_blind_id_authenticate_with_private_id_start() = 1
|
||||
// < d0pk\cnt\1\aes\<aesenabled> NUL *startdata*
|
||||
// d0_blind_id_authenticate_with_private_id_challenge() = 1
|
||||
// d0pk\cnt\2 NUL *challengedata* >
|
||||
// d0_blind_id_authenticate_with_private_id_response() = 0
|
||||
// < d0pk\cnt\3 NUL *responsedata*
|
||||
// d0_blind_id_authenticate_with_private_id_verify() = 1
|
||||
// store server's fingerprint NOW
|
||||
// d0_blind_id_sessionkey_public_id() = 1 d0_blind_id_sessionkey_public_id() = 1
|
||||
//
|
||||
// IF clientfp AND NOT serverfp:
|
||||
// RESET to clientfp RESET to clientfp
|
||||
// d0_blind_id_authenticate_with_private_id_start() = 1
|
||||
// d0pk\cnt\0\challenge\<challenge>\aeslevel\<level> NUL NUL <clientfp> NUL *startdata*
|
||||
// >
|
||||
// check if client would get accepted; if not, do "reject" now
|
||||
// require non-control packets to be encrypted require non-control packets to be encrypted
|
||||
// d0_blind_id_authenticate_with_private_id_challenge() = 1
|
||||
// < d0pk\cnt\5\aes\<aesenabled> NUL *challengedata*
|
||||
//
|
||||
// IF clientfp AND serverfp:
|
||||
// RESET to clientfp RESET to clientfp
|
||||
// d0_blind_id_authenticate_with_private_id_start() = 1
|
||||
// d0pk\cnt\4 NUL *startdata* >
|
||||
// d0_blind_id_authenticate_with_private_id_challenge() = 1
|
||||
// < d0pk\cnt\5 NUL *challengedata*
|
||||
//
|
||||
// IF clientfp:
|
||||
// d0_blind_id_authenticate_with_private_id_response() = 0
|
||||
// d0pk\cnt\6 NUL *responsedata* >
|
||||
// d0_blind_id_authenticate_with_private_id_verify() = 1
|
||||
// store client's fingerprint NOW
|
||||
// d0_blind_id_sessionkey_public_id() = 1 d0_blind_id_sessionkey_public_id() = 1
|
||||
// note: the ... is the "connect" message, except without the challenge. Reinterpret as regular connect message on server side
|
||||
//
|
||||
// enforce encrypted transmission (key is XOR of the two DH keys)
|
||||
//
|
||||
// IF clientfp:
|
||||
// < challenge (mere sync message)
|
||||
//
|
||||
// connect\... >
|
||||
// < accept (ALWAYS accept if connection is encrypted, ignore challenge as it had been checked before)
|
||||
//
|
||||
// commence with ingame protocol
|
||||
|
||||
// in short:
|
||||
// server:
|
||||
// getchallenge NUL d0_blind_id: reply with challenge with added fingerprints
|
||||
// cnt=0: IF server will auth, cnt=1, ELSE cnt=5
|
||||
// cnt=2: cnt=3
|
||||
// cnt=4: cnt=5
|
||||
// cnt=6: send "challenge"
|
||||
// client:
|
||||
// challenge with added fingerprints: cnt=0; if client will auth but not server, append client auth start
|
||||
// cnt=1: cnt=2
|
||||
// cnt=3: IF client will auth, cnt=4, ELSE rewrite as "challenge"
|
||||
// cnt=5: cnt=6, server will continue by sending "challenge" (let's avoid sending two packets as response to one)
|
||||
// other change:
|
||||
// accept empty "challenge", and challenge-less connect in case crypto protocol has executed and finished
|
||||
// statusResponse and infoResponse get an added d0_blind_id key that lists
|
||||
// the keys the server can auth with and to in key@ca SPACE key@ca notation
|
||||
// any d0pk\ message has an appended "id" parameter; messages with an unexpected "id" are ignored to prevent errors from multiple concurrent auth runs
|
||||
|
||||
|
||||
// comparison to OTR:
|
||||
// - encryption: yes
|
||||
// - authentication: yes
|
||||
// - deniability: no (attacker requires the temporary session key to prove you
|
||||
// have sent a specific message, the private key itself does not suffice), no
|
||||
// measures are taken to provide forgeability to even provide deniability
|
||||
// against an attacker who knows the temporary session key, as using CTR mode
|
||||
// for the encryption - which, together with deriving the MAC key from the
|
||||
// encryption key, and MACing the ciphertexts instead of the plaintexts,
|
||||
// would provide forgeability and thus deniability - requires longer
|
||||
// encrypted packets and deniability was not a goal of this, as we may e.g.
|
||||
// reserve the right to capture packet dumps + extra state info to prove a
|
||||
// client/server has sent specific packets to prove cheating)
|
||||
// - perfect forward secrecy: yes (session key is derived via DH key exchange)
|
||||
|
||||
#endif
|
|
@ -0,0 +1,121 @@
|
|||
#ifndef CSPROGS_H
|
||||
#define CSPROGS_H
|
||||
|
||||
// LordHavoc: changed to match MAX_EDICTS
|
||||
#define CL_MAX_EDICTS MAX_EDICTS
|
||||
|
||||
#define ENTMASK_ENGINE 1
|
||||
#define ENTMASK_ENGINEVIEWMODELS 2
|
||||
#define ENTMASK_NORMAL 4
|
||||
|
||||
#define VF_MIN 1 //(vector)
|
||||
#define VF_MIN_X 2 //(float)
|
||||
#define VF_MIN_Y 3 //(float)
|
||||
#define VF_SIZE 4 //(vector) (viewport size)
|
||||
#define VF_SIZE_X 5 //(float)
|
||||
#define VF_SIZE_Y 6 //(float)
|
||||
#define VF_VIEWPORT 7 //(vector, vector)
|
||||
#define VF_FOV 8 //(vector)
|
||||
#define VF_FOVX 9 //(float)
|
||||
#define VF_FOVY 10 //(float)
|
||||
#define VF_ORIGIN 11 //(vector)
|
||||
#define VF_ORIGIN_X 12 //(float)
|
||||
#define VF_ORIGIN_Y 13 //(float)
|
||||
#define VF_ORIGIN_Z 14 //(float)
|
||||
#define VF_ANGLES 15 //(vector)
|
||||
#define VF_ANGLES_X 16 //(float)
|
||||
#define VF_ANGLES_Y 17 //(float)
|
||||
#define VF_ANGLES_Z 18 //(float)
|
||||
|
||||
#define VF_DRAWWORLD 19 //(float) //actually world model and sky
|
||||
#define VF_DRAWENGINESBAR 20 //(float)
|
||||
#define VF_DRAWCROSSHAIR 21 //(float)
|
||||
|
||||
#define VF_CL_VIEWANGLES 33 //(vector) //sweet thing for RPGs/...
|
||||
#define VF_CL_VIEWANGLES_X 34 //(float)
|
||||
#define VF_CL_VIEWANGLES_Y 35 //(float)
|
||||
#define VF_CL_VIEWANGLES_Z 36 //(float)
|
||||
|
||||
// FTEQW's extension range
|
||||
#define VF_PERSPECTIVE 200 //(float)
|
||||
|
||||
// what is this doing here? This is a DP extension introduced by Black, should be in 4xx range
|
||||
#define VF_CLEARSCREEN 201 //(float)
|
||||
|
||||
// what is this doing here? This is a DP extension introduced by VorteX, should be in 4xx range
|
||||
#define VF_FOG_DENSITY 202 //(float)
|
||||
#define VF_FOG_COLOR 203 //(vector)
|
||||
#define VF_FOG_COLOR_R 204 //(float)
|
||||
#define VF_FOG_COLOR_G 205 //(float)
|
||||
#define VF_FOG_COLOR_B 206 //(float)
|
||||
#define VF_FOG_ALPHA 207 //(float)
|
||||
#define VF_FOG_START 208 //(float)
|
||||
#define VF_FOG_END 209 //(float)
|
||||
#define VF_FOG_HEIGHT 210 //(float)
|
||||
#define VF_FOG_FADEDEPTH 211 //(float)
|
||||
|
||||
// DP's extension range
|
||||
#define VF_MAINVIEW 400 //(float)
|
||||
#define VF_MINFPS_QUALITY 401 //(float)
|
||||
|
||||
#define RF_VIEWMODEL 1 // The entity is never drawn in mirrors. In engines with realtime lighting, it casts no shadows.
|
||||
#define RF_EXTERNALMODEL 2 // The entity is appears in mirrors but not in the normal view. It does still cast shadows in engines with realtime lighting.
|
||||
#define RF_DEPTHHACK 4 // The entity appears closer to the view than normal, either by scaling it wierdly or by just using a depthrange. This will usually be found in conjunction with RF_VIEWMODEL
|
||||
#define RF_ADDITIVE 8 // Add the entity acording to it's alpha values instead of the normal blend
|
||||
#define RF_USEAXIS 16 // When set, the entity will use the v_forward, v_right and v_up globals instead of it's angles field for orientation. Angles will be ignored compleatly.
|
||||
// Note that to use this properly, you'll NEED to use the predraw function to set the globals.
|
||||
//#define RF_DOUBLESIDED 32
|
||||
#define RF_USETRANSPARENTOFFSET 64 // Allows QC to customize origin used for transparent sorting via transparent_origin global, helps to fix transparent sorting bugs on a very large entities
|
||||
#define RF_WORLDOBJECT 128 // for large outdoor entities that should not be culled
|
||||
#define RF_MODELLIGHT 4096 // CSQC-set model light
|
||||
#define RF_DYNAMICMODELLIGHT 8192 // origin-dependent model light
|
||||
|
||||
#define RF_FULLBRIGHT 256
|
||||
#define RF_NOSHADOW 512
|
||||
|
||||
extern cvar_t csqc_progname; //[515]: csqc crc check and right csprogs name according to progs.dat
|
||||
extern cvar_t csqc_progcrc;
|
||||
extern cvar_t csqc_progsize;
|
||||
|
||||
void CL_VM_PreventInformationLeaks(void);
|
||||
|
||||
qboolean MakeDownloadPacket(const char *filename, unsigned char *data, size_t len, int crc, int cnt, sizebuf_t *buf, int protocol);
|
||||
|
||||
qboolean CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out);
|
||||
|
||||
qboolean CL_VM_TransformView(int entnum, matrix4x4_t *viewmatrix, mplane_t *clipplane, vec3_t visorigin);
|
||||
|
||||
void CL_VM_Init(void);
|
||||
void CL_VM_ShutDown(void);
|
||||
void CL_VM_UpdateIntermissionState(int intermission);
|
||||
void CL_VM_UpdateShowingScoresState(int showingscores);
|
||||
qboolean CL_VM_InputEvent(int eventtype, float x, float y);
|
||||
qboolean CL_VM_ConsoleCommand(const char *cmd);
|
||||
void CL_VM_UpdateDmgGlobals(int dmg_take, int dmg_save, vec3_t dmg_origin);
|
||||
void CL_VM_UpdateIntermissionState(int intermission);
|
||||
qboolean CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed);
|
||||
qboolean CL_VM_Parse_TempEntity(void);
|
||||
void CL_VM_Parse_StuffCmd(const char *msg);
|
||||
void CL_VM_Parse_CenterPrint(const char *msg);
|
||||
int CL_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent);
|
||||
int CL_GetTagMatrix(prvm_prog_t *prog, matrix4x4_t *out, prvm_edict_t *ent, int tagindex);
|
||||
void CL_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatrix);
|
||||
/* VMs exposing the polygon calls must call this on Init/Reset */
|
||||
void VM_Polygons_Reset(prvm_prog_t *prog);
|
||||
void QW_CL_StartUpload(unsigned char *data, int size);
|
||||
|
||||
void CSQC_UpdateNetworkTimes(double newtime, double oldtime);
|
||||
void CSQC_AddPrintText(const char *msg);
|
||||
void CSQC_ReadEntities(void);
|
||||
void CSQC_RelinkAllEntities(int drawmask);
|
||||
void CSQC_RelinkCSQCEntities(void);
|
||||
void CSQC_Predraw(prvm_edict_t *ed);
|
||||
void CSQC_Think(prvm_edict_t *ed);
|
||||
qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum);//csprogs.c
|
||||
void CSQC_R_RecalcView(void);
|
||||
|
||||
dp_model_t *CL_GetModelByIndex(int modelindex);
|
||||
|
||||
int CL_VM_GetViewEntity(void);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,440 @@
|
|||
|
||||
/*
|
||||
this code written by Forest Hale, on 2004-10-17, and placed into public domain
|
||||
this implements Quadratic BSpline surfaces as seen in Quake3 by id Software
|
||||
|
||||
a small rant on misuse of the name 'bezier': many people seem to think that
|
||||
bezier is a generic term for splines, but it is not, it is a term for a
|
||||
specific type of bspline (4 control points, cubic bspline), bsplines are the
|
||||
generalization of the bezier spline to support dimensions other than cubic.
|
||||
|
||||
example equations for 1-5 control point bsplines being sampled as t=0...1
|
||||
1: flat (0th dimension)
|
||||
o = a
|
||||
2: linear (1st dimension)
|
||||
o = a * (1 - t) + b * t
|
||||
3: quadratic bspline (2nd dimension)
|
||||
o = a * (1 - t) * (1 - t) + 2 * b * (1 - t) * t + c * t * t
|
||||
4: cubic (bezier) bspline (3rd dimension)
|
||||
o = a * (1 - t) * (1 - t) * (1 - t) + 3 * b * (1 - t) * (1 - t) * t + 3 * c * (1 - t) * t * t + d * t * t * t
|
||||
5: quartic bspline (4th dimension)
|
||||
o = a * (1 - t) * (1 - t) * (1 - t) * (1 - t) + 4 * b * (1 - t) * (1 - t) * (1 - t) * t + 6 * c * (1 - t) * (1 - t) * t * t + 4 * d * (1 - t) * t * t * t + e * t * t * t * t
|
||||
|
||||
arbitrary dimension bspline
|
||||
double factorial(int n)
|
||||
{
|
||||
int i;
|
||||
double f;
|
||||
f = 1;
|
||||
for (i = 1;i < n;i++)
|
||||
f = f * i;
|
||||
return f;
|
||||
}
|
||||
double bsplinesample(int dimensions, double t, double *param)
|
||||
{
|
||||
double o = 0;
|
||||
for (i = 0;i < dimensions + 1;i++)
|
||||
o += param[i] * factorial(dimensions)/(factorial(i)*factorial(dimensions-i)) * pow(t, i) * pow(1 - t, dimensions - i);
|
||||
return o;
|
||||
}
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "mathlib.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "curves.h"
|
||||
|
||||
// Calculate number of resulting vertex rows/columns by given patch size and tesselation factor
|
||||
// tess=0 means that we reduce detalization of base 3x3 patches by removing middle row and column of vertices
|
||||
// "DimForTess" is "DIMension FOR TESSelation factor"
|
||||
// NB: tess=0 actually means that tess must be 0.5, but obviously it can't because it is of int type. (so "a*tess"-like code is replaced by "a/2" if tess=0)
|
||||
int Q3PatchDimForTess(int size, int tess)
|
||||
{
|
||||
if (tess > 0)
|
||||
return (size - 1) * tess + 1;
|
||||
else if (tess == 0)
|
||||
return (size - 1) / 2 + 1;
|
||||
else
|
||||
return 0; // Maybe warn about wrong tess here?
|
||||
}
|
||||
|
||||
// usage:
|
||||
// to expand a 5x5 patch to 21x21 vertices (4x4 tesselation), one might use this call:
|
||||
// Q3PatchSubdivideFloat(3, sizeof(float[3]), outvertices, 5, 5, sizeof(float[3]), patchvertices, 4, 4);
|
||||
void Q3PatchTesselateFloat(int numcomponents, int outputstride, float *outputvertices, int patchwidth, int patchheight, int inputstride, float *patchvertices, int tesselationwidth, int tesselationheight)
|
||||
{
|
||||
int k, l, x, y, component, outputwidth = Q3PatchDimForTess(patchwidth, tesselationwidth);
|
||||
float px, py, *v, a, b, c, *cp[3][3], temp[3][64];
|
||||
int xmax = max(1, 2*tesselationwidth);
|
||||
int ymax = max(1, 2*tesselationheight);
|
||||
|
||||
// iterate over the individual 3x3 quadratic spline surfaces one at a time
|
||||
// expanding them to fill the output array (with some overlap to ensure
|
||||
// the edges are filled)
|
||||
for (k = 0;k < patchheight-1;k += 2)
|
||||
{
|
||||
for (l = 0;l < patchwidth-1;l += 2)
|
||||
{
|
||||
// set up control point pointers for quicker lookup later
|
||||
for (y = 0;y < 3;y++)
|
||||
for (x = 0;x < 3;x++)
|
||||
cp[y][x] = (float *)((unsigned char *)patchvertices + ((k+y)*patchwidth+(l+x)) * inputstride);
|
||||
// for each row...
|
||||
for (y = 0;y <= ymax;y++)
|
||||
{
|
||||
// calculate control points for this row by collapsing the 3
|
||||
// rows of control points to one row using py
|
||||
py = (float)y / (float)ymax;
|
||||
// calculate quadratic spline weights for py
|
||||
a = ((1.0f - py) * (1.0f - py));
|
||||
b = ((1.0f - py) * (2.0f * py));
|
||||
c = (( py) * ( py));
|
||||
for (component = 0;component < numcomponents;component++)
|
||||
{
|
||||
temp[0][component] = cp[0][0][component] * a + cp[1][0][component] * b + cp[2][0][component] * c;
|
||||
temp[1][component] = cp[0][1][component] * a + cp[1][1][component] * b + cp[2][1][component] * c;
|
||||
temp[2][component] = cp[0][2][component] * a + cp[1][2][component] * b + cp[2][2][component] * c;
|
||||
}
|
||||
// fetch a pointer to the beginning of the output vertex row
|
||||
v = (float *)((unsigned char *)outputvertices + ((k * ymax / 2 + y) * outputwidth + l * xmax / 2) * outputstride);
|
||||
// for each column of the row...
|
||||
for (x = 0;x <= xmax;x++)
|
||||
{
|
||||
// calculate point based on the row control points
|
||||
px = (float)x / (float)xmax;
|
||||
// calculate quadratic spline weights for px
|
||||
// (could be precalculated)
|
||||
a = ((1.0f - px) * (1.0f - px));
|
||||
b = ((1.0f - px) * (2.0f * px));
|
||||
c = (( px) * ( px));
|
||||
for (component = 0;component < numcomponents;component++)
|
||||
v[component] = temp[0][component] * a + temp[1][component] * b + temp[2][component] * c;
|
||||
// advance to next output vertex using outputstride
|
||||
// (the next vertex may not be directly following this
|
||||
// one, as this may be part of a larger structure)
|
||||
v = (float *)((unsigned char *)v + outputstride);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
// enable this if you want results printed out
|
||||
printf("vertices[%i][%i] =\n{\n", (patchheight-1)*tesselationheight+1, (patchwidth-1)*tesselationwidth+1);
|
||||
for (y = 0;y < (patchheight-1)*tesselationheight+1;y++)
|
||||
{
|
||||
for (x = 0;x < (patchwidth-1)*tesselationwidth+1;x++)
|
||||
{
|
||||
printf("(");
|
||||
for (component = 0;component < numcomponents;component++)
|
||||
printf("%f ", outputvertices[(y*((patchwidth-1)*tesselationwidth+1)+x)*numcomponents+component]);
|
||||
printf(") ");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("}\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
static int Q3PatchTesselation(float largestsquared3xcurvearea, float tolerance)
|
||||
{
|
||||
float f;
|
||||
// f is actually a squared 2x curve area... so the formula had to be adjusted to give roughly the same subdivisions
|
||||
f = pow(largestsquared3xcurvearea / 64.0f, 0.25f) / tolerance;
|
||||
//if(f < 0.25) // VERY flat patches
|
||||
if(f < 0.0001) // TOTALLY flat patches
|
||||
return 0;
|
||||
else if(f < 2)
|
||||
return 1;
|
||||
else
|
||||
return (int) floor(log(f) / log(2.0f)) + 1;
|
||||
// this is always at least 2
|
||||
// maps [0.25..0.5[ to -1 (actually, 1 is returned)
|
||||
// maps [0.5..1[ to 0 (actually, 1 is returned)
|
||||
// maps [1..2[ to 1
|
||||
// maps [2..4[ to 2
|
||||
// maps [4..8[ to 4
|
||||
}
|
||||
|
||||
static float Squared3xCurveArea(const float *a, const float *control, const float *b, int components)
|
||||
{
|
||||
#if 0
|
||||
// mimicing the old behaviour with the new code...
|
||||
|
||||
float deviation;
|
||||
float quartercurvearea = 0;
|
||||
int c;
|
||||
for (c = 0;c < components;c++)
|
||||
{
|
||||
deviation = control[c] * 0.5f - a[c] * 0.25f - b[c] * 0.25f;
|
||||
quartercurvearea += deviation*deviation;
|
||||
}
|
||||
|
||||
// But as the new code now works on the squared 2x curve area, let's scale the value
|
||||
return quartercurvearea * quartercurvearea * 64.0;
|
||||
|
||||
#else
|
||||
// ideally, we'd like the area between the spline a->control->b and the line a->b.
|
||||
// but as this is hard to calculate, let's calculate an upper bound of it:
|
||||
// the area of the triangle a->control->b->a.
|
||||
//
|
||||
// one can prove that the area of a quadratic spline = 2/3 * the area of
|
||||
// the triangle of its control points!
|
||||
// to do it, first prove it for the spline through (0,0), (1,1), (2,0)
|
||||
// (which is a parabola) and then note that moving the control point
|
||||
// left/right is just shearing and keeps the area of both the spline and
|
||||
// the triangle invariant.
|
||||
//
|
||||
// why are we going for the spline area anyway?
|
||||
// we know that:
|
||||
//
|
||||
// the area between the spline and the line a->b is a measure of the
|
||||
// error of approximation of the spline by the line.
|
||||
//
|
||||
// also, on circle-like or parabola-like curves, you easily get that the
|
||||
// double amount of line approximation segments reduces the error to its quarter
|
||||
// (also, easy to prove for splines by doing it for one specific one, and using
|
||||
// affine transforms to get all other splines)
|
||||
//
|
||||
// so...
|
||||
//
|
||||
// let's calculate the area! but we have to avoid the cross product, as
|
||||
// components is not necessarily 3
|
||||
//
|
||||
// the area of a triangle spanned by vectors a and b is
|
||||
//
|
||||
// 0.5 * |a| |b| sin gamma
|
||||
//
|
||||
// now, cos gamma is
|
||||
//
|
||||
// a.b / (|a| |b|)
|
||||
//
|
||||
// so the area is
|
||||
//
|
||||
// 0.5 * sqrt(|a|^2 |b|^2 - (a.b)^2)
|
||||
int c;
|
||||
float aa = 0, bb = 0, ab = 0;
|
||||
for (c = 0;c < components;c++)
|
||||
{
|
||||
float xa = a[c] - control[c];
|
||||
float xb = b[c] - control[c];
|
||||
aa += xa * xa;
|
||||
ab += xa * xb;
|
||||
bb += xb * xb;
|
||||
}
|
||||
// area is 0.5 * sqrt(aa*bb - ab*ab)
|
||||
// 2x TRIANGLE area is sqrt(aa*bb - ab*ab)
|
||||
// 3x CURVE area is sqrt(aa*bb - ab*ab)
|
||||
return aa * bb - ab * ab;
|
||||
#endif
|
||||
}
|
||||
|
||||
// returns how much tesselation of each segment is needed to remain under tolerance
|
||||
int Q3PatchTesselationOnX(int patchwidth, int patchheight, int components, const float *in, float tolerance)
|
||||
{
|
||||
int x, y;
|
||||
const float *patch;
|
||||
float squared3xcurvearea, largestsquared3xcurvearea;
|
||||
largestsquared3xcurvearea = 0;
|
||||
for (y = 0;y < patchheight;y++)
|
||||
{
|
||||
for (x = 0;x < patchwidth-1;x += 2)
|
||||
{
|
||||
patch = in + ((y * patchwidth) + x) * components;
|
||||
squared3xcurvearea = Squared3xCurveArea(&patch[0], &patch[components], &patch[2*components], components);
|
||||
if (largestsquared3xcurvearea < squared3xcurvearea)
|
||||
largestsquared3xcurvearea = squared3xcurvearea;
|
||||
}
|
||||
}
|
||||
return Q3PatchTesselation(largestsquared3xcurvearea, tolerance);
|
||||
}
|
||||
|
||||
// returns how much tesselation of each segment is needed to remain under tolerance
|
||||
int Q3PatchTesselationOnY(int patchwidth, int patchheight, int components, const float *in, float tolerance)
|
||||
{
|
||||
int x, y;
|
||||
const float *patch;
|
||||
float squared3xcurvearea, largestsquared3xcurvearea;
|
||||
largestsquared3xcurvearea = 0;
|
||||
for (y = 0;y < patchheight-1;y += 2)
|
||||
{
|
||||
for (x = 0;x < patchwidth;x++)
|
||||
{
|
||||
patch = in + ((y * patchwidth) + x) * components;
|
||||
squared3xcurvearea = Squared3xCurveArea(&patch[0], &patch[patchwidth*components], &patch[2*patchwidth*components], components);
|
||||
if (largestsquared3xcurvearea < squared3xcurvearea)
|
||||
largestsquared3xcurvearea = squared3xcurvearea;
|
||||
}
|
||||
}
|
||||
return Q3PatchTesselation(largestsquared3xcurvearea, tolerance);
|
||||
}
|
||||
|
||||
// Find an equal vertex in array. Check only vertices with odd X and Y
|
||||
static int FindEqualOddVertexInArray(int numcomponents, float *vertex, float *vertices, int width, int height)
|
||||
{
|
||||
int x, y, j;
|
||||
for (y=0; y<height; y+=2)
|
||||
{
|
||||
for (x=0; x<width; x+=2)
|
||||
{
|
||||
qboolean found = true;
|
||||
for (j=0; j<numcomponents; j++)
|
||||
if (fabs(*(vertex+j) - *(vertices+j)) > 0.05)
|
||||
// div0: this is notably smaller than the smallest radiant grid
|
||||
// but large enough so we don't need to get scared of roundoff
|
||||
// errors
|
||||
{
|
||||
found = false;
|
||||
break;
|
||||
}
|
||||
if(found)
|
||||
return y*width+x;
|
||||
vertices += numcomponents*2;
|
||||
}
|
||||
vertices += numcomponents*(width-1);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
#define SIDE_INVALID -1
|
||||
#define SIDE_X 0
|
||||
#define SIDE_Y 1
|
||||
|
||||
static int GetSide(int p1, int p2, int width, int height, int *pointdist)
|
||||
{
|
||||
int x1 = p1 % width, y1 = p1 / width;
|
||||
int x2 = p2 % width, y2 = p2 / width;
|
||||
if (p1 < 0 || p2 < 0)
|
||||
return SIDE_INVALID;
|
||||
if (x1 == x2)
|
||||
{
|
||||
if (y1 != y2)
|
||||
{
|
||||
*pointdist = abs(y2 - y1);
|
||||
return SIDE_Y;
|
||||
}
|
||||
else
|
||||
return SIDE_INVALID;
|
||||
}
|
||||
else if (y1 == y2)
|
||||
{
|
||||
*pointdist = abs(x2 - x1);
|
||||
return SIDE_X;
|
||||
}
|
||||
else
|
||||
return SIDE_INVALID;
|
||||
}
|
||||
|
||||
// Increase tesselation of one of two touching patches to make a seamless connection between them
|
||||
// Returns 0 in case if patches were not modified, otherwise 1
|
||||
int Q3PatchAdjustTesselation(int numcomponents, patchinfo_t *patch1, float *patchvertices1, patchinfo_t *patch2, float *patchvertices2)
|
||||
{
|
||||
// what we are doing here is:
|
||||
// we take for each corner of one patch
|
||||
// and check if the other patch contains that corner
|
||||
// once we have a pair of such matches
|
||||
|
||||
struct {int id1,id2;} commonverts[8];
|
||||
int i, j, k, side1, side2, *tess1, *tess2;
|
||||
int dist1 = 0, dist2 = 0;
|
||||
qboolean modified = false;
|
||||
|
||||
// Potential paired vertices (corners of the first patch)
|
||||
commonverts[0].id1 = 0;
|
||||
commonverts[1].id1 = patch1->xsize-1;
|
||||
commonverts[2].id1 = patch1->xsize*(patch1->ysize-1);
|
||||
commonverts[3].id1 = patch1->xsize*patch1->ysize-1;
|
||||
for (i=0;i<4;++i)
|
||||
commonverts[i].id2 = FindEqualOddVertexInArray(numcomponents, patchvertices1+numcomponents*commonverts[i].id1, patchvertices2, patch2->xsize, patch2->ysize);
|
||||
|
||||
// Corners of the second patch
|
||||
commonverts[4].id2 = 0;
|
||||
commonverts[5].id2 = patch2->xsize-1;
|
||||
commonverts[6].id2 = patch2->xsize*(patch2->ysize-1);
|
||||
commonverts[7].id2 = patch2->xsize*patch2->ysize-1;
|
||||
for (i=4;i<8;++i)
|
||||
commonverts[i].id1 = FindEqualOddVertexInArray(numcomponents, patchvertices2+numcomponents*commonverts[i].id2, patchvertices1, patch1->xsize, patch1->ysize);
|
||||
|
||||
for (i=0;i<8;++i)
|
||||
for (j=i+1;j<8;++j)
|
||||
{
|
||||
side1 = GetSide(commonverts[i].id1,commonverts[j].id1,patch1->xsize,patch1->ysize,&dist1);
|
||||
side2 = GetSide(commonverts[i].id2,commonverts[j].id2,patch2->xsize,patch2->ysize,&dist2);
|
||||
|
||||
if (side1 == SIDE_INVALID || side2 == SIDE_INVALID)
|
||||
continue;
|
||||
|
||||
if(dist1 != dist2)
|
||||
{
|
||||
// no patch welding if the resolutions mismatch
|
||||
continue;
|
||||
}
|
||||
|
||||
// Update every lod level
|
||||
for (k=0;k<PATCH_LODS_NUM;++k)
|
||||
{
|
||||
tess1 = side1 == SIDE_X ? &patch1->lods[k].xtess : &patch1->lods[k].ytess;
|
||||
tess2 = side2 == SIDE_X ? &patch2->lods[k].xtess : &patch2->lods[k].ytess;
|
||||
if (*tess1 != *tess2)
|
||||
{
|
||||
if (*tess1 < *tess2)
|
||||
*tess1 = *tess2;
|
||||
else
|
||||
*tess2 = *tess1;
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return modified;
|
||||
}
|
||||
|
||||
#undef SIDE_INVALID
|
||||
#undef SIDE_X
|
||||
#undef SIDE_Y
|
||||
|
||||
// calculates elements for a grid of vertices
|
||||
// (such as those produced by Q3PatchTesselate)
|
||||
// (note: width and height are the actual vertex size, this produces
|
||||
// (width-1)*(height-1)*2 triangles, 3 elements each)
|
||||
void Q3PatchTriangleElements(int *elements, int width, int height, int firstvertex)
|
||||
{
|
||||
int x, y, row0, row1;
|
||||
for (y = 0;y < height - 1;y++)
|
||||
{
|
||||
if(y % 2)
|
||||
{
|
||||
// swap the triangle order in odd rows as optimization for collision stride
|
||||
row0 = firstvertex + (y + 0) * width + width - 2;
|
||||
row1 = firstvertex + (y + 1) * width + width - 2;
|
||||
for (x = 0;x < width - 1;x++)
|
||||
{
|
||||
*elements++ = row1;
|
||||
*elements++ = row1 + 1;
|
||||
*elements++ = row0 + 1;
|
||||
*elements++ = row0;
|
||||
*elements++ = row1;
|
||||
*elements++ = row0 + 1;
|
||||
row0--;
|
||||
row1--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
row0 = firstvertex + (y + 0) * width;
|
||||
row1 = firstvertex + (y + 1) * width;
|
||||
for (x = 0;x < width - 1;x++)
|
||||
{
|
||||
*elements++ = row0;
|
||||
*elements++ = row1;
|
||||
*elements++ = row0 + 1;
|
||||
*elements++ = row1;
|
||||
*elements++ = row1 + 1;
|
||||
*elements++ = row0 + 1;
|
||||
row0++;
|
||||
row1++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
#ifndef CURVES_H
|
||||
#define CURVES_H
|
||||
|
||||
#define PATCH_LODS_NUM 2
|
||||
#define PATCH_LOD_COLLISION 0
|
||||
#define PATCH_LOD_VISUAL 1
|
||||
|
||||
typedef struct patchinfo_s
|
||||
{
|
||||
int xsize, ysize;
|
||||
struct {
|
||||
int xtess, ytess;
|
||||
} lods[PATCH_LODS_NUM];
|
||||
} patchinfo_t;
|
||||
|
||||
// Calculate number of resulting vertex rows/columns by given patch size and tesselation factor
|
||||
// When tess=0 it means that we reduce detalization of base 3x3 patches by removing middle row and column
|
||||
// "DimForTess" is "DIMension FOR TESSelation factor"
|
||||
int Q3PatchDimForTess(int size, int tess);
|
||||
|
||||
// usage:
|
||||
// to expand a 5x5 patch to 21x21 vertices (4x4 tesselation), one might use this call:
|
||||
// Q3PatchSubdivideFloat(3, sizeof(float[3]), outvertices, 5, 5, sizeof(float[3]), patchvertices, 4, 4);
|
||||
void Q3PatchTesselateFloat(int numcomponents, int outputstride, float *outputvertices, int patchwidth, int patchheight, int inputstride, float *patchvertices, int tesselationwidth, int tesselationheight);
|
||||
// returns how much tesselation of each segment is needed to remain under tolerance
|
||||
int Q3PatchTesselationOnX(int patchwidth, int patchheight, int components, const float *in, float tolerance);
|
||||
// returns how much tesselation of each segment is needed to remain under tolerance
|
||||
int Q3PatchTesselationOnY(int patchwidth, int patchheight, int components, const float *in, float tolerance);
|
||||
// calculates elements for a grid of vertices
|
||||
// (such as those produced by Q3PatchTesselate)
|
||||
// (note: width and height are the actual vertex size, this produces
|
||||
// (width-1)*(height-1)*2 triangles, 3 elements each)
|
||||
void Q3PatchTriangleElements(int *elements, int width, int height, int firstvertex);
|
||||
|
||||
int Q3PatchAdjustTesselation(int numcomponents, patchinfo_t *patch1, float *patchvertices1, patchinfo_t *patch2, float *patchvertices2);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// cvar.h
|
||||
|
||||
/*
|
||||
|
||||
cvar_t variables are used to hold scalar or string variables that can be changed or displayed at the console or prog code as well as accessed directly
|
||||
in C code.
|
||||
|
||||
it is sufficient to initialize a cvar_t with just the first two fields, or
|
||||
you can add a ,true flag for variables that you want saved to the configuration
|
||||
file when the game is quit:
|
||||
|
||||
cvar_t r_draworder = {"r_draworder","1"};
|
||||
cvar_t scr_screensize = {"screensize","1",true};
|
||||
|
||||
Cvars must be registered before use, or they will have a 0 value instead of the float interpretation of the string. Generally, all cvar_t declarations should be registered in the apropriate init function before any console commands are executed:
|
||||
Cvar_RegisterVariable (&host_framerate);
|
||||
|
||||
|
||||
C code usually just references a cvar in place:
|
||||
if ( r_draworder.value )
|
||||
|
||||
It could optionally ask for the value to be looked up for a string name:
|
||||
if (Cvar_VariableValue ("r_draworder"))
|
||||
|
||||
Interpreted prog code can access cvars with the cvar(name) or
|
||||
cvar_set (name, value) internal functions:
|
||||
teamplay = cvar("teamplay");
|
||||
cvar_set ("registered", "1");
|
||||
|
||||
The user can access cvars from the console in two ways:
|
||||
r_draworder prints the current value
|
||||
r_draworder 0 sets the current value to 0
|
||||
Cvars are restricted from having the same names as commands to keep this
|
||||
interface from being ambiguous.
|
||||
*/
|
||||
|
||||
#ifndef CVAR_H
|
||||
#define CVAR_H
|
||||
|
||||
// cvar flags
|
||||
|
||||
#define CVAR_SAVE 1
|
||||
#define CVAR_NOTIFY 2
|
||||
#define CVAR_READONLY 4
|
||||
#define CVAR_SERVERINFO 8
|
||||
#define CVAR_USERINFO 16
|
||||
// CVAR_PRIVATE means do not $ expand or sendcvar this cvar under any circumstances (rcon_password uses this)
|
||||
#define CVAR_PRIVATE 32
|
||||
// this means that this cvar should update a userinfo key but the name does not correspond directly to the userinfo key to update, and may require additional conversion ("_cl_color" for example should update "topcolor" and "bottomcolor")
|
||||
#define CVAR_NQUSERINFOHACK 64
|
||||
// used to determine if flags is valid
|
||||
#define CVAR_NORESETTODEFAULTS 128
|
||||
// for engine-owned cvars that must not be reset on gametype switch (e.g. scr_screenshot_name, which otherwise isn't set to the mod name properly)
|
||||
#define CVAR_MAXFLAGSVAL 255
|
||||
// for internal use only!
|
||||
#define CVAR_DEFAULTSET (1<<30)
|
||||
#define CVAR_ALLOCATED (1<<31)
|
||||
|
||||
/*
|
||||
// type of a cvar for menu purposes
|
||||
#define CVARMENUTYPE_FLOAT 1
|
||||
#define CVARMENUTYPE_INTEGER 2
|
||||
#define CVARMENUTYPE_SLIDER 3
|
||||
#define CVARMENUTYPE_BOOL 4
|
||||
#define CVARMENUTYPE_STRING 5
|
||||
#define CVARMENUTYPE_OPTION 6
|
||||
|
||||
// which menu to put a cvar in
|
||||
#define CVARMENU_GRAPHICS 1
|
||||
#define CVARMENU_SOUND 2
|
||||
#define CVARMENU_INPUT 3
|
||||
#define CVARMENU_NETWORK 4
|
||||
#define CVARMENU_SERVER 5
|
||||
|
||||
#define MAX_CVAROPTIONS 16
|
||||
|
||||
typedef struct cvaroption_s
|
||||
{
|
||||
int value;
|
||||
const char *name;
|
||||
}
|
||||
cvaroption_t;
|
||||
|
||||
typedef struct menucvar_s
|
||||
{
|
||||
int type;
|
||||
float valuemin, valuemax, valuestep;
|
||||
int numoptions;
|
||||
cvaroption_t optionlist[MAX_CVAROPTIONS];
|
||||
}
|
||||
menucvar_t;
|
||||
*/
|
||||
|
||||
typedef struct cvar_s
|
||||
{
|
||||
int flags;
|
||||
|
||||
const char *name;
|
||||
|
||||
const char *string;
|
||||
const char *description;
|
||||
int integer;
|
||||
float value;
|
||||
float vector[3];
|
||||
|
||||
const char *defstring;
|
||||
|
||||
// values at init (for Cvar_RestoreInitState)
|
||||
qboolean initstate; // indicates this existed at init
|
||||
int initflags;
|
||||
const char *initstring;
|
||||
const char *initdescription;
|
||||
int initinteger;
|
||||
float initvalue;
|
||||
float initvector[3];
|
||||
const char *initdefstring;
|
||||
|
||||
unsigned int globaldefindex_progid[3];
|
||||
int globaldefindex[3];
|
||||
int globaldefindex_stringno[3];
|
||||
|
||||
//menucvar_t menuinfo;
|
||||
struct cvar_s *next;
|
||||
struct cvar_s *nextonhashchain;
|
||||
} cvar_t;
|
||||
|
||||
/*
|
||||
void Cvar_MenuSlider(cvar_t *variable, int menu, float slider_min, float slider_max, float slider_step);
|
||||
void Cvar_MenuBool(cvar_t *variable, int menu, const char *name_false, const char *name_true);
|
||||
void Cvar_MenuFloat(cvar_t *variable, int menu, float range_min, float range_max);
|
||||
void Cvar_MenuInteger(cvar_t *variable, int menu, int range_min, int range_max);
|
||||
void Cvar_MenuString(cvar_t *variable, int menu);
|
||||
void Cvar_MenuOption(cvar_t *variable, int menu, int value[16], const char *name[16]);
|
||||
*/
|
||||
|
||||
/// registers a cvar that already has the name, string, and optionally the
|
||||
/// archive elements set.
|
||||
void Cvar_RegisterVariable (cvar_t *variable);
|
||||
|
||||
/// equivelant to "<name> <variable>" typed at the console
|
||||
void Cvar_Set (const char *var_name, const char *value);
|
||||
|
||||
/// expands value to a string and calls Cvar_Set
|
||||
void Cvar_SetValue (const char *var_name, float value);
|
||||
|
||||
void Cvar_SetQuick (cvar_t *var, const char *value);
|
||||
void Cvar_SetValueQuick (cvar_t *var, float value);
|
||||
|
||||
float Cvar_VariableValueOr (const char *var_name, float def);
|
||||
// returns def if not defined
|
||||
|
||||
float Cvar_VariableValue (const char *var_name);
|
||||
// returns 0 if not defined or non numeric
|
||||
|
||||
const char *Cvar_VariableStringOr (const char *var_name, const char *def);
|
||||
// returns def if not defined
|
||||
|
||||
const char *Cvar_VariableString (const char *var_name);
|
||||
// returns an empty string if not defined
|
||||
|
||||
const char *Cvar_VariableDefString (const char *var_name);
|
||||
// returns an empty string if not defined
|
||||
|
||||
const char *Cvar_VariableDescription (const char *var_name);
|
||||
// returns an empty string if not defined
|
||||
|
||||
const char *Cvar_CompleteVariable (const char *partial);
|
||||
// attempts to match a partial variable name for command line completion
|
||||
// returns NULL if nothing fits
|
||||
|
||||
void Cvar_CompleteCvarPrint (const char *partial);
|
||||
|
||||
qboolean Cvar_Command (void);
|
||||
// called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known
|
||||
// command. Returns true if the command was a variable reference that
|
||||
// was handled. (print or change)
|
||||
|
||||
void Cvar_SaveInitState(void);
|
||||
void Cvar_RestoreInitState(void);
|
||||
|
||||
void Cvar_UnlockDefaults (void);
|
||||
void Cvar_LockDefaults_f (void);
|
||||
void Cvar_ResetToDefaults_All_f (void);
|
||||
void Cvar_ResetToDefaults_NoSaveOnly_f (void);
|
||||
void Cvar_ResetToDefaults_SaveOnly_f (void);
|
||||
|
||||
void Cvar_WriteVariables (qfile_t *f);
|
||||
// Writes lines containing "set variable value" for all variables
|
||||
// with the archive flag set to true.
|
||||
|
||||
cvar_t *Cvar_FindVar (const char *var_name);
|
||||
cvar_t *Cvar_FindVarAfter (const char *prev_var_name, int neededflags);
|
||||
|
||||
int Cvar_CompleteCountPossible (const char *partial);
|
||||
const char **Cvar_CompleteBuildList (const char *partial);
|
||||
// Added by EvilTypeGuy - functions for tab completion system
|
||||
// Thanks to Fett erich@heintz.com
|
||||
// Thanks to taniwha
|
||||
|
||||
/// Prints a list of Cvars including a count of them to the user console
|
||||
/// Referenced in cmd.c in Cmd_Init hence it's inclusion here.
|
||||
/// Added by EvilTypeGuy eviltypeguy@qeradiant.com
|
||||
/// Thanks to Matthias "Maddes" Buecher, http://www.inside3d.com/qip/
|
||||
void Cvar_List_f (void);
|
||||
|
||||
void Cvar_Set_f (void);
|
||||
void Cvar_SetA_f (void);
|
||||
void Cvar_Del_f (void);
|
||||
// commands to create new cvars (or set existing ones)
|
||||
// seta creates an archived cvar (saved to config)
|
||||
|
||||
/// allocates a cvar by name and returns its address,
|
||||
/// or merely sets its value if it already exists.
|
||||
cvar_t *Cvar_Get (const char *name, const char *value, int flags, const char *newdescription);
|
||||
|
||||
extern const char *cvar_dummy_description; // ALWAYS the same pointer
|
||||
extern cvar_t *cvar_vars; // used to list all cvars
|
||||
|
||||
void Cvar_UpdateAllAutoCvars(void); // updates ALL autocvars of the active prog to the cvar values (savegame loading)
|
||||
|
||||
#ifdef FILLALLCVARSWITHRUBBISH
|
||||
void Cvar_FillAll_f();
|
||||
#endif /* FILLALLCVARSWITHRUBBISH */
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,284 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{389AE334-D907-4069-90B3-F0551B3EFDE9}</ProjectGuid>
|
||||
<RootNamespace>darkplacesdedicated</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2010_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2010_win32.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bih.c" />
|
||||
<ClCompile Include="builddate.c" />
|
||||
<ClCompile Include="cap_avi.c" />
|
||||
<ClCompile Include="cap_ogg.c" />
|
||||
<ClCompile Include="cd_null.c" />
|
||||
<ClCompile Include="cd_shared.c" />
|
||||
<ClCompile Include="cl_collision.c" />
|
||||
<ClCompile Include="cl_demo.c" />
|
||||
<ClCompile Include="cl_dyntexture.c" />
|
||||
<ClCompile Include="cl_input.c" />
|
||||
<ClCompile Include="cl_main.c" />
|
||||
<ClCompile Include="cl_parse.c" />
|
||||
<ClCompile Include="cl_particles.c" />
|
||||
<ClCompile Include="cl_screen.c" />
|
||||
<ClCompile Include="cl_video.c" />
|
||||
<ClCompile Include="clvm_cmds.c" />
|
||||
<ClCompile Include="cmd.c" />
|
||||
<ClCompile Include="collision.c" />
|
||||
<ClCompile Include="common.c" />
|
||||
<ClCompile Include="console.c" />
|
||||
<ClCompile Include="crypto.c" />
|
||||
<ClCompile Include="csprogs.c" />
|
||||
<ClCompile Include="curves.c" />
|
||||
<ClCompile Include="cvar.c" />
|
||||
<ClCompile Include="dpsoftrast.c" />
|
||||
<ClCompile Include="dpvsimpledecode.c" />
|
||||
<ClCompile Include="filematch.c" />
|
||||
<ClCompile Include="fractalnoise.c" />
|
||||
<ClCompile Include="fs.c" />
|
||||
<ClCompile Include="ft2.c" />
|
||||
<ClCompile Include="gl_backend.c" />
|
||||
<ClCompile Include="gl_draw.c" />
|
||||
<ClCompile Include="gl_rmain.c" />
|
||||
<ClCompile Include="gl_rsurf.c" />
|
||||
<ClCompile Include="gl_textures.c" />
|
||||
<ClCompile Include="hmac.c" />
|
||||
<ClCompile Include="host.c" />
|
||||
<ClCompile Include="host_cmd.c" />
|
||||
<ClCompile Include="image.c" />
|
||||
<ClCompile Include="image_png.c" />
|
||||
<ClCompile Include="jpeg.c" />
|
||||
<ClCompile Include="keys.c" />
|
||||
<ClCompile Include="lhnet.c" />
|
||||
<ClCompile Include="libcurl.c" />
|
||||
<ClCompile Include="mathlib.c" />
|
||||
<ClCompile Include="matrixlib.c" />
|
||||
<ClCompile Include="mdfour.c" />
|
||||
<ClCompile Include="menu.c" />
|
||||
<ClCompile Include="meshqueue.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_generic.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_sse.c" />
|
||||
<ClCompile Include="model_alias.c" />
|
||||
<ClCompile Include="model_brush.c" />
|
||||
<ClCompile Include="model_shared.c" />
|
||||
<ClCompile Include="model_sprite.c" />
|
||||
<ClCompile Include="mvm_cmds.c" />
|
||||
<ClCompile Include="netconn.c" />
|
||||
<ClCompile Include="palette.c" />
|
||||
<ClCompile Include="polygon.c" />
|
||||
<ClCompile Include="portals.c" />
|
||||
<ClCompile Include="protocol.c" />
|
||||
<ClCompile Include="prvm_cmds.c" />
|
||||
<ClCompile Include="prvm_edict.c" />
|
||||
<ClCompile Include="prvm_exec.c" />
|
||||
<ClCompile Include="r_explosion.c" />
|
||||
<ClCompile Include="r_lightning.c" />
|
||||
<ClCompile Include="r_modules.c" />
|
||||
<ClCompile Include="r_shadow.c" />
|
||||
<ClCompile Include="r_sky.c" />
|
||||
<ClCompile Include="r_sprites.c" />
|
||||
<ClCompile Include="sbar.c" />
|
||||
<ClCompile Include="snd_null.c" />
|
||||
<ClCompile Include="sv_demo.c" />
|
||||
<ClCompile Include="sv_main.c" />
|
||||
<ClCompile Include="sv_move.c" />
|
||||
<ClCompile Include="sv_phys.c" />
|
||||
<ClCompile Include="sv_user.c" />
|
||||
<ClCompile Include="svbsp.c" />
|
||||
<ClCompile Include="svvm_cmds.c" />
|
||||
<ClCompile Include="sys_linux.c" />
|
||||
<ClCompile Include="sys_shared.c" />
|
||||
<ClCompile Include="thread_null.c" />
|
||||
<ClCompile Include="utf8lib.c" />
|
||||
<ClCompile Include="vid_null.c" />
|
||||
<ClCompile Include="vid_shared.c" />
|
||||
<ClCompile Include="view.c" />
|
||||
<ClCompile Include="wad.c" />
|
||||
<ClCompile Include="world.c" />
|
||||
<ClCompile Include="zone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bih.h" />
|
||||
<ClInclude Include="bspfile.h" />
|
||||
<ClInclude Include="cap_avi.h" />
|
||||
<ClInclude Include="cap_ogg.h" />
|
||||
<ClInclude Include="cdaudio.h" />
|
||||
<ClInclude Include="cl_collision.h" />
|
||||
<ClInclude Include="cl_dyntexture.h" />
|
||||
<ClInclude Include="cl_gecko.h" />
|
||||
<ClInclude Include="cl_screen.h" />
|
||||
<ClInclude Include="cl_video.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="clprogdefs.h" />
|
||||
<ClInclude Include="clvm_cmds.h" />
|
||||
<ClInclude Include="cmd.h" />
|
||||
<ClInclude Include="collision.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="console.h" />
|
||||
<ClInclude Include="crypto.h" />
|
||||
<ClInclude Include="csprogs.h" />
|
||||
<ClInclude Include="curves.h" />
|
||||
<ClInclude Include="cvar.h" />
|
||||
<ClInclude Include="dpsoftrast.h" />
|
||||
<ClInclude Include="dpvsimpledecode.h" />
|
||||
<ClInclude Include="draw.h" />
|
||||
<ClInclude Include="fs.h" />
|
||||
<ClInclude Include="ft2.h" />
|
||||
<ClInclude Include="ft2_defs.h" />
|
||||
<ClInclude Include="ft2_fontdefs.h" />
|
||||
<ClInclude Include="gl_backend.h" />
|
||||
<ClInclude Include="glquake.h" />
|
||||
<ClInclude Include="hmac.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="image_png.h" />
|
||||
<ClInclude Include="input.h" />
|
||||
<ClInclude Include="intoverflow.h" />
|
||||
<ClInclude Include="jpeg.h" />
|
||||
<ClInclude Include="keys.h" />
|
||||
<ClInclude Include="lhfont.h" />
|
||||
<ClInclude Include="lhnet.h" />
|
||||
<ClInclude Include="libcurl.h" />
|
||||
<ClInclude Include="mathlib.h" />
|
||||
<ClInclude Include="matrixlib.h" />
|
||||
<ClInclude Include="mdfour.h" />
|
||||
<ClInclude Include="menu.h" />
|
||||
<ClInclude Include="meshqueue.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_generic.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_sse.h" />
|
||||
<ClInclude Include="model_alias.h" />
|
||||
<ClInclude Include="model_brush.h" />
|
||||
<ClInclude Include="model_dpmodel.h" />
|
||||
<ClInclude Include="model_iqm.h" />
|
||||
<ClInclude Include="model_psk.h" />
|
||||
<ClInclude Include="model_shared.h" />
|
||||
<ClInclude Include="model_sprite.h" />
|
||||
<ClInclude Include="model_zymotic.h" />
|
||||
<ClInclude Include="modelgen.h" />
|
||||
<ClInclude Include="mprogdefs.h" />
|
||||
<ClInclude Include="netconn.h" />
|
||||
<ClInclude Include="palette.h" />
|
||||
<ClInclude Include="polygon.h" />
|
||||
<ClInclude Include="portals.h" />
|
||||
<ClInclude Include="pr_comp.h" />
|
||||
<ClInclude Include="progdefs.h" />
|
||||
<ClInclude Include="progs.h" />
|
||||
<ClInclude Include="progsvm.h" />
|
||||
<ClInclude Include="protocol.h" />
|
||||
<ClInclude Include="prvm_cmds.h" />
|
||||
<ClInclude Include="prvm_execprogram.h" />
|
||||
<ClInclude Include="qtypes.h" />
|
||||
<ClInclude Include="quakedef.h" />
|
||||
<ClInclude Include="r_lerpanim.h" />
|
||||
<ClInclude Include="r_modules.h" />
|
||||
<ClInclude Include="r_shadow.h" />
|
||||
<ClInclude Include="r_textures.h" />
|
||||
<ClInclude Include="render.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="sbar.h" />
|
||||
<ClInclude Include="screen.h" />
|
||||
<ClInclude Include="server.h" />
|
||||
<ClInclude Include="shader_glsl.h" />
|
||||
<ClInclude Include="shader_hlsl.h" />
|
||||
<ClInclude Include="snd_main.h" />
|
||||
<ClInclude Include="snd_ogg.h" />
|
||||
<ClInclude Include="snd_wav.h" />
|
||||
<ClInclude Include="sound.h" />
|
||||
<ClInclude Include="spritegn.h" />
|
||||
<ClInclude Include="sv_demo.h" />
|
||||
<ClInclude Include="svbsp.h" />
|
||||
<ClInclude Include="sys.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
<ClInclude Include="timing.h" />
|
||||
<ClInclude Include="utf8lib.h" />
|
||||
<ClInclude Include="vid.h" />
|
||||
<ClInclude Include="wad.h" />
|
||||
<ClInclude Include="world.h" />
|
||||
<ClInclude Include="zone.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,372 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{389AE334-D907-4069-90B3-F0551B3EFDE9}</ProjectGuid>
|
||||
<RootNamespace>darkplacesdedicated</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>darkplaces-dedicated-vs2012</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\</OutDir>
|
||||
<IntDir>$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;WIN64;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;WIN64;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bih.c" />
|
||||
<ClCompile Include="builddate.c" />
|
||||
<ClCompile Include="cap_avi.c" />
|
||||
<ClCompile Include="cap_ogg.c" />
|
||||
<ClCompile Include="cd_null.c" />
|
||||
<ClCompile Include="cd_shared.c" />
|
||||
<ClCompile Include="cl_collision.c" />
|
||||
<ClCompile Include="cl_demo.c" />
|
||||
<ClCompile Include="cl_dyntexture.c" />
|
||||
<ClCompile Include="cl_input.c" />
|
||||
<ClCompile Include="cl_main.c" />
|
||||
<ClCompile Include="cl_parse.c" />
|
||||
<ClCompile Include="cl_particles.c" />
|
||||
<ClCompile Include="cl_screen.c" />
|
||||
<ClCompile Include="cl_video.c" />
|
||||
<ClCompile Include="clvm_cmds.c" />
|
||||
<ClCompile Include="cmd.c" />
|
||||
<ClCompile Include="collision.c" />
|
||||
<ClCompile Include="common.c" />
|
||||
<ClCompile Include="console.c" />
|
||||
<ClCompile Include="crypto.c" />
|
||||
<ClCompile Include="csprogs.c" />
|
||||
<ClCompile Include="curves.c" />
|
||||
<ClCompile Include="cvar.c" />
|
||||
<ClCompile Include="dpsoftrast.c" />
|
||||
<ClCompile Include="dpvsimpledecode.c" />
|
||||
<ClCompile Include="filematch.c" />
|
||||
<ClCompile Include="fractalnoise.c" />
|
||||
<ClCompile Include="fs.c" />
|
||||
<ClCompile Include="ft2.c" />
|
||||
<ClCompile Include="gl_backend.c" />
|
||||
<ClCompile Include="gl_draw.c" />
|
||||
<ClCompile Include="gl_rmain.c" />
|
||||
<ClCompile Include="gl_rsurf.c" />
|
||||
<ClCompile Include="gl_textures.c" />
|
||||
<ClCompile Include="hmac.c" />
|
||||
<ClCompile Include="host.c" />
|
||||
<ClCompile Include="host_cmd.c" />
|
||||
<ClCompile Include="image.c" />
|
||||
<ClCompile Include="image_png.c" />
|
||||
<ClCompile Include="jpeg.c" />
|
||||
<ClCompile Include="keys.c" />
|
||||
<ClCompile Include="lhnet.c" />
|
||||
<ClCompile Include="libcurl.c" />
|
||||
<ClCompile Include="mathlib.c" />
|
||||
<ClCompile Include="matrixlib.c" />
|
||||
<ClCompile Include="mdfour.c" />
|
||||
<ClCompile Include="menu.c" />
|
||||
<ClCompile Include="meshqueue.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_generic.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_sse.c" />
|
||||
<ClCompile Include="model_alias.c" />
|
||||
<ClCompile Include="model_brush.c" />
|
||||
<ClCompile Include="model_shared.c" />
|
||||
<ClCompile Include="model_sprite.c" />
|
||||
<ClCompile Include="mvm_cmds.c" />
|
||||
<ClCompile Include="netconn.c" />
|
||||
<ClCompile Include="palette.c" />
|
||||
<ClCompile Include="polygon.c" />
|
||||
<ClCompile Include="portals.c" />
|
||||
<ClCompile Include="protocol.c" />
|
||||
<ClCompile Include="prvm_cmds.c" />
|
||||
<ClCompile Include="prvm_edict.c" />
|
||||
<ClCompile Include="prvm_exec.c" />
|
||||
<ClCompile Include="r_explosion.c" />
|
||||
<ClCompile Include="r_lightning.c" />
|
||||
<ClCompile Include="r_modules.c" />
|
||||
<ClCompile Include="r_shadow.c" />
|
||||
<ClCompile Include="r_sky.c" />
|
||||
<ClCompile Include="r_sprites.c" />
|
||||
<ClCompile Include="sbar.c" />
|
||||
<ClCompile Include="snd_null.c" />
|
||||
<ClCompile Include="sv_demo.c" />
|
||||
<ClCompile Include="sv_main.c" />
|
||||
<ClCompile Include="sv_move.c" />
|
||||
<ClCompile Include="sv_phys.c" />
|
||||
<ClCompile Include="sv_user.c" />
|
||||
<ClCompile Include="svbsp.c" />
|
||||
<ClCompile Include="svvm_cmds.c" />
|
||||
<ClCompile Include="sys_linux.c" />
|
||||
<ClCompile Include="sys_shared.c" />
|
||||
<ClCompile Include="thread_null.c" />
|
||||
<ClCompile Include="utf8lib.c" />
|
||||
<ClCompile Include="vid_null.c" />
|
||||
<ClCompile Include="vid_shared.c" />
|
||||
<ClCompile Include="view.c" />
|
||||
<ClCompile Include="wad.c" />
|
||||
<ClCompile Include="world.c" />
|
||||
<ClCompile Include="zone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bih.h" />
|
||||
<ClInclude Include="bspfile.h" />
|
||||
<ClInclude Include="cap_avi.h" />
|
||||
<ClInclude Include="cap_ogg.h" />
|
||||
<ClInclude Include="cdaudio.h" />
|
||||
<ClInclude Include="cl_collision.h" />
|
||||
<ClInclude Include="cl_dyntexture.h" />
|
||||
<ClInclude Include="cl_gecko.h" />
|
||||
<ClInclude Include="cl_screen.h" />
|
||||
<ClInclude Include="cl_video.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="clprogdefs.h" />
|
||||
<ClInclude Include="clvm_cmds.h" />
|
||||
<ClInclude Include="cmd.h" />
|
||||
<ClInclude Include="collision.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="console.h" />
|
||||
<ClInclude Include="crypto.h" />
|
||||
<ClInclude Include="csprogs.h" />
|
||||
<ClInclude Include="curves.h" />
|
||||
<ClInclude Include="cvar.h" />
|
||||
<ClInclude Include="dpsoftrast.h" />
|
||||
<ClInclude Include="dpvsimpledecode.h" />
|
||||
<ClInclude Include="draw.h" />
|
||||
<ClInclude Include="fs.h" />
|
||||
<ClInclude Include="ft2.h" />
|
||||
<ClInclude Include="ft2_defs.h" />
|
||||
<ClInclude Include="ft2_fontdefs.h" />
|
||||
<ClInclude Include="gl_backend.h" />
|
||||
<ClInclude Include="glquake.h" />
|
||||
<ClInclude Include="hmac.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="image_png.h" />
|
||||
<ClInclude Include="input.h" />
|
||||
<ClInclude Include="intoverflow.h" />
|
||||
<ClInclude Include="jpeg.h" />
|
||||
<ClInclude Include="keys.h" />
|
||||
<ClInclude Include="lhfont.h" />
|
||||
<ClInclude Include="lhnet.h" />
|
||||
<ClInclude Include="libcurl.h" />
|
||||
<ClInclude Include="mathlib.h" />
|
||||
<ClInclude Include="matrixlib.h" />
|
||||
<ClInclude Include="mdfour.h" />
|
||||
<ClInclude Include="menu.h" />
|
||||
<ClInclude Include="meshqueue.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_generic.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_sse.h" />
|
||||
<ClInclude Include="model_alias.h" />
|
||||
<ClInclude Include="model_brush.h" />
|
||||
<ClInclude Include="model_dpmodel.h" />
|
||||
<ClInclude Include="model_iqm.h" />
|
||||
<ClInclude Include="model_psk.h" />
|
||||
<ClInclude Include="model_shared.h" />
|
||||
<ClInclude Include="model_sprite.h" />
|
||||
<ClInclude Include="model_zymotic.h" />
|
||||
<ClInclude Include="modelgen.h" />
|
||||
<ClInclude Include="mprogdefs.h" />
|
||||
<ClInclude Include="netconn.h" />
|
||||
<ClInclude Include="palette.h" />
|
||||
<ClInclude Include="polygon.h" />
|
||||
<ClInclude Include="portals.h" />
|
||||
<ClInclude Include="pr_comp.h" />
|
||||
<ClInclude Include="progdefs.h" />
|
||||
<ClInclude Include="progs.h" />
|
||||
<ClInclude Include="progsvm.h" />
|
||||
<ClInclude Include="protocol.h" />
|
||||
<ClInclude Include="prvm_cmds.h" />
|
||||
<ClInclude Include="prvm_execprogram.h" />
|
||||
<ClInclude Include="qtypes.h" />
|
||||
<ClInclude Include="quakedef.h" />
|
||||
<ClInclude Include="r_lerpanim.h" />
|
||||
<ClInclude Include="r_modules.h" />
|
||||
<ClInclude Include="r_shadow.h" />
|
||||
<ClInclude Include="r_textures.h" />
|
||||
<ClInclude Include="render.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="sbar.h" />
|
||||
<ClInclude Include="screen.h" />
|
||||
<ClInclude Include="server.h" />
|
||||
<ClInclude Include="shader_glsl.h" />
|
||||
<ClInclude Include="shader_hlsl.h" />
|
||||
<ClInclude Include="snd_main.h" />
|
||||
<ClInclude Include="snd_ogg.h" />
|
||||
<ClInclude Include="snd_wav.h" />
|
||||
<ClInclude Include="sound.h" />
|
||||
<ClInclude Include="spritegn.h" />
|
||||
<ClInclude Include="sv_demo.h" />
|
||||
<ClInclude Include="svbsp.h" />
|
||||
<ClInclude Include="sys.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
<ClInclude Include="timing.h" />
|
||||
<ClInclude Include="utf8lib.h" />
|
||||
<ClInclude Include="vid.h" />
|
||||
<ClInclude Include="vsdirent.h" />
|
||||
<ClInclude Include="wad.h" />
|
||||
<ClInclude Include="world.h" />
|
||||
<ClInclude Include="zone.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,741 @@
|
|||
# Microsoft Developer Studio Project File - Name="darkplaces-dedicated" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=darkplaces-dedicated - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "darkplaces-dedicated.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "darkplaces-dedicated.mak" CFG="darkplaces-dedicated - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "darkplaces-dedicated - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "darkplaces-dedicated - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "darkplaces-dedicated - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release-Dedicated"
|
||||
# PROP Intermediate_Dir "Release-Dedicated"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Ox /Ot /Og /Oi /Op /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 ws2_32.lib winmm.lib user32.lib gdi32.lib /nologo /subsystem:console /LARGEADDRESSAWARE /machine:I386
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "darkplaces-dedicated - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug-Dedicated"
|
||||
# PROP Intermediate_Dir "Debug-Dedicated"
|
||||
# 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" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ws2_32.lib winmm.lib user32.lib gdi32.lib /nologo /subsystem:console /LARGEADDRESSAWARE /debug /machine:I386 /out:"Debug-Dedicated/darkplaces-dedicated-debug.exe" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "darkplaces-dedicated - Win32 Release"
|
||||
# Name "darkplaces-dedicated - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\builddate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cd_null.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cd_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_collision.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_demo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_dyntexture.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_gecko.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_input.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_parse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_particles.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_screen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_video.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\clvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cmd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\collision.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\console.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\csprogs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\curves.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cvar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dpvsimpledecode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\filematch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fractalnoise.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_backend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_draw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_rmain.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_rsurf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_textures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\host.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\host_cmd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image_png.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keys.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhnet.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mathlib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\matrixlib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mdfour.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\menu.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\meshqueue.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_alias.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_brush.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_sprite.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netconn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\palette.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\polygon.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\portals.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\protocol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_edict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_exec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_explosion.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lerpanim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lightning.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_modules.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_shadow.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_sky.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_sprites.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sbar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_null.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_demo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_move.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_phys.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_user.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svbsp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys_linux.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid_null.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\view.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wad.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\world.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zone.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bspfile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cdaudio.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_collision.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_dyntexture.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_gecko.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_screen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_video.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\client.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\clprogdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cmd.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\collision.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\console.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\csprogs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\curves.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cvar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dpvsimpledecode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\draw.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_backend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\glquake.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image_png.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\input.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhfont.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhnet.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mathlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\matrixlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mdfour.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\menu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\meshqueue.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_alias.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_brush.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_dpmodel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_psk.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_shared.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_sprite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_zymotic.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modelgen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mprogdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netconn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\palette.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\polygon.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\portals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\pr_comp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\pr_execprogram.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progsvm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\protocol.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_cmds.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_execprogram.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\qtypes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\quakedef.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lerpanim.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_shadow.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_textures.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\render.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sbar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\screen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\server.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_main.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sound.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spritegn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_demo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svbsp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wad.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\world.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zone.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -0,0 +1,292 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}</ProjectGuid>
|
||||
<RootNamespace>darkplacessdl</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2010_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2010_win32.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bih.c" />
|
||||
<ClCompile Include="builddate.c" />
|
||||
<ClCompile Include="cap_avi.c" />
|
||||
<ClCompile Include="cap_ogg.c" />
|
||||
<ClCompile Include="cd_sdl.c" />
|
||||
<ClCompile Include="cd_shared.c" />
|
||||
<ClCompile Include="cl_collision.c" />
|
||||
<ClCompile Include="cl_demo.c" />
|
||||
<ClCompile Include="cl_dyntexture.c" />
|
||||
<ClCompile Include="cl_input.c" />
|
||||
<ClCompile Include="cl_main.c" />
|
||||
<ClCompile Include="cl_parse.c" />
|
||||
<ClCompile Include="cl_particles.c" />
|
||||
<ClCompile Include="cl_screen.c" />
|
||||
<ClCompile Include="cl_video.c" />
|
||||
<ClCompile Include="clvm_cmds.c" />
|
||||
<ClCompile Include="cmd.c" />
|
||||
<ClCompile Include="collision.c" />
|
||||
<ClCompile Include="common.c" />
|
||||
<ClCompile Include="console.c" />
|
||||
<ClCompile Include="crypto.c" />
|
||||
<ClCompile Include="csprogs.c" />
|
||||
<ClCompile Include="curves.c" />
|
||||
<ClCompile Include="cvar.c" />
|
||||
<ClCompile Include="dpsoftrast.c" />
|
||||
<ClCompile Include="dpvsimpledecode.c" />
|
||||
<ClCompile Include="filematch.c" />
|
||||
<ClCompile Include="fractalnoise.c" />
|
||||
<ClCompile Include="fs.c" />
|
||||
<ClCompile Include="ft2.c" />
|
||||
<ClCompile Include="gl_backend.c" />
|
||||
<ClCompile Include="gl_draw.c" />
|
||||
<ClCompile Include="gl_rmain.c" />
|
||||
<ClCompile Include="gl_rsurf.c" />
|
||||
<ClCompile Include="gl_textures.c" />
|
||||
<ClCompile Include="hmac.c" />
|
||||
<ClCompile Include="host.c" />
|
||||
<ClCompile Include="host_cmd.c" />
|
||||
<ClCompile Include="image.c" />
|
||||
<ClCompile Include="image_png.c" />
|
||||
<ClCompile Include="jpeg.c" />
|
||||
<ClCompile Include="keys.c" />
|
||||
<ClCompile Include="lhnet.c" />
|
||||
<ClCompile Include="libcurl.c" />
|
||||
<ClCompile Include="mathlib.c" />
|
||||
<ClCompile Include="matrixlib.c" />
|
||||
<ClCompile Include="mdfour.c" />
|
||||
<ClCompile Include="menu.c" />
|
||||
<ClCompile Include="meshqueue.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_generic.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_sse.c" />
|
||||
<ClCompile Include="model_alias.c" />
|
||||
<ClCompile Include="model_brush.c" />
|
||||
<ClCompile Include="model_shared.c" />
|
||||
<ClCompile Include="model_sprite.c" />
|
||||
<ClCompile Include="mvm_cmds.c" />
|
||||
<ClCompile Include="netconn.c" />
|
||||
<ClCompile Include="palette.c" />
|
||||
<ClCompile Include="polygon.c" />
|
||||
<ClCompile Include="portals.c" />
|
||||
<ClCompile Include="protocol.c" />
|
||||
<ClCompile Include="prvm_cmds.c" />
|
||||
<ClCompile Include="prvm_edict.c" />
|
||||
<ClCompile Include="prvm_exec.c" />
|
||||
<ClCompile Include="r_explosion.c" />
|
||||
<ClCompile Include="r_lightning.c" />
|
||||
<ClCompile Include="r_modules.c" />
|
||||
<ClCompile Include="r_shadow.c" />
|
||||
<ClCompile Include="r_sky.c" />
|
||||
<ClCompile Include="r_sprites.c" />
|
||||
<ClCompile Include="sbar.c" />
|
||||
<ClCompile Include="snd_main.c" />
|
||||
<ClCompile Include="snd_mem.c" />
|
||||
<ClCompile Include="snd_mix.c" />
|
||||
<ClCompile Include="snd_ogg.c" />
|
||||
<ClCompile Include="snd_sdl.c" />
|
||||
<ClCompile Include="snd_wav.c" />
|
||||
<ClCompile Include="sv_demo.c" />
|
||||
<ClCompile Include="sv_main.c" />
|
||||
<ClCompile Include="sv_move.c" />
|
||||
<ClCompile Include="sv_phys.c" />
|
||||
<ClCompile Include="sv_user.c" />
|
||||
<ClCompile Include="svbsp.c" />
|
||||
<ClCompile Include="svvm_cmds.c" />
|
||||
<ClCompile Include="sys_sdl.c" />
|
||||
<ClCompile Include="sys_shared.c" />
|
||||
<ClCompile Include="thread_sdl.c" />
|
||||
<ClCompile Include="utf8lib.c" />
|
||||
<ClCompile Include="vid_sdl.c" />
|
||||
<ClCompile Include="vid_shared.c" />
|
||||
<ClCompile Include="view.c" />
|
||||
<ClCompile Include="wad.c" />
|
||||
<ClCompile Include="world.c" />
|
||||
<ClCompile Include="zone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bih.h" />
|
||||
<ClInclude Include="bspfile.h" />
|
||||
<ClInclude Include="cap_avi.h" />
|
||||
<ClInclude Include="cap_ogg.h" />
|
||||
<ClInclude Include="cdaudio.h" />
|
||||
<ClInclude Include="cl_collision.h" />
|
||||
<ClInclude Include="cl_dyntexture.h" />
|
||||
<ClInclude Include="cl_gecko.h" />
|
||||
<ClInclude Include="cl_screen.h" />
|
||||
<ClInclude Include="cl_video.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="clprogdefs.h" />
|
||||
<ClInclude Include="clvm_cmds.h" />
|
||||
<ClInclude Include="cmd.h" />
|
||||
<ClInclude Include="collision.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="console.h" />
|
||||
<ClInclude Include="crypto.h" />
|
||||
<ClInclude Include="csprogs.h" />
|
||||
<ClInclude Include="curves.h" />
|
||||
<ClInclude Include="cvar.h" />
|
||||
<ClInclude Include="dpsoftrast.h" />
|
||||
<ClInclude Include="dpvsimpledecode.h" />
|
||||
<ClInclude Include="draw.h" />
|
||||
<ClInclude Include="fs.h" />
|
||||
<ClInclude Include="ft2.h" />
|
||||
<ClInclude Include="ft2_defs.h" />
|
||||
<ClInclude Include="ft2_fontdefs.h" />
|
||||
<ClInclude Include="gl_backend.h" />
|
||||
<ClInclude Include="glquake.h" />
|
||||
<ClInclude Include="hmac.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="image_png.h" />
|
||||
<ClInclude Include="input.h" />
|
||||
<ClInclude Include="intoverflow.h" />
|
||||
<ClInclude Include="jpeg.h" />
|
||||
<ClInclude Include="keys.h" />
|
||||
<ClInclude Include="lhfont.h" />
|
||||
<ClInclude Include="lhnet.h" />
|
||||
<ClInclude Include="libcurl.h" />
|
||||
<ClInclude Include="mathlib.h" />
|
||||
<ClInclude Include="matrixlib.h" />
|
||||
<ClInclude Include="mdfour.h" />
|
||||
<ClInclude Include="menu.h" />
|
||||
<ClInclude Include="meshqueue.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_generic.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_sse.h" />
|
||||
<ClInclude Include="model_alias.h" />
|
||||
<ClInclude Include="model_brush.h" />
|
||||
<ClInclude Include="model_dpmodel.h" />
|
||||
<ClInclude Include="model_iqm.h" />
|
||||
<ClInclude Include="model_psk.h" />
|
||||
<ClInclude Include="model_shared.h" />
|
||||
<ClInclude Include="model_sprite.h" />
|
||||
<ClInclude Include="model_zymotic.h" />
|
||||
<ClInclude Include="modelgen.h" />
|
||||
<ClInclude Include="mprogdefs.h" />
|
||||
<ClInclude Include="netconn.h" />
|
||||
<ClInclude Include="palette.h" />
|
||||
<ClInclude Include="polygon.h" />
|
||||
<ClInclude Include="portals.h" />
|
||||
<ClInclude Include="pr_comp.h" />
|
||||
<ClInclude Include="progdefs.h" />
|
||||
<ClInclude Include="progs.h" />
|
||||
<ClInclude Include="progsvm.h" />
|
||||
<ClInclude Include="protocol.h" />
|
||||
<ClInclude Include="prvm_cmds.h" />
|
||||
<ClInclude Include="prvm_execprogram.h" />
|
||||
<ClInclude Include="qtypes.h" />
|
||||
<ClInclude Include="quakedef.h" />
|
||||
<ClInclude Include="r_lerpanim.h" />
|
||||
<ClInclude Include="r_modules.h" />
|
||||
<ClInclude Include="r_shadow.h" />
|
||||
<ClInclude Include="r_textures.h" />
|
||||
<ClInclude Include="render.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="sbar.h" />
|
||||
<ClInclude Include="screen.h" />
|
||||
<ClInclude Include="SDLMain.h" />
|
||||
<ClInclude Include="server.h" />
|
||||
<ClInclude Include="shader_glsl.h" />
|
||||
<ClInclude Include="shader_hlsl.h" />
|
||||
<ClInclude Include="snd_main.h" />
|
||||
<ClInclude Include="snd_ogg.h" />
|
||||
<ClInclude Include="snd_wav.h" />
|
||||
<ClInclude Include="sound.h" />
|
||||
<ClInclude Include="spritegn.h" />
|
||||
<ClInclude Include="sv_demo.h" />
|
||||
<ClInclude Include="svbsp.h" />
|
||||
<ClInclude Include="sys.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
<ClInclude Include="timing.h" />
|
||||
<ClInclude Include="utf8lib.h" />
|
||||
<ClInclude Include="vid.h" />
|
||||
<ClInclude Include="wad.h" />
|
||||
<ClInclude Include="world.h" />
|
||||
<ClInclude Include="zone.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,380 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}</ProjectGuid>
|
||||
<RootNamespace>darkplacessdl</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>darkplaces-sdl-vs2012</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\</OutDir>
|
||||
<IntDir>$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;WIN64;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;WIN64;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bih.c" />
|
||||
<ClCompile Include="builddate.c" />
|
||||
<ClCompile Include="cap_avi.c" />
|
||||
<ClCompile Include="cap_ogg.c" />
|
||||
<ClCompile Include="cd_sdl.c" />
|
||||
<ClCompile Include="cd_shared.c" />
|
||||
<ClCompile Include="cl_collision.c" />
|
||||
<ClCompile Include="cl_demo.c" />
|
||||
<ClCompile Include="cl_dyntexture.c" />
|
||||
<ClCompile Include="cl_input.c" />
|
||||
<ClCompile Include="cl_main.c" />
|
||||
<ClCompile Include="cl_parse.c" />
|
||||
<ClCompile Include="cl_particles.c" />
|
||||
<ClCompile Include="cl_screen.c" />
|
||||
<ClCompile Include="cl_video.c" />
|
||||
<ClCompile Include="clvm_cmds.c" />
|
||||
<ClCompile Include="cmd.c" />
|
||||
<ClCompile Include="collision.c" />
|
||||
<ClCompile Include="common.c" />
|
||||
<ClCompile Include="console.c" />
|
||||
<ClCompile Include="crypto.c" />
|
||||
<ClCompile Include="csprogs.c" />
|
||||
<ClCompile Include="curves.c" />
|
||||
<ClCompile Include="cvar.c" />
|
||||
<ClCompile Include="dpsoftrast.c" />
|
||||
<ClCompile Include="dpvsimpledecode.c" />
|
||||
<ClCompile Include="filematch.c" />
|
||||
<ClCompile Include="fractalnoise.c" />
|
||||
<ClCompile Include="fs.c" />
|
||||
<ClCompile Include="ft2.c" />
|
||||
<ClCompile Include="gl_backend.c" />
|
||||
<ClCompile Include="gl_draw.c" />
|
||||
<ClCompile Include="gl_rmain.c" />
|
||||
<ClCompile Include="gl_rsurf.c" />
|
||||
<ClCompile Include="gl_textures.c" />
|
||||
<ClCompile Include="hmac.c" />
|
||||
<ClCompile Include="host.c" />
|
||||
<ClCompile Include="host_cmd.c" />
|
||||
<ClCompile Include="image.c" />
|
||||
<ClCompile Include="image_png.c" />
|
||||
<ClCompile Include="jpeg.c" />
|
||||
<ClCompile Include="keys.c" />
|
||||
<ClCompile Include="lhnet.c" />
|
||||
<ClCompile Include="libcurl.c" />
|
||||
<ClCompile Include="mathlib.c" />
|
||||
<ClCompile Include="matrixlib.c" />
|
||||
<ClCompile Include="mdfour.c" />
|
||||
<ClCompile Include="menu.c" />
|
||||
<ClCompile Include="meshqueue.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_generic.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_sse.c" />
|
||||
<ClCompile Include="model_alias.c" />
|
||||
<ClCompile Include="model_brush.c" />
|
||||
<ClCompile Include="model_shared.c" />
|
||||
<ClCompile Include="model_sprite.c" />
|
||||
<ClCompile Include="mvm_cmds.c" />
|
||||
<ClCompile Include="netconn.c" />
|
||||
<ClCompile Include="palette.c" />
|
||||
<ClCompile Include="polygon.c" />
|
||||
<ClCompile Include="portals.c" />
|
||||
<ClCompile Include="protocol.c" />
|
||||
<ClCompile Include="prvm_cmds.c" />
|
||||
<ClCompile Include="prvm_edict.c" />
|
||||
<ClCompile Include="prvm_exec.c" />
|
||||
<ClCompile Include="r_explosion.c" />
|
||||
<ClCompile Include="r_lightning.c" />
|
||||
<ClCompile Include="r_modules.c" />
|
||||
<ClCompile Include="r_shadow.c" />
|
||||
<ClCompile Include="r_sky.c" />
|
||||
<ClCompile Include="r_sprites.c" />
|
||||
<ClCompile Include="sbar.c" />
|
||||
<ClCompile Include="snd_main.c" />
|
||||
<ClCompile Include="snd_mem.c" />
|
||||
<ClCompile Include="snd_mix.c" />
|
||||
<ClCompile Include="snd_ogg.c" />
|
||||
<ClCompile Include="snd_sdl.c" />
|
||||
<ClCompile Include="snd_wav.c" />
|
||||
<ClCompile Include="sv_demo.c" />
|
||||
<ClCompile Include="sv_main.c" />
|
||||
<ClCompile Include="sv_move.c" />
|
||||
<ClCompile Include="sv_phys.c" />
|
||||
<ClCompile Include="sv_user.c" />
|
||||
<ClCompile Include="svbsp.c" />
|
||||
<ClCompile Include="svvm_cmds.c" />
|
||||
<ClCompile Include="sys_sdl.c" />
|
||||
<ClCompile Include="sys_shared.c" />
|
||||
<ClCompile Include="thread_sdl.c" />
|
||||
<ClCompile Include="utf8lib.c" />
|
||||
<ClCompile Include="vid_sdl.c" />
|
||||
<ClCompile Include="vid_shared.c" />
|
||||
<ClCompile Include="view.c" />
|
||||
<ClCompile Include="wad.c" />
|
||||
<ClCompile Include="world.c" />
|
||||
<ClCompile Include="zone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bih.h" />
|
||||
<ClInclude Include="bspfile.h" />
|
||||
<ClInclude Include="cap_avi.h" />
|
||||
<ClInclude Include="cap_ogg.h" />
|
||||
<ClInclude Include="cdaudio.h" />
|
||||
<ClInclude Include="cl_collision.h" />
|
||||
<ClInclude Include="cl_dyntexture.h" />
|
||||
<ClInclude Include="cl_gecko.h" />
|
||||
<ClInclude Include="cl_screen.h" />
|
||||
<ClInclude Include="cl_video.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="clprogdefs.h" />
|
||||
<ClInclude Include="clvm_cmds.h" />
|
||||
<ClInclude Include="cmd.h" />
|
||||
<ClInclude Include="collision.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="console.h" />
|
||||
<ClInclude Include="crypto.h" />
|
||||
<ClInclude Include="csprogs.h" />
|
||||
<ClInclude Include="curves.h" />
|
||||
<ClInclude Include="cvar.h" />
|
||||
<ClInclude Include="dpsoftrast.h" />
|
||||
<ClInclude Include="dpvsimpledecode.h" />
|
||||
<ClInclude Include="draw.h" />
|
||||
<ClInclude Include="fs.h" />
|
||||
<ClInclude Include="ft2.h" />
|
||||
<ClInclude Include="ft2_defs.h" />
|
||||
<ClInclude Include="ft2_fontdefs.h" />
|
||||
<ClInclude Include="gl_backend.h" />
|
||||
<ClInclude Include="glquake.h" />
|
||||
<ClInclude Include="hmac.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="image_png.h" />
|
||||
<ClInclude Include="input.h" />
|
||||
<ClInclude Include="intoverflow.h" />
|
||||
<ClInclude Include="jpeg.h" />
|
||||
<ClInclude Include="keys.h" />
|
||||
<ClInclude Include="lhfont.h" />
|
||||
<ClInclude Include="lhnet.h" />
|
||||
<ClInclude Include="libcurl.h" />
|
||||
<ClInclude Include="mathlib.h" />
|
||||
<ClInclude Include="matrixlib.h" />
|
||||
<ClInclude Include="mdfour.h" />
|
||||
<ClInclude Include="menu.h" />
|
||||
<ClInclude Include="meshqueue.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_generic.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_sse.h" />
|
||||
<ClInclude Include="model_alias.h" />
|
||||
<ClInclude Include="model_brush.h" />
|
||||
<ClInclude Include="model_dpmodel.h" />
|
||||
<ClInclude Include="model_iqm.h" />
|
||||
<ClInclude Include="model_psk.h" />
|
||||
<ClInclude Include="model_shared.h" />
|
||||
<ClInclude Include="model_sprite.h" />
|
||||
<ClInclude Include="model_zymotic.h" />
|
||||
<ClInclude Include="modelgen.h" />
|
||||
<ClInclude Include="mprogdefs.h" />
|
||||
<ClInclude Include="netconn.h" />
|
||||
<ClInclude Include="palette.h" />
|
||||
<ClInclude Include="polygon.h" />
|
||||
<ClInclude Include="portals.h" />
|
||||
<ClInclude Include="pr_comp.h" />
|
||||
<ClInclude Include="progdefs.h" />
|
||||
<ClInclude Include="progs.h" />
|
||||
<ClInclude Include="progsvm.h" />
|
||||
<ClInclude Include="protocol.h" />
|
||||
<ClInclude Include="prvm_cmds.h" />
|
||||
<ClInclude Include="prvm_execprogram.h" />
|
||||
<ClInclude Include="qtypes.h" />
|
||||
<ClInclude Include="quakedef.h" />
|
||||
<ClInclude Include="r_lerpanim.h" />
|
||||
<ClInclude Include="r_modules.h" />
|
||||
<ClInclude Include="r_shadow.h" />
|
||||
<ClInclude Include="r_textures.h" />
|
||||
<ClInclude Include="render.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="sbar.h" />
|
||||
<ClInclude Include="screen.h" />
|
||||
<ClInclude Include="SDLMain.h" />
|
||||
<ClInclude Include="server.h" />
|
||||
<ClInclude Include="shader_glsl.h" />
|
||||
<ClInclude Include="shader_hlsl.h" />
|
||||
<ClInclude Include="snd_main.h" />
|
||||
<ClInclude Include="snd_ogg.h" />
|
||||
<ClInclude Include="snd_wav.h" />
|
||||
<ClInclude Include="sound.h" />
|
||||
<ClInclude Include="spritegn.h" />
|
||||
<ClInclude Include="sv_demo.h" />
|
||||
<ClInclude Include="svbsp.h" />
|
||||
<ClInclude Include="sys.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
<ClInclude Include="timing.h" />
|
||||
<ClInclude Include="utf8lib.h" />
|
||||
<ClInclude Include="vid.h" />
|
||||
<ClInclude Include="vsdirent.h" />
|
||||
<ClInclude Include="wad.h" />
|
||||
<ClInclude Include="world.h" />
|
||||
<ClInclude Include="zone.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,769 @@
|
|||
# Microsoft Developer Studio Project File - Name="darkplaces-sdl" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=darkplaces-sdl - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "darkplaces-sdl.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "darkplaces-sdl.mak" CFG="darkplaces-sdl - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "darkplaces-sdl - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "darkplaces-sdl - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "darkplaces-sdl - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release-SDL"
|
||||
# PROP Intermediate_Dir "Release-SDL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Ox /Ot /Og /Oi /Op /I "SDL/include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 ws2_32.lib winmm.lib sdl.lib sdlmain.lib user32.lib /nologo /subsystem:console /LARGEADDRESSAWARE /machine:I386 /libpath:"SDL/lib"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "darkplaces-sdl - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug-SDL"
|
||||
# PROP Intermediate_Dir "Debug-SDL"
|
||||
# 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" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "SDL/include" /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ws2_32.lib winmm.lib sdl.lib sdlmain.lib user32.lib /nologo /subsystem:console /LARGEADDRESSAWARE /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"Debug-SDL/darkplaces-sdl-debug.exe" /pdbtype:sept /libpath:"SDL/lib"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "darkplaces-sdl - Win32 Release"
|
||||
# Name "darkplaces-sdl - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\builddate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cd_sdl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cd_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_collision.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_demo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_dyntexture.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_gecko.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_input.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_parse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_particles.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_screen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_video.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\clvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cmd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\collision.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\console.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\csprogs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\curves.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cvar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dpvsimpledecode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\filematch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fractalnoise.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_backend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_draw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_rmain.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_rsurf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_textures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\host.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\host_cmd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image_png.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keys.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhnet.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mathlib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\matrixlib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mdfour.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\menu.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\meshqueue.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_alias.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_brush.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_sprite.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netconn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\palette.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\polygon.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\portals.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\protocol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_edict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_exec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_explosion.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lerpanim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lightning.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_modules.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_shadow.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_sky.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_sprites.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sbar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_mem.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_mix.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_ogg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_sdl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_wav.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_demo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_move.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_phys.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_user.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svbsp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys_sdl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid_sdl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\view.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wad.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\world.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zone.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bspfile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cdaudio.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_collision.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_dyntexture.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_gecko.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_screen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_video.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\client.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\clprogdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cmd.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\collision.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\conproc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\console.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\csprogs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\curves.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cvar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dpvsimpledecode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\draw.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_backend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\glquake.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image_png.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\input.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhfont.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhnet.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mathlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\matrixlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mdfour.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\menu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\meshqueue.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_alias.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_brush.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_dpmodel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_psk.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_shared.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_sprite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_zymotic.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modelgen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mprogdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netconn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\palette.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\polygon.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\portals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\pr_comp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\pr_execprogram.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progsvm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\protocol.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_cmds.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_execprogram.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\qtypes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\quakedef.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lerpanim.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_shadow.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_textures.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\render.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sbar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\screen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\server.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_main.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_ogg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_wav.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sound.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spritegn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_demo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svbsp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wad.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\world.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zone.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-wgl", "darkplaces-wgl-vs2010.vcxproj", "{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-sdl", "darkplaces-sdl-vs2010.vcxproj", "{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-dedicated", "darkplaces-dedicated-vs2010.vcxproj", "{389AE334-D907-4069-90B3-F0551B3EFDE9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.Build.0 = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.Build.0 = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.ActiveCfg = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.Build.0 = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|x64.Build.0 = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|Win32.Build.0 = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|x64.ActiveCfg = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|x64.Build.0 = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.Build.0 = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.Build.0 = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.ActiveCfg = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2012 for Windows Desktop
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-wgl", "darkplaces-wgl-vs2012.vcxproj", "{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-sdl", "darkplaces-sdl-vs2012.vcxproj", "{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-dedicated", "darkplaces-dedicated-vs2012.vcxproj", "{389AE334-D907-4069-90B3-F0551B3EFDE9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.Build.0 = Debug|x64
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.Build.0 = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.ActiveCfg = Release|x64
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.Build.0 = Release|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|x64.Build.0 = Debug|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|Win32.Build.0 = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|x64.ActiveCfg = Release|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|x64.Build.0 = Release|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.Build.0 = Debug|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.Build.0 = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.ActiveCfg = Release|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,296 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}</ProjectGuid>
|
||||
<RootNamespace>darkplaceswgl</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2010_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2010_win32.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;SUPPORTDIRECTX;SUPPORTD3D;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;4201;4611;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;SUPPORTDIRECTX;SUPPORTD3D;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;4201;4611;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bih.c" />
|
||||
<ClCompile Include="builddate.c" />
|
||||
<ClCompile Include="cap_avi.c" />
|
||||
<ClCompile Include="cap_ogg.c" />
|
||||
<ClCompile Include="cd_shared.c" />
|
||||
<ClCompile Include="cd_win.c" />
|
||||
<ClCompile Include="cl_collision.c" />
|
||||
<ClCompile Include="cl_demo.c" />
|
||||
<ClCompile Include="cl_dyntexture.c" />
|
||||
<ClCompile Include="cl_input.c" />
|
||||
<ClCompile Include="cl_main.c" />
|
||||
<ClCompile Include="cl_parse.c" />
|
||||
<ClCompile Include="cl_particles.c" />
|
||||
<ClCompile Include="cl_screen.c" />
|
||||
<ClCompile Include="cl_video.c" />
|
||||
<ClCompile Include="clvm_cmds.c" />
|
||||
<ClCompile Include="cmd.c" />
|
||||
<ClCompile Include="collision.c" />
|
||||
<ClCompile Include="common.c" />
|
||||
<ClCompile Include="console.c" />
|
||||
<ClCompile Include="crypto.c" />
|
||||
<ClCompile Include="csprogs.c" />
|
||||
<ClCompile Include="curves.c" />
|
||||
<ClCompile Include="cvar.c" />
|
||||
<ClCompile Include="dpsoftrast.c" />
|
||||
<ClCompile Include="dpvsimpledecode.c" />
|
||||
<ClCompile Include="filematch.c" />
|
||||
<ClCompile Include="fractalnoise.c" />
|
||||
<ClCompile Include="fs.c" />
|
||||
<ClCompile Include="ft2.c" />
|
||||
<ClCompile Include="gl_backend.c" />
|
||||
<ClCompile Include="gl_draw.c" />
|
||||
<ClCompile Include="gl_rmain.c" />
|
||||
<ClCompile Include="gl_rsurf.c" />
|
||||
<ClCompile Include="gl_textures.c" />
|
||||
<ClCompile Include="hmac.c" />
|
||||
<ClCompile Include="host.c" />
|
||||
<ClCompile Include="host_cmd.c" />
|
||||
<ClCompile Include="image.c" />
|
||||
<ClCompile Include="image_png.c" />
|
||||
<ClCompile Include="jpeg.c" />
|
||||
<ClCompile Include="keys.c" />
|
||||
<ClCompile Include="lhnet.c" />
|
||||
<ClCompile Include="libcurl.c" />
|
||||
<ClCompile Include="mathlib.c" />
|
||||
<ClCompile Include="matrixlib.c" />
|
||||
<ClCompile Include="mdfour.c" />
|
||||
<ClCompile Include="menu.c" />
|
||||
<ClCompile Include="meshqueue.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_generic.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_sse.c" />
|
||||
<ClCompile Include="model_alias.c" />
|
||||
<ClCompile Include="model_brush.c" />
|
||||
<ClCompile Include="model_shared.c" />
|
||||
<ClCompile Include="model_sprite.c" />
|
||||
<ClCompile Include="mvm_cmds.c" />
|
||||
<ClCompile Include="netconn.c" />
|
||||
<ClCompile Include="palette.c" />
|
||||
<ClCompile Include="polygon.c" />
|
||||
<ClCompile Include="portals.c" />
|
||||
<ClCompile Include="protocol.c" />
|
||||
<ClCompile Include="prvm_cmds.c" />
|
||||
<ClCompile Include="prvm_edict.c" />
|
||||
<ClCompile Include="prvm_exec.c" />
|
||||
<ClCompile Include="r_explosion.c" />
|
||||
<ClCompile Include="r_lightning.c" />
|
||||
<ClCompile Include="r_modules.c" />
|
||||
<ClCompile Include="r_shadow.c" />
|
||||
<ClCompile Include="r_sky.c" />
|
||||
<ClCompile Include="r_sprites.c" />
|
||||
<ClCompile Include="sbar.c" />
|
||||
<ClCompile Include="snd_main.c" />
|
||||
<ClCompile Include="snd_mem.c" />
|
||||
<ClCompile Include="snd_mix.c" />
|
||||
<ClCompile Include="snd_ogg.c" />
|
||||
<ClCompile Include="snd_wav.c" />
|
||||
<ClCompile Include="snd_win.c" />
|
||||
<ClCompile Include="sv_demo.c" />
|
||||
<ClCompile Include="sv_main.c" />
|
||||
<ClCompile Include="sv_move.c" />
|
||||
<ClCompile Include="sv_phys.c" />
|
||||
<ClCompile Include="sv_user.c" />
|
||||
<ClCompile Include="svbsp.c" />
|
||||
<ClCompile Include="svvm_cmds.c" />
|
||||
<ClCompile Include="sys_shared.c" />
|
||||
<ClCompile Include="sys_win.c" />
|
||||
<ClCompile Include="thread_win.c" />
|
||||
<ClCompile Include="utf8lib.c" />
|
||||
<ClCompile Include="vid_shared.c" />
|
||||
<ClCompile Include="vid_wgl.c" />
|
||||
<ClCompile Include="view.c" />
|
||||
<ClCompile Include="wad.c" />
|
||||
<ClCompile Include="world.c" />
|
||||
<ClCompile Include="zone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bih.h" />
|
||||
<ClInclude Include="bspfile.h" />
|
||||
<ClInclude Include="cap_avi.h" />
|
||||
<ClInclude Include="cap_ogg.h" />
|
||||
<ClInclude Include="cdaudio.h" />
|
||||
<ClInclude Include="cl_collision.h" />
|
||||
<ClInclude Include="cl_dyntexture.h" />
|
||||
<ClInclude Include="cl_gecko.h" />
|
||||
<ClInclude Include="cl_screen.h" />
|
||||
<ClInclude Include="cl_video.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="clprogdefs.h" />
|
||||
<ClInclude Include="clvm_cmds.h" />
|
||||
<ClInclude Include="cmd.h" />
|
||||
<ClInclude Include="collision.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="conproc.h" />
|
||||
<ClInclude Include="console.h" />
|
||||
<ClInclude Include="crypto.h" />
|
||||
<ClInclude Include="csprogs.h" />
|
||||
<ClInclude Include="curves.h" />
|
||||
<ClInclude Include="cvar.h" />
|
||||
<ClInclude Include="dpsoftrast.h" />
|
||||
<ClInclude Include="dpvsimpledecode.h" />
|
||||
<ClInclude Include="draw.h" />
|
||||
<ClInclude Include="fs.h" />
|
||||
<ClInclude Include="ft2.h" />
|
||||
<ClInclude Include="ft2_defs.h" />
|
||||
<ClInclude Include="ft2_fontdefs.h" />
|
||||
<ClInclude Include="gl_backend.h" />
|
||||
<ClInclude Include="glquake.h" />
|
||||
<ClInclude Include="hmac.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="image_png.h" />
|
||||
<ClInclude Include="input.h" />
|
||||
<ClInclude Include="intoverflow.h" />
|
||||
<ClInclude Include="jpeg.h" />
|
||||
<ClInclude Include="keys.h" />
|
||||
<ClInclude Include="lhfont.h" />
|
||||
<ClInclude Include="lhnet.h" />
|
||||
<ClInclude Include="libcurl.h" />
|
||||
<ClInclude Include="mathlib.h" />
|
||||
<ClInclude Include="matrixlib.h" />
|
||||
<ClInclude Include="mdfour.h" />
|
||||
<ClInclude Include="menu.h" />
|
||||
<ClInclude Include="meshqueue.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_generic.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_sse.h" />
|
||||
<ClInclude Include="model_alias.h" />
|
||||
<ClInclude Include="model_brush.h" />
|
||||
<ClInclude Include="model_dpmodel.h" />
|
||||
<ClInclude Include="model_iqm.h" />
|
||||
<ClInclude Include="model_psk.h" />
|
||||
<ClInclude Include="model_shared.h" />
|
||||
<ClInclude Include="model_sprite.h" />
|
||||
<ClInclude Include="model_zymotic.h" />
|
||||
<ClInclude Include="modelgen.h" />
|
||||
<ClInclude Include="mprogdefs.h" />
|
||||
<ClInclude Include="netconn.h" />
|
||||
<ClInclude Include="palette.h" />
|
||||
<ClInclude Include="polygon.h" />
|
||||
<ClInclude Include="portals.h" />
|
||||
<ClInclude Include="pr_comp.h" />
|
||||
<ClInclude Include="progdefs.h" />
|
||||
<ClInclude Include="progs.h" />
|
||||
<ClInclude Include="progsvm.h" />
|
||||
<ClInclude Include="protocol.h" />
|
||||
<ClInclude Include="prvm_cmds.h" />
|
||||
<ClInclude Include="prvm_execprogram.h" />
|
||||
<ClInclude Include="qtypes.h" />
|
||||
<ClInclude Include="quakedef.h" />
|
||||
<ClInclude Include="r_lerpanim.h" />
|
||||
<ClInclude Include="r_modules.h" />
|
||||
<ClInclude Include="r_shadow.h" />
|
||||
<ClInclude Include="r_textures.h" />
|
||||
<ClInclude Include="render.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="sbar.h" />
|
||||
<ClInclude Include="screen.h" />
|
||||
<ClInclude Include="server.h" />
|
||||
<ClInclude Include="shader_glsl.h" />
|
||||
<ClInclude Include="shader_hlsl.h" />
|
||||
<ClInclude Include="snd_main.h" />
|
||||
<ClInclude Include="snd_ogg.h" />
|
||||
<ClInclude Include="snd_wav.h" />
|
||||
<ClInclude Include="sound.h" />
|
||||
<ClInclude Include="spritegn.h" />
|
||||
<ClInclude Include="sv_demo.h" />
|
||||
<ClInclude Include="svbsp.h" />
|
||||
<ClInclude Include="sys.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
<ClInclude Include="timing.h" />
|
||||
<ClInclude Include="utf8lib.h" />
|
||||
<ClInclude Include="vid.h" />
|
||||
<ClInclude Include="wad.h" />
|
||||
<ClInclude Include="world.h" />
|
||||
<ClInclude Include="zone.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="darkplaces.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,385 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}</ProjectGuid>
|
||||
<RootNamespace>darkplaceswgl</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>darkplaces-wgl-vs2012</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win32.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="vs2012_win64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)-$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\</OutDir>
|
||||
<IntDir>$(Configuration)-$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;SUPPORTDIRECTX;SUPPORTD3D;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;4201;4611;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;WIN64;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;SUPPORTDIRECTX;SUPPORTD3D;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;4201;4611;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;SUPPORTDIRECTX;SUPPORTD3D;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;4201;4611;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;WIN32;WIN64;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;SUPPORTDIRECTX;SUPPORTD3D;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;4201;4611;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bih.c" />
|
||||
<ClCompile Include="builddate.c" />
|
||||
<ClCompile Include="cap_avi.c" />
|
||||
<ClCompile Include="cap_ogg.c" />
|
||||
<ClCompile Include="cd_shared.c" />
|
||||
<ClCompile Include="cd_win.c" />
|
||||
<ClCompile Include="cl_collision.c" />
|
||||
<ClCompile Include="cl_demo.c" />
|
||||
<ClCompile Include="cl_dyntexture.c" />
|
||||
<ClCompile Include="cl_input.c" />
|
||||
<ClCompile Include="cl_main.c" />
|
||||
<ClCompile Include="cl_parse.c" />
|
||||
<ClCompile Include="cl_particles.c" />
|
||||
<ClCompile Include="cl_screen.c" />
|
||||
<ClCompile Include="cl_video.c" />
|
||||
<ClCompile Include="clvm_cmds.c" />
|
||||
<ClCompile Include="cmd.c" />
|
||||
<ClCompile Include="collision.c" />
|
||||
<ClCompile Include="common.c" />
|
||||
<ClCompile Include="console.c" />
|
||||
<ClCompile Include="crypto.c" />
|
||||
<ClCompile Include="csprogs.c" />
|
||||
<ClCompile Include="curves.c" />
|
||||
<ClCompile Include="cvar.c" />
|
||||
<ClCompile Include="dpsoftrast.c" />
|
||||
<ClCompile Include="dpvsimpledecode.c" />
|
||||
<ClCompile Include="filematch.c" />
|
||||
<ClCompile Include="fractalnoise.c" />
|
||||
<ClCompile Include="fs.c" />
|
||||
<ClCompile Include="ft2.c" />
|
||||
<ClCompile Include="gl_backend.c" />
|
||||
<ClCompile Include="gl_draw.c" />
|
||||
<ClCompile Include="gl_rmain.c" />
|
||||
<ClCompile Include="gl_rsurf.c" />
|
||||
<ClCompile Include="gl_textures.c" />
|
||||
<ClCompile Include="hmac.c" />
|
||||
<ClCompile Include="host.c" />
|
||||
<ClCompile Include="host_cmd.c" />
|
||||
<ClCompile Include="image.c" />
|
||||
<ClCompile Include="image_png.c" />
|
||||
<ClCompile Include="jpeg.c" />
|
||||
<ClCompile Include="keys.c" />
|
||||
<ClCompile Include="lhnet.c" />
|
||||
<ClCompile Include="libcurl.c" />
|
||||
<ClCompile Include="mathlib.c" />
|
||||
<ClCompile Include="matrixlib.c" />
|
||||
<ClCompile Include="mdfour.c" />
|
||||
<ClCompile Include="menu.c" />
|
||||
<ClCompile Include="meshqueue.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_generic.c" />
|
||||
<ClCompile Include="mod_skeletal_animatevertices_sse.c" />
|
||||
<ClCompile Include="model_alias.c" />
|
||||
<ClCompile Include="model_brush.c" />
|
||||
<ClCompile Include="model_shared.c" />
|
||||
<ClCompile Include="model_sprite.c" />
|
||||
<ClCompile Include="mvm_cmds.c" />
|
||||
<ClCompile Include="netconn.c" />
|
||||
<ClCompile Include="palette.c" />
|
||||
<ClCompile Include="polygon.c" />
|
||||
<ClCompile Include="portals.c" />
|
||||
<ClCompile Include="protocol.c" />
|
||||
<ClCompile Include="prvm_cmds.c" />
|
||||
<ClCompile Include="prvm_edict.c" />
|
||||
<ClCompile Include="prvm_exec.c" />
|
||||
<ClCompile Include="r_explosion.c" />
|
||||
<ClCompile Include="r_lightning.c" />
|
||||
<ClCompile Include="r_modules.c" />
|
||||
<ClCompile Include="r_shadow.c" />
|
||||
<ClCompile Include="r_sky.c" />
|
||||
<ClCompile Include="r_sprites.c" />
|
||||
<ClCompile Include="sbar.c" />
|
||||
<ClCompile Include="snd_main.c" />
|
||||
<ClCompile Include="snd_mem.c" />
|
||||
<ClCompile Include="snd_mix.c" />
|
||||
<ClCompile Include="snd_ogg.c" />
|
||||
<ClCompile Include="snd_wav.c" />
|
||||
<ClCompile Include="snd_win.c" />
|
||||
<ClCompile Include="sv_demo.c" />
|
||||
<ClCompile Include="sv_main.c" />
|
||||
<ClCompile Include="sv_move.c" />
|
||||
<ClCompile Include="sv_phys.c" />
|
||||
<ClCompile Include="sv_user.c" />
|
||||
<ClCompile Include="svbsp.c" />
|
||||
<ClCompile Include="svvm_cmds.c" />
|
||||
<ClCompile Include="sys_shared.c" />
|
||||
<ClCompile Include="sys_win.c" />
|
||||
<ClCompile Include="thread_win.c" />
|
||||
<ClCompile Include="utf8lib.c" />
|
||||
<ClCompile Include="vid_shared.c" />
|
||||
<ClCompile Include="vid_wgl.c" />
|
||||
<ClCompile Include="view.c" />
|
||||
<ClCompile Include="wad.c" />
|
||||
<ClCompile Include="world.c" />
|
||||
<ClCompile Include="zone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bih.h" />
|
||||
<ClInclude Include="bspfile.h" />
|
||||
<ClInclude Include="cap_avi.h" />
|
||||
<ClInclude Include="cap_ogg.h" />
|
||||
<ClInclude Include="cdaudio.h" />
|
||||
<ClInclude Include="cl_collision.h" />
|
||||
<ClInclude Include="cl_dyntexture.h" />
|
||||
<ClInclude Include="cl_gecko.h" />
|
||||
<ClInclude Include="cl_screen.h" />
|
||||
<ClInclude Include="cl_video.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="clprogdefs.h" />
|
||||
<ClInclude Include="clvm_cmds.h" />
|
||||
<ClInclude Include="cmd.h" />
|
||||
<ClInclude Include="collision.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="conproc.h" />
|
||||
<ClInclude Include="console.h" />
|
||||
<ClInclude Include="crypto.h" />
|
||||
<ClInclude Include="csprogs.h" />
|
||||
<ClInclude Include="curves.h" />
|
||||
<ClInclude Include="cvar.h" />
|
||||
<ClInclude Include="dpsoftrast.h" />
|
||||
<ClInclude Include="dpvsimpledecode.h" />
|
||||
<ClInclude Include="draw.h" />
|
||||
<ClInclude Include="fs.h" />
|
||||
<ClInclude Include="ft2.h" />
|
||||
<ClInclude Include="ft2_defs.h" />
|
||||
<ClInclude Include="ft2_fontdefs.h" />
|
||||
<ClInclude Include="gl_backend.h" />
|
||||
<ClInclude Include="glquake.h" />
|
||||
<ClInclude Include="hmac.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="image_png.h" />
|
||||
<ClInclude Include="input.h" />
|
||||
<ClInclude Include="intoverflow.h" />
|
||||
<ClInclude Include="jpeg.h" />
|
||||
<ClInclude Include="keys.h" />
|
||||
<ClInclude Include="lhfont.h" />
|
||||
<ClInclude Include="lhnet.h" />
|
||||
<ClInclude Include="libcurl.h" />
|
||||
<ClInclude Include="mathlib.h" />
|
||||
<ClInclude Include="matrixlib.h" />
|
||||
<ClInclude Include="mdfour.h" />
|
||||
<ClInclude Include="menu.h" />
|
||||
<ClInclude Include="meshqueue.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_generic.h" />
|
||||
<ClInclude Include="mod_skeletal_animatevertices_sse.h" />
|
||||
<ClInclude Include="model_alias.h" />
|
||||
<ClInclude Include="model_brush.h" />
|
||||
<ClInclude Include="model_dpmodel.h" />
|
||||
<ClInclude Include="model_iqm.h" />
|
||||
<ClInclude Include="model_psk.h" />
|
||||
<ClInclude Include="model_shared.h" />
|
||||
<ClInclude Include="model_sprite.h" />
|
||||
<ClInclude Include="model_zymotic.h" />
|
||||
<ClInclude Include="modelgen.h" />
|
||||
<ClInclude Include="mprogdefs.h" />
|
||||
<ClInclude Include="netconn.h" />
|
||||
<ClInclude Include="palette.h" />
|
||||
<ClInclude Include="polygon.h" />
|
||||
<ClInclude Include="portals.h" />
|
||||
<ClInclude Include="pr_comp.h" />
|
||||
<ClInclude Include="progdefs.h" />
|
||||
<ClInclude Include="progs.h" />
|
||||
<ClInclude Include="progsvm.h" />
|
||||
<ClInclude Include="protocol.h" />
|
||||
<ClInclude Include="prvm_cmds.h" />
|
||||
<ClInclude Include="prvm_execprogram.h" />
|
||||
<ClInclude Include="qtypes.h" />
|
||||
<ClInclude Include="quakedef.h" />
|
||||
<ClInclude Include="r_lerpanim.h" />
|
||||
<ClInclude Include="r_modules.h" />
|
||||
<ClInclude Include="r_shadow.h" />
|
||||
<ClInclude Include="r_textures.h" />
|
||||
<ClInclude Include="render.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="sbar.h" />
|
||||
<ClInclude Include="screen.h" />
|
||||
<ClInclude Include="server.h" />
|
||||
<ClInclude Include="shader_glsl.h" />
|
||||
<ClInclude Include="shader_hlsl.h" />
|
||||
<ClInclude Include="snd_main.h" />
|
||||
<ClInclude Include="snd_ogg.h" />
|
||||
<ClInclude Include="snd_wav.h" />
|
||||
<ClInclude Include="sound.h" />
|
||||
<ClInclude Include="spritegn.h" />
|
||||
<ClInclude Include="sv_demo.h" />
|
||||
<ClInclude Include="svbsp.h" />
|
||||
<ClInclude Include="sys.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
<ClInclude Include="timing.h" />
|
||||
<ClInclude Include="utf8lib.h" />
|
||||
<ClInclude Include="vid.h" />
|
||||
<ClInclude Include="vsdirent.h" />
|
||||
<ClInclude Include="wad.h" />
|
||||
<ClInclude Include="world.h" />
|
||||
<ClInclude Include="zone.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="darkplaces.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,773 @@
|
|||
# Microsoft Developer Studio Project File - Name="darkplaces" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=darkplaces - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "darkplaces.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "darkplaces.mak" CFG="darkplaces - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "darkplaces - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "darkplaces - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "darkplaces - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Ox /Ot /Og /Oi /Op /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 ws2_32.lib winmm.lib user32.lib gdi32.lib comctl32.lib /nologo /subsystem:windows /LARGEADDRESSAWARE /machine:I386
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "darkplaces - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# 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" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "WIN32_LEAN_AND_MEAN" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_FILE_OFFSET_BITS=64" /D "__KERNEL_STRICT_NAMES" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ws2_32.lib winmm.lib user32.lib gdi32.lib comctl32.lib /nologo /subsystem:windows /LARGEADDRESSAWARE /debug /machine:I386 /out:"Debug/darkplaces-debug.exe" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "darkplaces - Win32 Release"
|
||||
# Name "darkplaces - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\builddate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cd_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cd_win.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_collision.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_demo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_dyntexture.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_gecko.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_input.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_parse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_particles.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_screen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_video.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\clvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cmd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\collision.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\conproc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\console.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\csprogs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\curves.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cvar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dpvsimpledecode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\filematch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fractalnoise.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_backend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_draw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_rmain.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_rsurf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_textures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\host.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\host_cmd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image_png.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keys.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhnet.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mathlib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\matrixlib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mdfour.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\menu.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\meshqueue.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_alias.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_brush.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_sprite.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netconn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\palette.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\polygon.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\portals.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\protocol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_edict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_exec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_explosion.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lerpanim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lightning.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_modules.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_shadow.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_sky.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_sprites.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sbar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_mem.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_mix.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_ogg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_wav.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_win.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_demo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_move.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_phys.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_user.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svbsp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svvm_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys_win.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid_shared.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid_wgl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\view.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wad.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\world.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zone.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bspfile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cdaudio.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_collision.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_dyntexture.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_gecko.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_screen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cl_video.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\client.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\clprogdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cmd.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\collision.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\conproc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\console.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\csprogs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\curves.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cvar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dpvsimpledecode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\draw.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gl_backend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\glquake.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\image_png.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\input.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpeg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhfont.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lhnet.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mathlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\matrixlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mdfour.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\menu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\meshqueue.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_alias.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_brush.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_dpmodel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_psk.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_shared.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_sprite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\model_zymotic.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\modelgen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mprogdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netconn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\palette.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\polygon.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\portals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\pr_comp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\pr_execprogram.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progdefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progsvm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\protocol.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_cmds.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prvm_execprogram.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\qtypes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\quakedef.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_lerpanim.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_shadow.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_textures.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\render.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sbar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\screen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\server.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_main.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_ogg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\snd_wav.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sound.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spritegn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sv_demo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\svbsp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vid.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wad.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\world.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zone.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\darkplaces.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -0,0 +1,53 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "darkplaces"=".\darkplaces.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dedicated"=".\darkplaces-dedicated.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "sdl"=".\darkplaces-sdl.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="3DRealms.WRATH" type="win32"/>
|
||||
<description>WRATH</description>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware> <!-- legacy -->
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness> <!-- falls back to pm if pmv2 is not available -->
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
</assembly>
|
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,27 @@
|
|||
#include <windows.h> // include for version info constants
|
||||
|
||||
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "darkplaces.ico"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,0,0,0
|
||||
PRODUCTVERSION 1,0,0,0
|
||||
FILETYPE VFT_APP
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "CompanyName", "Forest Hale Digital Services"
|
||||
VALUE "FileVersion", "1.0"
|
||||
VALUE "FileDescription", "DarkPlaces Game Engine"
|
||||
VALUE "InternalName", "darkplaces.exe"
|
||||
VALUE "LegalCopyright", "id Software, Forest Hale, and contributors"
|
||||
VALUE "LegalTrademarks", ""
|
||||
VALUE "OriginalFilename", "darkplaces.exe"
|
||||
VALUE "ProductName", "DarkPlaces"
|
||||
VALUE "ProductVersion", "1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1 RT_MANIFEST darkplaces.exe.manifest
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-wgl", "darkplaces-wgl.vcproj", "{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-sdl", "darkplaces-sdl.vcproj", "{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-dedicated", "darkplaces-dedicated.vcproj", "{389AE334-D907-4069-90B3-F0551B3EFDE9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.Build.0 = Debug|x64
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.Build.0 = Release|Win32
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.ActiveCfg = Release|x64
|
||||
{6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.Build.0 = Release|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Debug|x64.Build.0 = Debug|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|Win32.Build.0 = Release|Win32
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|x64.ActiveCfg = Release|x64
|
||||
{7470C8B3-FCA7-42D3-9909-5F9E735C7C51}.Release|x64.Build.0 = Release|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.Build.0 = Debug|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.Build.0 = Release|Win32
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.ActiveCfg = Release|x64
|
||||
{389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,142 @@
|
|||
/* XPM */
|
||||
static char * darkplaces_xpm[] = {
|
||||
"48 48 91 1",
|
||||
" c None",
|
||||
". c #020300",
|
||||
"+ c #120303",
|
||||
"@ c #180202",
|
||||
"# c #200301",
|
||||
"$ c #340100",
|
||||
"% c #410000",
|
||||
"& c #2D0704",
|
||||
"* c #11120F",
|
||||
"= c #4F0701",
|
||||
"- c #3F0F00",
|
||||
"; c #251615",
|
||||
"> c #780000",
|
||||
", c #2D1514",
|
||||
"' c #1D1C1A",
|
||||
") c #680F01",
|
||||
"! c #431A10",
|
||||
"~ c #3B221D",
|
||||
"{ c #2B2725",
|
||||
"] c #601B02",
|
||||
"^ c #9D0A00",
|
||||
"/ c #55220A",
|
||||
"( c #3D2B25",
|
||||
"_ c #53291D",
|
||||
": c #4E2E1B",
|
||||
"< c #333432",
|
||||
"[ c #4C2F26",
|
||||
"} c #812301",
|
||||
"| c #3F332F",
|
||||
"1 c #6B321A",
|
||||
"2 c #3F3F3D",
|
||||
"3 c #7E320E",
|
||||
"4 c #563B35",
|
||||
"5 c #4B3E39",
|
||||
"6 c #533F39",
|
||||
"7 c #6D3A2F",
|
||||
"8 c #943508",
|
||||
"9 c #514541",
|
||||
"0 c #654132",
|
||||
"a c #474845",
|
||||
"b c #6D442B",
|
||||
"c c #7C4328",
|
||||
"d c #504F4D",
|
||||
"e c #674A43",
|
||||
"f c #644F47",
|
||||
"g c #5E514B",
|
||||
"h c #B64005",
|
||||
"i c #91472F",
|
||||
"j c #575654",
|
||||
"k c #AD4A11",
|
||||
"l c #82533C",
|
||||
"m c #5F5E5B",
|
||||
"n c #745C54",
|
||||
"o c #6C5E5A",
|
||||
"p c #A25329",
|
||||
"q c #825C54",
|
||||
"r c #676664",
|
||||
"s c #816A62",
|
||||
"t c #70706E",
|
||||
"u c #986951",
|
||||
"v c #7D706C",
|
||||
"w c #C66935",
|
||||
"x c #7E7C79",
|
||||
"y c #FA6400",
|
||||
"z c #937B73",
|
||||
"A c #9E796A",
|
||||
"B c #B97557",
|
||||
"C c #A67B5D",
|
||||
"D c #878581",
|
||||
"E c #8F8D8B",
|
||||
"F c #AF8A7D",
|
||||
"G c #A58D83",
|
||||
"H c #9C8F8C",
|
||||
"I c #979693",
|
||||
"J c #B79590",
|
||||
"K c #A59F9C",
|
||||
"L c #DD9472",
|
||||
"M c #B39D97",
|
||||
"N c #EB9462",
|
||||
"O c #C1A391",
|
||||
"P c #D19F8D",
|
||||
"Q c #D1A184",
|
||||
"R c #B6B0AD",
|
||||
"S c #C8C2BF",
|
||||
"T c #DDC0BC",
|
||||
"U c #E1C2B0",
|
||||
"V c #F8BE99",
|
||||
"W c #DDD3CE",
|
||||
"X c #EFE4E0",
|
||||
"Y c #FEE4C7",
|
||||
"Z c #FDFEFA",
|
||||
" ",
|
||||
" ID ",
|
||||
" tvr ",
|
||||
" 59aI ",
|
||||
" 4v2t ",
|
||||
" 4I2r ",
|
||||
" E[Xaj ",
|
||||
" z7Xda RHrqsE ",
|
||||
" f2XjaD Itj93][zH ",
|
||||
" 92Wd2x Ixja2,pQDI ",
|
||||
" 92Xx2t Irjb&FIx ",
|
||||
" 5aZx5r Dj{,ORx ",
|
||||
" xsja,eXt2r t'+XIt ",
|
||||
" Mu/+|<<;[Xr2r j!AXjt ",
|
||||
" Kq3=[222a,5Xt2r 5;SSdI ",
|
||||
" H;0A5222j ~oZr2t t+CWjr ",
|
||||
" z37(2<2ax <aXm2x 5/ZEaE ",
|
||||
" ,ARd22jD 5|Wr2x s3YRar ",
|
||||
" 90XM22jI f,Sr2D z)FZaj ",
|
||||
" H#UZj<dx m*Er2x D-OZaa ",
|
||||
" [0ZI2at a_Frax I]QZ2aR ",
|
||||
" cOXr2a Ev{00sgr D/OZa2R ",
|
||||
" v3uva2t Ijaa222aD v]WX2aR ",
|
||||
" giUI2aK tjaaaajjtxtDKKR e]UM2aR ",
|
||||
" c8OS2j I D<#8/djjD ]kCr2j ",
|
||||
" (!OS2j r;0v22ax =3c52j ",
|
||||
" 4-TS2r 'gRa<r 5/!c2at ",
|
||||
" n8US2r 'jXaaD D[&192jS ",
|
||||
" v]OMaj 'jZaaI SEKr22x ",
|
||||
" I+sA9j |oZaaI HZRra2j ",
|
||||
" ~eHdaD [nZa2I H[Avv22jD ",
|
||||
" r&uWdr *{oa2DIe)#f522aD ",
|
||||
" 40u0aI +zj{j{;+:5a<ajD ",
|
||||
" xBL3gr K<ZS{j{<2<22arX ",
|
||||
" vc[Omx IvKZd<22ajjt ",
|
||||
" j1czxD I[RZa2jtDD ",
|
||||
" j<pLoD IoDZa2x ",
|
||||
" r50[0zDI zSSa2E ",
|
||||
" Djaa55|dxI 0SRaa ",
|
||||
" xjjaadrx g|vaa ",
|
||||
" RRR reD<j ",
|
||||
" D4r2r ",
|
||||
" [j2t ",
|
||||
" faaD ",
|
||||
" gajI ",
|
||||
" xjr ",
|
||||
" DI ",
|
||||
" "};
|
After Width: | Height: | Size: 770 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 6.9 KiB |
|
@ -0,0 +1,5 @@
|
|||
Yet incomplete collected definition files for the DP extensions etc.
|
||||
|
||||
TODO:
|
||||
- make sure only fields/globals that DP actually uses are in the defs files
|
||||
- make sure all builtins of DP are mentioned (by script)
|