Showing preview only (1,444K chars total). Download the full file or copy to clipboard to get everything.
Repository: Rinnegatamante/vitaQuake
Branch: master
Commit: fbe7c5e7fe77
Files: 176
Total size: 1.4 MB
Directory structure:
gitextract_5ojh867z/
├── .gitattributes
├── .github/
│ └── FUNDING.yml
├── .gitignore
├── LICENSE.txt
├── Makefile
├── README.md
├── build/
│ ├── sce_sys/
│ │ └── livearea/
│ │ └── contents/
│ │ └── template.xml
│ └── shaders/
│ ├── modulate_alpha_f.gxp
│ ├── modulate_alpha_fog_f.gxp
│ ├── modulate_f.gxp
│ ├── modulate_fog_f.gxp
│ ├── modulate_rgba_alpha_f.gxp
│ ├── modulate_rgba_alpha_fog_f.gxp
│ ├── modulate_rgba_f.gxp
│ ├── modulate_rgba_fog_f.gxp
│ ├── replace_alpha_f.gxp
│ ├── replace_alpha_fog_f.gxp
│ ├── replace_f.gxp
│ ├── replace_fog_f.gxp
│ ├── rgba_alpha_f.gxp
│ ├── rgba_f.gxp
│ ├── rgba_v.gxp
│ ├── texture2d_fog_v.gxp
│ ├── texture2d_rgba_fog_v.gxp
│ ├── texture2d_rgba_v.gxp
│ ├── texture2d_v.gxp
│ ├── vertex_f.gxp
│ └── vertex_v.gxp
├── shaders/
│ ├── modulate_alpha_f.cg
│ ├── modulate_alpha_fog_f.cg
│ ├── modulate_f.cg
│ ├── modulate_fog_f.cg
│ ├── modulate_rgba_alpha_f.cg
│ ├── modulate_rgba_alpha_fog_f.cg
│ ├── modulate_rgba_f.cg
│ ├── modulate_rgba_fog_f.cg
│ ├── replace_alpha_f.cg
│ ├── replace_alpha_fog_f.cg
│ ├── replace_f.cg
│ ├── replace_fog_f.cg
│ ├── rgba_alpha_f.cg
│ ├── rgba_f.cg
│ ├── rgba_v.cg
│ ├── texture2d_fog_v.cg
│ ├── texture2d_rgba_fog_v.cg
│ ├── texture2d_rgba_v.cg
│ ├── texture2d_v.cg
│ ├── vertex_f.cg
│ └── vertex_v.cg
└── source/
├── adivtab.h
├── anorm_dots.h
├── anorms.h
├── asm_draw.h
├── asm_i386.h
├── audiodec/
│ ├── audio_decoder.cpp
│ ├── audio_decoder.h
│ ├── audio_resampler.cpp
│ ├── audio_resampler.h
│ ├── cd_psp2.cpp
│ ├── decoder_mpg123.cpp
│ ├── decoder_mpg123.h
│ ├── decoder_oggvorbis.cpp
│ └── decoder_oggvorbis.h
├── block16.h
├── block8.h
├── bspfile.h
├── cdaudio.h
├── chase.c
├── cl_demo.c
├── cl_input.c
├── cl_main.c
├── cl_parse.c
├── cl_tent.c
├── client.h
├── cmd.c
├── cmd.h
├── common.c
├── common.h
├── console.c
├── console.h
├── crc.c
├── crc.h
├── cvar.c
├── cvar.h
├── draw.h
├── gl_draw.cpp
├── gl_fullbright.c
├── gl_fullbright.h
├── gl_mesh.c
├── gl_model.c
├── gl_model.h
├── gl_refrag.c
├── gl_rlight.c
├── gl_rmain.c
├── gl_rmisc.c
├── gl_rsurf.c
├── gl_screen.c
├── gl_vidpsp2.c
├── gl_warp.c
├── gl_warp_sin.h
├── glquake.h
├── glquake2.h
├── host.c
├── host_cmd.c
├── image.c
├── image.h
├── in_psp2.c
├── input.h
├── keys.c
├── keys.h
├── mathlib.c
├── mathlib.h
├── menu.c
├── menu.h
├── model.h
├── modelgen.h
├── mpdosock.h
├── neon_mathfun.c
├── neon_mathfun.h
├── net.h
├── net_adhoc.h
├── net_adhoc_psp2.c
├── net_dgrm.c
├── net_dgrm.h
├── net_loop.c
├── net_loop.h
├── net_main.c
├── net_none.c
├── net_psp2.c
├── net_udp.h
├── net_udp_psp2.c
├── net_vcr.c
├── net_vcr.h
├── nonintel.c
├── pr_cmds.c
├── pr_comp.h
├── pr_edict.c
├── pr_exec.c
├── progdefs.h
├── progdefs.q1
├── progdefs.q2
├── progs.h
├── protocol.h
├── quakeasm.h
├── quakedef.h
├── r_local.h
├── r_part.c
├── r_shared.h
├── render.h
├── sbar.c
├── sbar.h
├── screen.h
├── server.h
├── snd_dma.c
├── snd_mem.c
├── snd_mix.c
├── snd_psp2.c
├── sound.h
├── spritegn.h
├── sv_main.c
├── sv_move.c
├── sv_phys.c
├── sv_user.c
├── sys.h
├── sys_psp2.c
├── vid.h
├── view.c
├── view.h
├── wad.c
├── wad.h
├── webdownload.c
├── webdownload.h
├── world.c
├── world.h
├── zone.c
└── zone.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
================================================
FILE: .github/FUNDING.yml
================================================
patreon: Rinnegatamante
================================================
FILE: .gitignore
================================================
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# c object files and other build files
*.o
*.elf
build/eboot.bin
build/sce_sys/param.sfo
buildeboot.bin
param.sfo
*.velf
*.vpk
================================================
FILE: LICENSE.txt
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state 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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: Makefile
================================================
TARGET := vitaQuake
TITLE := QUAK00001
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)
SHADERS := shaders
LIBS = -lvitaGL -lvitashark -lSceShaccCgExt -ltaihen_stub -lvorbisfile -lvorbis -logg \
-lspeexdsp -lmpg123 -lScePspnetAdhoc_stub -lSceShaccCg_stub -lSceKernelDmacMgr_stub \
-lc -lSceCommonDialog_stub -lSceAudio_stub -lSceLibKernel_stub -lmathneon \
-lSceNet_stub -lSceNetCtl_stub -lpng -lSceDisplay_stub -lSceGxm_stub \
-Wl,--whole-archive -lSceSysmodule_stub -Wl,--no-whole-archive \
-lSceCtrl_stub -lSceTouch_stub -lSceMotion_stub -lm -lSceAppMgr_stub \
-lSceAppUtil_stub -lScePgf_stub -ljpeg -lSceRtc_stub -lScePower_stub -lcurl -lssl -lcrypto -lz
COMMON_OBJS = source/chase.o \
source/cl_demo.o \
source/cl_input.o \
source/cl_main.o \
source/cl_parse.o \
source/cl_tent.o \
source/chase.o \
source/cmd.o \
source/common.o \
source/console.o \
source/crc.o \
source/cvar.o \
source/host.o \
source/host_cmd.o \
source/image.o \
source/keys.o \
source/mathlib.o \
source/menu.o \
source/net_dgrm.o \
source/net_loop.o \
source/net_main.o \
source/net_vcr.o \
source/pr_cmds.o \
source/pr_edict.o \
source/pr_exec.o \
source/r_part.o \
source/sbar.o \
source/sv_main.o \
source/sv_move.o \
source/sv_phys.o \
source/sv_user.o \
source/view.o \
source/wad.o \
source/world.o \
source/zone.o \
source/sys_psp2.o \
source/gl_draw.o \
source/gl_mesh.o \
source/gl_model.o \
source/gl_refrag.o \
source/gl_rlight.o \
source/gl_rmain.o \
source/gl_rmisc.o \
source/gl_rsurf.o \
source/gl_screen.o \
source/gl_warp.o \
source/gl_fullbright.o \
source/r_part.o \
source/snd_dma.o \
source/snd_mix.o \
source/snd_mem.o \
source/snd_psp2.o \
source/net_psp2.o \
source/net_adhoc_psp2.o \
source/net_udp_psp2.o \
source/in_psp2.o \
source/gl_vidpsp2.o \
source/neon_mathfun.o \
source/webdownload.o
CPPSOURCES := source/audiodec
CFILES := $(COMMON_OBJS)
CPPFILES := $(foreach dir,$(CPPSOURCES), $(wildcard $(dir)/*.cpp))
CGFILES := $(foreach dir,$(SHADERS), $(wildcard $(dir)/*.cg))
CGSHADERS := $(CGFILES:.cg=.h)
OBJS := $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CXX = $(PREFIX)-g++
CFLAGS = -fsigned-char -Wl,-q -O3 -g -fno-optimize-sibling-calls \
-ffast-math -mtune=cortex-a9 -mfpu=neon \
-DGLQUAKE -DHAVE_OGGVORBIS -DHAVE_MPG123 -DHAVE_LIBSPEEXDSP \
-DUSE_AUDIO_RESAMPLER -DGIT_VERSION=\"$(GIT_VERSION)\"
CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++11
ASFLAGS = $(CFLAGS)
all: $(TARGET).vpk
$(TARGET).vpk: $(TARGET).velf
vita-make-fself -c -s $< build/eboot.bin
vita-mksfoex -s TITLE_ID=$(TITLE) -d ATTRIBUTE2=12 "$(TARGET)" param.sfo
cp -f param.sfo build/sce_sys/param.sfo
vita-pack-vpk -s param.sfo -b build/eboot.bin $(TARGET).vpk \
-a build/shaders=shaders \
-a build/sce_sys=sce_sys
%_f.h:
psp2cgc -profile sce_fp_psp2 $(@:_f.h=_f.cg) -Wperf -fastprecision -O3 -o build/$(@:_f.h=_f.gxp)
%_v.h:
psp2cgc -profile sce_vp_psp2 $(@:_v.h=_v.cg) -Wperf -fastprecision -O3 -o build/$(@:_v.h=_v.gxp)
shaders: $(CGSHADERS)
%.velf: %.elf
cp $< $<.unstripped.elf
$(PREFIX)-strip -g $<
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
$(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
clean:
@rm -rf $(TARGET).velf $(TARGET).elf $(OBJS) $(TARGET).elf.unstripped.elf $(TARGET).vpk build/eboot.bin build/sce_sys/param.sfo ./param.sfo
================================================
FILE: README.md
================================================
# Introduction
vitaQuake is a Quake engine source port for PSVITA.
An official channel to discuss the development of this source port can be found on [Vita Nuova discord server](https://discord.gg/PyCaBx9).
# Features
- Hardware accelerated GPU rendering
- Native 960x544 resolution
- Rendering resolution up to 1920x1080 on the PSTV with [Sharpscale](https://git.shotatoshounenwachigau.moe/vita/sharpscale)
- MSAA 2x and MSAA 4x support
- Dual analogs support
- Native IME for inputing commands/text
- Sounds and Musics (CDTracks) support in OGG, MP3, WAV formats
- Gyroscope and touchscreen support for camera movement
- Custom arguments support and mods support
- Support for both official missionpacks
- Support for transparent surfaces (.alpha and .renderamt)
- Increased Quake Engine limits (max vertices, max entities, max static entities, etc...)
- LAN Multiplayer support (locale and online)
- AdHoc Multiplayer support
- ProQuake net protocol support
- Savegames fully working
- Support for colored lights with .lit files support
- Support for Half-Life BSP
- Supprt for BSP2 and 2BSP formats
- Smooth animations thanks to interpolation techniques
- Crosshair and custom crosshairs support
- Mirrors support
- Specular mode support
- Fog support
- Cel Shading support
- Bilinear filtering support
- Dynamic shadows support
- Several different improvements in the renderer quality
- Several different miscellaneous features (eg: transparent statusbar, benchmark feature, working gamma, etc...)
- Map downloader support if you try to join an online server and you don't own the running map
# Supported DarkPlaces extensions
- DP_CON_SET
- DP_CON_SETA
- DP_EF_BLUE
- DP_EF_NODRAW
- DP_EF_RED
- DP_ENT_ALPHA
- DP_GFX_EXTERNALTEXTURES
- DP_GFX_EXTERNALTEXTURES_PERMAPTEXTURES
- DP_HALFLIFE_MAP
- DP_LITSUPPORT
- DP_QC_ASINACOSATANATAN2TAN
- DP_QC_COPYENTITY
- DP_QC_CVAR_STRING
- DP_QC_EDICT_NUM
- DP_QC_ETOS
- DP_QC_FINDCHAIN
- DP_QC_FINDCHAINFLOAT
- DP_QC_MINMAXBOUND
- DP_QC_NUM_FOR_EDICT
- DP_QC_RANDOMVEC
- DP_QC_SINCOSSQRTPOW
- DP_QC_TRACEBOX
- DP_SND_FAKETRACKS
- DP_SV_MODELFLAGS_AS_EFFECTS
- DP_SV_NODRAWTOCLIENT
- DP_SV_DRAWONLYTOCLIENT
- EXT_BITSHIFT
- FRIK_FILE
# CDAudio Support
vitaQuake supports all soundtrack packs for Quake and its two official mission packs, "Scourge of Armagon" and "Dissolution of Eternity." In order for the soundtrack to work, files must be placed in a folder named /cdtracks/ in each campaign folder (main game for example will be ux0:data/Quake/id1/cdtracks).
By default, the music folder has tracks named as track02, track03, etc. For vitaQuake, add an extra "0" after "track" in order for them to be loaded properly and in order. **Ex.: track02 -> track002**
You can find the official soundtrack for the main campaign in .ogg format [here](https://www.quaddicted.com/files/music/quake_music.zip).
# Loading Expansions and Mods
vitaQuake supports the official Quake expansions, "Scourge of Armagon" and "Dissolution of Eternity." These were offical expansions, so they can be found usually wherever the full base game is sold (GOG, Steam). In order to get them to load properly, place them in the "ux0:/data/quake/" folder alongside "id1".
Both official mission packs support their own soundtracks as long as they are placed properly in their respective "/cdtracks/" folder.
Mod compatibility is varied, but as a general rule of thumb, mods compatible with winQuake will be compatible with vitaQuake.
Here's a list of some popular mods and their actual working state:
Expansion/Mod | Link | Status
---|---|---|
Dissolution of Eternity | Official Expansion |  `Fully Working`
dopa | [Free](https://twitter.com/machinegames/status/746363189768650752?lang=en) |  `Fully Working`
Halo Revamped | [Free](https://wololo.net/downloads/index.php/download/1376) |  `Boots, lots of bugs`
Kurok | [Free](http://www.bladebattles.com/kurok/) |  `Playable with glitches`
Nazi Zombies Portable | [Free](https://www.moddb.com/games/nazi-zombies-portable/news/nazi-zombies-portable-ps-vita-info) |  `Not Working`
Quake Rally | [Free](https://www.moddb.com/mods/quake-rally) |  `Fully Working`
Scourge of Armagon | Official Expansion |  `Fully Working`
Slayer's Testament | [Free](https://www.youtube.com/watch?v=abn9aCiJ3pY) |  `Crash on models loading`
SUPERHOT Quake | [Free](https://www.moddb.com/mods/superhot-quake) |  `Working without monochromatic graphics`
SUPERQOT | [Free](https://superhotgame.com/SUPERQOT/) |  `Not Working`
YPOD | [Free](https://www.quakewiki.net/archives/doom/) |  `Fully Working`
# Credits
- idSoftware for winQuake sourcecode
- MasterFeizz for ctrQuake sourcecode i studied to understand how winQuake works
- EasyRPG Team for the audio decoder used for CDAudio support
- Ch0wW for various improvements and code cleanup
- JPG for ProQuake and some various fixes.
- Cuevavirus for 1920x1080 rendering
================================================
FILE: build/sce_sys/livearea/contents/template.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<livearea style="a1" format-ver="01.00" content-rev="1">
<livearea-background>
<image>bg.png</image>
</livearea-background>
<gate>
<startup-image>startup.png</startup-image>
</gate>
<frame id='frame1' multi='o' autoflip='3' >
<liveitem>
<target>psla:-hipnotic</target>
<image>hipnotic.png</image>
</liveitem>
</frame>
<frame id='frame2' multi='o' autoflip='3' >
<liveitem>
<target>psla:-rogue</target>
<image>rogue.png</image>
</liveitem>
</frame>
<frame id="frame3">
<liveitem>
<target>psla:-custom</target>
<text valign="bottom" align="left" text-align="left" word-wrap="off" ellipsis="on">
<str size="20" color="#ffffff" shadow="on"> Click here to launch with custom args</str>
</text>
</liveitem>
</frame>
</livearea>
================================================
FILE: shaders/modulate_alpha_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
uniform float4 vColor,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord) * vColor;
if (c.a > 0.666) return c;
else discard;
}
================================================
FILE: shaders/modulate_alpha_fog_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float vFog : FOG,
uniform float4 vColor,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord) * vColor;
c.rgb = c.rgb * vFog;
if (c.a > 0.666) return c;
else discard;
}
================================================
FILE: shaders/modulate_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
uniform float4 vColor,
uniform sampler2D tex
)
{
return tex2D(tex, vTexcoord) * vColor;
}
================================================
FILE: shaders/modulate_fog_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float vFog : FOG,
uniform float4 vColor,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord) * vColor;
c.rgb = c.rgb * vFog;
return c;
}
================================================
FILE: shaders/modulate_rgba_alpha_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float4 vColor : COLOR,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord) * vColor;
if (c.a > 0.666) return c;
else discard;
}
================================================
FILE: shaders/modulate_rgba_alpha_fog_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float vFog : FOG,
float4 vColor : COLOR,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord) * vColor;
c.rgb = c.rgb * vFog;
if (c.a > 0.666) return c;
else discard;
}
================================================
FILE: shaders/modulate_rgba_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float4 vColor : COLOR,
uniform sampler2D tex
)
{
return tex2D(tex, vTexcoord) * vColor;
}
================================================
FILE: shaders/modulate_rgba_fog_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float vFog : FOG,
float4 vColor : COLOR,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord) * vColor;
c.rgb = c.rgb * vFog;
return c;
}
================================================
FILE: shaders/replace_alpha_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord);
if (c.a > 0.666) return c;
else discard;
}
================================================
FILE: shaders/replace_alpha_fog_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float vFog : FOG,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord);
c.rgb = c.rgb * vFog;
if (c.a > 0.666) return c;
else discard;
}
================================================
FILE: shaders/replace_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
uniform sampler2D tex
)
{
return tex2D(tex, vTexcoord);
}
================================================
FILE: shaders/replace_fog_f.cg
================================================
float4 main(
float2 vTexcoord : TEXCOORD0,
float vFog : FOG,
uniform sampler2D tex
)
{
float4 c = tex2D(tex, vTexcoord);
c.rgb = c.rgb * vFog;
return c;
}
================================================
FILE: shaders/rgba_alpha_f.cg
================================================
float4 main(float4 vColor : COLOR) : COLOR
{
if (vColor.a > 0.666) return vColor;
else discard;
}
================================================
FILE: shaders/rgba_f.cg
================================================
float4 main(float4 vColor : COLOR) : COLOR
{
return vColor;
}
================================================
FILE: shaders/rgba_v.cg
================================================
void main(
float3 aPosition,
float4 aColor,
uniform float4x4 gl_ModelViewProjectionMatrix,
float4 out vPosition: POSITION,
float4 out vColor: COLOR)
{
vPosition = mul(gl_ModelViewProjectionMatrix, float4(aPosition, 1.f));
vColor = aColor;
}
================================================
FILE: shaders/texture2d_fog_v.cg
================================================
void main(
float3 position,
float2 texcoord,
uniform float4x4 gl_ModelViewProjectionMatrix,
float4 out vPosition : POSITION,
float out vFog : FOG,
float2 out vTexcoord : TEXCOORD0)
{
vPosition = mul(gl_ModelViewProjectionMatrix, float4(position, 1.f));
float dist = distance(vPosition,float4(0.0,0.0,0.0,1.0));
vFog = ((512.0 - dist) / (512.0));
vTexcoord = texcoord;
}
================================================
FILE: shaders/texture2d_rgba_fog_v.cg
================================================
void main(
float3 position,
float2 texcoord,
float4 color,
uniform float4x4 gl_ModelViewProjectionMatrix,
float4 out vPosition : POSITION,
float out vFog : FOG,
float2 out vTexcoord : TEXCOORD0,
float4 out vColor : COLOR)
{
vPosition = mul(gl_ModelViewProjectionMatrix, float4(position, 1.f));
float dist = distance(vPosition,float4(0.0,0.0,0.0,1.0));
vFog = ((512.0 - dist) / (512.0));
vTexcoord = texcoord;
vColor = color;
}
================================================
FILE: shaders/texture2d_rgba_v.cg
================================================
void main(
float3 position,
float2 texcoord,
float4 color,
uniform float4x4 gl_ModelViewProjectionMatrix,
float4 out vPosition : POSITION,
float2 out vTexcoord : TEXCOORD0,
float4 out vColor : COLOR)
{
vPosition = mul(gl_ModelViewProjectionMatrix, float4(position, 1.f));
vTexcoord = texcoord;
vColor = color;
}
================================================
FILE: shaders/texture2d_v.cg
================================================
void main(
float3 position,
float2 texcoord,
uniform float4x4 gl_ModelViewProjectionMatrix,
float4 out vPosition : POSITION,
float2 out vTexcoord : TEXCOORD0)
{
vPosition = mul(gl_ModelViewProjectionMatrix, float4(position, 1.f));
vTexcoord = texcoord;
}
================================================
FILE: shaders/vertex_f.cg
================================================
float4 main(uniform float4 color) : COLOR
{
return color;
}
================================================
FILE: shaders/vertex_v.cg
================================================
void main(
float3 aPosition,
uniform float4x4 gl_ModelViewProjectionMatrix,
float4 out vPosition: POSITION)
{
vPosition = mul(gl_ModelViewProjectionMatrix, float4(aPosition, 1.f));
}
================================================
FILE: source/adivtab.h
================================================
/*
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.
*/
// table of quotients and remainders for [-15...16] / [-15...16]
// numerator = -15
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{1, -5},
{1, -6},
{1, -7},
{2, -1},
{2, -3},
{3, 0},
{3, -3},
{5, 0},
{7, -1},
{15, 0},
{0, 0},
{-15, 0},
{-8, 1},
{-5, 0},
{-4, 1},
{-3, 0},
{-3, 3},
{-3, 6},
{-2, 1},
{-2, 3},
{-2, 5},
{-2, 7},
{-2, 9},
{-2, 11},
{-2, 13},
{-1, 0},
{-1, 1},
// numerator = -14
{0, -14},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{1, -5},
{1, -6},
{2, 0},
{2, -2},
{2, -4},
{3, -2},
{4, -2},
{7, 0},
{14, 0},
{0, 0},
{-14, 0},
{-7, 0},
{-5, 1},
{-4, 2},
{-3, 1},
{-3, 4},
{-2, 0},
{-2, 2},
{-2, 4},
{-2, 6},
{-2, 8},
{-2, 10},
{-2, 12},
{-1, 0},
{-1, 1},
{-1, 2},
// numerator = -13
{0, -13},
{0, -13},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{1, -5},
{1, -6},
{2, -1},
{2, -3},
{3, -1},
{4, -1},
{6, -1},
{13, 0},
{0, 0},
{-13, 0},
{-7, 1},
{-5, 2},
{-4, 3},
{-3, 2},
{-3, 5},
{-2, 1},
{-2, 3},
{-2, 5},
{-2, 7},
{-2, 9},
{-2, 11},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
// numerator = -12
{0, -12},
{0, -12},
{0, -12},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{1, -5},
{2, 0},
{2, -2},
{3, 0},
{4, 0},
{6, 0},
{12, 0},
{0, 0},
{-12, 0},
{-6, 0},
{-4, 0},
{-3, 0},
{-3, 3},
{-2, 0},
{-2, 2},
{-2, 4},
{-2, 6},
{-2, 8},
{-2, 10},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
// numerator = -11
{0, -11},
{0, -11},
{0, -11},
{0, -11},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{1, -5},
{2, -1},
{2, -3},
{3, -2},
{5, -1},
{11, 0},
{0, 0},
{-11, 0},
{-6, 1},
{-4, 1},
{-3, 1},
{-3, 4},
{-2, 1},
{-2, 3},
{-2, 5},
{-2, 7},
{-2, 9},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
// numerator = -10
{0, -10},
{0, -10},
{0, -10},
{0, -10},
{0, -10},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{2, 0},
{2, -2},
{3, -1},
{5, 0},
{10, 0},
{0, 0},
{-10, 0},
{-5, 0},
{-4, 2},
{-3, 2},
{-2, 0},
{-2, 2},
{-2, 4},
{-2, 6},
{-2, 8},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
// numerator = -9
{0, -9},
{0, -9},
{0, -9},
{0, -9},
{0, -9},
{0, -9},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{1, -4},
{2, -1},
{3, 0},
{4, -1},
{9, 0},
{0, 0},
{-9, 0},
{-5, 1},
{-3, 0},
{-3, 3},
{-2, 1},
{-2, 3},
{-2, 5},
{-2, 7},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
// numerator = -8
{0, -8},
{0, -8},
{0, -8},
{0, -8},
{0, -8},
{0, -8},
{0, -8},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{2, 0},
{2, -2},
{4, 0},
{8, 0},
{0, 0},
{-8, 0},
{-4, 0},
{-3, 1},
{-2, 0},
{-2, 2},
{-2, 4},
{-2, 6},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
// numerator = -7
{0, -7},
{0, -7},
{0, -7},
{0, -7},
{0, -7},
{0, -7},
{0, -7},
{0, -7},
{1, 0},
{1, -1},
{1, -2},
{1, -3},
{2, -1},
{3, -1},
{7, 0},
{0, 0},
{-7, 0},
{-4, 1},
{-3, 2},
{-2, 1},
{-2, 3},
{-2, 5},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
// numerator = -6
{0, -6},
{0, -6},
{0, -6},
{0, -6},
{0, -6},
{0, -6},
{0, -6},
{0, -6},
{0, -6},
{1, 0},
{1, -1},
{1, -2},
{2, 0},
{3, 0},
{6, 0},
{0, 0},
{-6, 0},
{-3, 0},
{-2, 0},
{-2, 2},
{-2, 4},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
{-1, 10},
// numerator = -5
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{0, -5},
{1, 0},
{1, -1},
{1, -2},
{2, -1},
{5, 0},
{0, 0},
{-5, 0},
{-3, 1},
{-2, 1},
{-2, 3},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
{-1, 10},
{-1, 11},
// numerator = -4
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{0, -4},
{1, 0},
{1, -1},
{2, 0},
{4, 0},
{0, 0},
{-4, 0},
{-2, 0},
{-2, 2},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
{-1, 10},
{-1, 11},
{-1, 12},
// numerator = -3
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{0, -3},
{1, 0},
{1, -1},
{3, 0},
{0, 0},
{-3, 0},
{-2, 1},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
{-1, 10},
{-1, 11},
{-1, 12},
{-1, 13},
// numerator = -2
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{0, -2},
{1, 0},
{2, 0},
{0, 0},
{-2, 0},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
{-1, 10},
{-1, 11},
{-1, 12},
{-1, 13},
{-1, 14},
// numerator = -1
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{0, -1},
{1, 0},
{0, 0},
{-1, 0},
{-1, 1},
{-1, 2},
{-1, 3},
{-1, 4},
{-1, 5},
{-1, 6},
{-1, 7},
{-1, 8},
{-1, 9},
{-1, 10},
{-1, 11},
{-1, 12},
{-1, 13},
{-1, 14},
{-1, 15},
// numerator = 0
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
// numerator = 1
{-1, -14},
{-1, -13},
{-1, -12},
{-1, -11},
{-1, -10},
{-1, -9},
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{0, 0},
{1, 0},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
// numerator = 2
{-1, -13},
{-1, -12},
{-1, -11},
{-1, -10},
{-1, -9},
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, 0},
{0, 0},
{2, 0},
{1, 0},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
{0, 2},
// numerator = 3
{-1, -12},
{-1, -11},
{-1, -10},
{-1, -9},
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -1},
{-3, 0},
{0, 0},
{3, 0},
{1, 1},
{1, 0},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
{0, 3},
// numerator = 4
{-1, -11},
{-1, -10},
{-1, -9},
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -2},
{-2, 0},
{-4, 0},
{0, 0},
{4, 0},
{2, 0},
{1, 1},
{1, 0},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
{0, 4},
// numerator = 5
{-1, -10},
{-1, -9},
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -3},
{-2, -1},
{-3, -1},
{-5, 0},
{0, 0},
{5, 0},
{2, 1},
{1, 2},
{1, 1},
{1, 0},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
{0, 5},
// numerator = 6
{-1, -9},
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -4},
{-2, -2},
{-2, 0},
{-3, 0},
{-6, 0},
{0, 0},
{6, 0},
{3, 0},
{2, 0},
{1, 2},
{1, 1},
{1, 0},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
{0, 6},
// numerator = 7
{-1, -8},
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -5},
{-2, -3},
{-2, -1},
{-3, -2},
{-4, -1},
{-7, 0},
{0, 0},
{7, 0},
{3, 1},
{2, 1},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 7},
{0, 7},
{0, 7},
{0, 7},
{0, 7},
{0, 7},
{0, 7},
{0, 7},
{0, 7},
// numerator = 8
{-1, -7},
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -6},
{-2, -4},
{-2, -2},
{-2, 0},
{-3, -1},
{-4, 0},
{-8, 0},
{0, 0},
{8, 0},
{4, 0},
{2, 2},
{2, 0},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 8},
{0, 8},
{0, 8},
{0, 8},
{0, 8},
{0, 8},
{0, 8},
{0, 8},
// numerator = 9
{-1, -6},
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -7},
{-2, -5},
{-2, -3},
{-2, -1},
{-3, -3},
{-3, 0},
{-5, -1},
{-9, 0},
{0, 0},
{9, 0},
{4, 1},
{3, 0},
{2, 1},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 9},
{0, 9},
{0, 9},
{0, 9},
{0, 9},
{0, 9},
{0, 9},
// numerator = 10
{-1, -5},
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -8},
{-2, -6},
{-2, -4},
{-2, -2},
{-2, 0},
{-3, -2},
{-4, -2},
{-5, 0},
{-10, 0},
{0, 0},
{10, 0},
{5, 0},
{3, 1},
{2, 2},
{2, 0},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 10},
{0, 10},
{0, 10},
{0, 10},
{0, 10},
{0, 10},
// numerator = 11
{-1, -4},
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -9},
{-2, -7},
{-2, -5},
{-2, -3},
{-2, -1},
{-3, -4},
{-3, -1},
{-4, -1},
{-6, -1},
{-11, 0},
{0, 0},
{11, 0},
{5, 1},
{3, 2},
{2, 3},
{2, 1},
{1, 5},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 11},
{0, 11},
{0, 11},
{0, 11},
{0, 11},
// numerator = 12
{-1, -3},
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -10},
{-2, -8},
{-2, -6},
{-2, -4},
{-2, -2},
{-2, 0},
{-3, -3},
{-3, 0},
{-4, 0},
{-6, 0},
{-12, 0},
{0, 0},
{12, 0},
{6, 0},
{4, 0},
{3, 0},
{2, 2},
{2, 0},
{1, 5},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 12},
{0, 12},
{0, 12},
{0, 12},
// numerator = 13
{-1, -2},
{-1, -1},
{-1, 0},
{-2, -11},
{-2, -9},
{-2, -7},
{-2, -5},
{-2, -3},
{-2, -1},
{-3, -5},
{-3, -2},
{-4, -3},
{-5, -2},
{-7, -1},
{-13, 0},
{0, 0},
{13, 0},
{6, 1},
{4, 1},
{3, 1},
{2, 3},
{2, 1},
{1, 6},
{1, 5},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 13},
{0, 13},
{0, 13},
// numerator = 14
{-1, -1},
{-1, 0},
{-2, -12},
{-2, -10},
{-2, -8},
{-2, -6},
{-2, -4},
{-2, -2},
{-2, 0},
{-3, -4},
{-3, -1},
{-4, -2},
{-5, -1},
{-7, 0},
{-14, 0},
{0, 0},
{14, 0},
{7, 0},
{4, 2},
{3, 2},
{2, 4},
{2, 2},
{2, 0},
{1, 6},
{1, 5},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 14},
{0, 14},
// numerator = 15
{-1, 0},
{-2, -13},
{-2, -11},
{-2, -9},
{-2, -7},
{-2, -5},
{-2, -3},
{-2, -1},
{-3, -6},
{-3, -3},
{-3, 0},
{-4, -1},
{-5, 0},
{-8, -1},
{-15, 0},
{0, 0},
{15, 0},
{7, 1},
{5, 0},
{3, 3},
{3, 0},
{2, 3},
{2, 1},
{1, 7},
{1, 6},
{1, 5},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
{0, 15},
// numerator = 16
{-2, -14},
{-2, -12},
{-2, -10},
{-2, -8},
{-2, -6},
{-2, -4},
{-2, -2},
{-2, 0},
{-3, -5},
{-3, -2},
{-4, -4},
{-4, 0},
{-6, -2},
{-8, 0},
{-16, 0},
{0, 0},
{16, 0},
{8, 0},
{5, 1},
{4, 0},
{3, 1},
{2, 4},
{2, 2},
{2, 0},
{1, 7},
{1, 6},
{1, 5},
{1, 4},
{1, 3},
{1, 2},
{1, 1},
{1, 0},
================================================
FILE: source/anorm_dots.h
================================================
/*
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.
*/
{
{1.23,1.30,1.47,1.35,1.56,1.71,1.37,1.38,1.59,1.60,1.79,1.97,1.88,1.92,1.79,1.02,0.93,1.07,0.82,0.87,0.88,0.94,0.96,1.14,1.11,0.82,0.83,0.89,0.89,0.86,0.94,0.91,1.00,1.21,0.98,1.48,1.30,1.57,0.96,1.07,1.14,1.60,1.61,1.40,1.37,1.72,1.78,1.79,1.93,1.99,1.90,1.68,1.71,1.86,1.60,1.68,1.78,1.86,1.93,1.99,1.97,1.44,1.22,1.49,0.93,0.99,0.99,1.23,1.22,1.44,1.49,0.89,0.89,0.97,0.91,0.98,1.19,0.82,0.76,0.82,0.71,0.72,0.73,0.76,0.79,0.86,0.83,0.72,0.76,0.76,0.89,0.82,0.89,0.82,0.89,0.91,0.83,0.96,1.14,0.97,1.40,1.19,0.98,0.94,1.00,1.07,1.37,1.21,1.48,1.30,1.57,1.61,1.37,0.86,0.83,0.91,0.82,0.82,0.88,0.89,0.96,1.14,0.98,0.87,0.93,0.94,1.02,1.30,1.07,1.35,1.38,1.11,1.56,1.92,1.79,1.79,1.59,1.60,1.72,1.90,1.79,0.80,0.85,0.79,0.93,0.80,0.85,0.77,0.74,0.72,0.77,0.74,0.72,0.70,0.70,0.71,0.76,0.73,0.79,0.79,0.73,0.76,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.26,1.26,1.48,1.23,1.50,1.71,1.14,1.19,1.38,1.46,1.64,1.94,1.87,1.84,1.71,1.02,0.92,1.00,0.79,0.85,0.84,0.91,0.90,0.98,0.99,0.77,0.77,0.83,0.82,0.79,0.86,0.84,0.92,0.99,0.91,1.24,1.03,1.33,0.88,0.94,0.97,1.41,1.39,1.18,1.11,1.51,1.61,1.59,1.80,1.91,1.76,1.54,1.65,1.76,1.70,1.70,1.85,1.85,1.97,1.99,1.93,1.28,1.09,1.39,0.92,0.97,0.99,1.18,1.26,1.52,1.48,0.83,0.85,0.90,0.88,0.93,1.00,0.77,0.73,0.78,0.72,0.71,0.74,0.75,0.79,0.86,0.81,0.75,0.81,0.79,0.96,0.88,0.94,0.86,0.93,0.92,0.85,1.08,1.33,1.05,1.55,1.31,1.01,1.05,1.27,1.31,1.60,1.47,1.70,1.54,1.76,1.76,1.57,0.93,0.90,0.99,0.88,0.88,0.95,0.97,1.11,1.39,1.20,0.92,0.97,1.01,1.10,1.39,1.22,1.51,1.58,1.32,1.64,1.97,1.85,1.91,1.77,1.74,1.88,1.99,1.91,0.79,0.86,0.80,0.94,0.84,0.88,0.74,0.74,0.71,0.82,0.77,0.76,0.70,0.73,0.72,0.73,0.70,0.74,0.85,0.77,0.82,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.34,1.27,1.53,1.17,1.46,1.71,0.98,1.05,1.20,1.34,1.48,1.86,1.82,1.71,1.62,1.09,0.94,0.99,0.79,0.85,0.82,0.90,0.87,0.93,0.96,0.76,0.74,0.79,0.76,0.74,0.79,0.78,0.85,0.92,0.85,1.00,0.93,1.06,0.81,0.86,0.89,1.16,1.12,0.97,0.95,1.28,1.38,1.35,1.60,1.77,1.57,1.33,1.50,1.58,1.69,1.63,1.82,1.74,1.91,1.92,1.80,1.04,0.97,1.21,0.90,0.93,0.97,1.05,1.21,1.48,1.37,0.77,0.80,0.84,0.85,0.88,0.92,0.73,0.71,0.74,0.74,0.71,0.75,0.73,0.79,0.84,0.78,0.79,0.86,0.81,1.05,0.94,0.99,0.90,0.95,0.92,0.86,1.24,1.44,1.14,1.59,1.34,1.02,1.27,1.50,1.49,1.80,1.69,1.86,1.72,1.87,1.80,1.69,1.00,0.98,1.23,0.95,0.96,1.09,1.16,1.37,1.63,1.46,0.99,1.10,1.25,1.24,1.51,1.41,1.67,1.77,1.55,1.72,1.95,1.89,1.98,1.91,1.86,1.97,1.99,1.94,0.81,0.89,0.85,0.98,0.90,0.94,0.75,0.78,0.73,0.89,0.83,0.82,0.72,0.77,0.76,0.72,0.70,0.71,0.91,0.83,0.89,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.46,1.34,1.60,1.16,1.46,1.71,0.94,0.99,1.05,1.26,1.33,1.74,1.76,1.57,1.54,1.23,0.98,1.05,0.83,0.89,0.84,0.92,0.87,0.91,0.96,0.78,0.74,0.79,0.72,0.72,0.75,0.76,0.80,0.88,0.83,0.94,0.87,0.95,0.76,0.80,0.82,0.97,0.96,0.89,0.88,1.08,1.11,1.10,1.37,1.59,1.37,1.07,1.27,1.34,1.57,1.45,1.69,1.55,1.77,1.79,1.60,0.93,0.90,0.99,0.86,0.87,0.93,0.96,1.07,1.35,1.18,0.73,0.76,0.77,0.81,0.82,0.85,0.70,0.71,0.72,0.78,0.73,0.77,0.73,0.79,0.82,0.76,0.83,0.90,0.84,1.18,0.98,1.03,0.92,0.95,0.90,0.86,1.32,1.45,1.15,1.53,1.27,0.99,1.42,1.65,1.58,1.93,1.83,1.94,1.81,1.88,1.74,1.70,1.19,1.17,1.44,1.11,1.15,1.36,1.41,1.61,1.81,1.67,1.22,1.34,1.50,1.42,1.65,1.61,1.82,1.91,1.75,1.80,1.89,1.89,1.98,1.99,1.94,1.98,1.92,1.87,0.86,0.95,0.92,1.14,0.98,1.03,0.79,0.84,0.77,0.97,0.90,0.89,0.76,0.82,0.82,0.74,0.72,0.71,0.98,0.89,0.97,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.60,1.44,1.68,1.22,1.49,1.71,0.93,0.99,0.99,1.23,1.22,1.60,1.68,1.44,1.49,1.40,1.14,1.19,0.89,0.96,0.89,0.97,0.89,0.91,0.98,0.82,0.76,0.82,0.71,0.72,0.73,0.76,0.79,0.86,0.83,0.91,0.83,0.89,0.72,0.76,0.76,0.89,0.89,0.82,0.82,0.98,0.96,0.97,1.14,1.40,1.19,0.94,1.00,1.07,1.37,1.21,1.48,1.30,1.57,1.61,1.37,0.86,0.83,0.91,0.82,0.82,0.88,0.89,0.96,1.14,0.98,0.70,0.72,0.73,0.77,0.76,0.79,0.70,0.72,0.71,0.82,0.77,0.80,0.74,0.79,0.80,0.74,0.87,0.93,0.85,1.23,1.02,1.02,0.93,0.93,0.87,0.85,1.30,1.35,1.07,1.38,1.11,0.94,1.47,1.71,1.56,1.97,1.88,1.92,1.79,1.79,1.59,1.60,1.30,1.35,1.56,1.37,1.38,1.59,1.60,1.79,1.92,1.79,1.48,1.57,1.72,1.61,1.78,1.79,1.93,1.99,1.90,1.86,1.78,1.86,1.93,1.99,1.97,1.90,1.79,1.72,0.94,1.07,1.00,1.37,1.21,1.30,0.86,0.91,0.83,1.14,0.98,0.96,0.82,0.88,0.89,0.79,0.76,0.73,1.07,0.94,1.11,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.74,1.57,1.76,1.33,1.54,1.71,0.94,1.05,0.99,1.26,1.16,1.46,1.60,1.34,1.46,1.59,1.37,1.37,0.97,1.11,0.96,1.10,0.95,0.94,1.08,0.89,0.82,0.88,0.72,0.76,0.75,0.80,0.80,0.88,0.87,0.91,0.83,0.87,0.72,0.76,0.74,0.83,0.84,0.78,0.79,0.96,0.89,0.92,0.98,1.23,1.05,0.86,0.92,0.95,1.11,0.98,1.22,1.03,1.34,1.42,1.14,0.79,0.77,0.84,0.78,0.76,0.82,0.82,0.89,0.97,0.90,0.70,0.71,0.71,0.73,0.72,0.74,0.73,0.76,0.72,0.86,0.81,0.82,0.76,0.79,0.77,0.73,0.90,0.95,0.86,1.18,1.03,0.98,0.92,0.90,0.83,0.84,1.19,1.17,0.98,1.15,0.97,0.89,1.42,1.65,1.44,1.93,1.83,1.81,1.67,1.61,1.36,1.41,1.32,1.45,1.58,1.57,1.53,1.74,1.70,1.88,1.94,1.81,1.69,1.77,1.87,1.79,1.89,1.92,1.98,1.99,1.98,1.89,1.65,1.80,1.82,1.91,1.94,1.75,1.61,1.50,1.07,1.34,1.27,1.60,1.45,1.55,0.93,0.99,0.90,1.35,1.18,1.07,0.87,0.93,0.96,0.85,0.82,0.77,1.15,0.99,1.27,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.86,1.71,1.82,1.48,1.62,1.71,0.98,1.20,1.05,1.34,1.17,1.34,1.53,1.27,1.46,1.77,1.60,1.57,1.16,1.38,1.12,1.35,1.06,1.00,1.28,0.97,0.89,0.95,0.76,0.81,0.79,0.86,0.85,0.92,0.93,0.93,0.85,0.87,0.74,0.78,0.74,0.79,0.82,0.76,0.79,0.96,0.85,0.90,0.94,1.09,0.99,0.81,0.85,0.89,0.95,0.90,0.99,0.94,1.10,1.24,0.98,0.75,0.73,0.78,0.74,0.72,0.77,0.76,0.82,0.89,0.83,0.73,0.71,0.71,0.71,0.70,0.72,0.77,0.80,0.74,0.90,0.85,0.84,0.78,0.79,0.75,0.73,0.92,0.95,0.86,1.05,0.99,0.94,0.90,0.86,0.79,0.81,1.00,0.98,0.91,0.96,0.89,0.83,1.27,1.50,1.23,1.80,1.69,1.63,1.46,1.37,1.09,1.16,1.24,1.44,1.49,1.69,1.59,1.80,1.69,1.87,1.86,1.72,1.82,1.91,1.94,1.92,1.95,1.99,1.98,1.91,1.97,1.89,1.51,1.72,1.67,1.77,1.86,1.55,1.41,1.25,1.33,1.58,1.50,1.80,1.63,1.74,1.04,1.21,0.97,1.48,1.37,1.21,0.93,0.97,1.05,0.92,0.88,0.84,1.14,1.02,1.34,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.94,1.84,1.87,1.64,1.71,1.71,1.14,1.38,1.19,1.46,1.23,1.26,1.48,1.26,1.50,1.91,1.80,1.76,1.41,1.61,1.39,1.59,1.33,1.24,1.51,1.18,0.97,1.11,0.82,0.88,0.86,0.94,0.92,0.99,1.03,0.98,0.91,0.90,0.79,0.84,0.77,0.79,0.84,0.77,0.83,0.99,0.85,0.91,0.92,1.02,1.00,0.79,0.80,0.86,0.88,0.84,0.92,0.88,0.97,1.10,0.94,0.74,0.71,0.74,0.72,0.70,0.73,0.72,0.76,0.82,0.77,0.77,0.73,0.74,0.71,0.70,0.73,0.83,0.85,0.78,0.92,0.88,0.86,0.81,0.79,0.74,0.75,0.92,0.93,0.85,0.96,0.94,0.88,0.86,0.81,0.75,0.79,0.93,0.90,0.85,0.88,0.82,0.77,1.05,1.27,0.99,1.60,1.47,1.39,1.20,1.11,0.95,0.97,1.08,1.33,1.31,1.70,1.55,1.76,1.57,1.76,1.70,1.54,1.85,1.97,1.91,1.99,1.97,1.99,1.91,1.77,1.88,1.85,1.39,1.64,1.51,1.58,1.74,1.32,1.22,1.01,1.54,1.76,1.65,1.93,1.70,1.85,1.28,1.39,1.09,1.52,1.48,1.26,0.97,0.99,1.18,1.00,0.93,0.90,1.05,1.01,1.31,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.97,1.92,1.88,1.79,1.79,1.71,1.37,1.59,1.38,1.60,1.35,1.23,1.47,1.30,1.56,1.99,1.93,1.90,1.60,1.78,1.61,1.79,1.57,1.48,1.72,1.40,1.14,1.37,0.89,0.96,0.94,1.07,1.00,1.21,1.30,1.14,0.98,0.96,0.86,0.91,0.83,0.82,0.88,0.82,0.89,1.11,0.87,0.94,0.93,1.02,1.07,0.80,0.79,0.85,0.82,0.80,0.87,0.85,0.93,1.02,0.93,0.77,0.72,0.74,0.71,0.70,0.70,0.71,0.72,0.77,0.74,0.82,0.76,0.79,0.72,0.73,0.76,0.89,0.89,0.82,0.93,0.91,0.86,0.83,0.79,0.73,0.76,0.91,0.89,0.83,0.89,0.89,0.82,0.82,0.76,0.72,0.76,0.86,0.83,0.79,0.82,0.76,0.73,0.94,1.00,0.91,1.37,1.21,1.14,0.98,0.96,0.88,0.89,0.96,1.14,1.07,1.60,1.40,1.61,1.37,1.57,1.48,1.30,1.78,1.93,1.79,1.99,1.92,1.90,1.79,1.59,1.72,1.79,1.30,1.56,1.35,1.38,1.60,1.11,1.07,0.94,1.68,1.86,1.71,1.97,1.68,1.86,1.44,1.49,1.22,1.44,1.49,1.22,0.99,0.99,1.23,1.19,0.98,0.97,0.97,0.98,1.19,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.94,1.97,1.87,1.91,1.85,1.71,1.60,1.77,1.58,1.74,1.51,1.26,1.48,1.39,1.64,1.99,1.97,1.99,1.70,1.85,1.76,1.91,1.76,1.70,1.88,1.55,1.33,1.57,0.96,1.08,1.05,1.31,1.27,1.47,1.54,1.39,1.20,1.11,0.93,0.99,0.90,0.88,0.95,0.88,0.97,1.32,0.92,1.01,0.97,1.10,1.22,0.84,0.80,0.88,0.79,0.79,0.85,0.86,0.92,1.02,0.94,0.82,0.76,0.77,0.72,0.73,0.70,0.72,0.71,0.74,0.74,0.88,0.81,0.85,0.75,0.77,0.82,0.94,0.93,0.86,0.92,0.92,0.86,0.85,0.79,0.74,0.79,0.88,0.85,0.81,0.82,0.83,0.77,0.78,0.73,0.71,0.75,0.79,0.77,0.74,0.77,0.73,0.70,0.86,0.92,0.84,1.14,0.99,0.98,0.91,0.90,0.84,0.83,0.88,0.97,0.94,1.41,1.18,1.39,1.11,1.33,1.24,1.03,1.61,1.80,1.59,1.91,1.84,1.76,1.64,1.38,1.51,1.71,1.26,1.50,1.23,1.19,1.46,0.99,1.00,0.91,1.70,1.85,1.65,1.93,1.54,1.76,1.52,1.48,1.26,1.28,1.39,1.09,0.99,0.97,1.18,1.31,1.01,1.05,0.90,0.93,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.86,1.95,1.82,1.98,1.89,1.71,1.80,1.91,1.77,1.86,1.67,1.34,1.53,1.51,1.72,1.92,1.91,1.99,1.69,1.82,1.80,1.94,1.87,1.86,1.97,1.59,1.44,1.69,1.05,1.24,1.27,1.49,1.50,1.69,1.72,1.63,1.46,1.37,1.00,1.23,0.98,0.95,1.09,0.96,1.16,1.55,0.99,1.25,1.10,1.24,1.41,0.90,0.85,0.94,0.79,0.81,0.85,0.89,0.94,1.09,0.98,0.89,0.82,0.83,0.74,0.77,0.72,0.76,0.73,0.75,0.78,0.94,0.86,0.91,0.79,0.83,0.89,0.99,0.95,0.90,0.90,0.92,0.84,0.86,0.79,0.75,0.81,0.85,0.80,0.78,0.76,0.77,0.73,0.74,0.71,0.71,0.73,0.74,0.74,0.71,0.76,0.72,0.70,0.79,0.85,0.78,0.98,0.92,0.93,0.85,0.87,0.82,0.79,0.81,0.89,0.86,1.16,0.97,1.12,0.95,1.06,1.00,0.93,1.38,1.60,1.35,1.77,1.71,1.57,1.48,1.20,1.28,1.62,1.27,1.46,1.17,1.05,1.34,0.96,0.99,0.90,1.63,1.74,1.50,1.80,1.33,1.58,1.48,1.37,1.21,1.04,1.21,0.97,0.97,0.93,1.05,1.34,1.02,1.14,0.84,0.88,0.92,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.74,1.89,1.76,1.98,1.89,1.71,1.93,1.99,1.91,1.94,1.82,1.46,1.60,1.65,1.80,1.79,1.77,1.92,1.57,1.69,1.74,1.87,1.88,1.94,1.98,1.53,1.45,1.70,1.18,1.32,1.42,1.58,1.65,1.83,1.81,1.81,1.67,1.61,1.19,1.44,1.17,1.11,1.36,1.15,1.41,1.75,1.22,1.50,1.34,1.42,1.61,0.98,0.92,1.03,0.83,0.86,0.89,0.95,0.98,1.23,1.14,0.97,0.89,0.90,0.78,0.82,0.76,0.82,0.77,0.79,0.84,0.98,0.90,0.98,0.83,0.89,0.97,1.03,0.95,0.92,0.86,0.90,0.82,0.86,0.79,0.77,0.84,0.81,0.76,0.76,0.72,0.73,0.70,0.72,0.71,0.73,0.73,0.72,0.74,0.71,0.78,0.74,0.72,0.75,0.80,0.76,0.94,0.88,0.91,0.83,0.87,0.84,0.79,0.76,0.82,0.80,0.97,0.89,0.96,0.88,0.95,0.94,0.87,1.11,1.37,1.10,1.59,1.57,1.37,1.33,1.05,1.08,1.54,1.34,1.46,1.16,0.99,1.26,0.96,1.05,0.92,1.45,1.55,1.27,1.60,1.07,1.34,1.35,1.18,1.07,0.93,0.99,0.90,0.93,0.87,0.96,1.27,0.99,1.15,0.77,0.82,0.85,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.60,1.78,1.68,1.93,1.86,1.71,1.97,1.99,1.99,1.97,1.93,1.60,1.68,1.78,1.86,1.61,1.57,1.79,1.37,1.48,1.59,1.72,1.79,1.92,1.90,1.38,1.35,1.60,1.23,1.30,1.47,1.56,1.71,1.88,1.79,1.92,1.79,1.79,1.30,1.56,1.35,1.37,1.59,1.38,1.60,1.90,1.48,1.72,1.57,1.61,1.79,1.21,1.00,1.30,0.89,0.94,0.96,1.07,1.14,1.40,1.37,1.14,0.96,0.98,0.82,0.88,0.82,0.89,0.83,0.86,0.91,1.02,0.93,1.07,0.87,0.94,1.11,1.02,0.93,0.93,0.82,0.87,0.80,0.85,0.79,0.80,0.85,0.77,0.72,0.74,0.71,0.70,0.70,0.71,0.72,0.77,0.74,0.72,0.76,0.73,0.82,0.79,0.76,0.73,0.79,0.76,0.93,0.86,0.91,0.83,0.89,0.89,0.82,0.72,0.76,0.76,0.89,0.82,0.89,0.82,0.89,0.91,0.83,0.96,1.14,0.97,1.40,1.44,1.19,1.22,0.99,0.98,1.49,1.44,1.49,1.22,0.99,1.23,0.98,1.19,0.97,1.21,1.30,1.00,1.37,0.94,1.07,1.14,0.98,0.96,0.86,0.91,0.83,0.88,0.82,0.89,1.11,0.94,1.07,0.73,0.76,0.79,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.46,1.65,1.60,1.82,1.80,1.71,1.93,1.91,1.99,1.94,1.98,1.74,1.76,1.89,1.89,1.42,1.34,1.61,1.11,1.22,1.36,1.50,1.61,1.81,1.75,1.15,1.17,1.41,1.18,1.19,1.42,1.44,1.65,1.83,1.67,1.94,1.81,1.88,1.32,1.58,1.45,1.57,1.74,1.53,1.70,1.98,1.69,1.87,1.77,1.79,1.92,1.45,1.27,1.55,0.97,1.07,1.11,1.34,1.37,1.59,1.60,1.35,1.07,1.18,0.86,0.93,0.87,0.96,0.90,0.93,0.99,1.03,0.95,1.15,0.90,0.99,1.27,0.98,0.90,0.92,0.78,0.83,0.77,0.84,0.79,0.82,0.86,0.73,0.71,0.73,0.72,0.70,0.73,0.72,0.76,0.81,0.76,0.76,0.82,0.77,0.89,0.85,0.82,0.75,0.80,0.80,0.94,0.88,0.94,0.87,0.95,0.96,0.88,0.72,0.74,0.76,0.83,0.78,0.84,0.79,0.87,0.91,0.83,0.89,0.98,0.92,1.23,1.34,1.05,1.16,0.99,0.96,1.46,1.57,1.54,1.33,1.05,1.26,1.08,1.37,1.10,0.98,1.03,0.92,1.14,0.86,0.95,0.97,0.90,0.89,0.79,0.84,0.77,0.82,0.76,0.82,0.97,0.89,0.98,0.71,0.72,0.74,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.34,1.51,1.53,1.67,1.72,1.71,1.80,1.77,1.91,1.86,1.98,1.86,1.82,1.95,1.89,1.24,1.10,1.41,0.95,0.99,1.09,1.25,1.37,1.63,1.55,0.96,0.98,1.16,1.05,1.00,1.27,1.23,1.50,1.69,1.46,1.86,1.72,1.87,1.24,1.49,1.44,1.69,1.80,1.59,1.69,1.97,1.82,1.94,1.91,1.92,1.99,1.63,1.50,1.74,1.16,1.33,1.38,1.58,1.60,1.77,1.80,1.48,1.21,1.37,0.90,0.97,0.93,1.05,0.97,1.04,1.21,0.99,0.95,1.14,0.92,1.02,1.34,0.94,0.86,0.90,0.74,0.79,0.75,0.81,0.79,0.84,0.86,0.71,0.71,0.73,0.76,0.73,0.77,0.74,0.80,0.85,0.78,0.81,0.89,0.84,0.97,0.92,0.88,0.79,0.85,0.86,0.98,0.92,1.00,0.93,1.06,1.12,0.95,0.74,0.74,0.78,0.79,0.76,0.82,0.79,0.87,0.93,0.85,0.85,0.94,0.90,1.09,1.27,0.99,1.17,1.05,0.96,1.46,1.71,1.62,1.48,1.20,1.34,1.28,1.57,1.35,0.90,0.94,0.85,0.98,0.81,0.89,0.89,0.83,0.82,0.75,0.78,0.73,0.77,0.72,0.76,0.89,0.83,0.91,0.71,0.70,0.72,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
{1.26,1.39,1.48,1.51,1.64,1.71,1.60,1.58,1.77,1.74,1.91,1.94,1.87,1.97,1.85,1.10,0.97,1.22,0.88,0.92,0.95,1.01,1.11,1.39,1.32,0.88,0.90,0.97,0.96,0.93,1.05,0.99,1.27,1.47,1.20,1.70,1.54,1.76,1.08,1.31,1.33,1.70,1.76,1.55,1.57,1.88,1.85,1.91,1.97,1.99,1.99,1.70,1.65,1.85,1.41,1.54,1.61,1.76,1.80,1.91,1.93,1.52,1.26,1.48,0.92,0.99,0.97,1.18,1.09,1.28,1.39,0.94,0.93,1.05,0.92,1.01,1.31,0.88,0.81,0.86,0.72,0.75,0.74,0.79,0.79,0.86,0.85,0.71,0.73,0.75,0.82,0.77,0.83,0.78,0.85,0.88,0.81,0.88,0.97,0.90,1.18,1.00,0.93,0.86,0.92,0.94,1.14,0.99,1.24,1.03,1.33,1.39,1.11,0.79,0.77,0.84,0.79,0.77,0.84,0.83,0.90,0.98,0.91,0.85,0.92,0.91,1.02,1.26,1.00,1.23,1.19,0.99,1.50,1.84,1.71,1.64,1.38,1.46,1.51,1.76,1.59,0.84,0.88,0.80,0.94,0.79,0.86,0.82,0.77,0.76,0.74,0.74,0.71,0.73,0.70,0.72,0.82,0.77,0.85,0.74,0.70,0.73,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00}
}
================================================
FILE: source/anorms.h
================================================
/*
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.
*/
{-0.525731, 0.000000, 0.850651},
{-0.442863, 0.238856, 0.864188},
{-0.295242, 0.000000, 0.955423},
{-0.309017, 0.500000, 0.809017},
{-0.162460, 0.262866, 0.951056},
{0.000000, 0.000000, 1.000000},
{0.000000, 0.850651, 0.525731},
{-0.147621, 0.716567, 0.681718},
{0.147621, 0.716567, 0.681718},
{0.000000, 0.525731, 0.850651},
{0.309017, 0.500000, 0.809017},
{0.525731, 0.000000, 0.850651},
{0.295242, 0.000000, 0.955423},
{0.442863, 0.238856, 0.864188},
{0.162460, 0.262866, 0.951056},
{-0.681718, 0.147621, 0.716567},
{-0.809017, 0.309017, 0.500000},
{-0.587785, 0.425325, 0.688191},
{-0.850651, 0.525731, 0.000000},
{-0.864188, 0.442863, 0.238856},
{-0.716567, 0.681718, 0.147621},
{-0.688191, 0.587785, 0.425325},
{-0.500000, 0.809017, 0.309017},
{-0.238856, 0.864188, 0.442863},
{-0.425325, 0.688191, 0.587785},
{-0.716567, 0.681718, -0.147621},
{-0.500000, 0.809017, -0.309017},
{-0.525731, 0.850651, 0.000000},
{0.000000, 0.850651, -0.525731},
{-0.238856, 0.864188, -0.442863},
{0.000000, 0.955423, -0.295242},
{-0.262866, 0.951056, -0.162460},
{0.000000, 1.000000, 0.000000},
{0.000000, 0.955423, 0.295242},
{-0.262866, 0.951056, 0.162460},
{0.238856, 0.864188, 0.442863},
{0.262866, 0.951056, 0.162460},
{0.500000, 0.809017, 0.309017},
{0.238856, 0.864188, -0.442863},
{0.262866, 0.951056, -0.162460},
{0.500000, 0.809017, -0.309017},
{0.850651, 0.525731, 0.000000},
{0.716567, 0.681718, 0.147621},
{0.716567, 0.681718, -0.147621},
{0.525731, 0.850651, 0.000000},
{0.425325, 0.688191, 0.587785},
{0.864188, 0.442863, 0.238856},
{0.688191, 0.587785, 0.425325},
{0.809017, 0.309017, 0.500000},
{0.681718, 0.147621, 0.716567},
{0.587785, 0.425325, 0.688191},
{0.955423, 0.295242, 0.000000},
{1.000000, 0.000000, 0.000000},
{0.951056, 0.162460, 0.262866},
{0.850651, -0.525731, 0.000000},
{0.955423, -0.295242, 0.000000},
{0.864188, -0.442863, 0.238856},
{0.951056, -0.162460, 0.262866},
{0.809017, -0.309017, 0.500000},
{0.681718, -0.147621, 0.716567},
{0.850651, 0.000000, 0.525731},
{0.864188, 0.442863, -0.238856},
{0.809017, 0.309017, -0.500000},
{0.951056, 0.162460, -0.262866},
{0.525731, 0.000000, -0.850651},
{0.681718, 0.147621, -0.716567},
{0.681718, -0.147621, -0.716567},
{0.850651, 0.000000, -0.525731},
{0.809017, -0.309017, -0.500000},
{0.864188, -0.442863, -0.238856},
{0.951056, -0.162460, -0.262866},
{0.147621, 0.716567, -0.681718},
{0.309017, 0.500000, -0.809017},
{0.425325, 0.688191, -0.587785},
{0.442863, 0.238856, -0.864188},
{0.587785, 0.425325, -0.688191},
{0.688191, 0.587785, -0.425325},
{-0.147621, 0.716567, -0.681718},
{-0.309017, 0.500000, -0.809017},
{0.000000, 0.525731, -0.850651},
{-0.525731, 0.000000, -0.850651},
{-0.442863, 0.238856, -0.864188},
{-0.295242, 0.000000, -0.955423},
{-0.162460, 0.262866, -0.951056},
{0.000000, 0.000000, -1.000000},
{0.295242, 0.000000, -0.955423},
{0.162460, 0.262866, -0.951056},
{-0.442863, -0.238856, -0.864188},
{-0.309017, -0.500000, -0.809017},
{-0.162460, -0.262866, -0.951056},
{0.000000, -0.850651, -0.525731},
{-0.147621, -0.716567, -0.681718},
{0.147621, -0.716567, -0.681718},
{0.000000, -0.525731, -0.850651},
{0.309017, -0.500000, -0.809017},
{0.442863, -0.238856, -0.864188},
{0.162460, -0.262866, -0.951056},
{0.238856, -0.864188, -0.442863},
{0.500000, -0.809017, -0.309017},
{0.425325, -0.688191, -0.587785},
{0.716567, -0.681718, -0.147621},
{0.688191, -0.587785, -0.425325},
{0.587785, -0.425325, -0.688191},
{0.000000, -0.955423, -0.295242},
{0.000000, -1.000000, 0.000000},
{0.262866, -0.951056, -0.162460},
{0.000000, -0.850651, 0.525731},
{0.000000, -0.955423, 0.295242},
{0.238856, -0.864188, 0.442863},
{0.262866, -0.951056, 0.162460},
{0.500000, -0.809017, 0.309017},
{0.716567, -0.681718, 0.147621},
{0.525731, -0.850651, 0.000000},
{-0.238856, -0.864188, -0.442863},
{-0.500000, -0.809017, -0.309017},
{-0.262866, -0.951056, -0.162460},
{-0.850651, -0.525731, 0.000000},
{-0.716567, -0.681718, -0.147621},
{-0.716567, -0.681718, 0.147621},
{-0.525731, -0.850651, 0.000000},
{-0.500000, -0.809017, 0.309017},
{-0.238856, -0.864188, 0.442863},
{-0.262866, -0.951056, 0.162460},
{-0.864188, -0.442863, 0.238856},
{-0.809017, -0.309017, 0.500000},
{-0.688191, -0.587785, 0.425325},
{-0.681718, -0.147621, 0.716567},
{-0.442863, -0.238856, 0.864188},
{-0.587785, -0.425325, 0.688191},
{-0.309017, -0.500000, 0.809017},
{-0.147621, -0.716567, 0.681718},
{-0.425325, -0.688191, 0.587785},
{-0.162460, -0.262866, 0.951056},
{0.442863, -0.238856, 0.864188},
{0.162460, -0.262866, 0.951056},
{0.309017, -0.500000, 0.809017},
{0.147621, -0.716567, 0.681718},
{0.000000, -0.525731, 0.850651},
{0.425325, -0.688191, 0.587785},
{0.587785, -0.425325, 0.688191},
{0.688191, -0.587785, 0.425325},
{-0.955423, 0.295242, 0.000000},
{-0.951056, 0.162460, 0.262866},
{-1.000000, 0.000000, 0.000000},
{-0.850651, 0.000000, 0.525731},
{-0.955423, -0.295242, 0.000000},
{-0.951056, -0.162460, 0.262866},
{-0.864188, 0.442863, -0.238856},
{-0.951056, 0.162460, -0.262866},
{-0.809017, 0.309017, -0.500000},
{-0.864188, -0.442863, -0.238856},
{-0.951056, -0.162460, -0.262866},
{-0.809017, -0.309017, -0.500000},
{-0.681718, 0.147621, -0.716567},
{-0.681718, -0.147621, -0.716567},
{-0.850651, 0.000000, -0.525731},
{-0.688191, 0.587785, -0.425325},
{-0.587785, 0.425325, -0.688191},
{-0.425325, 0.688191, -0.587785},
{-0.425325, -0.688191, -0.587785},
{-0.587785, -0.425325, -0.688191},
{-0.688191, -0.587785, -0.425325},
================================================
FILE: source/asm_draw.h
================================================
/*
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.
*/
//
// asm_draw.h
//
// Include file for asm drawing routines.
//
//
// !!! note that this file must match the corresponding C structures at all
// times !!!
//
// !!! if this is changed, it must be changed in r_local.h too !!!
#define NEAR_CLIP 0.01
// !!! if this is changed, it must be changed in r_local.h too !!!
#define CYCLE 128
// espan_t structure
// !!! if this is changed, it must be changed in r_shared.h too !!!
#define espan_t_u 0
#define espan_t_v 4
#define espan_t_count 8
#define espan_t_pnext 12
#define espan_t_size 16
// sspan_t structure
// !!! if this is changed, it must be changed in d_local.h too !!!
#define sspan_t_u 0
#define sspan_t_v 4
#define sspan_t_count 8
#define sspan_t_size 12
// spanpackage_t structure
// !!! if this is changed, it must be changed in d_polyset.c too !!!
#define spanpackage_t_pdest 0
#define spanpackage_t_pz 4
#define spanpackage_t_count 8
#define spanpackage_t_ptex 12
#define spanpackage_t_sfrac 16
#define spanpackage_t_tfrac 20
#define spanpackage_t_light 24
#define spanpackage_t_zi 28
#define spanpackage_t_size 32
// edge_t structure
// !!! if this is changed, it must be changed in r_shared.h too !!!
#define et_u 0
#define et_u_step 4
#define et_prev 8
#define et_next 12
#define et_surfs 16
#define et_nextremove 20
#define et_nearzi 24
#define et_owner 28
#define et_size 32
// surf_t structure
// !!! if this is changed, it must be changed in r_shared.h too !!!
#define SURF_T_SHIFT 6
#define st_next 0
#define st_prev 4
#define st_spans 8
#define st_key 12
#define st_last_u 16
#define st_spanstate 20
#define st_flags 24
#define st_data 28
#define st_entity 32
#define st_nearzi 36
#define st_insubmodel 40
#define st_d_ziorigin 44
#define st_d_zistepu 48
#define st_d_zistepv 52
#define st_pad 56
#define st_size 64
// clipplane_t structure
// !!! if this is changed, it must be changed in r_local.h too !!!
#define cp_normal 0
#define cp_dist 12
#define cp_next 16
#define cp_leftedge 20
#define cp_rightedge 21
#define cp_reserved 22
#define cp_size 24
// medge_t structure
// !!! if this is changed, it must be changed in model.h too !!!
#define me_v 0
#define me_cachededgeoffset 4
#define me_size 8
// mvertex_t structure
// !!! if this is changed, it must be changed in model.h too !!!
#define mv_position 0
#define mv_size 12
// refdef_t structure
// !!! if this is changed, it must be changed in render.h too !!!
#define rd_vrect 0
#define rd_aliasvrect 20
#define rd_vrectright 40
#define rd_vrectbottom 44
#define rd_aliasvrectright 48
#define rd_aliasvrectbottom 52
#define rd_vrectrightedge 56
#define rd_fvrectx 60
#define rd_fvrecty 64
#define rd_fvrectx_adj 68
#define rd_fvrecty_adj 72
#define rd_vrect_x_adj_shift20 76
#define rd_vrectright_adj_shift20 80
#define rd_fvrectright_adj 84
#define rd_fvrectbottom_adj 88
#define rd_fvrectright 92
#define rd_fvrectbottom 96
#define rd_horizontalFieldOfView 100
#define rd_xOrigin 104
#define rd_yOrigin 108
#define rd_vieworg 112
#define rd_viewangles 124
#define rd_ambientlight 136
#define rd_size 140
// mtriangle_t structure
// !!! if this is changed, it must be changed in model.h too !!!
#define mtri_facesfront 0
#define mtri_vertindex 4
#define mtri_size 16 // !!! if this changes, array indexing in !!!
// !!! d_polysa.s must be changed to match !!!
#define mtri_shift 4
================================================
FILE: source/asm_i386.h
================================================
/*
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 __ASM_I386__
#define __ASM_I386__
#ifdef ELF
#define C(label) label
#else
#define C(label) _##label
#endif
//
// !!! note that this file must match the corresponding C structures at all
// times !!!
//
// plane_t structure
// !!! if this is changed, it must be changed in model.h too !!!
// !!! if the size of this is changed, the array lookup in SV_HullPointContents
// must be changed too !!!
#define pl_normal 0
#define pl_dist 12
#define pl_type 16
#define pl_signbits 17
#define pl_pad 18
#define pl_size 20
// hull_t structure
// !!! if this is changed, it must be changed in model.h too !!!
#define hu_clipnodes 0
#define hu_planes 4
#define hu_firstclipnode 8
#define hu_lastclipnode 12
#define hu_clip_mins 16
#define hu_clip_maxs 28
#define hu_size 40
// dnode_t structure
// !!! if this is changed, it must be changed in bspfile.h too !!!
#define nd_planenum 0
#define nd_children 4
#define nd_mins 8
#define nd_maxs 20
#define nd_firstface 32
#define nd_numfaces 36
#define nd_size 40
// sfxcache_t structure
// !!! if this is changed, it much be changed in sound.h too !!!
#define sfxc_length 0
#define sfxc_loopstart 4
#define sfxc_speed 8
#define sfxc_width 12
#define sfxc_stereo 16
#define sfxc_data 20
// channel_t structure
// !!! if this is changed, it much be changed in sound.h too !!!
#define ch_sfx 0
#define ch_leftvol 4
#define ch_rightvol 8
#define ch_end 12
#define ch_pos 16
#define ch_looping 20
#define ch_entnum 24
#define ch_entchannel 28
#define ch_origin 32
#define ch_dist_mult 44
#define ch_master_vol 48
#define ch_size 52
// portable_samplepair_t structure
// !!! if this is changed, it much be changed in sound.h too !!!
#define psp_left 0
#define psp_right 4
#define psp_size 8
#endif
================================================
FILE: source/audiodec/audio_decoder.cpp
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
// Headers
#include <cassert>
#include <cstring>
#include "audio_decoder.h"
#include "decoder_mpg123.h"
#include "decoder_oggvorbis.h"
#include "audio_resampler.h"
void AudioDecoder::Pause() {
paused = true;
}
void AudioDecoder::Resume() {
paused = false;
}
int AudioDecoder::Decode(uint8_t* buffer, int length) {
if (paused) {
memset(buffer, '\0', length);
return length;
}
int res = FillBuffer(buffer, length);
if (res < 0) {
memset(buffer, '\0', length);
} else if (res < length) {
memset(&buffer[res], '\0', length - res);
}
if (IsFinished() && looping) {
++loop_count;
Rewind();
if (length - res > 0) {
int res2 = Decode(&buffer[res], length - res);
if (res2 <= 0) {
return res;
}
return res + res2;
}
}
return res;
}
int AudioDecoder::DecodeAsMono(uint8_t* left, uint8_t* right, int size) {
int freq; Format format; int channels;
GetFormat(freq, format, channels);
if (channels == 1) {
return Decode(left, size);
}
if ((int)mono_buffer.size() < size * 2) {
mono_buffer.resize(size * 2);
}
int read = Decode(mono_buffer.data(), size * 2);
if (read < 0) {
memset(left, '\0', size);
memset(right, '\0', size);
return -1;
}
int sample_size = GetSamplesizeForFormat(format);
for (int i = 0; i <= read / 2; i += sample_size) {
memcpy(&left[i], &mono_buffer.data()[i * channels], sample_size);
memcpy(&right[i], &mono_buffer.data()[i * channels + sample_size], sample_size);
}
if (read < size / 2) {
memset(&left[read / 2], '\0', size);
memset(&right[read / 2], '\0', size);
}
return read / 2;
}
class WMAUnsupportedFormatDecoder : public AudioDecoder {
public:
WMAUnsupportedFormatDecoder() {
error_message = std::string("WMA audio files are not supported. Reinstall the\n") +
"game and don't convert them when asked by Windows!\n";
}
bool Open(FILE*) override { return false; }
bool IsFinished() const override { return true; }
void GetFormat(int&, Format&, int&) const override {}
private:
int FillBuffer(uint8_t*, int) override { return -1; };
};
const char wma_magic[] = { (char)0x30, (char)0x26, (char)0xB2, (char)0x75 };
std::unique_ptr<AudioDecoder> AudioDecoder::Create(FILE* file, const std::string& filename) {
char magic[4] = { 0 };
fread(magic, 4, 1, file);
fseek(file, 0, SEEK_SET);
// Try to use MIDI decoder, use fallback(s) if available
if (!strncmp(magic, "MThd", 4)) {
#ifdef HAVE_WILDMIDI
static bool wildmidi_works = true;
if (wildmidi_works) {
AudioDecoder *mididec = nullptr;
# ifdef USE_AUDIO_RESAMPLER
mididec = new AudioResampler(new WildMidiDecoder(filename));
# else
mididec = new WildMidiDecoder(filename);
# endif
if (mididec) {
if (mididec->WasInited())
return std::unique_ptr<AudioDecoder>(mididec);
delete mididec;
}
wildmidi_works = false;
}
#endif
#if WANT_FMMIDI == 1
# ifdef USE_AUDIO_RESAMPLER
return std::unique_ptr<AudioDecoder>(new AudioResampler(new FmMidiDecoder(), true, AudioResampler::Quality::Low));
# else
return std::unique_ptr<AudioDecoder>(new FmMidiDecoder());
# endif
#endif
// No MIDI decoder available
return nullptr;
}
// Try to use internal OGG decoder
if (!strncmp(magic, "OggS", 4)) { // OGG
#if defined(HAVE_TREMOR) || defined(HAVE_OGGVORBIS)
# ifdef USE_AUDIO_RESAMPLER
return std::unique_ptr<AudioDecoder>(new AudioResampler(new OggVorbisDecoder()));
# else
return std::unique_ptr<AudioDecoder>(new OggVorbisDecoder());
# endif
#endif
}
#ifdef HAVE_SLOW_CPU
// Try to use a basic decoder for faster wav decoding if not ADPCM
if (!strncmp(magic, "RIFF", 4)){
fseek(file, 20, SEEK_SET);
uint16_t raw_enc;
fread(&raw_enc, 2, 1, file);
fseek(file, 0, SEEK_SET);
if (raw_enc == 0x01){ // Codec is normal PCM
# ifdef USE_AUDIO_RESAMPLER
return std::unique_ptr<AudioDecoder>(new AudioResampler(new WavDecoder()));
# else
return std::unique_ptr<AudioDecoder>(new WavDecoder());
# endif
}
}
#endif
// Try to use libsndfile for common formats
if (!strncmp(magic, "RIFF", 4) || // WAV
!strncmp(magic, "FORM", 4) || // WAV AIFF
!strncmp(magic, "OggS", 4) || // OGG
!strncmp(magic, "fLaC", 4)) { // FLAC
#ifdef HAVE_LIBSNDFILE
# ifdef USE_AUDIO_RESAMPLER
return std::unique_ptr<AudioDecoder>(new AudioResampler(new LibsndfileDecoder()));
# else
return std::unique_ptr<AudioDecoder>(new LibsndfileDecoder());
# endif
#endif
return nullptr;
}
// Inform about WMA issue
if (!memcmp(magic, wma_magic, 4)) {
return std::unique_ptr<AudioDecoder>(new WMAUnsupportedFormatDecoder());
}
// False positive MP3s should be prevented before by checking for common headers
#ifdef HAVE_MPG123
static bool mpg123_works = true;
if (mpg123_works) {
AudioDecoder *mp3dec = nullptr;
if (strncmp(magic, "ID3", 3) == 0) {
# ifdef USE_AUDIO_RESAMPLER
mp3dec = new AudioResampler(new Mpg123Decoder());
# else
mp3dec = new Mpg123Decoder();
# endif
if (mp3dec) {
if (mp3dec->WasInited())
return std::unique_ptr<AudioDecoder>(mp3dec);
delete mp3dec;
}
mpg123_works = false;
return nullptr;
}
// Parsing MP3s seems to be the only reliable way to detect them
if (Mpg123Decoder::IsMp3(file)) {
fseek(file, 0, SEEK_SET);
# ifdef USE_AUDIO_RESAMPLER
mp3dec = new AudioResampler(new Mpg123Decoder());
# else
mp3dec = new Mpg123Decoder();
# endif
if (mp3dec) {
if(mp3dec->WasInited())
return std::unique_ptr<AudioDecoder>(mp3dec);
delete mp3dec;
}
mpg123_works = false;
return nullptr;
}
}
#endif
fseek(file, 0, SEEK_SET);
return nullptr;
}
void AudioDecoder::SetFade(int begin, int end, int duration) {
fade_time = 0.0;
if (duration <= 0.0) {
volume = end;
return;
}
if (begin == end) {
volume = end;
return;
}
volume = (double)begin;
fade_end = (double)end;
fade_time = (double)duration;
delta_step = (fade_end - volume) / fade_time;
}
void AudioDecoder::Update(int delta) {
if (fade_time <= 0.0) {
return;
}
fade_time -= delta;
volume += delta * delta_step;
volume = volume > 100.0 ? 100.0 :
volume < 0.0 ? 0.0 :
volume;
}
void AudioDecoder::SetVolume(int volume) {
this->volume = (double)volume;
}
int AudioDecoder::GetVolume() const {
return (int)volume;
}
void AudioDecoder::Rewind() {
if (!Seek(0, Origin::Begin)) {
// The libs guarantee that Rewind works
assert(false && "Rewind");
}
}
bool AudioDecoder::GetLooping() const {
return looping;
}
void AudioDecoder::SetLooping(bool enable) {
looping = enable;
}
int AudioDecoder::GetLoopCount() const {
return loop_count;
}
bool AudioDecoder::WasInited() const {
return true;
}
std::string AudioDecoder::GetError() const {
return error_message;
}
std::string AudioDecoder::GetType() const {
return music_type;
}
bool AudioDecoder::SetFormat(int, Format, int) {
return false;
}
int AudioDecoder::GetPitch() const {
return 0;
}
bool AudioDecoder::SetPitch(int) {
return false;
}
bool AudioDecoder::Seek(size_t, Origin) {
return false;
}
size_t AudioDecoder::Tell() const {
return -1;
}
int AudioDecoder::GetTicks() const {
return 0;
}
int AudioDecoder::GetSamplesizeForFormat(AudioDecoder::Format format) {
switch (format) {
case Format::S8:
case Format::U8:
return 1;
case Format::S16:
case Format::U16:
return 2;
case Format::S32:
case Format::U32:
case Format::F32:
return 4;
}
assert(false && "Bad format");
return -1;
}
================================================
FILE: source/audiodec/audio_decoder.h
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EASYRPG_AUDIO_DECODER_H
#define EASYRPG_AUDIO_DECODER_H
// Headers
#include <cstdio>
#include <string>
#include <vector>
#include <memory>
/**
* The AudioDecoder class provides an abstraction over the decoding of
* common audio formats.
* Create will instantitate a proper audio decoder and calling Decode will
* fill a buffer with audio data which must be passed to the audio hardware.
*/
class AudioDecoder {
public:
virtual ~AudioDecoder() {}
/** Sample format */
enum class Format {
S8,
U8,
S16,
U16,
S32,
U32,
F32
};
/** Seek origin for Seek command */
enum class Origin {
Begin = 0,
Current = 1,
End = 2
};
/**
* Writes 'size' bytes in the specified buffer. The data matches the format
* reported by GetFormat.
* When size is is smaller then the amount of written bytes or an error occurs
* the remaining buffer space is cleared.
*
* @param buffer Output buffer
* @param size Size of the buffer in bytes
* @return Number of bytes written to the buffer or -1 on error
*/
int Decode(uint8_t* buffer, int size);
/**
* Splits stereo into mono and Writes 'size' bytes in each of the buffers.
* The data matches the format reported by GetFormat, except that both
* buffers will contain Mono audio. When the source format was already mono
* the 'right' buffer is ignored (and not cleared)
* When size is is smaller then the amount of written bytes or an error occurs
* the remaining buffer space is cleared.
*
* @param left Output buffer of the left channel
* @param right Output buffer of the right channel (or nothing if source is mono)
* @param size Size of each of the buffers
* @return Number of bytes written in one of the buffers or -1 on error
*/
int DecodeAsMono(uint8_t* left, uint8_t* right, int size);
/**
* Parses the specified file handle and open a proper audio decoder to handle
* the audio file.
* Upon success the file handle is owned by the audio decoder and further
* operations on it will be undefined! Upon failure the file handle points at
* the beginning.
* The filename is used for debug purposes but should match the FILE handle.
* Upon failure the FILE handle is valid and points at the beginning.
*
* @param file File handle to parse
* @param filename Path to the file handle
* @return An audio decoder instance when the format was detected, otherwise null
*/
static std::unique_ptr<AudioDecoder> Create(FILE* file, const std::string& filename);
/**
* Updates the volume for the fade in/out effect.
* Volume changes will not really modify the volume but are only helper
* functions for retrieving the volume information for the audio hardware.
*
* @param delta Time in ms since the last call of this function.
*/
void Update(int delta);
/**
* Prepares a volume fade in/out effect.
* To do a fade out begin must be larger then end.
* Call Update to do the fade.
* Volume changes will not really modify the volume but are only helper
* functions for retrieving the volume information for the audio hardware.
*
* @param begin Begin volume (from 0-100)
* @param end End volume (from 0-100)
* @param duration Fade duration in ms
*/
void SetFade(int begin, int end, int duration);
/**
* Sets the volume of the audio decoder.
* Volume changes will not really modify the volume but are only helper
* functions for retrieving the volume information for the audio hardware.
*
* @param volume (from 0-100)
*/
void SetVolume(int volume);
/**
* Gets the volume of the audio decoder.
* Volume changes will not really modify the volume but are only helper
* functions for retrieving the volume information for the audio hardware.
*/
int GetVolume() const;
/**
* Pauses the audio decoding.
* Calling any Decode function will return a 0-buffer.
*/
void Pause();
/**
* Resumes the audio decoding.
* The decode function will continue behaving as expected.
*/
void Resume();
/**
* Rewinds the audio stream to the beginning.
*/
void Rewind();
/**
* Gets if the audio stream will loop when the stream finishes.
*
* @return if looping
*/
bool GetLooping() const;
/**
* Enables/Disables audio stream looping.
* When looping is enabled IsFinished will never return true and the stream
* auto-rewinds (assuming Rewind is supported)
*
* @param enable Enable/Disable looping
*/
void SetLooping(bool enable);
/**
* Gets the number of loops
*
* @return loop count
*/
int GetLoopCount() const;
/**
* Gets the status of the newly created audio decoder.
* Used to make sure the underlying library is properly initialized.
*
* @return true if initializing was succesful, false otherwise
*/
virtual bool WasInited() const;
/**
* Provides an error message when Open or a Decode function fail.
*
* @return Human readable error message
*/
virtual std::string GetError() const;
/**
* Returns the name of the format the current audio decoder decodes in
* lower case.
*
* @return Format name
*/
virtual std::string GetType() const;
// Functions to be implemented by the audio decoder
/**
* Assigns a file handle to the audio decoder.
* Open should be only called once per audio decoder instance.
* Use GetError to get the error reason on failure.
*
* @return true if inititalizing was succesful, false otherwise
*/
virtual bool Open(FILE* file) = 0;
/**
* Determines whether the stream is finished.
*
* @return true stream ended
*/
virtual bool IsFinished() const = 0;
/**
* Retrieves the format of the audio decoder.
* It is guaranteed that these settings will stay constant the whole time.
*
* @param frequency Filled with the audio frequency
* @param format Filled with the audio format
* @param channel Filled with the amount of channels
*/
virtual void GetFormat(int& frequency, Format& format, int& channels) const = 0;
/**
* Requests a prefered format from the audio decoder. Not all decoders
* support everything and it's recommended to use the audio hardware
* for audio processing.
* When false is returned use GetFormat to get the real format of the
* output data.
*
* @param frequency Audio frequency
* @param format Audio format
* @param channel Number of channels
* @return true when all settings were set, otherwise false (use GetFormat)
*/
virtual bool SetFormat(int frequency, Format format, int channels);
/**
* Gets the pitch multiplier.
*
* @return pitch multiplier
*/
virtual int GetPitch() const;
/**
* Sets the pitch multiplier.
* 100 = normal speed
* 200 = double speed and so on
* Not all audio decoders support this. Using the audio hardware is
* recommended.
*
* @param pitch Pitch multiplier to use
* @return true if pitch was set, false otherwise
*/
virtual bool SetPitch(int pitch);
/**
* Seeks in the audio stream. The value of offset is implementation
* defined but is guaranteed to match the result of Tell.
* Only Rewinding is guaranteed to work.
*
* @param offset Offset to seek to
* @param origin Position to seek from
* @return Whether seek was successful
*/
virtual bool Seek(size_t offset, Origin origin);
/**
* Tells the current stream position. The value is implementation
* defined.
*
* @return Position in the stream
*/
virtual size_t Tell() const;
/**
* Returns amount of executed ticks. Only useful for MIDI format.
*
* @return Amount of MIDI ticks.
*/
virtual int GetTicks() const;
/**
* Returns the amount of bytes per sample.
*
* @param Sample format
* @return Bytes per sample
*/
static int GetSamplesizeForFormat(AudioDecoder::Format format);
protected:
/**
* Called by the Decode functions to fill the buffer.
*
* @param buffer Buffer to fill
* @param size Buffer size
* @return number of bytes read or -1 on error
*/
virtual int FillBuffer(uint8_t* buffer, int size) = 0;
std::string error_message;
std::string music_type;
private:
bool paused = false;
double volume = 0;
double fade_end = 0;
double fade_time = -1;
double delta_step = 0;
bool looping = false;
int loop_count = 0;
std::vector<uint8_t> mono_buffer;
};
#endif
================================================
FILE: source/audiodec/audio_resampler.cpp
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(HAVE_LIBSPEEXDSP) || defined(HAVE_LIBSAMPLERATE)
#include <cassert>
#include "audio_resampler.h"
#define ERROR -1
#define STANDARD_PITCH 100
/**
* Utility function used to convert a buffer of a arbitrary AudioDecoder::Format to a float buffer
*
* @param[in] wrapped_decoder The decoder from which audio samples are read
* @param[inout] buffer The buffer which will receive the converted samples,
* has to be at least amount_of_samples_to_read*sizeof(float) bytes big.
* @param[in] amount_of_samples_to_read The number of samples to read.
* @param[in] input_samplesize The size of one sample of the decoder in it's original format - given in bytes
* @param[in] input_format The original format of the samples
*
* @return The number of converted samples - if this number is smaller than amount_of_samples_to_read the wrapped decoder has reaches it's end.
* If the returned value has a negative value an error occured.
*/
inline static int DecodeAndConvertFloat(AudioDecoder * wrapped_decoder,
uint8_t * buffer,
int amount_of_samples_to_read,
const int input_samplesize,
const AudioDecoder::Format input_format){
float* bufferAsFloat = (float*)buffer;
if (wrapped_decoder->IsFinished()) return 0; //Workaround for decoders which don't detect there own end
int amount_of_samples_read = wrapped_decoder->Decode(buffer, amount_of_samples_to_read*input_samplesize);
if (amount_of_samples_read <= 0) {
return amount_of_samples_read; //error occured - or nothing read
} else {
amount_of_samples_read /= input_samplesize;
}
//Convert the read data (amount_of_data_read is at least one at this moment)
switch (input_format) {
case AudioDecoder::Format::S8:
//Convert inplace (the last frames are unused if smaller)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsFloat[i] = ((int8_t*)bufferAsFloat)[i] / 128.0;
}
break;
case AudioDecoder::Format::U8:
//Convert inplace (the last frames are unused if smaller)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsFloat[i] = ((uint8_t*)bufferAsFloat)[i] / 128.0 - 1.0;
}
break;
case AudioDecoder::Format::S16:
//Convert inplace (the last frames are unused if smaller)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsFloat[i] = ((int16_t*)bufferAsFloat)[i] / 32768.0;
}
break;
case AudioDecoder::Format::U16:
//Convert inplace (the last frames are unused if smaller)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsFloat[i] = ((uint16_t*)bufferAsFloat)[i] / 32768.0 - 1.0;
}
break;
case AudioDecoder::Format::S32:
//Convert inplace (same size)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsFloat[i] = ((int32_t*)bufferAsFloat)[i] / 2147483648.0;
}
break;
case AudioDecoder::Format::U32:
//Convert inplace (same size)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsFloat[i] = ((uint32_t*)bufferAsFloat)[i] / 2147483648.0 - 1.0;
}
break;
case AudioDecoder::Format::F32:
//Nothing to convert
break;
}
return amount_of_samples_read;
}
#if defined(HAVE_LIBSPEEXDSP)
/**
* Utility function used to convert a buffer of a arbitrary AudioDecoder::Format to a int16 buffer
*
* @param[in] wrapped_decoder The decoder from which audio samples are read
* @param[inout] buffer The buffer which will receive the converted samples,
* has to be at least amount_of_samples_to_read*max(sizeof(int16_t),input_samplesize) bytes big.
* @param[in] amount_of_samples_to_read The number of samples to read.
* @param[in] input_samplesize The size of one sample of the decoder in it's original format - given in bytes
* @param[in] input_format The original format of the samples
*
* @return The number of converted samples - if this number is smaller than amount_of_samples_to_read the wrapped decoder has reaches it's end.
* If the returned value has a negative value an error occured.
*/
inline static int DecodeAndConvertInt16(AudioDecoder * wrapped_decoder,
uint8_t * buffer,
int amount_of_samples_to_read,
const int input_samplesize,
const AudioDecoder::Format input_format){
int16_t* bufferAsInt16 = (int16_t*)buffer;
if (wrapped_decoder->IsFinished()) return 0; //Workaround for decoders which don't detect there own end
int amount_of_samples_read = wrapped_decoder->Decode(buffer, amount_of_samples_to_read*input_samplesize);
if (amount_of_samples_read <= 0) {
return amount_of_samples_read; //error occured - or nothing read
} else {
//Convert the number of bytes to the number of samples
amount_of_samples_read /= input_samplesize;
}
//Convert the read data (amount_of_data_read is at least one at this moment)
switch (input_format) {
case AudioDecoder::Format::S8:
//Convert inplace (the last frames are unused if smaller)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsInt16[i] = ((int8_t*)bufferAsInt16)[i] << 8;
}
break;
case AudioDecoder::Format::U8:
//Convert inplace (the last frames are unused if smaller)
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsInt16[i] = (((int16_t)(((uint8_t*)bufferAsInt16)[i])) - 128) << 8;
}
break;
case AudioDecoder::Format::S16:
//Nothing to convert
break;
case AudioDecoder::Format::U16:
//Convert unsigned to signed
for (int i = amount_of_samples_read - 1; i >= 0; i--) {
bufferAsInt16[i] = (int16_t)(((int32_t)(((uint16_t*)bufferAsInt16)[i])) - 32768);
}
break;
case AudioDecoder::Format::S32:
//Convert inplace (from front to back to prevent overwriting the buffer)
for (int i = 0; i < amount_of_samples_read; i++) {
bufferAsInt16[i] = (int16_t)((((int32_t*)bufferAsInt16)[i]) >> 16);
}
break;
case AudioDecoder::Format::U32:
//Convert inplace (from front to back to prevent overwriting the buffer)
for (int i = 0; i < amount_of_samples_read; i++) {
bufferAsInt16[i] = (int16_t)(((int32_t)((((uint32_t*)bufferAsInt16)[i]) >> 16)) - 32768);
}
break;
case AudioDecoder::Format::F32:
//Convert inplace (from front to back to prevent overwriting the buffer)
for (int i = 0; i < amount_of_samples_read; i++) {
float number = ((((float*)bufferAsInt16)[i])*32768.0);
bufferAsInt16[i] = (number <= 32767.0) ? ((number >= -32768.0) ? number : -32768) : 32767;
}
break;
}
return amount_of_samples_read;
}
#endif
AudioResampler::AudioResampler(AudioDecoder * wrapped, bool pitch_handled, AudioResampler::Quality quality)
{
//There is no need for a standalone resampler decoder
assert(wrapped != 0);
wrapped_decoder = wrapped;
music_type = wrapped->GetType();
lasterror = 0;
pitch_handled_by_decoder = pitch_handled;
#if defined(HAVE_LIBSPEEXDSP)
switch (quality) {
case Quality::Low:
sampling_quality = 1;
break;
case Quality::Medium:
sampling_quality = 3;
break;
case Quality::High:
sampling_quality = 5;
break;
}
#elif defined(HAVE_LIBSAMPLERATE)
switch (quality) {
case Quality::Low:
sampling_quality = SRC_SINC_FASTEST;
break;
case Quality::Medium:
sampling_quality = SRC_SINC_MEDIUM_QUALITY;
break;
case Quality::High:
sampling_quality = SRC_SINC_BEST_QUALITY;
break;
}
#endif
finished = false;
pitch = 100;
}
AudioResampler::~AudioResampler() {
if (conversion_state != 0) {
#if defined(HAVE_LIBSPEEXDSP)
speex_resampler_destroy(conversion_state);
#elif defined(HAVE_LIBSAMPLERATE)
src_delete(conversion_state);
#endif
}
if (wrapped_decoder != 0) {
delete wrapped_decoder;
}
}
bool AudioResampler::WasInited() const {
return wrapped_decoder->WasInited();
}
bool AudioResampler::Open(FILE* file) {
if (wrapped_decoder->Open(file)) {
wrapped_decoder->GetFormat(input_rate, input_format, nr_of_channels);
//determine if the input format is supported by the resampler
switch (input_format) {
case Format::F32: output_format = input_format; break;
#ifdef HAVE_LIBSPEEXDSP
case Format::S16: output_format = input_format; break;
#endif
default: output_format = Format::F32; break;
}
//Set input format to output_format if possible
wrapped_decoder->SetFormat(input_rate, output_format, nr_of_channels);
//Reread format to get new values
wrapped_decoder->GetFormat(input_rate, input_format, nr_of_channels);
output_rate = input_rate;
#if defined(HAVE_LIBSPEEXDSP)
conversion_state = speex_resampler_init(nr_of_channels, input_rate, output_rate, sampling_quality, &lasterror);
conversion_data.ratio_num = input_rate;
conversion_data.ratio_denom = output_rate;
speex_resampler_skip_zeros(conversion_state);
#elif defined(HAVE_LIBSAMPLERATE)
conversion_state = src_new(sampling_quality, nr_of_channels, &lasterror);
#endif
//Init the conversion data structure
conversion_data.input_frames = 0;
conversion_data.input_frames_used = 0;
finished = false;
return conversion_state != 0;
} else {
return false;
}
}
bool AudioResampler::Seek(size_t offset, Origin origin) {
if (wrapped_decoder->Seek(offset, origin)) {
//reset conversio data
conversion_data.input_frames = 0;
conversion_data.input_frames_used = 0;
finished = wrapped_decoder->IsFinished();
#if defined(HAVE_LIBSPEEXDSP)
speex_resampler_reset_mem(conversion_state);
#elif defined(HAVE_LIBSAMPLERATE)
src_reset(conversion_state);
#endif
return true;
}
return false;
}
size_t AudioResampler::Tell() const {
return wrapped_decoder->Tell();
}
int AudioResampler::GetTicks() const {
return wrapped_decoder->GetTicks();
}
bool AudioResampler::IsFinished() const {
return finished;
}
void AudioResampler::GetFormat(int& frequency, AudioDecoder::Format& format, int& channels) const {
frequency = output_rate;
format = output_format;
channels = nr_of_channels;
}
bool AudioResampler::SetFormat(int freq, AudioDecoder::Format fmt, int channels) {
//Check whether requested format is supported by the resampler
switch (fmt) {
case Format::F32: output_format = fmt; break;
#ifdef HAVE_LIBSPEEXDSP
case Format::S16: output_format = fmt; break;
#endif
default: break;
}
wrapped_decoder->SetFormat(input_rate, output_format, channels);
wrapped_decoder->GetFormat(input_rate, input_format, nr_of_channels);
output_rate = freq;
return (nr_of_channels == channels&&output_format == fmt);
}
int AudioResampler::GetPitch() const {
if (pitch_handled_by_decoder) {
return wrapped_decoder->GetPitch();
} else {
return pitch;
}
}
bool AudioResampler::SetPitch(int pitch_) {
if (pitch_handled_by_decoder) {
return wrapped_decoder->SetPitch(pitch_);
} else {
pitch = pitch_;
return true;
}
}
int AudioResampler::FillBuffer(uint8_t* buffer, int length) {
int amount_filled = 0;
if((input_rate == output_rate) && ((pitch == STANDARD_PITCH) || pitch_handled_by_decoder)) {
//Do only format conversion
amount_filled = FillBufferSameRate(buffer, length);
} else {
if (conversion_state == 0) {
error_message = "internal error: state pointer is a nullptr";
amount_filled = ERROR;
} else {
//Do samplerate conversion
amount_filled = FillBufferDifferentRate(buffer, length);
}
}
//Clear the remaining buffer as specified in audio_decoder.h
for (int i = (amount_filled > 0) ? amount_filled : 0; i < length; i++) {
buffer[i] = 0;
}
return amount_filled;
}
int AudioResampler::FillBufferSameRate(uint8_t* buffer, int length) {
const int input_samplesize = GetSamplesizeForFormat(input_format);
const int output_samplesize = GetSamplesizeForFormat(output_format);
//The buffer size has to be a multiple of a frame
const int buffer_size=sizeof(internal_buffer) - sizeof(internal_buffer)%(nr_of_channels*input_samplesize);
int total_output_frames = length / (output_samplesize*nr_of_channels);
int amount_of_data_to_read = 0;
int amount_of_data_read = total_output_frames*nr_of_channels;
int decoded = 0;
if (input_samplesize > output_samplesize) {
//It is necessary to use the internal_buffer to convert the samples.
while (total_output_frames > 0) {
amount_of_data_to_read = buffer_size / input_samplesize;
//limit amount_of_data_to_read in the last loop
amount_of_data_to_read = (amount_of_data_to_read > total_output_frames) ? total_output_frames : amount_of_data_to_read;
switch (output_format) {
case AudioDecoder::Format::F32:
amount_of_data_read = DecodeAndConvertFloat(wrapped_decoder, internal_buffer, amount_of_data_to_read, input_samplesize, input_format);
break;
#ifdef HAVE_LIBSPEEXDSP
case AudioDecoder::Format::S16:
amount_of_data_read = DecodeAndConvertInt16(wrapped_decoder, internal_buffer, amount_of_data_to_read, input_samplesize, input_format);
break;
#endif
default: error_message = "internal error: output_format is not convertable"; return ERROR;
}
if (amount_of_data_read < 0) {
error_message = wrapped_decoder->GetError();
return amount_of_data_read; //error occured
}
//Copy the converted samples
for (int i = 0; i < amount_of_data_read*output_samplesize; i++) {
buffer[i] = internal_buffer[i];
}
//Prepare next loop
total_output_frames -= amount_of_data_read;
decoded += amount_of_data_read;
buffer += amount_of_data_read*output_samplesize;
//If the end of the decoder is reached (it has finished)
if (amount_of_data_read < amount_of_data_to_read) {
break;
}
}
} else {
//It is possible to work inplace as length is specified for the output samplesize.
switch (output_format) {
case AudioDecoder::Format::F32:
decoded = DecodeAndConvertFloat(wrapped_decoder, buffer, amount_of_data_read, input_samplesize, input_format);
break;
#ifdef HAVE_LIBSPEEXDSP
case AudioDecoder::Format::S16:
decoded = DecodeAndConvertInt16(wrapped_decoder, buffer, amount_of_data_read, input_samplesize, input_format);
break;
#endif
default: error_message = "internal error: output_format is not convertable"; return ERROR;
}
}
finished = wrapped_decoder->IsFinished();
if (decoded < 0) {
error_message = wrapped_decoder->GetError();
return decoded;
} else {
return decoded*output_samplesize;
}
}
int AudioResampler::FillBufferDifferentRate(uint8_t* buffer, int length) {
const int input_samplesize = GetSamplesizeForFormat(input_format);
const int output_samplesize = GetSamplesizeForFormat(output_format);
//The buffer size has to be a multiple of a frame
const int buffer_size=sizeof(internal_buffer) - sizeof(internal_buffer)%(nr_of_channels*((input_samplesize>output_samplesize) ? input_samplesize : output_samplesize));
int total_output_frames = length / (output_samplesize*nr_of_channels);
int amount_of_samples_to_read = 0;
int amount_of_samples_read = 0;
uint8_t * advanced_input_buffer = internal_buffer;
int unused_frames = 0;
int empty_buffer_space = 0;
int error = 0;
#ifdef HAVE_LIBSPEEXDSP
spx_uint32_t numerator = 0;
spx_uint32_t denominator = 0;
#endif
while (total_output_frames > 0) {
//Calculate how much frames of the last cycle are unused - to reuse them
unused_frames = conversion_data.input_frames - conversion_data.input_frames_used;
empty_buffer_space = buffer_size / output_samplesize - unused_frames*nr_of_channels;
advanced_input_buffer = internal_buffer;
//If there is still unused data in the input_buffer order it to the front
for (int i = 0; i < unused_frames*nr_of_channels*output_samplesize; i++) {
*advanced_input_buffer = *(advanced_input_buffer + empty_buffer_space*output_samplesize);
advanced_input_buffer++;
}
//advanced_input_buffer is now offset to the first frame of new data!
//ensure that the input buffer is not able to overrun
amount_of_samples_to_read = (input_samplesize > output_samplesize) ? (empty_buffer_space*output_samplesize) / input_samplesize : empty_buffer_space;
//Read as many frames as needed to refill the buffer (filled after the conversion to float)
if (amount_of_samples_to_read != 0) {
switch (output_format) {
case AudioDecoder::Format::F32: amount_of_samples_read = DecodeAndConvertFloat(wrapped_decoder, advanced_input_buffer, amount_of_samples_to_read, input_samplesize, input_format); break;
#ifdef HAVE_LIBSPEEXDSP
case AudioDecoder::Format::S16: amount_of_samples_read = DecodeAndConvertInt16(wrapped_decoder, advanced_input_buffer, amount_of_samples_to_read, input_samplesize, input_format); break;
#endif
default: error_message = "internal error: output_format is not convertable"; return ERROR;
}
if (amount_of_samples_read < 0) {
error_message = wrapped_decoder->GetError();
return amount_of_samples_read; //error occured
}
}
//Now we have a prepared full buffer of converted values
//Prepare the source data
conversion_data.input_frames = amount_of_samples_read / nr_of_channels + unused_frames;
conversion_data.output_frames = total_output_frames;
#if defined(HAVE_LIBSPEEXDSP)
conversion_data.input_frames_used = conversion_data.input_frames;
conversion_data.output_frames_gen = conversion_data.output_frames;
//libspeexdsp defines a sample rate conversion with a fraction (input/output)
numerator = input_rate*pitch;
denominator = output_rate * STANDARD_PITCH;
if (pitch_handled_by_decoder) {
numerator = input_rate;
denominator = output_rate;
}
if (conversion_data.ratio_num != numerator || conversion_data.ratio_denom != denominator) {
int err=speex_resampler_set_rate_frac(conversion_state, numerator, denominator, input_rate, output_rate);
conversion_data.ratio_num = numerator;
conversion_data.ratio_denom = denominator;
}
//A pitfall from libspeexdsp if the output buffer is defined to big - everything stutters -achieved good values with the same size as the input buffer for a maximum
conversion_data.output_frames_gen=(conversion_data.input_frames<conversion_data.output_frames_gen) ? conversion_data.input_frames :conversion_data.output_frames_gen;
switch (output_format) {
case Format::F32:
error = speex_resampler_process_interleaved_float(conversion_state, (float*)internal_buffer, &conversion_data.input_frames_used, (float*)buffer, &conversion_data.output_frames_gen);
break;
case Format::S16:
error = speex_resampler_process_interleaved_int(conversion_state, (spx_int16_t*)internal_buffer, &conversion_data.input_frames_used, (spx_int16_t*)buffer, &conversion_data.output_frames_gen);
break;
default: error_message = "internal error: output_format is not convertable"; return ERROR;
}
if (error != 0) {
error_message = speex_resampler_strerror(error);
return ERROR;
}
#elif defined(HAVE_LIBSAMPLERATE)
conversion_data.data_in = (float*)internal_buffer;
conversion_data.data_out = (float*)buffer;
if (pitch_handled_by_decoder) {
conversion_data.src_ratio = (output_rate*1.0) / input_rate;
}
else {
conversion_data.src_ratio = (output_rate*STANDARD_PITCH *1.0) / (input_rate*pitch*1.0);
}
conversion_data.end_of_input = (wrapped_decoder->IsFinished()) ? 1 : 0;
//Now let libsamplerate filter the data
error = src_process(conversion_state, &conversion_data);
if (error != 0) {
error_message = src_strerror(error);
return ERROR;
}
#endif
total_output_frames -= conversion_data.output_frames_gen;
buffer += conversion_data.output_frames_gen*nr_of_channels*output_samplesize;
if ((conversion_data.input_frames == 0 && conversion_data.output_frames_gen <= conversion_data.output_frames) || conversion_data.output_frames_gen == 0) {
finished = true;
//There is nothing left to convert - return how much samples (in bytes) are converted!
return length - total_output_frames*(output_samplesize*nr_of_channels);
}
}
return length;
}
#endif
================================================
FILE: source/audiodec/audio_resampler.h
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EASYRPG_AUDIO_RESAMPLER_H
#define EASYRPG_AUDIO_RESAMPLER_H
// Headers
#include "audio_decoder.h"
#include <string>
#include <memory>
#if defined(HAVE_LIBSPEEXDSP)
#include <speex/speex_resampler.h>
#elif defined(HAVE_LIBSAMPLERATE)
#include <samplerate.h>
#endif
/**
* Audio resampler powered by Libspeexdsp or Libsamplerate
* Wraps another decoder and provides resampling.
*/
class AudioResampler : public AudioDecoder {
public:
/** Resampling quality */
enum class Quality {
High,
Medium,
Low
};
/**
* Constructs a resampler
*
* @param[in] decoder The decoder which provides samples to the resampler - will be owned by the resampler
* @param[in] pitch_handled Defines whether the decoder handles pitch changes by itself or not.
* @param[in] quality Sets the quality rting of the resampler - higher quality implies slower filtering
*/
AudioResampler(AudioDecoder * decoder, bool pitch_handled=false, Quality quality=Quality::Medium);
/**
* Destroys the resampler as well as its owned ressources
*/
~AudioResampler();
/**
* Wraps the status querying of the contained decoder.
* Used to make sure the underlying library is properly initialized.
*
* @return true if initializing was succesful, false otherwise
*/
bool WasInited() const;
/**
* Wraps the opening function of the contained decoder
*
* @param[in] file Filepointer to a file readable by the wrapped decoder
*
* @return Whether the operation was successful or not
*/
bool Open(FILE* file) override;
/**
* Wraps the seek function of the contained decoder
* @note If the seek function of the wrapped decoder is
* somewhat corelated to time the offset is not influenced by the resampling ratio
*
* @param offset Offset to seek to
* @param origin Position to seek from
*
* @return Whether seek was successful
*/
bool Seek(size_t offset, Origin origin) override;
/**
* Wraps the tell function of the contained decoder
*
* @return Position in the stream
*/
size_t Tell() const override;
/**
* Wraps the GetTicks Function of the contained decoder
*
* @return Amount of MIDI ticks.
*/
int GetTicks() const override;
/**
* Returns wheter the resampled audio stream is finished
*
* @return true if the stream has reached it's end
*/
bool IsFinished() const override;
/**
* Retrieves the format of the audio decoder.
*
* @param frequency Filled with the audio frequency
* @param format Filled with the audio format
* @param channel Filled with the amount of channels
*/
void GetFormat(int& frequency, AudioDecoder::Format& format, int& channels) const override;
/**
* Requests a certain frame format from the resampler.
* Supported formats are:
* * float,int16_t for libspeexdsp
* * float for libsamplerate
* The channel setting is redirected to the wrapped decoder.
* The frequency setting controls the resampler.
*
* @param frequency Sample rate the resampler should output
* @param format Audio format the resampler should output
* @param channel Number of channels
* @return true when all settings were set, otherwise false (use GetFormat)
*/
bool SetFormat(int frequency, AudioDecoder::Format format, int channels) override;
/**
* Gets the pitch multiplier.
*
* @return pitch multiplier
*/
int GetPitch() const override;
/**
* Sets the pitch multiplier.
* 100 = normal speed
* 200 = double speed and so on
* If the pitch is handled by the resampler this setting controls the resampling in conjunction with the frequency.
*
* @param pitch Pitch multiplier to use
* @return true if pitch was set, false otherwise
*/
bool SetPitch(int pitch) override;
private:
/**
* Called by the Decode functions to fill the buffer.
*
* @param buffer Buffer to fill
* @param size Buffer size
* @return number of bytes read or -1 on error
*/
int FillBuffer(uint8_t* buffer, int length) override;
/**
* Internally used by the FillBuffer function if the output rate equals the input rate
*/
int FillBufferSameRate(uint8_t* buffer, int length);
/**
* Internally used by the FillBuffer function if resampling is necessary
*/
int FillBufferDifferentRate(uint8_t* buffer, int length);
AudioDecoder * wrapped_decoder;
bool pitch_handled_by_decoder;
int pitch;
int sampling_quality;
int lasterror;
bool finished;
int nr_of_channels;
Format input_format;
int input_rate;
Format output_format;
int output_rate;
#if defined(HAVE_LIBSPEEXDSP)
struct {
spx_uint32_t input_frames, output_frames;
spx_uint32_t input_frames_used, output_frames_gen;
spx_uint32_t ratio_num, ratio_denom;
} conversion_data;
SpeexResamplerState * conversion_state;
#elif defined(HAVE_LIBSAMPLERATE)
SRC_DATA conversion_data;
SRC_STATE * conversion_state;
#endif
/**
* A buffer needed for operations which can't be performed in place (e.g resampling)
* The size of the buffer defines the number of calls to the resampling algorithmn
* (In the cpp file sizeof is used therefore it can be adjusted to fit the available memory)
*/
uint8_t internal_buffer[256*sizeof(float)];
};
#endif
================================================
FILE: source/audiodec/cd_psp2.cpp
================================================
/*
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 <vitasdk.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define min
#define max
extern "C"{
#include "../quakedef.h"
}
#undef min
#undef max
#include "audio_decoder.h"
extern char* mod_path;
#define BUFSIZE 8192 // Max dimension of audio buffer size
#define NSAMPLES 2048 // Number of samples for output
// Music block struct
struct DecodedMusic{
uint8_t* audiobuf;
uint8_t* audiobuf2;
uint8_t* cur_audiobuf;
FILE* handle;
bool isPlaying;
bool loop;
volatile bool pauseTrigger;
volatile bool closeTrigger;
volatile bool changeVol;
};
// Internal stuffs
DecodedMusic* BGM = NULL;
std::unique_ptr<AudioDecoder> audio_decoder;
SceUID thread, Audio_Mutex, Talk_Mutex;
volatile bool mustExit = false;
float old_vol = 1.0;
// Audio thread code
static int bgmThread(unsigned int args, void* arg){
// Initializing audio port
int ch = sceAudioOutOpenPort(SCE_AUDIO_OUT_PORT_TYPE_MAIN, NSAMPLES, 48000, SCE_AUDIO_OUT_MODE_STEREO);
sceAudioOutSetConfig(ch, -1, -1, (SceAudioOutMode)-1);
old_vol = bgmvolume.value;
int vol = 32767 * bgmvolume.value;
int vol_stereo[] = {vol, vol};
sceAudioOutSetVolume(ch, (SceAudioOutChannelFlag)(SCE_AUDIO_VOLUME_FLAG_L_CH | SCE_AUDIO_VOLUME_FLAG_R_CH), vol_stereo);
DecodedMusic* mus;
for (;;){
// Waiting for an audio output request
sceKernelWaitSema(Audio_Mutex, 1, NULL);
// Fetching track
mus = BGM;
// Checking if a new track is available
if (mus == NULL){
//If we enter here, we probably are in the exiting procedure
if (mustExit){
sceAudioOutReleasePort(ch);
mustExit = false;
sceKernelExitDeleteThread(0);
}
}
// Initializing audio decoder
audio_decoder = AudioDecoder::Create(mus->handle, "Track");
audio_decoder->Open(mus->handle);
audio_decoder->SetLooping(mus->loop);
audio_decoder->SetFormat(48000, AudioDecoder::Format::S16, 2);
// Initializing audio buffers
mus->audiobuf = (uint8_t*)malloc(BUFSIZE);
mus->audiobuf2 = (uint8_t*)malloc(BUFSIZE);
mus->cur_audiobuf = mus->audiobuf;
// Audio playback loop
for (;;){
// Check if the music must be paused
if (mus->pauseTrigger || mustExit){
// Check if the music must be closed
if (mus->closeTrigger){
audio_decoder.reset();
free(mus->audiobuf);
free(mus->audiobuf2);
free(mus);
BGM = NULL;
mus = NULL;
if (!mustExit){
sceKernelSignalSema(Talk_Mutex, 1);
break;
}
}
// Check if the thread must be closed
if (mustExit){
// Check if the audio stream has already been closed
if (mus != NULL){
mus->closeTrigger = true;
continue;
}
// Recursively closing all the threads
sceAudioOutReleasePort(ch);
mustExit = false;
sceKernelExitDeleteThread(0);
}
mus->isPlaying = !mus->isPlaying;
mus->pauseTrigger = false;
}
// Check if a volume change is required
if (mus->changeVol){
old_vol = bgmvolume.value;
int vol = 32767 * bgmvolume.value;
int vol_stereo[] = {vol, vol};
sceAudioOutSetVolume(ch, (SceAudioOutChannelFlag)(SCE_AUDIO_VOLUME_FLAG_L_CH | SCE_AUDIO_VOLUME_FLAG_R_CH), vol_stereo);
mus->changeVol = false;
}
if (mus->isPlaying){
// Check if audio playback finished
if ((!mus->loop) && audio_decoder->IsFinished()) mus->isPlaying = false;
// Update audio output
if (mus->cur_audiobuf == mus->audiobuf) mus->cur_audiobuf = mus->audiobuf2;
else mus->cur_audiobuf = mus->audiobuf;
audio_decoder->Decode(mus->cur_audiobuf, BUFSIZE);
sceAudioOutOutput(ch, mus->cur_audiobuf);
}
}
}
}
void CDAudio_Play(byte track, bool looping)
{
CDAudio_Stop();
char fname[256];
sprintf (fname, "%s/%s/cdtracks/track", host_parms.basedir, (mod_path == NULL) ? GAMENAME_DIR : mod_path);
if (track < 100){
sprintf(fname, "%s0", fname);
if (track < 10){
sprintf(fname, "%s0", fname);
}
}
sprintf(fname,"%s%d",fname,track);
char tmp[256];
sprintf(tmp,"%s.ogg",fname);
FILE* fd = fopen(tmp,"rb");
if (fd == NULL){
sprintf(tmp,"%s.mp3",fname);
fd = fopen(tmp,"rb");
}
if (fd == NULL) return;
DecodedMusic* memblock = (DecodedMusic*)malloc(sizeof(DecodedMusic));
memblock->handle = fd;
memblock->pauseTrigger = false;
memblock->closeTrigger = false;
memblock->isPlaying = true;
memblock->loop = looping;
BGM = memblock;
sceKernelSignalSema(Audio_Mutex, 1);
}
void CDAudio_Stop(void)
{
if (BGM != NULL){
BGM->closeTrigger = true;
BGM->pauseTrigger = true;
sceKernelWaitSema(Talk_Mutex, 1, NULL);
}
}
void CDAudio_Pause(void)
{
if (BGM != NULL) BGM->pauseTrigger = true;
}
void CDAudio_Resume(void)
{
if (BGM != NULL) BGM->pauseTrigger = true;
}
void CDAudio_Update(void)
{
if (BGM != NULL){
if (old_vol != bgmvolume.value) BGM->changeVol = true;
}
}
int CDAudio_Init(void)
{
int res;
// Creating audio mutex
Audio_Mutex = sceKernelCreateSema("Audio Mutex", 0, 0, 1, NULL);
Talk_Mutex = sceKernelCreateSema("Talk Mutex", 0, 0, 1, NULL);
// Creating audio thread
thread = sceKernelCreateThread("Audio Thread", &bgmThread, 0x10000100, 0x10000, 0, 0, NULL);
sceKernelStartThread(thread, sizeof(thread), &thread);
return 0;
}
void CDAudio_Shutdown(void)
{
mustExit = true;
sceKernelSignalSema(Audio_Mutex, 1);
sceKernelWaitThreadEnd(thread, NULL, NULL);
sceKernelDeleteSema(Audio_Mutex);
sceKernelDeleteSema(Talk_Mutex);
}
================================================
FILE: source/audiodec/decoder_mpg123.cpp
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_MPG123
// Headers
#include <cassert>
#include "decoder_mpg123.h"
static bool init = false;
static void Mpg123Decoder_deinit(void) {
mpg123_exit();
}
static ssize_t custom_read(void* io, void* buffer, size_t nbyte) {
FILE* f = reinterpret_cast<FILE*>(io);
return fread(buffer, 1, nbyte, f);
}
static off_t custom_seek(void* io, off_t offset, int seek_type) {
FILE* f = reinterpret_cast<FILE*>(io);
fseek(f, offset, seek_type);
return ftell(f);
}
static void custom_close(void* io) {
FILE* f = reinterpret_cast<FILE*>(io);
fclose(f);
}
static void noop_close(void*) {}
Mpg123Decoder::Mpg123Decoder() :
handle(nullptr, mpg123_delete)
{
music_type = "mp3";
// only initialize library once
if (!init) {
err = mpg123_init();
if (err != MPG123_OK) {
error_message = "mpg123: " + std::string(mpg123_plain_strerror(err));
return;
}
// setup deinitialization
atexit(Mpg123Decoder_deinit);
}
handle.reset(mpg123_new(nullptr, &err));
mpg123_replace_reader_handle(handle.get(), custom_read, custom_seek, custom_close);
if (!handle) {
error_message = "mpg123: " + std::string(mpg123_plain_strerror(err));
return;
}
init = true;
}
Mpg123Decoder::~Mpg123Decoder() {
}
bool Mpg123Decoder::WasInited() const {
return init;
}
bool Mpg123Decoder::Open(FILE* file) {
if (!init) {
return false;
}
finished = false;
err = mpg123_open_handle(handle.get(), file);
if (err != MPG123_OK) {
error_message = "mpg123: " + std::string(mpg123_plain_strerror(err));
return false;
}
return true;
}
bool Mpg123Decoder::Seek(size_t offset, Origin origin) {
finished = false;
mpg123_seek_frame(handle.get(), offset, (int)origin);
return true;
}
bool Mpg123Decoder::IsFinished() const {
return finished;
}
static int format_to_mpg123_format(AudioDecoder::Format format) {
switch (format) {
case AudioDecoder::Format::U8:
return MPG123_ENC_UNSIGNED_8;
case AudioDecoder::Format::S8:
return MPG123_ENC_SIGNED_8;
case AudioDecoder::Format::U16:
return MPG123_ENC_UNSIGNED_16;
case AudioDecoder::Format::S16:
return MPG123_ENC_SIGNED_16;
case AudioDecoder::Format::U32:
return MPG123_ENC_UNSIGNED_32;
case AudioDecoder::Format::S32:
return MPG123_ENC_SIGNED_32;
case AudioDecoder::Format::F32:
return MPG123_ENC_FLOAT_32;
default:
assert(false);
}
return -1;
}
static AudioDecoder::Format mpg123_format_to_format(int format) {
switch (format) {
case MPG123_ENC_UNSIGNED_8:
return AudioDecoder::Format::U8;
case MPG123_ENC_SIGNED_8:
return AudioDecoder::Format::S8;
case MPG123_ENC_UNSIGNED_16:
return AudioDecoder::Format::U16;
case MPG123_ENC_SIGNED_16:
return AudioDecoder::Format::S16;
case MPG123_ENC_UNSIGNED_32:
return AudioDecoder::Format::U32;
case MPG123_ENC_SIGNED_32:
return AudioDecoder::Format::S32;
case MPG123_ENC_FLOAT_32:
return AudioDecoder::Format::F32;
default:
assert(false);
}
return (AudioDecoder::Format)-1;
}
void Mpg123Decoder::GetFormat(int& frequency, AudioDecoder::Format& format, int& channels) const {
long freq;
int ch;
int fmt;
mpg123_getformat(handle.get(), &freq, &ch, &fmt);
frequency = (int)freq;
channels = ch;
format = mpg123_format_to_format(fmt);
}
bool Mpg123Decoder::SetFormat(int freq, AudioDecoder::Format fmt, int channels) {
// mpg123 has a built-in pseudo-resampler, not needing SDL_ConvertAudio later
// Remove all available conversion formats
// Add just one format to force mpg123 pseudo-resampler work
mpg123_format_none(handle.get());
err = mpg123_format(handle.get(), (long)freq, (int)channels, (int)format_to_mpg123_format(fmt));
if (err != MPG123_OK) {
err = mpg123_format(handle.get(), (long)44100, (int)channels, (int)format_to_mpg123_format(fmt));
if (err != MPG123_OK) {
mpg123_format(handle.get(), (long)44100, (int)2, (int)MPG123_ENC_SIGNED_16);
}
return false;
}
return err == MPG123_OK;
}
bool Mpg123Decoder::IsMp3(FILE* stream) {
Mpg123Decoder decoder;
// Prevent stream handle destruction
mpg123_replace_reader_handle(decoder.handle.get(), custom_read, custom_seek, noop_close);
// Prevent skipping of too many garbage, breaks heuristic
mpg123_param(decoder.handle.get(), MPG123_RESYNC_LIMIT, 64, 0.0);
if (!decoder.Open(stream)) {
return false;
}
unsigned char buffer[1024];
int err = 0;
size_t done = 0;
int err_count = 0;
// Read beginning of assumed MP3 file and count errors as an heuristic to detect MP3
for (int i = 0; i < 10; ++i) {
err = mpg123_read(decoder.handle.get(), buffer, 1024, &done);
if (err != MPG123_OK) {
err_count += 1;
}
if (err_count >= 3) {
break;
}
}
return err_count < 3;
}
int Mpg123Decoder::FillBuffer(uint8_t* buffer, int length) {
int err;
size_t done = 0;
size_t decoded = 0;
// Skip invalid frames until getting a valid one
do {
err = mpg123_read(handle.get(), reinterpret_cast<unsigned char*>(buffer), length, &done);
decoded += done;
} while (done && err != MPG123_OK);
if (err == MPG123_DONE) {
finished = true;
}
return (int)decoded;
}
#endif
================================================
FILE: source/audiodec/decoder_mpg123.h
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EASYRPG_AUDIO_DECODER_MPG123_H
#define EASYRPG_AUDIO_DECODER_MPG123_H
// Headers
#include "audio_decoder.h"
#include <string>
#ifdef HAVE_MPG123
#include <mpg123.h>
#endif
#include <memory>
/**
* Audio decoder for MP3 powered by mpg123
*/
class Mpg123Decoder : public AudioDecoder {
public:
Mpg123Decoder();
~Mpg123Decoder();
bool WasInited() const override;
bool Open(FILE* file) override;
bool Seek(size_t offset, Origin origin) override;
bool IsFinished() const override;
void GetFormat(int& frequency, AudioDecoder::Format& format, int& channels) const override;
bool SetFormat(int frequency, AudioDecoder::Format format, int channels) override;
static bool IsMp3(FILE* stream);
private:
int FillBuffer(uint8_t* buffer, int length) override;
#ifdef HAVE_MPG123
std::unique_ptr<mpg123_handle, decltype(&mpg123_delete)> handle;
#endif
FILE* file_handle;
int err = 0;
bool finished = false;
int frequency = 44100;
};
#endif
================================================
FILE: source/audiodec/decoder_oggvorbis.cpp
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(HAVE_TREMOR) || defined(HAVE_OGGVORBIS)
// Headers
#include <cassert>
#ifdef HAVE_TREMOR
#include <tremor/ivorbiscodec.h>
#include <tremor/ivorbisfile.h>
#else
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
#endif
#include "audio_decoder.h"
#include "decoder_oggvorbis.h"
OggVorbisDecoder::OggVorbisDecoder() {
music_type = "ogg";
}
OggVorbisDecoder::~OggVorbisDecoder() {
if (ovf) {
ov_clear(ovf);
delete ovf;
}
}
bool OggVorbisDecoder::Open(FILE* file) {
finished = false;
if (ovf) {
ov_clear(ovf);
delete ovf;
}
ovf = new OggVorbis_File;
int res = ov_open(file, ovf, NULL, 0);
if (res < 0) {
error_message = "OggVorbis: Error reading file";
delete ovf;
fclose(file);
return false;
}
vorbis_info *vi = ov_info(ovf, -1);
if (!vi) {
error_message = "OggVorbis: Error getting file information";
ov_clear(ovf);
delete ovf;
return false;
}
// (long)ov_pcm_total(ovf, -1)) -> decoded length in samples, maybe useful for ticks later?
frequency = vi->rate;
channels = vi->channels;
return true;
}
bool OggVorbisDecoder::Seek(size_t offset, Origin origin) {
if (offset == 0 && origin == Origin::Begin) {
if (ovf) {
ov_raw_seek(ovf, 0);
}
finished = false;
return true;
}
return false;
}
bool OggVorbisDecoder::IsFinished() const {
if (!ovf)
return false;
return finished;
}
void OggVorbisDecoder::GetFormat(int& freq, AudioDecoder::Format& format, int& chans) const {
freq = frequency;
format = Format::S16;
chans = channels;
}
bool OggVorbisDecoder::SetFormat(int freq, AudioDecoder::Format format, int chans) {
if (freq != frequency || chans != channels || format != Format::S16)
return false;
return true;
}
bool OggVorbisDecoder::SetPitch(int pitch) {
if (pitch != 100) {
return false;
}
return true;
}
int OggVorbisDecoder::FillBuffer(uint8_t* buffer, int length) {
if (!ovf)
return -1;
static int section;
int read = 0;
int to_read = length;
do {
#ifdef HAVE_TREMOR
read = ov_read(ovf, reinterpret_cast<char*>(buffer + length - to_read), to_read, §ion);
#else
read = ov_read(ovf, reinterpret_cast<char*>(buffer + length - to_read), to_read, 0/*LE*/, 2/*16bit*/, 1/*signed*/, §ion);
#endif
// stop decoding when error or end of file
if (read <= 0)
break;
to_read -= read;
} while(to_read > 0);
// end of file
if (read == 0)
finished = true;
// error
if (read < 0)
return -1;
return length - to_read;
}
#endif
================================================
FILE: source/audiodec/decoder_oggvorbis.h
================================================
/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 3 of the License, or
* (at your option) any later version.
*
* EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EASYRPG_AUDIO_DECODER_OGGVORBIS_H
#define EASYRPG_AUDIO_DECODER_OGGVORBIS_H
// Headers
#include <string>
#include <memory>
#ifdef HAVE_TREMOR
#include <tremor/ivorbiscodec.h>
#include <tremor/ivorbisfile.h>
#elif HAVE_OGGVORBIS
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
#endif
#include "audio_decoder.h"
/**
* Audio decoder for Ogg Vorbis powered by libTremor/libOgg+libVorbis
*/
class OggVorbisDecoder : public AudioDecoder {
public:
OggVorbisDecoder();
~OggVorbisDecoder();
// Audio Decoder interface
bool Open(FILE* file) override;
bool Seek(size_t offset, Origin origin) override;
bool IsFinished() const override;
void GetFormat(int& frequency, AudioDecoder::Format& format, int& channels) const override;
bool SetFormat(int frequency, AudioDecoder::Format format, int channels) override;
bool SetPitch(int pitch) override;
private:
int FillBuffer(uint8_t* buffer, int length) override;
#if defined(HAVE_TREMOR) || defined(HAVE_OGGVORBIS)
OggVorbis_File *ovf = NULL;
#endif
bool finished = false;
int frequency = 44100;
int channels = 2;
};
#endif
================================================
FILE: source/block16.h
================================================
/*
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.
*/
LEnter16_16:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch0:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch1:
movw %cx,2(%edi)
addl $0x4,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch2:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch3:
movw %cx,2(%edi)
addl $0x4,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch4:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch5:
movw %cx,2(%edi)
addl $0x4,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch6:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch7:
movw %cx,2(%edi)
addl $0x4,%edi
LEnter8_16:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch8:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch9:
movw %cx,2(%edi)
addl $0x4,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch10:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch11:
movw %cx,2(%edi)
addl $0x4,%edi
LEnter4_16:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch12:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch13:
movw %cx,2(%edi)
addl $0x4,%edi
LEnter2_16:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movw 0x12345678(,%eax,2),%ax
LBPatch14:
addl %ebp,%edx
movw %ax,(%edi)
movw 0x12345678(,%ecx,2),%cx
LBPatch15:
movw %cx,2(%edi)
addl $0x4,%edi
================================================
FILE: source/block8.h
================================================
/*
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.
*/
LEnter16_8:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch0:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch1:
movb %cl,1(%edi)
addl $0x2,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch2:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch3:
movb %cl,1(%edi)
addl $0x2,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch4:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch5:
movb %cl,1(%edi)
addl $0x2,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch6:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch7:
movb %cl,1(%edi)
addl $0x2,%edi
LEnter8_8:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch8:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch9:
movb %cl,1(%edi)
addl $0x2,%edi
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch10:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch11:
movb %cl,1(%edi)
addl $0x2,%edi
LEnter4_8:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch12:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch13:
movb %cl,1(%edi)
addl $0x2,%edi
LEnter2_8:
movb (%esi),%al
movb (%esi,%ebx,),%cl
movb %dh,%ah
addl %ebp,%edx
movb %dh,%ch
leal (%esi,%ebx,2),%esi
movb 0x12345678(%eax),%al
LBPatch14:
addl %ebp,%edx
movb %al,(%edi)
movb 0x12345678(%ecx),%cl
LBPatch15:
movb %cl,1(%edi)
addl $0x2,%edi
================================================
FILE: source/bspfile.h
================================================
/*
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.
*/
// upper design bounds
#define MAX_MAP_HULLS 4
#define MAX_MAP_MODELS 256
#define MAX_MAP_BRUSHES 4096
#define MAX_MAP_ENTITIES 1024
#define MAX_MAP_ENTSTRING 65536
#define MAX_MAP_PLANES 32767
#define MAX_MAP_NODES 32767 // because negative shorts are contents
#define MAX_MAP_CLIPNODES 32767
#define MAX_MAP_LEAFS 65535
#define MAX_MAP_VERTS 65535
#define MAX_MAP_FACES 65535
#define MAX_MAP_MARKSURFACES 65535
#define MAX_MAP_TEXINFO 4096
#define MAX_MAP_EDGES 256000
#define MAX_MAP_SURFEDGES 512000
#define MAX_MAP_TEXTURES 512
#define MAX_MAP_MIPTEX 0x200000
#define MAX_MAP_LIGHTING 0x100000
#define MAX_MAP_VISIBILITY 0x100000
#define MAX_MAP_PORTALS 65536
// key / value pair sizes
#define MAX_KEY 32
#define MAX_VALUE 1024
//=============================================================================
#define Q1_BSPVERSION 29
#define HL_BSPVERSION 30
// RMQ support (2PSB). 32bits instead of shorts for all but bbox sizes (which still use shorts)
#define BSP2VERSION_2PSB (('B' << 24) | ('S' << 16) | ('P' << 8) | '2')
// BSP2 support. 32bits instead of shorts for everything (bboxes use floats)
#define BSP2VERSION_BSP2 (('B' << 0) | ('S' << 8) | ('P' << 16) | ('2'<<24))
#define TOOLVERSION 2
typedef struct
{
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
{
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
{
int version;
lump_t lumps[HEADER_LUMPS];
} dheader_t;
typedef struct
{
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
{
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
{
float normal[3];
float dist;
int type; // PLANE_X - PLANE_ANYZ ?remove? trivial to regenerate
} dplane_t;
#define CONTENTS_EMPTY -1
#define CONTENTS_SOLID -2
#define CONTENTS_WATER -3
#define CONTENTS_SLIME -4
#define CONTENTS_LAVA -5
#define CONTENTS_SKY -6
#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
// !!! if this is changed, it must be changed in asm_i386.h too !!!
typedef struct
{
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
} dsnode_t;
typedef struct
{
int planenum;
int children[2]; // negative numbers are -(leafs+1), not nodes
short mins[3]; // for sphere culling
short maxs[3];
unsigned int firstface;
unsigned int numfaces; // counting both sides
} dl1node_t;
typedef struct
{
int planenum;
int children[2]; // negative numbers are -(leafs+1), not nodes
float mins[3]; // for sphere culling
float maxs[3];
unsigned int firstface;
unsigned int numfaces; // counting both sides
} dl2node_t;
typedef struct
{
int planenum;
short children[2]; // negative numbers are contents
} dsclipnode_t;
typedef struct
{
int planenum;
int children[2]; // negative numbers are contents
} dlclipnode_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
{
unsigned short v[2]; // vertex numbers
} dsedge_t;
typedef struct
{
unsigned int v[2]; // vertex numbers
} dledge_t;
#define MAXLIGHTMAPS 4
typedef struct
{
short planenum;
short side;
int firstedge; // we must support > 64k edges
short numedges;
short texinfo;
// lighting info
byte styles[MAXLIGHTMAPS];
int lightofs; // start of [numstyles*surfsize] samples
} dsface_t;
typedef struct
{
int planenum;
int side;
int firstedge; // we must support > 64k edges
int numedges;
int texinfo;
// lighting info
byte styles[MAXLIGHTMAPS];
int lightofs; // start of [numstyles*surfsize] samples
} dlface_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
{
int contents;
int visofs; // -1 = no visibility info
short mins[3]; // for frustum culling
short maxs[3];
unsigned short firstmarksurface;
unsigned short nummarksurfaces;
byte ambient_level[NUM_AMBIENTS];
} dsleaf_t;
typedef struct
{
int contents;
int visofs; // -1 = no visibility info
short mins[3]; // for frustum culling
short maxs[3];
unsigned int firstmarksurface;
unsigned int nummarksurfaces;
byte ambient_level[NUM_AMBIENTS];
} dl1leaf_t;
typedef struct
{
int contents;
int visofs; // -1 = no visibility info
float mins[3]; // for frustum culling
float maxs[3];
unsigned int firstmarksurface;
unsigned int nummarksurfaces;
byte ambient_level[NUM_AMBIENTS];
} dl2leaf_t;
//============================================================================
#ifndef QUAKE_GAME
#define ANGLE_UP -1
#define ANGLE_DOWN -2
// the utilities get to be lazy and just use large static arrays
extern int nummodels;
extern dmodel_t dmodels[MAX_MAP_MODELS];
extern int visdatasize;
extern byte dvisdata[MAX_MAP_VISIBILITY];
extern int lightdatasize;
extern byte dlightdata[MAX_MAP_LIGHTING];
extern int texdatasize;
extern byte dtexdata[MAX_MAP_MIPTEX]; // (dmiptexlump_t)
extern int entdatasize;
extern char dentdata[MAX_MAP_ENTSTRING];
extern int numleafs;
extern dleaf_t dleafs[MAX_MAP_LEAFS];
extern int numplanes;
extern dplane_t dplanes[MAX_MAP_PLANES];
extern int numvertexes;
extern dvertex_t dvertexes[MAX_MAP_VERTS];
extern int numnodes;
extern dnode_t dnodes[MAX_MAP_NODES];
extern int numtexinfo;
extern texinfo_t texinfo[MAX_MAP_TEXINFO];
extern int numfaces;
extern dface_t dfaces[MAX_MAP_FACES];
extern int numclipnodes;
extern dclipnode_t dclipnodes[MAX_MAP_CLIPNODES];
extern int numedges;
extern dedge_t dedges[MAX_MAP_EDGES];
extern int nummarksurfaces;
extern unsigned short dmarksurfaces[MAX_MAP_MARKSURFACES];
extern int numsurfedges;
extern int dsurfedges[MAX_MAP_SURFEDGES];
void DecompressVis (byte *in, byte *decompressed);
int CompressVis (byte *vis, byte *dest);
void LoadBSPFile (char *filename);
void WriteBSPFile (char *filename);
void PrintBSPFileSizes (void);
//===============
typedef struct epair_s
{
struct epair_s *next;
char *key;
char *value;
} epair_t;
typedef struct
{
vec3_t origin;
int firstbrush;
int numbrushes;
epair_t *epairs;
} entity_t;
extern int num_entities;
extern entity_t entities[MAX_MAP_ENTITIES];
void ParseEntities (void);
void UnparseEntities (void);
void SetKeyValue (entity_t *ent, signed char *key, signed char *value);
signed char *ValueForKey (entity_t *ent, signed char *key);
// will return "" if not present
vec_t FloatForKey (entity_t *ent, signed char *key);
void GetVectorForKey (entity_t *ent, signed char *key, vec3_t vec);
epair_t *ParseEpair (void);
#endif
================================================
FILE: source/cdaudio.h
================================================
/*
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.
*/
int CDAudio_Init(void);
void CDAudio_Play(byte track, bool looping);
void CDAudio_Stop(void);
void CDAudio_Pause(void);
void CDAudio_Resume(void);
void CDAudio_Shutdown(void);
void CDAudio_Update(void);
================================================
FILE: source/chase.c
================================================
/*
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.
*/
// chase.c -- chase camera code
#include "quakedef.h"
CVAR(chase_active, 0, CVAR_NONE) // CVAR enabling thirdperson
CVAR(chase_back, 100, CVAR_NONE)
CVAR(chase_up, 16, CVAR_NONE)
CVAR(chase_right, 0, CVAR_NONE)
//----------------------------------------------
vec3_t chase_pos;
vec3_t chase_angles;
vec3_t chase_dest;
vec3_t chase_dest_angles;
void Chase_Init (void)
{
Cvar_RegisterVariable (&chase_back);
Cvar_RegisterVariable (&chase_up);
Cvar_RegisterVariable (&chase_right);
Cvar_RegisterVariable (&chase_active);
}
void Chase_Reset (void)
{
// for respawning and teleporting
// start position 12 units behind head
}
void TraceLine (vec3_t start, vec3_t end, vec3_t impact)
{
trace_t trace;
memset (&trace, 0, sizeof(trace));
SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
VectorCopy (trace.endpos, impact);
}
void Chase_Update (void)
{
int i;
float dist;
vec3_t forward, up, right;
vec3_t dest, stop;
// if can't see player, reset
AngleVectors (cl.viewangles, forward, right, up);
// calc exact destination
for (i=0 ; i<3 ; i++)
chase_dest[i] = r_refdef.vieworg[i]
- forward[i]*chase_back.value
- right[i]*chase_right.value;
chase_dest[2] = r_refdef.vieworg[2] + chase_up.value;
// find the spot the player is looking at
VectorMA (r_refdef.vieworg, 4096, forward, dest);
TraceLine (r_refdef.vieworg, dest, stop);
// calculate pitch to look at the same spot from camera
VectorSubtract (stop, r_refdef.vieworg, stop);
dist = DotProduct (stop, forward);
if (dist < 1)
dist = 1;
r_refdef.viewangles[PITCH] = -atan(stop[2] / dist) / M_PI * 180;
// move towards destination
VectorCopy (chase_dest, r_refdef.vieworg);
}
================================================
FILE: source/cl_demo.c
================================================
/*
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"
bool benchmark;
void CL_FinishTimeDemo (void);
/*
==============================================================================
DEMO CODE
When a demo is playing back, all NET_SendMessages are skipped, and
NET_GetMessages are read from the demo file.
Whenever cl.time gets past the last received message, another message is
read from the demo file.
==============================================================================
*/
/*
==============
CL_StopPlayback
Called when a demo file runs out, or the user starts a game
==============
*/
void CL_StopPlayback (void)
{
if (!cls.demoplayback)
return;
fclose (cls.demofile);
cls.demoplayback = false;
cls.demofile = NULL;
cls.state = ca_disconnected;
if (cls.timedemo || benchmark)
CL_FinishTimeDemo ();
}
/*
====================
CL_WriteDemoMessage
Dumps the current net message, prefixed by the length and view angles
====================
*/
void CL_WriteDemoMessage (void)
{
int len;
int i;
float f;
len = LittleLong (net_message.cursize);
fwrite (&len, 4, 1, cls.demofile);
for (i=0 ; i<3 ; i++)
{
f = LittleFloat (cl.viewangles[i]);
fwrite (&f, 4, 1, cls.demofile);
}
fwrite (net_message.data, net_message.cursize, 1, cls.demofile);
fflush (cls.demofile);
}
/*
====================
CL_GetMessage
Handles recording and playback of demos, on top of NET_ code
====================
*/
bool bBenchmarkStarted;
int CL_GetMessage (void)
{
int r, i;
float f;
if (cls.demoplayback)
{
// decide if it is time to grab the next message
if (cls.signon == SIGNONS) // always grab until fully connected
{
if (cls.timedemo && !benchmark)
{
if (host_framecount == cls.td_lastframe)
return 0; // already read this frame's message
cls.td_lastframe = host_framecount;
// if this is the second frame, grab the real td_starttime
// so the bogus time on the first frame doesn't count
if (host_framecount == cls.td_startframe + 1 && !benchmark){
cls.td_starttime = realtime;
}
else if (host_framecount == cls.td_startframe + 30 && key_dest == key_benchmark) { bBenchmarkStarted = true; benchmark = true; }// Ignore first sec for the benchmark
}
else if ( /* cl.time > 0 && */ cl.time <= cl.mtime[0])
{
return 0; // don't need another message yet
}
}
// get the next message
fread (&net_message.cursize, 4, 1, cls.demofile);
VectorCopy (cl.mviewangles[0], cl.mviewangles[1]);
for (i=0 ; i<3 ; i++)
{
r = fread (&f, 4, 1, cls.demofile);
cl.mviewangles[0][i] = LittleFloat (f);
}
net_message.cursize = LittleLong (net_message.cursize);
if (net_message.cursize > MAX_MSGLEN)
Sys_Error ("Demo message > MAX_MSGLEN");
r = fread (net_message.data, net_message.cursize, 1, cls.demofile);
if (r != 1)
{
CL_StopPlayback ();
return 0;
}
return 1;
}
while (1)
{
r = NET_GetMessage (cls.netcon);
if (r != 1 && r != 2)
return r;
// discard nop keepalive message
if (net_message.cursize == 1 && net_message.data[0] == svc_nop)
Con_Printf ("<-- server to client keepalive\n");
else
break;
}
if (cls.demorecording)
CL_WriteDemoMessage ();
return r;
}
/*
====================
CL_Stop_f
stop recording a demo
====================
*/
void CL_Stop_f (void)
{
if (cmd_source != src_command)
return;
if (!cls.demorecording)
{
Con_Printf ("Not recording a demo.\n");
return;
}
// write a disconnect message to the demo file
SZ_Clear (&net_message);
MSG_WriteByte (&net_message, svc_disconnect);
CL_WriteDemoMessage ();
// finish up
fclose (cls.demofile);
cls.demofile = NULL;
cls.demorecording = false;
Con_Printf ("Completed demo\n");
}
/*
====================
CL_Record_f
record <demoname> <map> [cd track]
====================
*/
void CL_Record_f (void)
{
int c;
char name[MAX_OSPATH];
int track;
if (cmd_source != src_command)
return;
c = Cmd_Argc();
if (c != 2 && c != 3 && c != 4)
{
Con_Printf ("record <demoname> [<map> [cd track]]\n");
return;
}
if (strstr(Cmd_Argv(1), ".."))
{
Con_Printf ("Relative pathnames are not allowed.\n");
return;
}
if (c == 2 && cls.state == ca_connected)
{
Con_Printf("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
return;
}
// 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;
sprintf (name, "%s/%s", com_gamedir, Cmd_Argv(1));
//
// start the map up
//
if (c > 2)
Cmd_ExecuteString ( va("map %s", Cmd_Argv(2)), src_command);
//
// open the demo file
//
COM_DefaultExtension (name, ".dem");
Con_Printf ("recording to %s.\n", name);
cls.demofile = fopen (name, "wb");
if (!cls.demofile)
{
Con_Printf ("ERROR: couldn't open.\n");
return;
}
cls.forcetrack = track;
fprintf (cls.demofile, "%i\n", cls.forcetrack);
cls.demorecording = true;
}
/*
====================
CL_PlayDemo_f
play [demoname]
====================
*/
void CL_PlayDemo_f (void)
{
char name[256];
int c;
bool neg = false;
if (cmd_source != src_command)
return;
if (Cmd_Argc() != 2)
{
Con_Printf ("play <demoname> : plays a demo\n");
return;
}
//
// disconnect from server
//
CL_Disconnect ();
//
// open the demo file
//
strcpy (name, Cmd_Argv(1));
COM_DefaultExtension (name, ".dem");
Con_Printf ("Playing demo from %s.\n", name);
COM_FOpenFile (name, &cls.demofile, NULL);
if (!cls.demofile)
{
Con_Printf ("ERROR: couldn't open.\n");
cls.demonum = -1; // stop demo loop
return;
}
cls.demoplayback = true;
cls.state = ca_connected;
cls.forcetrack = 0;
while ((c = getc(cls.demofile)) != '\n')
if (c == '-')
neg = true;
else
cls.forcetrack = cls.forcetrack * 10 + (c - '0');
if (neg)
cls.forcetrack = -cls.forcetrack;
// ZOID, fscanf is evil
// fscanf (cls.demofile, "%i\n", &cls.forcetrack);
}
/*
====================
CL_FinishTimeDemo
====================
*/
extern int average_fps;
void CL_FinishTimeDemo (void)
{
int frames;
float time;
cls.timedemo = false;
// the first frame didn't count
frames = (host_framecount - cls.td_startframe) - 1;
time = realtime - cls.td_starttime;
if (!time)
time = 1;
if (benchmark){
average_fps = frames/time;
key_dest = key_menu;
m_state = m_benchmark;
benchmark = false;
}else Con_Printf ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
}
/*
====================
CL_TimeDemo_f
timedemo [demoname]
====================
*/
void CL_TimeDemo_f (void)
{
if (cmd_source != src_command)
return;
if (Cmd_Argc() != 2)
{
Con_Printf ("timedemo <demoname> : gets demo speeds\n");
return;
}
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
cls.timedemo = true;
cls.td_startframe = host_framecount;
cls.td_lastframe = -1; // get a new message this frame
}
/*
====================
CL_Benchmark_f
benchmark [demoname]
====================
*/
extern int max_fps;
extern int min_fps;
void CL_Benchmark_f (void)
{
if (cmd_source != src_command)
return;
if (Cmd_Argc() != 2)
{
Con_Printf ("benchmark <demoname> : starts a demo benchmark\n");
return;
}
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
// resetting fps counters
max_fps = 0;
min_fps = 999;
//benchmark = true;
cls.timedemo = true;
cls.td_startframe = host_framecount;
cls.td_lastframe = -1; // get a new message this frame
}
================================================
FILE: source/cl_input.c
================================================
/*
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.
*/
// cl.input.c -- builds an intended movement command to send to the server
// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
// rights reserved.
#include "quakedef.h"
/*
===============================================================================
KEY BUTTONS
Continuous button event tracking is complicated by the fact that two different
input sources (say, mouse button 1 and the control key) can both press the
same button, but the button should only be released when both of the
pressing key have been released.
When a key event issues a button command (+forward, +attack, etc), it appends
its key number as a parameter to the command so it can be matched up with
the release.
state bit 0 is the current state of the key
state bit 1 is edge triggered on the up to down transition
state bit 2 is edge triggered on the down to up transition
===============================================================================
*/
CVAR(cl_upspeed, 200, CVAR_NONE)
CVAR(cl_forwardspeed, 200, CVAR_ARCHIVE)
CVAR(cl_backspeed, 200, CVAR_ARCHIVE)
CVAR(cl_sidespeed, 350, CVAR_NONE)
CVAR(cl_movespeedkey, 2.0, CVAR_NONE)
CVAR(cl_yawspeed, 140, CVAR_NONE)
CVAR(cl_pitchspeed, 150, CVAR_NONE)
CVAR(cl_anglespeedkey, 1.5, CVAR_NONE)
CVAR(cl_fullpitch, 0, CVAR_NONE) // ProQuake - get rid of the "unknown command" messages
//----------------------------------------------
kbutton_t in_mlook, in_klook;
kbutton_t in_left, in_right, in_forward, in_back;
kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright;
kbutton_t in_strafe, in_speed, in_use, in_jump, in_attack;
kbutton_t in_up, in_down;
int in_impulse;
void KeyDown (kbutton_t *b)
{
int k;
char *c;
c = Cmd_Argv(1);
if (c[0])
k = atoi(c);
else
k = -1; // typed manually at the console for continuous down
if (k == b->down[0] || k == b->down[1])
return; // repeating key
if (!b->down[0])
b->down[0] = k;
else if (!b->down[1])
b->down[1] = k;
else
{
Con_Printf ("Three keys down for a button!\n");
return;
}
if (b->state & 1)
return; // still down
b->state |= 1 + 2; // down + impulse down
}
void KeyUp (kbutton_t *b)
{
int k;
char *c;
c = Cmd_Argv(1);
if (c[0])
k = atoi(c);
else
{ // typed manually at the console, assume for unsticking, so clear all
b->down[0] = b->down[1] = 0;
b->state = 4; // impulse up
return;
}
if (b->down[0] == k)
b->down[0] = 0;
else if (b->down[1] == k)
b->down[1] = 0;
else
return; // key up without coresponding down (menu pass through)
if (b->down[0] || b->down[1])
return; // some other key is still holding it down
if (!(b->state & 1))
return; // still up (this should not happen)
b->state &= ~1; // now up
b->state |= 4; // impulse up
}
void IN_KLookDown (void) {KeyDown(&in_klook);}
void IN_KLookUp (void) {KeyUp(&in_klook);}
void IN_MLookDown (void) {KeyDown(&in_mlook);}
void IN_MLookUp (void) {
KeyUp(&in_mlook);
if ( !(in_mlook.state&1) && lookspring.value)
V_StartPitchDrift();
}
void IN_UpDown(void) {KeyDown(&in_up);}
void IN_UpUp(void) {KeyUp(&in_up);}
void IN_DownDown(void) {KeyDown(&in_down);}
void IN_DownUp(void) {KeyUp(&in_down);}
void IN_LeftDown(void) {KeyDown(&in_left);}
void IN_LeftUp(void) {KeyUp(&in_left);}
void IN_RightDown(void) {KeyDown(&in_right);}
void IN_RightUp(void) {KeyUp(&in_right);}
void IN_ForwardDown(void) {KeyDown(&in_forward);}
void IN_ForwardUp(void) {KeyUp(&in_forward);}
void IN_BackDown(void) {KeyDown(&in_back);}
void IN_BackUp(void) {KeyUp(&in_back);}
void IN_LookupDown(void) {KeyDown(&in_lookup);}
void IN_LookupUp(void) {KeyUp(&in_lookup);}
void IN_LookdownDown(void) {KeyDown(&in_lookdown);}
void IN_LookdownUp(void) {KeyUp(&in_lookdown);}
void IN_MoveleftDown(void) {KeyDown(&in_moveleft);}
void IN_MoveleftUp(void) {KeyUp(&in_moveleft);}
void IN_MoverightDown(void) {KeyDown(&in_moveright);}
void IN_MoverightUp(void) {KeyUp(&in_moveright);}
void IN_SpeedDown(void) {KeyDown(&in_speed);}
void IN_SpeedUp(void) {KeyUp(&in_speed);}
void IN_StrafeDown(void) {KeyDown(&in_strafe);}
void IN_StrafeUp(void) {KeyUp(&in_strafe);}
void IN_AttackDown(void) {KeyDown(&in_attack);}
void IN_AttackUp(void) {KeyUp(&in_attack);}
void IN_UseDown (void) {KeyDown(&in_use);}
void IN_UseUp (void) {KeyUp(&in_use);}
void IN_JumpDown (void) {KeyDown(&in_jump);}
void IN_JumpUp (void) {KeyUp(&in_jump);}
void IN_Impulse (void) {in_impulse=atoi(Cmd_Argv(1));}
/*
===============
CL_KeyState
Returns 0.25 if a key was pressed and released during the frame,
0.5 if it was pressed and held
0 if held then released, and
1.0 if held for the entire time
===============
*/
float CL_KeyState (kbutton_t *key)
{
float val;
bool impulsedown, impulseup, down;
impulsedown = key->state & 2;
impulseup = key->state & 4;
down = key->state & 1;
val = 0;
if (impulsedown && !impulseup)
if (down)
val = 0.5; // pressed and held this frame
else
val = 0; // I_Error ();
if (impulseup && !impulsedown)
if (down)
val = 0; // I_Error ();
else
val = 0; // released this frame
if (!impulsedown && !impulseup)
if (down)
val = 1.0; // held the entire frame
else
val = 0; // up the entire frame
if (impulsedown && impulseup)
if (down)
val = 0.75; // released and re-pressed this frame
else
val = 0.25; // pressed and released this frame
key->state &= 1; // clear impulses
return val;
}
//==========================================================================
/*
================
CL_AdjustAngles
Moves the local angle positions
================
*/
void CL_AdjustAngles (void)
{
float speed;
float up, down;
if (in_speed.state & 1)
speed = host_frametime * cl_anglespeedkey.value;
else
speed = host_frametime;
if (gl_xflip.value) cl.viewangles[YAW] *= -1;
if (!(in_strafe.state & 1))
{
cl.viewangles[YAW] -= speed*cl_yawspeed.value*CL_KeyState (&in_right);
cl.viewangles[YAW] += speed*cl_yawspeed.value*CL_KeyState (&in_left);
cl.viewangles[YAW] = anglemod(cl.viewangles[YAW]);
}
if (gl_xflip.value) cl.viewangles[YAW] *= -1;
if (in_klook.state & 1)
{
V_StopPitchDrift ();
cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * CL_KeyState (&in_forward);
cl.viewangles[PITCH] += speed*cl_pitchspeed.value * CL_KeyState (&in_back);
}
up = CL_KeyState (&in_lookup);
down = CL_KeyState(&in_lookdown);
cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * up;
cl.viewangles[PITCH] += speed*cl_pitchspeed.value * down;
if (up || down)
V_StopPitchDrift ();
// ProQuake aiming compatibility
if (pq_fullpitch.value)
cl.viewangles[PITCH] = COM_Clamp(cl.viewangles[PITCH], -90, 90);
else
cl.viewangles[PITCH] = COM_Clamp(cl.viewangles[PITCH], -70, 80);
cl.viewangles[ROLL] = COM_Clamp(cl.viewangles[ROLL], -50, 50);
}
/*
================
CL_BaseMove
Send the intended movement message to the server
================
*/
void CL_BaseMove (usercmd_t *cmd)
{
if (cls.signon != SIGNONS)
return;
CL_AdjustAngles ();
memset (cmd, 0, sizeof(*cmd));
if (in_strafe.state & 1)
{
cmd->sidemove += cl_sidespeed.value * CL_KeyState (&in_right);
cmd->sidemove -= cl_sidespeed.value * CL_KeyState (&in_left);
}
cmd->sidemove += cl_sidespeed.value * CL_KeyState (&in_moveright);
cmd->sidemove -= cl_sidespeed.value * CL_KeyState (&in_moveleft);
if(gl_xflip.value) cmd->sidemove *= -1;
cmd->upmove += cl_upspeed.value * CL_KeyState (&in_up);
cmd->upmove -= cl_upspeed.value * CL_KeyState (&in_down);
if (! (in_klook.state & 1) )
{
cmd->forwardmove += cl_forwardspeed.value * CL_KeyState (&in_forward);
cmd->forwardmove -= cl_backspeed.value * CL_KeyState (&in_back);
}
//
// adjust for speed key
//
if (in_speed.state & 1)
{
cmd->forwardmove *= cl_movespeedkey.value;
cmd->sidemove *= cl_movespeedkey.value;
cmd->upmove *= cl_movespeedkey.value;
}
#ifdef QUAKE2
cmd->lightlevel = cl.light_level;
#endif
}
/*
==============
CL_SendMove
==============
*/
void CL_SendMove(usercmd_t *cmd)
{
int i;
int bits;
sizebuf_t buf;
byte data[128];
buf.maxsize = 128;
buf.cursize = 0;
buf.data = data;
cl.cmd = *cmd;
//
// send the movement message
//
MSG_WriteByte(&buf, clc_move);
MSG_WriteFloat(&buf, cl.mtime[0]); // so server can get ping times
if (!cls.demoplayback && (cls.netcon->proquake_connection == MOD_PROQUAKE)) {
for (i = 0; i < 3; i++)
MSG_WritePreciseAngle(&buf, cl.viewangles[i]);
}
else
{
for (i = 0; i < 3; i++)
MSG_WriteAngle(&buf, cl.viewangles[i]);
}
MSG_WriteShort (&buf, cmd->forwardmove);
MSG_WriteShort (&buf, cmd->sidemove);
MSG_WriteShort (&buf, cmd->upmove);
//
// send button bits
//
bits = 0;
if ( in_attack.state & 3 )
bits |= 1;
in_attack.state &= ~2;
if (in_jump.state & 3)
bits |= 2;
in_jump.state &= ~2;
MSG_WriteByte (&buf, bits);
MSG_WriteByte (&buf, in_impulse);
in_impulse = 0;
#ifdef QUAKE2
//
// light level
//
MSG_WriteByte (&buf, cmd->lightlevel);
#endif
//
// deliver the message
//
if (cls.demoplayback)
return;
//
// always dump the first two message, because it may contain leftover inputs
// from the last level
//
if (++cl.movemessages <= 2)
return;
if (NET_SendUnreliableMessage (cls.netcon, &buf) == -1)
{
Con_Printf ("CL_SendMove: lost server connection\n");
CL_Disconnect ();
}
}
/*
============
CL_InitInput
============
*/
void CL_InitInput (void)
{
Cmd_AddCommand ("+moveup",IN_UpDown);
Cmd_AddCommand ("-moveup",IN_UpUp);
Cmd_AddCommand ("+movedown",IN_DownDown);
Cmd_AddCommand ("-
gitextract_5ojh867z/
├── .gitattributes
├── .github/
│ └── FUNDING.yml
├── .gitignore
├── LICENSE.txt
├── Makefile
├── README.md
├── build/
│ ├── sce_sys/
│ │ └── livearea/
│ │ └── contents/
│ │ └── template.xml
│ └── shaders/
│ ├── modulate_alpha_f.gxp
│ ├── modulate_alpha_fog_f.gxp
│ ├── modulate_f.gxp
│ ├── modulate_fog_f.gxp
│ ├── modulate_rgba_alpha_f.gxp
│ ├── modulate_rgba_alpha_fog_f.gxp
│ ├── modulate_rgba_f.gxp
│ ├── modulate_rgba_fog_f.gxp
│ ├── replace_alpha_f.gxp
│ ├── replace_alpha_fog_f.gxp
│ ├── replace_f.gxp
│ ├── replace_fog_f.gxp
│ ├── rgba_alpha_f.gxp
│ ├── rgba_f.gxp
│ ├── rgba_v.gxp
│ ├── texture2d_fog_v.gxp
│ ├── texture2d_rgba_fog_v.gxp
│ ├── texture2d_rgba_v.gxp
│ ├── texture2d_v.gxp
│ ├── vertex_f.gxp
│ └── vertex_v.gxp
├── shaders/
│ ├── modulate_alpha_f.cg
│ ├── modulate_alpha_fog_f.cg
│ ├── modulate_f.cg
│ ├── modulate_fog_f.cg
│ ├── modulate_rgba_alpha_f.cg
│ ├── modulate_rgba_alpha_fog_f.cg
│ ├── modulate_rgba_f.cg
│ ├── modulate_rgba_fog_f.cg
│ ├── replace_alpha_f.cg
│ ├── replace_alpha_fog_f.cg
│ ├── replace_f.cg
│ ├── replace_fog_f.cg
│ ├── rgba_alpha_f.cg
│ ├── rgba_f.cg
│ ├── rgba_v.cg
│ ├── texture2d_fog_v.cg
│ ├── texture2d_rgba_fog_v.cg
│ ├── texture2d_rgba_v.cg
│ ├── texture2d_v.cg
│ ├── vertex_f.cg
│ └── vertex_v.cg
└── source/
├── adivtab.h
├── anorm_dots.h
├── anorms.h
├── asm_draw.h
├── asm_i386.h
├── audiodec/
│ ├── audio_decoder.cpp
│ ├── audio_decoder.h
│ ├── audio_resampler.cpp
│ ├── audio_resampler.h
│ ├── cd_psp2.cpp
│ ├── decoder_mpg123.cpp
│ ├── decoder_mpg123.h
│ ├── decoder_oggvorbis.cpp
│ └── decoder_oggvorbis.h
├── block16.h
├── block8.h
├── bspfile.h
├── cdaudio.h
├── chase.c
├── cl_demo.c
├── cl_input.c
├── cl_main.c
├── cl_parse.c
├── cl_tent.c
├── client.h
├── cmd.c
├── cmd.h
├── common.c
├── common.h
├── console.c
├── console.h
├── crc.c
├── crc.h
├── cvar.c
├── cvar.h
├── draw.h
├── gl_draw.cpp
├── gl_fullbright.c
├── gl_fullbright.h
├── gl_mesh.c
├── gl_model.c
├── gl_model.h
├── gl_refrag.c
├── gl_rlight.c
├── gl_rmain.c
├── gl_rmisc.c
├── gl_rsurf.c
├── gl_screen.c
├── gl_vidpsp2.c
├── gl_warp.c
├── gl_warp_sin.h
├── glquake.h
├── glquake2.h
├── host.c
├── host_cmd.c
├── image.c
├── image.h
├── in_psp2.c
├── input.h
├── keys.c
├── keys.h
├── mathlib.c
├── mathlib.h
├── menu.c
├── menu.h
├── model.h
├── modelgen.h
├── mpdosock.h
├── neon_mathfun.c
├── neon_mathfun.h
├── net.h
├── net_adhoc.h
├── net_adhoc_psp2.c
├── net_dgrm.c
├── net_dgrm.h
├── net_loop.c
├── net_loop.h
├── net_main.c
├── net_none.c
├── net_psp2.c
├── net_udp.h
├── net_udp_psp2.c
├── net_vcr.c
├── net_vcr.h
├── nonintel.c
├── pr_cmds.c
├── pr_comp.h
├── pr_edict.c
├── pr_exec.c
├── progdefs.h
├── progdefs.q1
├── progdefs.q2
├── progs.h
├── protocol.h
├── quakeasm.h
├── quakedef.h
├── r_local.h
├── r_part.c
├── r_shared.h
├── render.h
├── sbar.c
├── sbar.h
├── screen.h
├── server.h
├── snd_dma.c
├── snd_mem.c
├── snd_mix.c
├── snd_psp2.c
├── sound.h
├── spritegn.h
├── sv_main.c
├── sv_move.c
├── sv_phys.c
├── sv_user.c
├── sys.h
├── sys_psp2.c
├── vid.h
├── view.c
├── view.h
├── wad.c
├── wad.h
├── webdownload.c
├── webdownload.h
├── world.c
├── world.h
├── zone.c
└── zone.h
SYMBOL INDEX (1515 symbols across 95 files)
FILE: source/audiodec/audio_decoder.cpp
class WMAUnsupportedFormatDecoder (line 98) | class WMAUnsupportedFormatDecoder : public AudioDecoder {
method WMAUnsupportedFormatDecoder (line 100) | WMAUnsupportedFormatDecoder() {
method Open (line 104) | bool Open(FILE*) override { return false; }
method IsFinished (line 105) | bool IsFinished() const override { return true; }
method GetFormat (line 106) | void GetFormat(int&, Format&, int&) const override {}
method FillBuffer (line 108) | int FillBuffer(uint8_t*, int) override { return -1; }
FILE: source/audiodec/audio_decoder.h
type class (line 38) | enum class
type class (line 49) | enum class
FILE: source/audiodec/audio_resampler.cpp
function DecodeAndConvertFloat (line 39) | inline static int DecodeAndConvertFloat(AudioDecoder * wrapped_decoder,
function DecodeAndConvertInt16 (line 111) | inline static int DecodeAndConvertInt16(AudioDecoder * wrapped_decoder,
FILE: source/audiodec/audio_resampler.h
function class (line 36) | class AudioResampler : public AudioDecoder {
FILE: source/audiodec/cd_psp2.cpp
type DecodedMusic (line 39) | struct DecodedMusic{
function bgmThread (line 59) | static int bgmThread(unsigned int args, void* arg){
function CDAudio_Play (line 169) | void CDAudio_Play(byte track, bool looping)
function CDAudio_Stop (line 200) | void CDAudio_Stop(void)
function CDAudio_Pause (line 210) | void CDAudio_Pause(void)
function CDAudio_Resume (line 216) | void CDAudio_Resume(void)
function CDAudio_Update (line 222) | void CDAudio_Update(void)
function CDAudio_Init (line 230) | int CDAudio_Init(void)
function CDAudio_Shutdown (line 246) | void CDAudio_Shutdown(void)
FILE: source/audiodec/decoder_mpg123.cpp
function Mpg123Decoder_deinit (line 25) | static void Mpg123Decoder_deinit(void) {
function custom_read (line 29) | static ssize_t custom_read(void* io, void* buffer, size_t nbyte) {
function off_t (line 34) | static off_t custom_seek(void* io, off_t offset, int seek_type) {
function custom_close (line 40) | static void custom_close(void* io) {
function noop_close (line 45) | static void noop_close(void*) {}
function format_to_mpg123_format (line 108) | static int format_to_mpg123_format(AudioDecoder::Format format) {
function mpg123_format_to_format (line 131) | static AudioDecoder::Format mpg123_format_to_format(int format) {
FILE: source/audiodec/decoder_mpg123.h
function class (line 32) | class Mpg123Decoder : public AudioDecoder {
FILE: source/audiodec/decoder_oggvorbis.h
function class (line 36) | class OggVorbisDecoder : public AudioDecoder {
FILE: source/bspfile.h
type lump_t (line 67) | typedef struct
type dmodel_t (line 90) | typedef struct
type dheader_t (line 99) | typedef struct
type dmiptexlump_t (line 105) | typedef struct
type miptex_t (line 112) | typedef struct miptex_s
type dvertex_t (line 120) | typedef struct
type dplane_t (line 136) | typedef struct
type dsnode_t (line 163) | typedef struct
type dl1node_t (line 173) | typedef struct
type dl2node_t (line 183) | typedef struct
type dsclipnode_t (line 193) | typedef struct
type dlclipnode_t (line 199) | typedef struct
type texinfo_t (line 205) | typedef struct texinfo_s
type dsedge_t (line 215) | typedef struct
type dledge_t (line 220) | typedef struct
type dsface_t (line 226) | typedef struct
type dlface_t (line 240) | typedef struct
type dsleaf_t (line 264) | typedef struct
type dl1leaf_t (line 278) | typedef struct
type dl2leaf_t (line 292) | typedef struct
type epair_t (line 372) | typedef struct epair_s
type entity_t (line 379) | typedef struct
FILE: source/chase.c
function Chase_Init (line 37) | void Chase_Init (void)
function Chase_Reset (line 45) | void Chase_Reset (void)
function TraceLine (line 51) | void TraceLine (vec3_t start, vec3_t end, vec3_t impact)
function Chase_Update (line 61) | void Chase_Update (void)
FILE: source/cl_demo.c
function CL_StopPlayback (line 47) | void CL_StopPlayback (void)
function CL_WriteDemoMessage (line 68) | void CL_WriteDemoMessage (void)
function CL_GetMessage (line 94) | int CL_GetMessage (void)
function CL_Stop_f (line 172) | void CL_Stop_f (void)
function CL_Record_f (line 202) | void CL_Record_f (void)
function CL_PlayDemo_f (line 274) | void CL_PlayDemo_f (void)
function CL_FinishTimeDemo (line 332) | void CL_FinishTimeDemo (void)
function CL_TimeDemo_f (line 359) | void CL_TimeDemo_f (void)
function CL_Benchmark_f (line 389) | void CL_Benchmark_f (void)
FILE: source/cl_input.c
function KeyDown (line 71) | void KeyDown (kbutton_t *b)
function KeyUp (line 100) | void KeyUp (kbutton_t *b)
function IN_KLookDown (line 130) | void IN_KLookDown (void) {KeyDown(&in_klook);}
function IN_KLookUp (line 131) | void IN_KLookUp (void) {KeyUp(&in_klook);}
function IN_MLookDown (line 132) | void IN_MLookDown (void) {KeyDown(&in_mlook);}
function IN_MLookUp (line 133) | void IN_MLookUp (void) {
function IN_UpDown (line 138) | void IN_UpDown(void) {KeyDown(&in_up);}
function IN_UpUp (line 139) | void IN_UpUp(void) {KeyUp(&in_up);}
function IN_DownDown (line 140) | void IN_DownDown(void) {KeyDown(&in_down);}
function IN_DownUp (line 141) | void IN_DownUp(void) {KeyUp(&in_down);}
function IN_LeftDown (line 142) | void IN_LeftDown(void) {KeyDown(&in_left);}
function IN_LeftUp (line 143) | void IN_LeftUp(void) {KeyUp(&in_left);}
function IN_RightDown (line 144) | void IN_RightDown(void) {KeyDown(&in_right);}
function IN_RightUp (line 145) | void IN_RightUp(void) {KeyUp(&in_right);}
function IN_ForwardDown (line 146) | void IN_ForwardDown(void) {KeyDown(&in_forward);}
function IN_ForwardUp (line 147) | void IN_ForwardUp(void) {KeyUp(&in_forward);}
function IN_BackDown (line 148) | void IN_BackDown(void) {KeyDown(&in_back);}
function IN_BackUp (line 149) | void IN_BackUp(void) {KeyUp(&in_back);}
function IN_LookupDown (line 150) | void IN_LookupDown(void) {KeyDown(&in_lookup);}
function IN_LookupUp (line 151) | void IN_LookupUp(void) {KeyUp(&in_lookup);}
function IN_LookdownDown (line 152) | void IN_LookdownDown(void) {KeyDown(&in_lookdown);}
function IN_LookdownUp (line 153) | void IN_LookdownUp(void) {KeyUp(&in_lookdown);}
function IN_MoveleftDown (line 154) | void IN_MoveleftDown(void) {KeyDown(&in_moveleft);}
function IN_MoveleftUp (line 155) | void IN_MoveleftUp(void) {KeyUp(&in_moveleft);}
function IN_MoverightDown (line 156) | void IN_MoverightDown(void) {KeyDown(&in_moveright);}
function IN_MoverightUp (line 157) | void IN_MoverightUp(void) {KeyUp(&in_moveright);}
function IN_SpeedDown (line 159) | void IN_SpeedDown(void) {KeyDown(&in_speed);}
function IN_SpeedUp (line 160) | void IN_SpeedUp(void) {KeyUp(&in_speed);}
function IN_StrafeDown (line 161) | void IN_StrafeDown(void) {KeyDown(&in_strafe);}
function IN_StrafeUp (line 162) | void IN_StrafeUp(void) {KeyUp(&in_strafe);}
function IN_AttackDown (line 164) | void IN_AttackDown(void) {KeyDown(&in_attack);}
function IN_AttackUp (line 165) | void IN_AttackUp(void) {KeyUp(&in_attack);}
function IN_UseDown (line 167) | void IN_UseDown (void) {KeyDown(&in_use);}
function IN_UseUp (line 168) | void IN_UseUp (void) {KeyUp(&in_use);}
function IN_JumpDown (line 169) | void IN_JumpDown (void) {KeyDown(&in_jump);}
function IN_JumpUp (line 170) | void IN_JumpUp (void) {KeyUp(&in_jump);}
function IN_Impulse (line 172) | void IN_Impulse (void) {in_impulse=atoi(Cmd_Argv(1));}
function CL_KeyState (line 184) | float CL_KeyState (kbutton_t *key)
function CL_AdjustAngles (line 232) | void CL_AdjustAngles (void)
function CL_BaseMove (line 285) | void CL_BaseMove (usercmd_t *cmd)
function CL_SendMove (line 336) | void CL_SendMove(usercmd_t *cmd)
function CL_InitInput (line 419) | void CL_InitInput (void)
FILE: source/cl_main.c
function CL_ClearState (line 72) | void CL_ClearState (void)
function CL_Disconnect (line 109) | void CL_Disconnect (void)
function CL_Disconnect_f (line 148) | void CL_Disconnect_f (void)
function CL_EstablishConnection (line 165) | void CL_EstablishConnection (char *host)
function CL_SignonReply (line 202) | void CL_SignonReply (void)
function CL_NextDemo (line 247) | void CL_NextDemo (void)
function CL_PrintEntities_f (line 277) | void CL_PrintEntities_f (void)
function SetPal (line 303) | void SetPal (int i)
function dlight_t (line 314) | dlight_t *CL_AllocDlight (int key)
function CL_DecayLights (line 362) | void CL_DecayLights (void)
function CL_LerpPoint (line 393) | float CL_LerpPoint (void)
function CL_RelinkEntities (line 444) | void CL_RelinkEntities (void)
function CL_ReadFromServer (line 709) | int CL_ReadFromServer (void)
function CL_SendCmd (line 744) | void CL_SendCmd (void)
function CL_Init (line 791) | void CL_Init (void)
FILE: source/cl_parse.c
function entity_t (line 82) | entity_t *CL_EntityNum (int num)
function CL_ParseStartSoundPacket (line 104) | void CL_ParseStartSoundPacket(void)
function CL_KeepaliveMessage (line 149) | void CL_KeepaliveMessage (void)
function CL_WebDownloadProgress (line 216) | static int CL_WebDownloadProgress( double percent )
function CL_ParseServerInfo (line 238) | void CL_ParseServerInfo (void)
function CL_ParseUpdate (line 444) | void CL_ParseUpdate (int bits)
function CL_ParseBaseline (line 607) | void CL_ParseBaseline (entity_t *ent)
function CL_ParseClientdata (line 630) | void CL_ParseClientdata (int bits)
function CL_NewTranslation (line 747) | void CL_NewTranslation (int slot)
function CL_ParseStatic (line 785) | void CL_ParseStatic (void)
function CL_ParseStaticSound (line 811) | void CL_ParseStaticSound (void)
function CL_ParseServerMessage (line 834) | void CL_ParseServerMessage (void)
FILE: source/cl_tent.c
function CL_InitTEnts (line 41) | void CL_InitTEnts (void)
function CL_ParseBeam (line 57) | void CL_ParseBeam (model_t *m)
function CL_ParseTEnt (line 107) | void CL_ParseTEnt (void)
function entity_t (line 293) | entity_t *CL_NewTempEntity (void)
function CL_UpdateTEnts (line 317) | void CL_UpdateTEnts (void)
FILE: source/client.h
type usercmd_t (line 22) | typedef struct
type lightstyle_t (line 35) | typedef struct
type scoreboard_t (line 41) | typedef struct
type cshift_t (line 50) | typedef struct
type dlight_t (line 72) | typedef struct
type beam_t (line 89) | typedef struct
type cactive_t (line 103) | typedef enum {
type download_t (line 109) | typedef struct
type client_static_t (line 121) | typedef struct
type client_state_t (line 158) | typedef struct
type kbutton_t (line 314) | typedef struct
FILE: source/cmd.c
type cmdalias_t (line 29) | typedef struct cmdalias_s
function Cmd_Wait_f (line 54) | void Cmd_Wait_f (void)
function Cbuf_Init (line 74) | void Cbuf_Init (void)
function Cbuf_AddText (line 87) | void Cbuf_AddText (const char *text)
function Cbuf_InsertText (line 111) | void Cbuf_InsertText(char *text)
function Cbuf_Execute (line 138) | void Cbuf_Execute(void)
function Cmd_StuffCmds_f (line 208) | void Cmd_StuffCmds_f (void)
function Cmd_Exec_f (line 278) | void Cmd_Exec_f (void)
function Cmd_Echo_f (line 310) | void Cmd_Echo_f (void)
function Cmd_Alias_f (line 336) | void Cmd_Alias_f (void)
type cmd_function_t (line 402) | typedef struct cmd_function_s
function Cmd_Init (line 427) | void Cmd_Init (void)
function Cmd_Argc (line 447) | int Cmd_Argc (void)
function Cmd_TokenizeString (line 482) | void Cmd_TokenizeString (const char *text)
function Cmd_AddCommand (line 533) | void Cmd_AddCommand (const char *cmd_name, xcommand_t function)
function Cmd_Exists (line 569) | bool Cmd_Exists (const char *cmd_name)
function Cmd_ExecuteString (line 615) | void Cmd_ExecuteString (char *text, cmd_source_t src)
function Cmd_ForwardToServer (line 661) | void Cmd_ForwardToServer (void)
function Cmd_CheckParm (line 692) | int Cmd_CheckParm (char *parm)
FILE: source/cmd.h
type cmd_source_t (line 71) | typedef enum
FILE: source/common.c
function ClearLink (line 113) | void ClearLink (link_t *l)
function RemoveLink (line 118) | void RemoveLink (link_t *l)
function InsertLinkBefore (line 124) | void InsertLinkBefore (link_t *l, link_t *before)
function InsertLinkAfter (line 131) | void InsertLinkAfter (link_t *l, link_t *after)
function strncpyz (line 147) | void strncpyz (char *dest, const char *src, size_t size)
function ShortSwap (line 170) | short ShortSwap(short l)
function ShortNoSwap (line 180) | short ShortNoSwap(short l)
function LongSwap (line 185) | int LongSwap(int l)
function LongNoSwap (line 197) | int LongNoSwap(int l)
function FloatSwap (line 202) | float FloatSwap(float f)
function FloatNoSwap (line 219) | float FloatNoSwap(float f)
function MSG_WriteChar (line 236) | void MSG_WriteChar (sizebuf_t *sb, int c)
function MSG_WriteByte (line 249) | void MSG_WriteByte (sizebuf_t *sb, int c)
function MSG_WriteShort (line 262) | void MSG_WriteShort (sizebuf_t *sb, int c)
function MSG_WriteLong (line 276) | void MSG_WriteLong (sizebuf_t *sb, int c)
function MSG_WriteFloat (line 287) | void MSG_WriteFloat (sizebuf_t *sb, float f)
function MSG_WriteString (line 302) | void MSG_WriteString (sizebuf_t *sb, const char *s)
function MSG_WriteCoord (line 310) | void MSG_WriteCoord (sizebuf_t *sb, float f)
function MSG_WriteAngle (line 315) | void MSG_WriteAngle (sizebuf_t *sb, float f)
function MSG_WritePreciseAngle (line 321) | void MSG_WritePreciseAngle(sizebuf_t *sb, float f)
function MSG_BeginReading (line 335) | void MSG_BeginReading (void)
function MSG_ReadChar (line 342) | int MSG_ReadChar (void)
function MSG_ReadByte (line 358) | int MSG_ReadByte (void)
function MSG_ReadShort (line 374) | int MSG_ReadShort (void)
function MSG_ReadLong (line 392) | int MSG_ReadLong (void)
function MSG_ReadFloat (line 412) | float MSG_ReadFloat (void)
function MSG_ReadCoord (line 452) | float MSG_ReadCoord (void)
function MSG_ReadAngle (line 457) | float MSG_ReadAngle (void)
function MSG_ReadPreciseAngle (line 463) | float MSG_ReadPreciseAngle(void)
function SZ_Alloc (line 470) | void SZ_Alloc (sizebuf_t *buf, int startsize)
function SZ_Free (line 480) | void SZ_Free (sizebuf_t *buf)
function SZ_Clear (line 488) | void SZ_Clear (sizebuf_t *buf)
function SZ_Write (line 516) | void SZ_Write (sizebuf_t *buf, const void *data, int length)
function SZ_Print (line 521) | void SZ_Print (sizebuf_t *buf, char *data)
function COM_StripExtension (line 562) | void COM_StripExtension(char *in, char *out)
function COM_FileBase (line 602) | void COM_FileBase (const char *in, char *out)
function COM_ForceExtension (line 631) | void COM_ForceExtension(char *path, char *extension)
function COM_DefaultExtension (line 655) | void COM_DefaultExtension (char *path, char *extension)
function COM_CheckParm (line 762) | int COM_CheckParm (const char *parm)
function COM_CheckRegistered (line 787) | void COM_CheckRegistered (void)
function COM_InitArgv (line 826) | void COM_InitArgv (int argc, char **argv)
function COM_Init (line 894) | void COM_Init (char *basedir)
function memsearch (line 958) | int memsearch (byte *start, int count, int search)
type dpackfile_t (line 981) | typedef struct
type dpackheader_t (line 987) | typedef struct
function COM_Path_f (line 1008) | void COM_Path_f (void)
function COM_WriteFile (line 1031) | void COM_WriteFile(char *filename, void *data, int len)
function COM_CreatePath (line 1060) | void COM_CreatePath (char *path)
function COM_CopyFile (line 1085) | void COM_CopyFile (char *netpath, char *cachepath)
function COM_FindFile (line 1120) | int COM_FindFile (const char *filename, int *handle, FILE **file, unsign...
function COM_OpenFile (line 1237) | int COM_OpenFile (const char *filename, int *handle, unsigned int *path_id)
function COM_FOpenFile (line 1250) | int COM_FOpenFile (char *filename, FILE **file, unsigned int *path_id)
function COM_CloseFile (line 1262) | void COM_CloseFile (int h)
function byte (line 1290) | byte *COM_LoadFile (const char *path, int usehunk, unsigned int *path_id)
function byte (line 1338) | byte *COM_LoadHunkFile (const char *path, unsigned int *path_id)
function byte (line 1343) | byte *COM_LoadTempFile (const char *path, unsigned int *path_id)
function byte (line 1349) | byte *COM_LoadStackFile (char *path, void *buffer, int bufsize, unsigned...
function pack_t (line 1370) | pack_t *COM_LoadPackFile(char *packfile)
function COM_AddGameDirectory (line 1446) | void COM_AddGameDirectory(char *dir)
function COM_GetFolder (line 1495) | void COM_GetFolder (char *in, char *out)
function COM_InitFilesystem (line 1516) | void COM_InitFilesystem (void)
function COM_Clamp (line 1618) | float COM_Clamp(float value, float min, float max)
function strlcat (line 1647) | size_t strlcat(char *dst, const char *src, size_t siz)
FILE: source/common.h
type byte (line 25) | typedef unsigned char byte;
type packfile_t (line 39) | typedef struct
type pack_t (line 45) | typedef struct pack_s
type searchpath_t (line 53) | typedef struct searchpath_s
type sizebuf_t (line 63) | typedef struct sizebuf_s
type link_t (line 81) | typedef struct link_s
type cache_user_s (line 189) | struct cache_user_s
type cvar_s (line 204) | struct cvar_s
FILE: source/console.c
function Con_ToggleConsole_f (line 72) | void Con_ToggleConsole_f (void)
function Con_Clear_f (line 99) | void Con_Clear_f (void)
function Con_ClearNotify (line 111) | void Con_ClearNotify (void)
function Con_MessageMode_f (line 127) | void Con_MessageMode_f (void)
function Con_MessageMode2_f (line 139) | void Con_MessageMode2_f (void)
function Con_CheckResize (line 151) | void Con_CheckResize(void)
function Con_Init (line 211) | void Con_Init (void)
function Con_Linefeed (line 255) | void Con_Linefeed (void)
function Con_Print (line 272) | void Con_Print (char *txt)
function Con_DebugLog (line 354) | void Con_DebugLog(char *file, char *fmt, ...)
function Con_Printf (line 378) | void Con_Printf (const char *fmt, ...)
function Con_DPrintf (line 430) | void Con_DPrintf (char *fmt, ...)
function Con_SafePrintf (line 457) | void Con_SafePrintf (char *fmt, ...)
function Con_DrawInput (line 492) | void Con_DrawInput (void)
function Con_DrawNotify (line 529) | void Con_DrawNotify (void)
function Con_DrawConsole (line 590) | void Con_DrawConsole (int lines, bool drawinput)
function Con_NotifyBox (line 652) | void Con_NotifyBox (char *text)
FILE: source/crc.c
function CRC_Init (line 68) | void CRC_Init(unsigned short *crcvalue)
function CRC_ProcessByte (line 73) | void CRC_ProcessByte(unsigned short *crcvalue, byte data)
function CRC_Value (line 78) | unsigned short CRC_Value(unsigned short crcvalue)
function CRC_Block (line 83) | unsigned short CRC_Block(byte *data, int size)
FILE: source/cvar.c
function cvar_t (line 32) | cvar_t *Cvar_FindVar (const char *var_name)
function Cvar_VariableValue (line 48) | float Cvar_VariableValue (const char *var_name)
function Cvar_SetFull (line 104) | void Cvar_SetFull (const char *var_name, const char *value, bool forced)
function Cvar_Set (line 139) | void Cvar_Set (const char *var_name, const char *value)
function Cvar_ForceSet (line 144) | void Cvar_ForceSet (const char *var_name, const char *value)
function Cvar_SetValue (line 154) | void Cvar_SetValue (const char *var_name, float value)
function Cvar_ToggleValue (line 162) | void Cvar_ToggleValue(cvar_t *cvar)
function Cvar_RegisterVariable (line 177) | void Cvar_RegisterVariable (cvar_t *variable)
function Cvar_SetCallback (line 223) | void Cvar_SetCallback(cvar_t *var, cvarcallback_t func)
function Cvar_Command (line 238) | bool Cvar_Command (void)
function Cvar_WriteVariables (line 267) | void Cvar_WriteVariables (FILE *f)
function Cvar_Set_f (line 278) | void Cvar_Set_f(void)
function Cvar_Seta_f (line 307) | void Cvar_Seta_f(void)
FILE: source/cvar.h
type cvar_s (line 63) | struct cvar_s
type cvar_t (line 65) | typedef struct cvar_s
FILE: source/gl_draw.cpp
function LoadExternalPic (line 106) | static int LoadExternalPic(char *identifier)
class textureStore (line 125) | class textureStore {
type entry (line 131) | struct entry
method entry (line 144) | entry() {
method unlink (line 152) | void unlink() {
method insertBefore (line 163) | void insertBefore(entry* e){
method textureStore (line 181) | static textureStore* get() {
method bind (line 190) | void bind(int virtTexNum) {
method update (line 209) | void update(entry* e)
method create (line 242) | void create(int width, int height, byte* data, bool mipmap,
method rebindAll (line 272) | void rebindAll() {
method textureStore (line 291) | textureStore() {
method grabMagicTextureIds (line 310) | void grabMagicTextureIds() {
method unlink (line 316) | void unlink(entry* e) {
method ensure (line 326) | void ensure(int size) {
method evict (line 338) | void evict(entry* e) {
function GL_Bind (line 372) | void GL_Bind (int texnum)
function Scrap_AllocBlock (line 405) | int Scrap_AllocBlock (int w, int h, int *x, int *y)
function Scrap_Upload (line 449) | void Scrap_Upload (void)
type cachepic_s (line 465) | struct cachepic_s
function GL_LoadPicTexture (line 486) | int GL_LoadPicTexture (qpic_t *pic)
function qpic_t (line 491) | qpic_t *Draw_PicFromWad (const char *name)
function qpic_t (line 551) | qpic_t *Draw_CachePic (char *path)
function Draw_CharToConback (line 597) | void Draw_CharToConback (int num, byte *dest)
function Draw_TextureMode_f (line 637) | void Draw_TextureMode_f (void)
function Callback_Bilinear_f (line 686) | static void Callback_Bilinear_f(cvar_t *var)
function Draw_Init (line 699) | void Draw_Init (void)
function DrawQuad_NoTex (line 848) | void DrawQuad_NoTex(float x, float y, float w, float h, float r, float g...
function DrawQuad (line 865) | void DrawQuad(float x, float y, float w, float h, float u, float v, floa...
function Draw_Character (line 894) | void Draw_Character (int x, int y, int num)
function Draw_String (line 924) | void Draw_String (int x, int y, const char *str, int delta)
function Batch_Character (line 984) | void Batch_Character (int x, int y, int num) {
function Batch_String (line 1030) | void Batch_String (int x, int y, const char *str, int delta) {
function Draw_Batched (line 1080) | void Draw_Batched() {
function Draw_DebugChar (line 1101) | void Draw_DebugChar (signed char num)
function Draw_Crosshair (line 1105) | void Draw_Crosshair(void)
function Draw_AlphaPic (line 1127) | void Draw_AlphaPic (int x, int y, qpic_t *pic, float alpha)
function Draw_Pic (line 1156) | void Draw_Pic (int x, int y, qpic_t *pic)
function Draw_TransPic (line 1178) | void Draw_TransPic (int x, int y, qpic_t *pic)
function Draw_TransPicTranslate (line 1201) | void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation)
function Draw_ConsoleBackground (line 1242) | void Draw_ConsoleBackground (void)
function Draw_TileClear (line 1270) | void Draw_TileClear (int x, int y, int w, int h)
function Draw_Fill (line 1287) | void Draw_Fill (int x, int y, int w, int h, int c)
function Draw_FadeScreen (line 1300) | void Draw_FadeScreen (void)
function GL_Set2D (line 1321) | void GL_Set2D (void)
function GL_ResampleTexture (line 1341) | void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsign...
function GL_Resample8BitTexture (line 1371) | void GL_Resample8BitTexture (unsigned char *in, int inwidth, int inheigh...
function GL_MipMap (line 1404) | void GL_MipMap (byte *in, int width, int height)
function GL_MipMap8Bit (line 1431) | void GL_MipMap8Bit (byte *in, int width, int height)
function GL_Upload32 (line 1463) | void GL_Upload32 (unsigned *data, int width, int height, bool mipmap, b...
function GL_Upload8 (line 1528) | void GL_Upload8 (byte *data, int width, int height, bool mipmap, bool a...
function GL_LoadTexture (line 1573) | int GL_LoadTexture (const char *identifier, int width, int height, byte ...
function GL_LoadTexture32 (line 1621) | int GL_LoadTexture32 (const char *identifier, int width, int height, byt...
function GL_DrawBenchmark (line 1685) | void GL_DrawBenchmark(void)
function GL_DrawFPS (line 1726) | void GL_DrawFPS(void){
function GL_SetCanvas (line 1753) | void GL_SetCanvas (int newcanvas)
FILE: source/gl_fullbright.c
function FindFullbrightTexture (line 6) | int FindFullbrightTexture (byte *pixels, int num_pix)
function ConvertPixels (line 15) | void ConvertPixels (byte *pixels, int num_pixels)
function DrawFullBrightTextures (line 23) | void DrawFullBrightTextures (msurface_t *first_surf, int num_surfs)
FILE: source/gl_mesh.c
function StripLength (line 58) | static int StripLength (int starttri, int startv)
function FanLength (line 127) | static int FanLength (int starttri, int startv)
function BuildTris (line 198) | static void BuildTris (void)
function GL_MakeAliasModelDisplayLists (line 285) | void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
FILE: source/gl_model.c
function Mod_Init (line 54) | void Mod_Init (void)
function mleaf_t (line 87) | mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model)
function byte (line 118) | byte *Mod_DecompressVis (byte *in, model_t *model)
function byte (line 158) | byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model)
function Mod_ClearAll (line 171) | void Mod_ClearAll (void)
function Mod_ResetAll (line 183) | void Mod_ResetAll (void)
function model_t (line 201) | model_t *Mod_FindName (char *name)
function Mod_TouchModel (line 234) | void Mod_TouchModel (char *name)
function model_t (line 254) | model_t *Mod_LoadModel (model_t *mod, bool crash)
function model_t (line 330) | model_t *Mod_ForName (char *name, bool crash)
function Mod_LoadTextures (line 356) | void Mod_LoadTextures (lump_t *l)
function Mod_LoadLighting (line 574) | void Mod_LoadLighting (lump_t *l)
function Mod_LoadVisibility (line 641) | void Mod_LoadVisibility (lump_t *l)
function Mod_ParseWadsFromEntityLump (line 658) | static void Mod_ParseWadsFromEntityLump(char *data)
function Mod_LoadEntities (line 728) | void Mod_LoadEntities (lump_t *l)
function Mod_LoadVertexes (line 770) | void Mod_LoadVertexes (lump_t *l)
function Mod_LoadSubmodels (line 798) | void Mod_LoadSubmodels (lump_t *l)
function Mod_LoadEdges (line 834) | void Mod_LoadEdges (lump_t *l, int bsp2)
function Mod_LoadTexinfo (line 877) | void Mod_LoadTexinfo (lump_t *l)
function CalcSurfaceExtents (line 942) | void CalcSurfaceExtents (msurface_t *s)
function Mod_LoadFaces (line 994) | void Mod_LoadFaces (lump_t *l, int bsp2)
function Mod_SetParent (line 1098) | void Mod_SetParent (mnode_t *node, mnode_t *parent)
function Mod_LoadNodes_S (line 1112) | void Mod_LoadNodes_S (lump_t *l)
function Mod_LoadNodes_L1 (line 1163) | void Mod_LoadNodes_L1 (lump_t *l)
function Mod_LoadNodes_L2 (line 1215) | void Mod_LoadNodes_L2 (lump_t *l)
function Mod_LoadNodes (line 1267) | void Mod_LoadNodes (lump_t *l, int bsp2)
function Mod_ProcessLeafs_S (line 1284) | void Mod_ProcessLeafs_S (dsleaf_t *in, int filelen)
function Mod_ProcessLeafs_L1 (line 1334) | void Mod_ProcessLeafs_L1 (dl1leaf_t *in, int filelen)
function Mod_ProcessLeafs_L2 (line 1381) | void Mod_ProcessLeafs_L2 (dl2leaf_t *in, int filelen)
function Mod_LoadLeafs (line 1433) | void Mod_LoadLeafs (lump_t *l, int bsp2)
function Mod_LoadClipnodes (line 1450) | void Mod_LoadClipnodes (lump_t *l, int bsp2)
function Mod_MakeHull0 (line 1592) | void Mod_MakeHull0 (void)
function Mod_LoadMarksurfaces (line 1629) | void Mod_LoadMarksurfaces (lump_t *l, int bsp2)
function Mod_LoadSurfedges (line 1682) | void Mod_LoadSurfedges (lump_t *l)
function Mod_LoadPlanes (line 1706) | void Mod_LoadPlanes (lump_t *l)
function RadiusFromBounds (line 1744) | float RadiusFromBounds (vec3_t mins, vec3_t maxs)
function Mod_LoadBrushModel (line 1762) | void Mod_LoadBrushModel (model_t *mod, void *buffer)
type floodfill_t (line 1968) | typedef struct
function Mod_FloodFillSkin (line 1990) | void Mod_FloodFillSkin( byte *skin, int skinwidth, int skinheight )
function Mod_LoadExternalSkin (line 2036) | static int Mod_LoadExternalSkin(char *identifier)
function Mod_LoadAliasModel (line 2130) | void Mod_LoadAliasModel (model_t *mod, void *buffer)
function Mod_LoadSpriteModel (line 2395) | void Mod_LoadSpriteModel (model_t *mod, void *buffer)
function Mod_Print (line 2473) | void Mod_Print (void)
FILE: source/gl_model.h
type mvertex_t (line 56) | typedef struct
type mplane_t (line 68) | typedef struct mplane_s
type texture_t (line 77) | typedef struct texture_s
type medge_t (line 102) | typedef struct
type mtexinfo_t (line 108) | typedef struct
type glpoly_t (line 118) | typedef struct glpoly_s
type msurface_t (line 127) | typedef struct msurface_s
type mnode_t (line 160) | typedef struct mnode_s
type mleaf_t (line 180) | typedef struct mleaf_s
type mclipnode_t (line 201) | typedef struct mclipnode_s
type hull_t (line 209) | typedef struct
type mspriteframe_t (line 229) | typedef struct mspriteframe_s
type mspritegroup_t (line 237) | typedef struct
type mspriteframedesc_t (line 244) | typedef struct
type msprite_t (line 250) | typedef struct
type maliasframedesc_t (line 271) | typedef struct
type maliasgroupframedesc_t (line 282) | typedef struct
type maliasgroup_t (line 289) | typedef struct
type mtriangle_t (line 297) | typedef struct mtriangle_s {
type aliashdr_t (line 304) | typedef struct {
type modtype_t (line 344) | typedef enum {mod_brush, mod_sprite, mod_alias} modtype_t;
type model_t (line 355) | typedef struct model_s
FILE: source/gl_refrag.c
function R_GetMoreEfrags (line 29) | void R_GetMoreEfrags (void)
function R_RemoveEfrags (line 67) | void R_RemoveEfrags (entity_t *ent)
function R_SplitEntityOnNode (line 106) | void R_SplitEntityOnNode (mnode_t *node)
function R_AddEfrags (line 181) | void R_AddEfrags (entity_t *ent)
function R_StoreEfrags (line 215) | void R_StoreEfrags (efrag_t **ppefrag)
FILE: source/gl_rlight.c
function R_AnimateLight (line 32) | void R_AnimateLight (void)
function AddLightBlend (line 62) | void AddLightBlend (float r, float g, float b, float a2)
function R_RenderDlight (line 75) | void R_RenderDlight (dlight_t *light)
function R_RenderDlights (line 125) | void R_RenderDlights (void)
function R_MarkLights (line 170) | void R_MarkLights (dlight_t *light, int bit, mnode_t *node)
function R_PushDlights (line 253) | void R_PushDlights (void)
function RecursiveLightPoint (line 286) | int RecursiveLightPoint (vec3_t color, mnode_t *node, vec3_t start, vec3...
function R_LightPoint (line 382) | int R_LightPoint (vec3_t p)
FILE: source/gl_rmain.c
function DoGamma (line 72) | void DoGamma()
function R_CullBox (line 171) | bool R_CullBox (vec3_t mins, vec3_t maxs)
function R_RotateForEntity (line 182) | void R_RotateForEntity (entity_t *e)
function R_BlendedRotateForEntity (line 199) | void R_BlendedRotateForEntity (entity_t *e)
function mspriteframe_t (line 289) | mspriteframe_t *R_GetSpriteFrame (entity_t *currententity)
function R_DrawSpriteModel (line 343) | void R_DrawSpriteModel (entity_t *e)
function GL_DrawAliasFrame (line 446) | void GL_DrawAliasFrame (aliashdr_t *paliashdr, int posenum)
function GL_DrawAliasBlendedFrame (line 604) | void GL_DrawAliasBlendedFrame (aliashdr_t *paliashdr, int pose1, int pos...
function GL_DrawAliasShadow (line 791) | void GL_DrawAliasShadow (aliashdr_t *paliashdr, int posenum)
function GL_DrawAliasBlendedShadow (line 869) | void GL_DrawAliasBlendedShadow (aliashdr_t *paliashdr, int pose1, int po...
function R_SetupAliasFrame (line 960) | void R_SetupAliasFrame (int frame, aliashdr_t *paliashdr)
function R_SetupAliasBlendedFrame (line 990) | void R_SetupAliasBlendedFrame (int frame, aliashdr_t *paliashdr, entity_...
function R_DrawAliasModel (line 1041) | void R_DrawAliasModel (entity_t *e)
function R_DrawEntitiesOnList (line 1352) | void R_DrawEntitiesOnList (void)
function R_DrawViewModel (line 1399) | void R_DrawViewModel (void)
function R_PolyBlend (line 1444) | void R_PolyBlend (void)
function SignbitsForPlane (line 1488) | int SignbitsForPlane (mplane_t *out)
function R_SetFrustum (line 1504) | void R_SetFrustum (void)
function R_SetupFrame (line 1545) | void R_SetupFrame (void)
function GL_SetFrustum (line 1580) | void GL_SetFrustum(float fovx, float fovy)
function R_SetupGL (line 1598) | void R_SetupGL (void)
function R_RenderScene (line 1662) | void R_RenderScene (void)
function R_Clear (line 1690) | void R_Clear (void)
function R_Mirror (line 1713) | void R_Mirror (void)
function R_RenderView (line 1792) | void R_RenderView (void)
FILE: source/gl_rmisc.c
function R_InitTextures (line 32) | void R_InitTextures (void)
function R_InitParticleTexture (line 71) | void R_InitParticleTexture (void)
function R_Envmap_f (line 107) | void R_Envmap_f (void)
function R_Init (line 116) | void R_Init (void)
function R_TranslatePlayerSkin (line 178) | void R_TranslatePlayerSkin (int playernum)
function R_NewMap (line 299) | void R_NewMap (void)
function R_TimeRefresh_f (line 342) | void R_TimeRefresh_f (void)
function D_FlushCaches (line 346) | void D_FlushCaches (void)
FILE: source/gl_rsurf.c
type glRect_t (line 48) | typedef struct glRect_s {
function R_AddDynamicLights (line 71) | void R_AddDynamicLights (msurface_t *surf)
function R_BuildLightMap (line 159) | void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
function texture_t (line 280) | texture_t *R_TextureAnimation (texture_t *base)
function DrawGLWaterPoly (line 333) | void DrawGLWaterPoly (glpoly_t *p)
function DrawGLWaterPolyLightmap (line 361) | void DrawGLWaterPolyLightmap (glpoly_t *p)
function DrawGLWaterPolyWithLightmap (line 388) | void DrawGLWaterPolyWithLightmap(glpoly_t *p, int t1, int t2)
function DrawGLPoly (line 436) | void DrawGLPoly (glpoly_t *p)
function DrawGLPolyLightmap (line 459) | void DrawGLPolyLightmap (glpoly_t *p)
function R_BlendLightmaps (line 489) | void R_BlendLightmaps (void)
function R_RenderBrushPoly (line 544) | void R_RenderBrushPoly (msurface_t *fa)
function R_MirrorChain (line 629) | void R_MirrorChain (msurface_t *s)
function R_DrawWaterSurfaces (line 642) | void R_DrawWaterSurfaces (void)
function DrawTextureChains (line 704) | void DrawTextureChains (void)
function R_DrawBrushModel (line 742) | void R_DrawBrushModel (entity_t *e)
function R_RecursiveWorldNode (line 868) | void R_RecursiveWorldNode (mnode_t *node)
function R_DrawWorld (line 984) | void R_DrawWorld (void)
function R_MarkLeaves (line 1016) | void R_MarkLeaves (void)
function AllocBlock (line 1067) | int AllocBlock (int w, int h, int *x, int *y)
function BuildSurfaceDisplayList (line 1119) | void BuildSurfaceDisplayList (msurface_t *fa)
function GL_CreateSurfaceLightmap (line 1236) | void GL_CreateSurfaceLightmap (msurface_t *surf)
function GL_BuildLightmaps (line 1262) | void GL_BuildLightmaps (void)
FILE: source/gl_screen.c
function SCR_CenterPrint (line 153) | void SCR_CenterPrint (char *str)
function SCR_DrawCenterString (line 170) | void SCR_DrawCenterString (void)
function SCR_CheckDrawCenterString (line 219) | void SCR_CheckDrawCenterString (void)
function CalcFov (line 242) | float CalcFov (float fov_x, float width, float height)
function SCR_CalcRefdef (line 267) | static void SCR_CalcRefdef (void)
function SCR_SizeUp_f (line 332) | void SCR_SizeUp_f (void)
function SCR_SizeDown_f (line 346) | void SCR_SizeDown_f (void)
function SCR_Init (line 359) | void SCR_Init (void)
function SCR_DrawRam (line 398) | void SCR_DrawRam (void)
function SCR_DrawTurtle (line 416) | void SCR_DrawTurtle (void)
function SCR_DrawNet (line 443) | void SCR_DrawNet (void)
function SCR_DrawPause (line 460) | void SCR_DrawPause (void)
function SCR_DrawLoading (line 484) | void SCR_DrawLoading (void)
function SCR_SetUpToDrawConsole (line 508) | void SCR_SetUpToDrawConsole (void)
function SCR_DrawConsole (line 565) | void SCR_DrawConsole (void)
type TargaHeader (line 589) | typedef struct _TargaHeader {
function SCR_ScreenShot_f (line 603) | void SCR_ScreenShot_f (void)
function SCR_BeginLoadingPlaque (line 664) | void SCR_BeginLoadingPlaque (void)
function SCR_EndLoadingPlaque (line 695) | void SCR_EndLoadingPlaque (void)
function SCR_DrawNotifyString (line 707) | void SCR_DrawNotifyString (void)
function SCR_ModalMessage (line 749) | int SCR_ModalMessage (char *text)
function SCR_BringDownConsole (line 786) | void SCR_BringDownConsole (void)
function SCR_TileClear (line 799) | void SCR_TileClear (void)
function SCR_UpdateScreen (line 834) | void SCR_UpdateScreen (void)
FILE: source/gl_vidpsp2.c
function D_BeginDirectRect (line 113) | void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height)
function D_EndDirectRect (line 117) | void D_EndDirectRect (int x, int y, int width, int height)
function VID_Shutdown (line 121) | void VID_Shutdown(void)
function VID_ShiftPalette (line 125) | void VID_ShiftPalette(unsigned char *p)
function VID_ChangeRes (line 130) | void VID_ChangeRes(float scale){
function VID_SetPalette (line 134) | void VID_SetPalette (unsigned char *palette)
function GL_SetProgram (line 221) | void GL_SetProgram() {
function GL_EnableState (line 262) | void GL_EnableState(GLenum state) {
function GL_DisableState (line 283) | void GL_DisableState(GLenum state) {
function GL_DrawPolygon (line 302) | void GL_DrawPolygon(GLenum prim, int num) {
function GL_Color (line 312) | void GL_Color(float r, float g, float b, float a) {
function GL_ResetShaders (line 320) | void GL_ResetShaders() {
function Callback_Fog_f (line 447) | static void Callback_Fog_f(cvar_t *var)
function GL_Init (line 462) | void GL_Init (void)
function GL_BeginRendering (line 511) | void GL_BeginRendering (int *x, int *y, int *width, int *height)
function GL_EndRendering (line 537) | void GL_EndRendering (void)
function Check_Gamma (line 571) | static void Check_Gamma (unsigned char *pal)
function VID_Init (line 596) | void VID_Init(unsigned char *palette)
function Force_CenterView_f (line 632) | void Force_CenterView_f (void)
FILE: source/gl_warp.c
function BoundPoly (line 37) | void BoundPoly (int numverts, float *verts, vec3_t mins, vec3_t maxs)
function SubdividePolygon (line 55) | void SubdividePolygon (int numverts, float *verts)
function GL_SubdivideSurface (line 147) | void GL_SubdivideSurface (msurface_t *fa)
function EmitWaterPolys (line 195) | void EmitWaterPolys (msurface_t *fa)
function EmitSkyPolys (line 234) | void EmitSkyPolys (msurface_t *fa)
function EmitBothSkyLayers (line 278) | void EmitBothSkyLayers (msurface_t *fa)
function R_DrawSkyChain (line 306) | void R_DrawSkyChain (msurface_t *s)
function R_InitSky (line 340) | void R_InitSky (miptex_t *mt)
FILE: source/glquake.h
type GLuint (line 38) | typedef GLboolean (APIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *,
type glvert_t (line 63) | typedef struct
type surfcache_t (line 101) | typedef struct surfcache_s
type drawsurf_t (line 116) | typedef struct
type ptype_t (line 130) | typedef enum {
type particle_t (line 135) | typedef struct particle_s
FILE: source/glquake2.h
type GLuint (line 35) | typedef GLboolean (APIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *,
type glvert_t (line 58) | typedef struct
type surfcache_t (line 97) | typedef struct surfcache_s
type drawsurf_t (line 112) | typedef struct
type ptype_t (line 126) | typedef enum {
type particle_t (line 131) | typedef struct particle_s
FILE: source/host.c
function Host_EndGame (line 87) | void Host_EndGame (char *message, ...)
function Host_Error (line 123) | void Host_Error (char *error, ...)
function Host_FindMaxClients (line 163) | void Host_FindMaxClients (void)
function Host_InitLocal (line 212) | void Host_InitLocal (void)
function Host_WriteConfiguration (line 250) | void Host_WriteConfiguration (char *name)
function SV_ClientPrintf (line 284) | void SV_ClientPrintf (const char *fmt, ...)
function SV_BroadcastPrintf (line 306) | void SV_BroadcastPrintf (char *fmt, ...)
function Host_ClientCommands (line 335) | void Host_ClientCommands (char *fmt, ...)
function SV_DropClient (line 358) | void SV_DropClient (bool crash)
function Host_ShutdownServer (line 426) | void Host_ShutdownServer(bool crash)
function Host_ClearMemory (line 498) | void Host_ClearMemory (void)
function Host_FilterTime (line 523) | bool Host_FilterTime (float time)
function Host_GetConsoleCommands (line 557) | void Host_GetConsoleCommands (void)
function _Host_ServerFrame (line 579) | void _Host_ServerFrame (void)
function Host_ServerFrame (line 593) | void Host_ServerFrame (void)
function Host_ServerFrame (line 625) | void Host_ServerFrame (void)
function _Host_Frame (line 667) | void _Host_Frame (float time)
function Host_Frame (line 768) | void Host_Frame (float time)
function Host_InitVCR (line 811) | void Host_InitVCR (quakeparms_t *parms)
function Host_Init (line 874) | void Host_Init (quakeparms_t *parms)
function Host_Shutdown (line 972) | void Host_Shutdown(void)
FILE: source/host_cmd.c
function Host_Quit_f (line 40) | void Host_Quit_f (void)
function KillGameDir (line 63) | void KillGameDir(searchpath_t *search)
function NumGames (line 84) | int NumGames(searchpath_t *search)
function Host_WriteConfig_f (line 104) | void Host_WriteConfig_f (void)
function Host_Game_f (line 129) | void Host_Game_f (void)
type extralevel_t (line 208) | typedef struct extralevel_s
function ExtraMaps_Add (line 216) | void ExtraMaps_Add (char *name)
function ExtraMaps_Init (line 248) | void ExtraMaps_Init (void) //TODO: move win32 specific stuff to sys_win.c
function ExtraMaps_Clear (line 252) | void ExtraMaps_Clear (void)
function ExtraMaps_NewGame (line 264) | void ExtraMaps_NewGame (void)
function Host_Maps_f (line 275) | void Host_Maps_f (void)
type mod_t (line 293) | typedef struct mod_s
function Modlist_Add (line 301) | void Modlist_Add (char *name)
function Modlist_Init (line 333) | void Modlist_Init (void) //TODO: move win32 specific stuff to sys_win.c
function Host_Mods_f (line 375) | void Host_Mods_f (void)
function Host_Mapname_f (line 396) | void Host_Mapname_f (void)
function Host_Status_f (line 422) | void Host_Status_f (void)
function Host_God_f (line 477) | void Host_God_f (void)
function Host_Notarget_f (line 495) | void Host_Notarget_f (void)
function Host_Noclip_f (line 515) | void Host_Noclip_f (void)
function Host_Fly_f (line 547) | void Host_Fly_f (void)
function Host_Ping_f (line 577) | void Host_Ping_f (void)
function Host_Map_f (line 620) | void Host_Map_f (void)
function Host_Changelevel_f (line 672) | void Host_Changelevel_f (void)
function Host_Restart_f (line 698) | void Host_Restart_f (void)
function Host_Reconnect_f (line 720) | void Host_Reconnect_f (void)
function Host_Connect_f (line 735) | void Host_Connect_f (void)
function Host_SavegameComment (line 770) | void Host_SavegameComment (char *text)
function Host_Savegame_f (line 793) | void Host_Savegame_f (void)
function Host_Loadgame_f (line 889) | void Host_Loadgame_f (void)
function Host_Name_f (line 1045) | void Host_Name_f (void)
function Host_Version_f (line 1094) | void Host_Version_f (void)
function Host_Please_f (line 1102) | void Host_Please_f (void)
function Host_Say (line 1154) | void Host_Say(bool teamonly)
function Host_Say_f (line 1218) | void Host_Say_f(void)
function Host_Say_Team_f (line 1224) | void Host_Say_Team_f(void)
function Host_Tell_f (line 1230) | void Host_Tell_f(void)
function Host_Color_f (line 1287) | void Host_Color_f(void)
function Host_Kill_f (line 1338) | void Host_Kill_f (void)
function Host_Pause_f (line 1363) | void Host_Pause_f (void)
function Host_PreSpawn_f (line 1394) | void Host_PreSpawn_f (void)
function Host_Spawn_f (line 1419) | void Host_Spawn_f (void)
function Host_Begin_f (line 1545) | void Host_Begin_f (void)
function Host_Kick_f (line 1566) | void Host_Kick_f (void)
function Host_Give_f (line 1658) | void Host_Give_f (void)
function edict_t (line 1812) | edict_t *FindViewthing (void)
function Host_Viewmodel_f (line 1832) | void Host_Viewmodel_f (void)
function Host_Viewframe_f (line 1857) | void Host_Viewframe_f (void)
function PrintFrameName (line 1876) | void PrintFrameName (model_t *m, int frame)
function Host_Viewnext_f (line 1894) | void Host_Viewnext_f (void)
function Host_Viewprev_f (line 1916) | void Host_Viewprev_f (void)
function Host_Startdemos_f (line 1948) | void Host_Startdemos_f (void)
function Host_Demos_f (line 1987) | void Host_Demos_f (void)
function Host_Stopdemo_f (line 2004) | void Host_Stopdemo_f (void)
function Host_InitCommands (line 2021) | void Host_InitCommands (void)
FILE: source/image.c
type stdio_buffer_t (line 28) | typedef struct stdio_buffer_s {
function stdio_buffer_t (line 35) | static stdio_buffer_t *Buf_Alloc(FILE *f)
function Buf_Free (line 42) | static void Buf_Free(stdio_buffer_t *buf)
function Buf_GetC (line 47) | static inline int Buf_GetC(stdio_buffer_t *buf)
function byte (line 70) | byte *Image_LoadImage (const char *name, int *width, int *height)
type targaheader_t (line 93) | typedef struct targaheader_s {
function fgetLittleShort (line 105) | int fgetLittleShort (FILE *f)
function fgetLittleLong (line 115) | int fgetLittleLong (FILE *f)
function byte (line 132) | byte *Image_LoadTGA (FILE *fin, int *width, int *height)
type pcxheader_t (line 326) | typedef struct
function byte (line 347) | byte *Image_LoadPCX (FILE *f, int *width, int *height)
FILE: source/in_psp2.c
function IN_Init (line 45) | void IN_Init (void)
function IN_ResetInputs (line 68) | void IN_ResetInputs(void)
function IN_Shutdown (line 87) | void IN_Shutdown (void)
function IN_Commands (line 91) | void IN_Commands (void)
function IN_StartRumble (line 95) | void IN_StartRumble (void)
function IN_StopRumble (line 105) | void IN_StopRumble (void)
function IN_RescaleAnalog (line 114) | void IN_RescaleAnalog(int *x, int *y, int dead) {
function IN_Move (line 134) | void IN_Move (usercmd_t *cmd)
FILE: source/keys.c
type keyname_t (line 49) | typedef struct
function Key_SendText (line 152) | void Key_SendText(char *Text)
function Key_Console (line 170) | void Key_Console (int key)
function Key_Message (line 287) | void Key_Message (int key)
function Key_StringToKeynum (line 346) | int Key_StringToKeynum (char *str)
function Key_SetBinding (line 399) | void Key_SetBinding (int keynum, char *binding)
function Key_Unbind_f (line 427) | void Key_Unbind_f (void)
function Key_Unbindall_f (line 447) | void Key_Unbindall_f (void)
function Key_Bind_f (line 462) | void Key_Bind_f (void)
function Key_WriteBindings (line 512) | void Key_WriteBindings (FILE *f)
function Key_Init (line 529) | void Key_Init (void)
function Key_Event (line 575) | void Key_Event (int key, bool down)
function Key_ClearStates (line 741) | void Key_ClearStates (void)
FILE: source/keys.h
type keydest_t (line 123) | typedef enum {key_game, key_console, key_message, key_menu, key_benchmar...
FILE: source/mathlib.c
function ProjectPointOnPlane (line 33) | void ProjectPointOnPlane(vec3_t dst, const vec3_t p, const vec3_t normal)
function PerpendicularVector (line 55) | void PerpendicularVector(vec3_t dst, const vec3_t src)
function RotatePointAroundVector (line 88) | void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t ...
function anglemod (line 148) | float anglemod(float a)
function BOPS_Error (line 161) | void BOPS_Error(void)
function BoxOnPlaneSide (line 176) | int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, mplane_t *p)
function AngleVectors (line 238) | void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
function VectorCompare (line 271) | int VectorCompare(vec3_t v1, vec3_t v2)
function VectorMA (line 282) | void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
function vec_t (line 290) | vec_t _DotProduct(vec3_t v1, vec3_t v2)
function _VectorSubtract (line 295) | void _VectorSubtract(vec3_t veca, vec3_t vecb, vec3_t out)
function _VectorAdd (line 302) | void _VectorAdd(vec3_t veca, vec3_t vecb, vec3_t out)
function _VectorCopy (line 309) | void _VectorCopy(vec3_t in, vec3_t out)
function CrossProduct (line 316) | void CrossProduct(vec3_t v1, vec3_t v2, vec3_t cross)
function vec_t (line 325) | vec_t Length(vec3_t v)
function VectorLength (line 338) | float VectorLength(vec3_t v)
function VectorNormalize (line 347) | float VectorNormalize(vec3_t v)
function VectorInverse (line 365) | void VectorInverse(vec3_t v)
function VectorScale (line 372) | void VectorScale(vec3_t in, vec_t scale, vec3_t out)
function Q_log2 (line 380) | int Q_log2(int val)
function R_ConcatRotations (line 394) | void R_ConcatRotations(float in1[3][3], float in2[3][3], float out[3][3])
function R_ConcatTransforms (line 413) | void R_ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4])
function FloorDivMod (line 440) | void FloorDivMod(double numer, double denom, int *quotient,
function GreatestCommonDivisor (line 487) | int GreatestCommonDivisor(int i1, int i2)
function fixed16_t (line 516) | fixed16_t Invert24To16(fixed16_t val)
function ParseFloats (line 527) | int ParseFloats(const signed char *s, float *f, int *f_size) {
FILE: source/mathlib.h
type vec_t (line 24) | typedef float vec_t;
type vec_t (line 25) | typedef vec_t vec3_t[3];
type vec_t (line 26) | typedef vec_t vec5_t[5];
type fixed4_t (line 28) | typedef int fixed4_t;
type fixed8_t (line 29) | typedef int fixed8_t;
type fixed16_t (line 30) | typedef int fixed16_t;
type mplane_s (line 35) | struct mplane_s
type mplane_s (line 80) | struct mplane_s
FILE: source/menu.c
function SetResolution (line 134) | void SetResolution(int w, int h){
function SetAntiAliasing (line 146) | void SetAntiAliasing(int m){
function M_DrawColorBar (line 156) | void M_DrawColorBar (int x, int y, int highlight)
function M_DrawCharacter (line 184) | void M_DrawCharacter (int cx, int line, int num)
function M_Print (line 189) | void M_Print (int cx, int cy, char *str)
function M_PrintCentered (line 194) | void M_PrintCentered (int cy, char *str)
function M_PrintWhite (line 201) | void M_PrintWhite (int cx, int cy, char *str)
function M_DrawTransPic (line 206) | void M_DrawTransPic (int x, int y, qpic_t *pic)
function M_DrawPic (line 211) | void M_DrawPic (int x, int y, qpic_t *pic)
function M_BuildTranslationTable (line 219) | void M_BuildTranslationTable(int top, int bottom)
function M_DrawTransPicTranslate (line 244) | void M_DrawTransPicTranslate (int x, int y, qpic_t *pic)
function M_DrawTextBox (line 250) | void M_DrawTextBox (int x, int y, int width, int lines)
function M_ToggleMenu_f (line 314) | void M_ToggleMenu_f (void)
function M_Menu_Main_f (line 347) | void M_Menu_Main_f (void)
function M_Main_Draw (line 360) | void M_Main_Draw (void)
function M_Main_Key (line 382) | void M_Main_Key (int key)
function M_Menu_SinglePlayer_f (line 444) | void M_Menu_SinglePlayer_f (void)
function M_SinglePlayer_Draw (line 452) | void M_SinglePlayer_Draw (void)
function M_SinglePlayer_Key (line 468) | void M_SinglePlayer_Key (int key)
function M_ScanSaves (line 524) | void M_ScanSaves (void)
function M_Menu_Load_f (line 552) | void M_Menu_Load_f (void)
function M_Menu_Save_f (line 561) | void M_Menu_Save_f (void)
function M_Load_Draw (line 576) | void M_Load_Draw (void)
function M_Save_Draw (line 594) | void M_Save_Draw (void)
function M_Load_Key (line 612) | void M_Load_Key (int k)
function M_Save_Key (line 657) | void M_Save_Key (int k)
function M_Menu_MultiPlayer_f (line 699) | void M_Menu_MultiPlayer_f (void)
function M_MultiPlayer_Draw (line 707) | void M_MultiPlayer_Draw (void)
function M_MultiPlayer_Key (line 728) | void M_MultiPlayer_Key (int key)
function M_Menu_Benchmark_f (line 776) | void M_Menu_Benchmark_f (void)
function M_Benchmark_Draw (line 786) | void M_Benchmark_Draw (void)
function M_Benchmark_Key (line 801) | void M_Benchmark_Key (int key)
function M_Menu_Setup_f (line 830) | void M_Menu_Setup_f (void)
function M_Setup_Draw (line 842) | void M_Setup_Draw (void)
function M_Setup_Key (line 880) | void M_Setup_Key (int k)
function M_Menu_Net_f (line 1008) | void M_Menu_Net_f (void)
function M_Net_Draw (line 1022) | void M_Net_Draw (void)
function M_Net_Key (line 1049) | void M_Net_Key (int k)
function M_Menu_Mods_f (line 1059) | void M_Menu_Mods_f (void)
function M_Mods_Draw (line 1068) | void M_Mods_Draw (void)
function M_Mods_Key (line 1093) | void M_Mods_Key (int k)
function M_Menu_Graphics_f (line 1159) | void M_Menu_Graphics_f (void)
function M_AdjustSliders2 (line 1166) | void M_AdjustSliders2 (int dir)
function M_DrawSlider (line 1265) | void M_DrawSlider (int x, int y, float range)
function M_DrawCheckbox (line 1280) | void M_DrawCheckbox (int x, int y, int on)
function M_Graphics_Draw (line 1285) | void M_Graphics_Draw (void)
function M_Graphics_Key (line 1388) | void M_Graphics_Key (int k)
function M_Menu_Options_f (line 1435) | void M_Menu_Options_f (void)
function M_AdjustSliders (line 1445) | void M_AdjustSliders (int dir)
function M_Options_Draw (line 1560) | void M_Options_Draw (void)
function M_Options_Key (line 1647) | void M_Options_Key (int k)
function M_Menu_Keys_f (line 1805) | void M_Menu_Keys_f (void)
function M_FindKeysForCommand (line 1813) | void M_FindKeysForCommand (char *command, int *twokeys)
function M_UnbindCommand (line 1839) | void M_UnbindCommand (char *command)
function M_Keys_Draw (line 1858) | void M_Keys_Draw (void)
function M_Keys_Key (line 1911) | void M_Keys_Key (int k)
function M_Menu_Video_f (line 1976) | void M_Menu_Video_f (void)
function M_Video_Draw (line 1984) | void M_Video_Draw (void)
function M_Video_Key (line 1990) | void M_Video_Key (int key)
function M_Menu_Help_f (line 2002) | void M_Menu_Help_f (void)
function M_Help_Draw (line 2012) | void M_Help_Draw (void)
function M_Help_Key (line 2018) | void M_Help_Key (int key)
function M_Menu_Quit_f (line 2103) | void M_Menu_Quit_f (void)
function M_Quit_Key (line 2116) | void M_Quit_Key (int key)
function M_Quit_Draw (line 2149) | void M_Quit_Draw (void)
function M_Menu_LanConfig_f (line 2205) | void M_Menu_LanConfig_f (void)
function M_LanConfig_Draw (line 2227) | void M_LanConfig_Draw (void)
function M_LanConfig_Key (line 2285) | void M_LanConfig_Key (int key)
function M_Menu_OnlineServerList_f (line 2443) | void M_Menu_OnlineServerList_f (void)
function M_OnlineServerList_Draw (line 2454) | void M_OnlineServerList_Draw (void)
function M_OnlineServerList_Key (line 2479) | void M_OnlineServerList_Key (int key)
type level_t (line 2526) | typedef struct
type episode_t (line 2631) | typedef struct
function M_Menu_GameOptions_f (line 2676) | void M_Menu_GameOptions_f (void)
function M_GameOptions_Draw (line 2692) | void M_GameOptions_Draw (void)
function M_NetStart_Change (line 2820) | void M_NetStart_Change (int dir)
function M_GameOptions_Key (line 2922) | void M_GameOptions_Key (int key)
function M_Menu_Search_f (line 2992) | void M_Menu_Search_f (void)
function M_Search_Draw (line 3005) | void M_Search_Draw (void)
function M_Search_Key (line 3042) | void M_Search_Key (int key)
function M_Menu_ServerList_f (line 3052) | void M_Menu_ServerList_f (void)
function M_ServerList_Draw (line 3064) | void M_ServerList_Draw (void)
function M_ServerList_Key (line 3105) | void M_ServerList_Key (int k)
function M_Init (line 3156) | void M_Init (void)
function M_Draw (line 3174) | void M_Draw (void)
function M_Keydown (line 3300) | void M_Keydown (int key)
function M_ConfigureNetSubsystem (line 3390) | void M_ConfigureNetSubsystem(void)
FILE: source/model.h
type mvertex_t (line 47) | typedef struct
type mplane_t (line 59) | typedef struct mplane_s
type texture_t (line 68) | typedef struct texture_s
type medge_t (line 88) | typedef struct
type mtexinfo_t (line 94) | typedef struct
type msurface_t (line 102) | typedef struct msurface_s
type mnode_t (line 128) | typedef struct mnode_s
type mleaf_t (line 148) | typedef struct mleaf_s
type hull_t (line 169) | typedef struct
type mspriteframe_t (line 189) | typedef struct mspriteframe_s
type mspritegroup_t (line 198) | typedef struct
type mspriteframedesc_t (line 205) | typedef struct
type msprite_t (line 211) | typedef struct
type maliasframedesc_t (line 232) | typedef struct
type maliasskindesc_t (line 241) | typedef struct
type maliasgroupframedesc_t (line 248) | typedef struct
type maliasgroup_t (line 255) | typedef struct
type maliasskingroup_t (line 262) | typedef struct
type mtriangle_t (line 270) | typedef struct mtriangle_s {
type aliashdr_t (line 275) | typedef struct {
type modtype_t (line 289) | typedef enum {mod_brush, mod_sprite, mod_alias} modtype_t;
type model_t (line 300) | typedef struct model_s
FILE: source/modelgen.h
type synctype_t (line 52) | typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
type aliasframetype_t (line 55) | typedef enum { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
type aliasskintype_t (line 57) | typedef enum { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
type mdl_t (line 59) | typedef struct {
type stvert_t (line 79) | typedef struct {
type dtriangle_t (line 85) | typedef struct dtriangle_s {
type trivertx_t (line 95) | typedef struct {
type daliasframe_t (line 100) | typedef struct {
type daliasgroup_t (line 106) | typedef struct {
type daliasskingroup_t (line 112) | typedef struct {
type daliasinterval_t (line 116) | typedef struct {
type daliasskininterval_t (line 120) | typedef struct {
type daliasframetype_t (line 124) | typedef struct {
type daliasskintype_t (line 128) | typedef struct {
FILE: source/mpdosock.h
type u_char (line 22) | typedef unsigned char u_char;
type u_short (line 23) | typedef unsigned short u_short;
type u_int (line 24) | typedef unsigned int u_int;
type u_long (line 25) | typedef unsigned long u_long;
type u_int (line 31) | typedef u_int SOCKET;
type hostent (line 73) | struct hostent {
type netent (line 86) | struct netent {
type servent (line 93) | struct servent {
type protoent (line 100) | struct protoent {
type in_addr (line 183) | struct in_addr {
type sockaddr_in (line 233) | struct sockaddr_in {
type ip_mreq (line 261) | struct ip_mreq {
type sockaddr (line 378) | struct sockaddr {
type sockproto (line 387) | struct sockproto {
type linger (line 421) | struct linger {
type sockaddr (line 563) | struct sockaddr
type sockaddr (line 566) | struct sockaddr
type sockaddr (line 570) | struct sockaddr
type sockaddr (line 574) | struct sockaddr
type sockaddr (line 577) | struct sockaddr
type in_addr (line 589) | struct in_addr
type sockaddr (line 600) | struct sockaddr
type sockaddr (line 606) | struct sockaddr
type hostent (line 617) | struct hostent
type hostent (line 620) | struct hostent
type servent (line 624) | struct servent
type servent (line 626) | struct servent
type protoent (line 629) | struct protoent
type protoent (line 631) | struct protoent
type SOCKADDR (line 638) | typedef struct sockaddr SOCKADDR;
type sockaddr (line 639) | struct sockaddr
type sockaddr (line 640) | struct sockaddr
type SOCKADDR_IN (line 642) | typedef struct sockaddr_in SOCKADDR_IN;
type sockaddr_in (line 643) | struct sockaddr_in
type sockaddr_in (line 644) | struct sockaddr_in
type LINGER (line 646) | typedef struct linger LINGER;
type linger (line 647) | struct linger
type linger (line 648) | struct linger
type IN_ADDR (line 650) | typedef struct in_addr IN_ADDR;
type in_addr (line 651) | struct in_addr
type in_addr (line 652) | struct in_addr
type FD_SET (line 654) | typedef struct fd_set FD_SET;
type fd_set (line 655) | struct fd_set
type fd_set (line 656) | struct fd_set
type HOSTENT (line 658) | typedef struct hostent HOSTENT;
type hostent (line 659) | struct hostent
type hostent (line 660) | struct hostent
type SERVENT (line 662) | typedef struct servent SERVENT;
type servent (line 663) | struct servent
type servent (line 664) | struct servent
type PROTOENT (line 666) | typedef struct protoent PROTOENT;
type protoent (line 667) | struct protoent
type protoent (line 668) | struct protoent
type TIMEVAL (line 670) | typedef struct timeval TIMEVAL;
type timeval (line 671) | struct timeval
type timeval (line 672) | struct timeval
FILE: source/neon_mathfun.c
function v4sf (line 47) | v4sf log_ps(v4sf x) {
function v4sf (line 132) | v4sf exp_ps(v4sf x) {
function sincos_ps (line 218) | void sincos_ps(v4sf x, v4sf *ysin, v4sf *ycos) { // any x
function v4sf (line 285) | v4sf sin_ps(v4sf x) {
function v4sf (line 291) | v4sf cos_ps(v4sf x) {
FILE: source/neon_mathfun.h
type float32x4_t (line 6) | typedef float32x4_t v4sf;
type uint32x4_t (line 7) | typedef uint32x4_t v4su;
type int32x4_t (line 8) | typedef int32x4_t v4si;
FILE: source/net.h
type qsockaddr (line 22) | struct qsockaddr
type qsocket_t (line 124) | typedef struct qsocket_s
type net_landriver_t (line 167) | typedef struct
type net_driver_t (line 196) | typedef struct
type hostcache_t (line 238) | typedef struct
type qsockaddr (line 269) | struct qsockaddr
type qsocket_s (line 285) | struct qsocket_s
type qsocket_s (line 288) | struct qsocket_s
type qsocket_s (line 295) | struct qsocket_s
type qsocket_s (line 302) | struct qsocket_s
type qsocket_s (line 303) | struct qsocket_s
type qsocket_s (line 313) | struct qsocket_s
type PollProcedure (line 325) | typedef struct _PollProcedure
FILE: source/net_adhoc.h
type qsockaddr (line 27) | struct qsockaddr
type qsockaddr (line 29) | struct qsockaddr
type qsockaddr (line 30) | struct qsockaddr
type qsockaddr (line 32) | struct qsockaddr
type qsockaddr (line 33) | struct qsockaddr
type qsockaddr (line 34) | struct qsockaddr
type qsockaddr (line 35) | struct qsockaddr
type qsockaddr (line 36) | struct qsockaddr
type qsockaddr (line 37) | struct qsockaddr
type qsockaddr (line 37) | struct qsockaddr
type qsockaddr (line 38) | struct qsockaddr
type qsockaddr (line 39) | struct qsockaddr
FILE: source/net_adhoc_psp2.c
type sockaddr_adhoc (line 42) | typedef struct sockaddr_adhoc
type qsockaddr (line 54) | struct qsockaddr
function AdHoc_Init (line 60) | int AdHoc_Init (void)
function AdHoc_Shutdown (line 104) | void AdHoc_Shutdown (void)
function AdHoc_Listen (line 115) | void AdHoc_Listen (bool state)
function AdHoc_OpenSocket (line 137) | int AdHoc_OpenSocket (int port)
function AdHoc_CloseSocket (line 149) | int AdHoc_CloseSocket (int socket)
function AdHoc_Connect (line 159) | int AdHoc_Connect (int socket, struct qsockaddr *addr)
function SceNetAdhocPdpStat (line 168) | SceNetAdhocPdpStat *findPdpStat(int socket, SceNetAdhocPdpStat *pdpStat)
function AdHoc_CheckNewConnections (line 178) | int AdHoc_CheckNewConnections (void)
function AdHoc_Read (line 198) | int AdHoc_Read (int socket, byte *buf, int len, struct qsockaddr *addr)
function AdHoc_MakeSocketBroadcastCapable (line 218) | int AdHoc_MakeSocketBroadcastCapable (int socket)
function AdHoc_Broadcast (line 228) | int AdHoc_Broadcast (int socket, byte *buf, int len)
function AdHoc_Write (line 250) | int AdHoc_Write (int socket, byte *buf, int len, struct qsockaddr *addr)
type qsockaddr (line 265) | struct qsockaddr
function AdHoc_StringToAddr (line 278) | int AdHoc_StringToAddr (char *string, struct qsockaddr *addr)
function AdHoc_GetSocketAddr (line 298) | int AdHoc_GetSocketAddr (int socket, struct qsockaddr *addr)
function AdHoc_GetNameFromAddr (line 318) | int AdHoc_GetNameFromAddr (struct qsockaddr *addr, char *name)
function AdHoc_GetAddrFromName (line 326) | int AdHoc_GetAddrFromName(char *name, struct qsockaddr *addr)
function AdHoc_AddrCompare (line 334) | int AdHoc_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2)
function AdHoc_GetSocketPort (line 345) | int AdHoc_GetSocketPort (struct qsockaddr *addr)
function AdHoc_SetSocketPort (line 352) | int AdHoc_SetSocketPort (struct qsockaddr *addr, int port)
FILE: source/net_dgrm.c
type in_addr (line 33) | struct in_addr
type sockaddr_in (line 43) | struct sockaddr_in
function Strip_Port (line 92) | void Strip_Port(char *ch)
type qsockaddr (line 125) | struct qsockaddr
function NET_Ban_f (line 142) | void NET_Ban_f (void)
function qsocket_t (line 198) | qsocket_t *Datagram_Reject(char *message, int acceptsock, struct qsockad...
function Datagram_SendMessage (line 212) | int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data)
function SendMessageNext (line 259) | int SendMessageNext (qsocket_t *sock)
function ReSendMessage (line 292) | int ReSendMessage (qsocket_t *sock)
function Datagram_CanSendMessage (line 325) | bool Datagram_CanSendMessage (qsocket_t *sock)
function Datagram_CanSendUnreliableMessage (line 334) | bool Datagram_CanSendUnreliableMessage (qsocket_t *sock)
function Datagram_SendUnreliableMessage (line 340) | int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
function Datagram_GetMessage (line 366) | int Datagram_GetMessage (qsocket_t *sock)
function PrintStats (line 532) | void PrintStats(qsocket_t *s)
function NET_Stats_f (line 540) | void NET_Stats_f (void)
function Test_Poll (line 588) | static void Test_Poll(void)
function Test_f (line 645) | static void Test_f (void)
function Test2_Poll (line 716) | static void Test2_Poll(void)
function Test2_f (line 774) | static void Test2_f (void)
function Datagram_Init (line 833) | int Datagram_Init (void)
function Datagram_Shutdown (line 867) | void Datagram_Shutdown (void)
function Datagram_Close (line 885) | void Datagram_Close (qsocket_t *sock)
function Datagram_Listen (line 891) | void Datagram_Listen (bool state)
function qsocket_t (line 901) | static qsocket_t *_Datagram_CheckNewConnections (void)
function qsocket_t (line 1165) | qsocket_t *Datagram_CheckNewConnections (void)
function _Datagram_SearchForHosts (line 1177) | static void _Datagram_SearchForHosts (bool xmit)
function Datagram_SearchForHosts (line 1276) | void Datagram_SearchForHosts (bool xmit)
function qsocket_t (line 1287) | static qsocket_t *_Datagram_Connect (char *host)
function qsocket_t (line 1486) | qsocket_t *Datagram_Connect (char *host)
FILE: source/net_loop.c
function Loop_Init (line 29) | int Loop_Init (void)
function Loop_Shutdown (line 37) | void Loop_Shutdown (void)
function Loop_Listen (line 42) | void Loop_Listen (bool state)
function Loop_SearchForHosts (line 47) | void Loop_SearchForHosts (bool xmit)
function qsocket_t (line 65) | qsocket_t *Loop_Connect (char *host)
function qsocket_t (line 109) | qsocket_t *Loop_CheckNewConnections (void)
function IntAlign (line 125) | static int IntAlign(int value)
function Loop_GetMessage (line 131) | int Loop_GetMessage (qsocket_t *sock)
function Loop_SendMessage (line 158) | int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
function Loop_SendUnreliableMessage (line 192) | int Loop_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
function Loop_CanSendMessage (line 224) | bool Loop_CanSendMessage (qsocket_t *sock)
function Loop_CanSendUnreliableMessage (line 232) | bool Loop_CanSendUnreliableMessage (qsocket_t *sock)
function Loop_Close (line 238) | void Loop_Close (qsocket_t *sock)
FILE: source/net_main.c
function SetNetTime (line 82) | double SetNetTime(void)
function qsocket_t (line 96) | qsocket_t *NET_NewQSocket (void)
function NET_FreeQSocket (line 135) | void NET_FreeQSocket(qsocket_t *sock)
function NET_Listen_f (line 161) | static void NET_Listen_f (void)
function MaxPlayers_f (line 180) | static void MaxPlayers_f (void)
function NET_Port_f (line 219) | static void NET_Port_f (void)
function PrintSlistHeader (line 248) | static void PrintSlistHeader(void)
function PrintSlist (line 256) | static void PrintSlist(void)
function PrintSlistTrailer (line 271) | static void PrintSlistTrailer(void)
function NET_Slist_f (line 280) | void NET_Slist_f (void)
function Slist_Send (line 301) | static void Slist_Send(void)
function Slist_Poll (line 317) | static void Slist_Poll(void)
function qsocket_t (line 354) | qsocket_t *NET_Connect (char *host)
function qsocket_t (line 443) | qsocket_t *NET_CheckNewConnections (void)
function NET_Close (line 486) | void NET_Close (qsocket_t *sock)
function NET_GetMessage (line 526) | int NET_GetMessage (qsocket_t *sock)
function NET_SendMessage (line 611) | int NET_SendMessage (qsocket_t *sock, sizebuf_t *data)
function NET_SendUnreliableMessage (line 642) | int NET_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
function NET_CanSendMessage (line 681) | bool NET_CanSendMessage (qsocket_t *sock)
function NET_SendToAll (line 708) | int NET_SendToAll(sizebuf_t *data, int blocktime)
function NET_Init (line 790) | void NET_Init (void)
function NET_Shutdown (line 873) | void NET_Shutdown (void)
function NET_Poll (line 904) | void NET_Poll(void)
function SchedulePollProcedure (line 920) | void SchedulePollProcedure(PollProcedure *proc, double timeOffset)
function IsID (line 947) | bool IsID(struct qsockaddr *addr)
FILE: source/net_udp.h
type qsockaddr (line 27) | struct qsockaddr
type qsockaddr (line 29) | struct qsockaddr
type qsockaddr (line 30) | struct qsockaddr
type qsockaddr (line 32) | struct qsockaddr
type qsockaddr (line 33) | struct qsockaddr
type qsockaddr (line 34) | struct qsockaddr
type qsockaddr (line 35) | struct qsockaddr
type qsockaddr (line 36) | struct qsockaddr
type qsockaddr (line 37) | struct qsockaddr
type qsockaddr (line 37) | struct qsockaddr
type qsockaddr (line 38) | struct qsockaddr
type qsockaddr (line 39) | struct qsockaddr
FILE: source/net_udp_psp2.c
type hostent (line 41) | struct hostent{
type in_addr (line 61) | struct in_addr {
type sockaddr_in (line 65) | struct sockaddr_in {
type sockaddr (line 72) | struct sockaddr {
function convertSceNetSockaddrIn (line 77) | inline int convertSceNetSockaddrIn(struct SceNetSockaddrIn* src, struct ...
function convertSockaddrIn (line 85) | inline int convertSockaddrIn(struct SceNetSockaddrIn* dst, const struct ...
function convertSceNetSockaddr (line 93) | inline int convertSceNetSockaddr(struct SceNetSockaddr* src, struct sock...
function convertSockaddr (line 100) | inline int convertSockaddr(struct SceNetSockaddr* dst, const struct sock...
function socket (line 107) | inline int socket(int domain, int type, int protocol){
function recvfrom (line 111) | inline int recvfrom(int sockfd, void* buf, long len, int flags, struct s...
function getsockname (line 118) | inline int getsockname(int sockfd, struct sockaddr *addr, unsigned int *...
function bind (line 126) | inline int bind(int sockfd, const struct sockaddr* addr, unsigned int ad...
function close (line 132) | inline int close(int sockfd){
function setsockopt (line 136) | inline int setsockopt(int sockfd, int level, int optname, const void *op...
function sendto (line 140) | inline unsigned int sendto(int sockfd, const void *buf, unsigned int len...
type hostent (line 147) | struct hostent
type hostent (line 149) | struct hostent
type SceNetInAddr (line 151) | struct SceNetInAddr
type SceNetInAddr (line 170) | struct SceNetInAddr
type qsockaddr (line 180) | struct qsockaddr
function UDP_Init (line 190) | int UDP_Init (void)
function UDP_Shutdown (line 262) | void UDP_Shutdown (void)
function UDP_Listen (line 274) | void UDP_Listen (bool state)
function UDP_OpenSocket (line 296) | int UDP_OpenSocket (int port)
function UDP_CloseSocket (line 325) | int UDP_CloseSocket (int socket)
function PartialIPAddress (line 343) | static int PartialIPAddress (char *in, struct qsockaddr *hostaddr)
function UDP_Connect (line 394) | int UDP_Connect (int socket, struct qsockaddr *addr)
function UDP_CheckNewConnections (line 402) | int UDP_CheckNewConnections (void)
function UDP_Read (line 418) | int UDP_Read (int socket, byte *buf, int len, struct qsockaddr *addr)
function UDP_MakeSocketBroadcastCapable (line 434) | int UDP_MakeSocketBroadcastCapable (int socket)
function UDP_Broadcast (line 448) | int UDP_Broadcast (int socket, byte *buf, int len)
function UDP_Write (line 470) | int UDP_Write (int socket, byte *buf, int len, struct qsockaddr *addr)
type qsockaddr (line 485) | struct qsockaddr
type sockaddr_in (line 490) | struct sockaddr_in
type sockaddr_in (line 491) | struct sockaddr_in
function UDP_StringToAddr (line 498) | int UDP_StringToAddr (char *string, struct qsockaddr *addr)
function UDP_GetSocketAddr (line 515) | int UDP_GetSocketAddr (int socket, struct qsockaddr *addr)
function UDP_GetNameFromAddr (line 534) | int UDP_GetNameFromAddr (struct qsockaddr *addr, char *name)
function UDP_GetAddrFromName (line 542) | int UDP_GetAddrFromName(char *name, struct qsockaddr *addr)
function UDP_AddrCompare (line 563) | int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2)
function UDP_GetSocketPort (line 586) | int UDP_GetSocketPort (struct qsockaddr *addr)
function UDP_SetSocketPort (line 593) | int UDP_SetSocketPort (struct qsockaddr *addr, int port)
FILE: source/net_vcr.c
function VCR_Init (line 39) | int VCR_Init (void)
function VCR_ReadNext (line 56) | void VCR_ReadNext (void)
function VCR_Listen (line 68) | void VCR_Listen (bool state)
function VCR_Shutdown (line 73) | void VCR_Shutdown (void)
function VCR_GetMessage (line 78) | int VCR_GetMessage (qsocket_t *sock)
function VCR_SendMessage (line 101) | int VCR_SendMessage (qsocket_t *sock, sizebuf_t *data)
function VCR_CanSendMessage (line 116) | bool VCR_CanSendMessage (qsocket_t *sock)
function VCR_Close (line 131) | void VCR_Close (qsocket_t *sock)
function VCR_SearchForHosts (line 136) | void VCR_SearchForHosts (bool xmit)
function qsocket_t (line 141) | qsocket_t *VCR_Connect (char *host)
function qsocket_t (line 147) | qsocket_t *VCR_CheckNewConnections (void)
FILE: source/nonintel.c
function R_Surf8Patch (line 35) | void R_Surf8Patch ()
function R_Surf16Patch (line 46) | void R_Surf16Patch ()
function R_SurfacePatch (line 57) | void R_SurfacePatch (void)
FILE: source/pr_cmds.c
function extension_find (line 63) | bool extension_find(char *name)
function PF_extension_find (line 82) | void PF_extension_find (void)
function PF_error (line 135) | void PF_error(void)
function PF_objerror (line 159) | void PF_objerror(void)
function PF_makevectors (line 184) | void PF_makevectors(void)
function PF_setorigin (line 198) | void PF_setorigin(void)
function PF_copyentity (line 209) | void PF_copyentity(void)
function SetMinMaxSize (line 218) | void SetMinMaxSize(edict_t *e, float *min, float *max, bool rotate)
function PF_setsize (line 303) | void PF_setsize(void)
function PF_setmodel (line 322) | void PF_setmodel(void)
function PF_bprint (line 361) | void PF_bprint(void)
function PF_sprint (line 378) | void PF_sprint(void)
function PF_centerprint (line 409) | void PF_centerprint(void)
function PF_normalize (line 438) | void PF_normalize(void)
function PF_vlen (line 469) | void PF_vlen(void)
function PF_vectoyaw (line 489) | void PF_vectoyaw(void)
function PF_vectoangles (line 516) | void PF_vectoangles(void)
function PF_random (line 558) | void PF_random(void)
function PF_particle (line 574) | void PF_particle(void)
function PF_ambientsound (line 594) | void PF_ambientsound(void)
function PF_sound (line 646) | void PF_sound(void)
function PF_break (line 679) | void PF_break(void)
function PF_traceline (line 697) | void PF_traceline(void)
function PF_tracebox (line 725) | void PF_tracebox (void)
function PF_TraceToss (line 759) | void PF_TraceToss(void)
function PF_checkpos (line 796) | void PF_checkpos(void)
function PF_newcheckclient (line 804) | int PF_newcheckclient(int check)
function PF_checkclient (line 871) | void PF_checkclient(void)
function PF_stuffcmd (line 922) | void PF_stuffcmd(void)
function PF_localcmd (line 948) | void PF_localcmd(void)
function PF_cvar (line 963) | void PF_cvar(void)
function PF_cvar_set (line 979) | void PF_cvar_set(void)
function PF_findradius (line 998) | void PF_findradius(void)
function PF_dprint (line 1036) | void PF_dprint(void)
function PF_ftos (line 1043) | void PF_ftos(void)
function PF_fabs (line 1055) | void PF_fabs(void)
function PF_vtos (line 1062) | void PF_vtos(void)
function PF_etos (line 1068) | void PF_etos(void)
function PF_Spawn (line 1074) | void PF_Spawn(void)
function PF_Remove (line 1081) | void PF_Remove(void)
function PF_Find (line 1091) | void PF_Find(void)
function PR_CheckEmptyString (line 1122) | void PR_CheckEmptyString(char *s)
function PF_precache_file (line 1128) | void PF_precache_file(void)
function PF_precache_sound (line 1133) | void PF_precache_sound(void)
function PF_precache_model (line 1158) | void PF_precache_model(void)
function PF_coredump (line 1185) | void PF_coredump(void)
function PF_traceon (line 1190) | void PF_traceon(void)
function PF_traceoff (line 1195) | void PF_traceoff(void)
function PF_eprint (line 1200) | void PF_eprint(void)
function PF_walkmove (line 1212) | void PF_walkmove(void)
function PF_droptofloor (line 1255) | void PF_droptofloor(void)
function PF_lightstyle (line 1287) | void PF_lightstyle(void)
function PF_rint (line 1313) | void PF_rint(void)
function PF_floor (line 1322) | void PF_floor(void)
function PF_ceil (line 1326) | void PF_ceil(void)
function PF_checkbottom (line 1337) | void PF_checkbottom(void)
function PF_pointcontents (line 1351) | void PF_pointcontents(void)
function PF_nextent (line 1367) | void PF_nextent(void)
function PF_aim (line 1399) | void PF_aim(void)
function PF_changeyaw (line 1478) | void PF_changeyaw(void)
function PF_changepitch (line 1521) | void PF_changepitch(void)
function sizebuf_t (line 1572) | sizebuf_t *WriteDest(void)
function PF_WriteByte (line 1605) | void PF_WriteByte(void)
function PF_WriteChar (line 1610) | void PF_WriteChar(void)
function PF_WriteShort (line 1615) | void PF_WriteShort(void)
function PF_WriteLong (line 1620) | void PF_WriteLong(void)
function PF_WriteAngle (line 1625) | void PF_WriteAngle(void)
function PF_WriteCoord (line 1630) | void PF_WriteCoord(void)
function PF_WriteString (line 1635) | void PF_WriteString(void)
function PF_WriteEntity (line 1641) | void PF_WriteEntity(void)
function PF_makestatic (line 1650) | void PF_makestatic(void)
function PF_setspawnparms (line 1681) | void PF_setspawnparms(void)
function PF_changelevel (line 1704) | void PF_changelevel(void)
function PF_WaterMove (line 1749) | void PF_WaterMove(void)
function PF_sin (line 1874) | void PF_sin(void)
function PF_cos (line 1879) | void PF_cos(void)
function PF_sqrt (line 1884) | void PF_sqrt(void)
function PF_asin (line 1889) | void PF_asin(void)
function PF_acos (line 1894) | void PF_acos(void)
function PF_atan (line 1899) | void PF_atan(void)
function PF_atan2 (line 1904) | void PF_atan2(void)
function PF_tan (line 1909) | void PF_tan(void)
function PF_randomvec (line 1914) | void PF_randomvec(void)
function PF_min (line 1928) | void PF_min (void)
function PF_max (line 1953) | void PF_max (void)
function PF_bound (line 1978) | void PF_bound (void)
function PF_pow (line 1990) | void PF_pow(void)
function PF_findchain (line 1997) | void PF_findchain (void)
function PF_findchainfloat (line 2034) | void PF_findchainfloat (void)
function PF_log (line 2061) | void PF_log(void)
function PF_bitshift (line 2066) | void PF_bitshift(void)
function PF_Fixme (line 2079) | void PF_Fixme(void)
function PF_strzone (line 2091) | void PF_strzone (void)
function PF_strunzone (line 2107) | void PF_strunzone (void)
function PF_strlen (line 2119) | void PF_strlen (void)
function PF_strcat (line 2131) | void PF_strcat (void)
function PF_substring (line 2175) | void PF_substring (void)
function PF_stof (line 2214) | void PF_stof (void)
function PF_stov (line 2228) | void PF_stov (void)
function PF_fopen (line 2255) | void PF_fopen (void)
function PF_fclose (line 2299) | void PF_fclose (void)
function PF_fgets (line 2311) | void PF_fgets (void)
function PF_fputs (line 2358) | void PF_fputs (void)
function PF_cmd_find (line 2374) | void PF_cmd_find (void)
function PF_cvar_find (line 2392) | void PF_cvar_find (void)
function PF_cvar_string (line 2414) | void PF_cvar_string (void)
function PF_WriteFloat (line 2437) | void PF_WriteFloat (void)
function PF_etof (line 2450) | void PF_etof (void)
function PF_ftoe (line 2463) | void PF_ftoe (void)
function PF_builtin_find (line 2483) | void PF_builtin_find (void)
FILE: source/pr_comp.h
type func_t (line 23) | typedef int func_t;
type string_t (line 24) | typedef int string_t;
type etype_t (line 26) | typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_fie...
type dstatement_t (line 121) | typedef struct statement_s
type ddef_t (line 127) | typedef struct
type dfunction_t (line 138) | typedef struct
type dprograms_t (line 155) | typedef struct
FILE: source/pr_edict.c
type gefv_cache (line 62) | typedef struct {
function FindFieldOffset (line 77) | int FindFieldOffset (char *field)
function FindEdictFieldOffsets (line 88) | void FindEdictFieldOffsets (void)
function ED_ClearEdict (line 105) | void ED_ClearEdict (edict_t *e)
function edict_t (line 122) | edict_t *ED_Alloc (void)
function ED_Free (line 157) | void ED_Free (edict_t *ed)
function ddef_t (line 183) | ddef_t *ED_GlobalAtOfs (int ofs)
function ddef_t (line 202) | ddef_t *ED_FieldAtOfs (int ofs)
function ddef_t (line 221) | ddef_t *ED_FindField (char *name)
function ddef_t (line 241) | ddef_t *ED_FindGlobal (char *name)
function dfunction_t (line 261) | dfunction_t *ED_FindFunction (char *name)
function eval_t (line 276) | eval_t *GetEdictFieldValue(edict_t *ed, char *field)
function ED_Print (line 470) | void ED_Print (edict_t *ed)
function ED_Write (line 520) | void ED_Write (FILE *f, edict_t *ed)
function ED_PrintNum (line 560) | void ED_PrintNum (int ent)
function ED_PrintEdicts (line 572) | void ED_PrintEdicts (void)
function ED_PrintEdict_f (line 588) | void ED_PrintEdict_f (void)
function ED_Count (line 608) | void ED_Count (void)
function ED_WriteGlobals (line 651) | void ED_WriteGlobals (FILE *f)
function ED_ParseGlobals (line 684) | void ED_ParseGlobals (char *data)
function ED_ParseEpair (line 763) | bool ED_ParseEpair (void *base, ddef_t *key, char *s)
function ED_LoadFromFile (line 939) | void ED_LoadFromFile (char *data)
function PR_LoadProgs (line 1019) | void PR_LoadProgs (const char *progsname)
function PR_Extension_List_f (line 1231) | void PR_Extension_List_f (void)
function PR_BuiltInList_f (line 1274) | void PR_BuiltInList_f (void)
function PR_Init (line 1317) | void PR_Init (void)
function edict_t (line 1345) | edict_t *EDICT_NUM(int n)
function NUM_FOR_EDICT (line 1352) | int NUM_FOR_EDICT(edict_t *e)
FILE: source/pr_exec.c
type prstack_t (line 28) | typedef struct
function PR_PrintStatement (line 150) | void PR_PrintStatement (dstatement_t *s)
function PR_StackTrace (line 190) | void PR_StackTrace (void)
function PR_Profile_f (line 222) | void PR_Profile_f (void)
function PR_RunError (line 261) | void PR_RunError (char *error, ...)
function PR_EnterFunction (line 296) | int PR_EnterFunction (dfunction_t *f)
function PR_LeaveFunction (line 335) | int PR_LeaveFunction (void)
function PR_ExecuteProgram (line 363) | void PR_ExecuteProgram (func_t fnum)
FILE: source/progs.h
type eval_t (line 24) | typedef union eval_s
type edict_t (line 35) | typedef struct edict_s
type ebfs_builtin_t (line 121) | typedef struct ebfs_builtin_s
FILE: source/quakedef.h
type entity_state_t (line 239) | typedef struct
type quakeparms_t (line 295) | typedef struct
type ModsList (line 441) | typedef struct ModsList{
FILE: source/r_local.h
type alight_t (line 35) | typedef struct {
type bedge_t (line 44) | typedef struct bedge_s
type auxvert_t (line 50) | typedef struct {
type clipplane_t (line 87) | typedef struct clipplane_s
type btofpoly_t (line 206) | typedef struct btofpoly_s {
FILE: source/r_part.c
function R_InitParticles (line 47) | void R_InitParticles (void)
function R_EntityParticles (line 81) | void R_EntityParticles (entity_t *ent)
function R_ClearParticles (line 150) | void R_ClearParticles (void)
function R_ReadPointFile_f (line 167) | void R_ReadPointFile_f (void)
function R_ParseParticleEffect (line 222) | void R_ParseParticleEffect (void)
function R_ParticleExplosion (line 248) | void R_ParticleExplosion (vec3_t org)
function R_ParticleExplosion2 (line 288) | void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
function R_BlobExplosion (line 322) | void R_BlobExplosion (vec3_t org)
function R_RunParticleEffect (line 367) | void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
function R_LavaSplash (line 422) | void R_LavaSplash (vec3_t org)
function R_TeleportSplash (line 464) | void R_TeleportSplash (vec3_t org)
function R_RocketTrail (line 507) | void R_RocketTrail (vec3_t start, vec3_t end, int type)
function CL_RunParticles (line 619) | void CL_RunParticles (void)
function R_DrawParticles (line 727) | void R_DrawParticles (void)
FILE: source/r_shared.h
type espan_t (line 72) | typedef struct espan_s
type surf_t (line 80) | typedef struct surf_s
type edge_t (line 144) | typedef struct edge_s
FILE: source/render.h
type efrag_t (line 30) | typedef struct efrag_s
type entity_t (line 39) | typedef struct entity_s
type refdef_t (line 92) | typedef struct
type texture_s (line 132) | struct texture_s
type miptex_s (line 141) | struct miptex_s
FILE: source/sbar.c
function Sbar_ShowScores (line 78) | void Sbar_ShowScores (void)
function Sbar_DontShowScores (line 93) | void Sbar_DontShowScores (void)
function Sbar_Changed (line 104) | void Sbar_Changed (void)
function Sbar_Init (line 114) | void Sbar_Init (void)
function Sbar_DrawPic (line 263) | inline __attribute__((always_inline)) void Sbar_DrawPic (int x, int y, q...
function Sbar_DrawPicAlpha (line 273) | inline __attribute__((always_inline)) void Sbar_DrawPicAlpha (int x, int...
function Sbar_DrawCharacter (line 285) | inline __attribute__((always_inline)) void Sbar_DrawCharacter (int x, in...
function Sbar_DrawString (line 295) | inline __attribute__((always_inline)) void Sbar_DrawString (int x, int y...
function Sbar_itoa (line 305) | int Sbar_itoa (int num, char *buf)
function Sbar_DrawNum (line 341) | void Sbar_DrawNum (int x, int y, int num, int digits, int color)
function Sbar_SortFrags (line 384) | void Sbar_SortFrags (void)
function Sbar_ColorForMap (line 409) | int Sbar_ColorForMap (int m)
function Sbar_UpdateScoreboard (line 419) | void Sbar_UpdateScoreboard (void)
function Sbar_SoloScoreboard (line 450) | void Sbar_SoloScoreboard (void)
function Sbar_DrawScoreboard (line 482) | void Sbar_DrawScoreboard (void)
function Sbar_DrawInventory (line 496) | void Sbar_DrawInventory (void)
function Sbar_DrawFrags (line 717) | void Sbar_DrawFrags (void)
function Sbar_DrawFace (line 768) | void Sbar_DrawFace (void)
function Sbar_Draw (line 867) | void Sbar_Draw (void)
function Sbar_IntermissionNumber (line 1001) | void Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
function Sbar_DeathmatchOverlay (line 1033) | void Sbar_DeathmatchOverlay (void)
function Sbar_MiniDeathmatchOverlay (line 1101) | void Sbar_MiniDeathmatchOverlay (void)
function Sbar_IntermissionOverlay (line 1189) | void Sbar_IntermissionOverlay (void)
function Sbar_FinaleOverlay (line 1240) | void Sbar_FinaleOverlay (void)
FILE: source/server.h
type server_static_t (line 22) | typedef struct
type server_state_t (line 33) | typedef enum {ss_loading, ss_active} server_state_t;
type server_t (line 35) | typedef struct
type client_t (line 78) | typedef struct client_s
type qsocket_s (line 248) | struct qsocket_s
FILE: source/snd_dma.c
function S_AmbientOff (line 98) | void S_AmbientOff (void)
function S_AmbientOn (line 104) | void S_AmbientOn (void)
function S_SoundInfo_f (line 110) | void S_SoundInfo_f(void)
function S_Startup (line 135) | void S_Startup (void)
function S_Init (line 165) | void S_Init (void)
function S_Shutdown (line 246) | void S_Shutdown(void)
function sfx_t (line 275) | sfx_t *S_FindName (char *name)
function S_TouchSound (line 311) | void S_TouchSound (char *name)
function sfx_t (line 328) | sfx_t *S_PrecacheSound (char *name)
function channel_t (line 352) | channel_t *SND_PickChannel(int entnum, int entchannel)
function SND_Spatialize (line 396) | void SND_Spatialize(channel_t *ch)
function S_StartSound (line 449) | void S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin,...
function S_StopSound (line 517) | void S_StopSound(int entnum, int entchannel)
function S_StopAllSounds (line 533) | void S_StopAllSounds(bool clear)
function S_StopAllSoundsC (line 552) | void S_StopAllSoundsC (void)
function S_ClearBuffer (line 557) | void S_ClearBuffer (void)
function S_StaticSound (line 618) | void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuat...
function S_UpdateAmbientSounds (line 662) | void S_UpdateAmbientSounds (void)
function S_Update (line 719) | void S_Update(vec3_t origin, vec3_t forward, vec3_t right, vec3_t up)
function GetSoundtime (line 808) | void GetSoundtime(void)
function S_ExtraUpdate (line 842) | void S_ExtraUpdate (void)
function S_Update_ (line 854) | void S_Update_(void)
function S_Play (line 910) | void S_Play(void)
function S_PlayVol (line 933) | void S_PlayVol(void)
function S_SoundList (line 958) | void S_SoundList(void)
function S_LocalSound (line 983) | void S_LocalSound (char *sound)
function S_ClearPrecache (line 1002) | void S_ClearPrecache (void)
function S_BeginPrecaching (line 1007) | void S_BeginPrecaching (void)
function S_EndPrecaching (line 1012) | void S_EndPrecaching (void)
FILE: source/snd_mem.c
function ResampleSfx (line 33) | void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, byte *data)
function sfxcache_t (line 97) | sfxcache_t *S_LoadSound (sfx_t *s)
function GetLittleShort (line 172) | short GetLittleShort(void)
function GetLittleLong (line 181) | int GetLittleLong(void)
function FindNextChunk (line 192) | void FindNextChunk(char *name)
function FindChunk (line 220) | void FindChunk(char *name)
function DumpChunks (line 227) | void DumpChunks(void)
function wavinfo_t (line 248) | wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength)
FILE: source/snd_mix.c
function Snd_WriteLinearBlastStereo16 (line 35) | void Snd_WriteLinearBlastStereo16 (void)
function S_TransferStereo16 (line 61) | void S_TransferStereo16 (int endtime)
function S_TransferPaintBuffer (line 135) | void S_TransferPaintBuffer(int endtime)
function S_PaintChannels (line 257) | void S_PaintChannels(int endtime)
function SND_InitScaletable (line 330) | void SND_InitScaletable (void)
function SND_PaintChannelFrom8 (line 342) | void SND_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count)
function SND_PaintChannelFrom16 (line 371) | void SND_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count)
FILE: source/snd_psp2.c
function audio_thread (line 37) | static int audio_thread(int args, void *argp)
function SNDDMA_Init (line 56) | bool SNDDMA_Init(void)
function SNDDMA_GetDMAPos (line 87) | int SNDDMA_GetDMAPos(void)
function SNDDMA_Shutdown (line 101) | void SNDDMA_Shutdown(void)
function SNDDMA_Submit (line 115) | void SNDDMA_Submit(void)
FILE: source/sound.h
type portable_samplepair_t (line 29) | typedef struct
type sfx_t (line 35) | typedef struct sfx_s
type sfxcache_t (line 42) | typedef struct
type dma_t (line 52) | typedef struct
type channel_t (line 67) | typedef struct
type wavinfo_t (line 82) | typedef struct
FILE: source/spritegn.h
type synctype_t (line 66) | typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
type dsprite_t (line 70) | typedef struct {
type dspriteframe_t (line 88) | typedef struct {
type dspritegroup_t (line 94) | typedef struct {
type dspriteinterval_t (line 98) | typedef struct {
type spriteframetype_t (line 102) | typedef enum { SPR_SINGLE=0, SPR_GROUP } spriteframetype_t;
type dspriteframetype_t (line 104) | typedef struct {
FILE: source/sv_main.c
function SV_Init (line 39) | void SV_Init (void)
function SV_StartParticle (line 86) | void SV_StartParticle (vec3_t org, vec3_t dir, int color, int count)
function SV_StartSound (line 124) | void SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
function SV_SendServerinfo (line 195) | void SV_SendServerinfo (client_t *client)
function SV_ConnectClient (line 263) | void SV_ConnectClient (int clientnum)
function SV_CheckForNewClients (line 325) | void SV_CheckForNewClients (void)
function SV_ClearDatagram (line 371) | void SV_ClearDatagram (void)
function SV_AddToFatPVS (line 390) | void SV_AddToFatPVS (vec3_t org, mnode_t *node)
function byte (line 433) | byte *SV_FatPVS (vec3_t org)
function SV_WriteEntitiesToClient (line 449) | void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
function SV_CleanupEnts (line 627) | void SV_CleanupEnts (void)
function SV_WriteClientdataToMessage (line 646) | void SV_WriteClientdataToMessage (edict_t *ent, sizebuf_t *msg)
function SV_SendClientDatagram (line 790) | bool SV_SendClientDatagram (client_t *client)
function SV_UpdateToReliableMessages (line 826) | void SV_UpdateToReliableMessages (void)
function SV_SendNop (line 868) | void SV_SendNop (client_t *client)
function SV_SendClientMessages (line 889) | void SV_SendClientMessages (void)
function SV_ModelIndex (line 978) | int SV_ModelIndex (char *name)
function SV_CreateBaseline (line 999) | void SV_CreateBaseline (void)
function SV_SendReconnect (line 1059) | void SV_SendReconnect (void)
function SV_SaveSpawnparms (line 1089) | void SV_SaveSpawnparms (void)
function SV_SpawnServer (line 1121) | void SV_SpawnServer (char *server)
FILE: source/sv_move.c
function SV_CheckBottom (line 37) | bool SV_CheckBottom (edict_t *ent)
function SV_movestep (line 110) | bool SV_movestep (edict_t *ent, vec3_t move, bool relink)
function SV_StepDirection (line 233) | bool SV_StepDirection (edict_t *ent, float yaw, float dist)
function SV_FixCheckBottom (line 268) | void SV_FixCheckBottom (edict_t *ent)
function SV_NewChaseDir (line 284) | void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
function SV_CloseEnough (line 373) | bool SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
function SV_MoveToGoal (line 393) | void SV_MoveToGoal (void)
FILE: source/sv_phys.c
function SV_CheckAllEnts (line 63) | void SV_CheckAllEnts (void)
function SV_CheckVelocity (line 92) | void SV_CheckVelocity (edict_t *ent)
function SV_RunThink (line 128) | bool SV_RunThink (edict_t *ent)
function SV_Impact (line 155) | void SV_Impact (edict_t *e1, edict_t *e2)
function ClipVelocity (line 192) | int ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
function SV_FlyMove (line 231) | int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
function SV_AddGravity (line 373) | void SV_AddGravity (edict_t *ent)
function trace_t (line 410) | trace_t SV_PushEntity (edict_t *ent, vec3_t push)
function SV_PushMove (line 441) | void SV_PushMove (edict_t *pusher, float movetime)
function SV_PushRotate (line 568) | void SV_PushRotate (edict_t *pusher, float movetime)
function SV_Physics_Pusher (line 706) | void SV_Physics_Pusher (edict_t *ent)
function SV_CheckStuck (line 764) | void SV_CheckStuck (edict_t *ent)
function SV_CheckWater (line 810) | bool SV_CheckWater (edict_t *ent)
function SV_WallFriction (line 869) | void SV_WallFriction (edict_t *ent, trace_t *trace)
function SV_TryUnstick (line 903) | int SV_TryUnstick (edict_t *ent, vec3_t oldvel)
function SV_WalkMove (line 960) | void SV_WalkMove (edict_t *ent)
function SV_Physics_Client (line 1061) | void SV_Physics_Client (edict_t *ent, int num)
function SV_Physics_None (line 1144) | void SV_Physics_None (edict_t *ent)
function SV_Physics_Follow (line 1158) | void SV_Physics_Follow (edict_t *ent)
function SV_Physics_Noclip (line 1174) | void SV_Physics_Noclip (edict_t *ent)
function SV_CheckWaterTransition (line 1200) | void SV_CheckWaterTransition (edict_t *ent)
function SV_Physics_Toss (line 1247) | void SV_Physics_Toss (edict_t *ent)
function SV_Physics_Step (line 1365) | void SV_Physics_Step (edict_t *ent)
function SV_Physics_Step (line 1470) | void SV_Physics_Step (edict_t *ent)
function SV_Physics (line 1509) | void SV_Physics (void)
function trace_t (line 1580) | trace_t SV_Trace_Toss (edict_t *ent, edict_t *ignore)
FILE: source/sv_user.c
function SV_SetIdealPitch (line 58) | void SV_SetIdealPitch (void)
function SV_UserFriction (line 127) | void SV_UserFriction (void)
function SV_Accelerate (line 172) | void SV_Accelerate (void)
function SV_AirAccelerate (line 189) | void SV_AirAccelerate (vec3_t wishveloc)
function DropPunchAngle (line 211) | void DropPunchAngle (void)
function SV_WaterMove (line 229) | void SV_WaterMove (void)
function SV_WaterJump (line 289) | void SV_WaterJump (void)
function SV_AirMove (line 308) | void SV_AirMove (void)
function SV_ClientThink (line 362) | void SV_ClientThink (void)
function SV_ReadClientMove (line 420) | void SV_ReadClientMove (usercmd_t *move)
function SV_ReadClientMessage (line 485) | bool SV_ReadClientMessage (void)
function SV_RunClients (line 603) | void SV_RunClients (void)
FILE: source/sys_psp2.c
function ModsList (line 44) | ModsList *addMod(char* name, ModsList* db){
function Sys_FindHandle (line 90) | int Sys_FindHandle(void)
function Log (line 100) | void Log(const char *format, ...) {
function Sys_FileLength (line 120) | int Sys_FileLength(FILE *f)
function Sys_FileOpenRead (line 133) | int Sys_FileOpenRead(char *path, int *hndl)
function Sys_FileOpenWrite (line 152) | int Sys_FileOpenWrite(char *path)
function Sys_FileClose (line 167) | void Sys_FileClose(int handle)
function Sys_FileSeek (line 173) | void Sys_FileSeek(int handle, int position)
function Sys_FileRead (line 178) | int Sys_FileRead(int handle, void *dest, int count)
function Sys_FileWrite (line 183) | int Sys_FileWrite(int handle, void *data, int count)
function Sys_FileTime (line 188) | int Sys_FileTime(char *path)
function Sys_mkdir (line 202) | void Sys_mkdir(char *path)
function Sys_BigStackRewind (line 207) | void Sys_BigStackRewind(void)
function Sys_BigStackFree (line 229) | void Sys_BigStackFree(int size, char* purpose)
function Sys_MakeCodeWriteable (line 251) | void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
function Sys_Quit (line 255) | void Sys_Quit(void)
function Sys_Error (line 261) | void Sys_Error(const char *error, ...)
function Sys_Printf (line 279) | void Sys_Printf(char *fmt, ...)
function Sys_Sleep (line 300) | void Sys_Sleep(void)
function Sys_FloatTime (line 304) | double Sys_FloatTime(void)
function Sys_HighFPPrecision (line 311) | void Sys_HighFPPrecision(void)
function Sys_LowFPPrecision (line 315) | void Sys_LowFPPrecision(void)
type psvita_buttons (line 326) | typedef struct
function PSP2_KeyDown (line 351) | void PSP2_KeyDown(int keys) {
function PSP2_KeyUp (line 360) | void PSP2_KeyUp(int keys, int oldkeys) {
function Sys_SendKeyEvents (line 369) | void Sys_SendKeyEvents(void)
function ascii2utf (line 400) | void ascii2utf(uint16_t* dst, char* src){
function utf2ascii (line 406) | void utf2ascii(char* dst, uint16_t* src){
function simulateKeyPress (line 412) | void simulateKeyPress(char* text){
function CheckForMod (line 432) | bool CheckForMod(char* dir)
function quake_main (line 446) | int quake_main (unsigned int argc, void* argv){
function main (line 807) | int main(int argc, char **argv) {
FILE: source/vid.h
type byte (line 26) | typedef byte pixel_t;
type vrect_t (line 28) | typedef struct vrect_s
type viddef_t (line 34) | typedef struct
FILE: source/view.c
function V_CalcRoll (line 91) | float V_CalcRoll (vec3_t angles, vec3_t velocity)
function V_CalcBob (line 122) | float V_CalcBob (void)
function V_StartPitchDrift (line 152) | void V_StartPitchDrift (void)
function V_StopPitchDrift (line 168) | void V_StopPitchDrift (void)
function V_DriftPitch (line 188) | void V_DriftPitch (void)
function V_CalcBlend (line 254) | void V_CalcBlend (void)
function BuildGammaTable (line 317) | void BuildGammaTable (float g)
function V_CheckGamma (line 344) | bool V_CheckGamma (void)
function V_ParseDamage (line 365) | void V_ParseDamage (void)
function V_cshift_f (line 436) | void V_cshift_f (void)
function V_BonusFlash_f (line 452) | void V_BonusFlash_f (void)
function V_SetContentsColor (line 467) | void V_SetContentsColor (int contents)
function V_CalcPowerupCshift (line 492) | void V_CalcPowerupCshift (void)
function V_UpdatePalette (line 531) | void V_UpdatePalette (void)
function angledelta (line 608) | float angledelta (float a)
function CalcGunAngle (line 621) | void CalcGunAngle (void)
function V_BoundOffsets (line 688) | void V_BoundOffsets (void)
function V_AddIdle (line 718) | void V_AddIdle (void)
function V_CalcViewRoll (line 743) | void V_CalcViewRoll (void)
function V_CalcIntermissionRefdef (line 772) | void V_CalcIntermissionRefdef (void)
function V_CalcRefdef (line 799) | void V_CalcRefdef (void)
function V_RenderView (line 935) | void V_RenderView (void)
function V_Init (line 971) | void V_Init (void)
FILE: source/wad.c
function W_CleanupName (line 41) | void W_CleanupName (const char *in, char *out)
function W_LoadWadFile (line 68) | void W_LoadWadFile (char *filename)
function lumpinfo_t (line 107) | lumpinfo_t *W_GetLumpinfo (const char *name)
function SwapPic (line 154) | void SwapPic (qpic_t *pic)
type texwadlump_t (line 170) | typedef struct {
function WAD3_LoadTextureWadFile (line 179) | void WAD3_LoadTextureWadFile (char *filename) {
function byte (line 249) | static byte *ConvertWad3ToRGBA(miptex_t *tex) {
function byte (line 276) | byte *WAD3_LoadTexture(miptex_t *mt) {
FILE: source/wad.h
type qpic_t (line 39) | typedef struct
type wadinfo_t (line 47) | typedef struct
type lumpinfo_t (line 54) | typedef struct
FILE: source/webdownload.c
function Write (line 41) | static size_t Write( void *ptr, size_t size, size_t nmemb, void *stream )
function Progress (line 57) | static int Progress( void *clientp, double dltotal, double dlnow, double...
function Web_Cleanup (line 70) | static void Web_Cleanup( void )
function Web_Init (line 83) | static int Web_Init( void )
function Web_Get (line 169) | int Web_Get( const char *url, const char *referer, const char *name, int...
FILE: source/world.c
type moveclip_t (line 24) | typedef struct
function SV_InitBoxHull (line 55) | void SV_InitBoxHull(void)
function hull_t (line 88) | hull_t *SV_HullForBox(vec3_t mins, vec3_t maxs)
function hull_t (line 108) | hull_t *SV_HullForEntity(edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t ...
function areanode_t (line 173) | areanode_t *SV_CreateAreaNode(int depth, vec3_t mins, vec3_t maxs)
function SV_ClearWorld (line 208) | void SV_ClearWorld(void)
function SV_UnlinkEdict (line 217) | void SV_UnlinkEdict(edict_t *ent)
function SV_TouchLinks (line 226) | void SV_TouchLinks(edict_t *ent, areanode_t *node)
function SV_FindTouchedLeafs (line 284) | void SV_FindTouchedLeafs(edict_t *ent, mnode_t *node)
function SV_LinkEdict (line 321) | void SV_LinkEdict(edict_t *ent, bool touch_triggers)
function SV_HullPointContents (line 430) | int SV_HullPointContents(hull_t *hull, int num, vec3_t p)
function SV_PointContents (line 461) | int SV_PointContents(vec3_t p)
function SV_TruePointContents (line 471) | int SV_TruePointContents(vec3_t p)
function edict_t (line 484) | edict_t *SV_TestEntityPosition(edict_t *ent)
function SV_RecursiveHullCheck (line 510) | bool SV_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, ...
function trace_t (line 627) | trace_t SV_ClipMoveToEntity(edict_t *ent, vec3_t start, vec3_t mins, vec...
function SV_ClipToLinks (line 728) | void SV_ClipToLinks(areanode_t *node, moveclip_t *clip)
function SV_MoveBounds (line 804) | void SV_MoveBounds(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, v...
function trace_t (line 823) | trace_t SV_Move(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int ...
FILE: source/world.h
type areanode_t (line 19) | typedef struct areanode_s
type plane_t (line 28) | typedef struct
type trace_t (line 34) | typedef struct
FILE: source/zone.c
type memblock_t (line 23) | typedef struct memblock_s {
type memzone_t (line 31) | typedef struct {
function Z_ClearZone (line 62) | void Z_ClearZone(memzone_t *zone, int size)
function Z_Free (line 85) | void Z_Free(void *ptr)
function Z_Print (line 196) | void Z_Print(memzone_t *zone)
function Z_CheckHeap (line 221) | void Z_CheckHeap (void)
type hunk_t (line 279) | typedef struct {
function Hunk_Check (line 303) | void Hunk_Check(void)
function Hunk_Print (line 324) | void Hunk_Print(bool all)
function Hunk_Print_f (line 394) | void Hunk_Print_f(void)
function Hunk_LowMark (line 444) | int Hunk_LowMark(void)
function Hunk_FreeToLowMark (line 449) | void Hunk_FreeToLowMark(int mark)
function Hunk_HighMark (line 457) | int Hunk_HighMark(void)
function Hunk_FreeToHighMark (line 467) | void Hunk_FreeToHighMark(int mark)
type cache_system_t (line 553) | typedef struct cache_system_s {
function Cache_Move (line 570) | void Cache_Move(cache_system_t *c)
function Cache_FreeLow (line 599) | void Cache_FreeLow(int new_low_hunk)
function Cache_FreeHigh (line 620) | void Cache_FreeHigh(int new_high_hunk)
function Cache_UnlinkLRU (line 640) | void Cache_UnlinkLRU(cache_system_t *cs)
function Cache_MakeLRU (line 651) | void Cache_MakeLRU(cache_system_t *cs)
function cache_system_t (line 670) | cache_system_t *Cache_TryAlloc(int size, bool nobottom)
function Cache_Flush (line 744) | void Cache_Flush(void)
function Cache_Print (line 755) | void Cache_Print(void)
function Cache_Report (line 768) | void Cache_Report(void)
function Cache_Compact (line 778) | void Cache_Compact(void)
function Cache_Init (line 787) | void Cache_Init(void)
function Cache_Free (line 802) | void Cache_Free(cache_user_t *c)
function Memory_Init (line 884) | void Memory_Init(void *buf, int size)
FILE: source/zone.h
type cache_user_t (line 111) | typedef struct cache_user_s
Condensed preview — 176 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,561K chars).
[
{
"path": ".gitattributes",
"chars": 378,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs diff=csharp\n\n# St"
},
{
"path": ".github/FUNDING.yml",
"chars": 24,
"preview": "patreon: Rinnegatamante\n"
},
{
"path": ".gitignore",
"chars": 704,
"preview": "# Windows image file caches\nThumbs.db\nehthumbs.db\n\n# Folder config file\nDesktop.ini\n\n# Recycle Bin used on file shares\n$"
},
{
"path": "LICENSE.txt",
"chars": 35127,
"preview": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation,"
},
{
"path": "Makefile",
"chars": 3399,
"preview": "TARGET\t\t:= vitaQuake\nTITLE\t\t:= QUAK00001\nGIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)\nSHADERS"
},
{
"path": "README.md",
"chars": 5494,
"preview": "# Introduction\nvitaQuake is a Quake engine source port for PSVITA.\n\nAn official channel to discuss the development of th"
},
{
"path": "build/sce_sys/livearea/contents/template.xml",
"chars": 825,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<livearea style=\"a1\" format-ver=\"01.00\" content-rev=\"1\">\n\t<livearea-background>\n"
},
{
"path": "shaders/modulate_alpha_f.cg",
"chars": 187,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tuniform float4 vColor,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfloat4 c = tex2D(tex,"
},
{
"path": "shaders/modulate_alpha_fog_f.cg",
"chars": 233,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat vFog : FOG,\n\tuniform float4 vColor,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfl"
},
{
"path": "shaders/modulate_f.cg",
"chars": 140,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tuniform float4 vColor,\n\tuniform sampler2D tex\n\t)\n{\t\n\treturn tex2D(tex, vTe"
},
{
"path": "shaders/modulate_fog_f.cg",
"chars": 201,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat vFog : FOG,\n\tuniform float4 vColor,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfl"
},
{
"path": "shaders/modulate_rgba_alpha_f.cg",
"chars": 187,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat4 vColor : COLOR,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfloat4 c = tex2D(tex,"
},
{
"path": "shaders/modulate_rgba_alpha_fog_f.cg",
"chars": 233,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat vFog : FOG,\n\tfloat4 vColor : COLOR,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfl"
},
{
"path": "shaders/modulate_rgba_f.cg",
"chars": 140,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat4 vColor : COLOR,\n\tuniform sampler2D tex\n\t)\n{\t\n\treturn tex2D(tex, vTe"
},
{
"path": "shaders/modulate_rgba_fog_f.cg",
"chars": 201,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat vFog : FOG,\n\tfloat4 vColor : COLOR,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfl"
},
{
"path": "shaders/replace_alpha_f.cg",
"chars": 154,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfloat4 c = tex2D(tex, vTexcoord);\n\tif (c.a > "
},
{
"path": "shaders/replace_alpha_fog_f.cg",
"chars": 200,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat vFog : FOG,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfloat4 c = tex2D(tex, vTex"
},
{
"path": "shaders/replace_f.cg",
"chars": 107,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tuniform sampler2D tex\n\t)\n{\t\n\treturn tex2D(tex, vTexcoord);\n}\n"
},
{
"path": "shaders/replace_fog_f.cg",
"chars": 168,
"preview": "float4 main(\n\tfloat2 vTexcoord : TEXCOORD0,\n\tfloat vFog : FOG,\n\tuniform sampler2D tex\n\t)\n{\t\n\tfloat4 c = tex2D(tex, vTex"
},
{
"path": "shaders/rgba_alpha_f.cg",
"chars": 100,
"preview": "float4 main(float4 vColor : COLOR) : COLOR\n{\n\tif (vColor.a > 0.666) return vColor;\n\telse discard;\n}\n"
},
{
"path": "shaders/rgba_f.cg",
"chars": 63,
"preview": "float4 main(float4 vColor : COLOR) : COLOR\n{\n\treturn vColor;\n}\n"
},
{
"path": "shaders/rgba_v.cg",
"chars": 248,
"preview": "void main(\n\tfloat3 aPosition,\n\tfloat4 aColor,\n\tuniform float4x4 gl_ModelViewProjectionMatrix,\n\tfloat4 out vPosition: POS"
},
{
"path": "shaders/texture2d_fog_v.cg",
"chars": 385,
"preview": "void main(\n\tfloat3 position,\n\tfloat2 texcoord,\n\tuniform float4x4 gl_ModelViewProjectionMatrix,\n\tfloat4 out vPosition : "
},
{
"path": "shaders/texture2d_rgba_fog_v.cg",
"chars": 444,
"preview": "void main(\n\tfloat3 position,\n\tfloat2 texcoord,\n\tfloat4 color,\n\tuniform float4x4 gl_ModelViewProjectionMatrix,\n\tfloat4 ou"
},
{
"path": "shaders/texture2d_rgba_v.cg",
"chars": 322,
"preview": "void main(\n\tfloat3 position,\n\tfloat2 texcoord,\n\tfloat4 color,\n\tuniform float4x4 gl_ModelViewProjectionMatrix,\n\tfloat4 ou"
},
{
"path": "shaders/texture2d_v.cg",
"chars": 263,
"preview": "void main(\n\tfloat3 position,\n\tfloat2 texcoord,\n\tuniform float4x4 gl_ModelViewProjectionMatrix,\n\tfloat4 out vPosition : "
},
{
"path": "shaders/vertex_f.cg",
"chars": 61,
"preview": "float4 main(uniform float4 color) : COLOR\n{\n\treturn color;\n}\n"
},
{
"path": "shaders/vertex_v.cg",
"chars": 187,
"preview": "void main(\n\tfloat3 aPosition,\n\tuniform float4x4 gl_ModelViewProjectionMatrix,\n\tfloat4 out vPosition: POSITION)\n{\n\tvPosit"
},
{
"path": "source/adivtab.h",
"chars": 10524,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/anorm_dots.h",
"chars": 21261,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/anorms.h",
"chars": 6295,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/asm_draw.h",
"chars": 4240,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/asm_i386.h",
"chars": 2523,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/audiodec/audio_decoder.cpp",
"chars": 8118,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/audio_decoder.h",
"chars": 8932,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/audio_resampler.cpp",
"chars": 20601,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/audio_resampler.h",
"chars": 5872,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/cd_psp2.cpp",
"chars": 6192,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/audiodec/decoder_mpg123.cpp",
"chars": 5775,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/decoder_mpg123.h",
"chars": 1664,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/decoder_oggvorbis.cpp",
"chars": 3166,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/audiodec/decoder_oggvorbis.h",
"chars": 1804,
"preview": "/*\n * This file is part of EasyRPG Player.\n *\n * EasyRPG Player is free software: you can redistribute it and/or modify\n"
},
{
"path": "source/block16.h",
"chars": 2840,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/block8.h",
"chars": 2789,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/bspfile.h",
"chars": 8914,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cdaudio.h",
"chars": 934,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/chase.c",
"chars": 2434,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cl_demo.c",
"chars": 8365,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cl_input.c",
"chars": 11591,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cl_main.c",
"chars": 17993,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cl_parse.c",
"chars": 24808,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cl_tent.c",
"chars": 8688,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/client.h",
"chars": 8805,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cmd.c",
"chars": 12512,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cmd.h",
"chars": 4355,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/common.c",
"chars": 34929,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/common.h",
"chars": 6142,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/console.c",
"chars": 13049,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/console.h",
"chars": 1472,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/crc.c",
"chars": 3630,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/crc.h",
"chars": 894,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cvar.c",
"chars": 6158,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/cvar.h",
"chars": 4236,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/draw.h",
"chars": 1732,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_draw.cpp",
"chars": 42184,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_fullbright.c",
"chars": 986,
"preview": "//gl_fullbright.c\n#include \"quakedef.h\"\n\nextern void DrawGLPoly (glpoly_t *p);\n\nint FindFullbrightTexture (byte *pixels,"
},
{
"path": "source/gl_fullbright.h",
"chars": 214,
"preview": "//gl_fullbright.h\n#include \"gl_model.h\"\nint FindFullbrightTexture (byte *pixels, int num_pix);\nvoid DrawFullBrightTextur"
},
{
"path": "source/gl_mesh.c",
"chars": 6644,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_model.c",
"chars": 58280,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_model.h",
"chars": 9479,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_refrag.c",
"chars": 4603,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_rlight.c",
"chars": 11754,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_rmain.c",
"chars": 45085,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_rmisc.c",
"chars": 8794,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_rsurf.c",
"chars": 28495,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_screen.c",
"chars": 18274,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_vidpsp2.c",
"chars": 17092,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_warp.c",
"chars": 8573,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/gl_warp_sin.h",
"chars": 3183,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/glquake.h",
"chars": 6924,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/glquake2.h",
"chars": 5878,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/host.c",
"chars": 21155,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/host_cmd.c",
"chars": 42213,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/image.c",
"chars": 10300,
"preview": "/*\nCopyright (C) 1996-2001 Id Software, Inc.\nCopyright (C) 2002-2009 John Fitzgibbons and others\nCopyright (C) 2010-2014"
},
{
"path": "source/image.h",
"chars": 1164,
"preview": "/*\nCopyright (C) 1996-2001 Id Software, Inc.\nCopyright (C) 2002-2009 John Fitzgibbons and others\nCopyright (C) 2010-2014"
},
{
"path": "source/in_psp2.c",
"chars": 7489,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/input.h",
"chars": 1181,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/keys.c",
"chars": 14104,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/keys.h",
"chars": 3135,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/mathlib.c",
"chars": 12013,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/mathlib.h",
"chars": 3608,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/menu.c",
"chars": 73369,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\nCopyright (C) 2020 Asakura Reiko\n\nThis program is free software; you can re"
},
{
"path": "source/menu.h",
"chars": 1055,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/model.h",
"chars": 7830,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/modelgen.h",
"chars": 2984,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/mpdosock.h",
"chars": 22805,
"preview": "/* WINSOCK.H--definitions to be used with the WINSOCK.DLL\n * Copyright (c) 1993-1995, Microsoft Corp. All rights reserve"
},
{
"path": "source/neon_mathfun.c",
"chars": 9234,
"preview": "/* NEON implementation of sin, cos, exp and log\n\n Inspired by Intel Approximate Math library, and based on the\n corr"
},
{
"path": "source/neon_mathfun.h",
"chars": 358,
"preview": "#ifndef _NEON_MATHFUN_H_\n#define _NEON_MATHFUN_H_\n\n#include <arm_neon.h>\n\ntypedef float32x4_t v4sf; // vector of 4 floa"
},
{
"path": "source/net.h",
"chars": 9688,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_adhoc.h",
"chars": 1696,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_adhoc_psp2.c",
"chars": 9813,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_dgrm.c",
"chars": 35566,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_dgrm.h",
"chars": 1328,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_loop.c",
"chars": 5360,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_loop.h",
"chars": 1255,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_main.c",
"chars": 17845,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_none.c",
"chars": 1191,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_psp2.c",
"chars": 2294,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_udp.h",
"chars": 1658,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_udp_psp2.c",
"chars": 16211,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_vcr.c",
"chars": 3484,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/net_vcr.h",
"chars": 1278,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/nonintel.c",
"chars": 1228,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/pr_cmds.c",
"chars": 54354,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/pr_comp.h",
"chars": 3076,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/pr_edict.c",
"chars": 29572,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/pr_exec.c",
"chars": 13241,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/progdefs.h",
"chars": 803,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/progdefs.q1",
"chars": 2455,
"preview": "\n/* file generated by qcc, do not modify */\n\ntypedef struct\n{\tint\tpad[28];\n\tint\tself;\n\tint\tother;\n\tint\tworld;\n\tfloat\ttim"
},
{
"path": "source/progdefs.q2",
"chars": 2729,
"preview": "\n/* file generated by qcc, do not modify */\n\ntypedef struct\n{\tint\tpad[28];\n\tint\tself;\n\tint\tother;\n\tint\tworld;\n\tfloat\ttim"
},
{
"path": "source/progs.h",
"chars": 4768,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/protocol.h",
"chars": 6938,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/quakeasm.h",
"chars": 6329,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/quakedef.h",
"chars": 11685,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/r_local.h",
"chars": 8207,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/r_part.c",
"chars": 16469,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/r_shared.h",
"chars": 4920,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/render.h",
"chars": 5446,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sbar.c",
"chars": 28473,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sbar.h",
"chars": 1264,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/screen.h",
"chars": 1593,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/server.h",
"chars": 7701,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/snd_dma.c",
"chars": 20068,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/snd_mem.c",
"chars": 6680,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/snd_mix.c",
"chars": 7876,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/snd_psp2.c",
"chars": 2902,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sound.h",
"chars": 4814,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/spritegn.h",
"chars": 2791,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sv_main.c",
"chars": 29783,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sv_move.c",
"chars": 9464,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sv_phys.c",
"chars": 37480,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sv_user.c",
"chars": 13024,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sys.h",
"chars": 2179,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/sys_psp2.c",
"chars": 19714,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\nCopyright (C) 2020 Asakura Reiko\n\nThis program is free software; you can re"
},
{
"path": "source/vid.h",
"chars": 2834,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/view.c",
"chars": 21999,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/view.h",
"chars": 1032,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/wad.c",
"chars": 7847,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/wad.h",
"chars": 1755,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "source/webdownload.c",
"chars": 5876,
"preview": "/*\n Copyright (C) 2006 Pekka Lampila (\"Medar\"), Damien Deville (\"Pb\")\n and German Garcia Fernandez (\"Jal\") for Chass"
},
{
"path": "source/webdownload.h",
"chars": 1076,
"preview": "/*\n Copyright (C) 2006 Pekka Lampila (\"Medar\"), Damien Deville (\"Pb\")\n and German Garcia Fernandez (\"Jal\") for Chass"
},
{
"path": "source/world.c",
"chars": 20587,
"preview": "/*\n* World query functions\n*\n* Copyright (C) 1996-1997 Id Software, Inc.\n*\n* This program is free software; you can redi"
},
{
"path": "source/world.h",
"chars": 2671,
"preview": "/*\n* Copyright (C) 1996-1997 Id Software, Inc.\n*\n* This program is free software; you can redistribute it and/or\n* modif"
},
{
"path": "source/zone.c",
"chars": 19214,
"preview": "/*\n* Copyright (C) 1996-1997 Id Software, Inc.\n*\n* This program is free software; you can redistribute it and/or\n* modif"
},
{
"path": "source/zone.h",
"chars": 3182,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
}
]
// ... and 21 more files (download for full content)
About this extraction
This page contains the full source code of the Rinnegatamante/vitaQuake GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 176 files (1.4 MB), approximately 457.1k tokens, and a symbol index with 1515 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.