Showing preview only (8,180K chars total). Download the full file or copy to clipboard to get everything.
Repository: kennyalive/Quake-III-Arena-Kenny-Edition
Branch: master
Commit: 4a09579fb953
Files: 367
Total size: 7.7 MB
Directory structure:
gitextract_lfy_jed8/
├── .github/
│ └── workflows/
│ └── msbuild.yml
├── .gitignore
├── COPYING.txt
├── README.md
├── README.txt
├── src/
│ ├── cgame/
│ │ ├── cg_consolecmds.c
│ │ ├── cg_draw.c
│ │ ├── cg_drawtools.c
│ │ ├── cg_effects.c
│ │ ├── cg_ents.c
│ │ ├── cg_event.c
│ │ ├── cg_info.c
│ │ ├── cg_local.h
│ │ ├── cg_localents.c
│ │ ├── cg_main.c
│ │ ├── cg_marks.c
│ │ ├── cg_particles.c
│ │ ├── cg_players.c
│ │ ├── cg_playerstate.c
│ │ ├── cg_predict.c
│ │ ├── cg_public.h
│ │ ├── cg_scoreboard.c
│ │ ├── cg_servercmds.c
│ │ ├── cg_snapshot.c
│ │ ├── cg_syscalls.asm
│ │ ├── cg_syscalls.c
│ │ ├── cg_view.c
│ │ ├── cg_weapons.c
│ │ ├── cgame.bat
│ │ ├── cgame.q3asm
│ │ └── tr_types.h
│ ├── engine/
│ │ ├── botlib/
│ │ │ ├── aasfile.h
│ │ │ ├── be_aas_bsp.h
│ │ │ ├── be_aas_bspq3.c
│ │ │ ├── be_aas_cluster.c
│ │ │ ├── be_aas_cluster.h
│ │ │ ├── be_aas_debug.c
│ │ │ ├── be_aas_debug.h
│ │ │ ├── be_aas_def.h
│ │ │ ├── be_aas_entity.c
│ │ │ ├── be_aas_entity.h
│ │ │ ├── be_aas_file.c
│ │ │ ├── be_aas_file.h
│ │ │ ├── be_aas_funcs.h
│ │ │ ├── be_aas_main.c
│ │ │ ├── be_aas_main.h
│ │ │ ├── be_aas_move.c
│ │ │ ├── be_aas_move.h
│ │ │ ├── be_aas_optimize.c
│ │ │ ├── be_aas_optimize.h
│ │ │ ├── be_aas_reach.c
│ │ │ ├── be_aas_reach.h
│ │ │ ├── be_aas_route.c
│ │ │ ├── be_aas_route.h
│ │ │ ├── be_aas_routealt.c
│ │ │ ├── be_aas_routealt.h
│ │ │ ├── be_aas_sample.c
│ │ │ ├── be_aas_sample.h
│ │ │ ├── be_ai_char.c
│ │ │ ├── be_ai_chat.c
│ │ │ ├── be_ai_gen.c
│ │ │ ├── be_ai_goal.c
│ │ │ ├── be_ai_move.c
│ │ │ ├── be_ai_weap.c
│ │ │ ├── be_ai_weight.c
│ │ │ ├── be_ai_weight.h
│ │ │ ├── be_ea.c
│ │ │ ├── be_interface.c
│ │ │ ├── be_interface.h
│ │ │ ├── l_crc.c
│ │ │ ├── l_crc.h
│ │ │ ├── l_libvar.c
│ │ │ ├── l_libvar.h
│ │ │ ├── l_log.c
│ │ │ ├── l_log.h
│ │ │ ├── l_memory.c
│ │ │ ├── l_memory.h
│ │ │ ├── l_precomp.c
│ │ │ ├── l_precomp.h
│ │ │ ├── l_script.c
│ │ │ ├── l_script.h
│ │ │ ├── l_struct.c
│ │ │ ├── l_struct.h
│ │ │ └── l_utils.h
│ │ ├── client/
│ │ │ ├── cl_cgame.c
│ │ │ ├── cl_cin.c
│ │ │ ├── cl_console.c
│ │ │ ├── cl_input.c
│ │ │ ├── cl_keys.c
│ │ │ ├── cl_main.c
│ │ │ ├── cl_net_chan.c
│ │ │ ├── cl_parse.c
│ │ │ ├── cl_scrn.c
│ │ │ ├── cl_ui.c
│ │ │ ├── client.h
│ │ │ ├── keys.h
│ │ │ ├── snd_adpcm.c
│ │ │ ├── snd_dma.c
│ │ │ ├── snd_local.h
│ │ │ ├── snd_mem.c
│ │ │ ├── snd_mix.c
│ │ │ ├── snd_public.h
│ │ │ └── snd_wavelet.c
│ │ ├── platform/
│ │ │ ├── resource.h
│ │ │ ├── win_gamma.c
│ │ │ ├── win_glimp.c
│ │ │ ├── win_input.c
│ │ │ ├── win_local.h
│ │ │ ├── win_main.c
│ │ │ ├── win_net.c
│ │ │ ├── win_qgl.c
│ │ │ ├── win_shared.c
│ │ │ ├── win_snd.c
│ │ │ ├── win_syscon.c
│ │ │ ├── win_wndproc.c
│ │ │ └── winquake.rc
│ │ ├── qcommon/
│ │ │ ├── cm_load.c
│ │ │ ├── cm_local.h
│ │ │ ├── cm_patch.c
│ │ │ ├── cm_patch.h
│ │ │ ├── cm_polylib.c
│ │ │ ├── cm_polylib.h
│ │ │ ├── cm_public.h
│ │ │ ├── cm_test.c
│ │ │ ├── cm_trace.c
│ │ │ ├── cmd.c
│ │ │ ├── common.c
│ │ │ ├── cvar.c
│ │ │ ├── files.c
│ │ │ ├── huffman.c
│ │ │ ├── md4.c
│ │ │ ├── msg.c
│ │ │ ├── net_chan.c
│ │ │ ├── qcommon.h
│ │ │ ├── qfiles.h
│ │ │ ├── unzip.c
│ │ │ ├── unzip.h
│ │ │ ├── vm.c
│ │ │ ├── vm_interpreted.c
│ │ │ └── vm_local.h
│ │ ├── renderer/
│ │ │ ├── dx.cpp
│ │ │ ├── dx.h
│ │ │ ├── jpeg/
│ │ │ │ ├── stb_image.h
│ │ │ │ └── tiny_jpeg.h
│ │ │ ├── qgl.h
│ │ │ ├── shaders/
│ │ │ │ ├── apply_gamma.comp
│ │ │ │ ├── compile.bat
│ │ │ │ ├── compile_hlsl.bat
│ │ │ │ ├── hlsl_compiled/
│ │ │ │ │ ├── multi_texture_add_ge80_ps.cpp
│ │ │ │ │ ├── multi_texture_add_gt0_ps.cpp
│ │ │ │ │ ├── multi_texture_add_lt80_ps.cpp
│ │ │ │ │ ├── multi_texture_add_ps.cpp
│ │ │ │ │ ├── multi_texture_clipping_plane_vs.cpp
│ │ │ │ │ ├── multi_texture_mul_ge80_ps.cpp
│ │ │ │ │ ├── multi_texture_mul_gt0_ps.cpp
│ │ │ │ │ ├── multi_texture_mul_lt80_ps.cpp
│ │ │ │ │ ├── multi_texture_mul_ps.cpp
│ │ │ │ │ ├── multi_texture_vs.cpp
│ │ │ │ │ ├── single_texture_clipping_plane_vs.cpp
│ │ │ │ │ ├── single_texture_ge80_ps.cpp
│ │ │ │ │ ├── single_texture_gt0_ps.cpp
│ │ │ │ │ ├── single_texture_lt80_ps.cpp
│ │ │ │ │ ├── single_texture_ps.cpp
│ │ │ │ │ └── single_texture_vs.cpp
│ │ │ │ ├── multi_texture.vert
│ │ │ │ ├── multi_texture_add.frag
│ │ │ │ ├── multi_texture_clipping_plane.vert
│ │ │ │ ├── multi_texture_mul.frag
│ │ │ │ ├── shaders.hlsl
│ │ │ │ ├── single_texture.frag
│ │ │ │ ├── single_texture.vert
│ │ │ │ ├── single_texture_clipping_plane.vert
│ │ │ │ └── spirv/
│ │ │ │ ├── apply_gamma_comp.cpp
│ │ │ │ ├── multi_texture_add_frag.cpp
│ │ │ │ ├── multi_texture_clipping_plane_vert.cpp
│ │ │ │ ├── multi_texture_mul_frag.cpp
│ │ │ │ ├── multi_texture_vert.cpp
│ │ │ │ ├── single_texture_clipping_plane_vert.cpp
│ │ │ │ ├── single_texture_frag.cpp
│ │ │ │ └── single_texture_vert.cpp
│ │ │ ├── tr_animation.c
│ │ │ ├── tr_backend.c
│ │ │ ├── tr_bsp.c
│ │ │ ├── tr_cmds.c
│ │ │ ├── tr_curve.c
│ │ │ ├── tr_font.c
│ │ │ ├── tr_image.c
│ │ │ ├── tr_init.c
│ │ │ ├── tr_light.c
│ │ │ ├── tr_local.h
│ │ │ ├── tr_main.c
│ │ │ ├── tr_marks.c
│ │ │ ├── tr_mesh.c
│ │ │ ├── tr_model.c
│ │ │ ├── tr_noise.c
│ │ │ ├── tr_public.h
│ │ │ ├── tr_scene.c
│ │ │ ├── tr_shade.c
│ │ │ ├── tr_shade_calc.c
│ │ │ ├── tr_shader.c
│ │ │ ├── tr_shadows.c
│ │ │ ├── tr_sky.c
│ │ │ ├── tr_surface.c
│ │ │ ├── tr_world.c
│ │ │ ├── vk.cpp
│ │ │ ├── vk.h
│ │ │ └── vulkan/
│ │ │ ├── GLSL.std.450.h
│ │ │ ├── spirv.h
│ │ │ ├── spirv.hpp
│ │ │ ├── spirv.hpp11
│ │ │ ├── spirv.json
│ │ │ ├── spirv.lua
│ │ │ ├── spirv.py
│ │ │ ├── vk_icd.h
│ │ │ ├── vk_layer.h
│ │ │ ├── vk_layer_dispatch_table.h
│ │ │ ├── vk_platform.h
│ │ │ ├── vk_sdk_platform.h
│ │ │ ├── vulkan.h
│ │ │ └── vulkan.hpp
│ │ └── server/
│ │ ├── server.h
│ │ ├── sv_bot.c
│ │ ├── sv_ccmds.c
│ │ ├── sv_client.c
│ │ ├── sv_game.c
│ │ ├── sv_init.c
│ │ ├── sv_main.c
│ │ ├── sv_net_chan.c
│ │ ├── sv_snapshot.c
│ │ └── sv_world.c
│ ├── game/
│ │ ├── ai_chat.c
│ │ ├── ai_chat.h
│ │ ├── ai_cmd.c
│ │ ├── ai_cmd.h
│ │ ├── ai_dmnet.c
│ │ ├── ai_dmnet.h
│ │ ├── ai_dmq3.c
│ │ ├── ai_dmq3.h
│ │ ├── ai_main.c
│ │ ├── ai_main.h
│ │ ├── ai_team.c
│ │ ├── ai_team.h
│ │ ├── ai_vcmd.c
│ │ ├── ai_vcmd.h
│ │ ├── be_aas.h
│ │ ├── be_ai_char.h
│ │ ├── be_ai_chat.h
│ │ ├── be_ai_gen.h
│ │ ├── be_ai_goal.h
│ │ ├── be_ai_move.h
│ │ ├── be_ai_weap.h
│ │ ├── be_ea.h
│ │ ├── bg_lib.c
│ │ ├── bg_lib.h
│ │ ├── bg_local.h
│ │ ├── bg_misc.c
│ │ ├── bg_pmove.c
│ │ ├── bg_public.h
│ │ ├── bg_slidemove.c
│ │ ├── botlib.h
│ │ ├── chars.h
│ │ ├── g_active.c
│ │ ├── g_arenas.c
│ │ ├── g_bot.c
│ │ ├── g_client.c
│ │ ├── g_cmds.c
│ │ ├── g_combat.c
│ │ ├── g_items.c
│ │ ├── g_local.h
│ │ ├── g_main.c
│ │ ├── g_mem.c
│ │ ├── g_misc.c
│ │ ├── g_missile.c
│ │ ├── g_mover.c
│ │ ├── g_public.h
│ │ ├── g_rankings.c
│ │ ├── g_rankings.h
│ │ ├── g_session.c
│ │ ├── g_spawn.c
│ │ ├── g_svcmds.c
│ │ ├── g_syscalls.asm
│ │ ├── g_syscalls.c
│ │ ├── g_target.c
│ │ ├── g_team.c
│ │ ├── g_team.h
│ │ ├── g_trigger.c
│ │ ├── g_utils.c
│ │ ├── g_weapon.c
│ │ ├── game.bat
│ │ ├── game.q3asm
│ │ ├── inv.h
│ │ ├── match.h
│ │ ├── menudef.h
│ │ ├── q_math.c
│ │ ├── q_shared.c
│ │ ├── q_shared.h
│ │ ├── surfaceflags.h
│ │ └── syn.h
│ └── q3_ui/
│ ├── keycodes.h
│ ├── q3_ui.bat
│ ├── q3_ui.q3asm
│ ├── ui_addbots.c
│ ├── ui_atoms.c
│ ├── ui_cdkey.c
│ ├── ui_cinematics.c
│ ├── ui_confirm.c
│ ├── ui_connect.c
│ ├── ui_controls2.c
│ ├── ui_credits.c
│ ├── ui_demo2.c
│ ├── ui_display.c
│ ├── ui_gameinfo.c
│ ├── ui_ingame.c
│ ├── ui_local.h
│ ├── ui_login.c
│ ├── ui_main.c
│ ├── ui_menu.c
│ ├── ui_mfield.c
│ ├── ui_mods.c
│ ├── ui_network.c
│ ├── ui_options.c
│ ├── ui_playermodel.c
│ ├── ui_players.c
│ ├── ui_playersettings.c
│ ├── ui_preferences.c
│ ├── ui_public.h
│ ├── ui_qmenu.c
│ ├── ui_rankings.c
│ ├── ui_rankstatus.c
│ ├── ui_removebots.c
│ ├── ui_serverinfo.c
│ ├── ui_servers2.c
│ ├── ui_setup.c
│ ├── ui_signup.c
│ ├── ui_sound.c
│ ├── ui_sparena.c
│ ├── ui_specifyleague.c
│ ├── ui_specifyserver.c
│ ├── ui_splevel.c
│ ├── ui_sppostgame.c
│ ├── ui_spreset.c
│ ├── ui_spskill.c
│ ├── ui_startserver.c
│ ├── ui_syscalls.asm
│ ├── ui_syscalls.c
│ ├── ui_team.c
│ ├── ui_teamorders.c
│ └── ui_video.c
├── tools/
│ └── bin2hex.cpp
└── visual-studio/
├── DeclareDPIAware.manifest
├── botlib.vcxproj
├── botlib.vcxproj.filters
├── cgame.def
├── cgame.vcxproj
├── cgame.vcxproj.filters
├── game.def
├── game.vcxproj
├── game.vcxproj.filters
├── props/
│ └── shared.props
├── q3_ui.vcxproj
├── q3_ui.vcxproj.filters
├── quake3.sln
├── quake3.vcxproj
├── quake3.vcxproj.filters
├── renderer.vcxproj
├── renderer.vcxproj.filters
└── ui.def
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/msbuild.yml
================================================
name: MSBuild
on:
push:
branches: [ "master" ]
paths-ignore:
- '*.md'
pull_request:
branches: [ "master" ]
paths-ignore:
- '*.md'
env:
SOLUTION_FILE_PATH: "visual-studio/quake3.sln"
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Upload Executable
uses: actions/upload-artifact@v4
with:
name: quake3
path: bin/x64/Release/quake3-ke.exe
================================================
FILE: .gitignore
================================================
*.opendb
*.opensdf
*.sdf
*.suo
*.user
bin/
tools/bin2hex.exe
tools/bin2hex.obj
visual-studio/.vs/
visual-studio/vk_report
visual-studio/*.log
visual-studio/*.psess
visual-studio/*.vspx
================================================
FILE: COPYING.txt
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
================================================
FILE: README.md
================================================
# Welcome to Quake 3 source code!

## What's in this repository
* This repository contains Quake 3 Arena source code which can be built with modern versions of Visual Studio.
* Only Windows x64 platform is supported.
* I don't try to fix bugs inherited from the original Q3 source code distribution - in this regard the project is Q3-bugs-friendly. I still make fixes to functionality that did not stand the test of time (SetDeviceGammaRamp).
* Some functionality related to ancient graphics hardware was removed. Also I removed compilation of qvm code to native instructions to simplify maintenance. This means all game code is run through QVM which is slower than native execution but fast enough for modern computers.
* No changes to visuals or gameplay. Vulkan backend is now enabled by default. This change was made due to issues with the SetDeviceGammaRamp API.
## Usage
* Build `visual-studio/quake3.sln` solution and copy `quake3-ke.exe` to your local Quake-III-Arena installation folder.
* To debug the game from Visual Studio, go to `quake3` project settings -> Debugging -> Command Arguments. Specify the game installation location: `+set fs_basepath <quake3/installation/directory>`
## Vulkan support
The Vulkan backend supports everything provided by the original OpenGL version, including all available `r_` cvars. No new features have been added; the goal is to preserve existing functionality rather than expand it.
#### New cvars:
* **r_renderAPI** - 3D API to use. Requires vid_restart.
* 0 - OpenGL
* 1 - Vulkan
* **r_gpu** - Select GPU in multi-GPU system (zero-based index). By default, GPU 0 is selected. Requires vid_restart.
* **r_vsync** - Enable vsync in Vulkan. Requires vid_restart.
* **r_shaderGamma** - Use compute shader to apply gamma instead of legacy HW gamma API (SetDeviceGammaRamp).
* **r_twinMode** - Debug feature to compare rendering output between OpenGL/Vulkan APIs. Requires vid_restart.

#### Additional information:
* Q: How to start game with vulkan support? A: `quake3-ke.exe +set r_renderAPI 1`.
* Q: How to enable vulkan support from Q3 console? A: `\r_renderAPI 1` then `\vid_restart`.
* Q: How to enable twin mode from Q3 console? A: `\r_twinMode 1` or `\r_twinMode 1` then `\vid_restart`.
* Q: How to check that Vulkan backend is really active? A: `gfxinfo` console command reports information about active rendering backend.

================================================
FILE: README.txt
================================================
Quake III Arena GPL source release
==================================
This file contains the following sections:
LICENSE
GENERAL NOTES
COMPILING ON WIN32
COMPILING ON GNU/LINUX
COMPILING ON MAC
LICENSE
=======
See COPYING.txt for the GNU GENERAL PUBLIC LICENSE
Some source code in this release is not covered by the GPL:
IO on .zip files using portions of zlib
-----------------------------------------------------------------------------
lines file(s)
4299 code/qcommon/unzip.c
4546 libs/pak/unzip.cpp
Copyright (C) 1998 Gilles Vollant
zlib is Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
MD4 Message-Digest Algorithm
-----------------------------------------------------------------------------
lines file(s)
299 code/qcommon/md4.c
277 common/md4.c
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
License to copy and use this software is granted provided that it is identified
as the <93>RSA Data Security, Inc. MD4 Message-Digest Algorithm<94> in all mater
ial mentioning or referencing this software or this function.
License is also granted to make and use derivative works provided that such work
s are identified as <93>derived from the RSA Data Security, Inc. MD4 Message-Dig
est Algorithm<94> in all material mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either the merchanta
bility of this software or the suitability of this software for any particular p
urpose. It is provided <93>as is<94> without express or implied warranty of any
kind.
checksums are used to validate pak files
standard C library replacement routines
-----------------------------------------------------------------------------
lines file(s)
1324 code/game/bg_lib.c
Copyright (c) 1992, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
ADPCM coder/decoder
-----------------------------------------------------------------------------
lines file(s)
330 code/client/snd_adpcm.c
Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
JPEG library
-----------------------------------------------------------------------------
code/jpeg-6
libs/jpeg6
Copyright (C) 1991-1995, Thomas G. Lane
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
NOTE: unfortunately the README that came with our copy of the library has
been lost, so the one from release 6b is included instead. There are a few
'glue type' modifications to the library to make it easier to use from
the engine, but otherwise the dependency can be easily cleaned up to a
better release of the library.
GENERAL NOTES
=============
A short summary of the file layout:
code/ Quake III Arena source code ( renderer, game code, OS layer etc. )
code/bspc bot routes compiler source code
lcc/ the retargetable C compiler ( produces assembly to be turned into qvm bytecode by q3asm )
q3asm/ assembly to qvm bytecode compiler
q3map/ map compiler ( .map -> .bsp ) - this is the version that comes with Q3Radiant 200f
q3radiant/ Q3Radiant map editor build 200f ( common/ and libs/ are support dirs for radiant )
While we made sure we were still able to compile the game on Windows, GNU/Linux and Mac, this build didn't get any kind of extensive testing so it may not work completely right. Whenever an id game is released under GPL, several projects start making the source code more friendly to nowaday's compilers and environements. If you are picking up this release weeks/months/years after we uploaded it, you probably want to look around on the net for cleaned up versions of this codebase as well.
COMPILING ON WIN32
==================
VC7 / Visual C++ 2003 project files are provided:
code/quake3.sln
q3radiant/Radiant.sln
To compile the qvms, you need to run some batch files:
you will need to have lcc.exe q3cpp.exe q3rcc.exe and q3asm.exe in your path
( some precompiled binaries are provided in lcc/bin and code/win32/mod-sdk-setup/bin )
the qvm batch files are in code/game code/cgame code/q3_ui code/ui ..
COMPILING ON GNU/LINUX
==================
the build system using cons, which may be known as scons's perl ancestor now
you don't have to track it down though, the build script is provided in the tree
you will need nasm and gcc 2.95
make sure you have the X Direct Graphics Access and X Video Mode extensions headers for your X11
a typical compile command goes like this:
[..]/code$ ./unix/cons -- gcc=gcc-2.95 g++=g++-2.95
COMPILING ON MAC
================
project file for OSX compile is in code/macosx/Quake3.pbproj
================================================
FILE: src/cgame/cg_consolecmds.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_consolecmds.c -- text commands typed in at the local console, or
// executed by a key binding
#include "cg_local.h"
void CG_TargetCommand_f( void ) {
int targetNum;
char test[4];
targetNum = CG_CrosshairPlayer();
if (!targetNum ) {
return;
}
trap_Argv( 1, test, 4 );
trap_SendConsoleCommand( va( "gc %i %i", targetNum, atoi( test ) ) );
}
/*
=================
CG_SizeUp_f
Keybinding command
=================
*/
static void CG_SizeUp_f (void) {
trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer+10)));
}
/*
=================
CG_SizeDown_f
Keybinding command
=================
*/
static void CG_SizeDown_f (void) {
trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer-10)));
}
/*
=============
CG_Viewpos_f
Debugging command to print the current position
=============
*/
static void CG_Viewpos_f (void) {
CG_Printf ("(%i %i %i) : %i\n", (int)cg.refdef.vieworg[0],
(int)cg.refdef.vieworg[1], (int)cg.refdef.vieworg[2],
(int)cg.refdefViewAngles[YAW]);
}
static void CG_ScoresDown_f( void ) {
if ( cg.scoresRequestTime + 2000 < cg.time ) {
// the scores are more than two seconds out of data,
// so request new ones
cg.scoresRequestTime = cg.time;
trap_SendClientCommand( "score" );
// leave the current scores up if they were already
// displayed, but if this is the first hit, clear them out
if ( !cg.showScores ) {
cg.showScores = qtrue;
cg.numScores = 0;
}
} else {
// show the cached contents even if they just pressed if it
// is within two seconds
cg.showScores = qtrue;
}
}
static void CG_ScoresUp_f( void ) {
if ( cg.showScores ) {
cg.showScores = qfalse;
cg.scoreFadeTime = cg.time;
}
}
static void CG_TellTarget_f( void ) {
int clientNum;
char command[128];
char message[128];
clientNum = CG_CrosshairPlayer();
if ( clientNum == -1 ) {
return;
}
trap_Args( message, 128 );
Com_sprintf( command, 128, "tell %i %s", clientNum, message );
trap_SendClientCommand( command );
}
static void CG_TellAttacker_f( void ) {
int clientNum;
char command[128];
char message[128];
clientNum = CG_LastAttacker();
if ( clientNum == -1 ) {
return;
}
trap_Args( message, 128 );
Com_sprintf( command, 128, "tell %i %s", clientNum, message );
trap_SendClientCommand( command );
}
static void CG_VoiceTellTarget_f( void ) {
int clientNum;
char command[128];
char message[128];
clientNum = CG_CrosshairPlayer();
if ( clientNum == -1 ) {
return;
}
trap_Args( message, 128 );
Com_sprintf( command, 128, "vtell %i %s", clientNum, message );
trap_SendClientCommand( command );
}
static void CG_VoiceTellAttacker_f( void ) {
int clientNum;
char command[128];
char message[128];
clientNum = CG_LastAttacker();
if ( clientNum == -1 ) {
return;
}
trap_Args( message, 128 );
Com_sprintf( command, 128, "vtell %i %s", clientNum, message );
trap_SendClientCommand( command );
}
/*
==================
CG_StartOrbit_f
==================
*/
static void CG_StartOrbit_f( void ) {
char var[MAX_TOKEN_CHARS];
trap_Cvar_VariableStringBuffer( "developer", var, sizeof( var ) );
if ( !atoi(var) ) {
return;
}
if (cg_cameraOrbit.value != 0) {
trap_Cvar_Set ("cg_cameraOrbit", "0");
trap_Cvar_Set("cg_thirdPerson", "0");
} else {
trap_Cvar_Set("cg_cameraOrbit", "5");
trap_Cvar_Set("cg_thirdPerson", "1");
trap_Cvar_Set("cg_thirdPersonAngle", "0");
trap_Cvar_Set("cg_thirdPersonRange", "100");
}
}
/*
static void CG_Camera_f( void ) {
char name[1024];
trap_Argv( 1, name, sizeof(name));
if (trap_loadCamera(name)) {
cg.cameraMode = qtrue;
trap_startCamera(cg.time);
} else {
CG_Printf ("Unable to load camera %s\n",name);
}
}
*/
typedef struct {
char *cmd;
void (*function)(void);
} consoleCommand_t;
static consoleCommand_t commands[] = {
{ "testgun", CG_TestGun_f },
{ "testmodel", CG_TestModel_f },
{ "nextframe", CG_TestModelNextFrame_f },
{ "prevframe", CG_TestModelPrevFrame_f },
{ "nextskin", CG_TestModelNextSkin_f },
{ "prevskin", CG_TestModelPrevSkin_f },
{ "viewpos", CG_Viewpos_f },
{ "+scores", CG_ScoresDown_f },
{ "-scores", CG_ScoresUp_f },
{ "+zoom", CG_ZoomDown_f },
{ "-zoom", CG_ZoomUp_f },
{ "sizeup", CG_SizeUp_f },
{ "sizedown", CG_SizeDown_f },
{ "weapnext", CG_NextWeapon_f },
{ "weapprev", CG_PrevWeapon_f },
{ "weapon", CG_Weapon_f },
{ "tell_target", CG_TellTarget_f },
{ "tell_attacker", CG_TellAttacker_f },
{ "vtell_target", CG_VoiceTellTarget_f },
{ "vtell_attacker", CG_VoiceTellAttacker_f },
{ "tcmd", CG_TargetCommand_f },
{ "startOrbit", CG_StartOrbit_f },
//{ "camera", CG_Camera_f },
{ "loaddeferred", CG_LoadDeferredPlayers }
};
/*
=================
CG_ConsoleCommand
The string has been tokenized and can be retrieved with
Cmd_Argc() / Cmd_Argv()
=================
*/
qboolean CG_ConsoleCommand( void ) {
const char *cmd;
int i;
cmd = CG_Argv(0);
for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) {
if ( !Q_stricmp( cmd, commands[i].cmd ) ) {
commands[i].function();
return qtrue;
}
}
return qfalse;
}
/*
=================
CG_InitConsoleCommands
Let the client system know about all of our commands
so it can perform tab completion
=================
*/
void CG_InitConsoleCommands( void ) {
int i;
for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) {
trap_AddCommand( commands[i].cmd );
}
//
// the game server will interpret these commands, which will be automatically
// forwarded to the server after they are not recognized locally
//
trap_AddCommand ("kill");
trap_AddCommand ("say");
trap_AddCommand ("say_team");
trap_AddCommand ("tell");
trap_AddCommand ("vsay");
trap_AddCommand ("vsay_team");
trap_AddCommand ("vtell");
trap_AddCommand ("vtaunt");
trap_AddCommand ("vosay");
trap_AddCommand ("vosay_team");
trap_AddCommand ("votell");
trap_AddCommand ("give");
trap_AddCommand ("god");
trap_AddCommand ("notarget");
trap_AddCommand ("noclip");
trap_AddCommand ("team");
trap_AddCommand ("follow");
trap_AddCommand ("levelshot");
trap_AddCommand ("addbot");
trap_AddCommand ("setviewpos");
trap_AddCommand ("callvote");
trap_AddCommand ("vote");
trap_AddCommand ("callteamvote");
trap_AddCommand ("teamvote");
trap_AddCommand ("stats");
trap_AddCommand ("teamtask");
trap_AddCommand ("loaddefered"); // spelled wrong, but not changing for demo
}
================================================
FILE: src/cgame/cg_draw.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_draw.c -- draw all of the graphical elements during
// active (after loading) gameplay
#include "cg_local.h"
int drawTeamOverlayModificationCount = -1;
int sortedTeamPlayers[TEAM_MAXOVERLAY];
int numSortedTeamPlayers;
char systemChat[256];
char teamChat1[256];
char teamChat2[256];
/*
==============
CG_DrawField
Draws large numbers for status bar and powerups
==============
*/
static void CG_DrawField (int x, int y, int width, int value) {
char num[16], *ptr;
int l;
int frame;
if ( width < 1 ) {
return;
}
// draw number string
if ( width > 5 ) {
width = 5;
}
switch ( width ) {
case 1:
value = value > 9 ? 9 : value;
value = value < 0 ? 0 : value;
break;
case 2:
value = value > 99 ? 99 : value;
value = value < -9 ? -9 : value;
break;
case 3:
value = value > 999 ? 999 : value;
value = value < -99 ? -99 : value;
break;
case 4:
value = value > 9999 ? 9999 : value;
value = value < -999 ? -999 : value;
break;
}
Com_sprintf (num, sizeof(num), "%i", value);
l = (int)strlen(num);
if (l > width)
l = width;
x += 2 + CHAR_WIDTH*(width - l);
ptr = num;
while (*ptr && l)
{
if (*ptr == '-')
frame = STAT_MINUS;
else
frame = *ptr -'0';
CG_DrawPic( x,y, CHAR_WIDTH, CHAR_HEIGHT, cgs.media.numberShaders[frame] );
x += CHAR_WIDTH;
ptr++;
l--;
}
}
/*
================
CG_Draw3DModel
================
*/
void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) {
refdef_t refdef;
refEntity_t ent;
if ( !cg_draw3dIcons.integer || !cg_drawIcons.integer ) {
return;
}
CG_AdjustFrom640( &x, &y, &w, &h );
memset( &refdef, 0, sizeof( refdef ) );
memset( &ent, 0, sizeof( ent ) );
AnglesToAxis( angles, ent.axis );
VectorCopy( origin, ent.origin );
ent.hModel = model;
ent.customSkin = skin;
ent.renderfx = RF_NOSHADOW; // no stencil shadows
refdef.rdflags = RDF_NOWORLDMODEL;
AxisClear( refdef.viewaxis );
refdef.fov_x = 30;
refdef.fov_y = 30;
refdef.x = x;
refdef.y = y;
refdef.width = w;
refdef.height = h;
refdef.time = cg.time;
trap_R_ClearScene();
trap_R_AddRefEntityToScene( &ent );
trap_R_RenderScene( &refdef );
}
/*
================
CG_DrawHead
Used for both the status bar and the scoreboard
================
*/
void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ) {
clipHandle_t cm;
clientInfo_t *ci;
float len;
vec3_t origin;
vec3_t mins, maxs;
ci = &cgs.clientinfo[ clientNum ];
if ( cg_draw3dIcons.integer ) {
cm = ci->headModel;
if ( !cm ) {
return;
}
// offset the origin y and z to center the head
trap_R_ModelBounds( cm, mins, maxs );
origin[2] = -0.5 * ( mins[2] + maxs[2] );
origin[1] = 0.5 * ( mins[1] + maxs[1] );
// calculate distance so the head nearly fills the box
// assume heads are taller than wide
len = 0.7 * ( maxs[2] - mins[2] );
origin[0] = len / 0.268; // len / tan( fov/2 )
// allow per-model tweaking
VectorAdd( origin, ci->headOffset, origin );
CG_Draw3DModel( x, y, w, h, ci->headModel, ci->headSkin, origin, headAngles );
} else if ( cg_drawIcons.integer ) {
CG_DrawPic( x, y, w, h, ci->modelIcon );
}
// if they are deferred, draw a cross out
if ( ci->deferred ) {
CG_DrawPic( x, y, w, h, cgs.media.deferShader );
}
}
/*
================
CG_DrawFlagModel
Used for both the status bar and the scoreboard
================
*/
void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean force2D ) {
qhandle_t cm;
float len;
vec3_t origin, angles;
vec3_t mins, maxs;
qhandle_t handle;
if ( !force2D && cg_draw3dIcons.integer ) {
VectorClear( angles );
cm = cgs.media.redFlagModel;
// offset the origin y and z to center the flag
trap_R_ModelBounds( cm, mins, maxs );
origin[2] = -0.5 * ( mins[2] + maxs[2] );
origin[1] = 0.5 * ( mins[1] + maxs[1] );
// calculate distance so the flag nearly fills the box
// assume heads are taller than wide
len = 0.5 * ( maxs[2] - mins[2] );
origin[0] = len / 0.268; // len / tan( fov/2 )
angles[YAW] = 60 * sin( cg.time / 2000.0 );;
if( team == TEAM_RED ) {
handle = cgs.media.redFlagModel;
} else if( team == TEAM_BLUE ) {
handle = cgs.media.blueFlagModel;
} else if( team == TEAM_FREE ) {
handle = cgs.media.neutralFlagModel;
} else {
return;
}
CG_Draw3DModel( x, y, w, h, handle, 0, origin, angles );
} else if ( cg_drawIcons.integer ) {
gitem_t *item;
if( team == TEAM_RED ) {
item = BG_FindItemForPowerup( PW_REDFLAG );
} else if( team == TEAM_BLUE ) {
item = BG_FindItemForPowerup( PW_BLUEFLAG );
} else if( team == TEAM_FREE ) {
item = BG_FindItemForPowerup( PW_NEUTRALFLAG );
} else {
return;
}
if (item) {
CG_DrawPic( x, y, w, h, cg_items[ ITEM_INDEX(item) ].icon );
}
}
}
/*
================
CG_DrawStatusBarHead
================
*/
static void CG_DrawStatusBarHead( float x ) {
vec3_t angles;
float size, stretch;
float frac;
VectorClear( angles );
if ( cg.damageTime && cg.time - cg.damageTime < DAMAGE_TIME ) {
frac = (float)(cg.time - cg.damageTime ) / DAMAGE_TIME;
size = ICON_SIZE * 1.25 * ( 1.5 - frac * 0.5 );
stretch = size - ICON_SIZE * 1.25;
// kick in the direction of damage
x -= stretch * 0.5 + cg.damageX * stretch * 0.5;
cg.headStartYaw = 180 + cg.damageX * 45;
cg.headEndYaw = 180 + 20 * cos( crandom()*M_PI );
cg.headEndPitch = 5 * cos( crandom()*M_PI );
cg.headStartTime = cg.time;
cg.headEndTime = cg.time + 100 + random() * 2000;
} else {
if ( cg.time >= cg.headEndTime ) {
// select a new head angle
cg.headStartYaw = cg.headEndYaw;
cg.headStartPitch = cg.headEndPitch;
cg.headStartTime = cg.headEndTime;
cg.headEndTime = cg.time + 100 + random() * 2000;
cg.headEndYaw = 180 + 20 * cos( crandom()*M_PI );
cg.headEndPitch = 5 * cos( crandom()*M_PI );
}
size = ICON_SIZE * 1.25;
}
// if the server was frozen for a while we may have a bad head start time
if ( cg.headStartTime > cg.time ) {
cg.headStartTime = cg.time;
}
frac = ( cg.time - cg.headStartTime ) / (float)( cg.headEndTime - cg.headStartTime );
frac = frac * frac * ( 3 - 2 * frac );
angles[YAW] = cg.headStartYaw + ( cg.headEndYaw - cg.headStartYaw ) * frac;
angles[PITCH] = cg.headStartPitch + ( cg.headEndPitch - cg.headStartPitch ) * frac;
CG_DrawHead( x, 480 - size, size, size,
cg.snap->ps.clientNum, angles );
}
/*
================
CG_DrawStatusBarFlag
================
*/
static void CG_DrawStatusBarFlag( float x, int team ) {
CG_DrawFlagModel( x, 480 - ICON_SIZE, ICON_SIZE, ICON_SIZE, team, qfalse );
}
/*
================
CG_DrawTeamBackground
================
*/
void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team )
{
vec4_t hcolor;
hcolor[3] = alpha;
if ( team == TEAM_RED ) {
hcolor[0] = 1;
hcolor[1] = 0;
hcolor[2] = 0;
} else if ( team == TEAM_BLUE ) {
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 1;
} else {
return;
}
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
}
/*
================
CG_DrawStatusBar
================
*/
static void CG_DrawStatusBar( void ) {
int color;
centity_t *cent;
playerState_t *ps;
int value;
vec4_t hcolor;
vec3_t angles;
vec3_t origin;
static float colors[4][4] = {
// { 0.2, 1.0, 0.2, 1.0 } , { 1.0, 0.2, 0.2, 1.0 }, {0.5, 0.5, 0.5, 1} };
{ 1.0f, 0.69f, 0.0f, 1.0f }, // normal
{ 1.0f, 0.2f, 0.2f, 1.0f }, // low health
{ 0.5f, 0.5f, 0.5f, 1.0f }, // weapon firing
{ 1.0f, 1.0f, 1.0f, 1.0f } }; // health > 100
if ( cg_drawStatus.integer == 0 ) {
return;
}
// draw the team background
CG_DrawTeamBackground( 0, 420, 640, 60, 0.33f, cg.snap->ps.persistant[PERS_TEAM] );
cent = &cg_entities[cg.snap->ps.clientNum];
ps = &cg.snap->ps;
VectorClear( angles );
// draw any 3D icons first, so the changes back to 2D are minimized
if ( cent->currentState.weapon && cg_weapons[ cent->currentState.weapon ].ammoModel ) {
origin[0] = 70;
origin[1] = 0;
origin[2] = 0;
angles[YAW] = 90 + 20 * sin( cg.time / 1000.0 );
CG_Draw3DModel( CHAR_WIDTH*3 + TEXT_ICON_SPACE, 432, ICON_SIZE, ICON_SIZE,
cg_weapons[ cent->currentState.weapon ].ammoModel, 0, origin, angles );
}
CG_DrawStatusBarHead( 185 + CHAR_WIDTH*3 + TEXT_ICON_SPACE );
if( cg.predictedPlayerState.powerups[PW_REDFLAG] ) {
CG_DrawStatusBarFlag( 185 + CHAR_WIDTH*3 + TEXT_ICON_SPACE + ICON_SIZE, TEAM_RED );
} else if( cg.predictedPlayerState.powerups[PW_BLUEFLAG] ) {
CG_DrawStatusBarFlag( 185 + CHAR_WIDTH*3 + TEXT_ICON_SPACE + ICON_SIZE, TEAM_BLUE );
} else if( cg.predictedPlayerState.powerups[PW_NEUTRALFLAG] ) {
CG_DrawStatusBarFlag( 185 + CHAR_WIDTH*3 + TEXT_ICON_SPACE + ICON_SIZE, TEAM_FREE );
}
if ( ps->stats[ STAT_ARMOR ] ) {
origin[0] = 90;
origin[1] = 0;
origin[2] = -10;
angles[YAW] = ( cg.time & 2047 ) * 360 / 2048.0;
CG_Draw3DModel( 370 + CHAR_WIDTH*3 + TEXT_ICON_SPACE, 432, ICON_SIZE, ICON_SIZE,
cgs.media.armorModel, 0, origin, angles );
}
//
// ammo
//
if ( cent->currentState.weapon ) {
value = ps->ammo[cent->currentState.weapon];
if ( value > -1 ) {
if ( cg.predictedPlayerState.weaponstate == WEAPON_FIRING
&& cg.predictedPlayerState.weaponTime > 100 ) {
// draw as dark grey when reloading
color = 2; // dark grey
} else {
if ( value >= 0 ) {
color = 0; // green
} else {
color = 1; // red
}
}
trap_R_SetColor( colors[color] );
CG_DrawField (0, 432, 3, value);
trap_R_SetColor( NULL );
// if we didn't draw a 3D icon, draw a 2D icon for ammo
if ( !cg_draw3dIcons.integer && cg_drawIcons.integer ) {
qhandle_t icon;
icon = cg_weapons[ cg.predictedPlayerState.weapon ].ammoIcon;
if ( icon ) {
CG_DrawPic( CHAR_WIDTH*3 + TEXT_ICON_SPACE, 432, ICON_SIZE, ICON_SIZE, icon );
}
}
}
}
//
// health
//
value = ps->stats[STAT_HEALTH];
if ( value > 100 ) {
trap_R_SetColor( colors[3] ); // white
} else if (value > 25) {
trap_R_SetColor( colors[0] ); // green
} else if (value > 0) {
color = (cg.time >> 8) & 1; // flash
trap_R_SetColor( colors[color] );
} else {
trap_R_SetColor( colors[1] ); // red
}
// stretch the health up when taking damage
CG_DrawField ( 185, 432, 3, value);
CG_ColorForHealth( hcolor );
trap_R_SetColor( hcolor );
//
// armor
//
value = ps->stats[STAT_ARMOR];
if (value > 0 ) {
trap_R_SetColor( colors[0] );
CG_DrawField (370, 432, 3, value);
trap_R_SetColor( NULL );
// if we didn't draw a 3D icon, draw a 2D icon for armor
if ( !cg_draw3dIcons.integer && cg_drawIcons.integer ) {
CG_DrawPic( 370 + CHAR_WIDTH*3 + TEXT_ICON_SPACE, 432, ICON_SIZE, ICON_SIZE, cgs.media.armorIcon );
}
}
}
/*
===========================================================================================
UPPER RIGHT CORNER
===========================================================================================
*/
/*
================
CG_DrawAttacker
================
*/
static float CG_DrawAttacker( float y ) {
int t;
float size;
vec3_t angles;
const char *info;
const char *name;
int clientNum;
if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) {
return y;
}
if ( !cg.attackerTime ) {
return y;
}
clientNum = cg.predictedPlayerState.persistant[PERS_ATTACKER];
if ( clientNum < 0 || clientNum >= MAX_CLIENTS || clientNum == cg.snap->ps.clientNum ) {
return y;
}
t = cg.time - cg.attackerTime;
if ( t > ATTACKER_HEAD_TIME ) {
cg.attackerTime = 0;
return y;
}
size = ICON_SIZE * 1.25;
angles[PITCH] = 0;
angles[YAW] = 180;
angles[ROLL] = 0;
CG_DrawHead( 640 - size, y, size, size, clientNum, angles );
info = CG_ConfigString( CS_PLAYERS + clientNum );
name = Info_ValueForKey( info, "n" );
y += size;
CG_DrawBigString( 640 - ( Q_PrintStrlen( name ) * BIGCHAR_WIDTH), y, name, 0.5 );
return y + BIGCHAR_HEIGHT + 2;
}
/*
==================
CG_DrawSnapshot
==================
*/
static float CG_DrawSnapshot( float y ) {
char *s;
int w;
s = va( "time:%i snap:%i cmd:%i", cg.snap->serverTime,
cg.latestSnapshotNum, cgs.serverCommandSequence );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString( 635 - w, y + 2, s, 1.0F);
return y + BIGCHAR_HEIGHT + 4;
}
/*
==================
CG_DrawFPS
==================
*/
#define FPS_FRAMES 4
static float CG_DrawFPS( float y ) {
char *s;
int w;
static int previousTimes[FPS_FRAMES];
static int index;
int i, total;
int fps;
static int previous;
int t, frameTime;
// don't use serverTime, because that will be drifting to
// correct for internet lag changes, timescales, timedemos, etc
t = trap_Milliseconds();
frameTime = t - previous;
previous = t;
previousTimes[index % FPS_FRAMES] = frameTime;
index++;
if ( index > FPS_FRAMES ) {
// average multiple frames together to smooth changes out a bit
total = 0;
for ( i = 0 ; i < FPS_FRAMES ; i++ ) {
total += previousTimes[i];
}
if ( !total ) {
total = 1;
}
fps = 1000 * FPS_FRAMES / total;
s = va( "%ifps", fps );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString( 635 - w, y + 2, s, 1.0F);
}
return y + BIGCHAR_HEIGHT + 4;
}
/*
=================
CG_DrawTimer
=================
*/
static float CG_DrawTimer( float y ) {
char *s;
int w;
int mins, seconds, tens;
int msec;
msec = cg.time - cgs.levelStartTime;
seconds = msec / 1000;
mins = seconds / 60;
seconds -= mins * 60;
tens = seconds / 10;
seconds -= tens * 10;
s = va( "%i:%i%i", mins, tens, seconds );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString( 635 - w, y + 2, s, 1.0F);
return y + BIGCHAR_HEIGHT + 4;
}
/*
=================
CG_DrawTeamOverlay
=================
*/
static float CG_DrawTeamOverlay( float y, qboolean right, qboolean upper ) {
int x, w, h, xx;
int i, j, len;
const char *p;
vec4_t hcolor;
int pwidth, lwidth;
int plyrs;
char st[16];
clientInfo_t *ci;
gitem_t *item;
int ret_y, count;
if ( !cg_drawTeamOverlay.integer ) {
return y;
}
if ( cg.snap->ps.persistant[PERS_TEAM] != TEAM_RED && cg.snap->ps.persistant[PERS_TEAM] != TEAM_BLUE ) {
return y; // Not on any team
}
plyrs = 0;
// max player name width
pwidth = 0;
count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers;
for (i = 0; i < count; i++) {
ci = cgs.clientinfo + sortedTeamPlayers[i];
if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) {
plyrs++;
len = CG_DrawStrlen(ci->name);
if (len > pwidth)
pwidth = len;
}
}
if (!plyrs)
return y;
if (pwidth > TEAM_OVERLAY_MAXNAME_WIDTH)
pwidth = TEAM_OVERLAY_MAXNAME_WIDTH;
// max location name width
lwidth = 0;
for (i = 1; i < MAX_LOCATIONS; i++) {
p = CG_ConfigString(CS_LOCATIONS + i);
if (p && *p) {
len = CG_DrawStrlen(p);
if (len > lwidth)
lwidth = len;
}
}
if (lwidth > TEAM_OVERLAY_MAXLOCATION_WIDTH)
lwidth = TEAM_OVERLAY_MAXLOCATION_WIDTH;
w = (pwidth + lwidth + 4 + 7) * TINYCHAR_WIDTH;
if ( right )
x = 640 - w;
else
x = 0;
h = plyrs * TINYCHAR_HEIGHT;
if ( upper ) {
ret_y = y + h;
} else {
y -= h;
ret_y = y;
}
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
hcolor[0] = 1.0f;
hcolor[1] = 0.0f;
hcolor[2] = 0.0f;
hcolor[3] = 0.33f;
} else { // if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE )
hcolor[0] = 0.0f;
hcolor[1] = 0.0f;
hcolor[2] = 1.0f;
hcolor[3] = 0.33f;
}
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
for (i = 0; i < count; i++) {
ci = cgs.clientinfo + sortedTeamPlayers[i];
if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) {
hcolor[0] = hcolor[1] = hcolor[2] = hcolor[3] = 1.0;
xx = x + TINYCHAR_WIDTH;
CG_DrawStringExt( xx, y,
ci->name, hcolor, qfalse, qfalse,
TINYCHAR_WIDTH, TINYCHAR_HEIGHT, TEAM_OVERLAY_MAXNAME_WIDTH);
if (lwidth) {
p = CG_ConfigString(CS_LOCATIONS + ci->location);
if (!p || !*p)
p = "unknown";
len = CG_DrawStrlen(p);
if (len > lwidth)
len = lwidth;
// xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth +
// ((lwidth/2 - len/2) * TINYCHAR_WIDTH);
xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth;
CG_DrawStringExt( xx, y,
p, hcolor, qfalse, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
TEAM_OVERLAY_MAXLOCATION_WIDTH);
}
CG_GetColorForHealth( ci->health, ci->armor, hcolor );
Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor);
xx = x + TINYCHAR_WIDTH * 3 +
TINYCHAR_WIDTH * pwidth + TINYCHAR_WIDTH * lwidth;
CG_DrawStringExt( xx, y,
st, hcolor, qfalse, qfalse,
TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 );
// draw weapon icon
xx += TINYCHAR_WIDTH * 3;
if ( cg_weapons[ci->curWeapon].weaponIcon ) {
CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
cg_weapons[ci->curWeapon].weaponIcon );
} else {
CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
cgs.media.deferShader );
}
// Draw powerup icons
if (right) {
xx = x;
} else {
xx = x + w - TINYCHAR_WIDTH;
}
for (j = 0; j <= PW_NUM_POWERUPS; j++) {
if (ci->powerups & (1 << j)) {
item = BG_FindItemForPowerup( j );
if (item) {
CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
trap_R_RegisterShader( item->icon ) );
if (right) {
xx -= TINYCHAR_WIDTH;
} else {
xx += TINYCHAR_WIDTH;
}
}
}
}
y += TINYCHAR_HEIGHT;
}
}
return ret_y;
//#endif
}
/*
=====================
CG_DrawUpperRight
=====================
*/
static void CG_DrawUpperRight( void ) {
float y;
y = 0;
if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 1 ) {
y = CG_DrawTeamOverlay( y, qtrue, qtrue );
}
if ( cg_drawSnapshot.integer ) {
y = CG_DrawSnapshot( y );
}
if ( cg_drawFPS.integer ) {
y = CG_DrawFPS( y );
}
if ( cg_drawTimer.integer ) {
y = CG_DrawTimer( y );
}
if ( cg_drawAttacker.integer ) {
y = CG_DrawAttacker( y );
}
}
/*
===========================================================================================
LOWER RIGHT CORNER
===========================================================================================
*/
/*
=================
CG_DrawScores
Draw the small two score display
=================
*/
static float CG_DrawScores( float y ) {
const char *s;
int s1, s2, score;
int x, w;
int v;
vec4_t color;
float y1;
gitem_t *item;
s1 = cgs.scores1;
s2 = cgs.scores2;
y -= BIGCHAR_HEIGHT + 8;
y1 = y;
// draw from the right side to left
if ( cgs.gametype >= GT_TEAM ) {
x = 640;
color[0] = 0.0f;
color[1] = 0.0f;
color[2] = 1.0f;
color[3] = 0.33f;
s = va( "%2i", s2 );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH + 8;
x -= w;
CG_FillRect( x, y-4, w, BIGCHAR_HEIGHT+8, color );
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
CG_DrawPic( x, y-4, w, BIGCHAR_HEIGHT+8, cgs.media.selectShader );
}
CG_DrawBigString( x + 4, y, s, 1.0F);
if ( cgs.gametype == GT_CTF ) {
// Display flag status
item = BG_FindItemForPowerup( PW_BLUEFLAG );
if (item) {
y1 = y - BIGCHAR_HEIGHT - 8;
if( cgs.blueflag >= 0 && cgs.blueflag <= 2 ) {
CG_DrawPic( x, y1-4, w, BIGCHAR_HEIGHT+8, cgs.media.blueFlagShader[cgs.blueflag] );
}
}
}
color[0] = 1.0f;
color[1] = 0.0f;
color[2] = 0.0f;
color[3] = 0.33f;
s = va( "%2i", s1 );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH + 8;
x -= w;
CG_FillRect( x, y-4, w, BIGCHAR_HEIGHT+8, color );
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
CG_DrawPic( x, y-4, w, BIGCHAR_HEIGHT+8, cgs.media.selectShader );
}
CG_DrawBigString( x + 4, y, s, 1.0F);
if ( cgs.gametype == GT_CTF ) {
// Display flag status
item = BG_FindItemForPowerup( PW_REDFLAG );
if (item) {
y1 = y - BIGCHAR_HEIGHT - 8;
if( cgs.redflag >= 0 && cgs.redflag <= 2 ) {
CG_DrawPic( x, y1-4, w, BIGCHAR_HEIGHT+8, cgs.media.redFlagShader[cgs.redflag] );
}
}
}
if ( cgs.gametype >= GT_CTF ) {
v = cgs.capturelimit;
} else {
v = cgs.fraglimit;
}
if ( v ) {
s = va( "%2i", v );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH + 8;
x -= w;
CG_DrawBigString( x + 4, y, s, 1.0F);
}
} else {
qboolean spectator;
x = 640;
score = cg.snap->ps.persistant[PERS_SCORE];
spectator = ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR );
// always show your score in the second box if not in first place
if ( s1 != score ) {
s2 = score;
}
if ( s2 != SCORE_NOT_PRESENT ) {
s = va( "%2i", s2 );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH + 8;
x -= w;
if ( !spectator && score == s2 && score != s1 ) {
color[0] = 1.0f;
color[1] = 0.0f;
color[2] = 0.0f;
color[3] = 0.33f;
CG_FillRect( x, y-4, w, BIGCHAR_HEIGHT+8, color );
CG_DrawPic( x, y-4, w, BIGCHAR_HEIGHT+8, cgs.media.selectShader );
} else {
color[0] = 0.5f;
color[1] = 0.5f;
color[2] = 0.5f;
color[3] = 0.33f;
CG_FillRect( x, y-4, w, BIGCHAR_HEIGHT+8, color );
}
CG_DrawBigString( x + 4, y, s, 1.0F);
}
// first place
if ( s1 != SCORE_NOT_PRESENT ) {
s = va( "%2i", s1 );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH + 8;
x -= w;
if ( !spectator && score == s1 ) {
color[0] = 0.0f;
color[1] = 0.0f;
color[2] = 1.0f;
color[3] = 0.33f;
CG_FillRect( x, y-4, w, BIGCHAR_HEIGHT+8, color );
CG_DrawPic( x, y-4, w, BIGCHAR_HEIGHT+8, cgs.media.selectShader );
} else {
color[0] = 0.5f;
color[1] = 0.5f;
color[2] = 0.5f;
color[3] = 0.33f;
CG_FillRect( x, y-4, w, BIGCHAR_HEIGHT+8, color );
}
CG_DrawBigString( x + 4, y, s, 1.0F);
}
if ( cgs.fraglimit ) {
s = va( "%2i", cgs.fraglimit );
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH + 8;
x -= w;
CG_DrawBigString( x + 4, y, s, 1.0F);
}
}
return y1 - 8;
}
/*
================
CG_DrawPowerups
================
*/
static float CG_DrawPowerups( float y ) {
int sorted[MAX_POWERUPS];
int sortedTime[MAX_POWERUPS];
int i, j, k;
int active;
playerState_t *ps;
int t;
gitem_t *item;
int x;
int color;
float size;
float f;
static float colors[2][4] = {
{ 0.2f, 1.0f, 0.2f, 1.0f } ,
{ 1.0f, 0.2f, 0.2f, 1.0f }
};
ps = &cg.snap->ps;
if ( ps->stats[STAT_HEALTH] <= 0 ) {
return y;
}
// sort the list by time remaining
active = 0;
for ( i = 0 ; i < MAX_POWERUPS ; i++ ) {
if ( !ps->powerups[ i ] ) {
continue;
}
t = ps->powerups[ i ] - cg.time;
// ZOID--don't draw if the power up has unlimited time (999 seconds)
// This is true of the CTF flags
if ( t < 0 || t > 999000) {
continue;
}
// insert into the list
for ( j = 0 ; j < active ; j++ ) {
if ( sortedTime[j] >= t ) {
for ( k = active - 1 ; k >= j ; k-- ) {
sorted[k+1] = sorted[k];
sortedTime[k+1] = sortedTime[k];
}
break;
}
}
sorted[j] = i;
sortedTime[j] = t;
active++;
}
// draw the icons and timers
x = 640 - ICON_SIZE - CHAR_WIDTH * 2;
for ( i = 0 ; i < active ; i++ ) {
item = BG_FindItemForPowerup( sorted[i] );
if (item) {
color = 1;
y -= ICON_SIZE;
trap_R_SetColor( colors[color] );
CG_DrawField( x, y, 2, sortedTime[ i ] / 1000 );
t = ps->powerups[ sorted[i] ];
if ( t - cg.time >= POWERUP_BLINKS * POWERUP_BLINK_TIME ) {
trap_R_SetColor( NULL );
} else {
vec4_t modulate;
f = (float)( t - cg.time ) / POWERUP_BLINK_TIME;
f -= (int)f;
modulate[0] = modulate[1] = modulate[2] = modulate[3] = f;
trap_R_SetColor( modulate );
}
if ( cg.powerupActive == sorted[i] &&
cg.time - cg.powerupTime < PULSE_TIME ) {
f = 1.0 - ( ( (float)cg.time - cg.powerupTime ) / PULSE_TIME );
size = ICON_SIZE * ( 1.0 + ( PULSE_SCALE - 1.0 ) * f );
} else {
size = ICON_SIZE;
}
CG_DrawPic( 640 - size, y + ICON_SIZE / 2 - size / 2,
size, size, trap_R_RegisterShader( item->icon ) );
}
}
trap_R_SetColor( NULL );
return y;
}
/*
=====================
CG_DrawLowerRight
=====================
*/
static void CG_DrawLowerRight( void ) {
float y;
y = 480 - ICON_SIZE;
if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 2 ) {
y = CG_DrawTeamOverlay( y, qtrue, qfalse );
}
y = CG_DrawScores( y );
y = CG_DrawPowerups( y );
}
/*
===================
CG_DrawPickupItem
===================
*/
static int CG_DrawPickupItem( int y ) {
int value;
float *fadeColor;
if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) {
return y;
}
y -= ICON_SIZE;
value = cg.itemPickup;
if ( value ) {
fadeColor = CG_FadeColor( cg.itemPickupTime, 3000 );
if ( fadeColor ) {
CG_RegisterItemVisuals( value );
trap_R_SetColor( fadeColor );
CG_DrawPic( 8, y, ICON_SIZE, ICON_SIZE, cg_items[ value ].icon );
CG_DrawBigString( ICON_SIZE + 16, y + (ICON_SIZE/2 - BIGCHAR_HEIGHT/2), bg_itemlist[ value ].pickup_name, fadeColor[0] );
trap_R_SetColor( NULL );
}
}
return y;
}
/*
=====================
CG_DrawLowerLeft
=====================
*/
static void CG_DrawLowerLeft( void ) {
float y;
y = 480 - ICON_SIZE;
if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 3 ) {
y = CG_DrawTeamOverlay( y, qfalse, qfalse );
}
y = CG_DrawPickupItem( y );
}
//===========================================================================================
/*
=================
CG_DrawTeamInfo
=================
*/
static void CG_DrawTeamInfo( void ) {
int w, h;
int i, len;
vec4_t hcolor;
int chatHeight;
#define CHATLOC_Y 420 // bottom end
#define CHATLOC_X 0
if (cg_teamChatHeight.integer < TEAMCHAT_HEIGHT)
chatHeight = cg_teamChatHeight.integer;
else
chatHeight = TEAMCHAT_HEIGHT;
if (chatHeight <= 0)
return; // disabled
if (cgs.teamLastChatPos != cgs.teamChatPos) {
if (cg.time - cgs.teamChatMsgTimes[cgs.teamLastChatPos % chatHeight] > cg_teamChatTime.integer) {
cgs.teamLastChatPos++;
}
h = (cgs.teamChatPos - cgs.teamLastChatPos) * TINYCHAR_HEIGHT;
w = 0;
for (i = cgs.teamLastChatPos; i < cgs.teamChatPos; i++) {
len = CG_DrawStrlen(cgs.teamChatMsgs[i % chatHeight]);
if (len > w)
w = len;
}
w *= TINYCHAR_WIDTH;
w += TINYCHAR_WIDTH * 2;
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
hcolor[0] = 1.0f;
hcolor[1] = 0.0f;
hcolor[2] = 0.0f;
hcolor[3] = 0.33f;
} else if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
hcolor[0] = 0.0f;
hcolor[1] = 0.0f;
hcolor[2] = 1.0f;
hcolor[3] = 0.33f;
} else {
hcolor[0] = 0.0f;
hcolor[1] = 1.0f;
hcolor[2] = 0.0f;
hcolor[3] = 0.33f;
}
trap_R_SetColor( hcolor );
CG_DrawPic( CHATLOC_X, CHATLOC_Y - h, 640, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
hcolor[0] = hcolor[1] = hcolor[2] = 1.0f;
hcolor[3] = 1.0f;
for (i = cgs.teamChatPos - 1; i >= cgs.teamLastChatPos; i--) {
CG_DrawStringExt( CHATLOC_X + TINYCHAR_WIDTH,
CHATLOC_Y - (cgs.teamChatPos - i)*TINYCHAR_HEIGHT,
cgs.teamChatMsgs[i % chatHeight], hcolor, qfalse, qfalse,
TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 );
}
}
}
/*
===================
CG_DrawHoldableItem
===================
*/
static void CG_DrawHoldableItem( void ) {
int value;
value = cg.snap->ps.stats[STAT_HOLDABLE_ITEM];
if ( value ) {
CG_RegisterItemVisuals( value );
CG_DrawPic( 640-ICON_SIZE, (SCREEN_HEIGHT-ICON_SIZE)/2, ICON_SIZE, ICON_SIZE, cg_items[ value ].icon );
}
}
/*
===================
CG_DrawReward
===================
*/
static void CG_DrawReward( void ) {
float *color;
int i, count;
float x, y;
char buf[32];
if ( !cg_drawRewards.integer ) {
return;
}
color = CG_FadeColor( cg.rewardTime, REWARD_TIME );
if ( !color ) {
if (cg.rewardStack > 0) {
for(i = 0; i < cg.rewardStack; i++) {
cg.rewardSound[i] = cg.rewardSound[i+1];
cg.rewardShader[i] = cg.rewardShader[i+1];
cg.rewardCount[i] = cg.rewardCount[i+1];
}
cg.rewardTime = cg.time;
cg.rewardStack--;
color = CG_FadeColor( cg.rewardTime, REWARD_TIME );
trap_S_StartLocalSound(cg.rewardSound[0], CHAN_ANNOUNCER);
} else {
return;
}
}
trap_R_SetColor( color );
/*
count = cg.rewardCount[0]/10; // number of big rewards to draw
if (count) {
y = 4;
x = 320 - count * ICON_SIZE;
for ( i = 0 ; i < count ; i++ ) {
CG_DrawPic( x, y, (ICON_SIZE*2)-4, (ICON_SIZE*2)-4, cg.rewardShader[0] );
x += (ICON_SIZE*2);
}
}
count = cg.rewardCount[0] - count*10; // number of small rewards to draw
*/
if ( cg.rewardCount[0] >= 10 ) {
y = 56;
x = 320 - ICON_SIZE/2;
CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] );
Com_sprintf(buf, sizeof(buf), "%d", cg.rewardCount[0]);
x = ( SCREEN_WIDTH - SMALLCHAR_WIDTH * CG_DrawStrlen( buf ) ) / 2;
CG_DrawStringExt( x, y+ICON_SIZE, buf, color, qfalse, qtrue,
SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 );
}
else {
count = cg.rewardCount[0];
y = 56;
x = 320 - count * ICON_SIZE/2;
for ( i = 0 ; i < count ; i++ ) {
CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] );
x += ICON_SIZE;
}
}
trap_R_SetColor( NULL );
}
/*
===============================================================================
LAGOMETER
===============================================================================
*/
#define LAG_SAMPLES 128
typedef struct {
int frameSamples[LAG_SAMPLES];
int frameCount;
int snapshotFlags[LAG_SAMPLES];
int snapshotSamples[LAG_SAMPLES];
int snapshotCount;
} lagometer_t;
lagometer_t lagometer;
/*
==============
CG_AddLagometerFrameInfo
Adds the current interpolate / extrapolate bar for this frame
==============
*/
void CG_AddLagometerFrameInfo( void ) {
int offset;
offset = cg.time - cg.latestSnapshotTime;
lagometer.frameSamples[ lagometer.frameCount & ( LAG_SAMPLES - 1) ] = offset;
lagometer.frameCount++;
}
/*
==============
CG_AddLagometerSnapshotInfo
Each time a snapshot is received, log its ping time and
the number of snapshots that were dropped before it.
Pass NULL for a dropped packet.
==============
*/
void CG_AddLagometerSnapshotInfo( snapshot_t *snap ) {
// dropped packet
if ( !snap ) {
lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = -1;
lagometer.snapshotCount++;
return;
}
// add this snapshot's info
lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->ping;
lagometer.snapshotFlags[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->snapFlags;
lagometer.snapshotCount++;
}
/*
==============
CG_DrawDisconnect
Should we draw something differnet for long lag vs no packets?
==============
*/
static void CG_DrawDisconnect( void ) {
float x, y;
int cmdNum;
usercmd_t cmd;
const char *s;
int w; // bk010215 - FIXME char message[1024];
// draw the phone jack if we are completely past our buffers
cmdNum = trap_GetCurrentCmdNumber() - CMD_BACKUP + 1;
trap_GetUserCmd( cmdNum, &cmd );
if ( cmd.serverTime <= cg.snap->ps.commandTime
|| cmd.serverTime > cg.time ) { // special check for map_restart // bk 0102165 - FIXME
return;
}
// also add text in center of screen
s = "Connection Interrupted"; // bk 010215 - FIXME
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString( 320 - w/2, 100, s, 1.0F);
// blink the icon
if ( ( cg.time >> 9 ) & 1 ) {
return;
}
x = 640 - 48;
y = 480 - 48;
CG_DrawPic( x, y, 48, 48, trap_R_RegisterShader("gfx/2d/net.tga" ) );
}
#define MAX_LAGOMETER_PING 900
#define MAX_LAGOMETER_RANGE 300
/*
==============
CG_DrawLagometer
==============
*/
static void CG_DrawLagometer( void ) {
int a, x, y, i;
float v;
float ax, ay, aw, ah, mid, range;
int color;
float vscale;
if ( !cg_lagometer.integer || cgs.localServer ) {
CG_DrawDisconnect();
return;
}
//
// draw the graph
//
x = 640 - 48;
y = 480 - 48;
trap_R_SetColor( NULL );
CG_DrawPic( x, y, 48, 48, cgs.media.lagometerShader );
ax = x;
ay = y;
aw = 48;
ah = 48;
CG_AdjustFrom640( &ax, &ay, &aw, &ah );
color = -1;
range = ah / 3;
mid = ay + range;
vscale = range / MAX_LAGOMETER_RANGE;
// draw the frame interpoalte / extrapolate graph
for ( a = 0 ; a < aw ; a++ ) {
i = ( lagometer.frameCount - 1 - a ) & (LAG_SAMPLES - 1);
v = lagometer.frameSamples[i];
v *= vscale;
if ( v > 0 ) {
if ( color != 1 ) {
color = 1;
trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] );
}
if ( v > range ) {
v = range;
}
trap_R_DrawStretchPic ( ax + aw - a, mid - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader );
} else if ( v < 0 ) {
if ( color != 2 ) {
color = 2;
trap_R_SetColor( g_color_table[ColorIndex(COLOR_BLUE)] );
}
v = -v;
if ( v > range ) {
v = range;
}
trap_R_DrawStretchPic( ax + aw - a, mid, 1, v, 0, 0, 0, 0, cgs.media.whiteShader );
}
}
// draw the snapshot latency / drop graph
range = ah / 2;
vscale = range / MAX_LAGOMETER_PING;
for ( a = 0 ; a < aw ; a++ ) {
i = ( lagometer.snapshotCount - 1 - a ) & (LAG_SAMPLES - 1);
v = lagometer.snapshotSamples[i];
if ( v > 0 ) {
if ( lagometer.snapshotFlags[i] & SNAPFLAG_RATE_DELAYED ) {
if ( color != 5 ) {
color = 5; // YELLOW for rate delay
trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] );
}
} else {
if ( color != 3 ) {
color = 3;
trap_R_SetColor( g_color_table[ColorIndex(COLOR_GREEN)] );
}
}
v = v * vscale;
if ( v > range ) {
v = range;
}
trap_R_DrawStretchPic( ax + aw - a, ay + ah - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader );
} else if ( v < 0 ) {
if ( color != 4 ) {
color = 4; // RED for dropped snapshots
trap_R_SetColor( g_color_table[ColorIndex(COLOR_RED)] );
}
trap_R_DrawStretchPic( ax + aw - a, ay + ah - range, 1, range, 0, 0, 0, 0, cgs.media.whiteShader );
}
}
trap_R_SetColor( NULL );
if ( cg_nopredict.integer || cg_synchronousClients.integer ) {
CG_DrawBigString( ax, ay, "snc", 1.0 );
}
CG_DrawDisconnect();
}
/*
===============================================================================
CENTER PRINTING
===============================================================================
*/
/*
==============
CG_CenterPrint
Called for important messages that should stay in the center of the screen
for a few moments
==============
*/
void CG_CenterPrint( const char *str, int y, int charWidth ) {
char *s;
Q_strncpyz( cg.centerPrint, str, sizeof(cg.centerPrint) );
cg.centerPrintTime = cg.time;
cg.centerPrintY = y;
cg.centerPrintCharWidth = charWidth;
// count the number of lines for centering
cg.centerPrintLines = 1;
s = cg.centerPrint;
while( *s ) {
if (*s == '\n')
cg.centerPrintLines++;
s++;
}
}
/*
===================
CG_DrawCenterString
===================
*/
static void CG_DrawCenterString( void ) {
char *start;
int l;
int x, y, w;
float *color;
if ( !cg.centerPrintTime ) {
return;
}
color = CG_FadeColor( cg.centerPrintTime, 1000 * cg_centertime.value );
if ( !color ) {
return;
}
trap_R_SetColor( color );
start = cg.centerPrint;
y = cg.centerPrintY - cg.centerPrintLines * BIGCHAR_HEIGHT / 2;
while ( 1 ) {
char linebuffer[1024];
for ( l = 0; l < 50; l++ ) {
if ( !start[l] || start[l] == '\n' ) {
break;
}
linebuffer[l] = start[l];
}
linebuffer[l] = 0;
w = cg.centerPrintCharWidth * CG_DrawStrlen( linebuffer );
x = ( SCREEN_WIDTH - w ) / 2;
CG_DrawStringExt( x, y, linebuffer, color, qfalse, qtrue,
cg.centerPrintCharWidth, (int)(cg.centerPrintCharWidth * 1.5), 0 );
y += cg.centerPrintCharWidth * 1.5;
while ( *start && ( *start != '\n' ) ) {
start++;
}
if ( !*start ) {
break;
}
start++;
}
trap_R_SetColor( NULL );
}
/*
================================================================================
CROSSHAIR
================================================================================
*/
/*
=================
CG_DrawCrosshair
=================
*/
static void CG_DrawCrosshair(void) {
float w, h;
qhandle_t hShader;
float f;
float x, y;
int ca;
if ( !cg_drawCrosshair.integer ) {
return;
}
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR) {
return;
}
if ( cg.renderingThirdPerson ) {
return;
}
// set color based on health
if ( cg_crosshairHealth.integer ) {
vec4_t hcolor;
CG_ColorForHealth( hcolor );
trap_R_SetColor( hcolor );
} else {
trap_R_SetColor( NULL );
}
w = h = cg_crosshairSize.value;
// pulse the size of the crosshair when picking up items
f = cg.time - cg.itemPickupBlendTime;
if ( f > 0 && f < ITEM_BLOB_TIME ) {
f /= ITEM_BLOB_TIME;
w *= ( 1 + f );
h *= ( 1 + f );
}
x = cg_crosshairX.integer;
y = cg_crosshairY.integer;
CG_AdjustFrom640( &x, &y, &w, &h );
ca = cg_drawCrosshair.integer;
if (ca < 0) {
ca = 0;
}
hShader = cgs.media.crosshairShader[ ca % NUM_CROSSHAIRS ];
trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * (cg.refdef.width - w),
y + cg.refdef.y + 0.5 * (cg.refdef.height - h),
w, h, 0, 0, 1, 1, hShader );
}
/*
=================
CG_ScanForCrosshairEntity
=================
*/
static void CG_ScanForCrosshairEntity( void ) {
trace_t trace;
vec3_t start, end;
int content;
VectorCopy( cg.refdef.vieworg, start );
VectorMA( start, 131072, cg.refdef.viewaxis[0], end );
CG_Trace( &trace, start, vec3_origin, vec3_origin, end,
cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY );
if ( trace.entityNum >= MAX_CLIENTS ) {
return;
}
// if the player is in fog, don't show it
content = trap_CM_PointContents( trace.endpos, 0 );
if ( content & CONTENTS_FOG ) {
return;
}
// if the player is invisible, don't show it
if ( cg_entities[ trace.entityNum ].currentState.powerups & ( 1 << PW_INVIS ) ) {
return;
}
// update the fade timer
cg.crosshairClientNum = trace.entityNum;
cg.crosshairClientTime = cg.time;
}
/*
=====================
CG_DrawCrosshairNames
=====================
*/
static void CG_DrawCrosshairNames( void ) {
float *color;
char *name;
float w;
if ( !cg_drawCrosshair.integer ) {
return;
}
if ( !cg_drawCrosshairNames.integer ) {
return;
}
if ( cg.renderingThirdPerson ) {
return;
}
// scan the known entities to see if the crosshair is sighted on one
CG_ScanForCrosshairEntity();
// draw the name of the player being looked at
color = CG_FadeColor( cg.crosshairClientTime, 1000 );
if ( !color ) {
trap_R_SetColor( NULL );
return;
}
name = cgs.clientinfo[ cg.crosshairClientNum ].name;
w = CG_DrawStrlen( name ) * BIGCHAR_WIDTH;
CG_DrawBigString( 320 - w / 2, 170, name, color[3] * 0.5f );
trap_R_SetColor( NULL );
}
//==============================================================================
/*
=================
CG_DrawSpectator
=================
*/
static void CG_DrawSpectator(void) {
CG_DrawBigString(320 - 9 * 8, 440, "SPECTATOR", 1.0F);
if ( cgs.gametype == GT_TOURNAMENT ) {
CG_DrawBigString(320 - 15 * 8, 460, "waiting to play", 1.0F);
}
else if ( cgs.gametype >= GT_TEAM ) {
CG_DrawBigString(320 - 39 * 8, 460, "press ESC and use the JOIN menu to play", 1.0F);
}
}
/*
=================
CG_DrawVote
=================
*/
static void CG_DrawVote(void) {
char *s;
int sec;
if ( !cgs.voteTime ) {
return;
}
// play a talk beep whenever it is modified
if ( cgs.voteModified ) {
cgs.voteModified = qfalse;
trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND );
}
sec = ( VOTE_TIME - ( cg.time - cgs.voteTime ) ) / 1000;
if ( sec < 0 ) {
sec = 0;
}
s = va("VOTE(%i):%s yes:%i no:%i", sec, cgs.voteString, cgs.voteYes, cgs.voteNo );
CG_DrawSmallString( 0, 58, s, 1.0F );
}
/*
=================
CG_DrawTeamVote
=================
*/
static void CG_DrawTeamVote(void) {
char *s;
int sec, cs_offset;
if ( cgs.clientinfo->team == TEAM_RED )
cs_offset = 0;
else if ( cgs.clientinfo->team == TEAM_BLUE )
cs_offset = 1;
else
return;
if ( !cgs.teamVoteTime[cs_offset] ) {
return;
}
// play a talk beep whenever it is modified
if ( cgs.teamVoteModified[cs_offset] ) {
cgs.teamVoteModified[cs_offset] = qfalse;
trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND );
}
sec = ( VOTE_TIME - ( cg.time - cgs.teamVoteTime[cs_offset] ) ) / 1000;
if ( sec < 0 ) {
sec = 0;
}
s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset],
cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] );
CG_DrawSmallString( 0, 90, s, 1.0F );
}
static qboolean CG_DrawScoreboard() {
return CG_DrawOldScoreboard();
}
/*
=================
CG_DrawIntermission
=================
*/
static void CG_DrawIntermission( void ) {
// int key;
if ( cgs.gametype == GT_SINGLE_PLAYER ) {
CG_DrawCenterString();
return;
}
cg.scoreFadeTime = cg.time;
cg.scoreBoardShowing = CG_DrawScoreboard();
}
/*
=================
CG_DrawFollow
=================
*/
static qboolean CG_DrawFollow( void ) {
float x;
vec4_t color;
const char *name;
if ( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) {
return qfalse;
}
color[0] = 1;
color[1] = 1;
color[2] = 1;
color[3] = 1;
CG_DrawBigString( 320 - 9 * 8, 24, "following", 1.0F );
name = cgs.clientinfo[ cg.snap->ps.clientNum ].name;
x = 0.5 * ( 640 - GIANT_WIDTH * CG_DrawStrlen( name ) );
CG_DrawStringExt( x, 40, name, color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
return qtrue;
}
/*
=================
CG_DrawAmmoWarning
=================
*/
static void CG_DrawAmmoWarning( void ) {
const char *s;
int w;
if ( cg_drawAmmoWarning.integer == 0 ) {
return;
}
if ( !cg.lowAmmoWarning ) {
return;
}
if ( cg.lowAmmoWarning == 2 ) {
s = "OUT OF AMMO";
} else {
s = "LOW AMMO WARNING";
}
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString(320 - w / 2, 64, s, 1.0F);
}
/*
=================
CG_DrawWarmup
=================
*/
static void CG_DrawWarmup( void ) {
int w;
int sec;
int i;
float scale;
clientInfo_t *ci1, *ci2;
int cw;
const char *s;
sec = cg.warmup;
if ( !sec ) {
return;
}
if ( sec < 0 ) {
s = "Waiting for players";
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString(320 - w / 2, 24, s, 1.0F);
cg.warmupCount = 0;
return;
}
if (cgs.gametype == GT_TOURNAMENT) {
// find the two active players
ci1 = NULL;
ci2 = NULL;
for ( i = 0 ; i < cgs.maxclients ; i++ ) {
if ( cgs.clientinfo[i].infoValid && cgs.clientinfo[i].team == TEAM_FREE ) {
if ( !ci1 ) {
ci1 = &cgs.clientinfo[i];
} else {
ci2 = &cgs.clientinfo[i];
}
}
}
if ( ci1 && ci2 ) {
s = va( "%s vs %s", ci1->name, ci2->name );
w = CG_DrawStrlen( s );
if ( w > 640 / GIANT_WIDTH ) {
cw = 640 / w;
} else {
cw = GIANT_WIDTH;
}
CG_DrawStringExt( 320 - w * cw/2, 20,s, colorWhite,
qfalse, qtrue, cw, (int)(cw * 1.5f), 0 );
}
} else {
if ( cgs.gametype == GT_FFA ) {
s = "Free For All";
} else if ( cgs.gametype == GT_TEAM ) {
s = "Team Deathmatch";
} else if ( cgs.gametype == GT_CTF ) {
s = "Capture the Flag";
} else {
s = "";
}
w = CG_DrawStrlen( s );
if ( w > 640 / GIANT_WIDTH ) {
cw = 640 / w;
} else {
cw = GIANT_WIDTH;
}
CG_DrawStringExt( 320 - w * cw/2, 25,s, colorWhite,
qfalse, qtrue, cw, (int)(cw * 1.1f), 0 );
}
sec = ( sec - cg.time ) / 1000;
if ( sec < 0 ) {
cg.warmup = 0;
sec = 0;
}
s = va( "Starts in: %i", sec + 1 );
if ( sec != cg.warmupCount ) {
cg.warmupCount = sec;
switch ( sec ) {
case 0:
trap_S_StartLocalSound( cgs.media.count1Sound, CHAN_ANNOUNCER );
break;
case 1:
trap_S_StartLocalSound( cgs.media.count2Sound, CHAN_ANNOUNCER );
break;
case 2:
trap_S_StartLocalSound( cgs.media.count3Sound, CHAN_ANNOUNCER );
break;
default:
break;
}
}
scale = 0.45f;
switch ( cg.warmupCount ) {
case 0:
cw = 28;
scale = 0.54f;
break;
case 1:
cw = 24;
scale = 0.51f;
break;
case 2:
cw = 20;
scale = 0.48f;
break;
default:
cw = 16;
scale = 0.45f;
break;
}
w = CG_DrawStrlen( s );
CG_DrawStringExt( 320 - w * cw/2, 70, s, colorWhite,
qfalse, qtrue, cw, (int)(cw * 1.5), 0 );
}
/*
=================
CG_Draw2D
=================
*/
static void CG_Draw2D( void ) {
// if we are taking a levelshot for the menu, don't draw anything
if ( cg.levelShot ) {
return;
}
if ( cg_draw2D.integer == 0 ) {
return;
}
if ( cg.snap->ps.pm_type == PM_INTERMISSION ) {
CG_DrawIntermission();
return;
}
/*
if (cg.cameraMode) {
return;
}
*/
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) {
CG_DrawSpectator();
CG_DrawCrosshair();
CG_DrawCrosshairNames();
} else {
// don't draw any status if dead or the scoreboard is being explicitly shown
if ( !cg.showScores && cg.snap->ps.stats[STAT_HEALTH] > 0 ) {
CG_DrawStatusBar();
CG_DrawAmmoWarning();
CG_DrawCrosshair();
CG_DrawCrosshairNames();
CG_DrawWeaponSelect();
CG_DrawHoldableItem();
CG_DrawReward();
}
if ( cgs.gametype >= GT_TEAM ) {
CG_DrawTeamInfo();
}
}
CG_DrawVote();
CG_DrawTeamVote();
CG_DrawLagometer();
CG_DrawUpperRight();
CG_DrawLowerRight();
CG_DrawLowerLeft();
if ( !CG_DrawFollow() ) {
CG_DrawWarmup();
}
// don't draw center string if scoreboard is up
cg.scoreBoardShowing = CG_DrawScoreboard();
if ( !cg.scoreBoardShowing) {
CG_DrawCenterString();
}
}
static void CG_DrawTourneyScoreboard() {
CG_DrawOldTourneyScoreboard();
}
/*
=====================
CG_DrawActive
Perform all drawing needed to completely fill the screen
=====================
*/
void CG_DrawActive( stereoFrame_t stereoView ) {
float separation;
vec3_t baseOrg;
// optionally draw the info screen instead
if ( !cg.snap ) {
CG_DrawInformation();
return;
}
// optionally draw the tournement scoreboard instead
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR &&
( cg.snap->ps.pm_flags & PMF_SCOREBOARD ) ) {
CG_DrawTourneyScoreboard();
return;
}
switch ( stereoView ) {
case STEREO_CENTER:
separation = 0;
break;
case STEREO_LEFT:
separation = -cg_stereoSeparation.value / 2;
break;
case STEREO_RIGHT:
separation = cg_stereoSeparation.value / 2;
break;
default:
separation = 0;
CG_Error( "CG_DrawActive: Undefined stereoView" );
}
// clear around the rendered view if sized down
CG_TileClear();
// offset vieworg appropriately if we're doing stereo separation
VectorCopy( cg.refdef.vieworg, baseOrg );
if ( separation != 0 ) {
VectorMA( cg.refdef.vieworg, -separation, cg.refdef.viewaxis[1], cg.refdef.vieworg );
}
// draw 3D view
trap_R_RenderScene( &cg.refdef );
// restore original viewpoint if running stereo
if ( separation != 0 ) {
VectorCopy( baseOrg, cg.refdef.vieworg );
}
// draw status bar and other floating elements
CG_Draw2D();
}
================================================
FILE: src/cgame/cg_drawtools.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_drawtools.c -- helper functions called by cg_draw, cg_scoreboard, cg_info, etc
#include "cg_local.h"
/*
================
CG_AdjustFrom640
Adjusted for resolution and screen aspect ratio
================
*/
void CG_AdjustFrom640( float *x, float *y, float *w, float *h ) {
#if 0
// adjust for wide screens
if ( cgs.glconfig.vidWidth * 480 > cgs.glconfig.vidHeight * 640 ) {
*x += 0.5 * ( cgs.glconfig.vidWidth - ( cgs.glconfig.vidHeight * 640 / 480 ) );
}
#endif
// scale for screen sizes
*x *= cgs.screenXScale;
*y *= cgs.screenYScale;
*w *= cgs.screenXScale;
*h *= cgs.screenYScale;
}
/*
================
CG_FillRect
Coordinates are 640*480 virtual values
=================
*/
void CG_FillRect( float x, float y, float width, float height, const float *color ) {
trap_R_SetColor( color );
CG_AdjustFrom640( &x, &y, &width, &height );
trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader );
trap_R_SetColor( NULL );
}
/*
================
CG_DrawSides
Coords are virtual 640x480
================
*/
void CG_DrawSides(float x, float y, float w, float h, float size) {
CG_AdjustFrom640( &x, &y, &w, &h );
size *= cgs.screenXScale;
trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );
trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );
}
void CG_DrawTopBottom(float x, float y, float w, float h, float size) {
CG_AdjustFrom640( &x, &y, &w, &h );
size *= cgs.screenYScale;
trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader );
trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader );
}
/*
================
UI_DrawRect
Coordinates are 640*480 virtual values
=================
*/
void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ) {
trap_R_SetColor( color );
CG_DrawTopBottom(x, y, width, height, size);
CG_DrawSides(x, y, width, height, size);
trap_R_SetColor( NULL );
}
/*
================
CG_DrawPic
Coordinates are 640*480 virtual values
=================
*/
void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ) {
CG_AdjustFrom640( &x, &y, &width, &height );
trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
}
/*
===============
CG_DrawChar
Coordinates and size in 640*480 virtual screen size
===============
*/
void CG_DrawChar( int x, int y, int width, int height, int ch ) {
int row, col;
float frow, fcol;
float size;
float ax, ay, aw, ah;
ch &= 255;
if ( ch == ' ' ) {
return;
}
ax = x;
ay = y;
aw = width;
ah = height;
CG_AdjustFrom640( &ax, &ay, &aw, &ah );
row = ch>>4;
col = ch&15;
frow = row*0.0625;
fcol = col*0.0625;
size = 0.0625;
trap_R_DrawStretchPic( ax, ay, aw, ah,
fcol, frow,
fcol + size, frow + size,
cgs.media.charsetShader );
}
/*
==================
CG_DrawStringExt
Draws a multi-colored string with a drop shadow, optionally forcing
to a fixed color.
Coordinates are at 640 by 480 virtual resolution
==================
*/
void CG_DrawStringExt( int x, int y, const char *string, const float *setColor,
qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ) {
vec4_t color;
const char *s;
int xx;
int cnt;
if (maxChars <= 0)
maxChars = 32767; // do them all!
// draw the drop shadow
if (shadow) {
color[0] = color[1] = color[2] = 0;
color[3] = setColor[3];
trap_R_SetColor( color );
s = string;
xx = x;
cnt = 0;
while ( *s && cnt < maxChars) {
if ( Q_IsColorString( s ) ) {
s += 2;
continue;
}
CG_DrawChar( xx + 2, y + 2, charWidth, charHeight, *s );
cnt++;
xx += charWidth;
s++;
}
}
// draw the colored text
s = string;
xx = x;
cnt = 0;
trap_R_SetColor( setColor );
while ( *s && cnt < maxChars) {
if ( Q_IsColorString( s ) ) {
if ( !forceColor ) {
memcpy( color, g_color_table[ColorIndex(*(s+1))], sizeof( color ) );
color[3] = setColor[3];
trap_R_SetColor( color );
}
s += 2;
continue;
}
CG_DrawChar( xx, y, charWidth, charHeight, *s );
xx += charWidth;
cnt++;
s++;
}
trap_R_SetColor( NULL );
}
void CG_DrawBigString( int x, int y, const char *s, float alpha ) {
float color[4];
color[0] = color[1] = color[2] = 1.0;
color[3] = alpha;
CG_DrawStringExt( x, y, s, color, qfalse, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 );
}
void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ) {
CG_DrawStringExt( x, y, s, color, qtrue, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 );
}
void CG_DrawSmallString( int x, int y, const char *s, float alpha ) {
float color[4];
color[0] = color[1] = color[2] = 1.0;
color[3] = alpha;
CG_DrawStringExt( x, y, s, color, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 );
}
void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ) {
CG_DrawStringExt( x, y, s, color, qtrue, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 );
}
/*
=================
CG_DrawStrlen
Returns character count, skiping color escape codes
=================
*/
int CG_DrawStrlen( const char *str ) {
const char *s = str;
int count = 0;
while ( *s ) {
if ( Q_IsColorString( s ) ) {
s += 2;
} else {
count++;
s++;
}
}
return count;
}
/*
=============
CG_TileClearBox
This repeats a 64*64 tile graphic to fill the screen around a sized down
refresh window.
=============
*/
static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShader ) {
float s1, t1, s2, t2;
s1 = x/64.0;
t1 = y/64.0;
s2 = (x+w)/64.0;
t2 = (y+h)/64.0;
trap_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, hShader );
}
/*
==============
CG_TileClear
Clear around a sized down screen
==============
*/
void CG_TileClear( void ) {
int top, bottom, left, right;
int w, h;
w = cgs.glconfig.vidWidth;
h = cgs.glconfig.vidHeight;
if ( cg.refdef.x == 0 && cg.refdef.y == 0 &&
cg.refdef.width == w && cg.refdef.height == h ) {
return; // full screen rendering
}
top = cg.refdef.y;
bottom = top + cg.refdef.height-1;
left = cg.refdef.x;
right = left + cg.refdef.width-1;
// clear above view screen
CG_TileClearBox( 0, 0, w, top, cgs.media.backTileShader );
// clear below view screen
CG_TileClearBox( 0, bottom, w, h - bottom, cgs.media.backTileShader );
// clear left of view screen
CG_TileClearBox( 0, top, left, bottom - top + 1, cgs.media.backTileShader );
// clear right of view screen
CG_TileClearBox( right, top, w - right, bottom - top + 1, cgs.media.backTileShader );
}
/*
================
CG_FadeColor
================
*/
float *CG_FadeColor( int startMsec, int totalMsec ) {
static vec4_t color;
int t;
if ( startMsec == 0 ) {
return NULL;
}
t = cg.time - startMsec;
if ( t >= totalMsec ) {
return NULL;
}
// fade out
if ( totalMsec - t < FADE_TIME ) {
color[3] = ( totalMsec - t ) * 1.0/FADE_TIME;
} else {
color[3] = 1.0;
}
color[0] = color[1] = color[2] = 1;
return color;
}
/*
================
CG_TeamColor
================
*/
float *CG_TeamColor( int team ) {
static vec4_t red = {1, 0.2f, 0.2f, 1};
static vec4_t blue = {0.2f, 0.2f, 1, 1};
static vec4_t other = {1, 1, 1, 1};
static vec4_t spectator = {0.7f, 0.7f, 0.7f, 1};
switch ( team ) {
case TEAM_RED:
return red;
case TEAM_BLUE:
return blue;
case TEAM_SPECTATOR:
return spectator;
default:
return other;
}
}
/*
=================
CG_GetColorForHealth
=================
*/
void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ) {
int count;
int max;
// calculate the total points of damage that can
// be sustained at the current health / armor level
if ( health <= 0 ) {
VectorClear( hcolor ); // black
hcolor[3] = 1;
return;
}
count = armor;
max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION );
if ( max < count ) {
count = max;
}
health += count;
// set the color based on health
hcolor[0] = 1.0;
hcolor[3] = 1.0;
if ( health >= 100 ) {
hcolor[2] = 1.0;
} else if ( health < 66 ) {
hcolor[2] = 0;
} else {
hcolor[2] = ( health - 66 ) / 33.0;
}
if ( health > 60 ) {
hcolor[1] = 1.0;
} else if ( health < 30 ) {
hcolor[1] = 0;
} else {
hcolor[1] = ( health - 30 ) / 30.0;
}
}
/*
=================
CG_ColorForHealth
=================
*/
void CG_ColorForHealth( vec4_t hcolor ) {
CG_GetColorForHealth( cg.snap->ps.stats[STAT_HEALTH],
cg.snap->ps.stats[STAT_ARMOR], hcolor );
}
// bk001205 - code below duplicated in q3_ui/ui-atoms.c
// bk001205 - FIXME: does this belong in ui_shared.c?
// bk001205 - FIXME: HARD_LINKED flags not visible here
#ifndef Q3_STATIC // bk001205 - q_shared defines not visible here
/*
=================
UI_DrawProportionalString2
=================
*/
static int propMap[128][3] = {
{0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1},
{0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1},
{0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1},
{0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1}, {0, 0, -1},
{0, 0, PROP_SPACE_WIDTH}, // SPACE
{11, 122, 7}, // !
{154, 181, 14}, // "
{55, 122, 17}, // #
{79, 122, 18}, // $
{101, 122, 23}, // %
{153, 122, 18}, // &
{9, 93, 7}, // '
{207, 122, 8}, // (
{230, 122, 9}, // )
{177, 122, 18}, // *
{30, 152, 18}, // +
{85, 181, 7}, // ,
{34, 93, 11}, // -
{110, 181, 6}, // .
{130, 152, 14}, // /
{22, 64, 17}, // 0
{41, 64, 12}, // 1
{58, 64, 17}, // 2
{78, 64, 18}, // 3
{98, 64, 19}, // 4
{120, 64, 18}, // 5
{141, 64, 18}, // 6
{204, 64, 16}, // 7
{162, 64, 17}, // 8
{182, 64, 18}, // 9
{59, 181, 7}, // :
{35,181, 7}, // ;
{203, 152, 14}, // <
{56, 93, 14}, // =
{228, 152, 14}, // >
{177, 181, 18}, // ?
{28, 122, 22}, // @
{5, 4, 18}, // A
{27, 4, 18}, // B
{48, 4, 18}, // C
{69, 4, 17}, // D
{90, 4, 13}, // E
{106, 4, 13}, // F
{121, 4, 18}, // G
{143, 4, 17}, // H
{164, 4, 8}, // I
{175, 4, 16}, // J
{195, 4, 18}, // K
{216, 4, 12}, // L
{230, 4, 23}, // M
{6, 34, 18}, // N
{27, 34, 18}, // O
{48, 34, 18}, // P
{68, 34, 18}, // Q
{90, 34, 17}, // R
{110, 34, 18}, // S
{130, 34, 14}, // T
{146, 34, 18}, // U
{166, 34, 19}, // V
{185, 34, 29}, // W
{215, 34, 18}, // X
{234, 34, 18}, // Y
{5, 64, 14}, // Z
{60, 152, 7}, // [
{106, 151, 13}, // '\'
{83, 152, 7}, // ]
{128, 122, 17}, // ^
{4, 152, 21}, // _
{134, 181, 5}, // '
{5, 4, 18}, // A
{27, 4, 18}, // B
{48, 4, 18}, // C
{69, 4, 17}, // D
{90, 4, 13}, // E
{106, 4, 13}, // F
{121, 4, 18}, // G
{143, 4, 17}, // H
{164, 4, 8}, // I
{175, 4, 16}, // J
{195, 4, 18}, // K
{216, 4, 12}, // L
{230, 4, 23}, // M
{6, 34, 18}, // N
{27, 34, 18}, // O
{48, 34, 18}, // P
{68, 34, 18}, // Q
{90, 34, 17}, // R
{110, 34, 18}, // S
{130, 34, 14}, // T
{146, 34, 18}, // U
{166, 34, 19}, // V
{185, 34, 29}, // W
{215, 34, 18}, // X
{234, 34, 18}, // Y
{5, 64, 14}, // Z
{153, 152, 13}, // {
{11, 181, 5}, // |
{180, 152, 13}, // }
{79, 93, 17}, // ~
{0, 0, -1} // DEL
};
static int propMapB[26][3] = {
{11, 12, 33},
{49, 12, 31},
{85, 12, 31},
{120, 12, 30},
{156, 12, 21},
{183, 12, 21},
{207, 12, 32},
{13, 55, 30},
{49, 55, 13},
{66, 55, 29},
{101, 55, 31},
{135, 55, 21},
{158, 55, 40},
{204, 55, 32},
{12, 97, 31},
{48, 97, 31},
{82, 97, 30},
{118, 97, 30},
{153, 97, 30},
{185, 97, 25},
{213, 97, 30},
{11, 139, 32},
{42, 139, 51},
{93, 139, 32},
{126, 139, 31},
{158, 139, 25},
};
#define PROPB_GAP_WIDTH 4
#define PROPB_SPACE_WIDTH 12
#define PROPB_HEIGHT 36
/*
=================
UI_DrawBannerString
=================
*/
static void UI_DrawBannerString2( int x, int y, const char* str, vec4_t color )
{
const char* s;
unsigned char ch; // bk001204 : array subscript
float ax;
float ay;
float aw;
float ah;
float frow;
float fcol;
float fwidth;
float fheight;
// draw the colored text
trap_R_SetColor( color );
ax = x * cgs.screenXScale + cgs.screenXBias;
ay = y * cgs.screenXScale;
s = str;
while ( *s )
{
ch = *s & 127;
if ( ch == ' ' ) {
ax += ((float)PROPB_SPACE_WIDTH + (float)PROPB_GAP_WIDTH)* cgs.screenXScale;
}
else if ( ch >= 'A' && ch <= 'Z' ) {
ch -= 'A';
fcol = (float)propMapB[ch][0] / 256.0f;
frow = (float)propMapB[ch][1] / 256.0f;
fwidth = (float)propMapB[ch][2] / 256.0f;
fheight = (float)PROPB_HEIGHT / 256.0f;
aw = (float)propMapB[ch][2] * cgs.screenXScale;
ah = (float)PROPB_HEIGHT * cgs.screenXScale;
trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol+fwidth, frow+fheight, cgs.media.charsetPropB );
ax += (aw + (float)PROPB_GAP_WIDTH * cgs.screenXScale);
}
s++;
}
trap_R_SetColor( NULL );
}
void UI_DrawBannerString( int x, int y, const char* str, int style, vec4_t color ) {
const char * s;
int ch;
int width;
vec4_t drawcolor;
// find the width of the drawn text
s = str;
width = 0;
while ( *s ) {
ch = *s;
if ( ch == ' ' ) {
width += PROPB_SPACE_WIDTH;
}
else if ( ch >= 'A' && ch <= 'Z' ) {
width += propMapB[ch - 'A'][2] + PROPB_GAP_WIDTH;
}
s++;
}
width -= PROPB_GAP_WIDTH;
switch( style & UI_FORMATMASK ) {
case UI_CENTER:
x -= width / 2;
break;
case UI_RIGHT:
x -= width;
break;
case UI_LEFT:
default:
break;
}
if ( style & UI_DROPSHADOW ) {
drawcolor[0] = drawcolor[1] = drawcolor[2] = 0;
drawcolor[3] = color[3];
UI_DrawBannerString2( x+2, y+2, str, drawcolor );
}
UI_DrawBannerString2( x, y, str, color );
}
int UI_ProportionalStringWidth( const char* str ) {
const char * s;
int ch;
int charWidth;
int width;
s = str;
width = 0;
while ( *s ) {
ch = *s & 127;
charWidth = propMap[ch][2];
if ( charWidth != -1 ) {
width += charWidth;
width += PROP_GAP_WIDTH;
}
s++;
}
width -= PROP_GAP_WIDTH;
return width;
}
static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t color, float sizeScale, qhandle_t charset )
{
const char* s;
unsigned char ch; // bk001204 - unsigned
float ax;
float ay;
float aw;
float ah;
float frow;
float fcol;
float fwidth;
float fheight;
// draw the colored text
trap_R_SetColor( color );
ax = x * cgs.screenXScale + cgs.screenXBias;
ay = y * cgs.screenXScale;
s = str;
while ( *s )
{
ch = *s & 127;
if ( ch == ' ' ) {
aw = (float)PROP_SPACE_WIDTH * cgs.screenXScale * sizeScale;
} else if ( propMap[ch][2] != -1 ) {
fcol = (float)propMap[ch][0] / 256.0f;
frow = (float)propMap[ch][1] / 256.0f;
fwidth = (float)propMap[ch][2] / 256.0f;
fheight = (float)PROP_HEIGHT / 256.0f;
aw = (float)propMap[ch][2] * cgs.screenXScale * sizeScale;
ah = (float)PROP_HEIGHT * cgs.screenXScale * sizeScale;
trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol+fwidth, frow+fheight, charset );
} else {
aw = 0;
}
ax += (aw + (float)PROP_GAP_WIDTH * cgs.screenXScale * sizeScale);
s++;
}
trap_R_SetColor( NULL );
}
/*
=================
UI_ProportionalSizeScale
=================
*/
float UI_ProportionalSizeScale( int style ) {
if( style & UI_SMALLFONT ) {
return 0.75;
}
return 1.00;
}
/*
=================
UI_DrawProportionalString
=================
*/
void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ) {
vec4_t drawcolor;
int width;
float sizeScale;
sizeScale = UI_ProportionalSizeScale( style );
switch( style & UI_FORMATMASK ) {
case UI_CENTER:
width = UI_ProportionalStringWidth( str ) * sizeScale;
x -= width / 2;
break;
case UI_RIGHT:
width = UI_ProportionalStringWidth( str ) * sizeScale;
x -= width;
break;
case UI_LEFT:
default:
break;
}
if ( style & UI_DROPSHADOW ) {
drawcolor[0] = drawcolor[1] = drawcolor[2] = 0;
drawcolor[3] = color[3];
UI_DrawProportionalString2( x+2, y+2, str, drawcolor, sizeScale, cgs.media.charsetProp );
}
if ( style & UI_INVERSE ) {
drawcolor[0] = color[0] * 0.8;
drawcolor[1] = color[1] * 0.8;
drawcolor[2] = color[2] * 0.8;
drawcolor[3] = color[3];
UI_DrawProportionalString2( x, y, str, drawcolor, sizeScale, cgs.media.charsetProp );
return;
}
if ( style & UI_PULSE ) {
drawcolor[0] = color[0] * 0.8;
drawcolor[1] = color[1] * 0.8;
drawcolor[2] = color[2] * 0.8;
drawcolor[3] = color[3];
UI_DrawProportionalString2( x, y, str, color, sizeScale, cgs.media.charsetProp );
drawcolor[0] = color[0];
drawcolor[1] = color[1];
drawcolor[2] = color[2];
drawcolor[3] = 0.5 + 0.5 * sin( cg.time / PULSE_DIVISOR );
UI_DrawProportionalString2( x, y, str, drawcolor, sizeScale, cgs.media.charsetPropGlow );
return;
}
UI_DrawProportionalString2( x, y, str, color, sizeScale, cgs.media.charsetProp );
}
#endif // Q3STATIC
================================================
FILE: src/cgame/cg_effects.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_effects.c -- these functions generate localentities, usually as a result
// of event processing
#include "cg_local.h"
/*
==================
CG_BubbleTrail
Bullets shot underwater
==================
*/
void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ) {
vec3_t move;
vec3_t vec;
float len;
int i;
if ( cg_noProjectileTrail.integer ) {
return;
}
VectorCopy (start, move);
VectorSubtract (end, start, vec);
len = VectorNormalize (vec);
// advance a random amount first
i = rand() % (int)spacing;
VectorMA( move, i, vec, move );
VectorScale (vec, spacing, vec);
for ( ; i < len; i += spacing ) {
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
le->leFlags = LEF_PUFF_DONT_SCALE;
le->leType = LE_MOVE_SCALE_FADE;
le->startTime = cg.time;
le->endTime = cg.time + 1000 + random() * 250;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
re = &le->refEntity;
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_SPRITE;
re->rotation = 0;
re->radius = 3;
re->customShader = cgs.media.waterBubbleShader;
re->shaderRGBA[0] = 0xff;
re->shaderRGBA[1] = 0xff;
re->shaderRGBA[2] = 0xff;
re->shaderRGBA[3] = 0xff;
le->color[3] = 1.0;
le->pos.trType = TR_LINEAR;
le->pos.trTime = cg.time;
VectorCopy( move, le->pos.trBase );
le->pos.trDelta[0] = crandom()*5;
le->pos.trDelta[1] = crandom()*5;
le->pos.trDelta[2] = crandom()*5 + 6;
VectorAdd (move, vec, move);
}
}
/*
=====================
CG_SmokePuff
Adds a smoke puff or blood trail localEntity.
=====================
*/
localEntity_t *CG_SmokePuff( const vec3_t p, const vec3_t vel,
float radius,
float r, float g, float b, float a,
float duration,
int startTime,
int fadeInTime,
int leFlags,
qhandle_t hShader ) {
static int seed = 0x92;
localEntity_t *le;
refEntity_t *re;
// int fadeInTime = startTime + duration / 2;
le = CG_AllocLocalEntity();
le->leFlags = leFlags;
le->radius = radius;
re = &le->refEntity;
re->rotation = Q_random( &seed ) * 360;
re->radius = radius;
re->shaderTime = startTime / 1000.0f;
le->leType = LE_MOVE_SCALE_FADE;
le->startTime = startTime;
le->fadeInTime = fadeInTime;
le->endTime = startTime + duration;
if ( fadeInTime > startTime ) {
le->lifeRate = 1.0 / ( le->endTime - le->fadeInTime );
}
else {
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
}
le->color[0] = r;
le->color[1] = g;
le->color[2] = b;
le->color[3] = a;
le->pos.trType = TR_LINEAR;
le->pos.trTime = startTime;
VectorCopy( vel, le->pos.trDelta );
VectorCopy( p, le->pos.trBase );
VectorCopy( p, re->origin );
re->customShader = hShader;
re->shaderRGBA[0] = le->color[0] * 0xff;
re->shaderRGBA[1] = le->color[1] * 0xff;
re->shaderRGBA[2] = le->color[2] * 0xff;
re->shaderRGBA[3] = 0xff;
re->reType = RT_SPRITE;
re->radius = le->radius;
return le;
}
/*
==================
CG_SpawnEffect
Player teleporting in or out
==================
*/
void CG_SpawnEffect( vec3_t org ) {
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
le->leFlags = 0;
le->leType = LE_FADE_RGB;
le->startTime = cg.time;
le->endTime = cg.time + 500;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0;
re = &le->refEntity;
re->reType = RT_MODEL;
re->shaderTime = cg.time / 1000.0f;
re->customShader = cgs.media.teleportEffectShader;
re->hModel = cgs.media.teleportEffectModel;
AxisClear( re->axis );
VectorCopy( org, re->origin );
re->origin[2] -= 24;
}
/*
==================
CG_ScorePlum
==================
*/
void CG_ScorePlum( int client, vec3_t org, int score ) {
localEntity_t *le;
refEntity_t *re;
vec3_t angles;
static vec3_t lastPos;
// only visualize for the client that scored
if (client != cg.predictedPlayerState.clientNum || cg_scorePlum.integer == 0) {
return;
}
le = CG_AllocLocalEntity();
le->leFlags = 0;
le->leType = LE_SCOREPLUM;
le->startTime = cg.time;
le->endTime = cg.time + 4000;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0;
le->radius = score;
VectorCopy( org, le->pos.trBase );
if (org[2] >= lastPos[2] - 20 && org[2] <= lastPos[2] + 20) {
le->pos.trBase[2] -= 20;
}
//CG_Printf( "Plum origin %i %i %i -- %i\n", (int)org[0], (int)org[1], (int)org[2], (int)Distance(org, lastPos));
VectorCopy(org, lastPos);
re = &le->refEntity;
re->reType = RT_SPRITE;
re->radius = 16;
VectorClear(angles);
AnglesToAxis( angles, re->axis );
}
/*
====================
CG_MakeExplosion
====================
*/
localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir,
qhandle_t hModel, qhandle_t shader,
int msec, qboolean isSprite ) {
float ang;
localEntity_t *ex;
int offset;
vec3_t tmpVec, newOrigin;
if ( msec <= 0 ) {
CG_Error( "CG_MakeExplosion: msec = %i", msec );
}
// skew the time a bit so they aren't all in sync
offset = rand() & 63;
ex = CG_AllocLocalEntity();
if ( isSprite ) {
ex->leType = LE_SPRITE_EXPLOSION;
// randomly rotate sprite orientation
ex->refEntity.rotation = rand() % 360;
VectorScale( dir, 16, tmpVec );
VectorAdd( tmpVec, origin, newOrigin );
} else {
ex->leType = LE_EXPLOSION;
VectorCopy( origin, newOrigin );
// set axis with random rotate
if ( !dir ) {
AxisClear( ex->refEntity.axis );
} else {
ang = rand() % 360;
VectorCopy( dir, ex->refEntity.axis[0] );
RotateAroundDirection( ex->refEntity.axis, ang );
}
}
ex->startTime = cg.time - offset;
ex->endTime = ex->startTime + msec;
// bias the time so all shader effects start correctly
ex->refEntity.shaderTime = ex->startTime / 1000.0f;
ex->refEntity.hModel = hModel;
ex->refEntity.customShader = shader;
// set origin
VectorCopy( newOrigin, ex->refEntity.origin );
VectorCopy( newOrigin, ex->refEntity.oldorigin );
ex->color[0] = ex->color[1] = ex->color[2] = 1.0;
return ex;
}
/*
=================
CG_Bleed
This is the spurt of blood when a character gets hit
=================
*/
void CG_Bleed( vec3_t origin, int entityNum ) {
localEntity_t *ex;
if ( !cg_blood.integer ) {
return;
}
ex = CG_AllocLocalEntity();
ex->leType = LE_EXPLOSION;
ex->startTime = cg.time;
ex->endTime = ex->startTime + 500;
VectorCopy ( origin, ex->refEntity.origin);
ex->refEntity.reType = RT_SPRITE;
ex->refEntity.rotation = rand() % 360;
ex->refEntity.radius = 24;
ex->refEntity.customShader = cgs.media.bloodExplosionShader;
// don't show player's own blood in view
if ( entityNum == cg.snap->ps.clientNum ) {
ex->refEntity.renderfx |= RF_THIRD_PERSON;
}
}
/*
==================
CG_LaunchGib
==================
*/
void CG_LaunchGib( vec3_t origin, vec3_t velocity, qhandle_t hModel ) {
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
re = &le->refEntity;
le->leType = LE_FRAGMENT;
le->startTime = cg.time;
le->endTime = le->startTime + 5000 + random() * 3000;
VectorCopy( origin, re->origin );
AxisCopy( axisDefault, re->axis );
re->hModel = hModel;
le->pos.trType = TR_GRAVITY;
VectorCopy( origin, le->pos.trBase );
VectorCopy( velocity, le->pos.trDelta );
le->pos.trTime = cg.time;
le->bounceFactor = 0.6f;
le->leBounceSoundType = LEBS_BLOOD;
le->leMarkType = LEMT_BLOOD;
}
/*
===================
CG_GibPlayer
Generated a bunch of gibs launching out from the bodies location
===================
*/
#define GIB_VELOCITY 250
#define GIB_JUMP 250
void CG_GibPlayer( vec3_t playerOrigin ) {
vec3_t origin, velocity;
if ( !cg_blood.integer ) {
return;
}
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
if ( rand() & 1 ) {
CG_LaunchGib( origin, velocity, cgs.media.gibSkull );
} else {
CG_LaunchGib( origin, velocity, cgs.media.gibBrain );
}
// allow gibs to be turned off for speed
if ( !cg_gibs.integer ) {
return;
}
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibAbdomen );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibArm );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibChest );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibFist );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibFoot );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibForearm );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibIntestine );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibLeg );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*GIB_VELOCITY;
velocity[1] = crandom()*GIB_VELOCITY;
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
CG_LaunchGib( origin, velocity, cgs.media.gibLeg );
}
/*
==================
CG_LaunchGib
==================
*/
void CG_LaunchExplode( vec3_t origin, vec3_t velocity, qhandle_t hModel ) {
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
re = &le->refEntity;
le->leType = LE_FRAGMENT;
le->startTime = cg.time;
le->endTime = le->startTime + 10000 + random() * 6000;
VectorCopy( origin, re->origin );
AxisCopy( axisDefault, re->axis );
re->hModel = hModel;
le->pos.trType = TR_GRAVITY;
VectorCopy( origin, le->pos.trBase );
VectorCopy( velocity, le->pos.trDelta );
le->pos.trTime = cg.time;
le->bounceFactor = 0.1f;
le->leBounceSoundType = LEBS_BRASS;
le->leMarkType = LEMT_NONE;
}
#define EXP_VELOCITY 100
#define EXP_JUMP 150
/*
===================
CG_GibPlayer
Generated a bunch of gibs launching out from the bodies location
===================
*/
void CG_BigExplode( vec3_t playerOrigin ) {
vec3_t origin, velocity;
if ( !cg_blood.integer ) {
return;
}
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*EXP_VELOCITY;
velocity[1] = crandom()*EXP_VELOCITY;
velocity[2] = EXP_JUMP + crandom()*EXP_VELOCITY;
CG_LaunchExplode( origin, velocity, cgs.media.smoke2 );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*EXP_VELOCITY;
velocity[1] = crandom()*EXP_VELOCITY;
velocity[2] = EXP_JUMP + crandom()*EXP_VELOCITY;
CG_LaunchExplode( origin, velocity, cgs.media.smoke2 );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*EXP_VELOCITY*1.5;
velocity[1] = crandom()*EXP_VELOCITY*1.5;
velocity[2] = EXP_JUMP + crandom()*EXP_VELOCITY;
CG_LaunchExplode( origin, velocity, cgs.media.smoke2 );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*EXP_VELOCITY*2.0;
velocity[1] = crandom()*EXP_VELOCITY*2.0;
velocity[2] = EXP_JUMP + crandom()*EXP_VELOCITY;
CG_LaunchExplode( origin, velocity, cgs.media.smoke2 );
VectorCopy( playerOrigin, origin );
velocity[0] = crandom()*EXP_VELOCITY*2.5;
velocity[1] = crandom()*EXP_VELOCITY*2.5;
velocity[2] = EXP_JUMP + crandom()*EXP_VELOCITY;
CG_LaunchExplode( origin, velocity, cgs.media.smoke2 );
}
================================================
FILE: src/cgame/cg_ents.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_ents.c -- present snapshot entities, happens every single frame
#include "cg_local.h"
/*
======================
CG_PositionEntityOnTag
Modifies the entities position and axis by the given
tag location
======================
*/
void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent,
qhandle_t parentModel, char *tagName ) {
int i;
orientation_t lerped;
// lerp the tag
trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame,
1.0 - parent->backlerp, tagName );
// FIXME: allow origin offsets along tag?
VectorCopy( parent->origin, entity->origin );
for ( i = 0 ; i < 3 ; i++ ) {
VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin );
}
// had to cast away the const to avoid compiler problems...
MatrixMultiply( lerped.axis, ((refEntity_t *)parent)->axis, entity->axis );
entity->backlerp = parent->backlerp;
}
/*
======================
CG_PositionRotatedEntityOnTag
Modifies the entities position and axis by the given
tag location
======================
*/
void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_t *parent,
qhandle_t parentModel, char *tagName ) {
int i;
orientation_t lerped;
vec3_t tempAxis[3];
//AxisClear( entity->axis );
// lerp the tag
trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame,
1.0 - parent->backlerp, tagName );
// FIXME: allow origin offsets along tag?
VectorCopy( parent->origin, entity->origin );
for ( i = 0 ; i < 3 ; i++ ) {
VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin );
}
// had to cast away the const to avoid compiler problems...
MatrixMultiply( entity->axis, lerped.axis, tempAxis );
MatrixMultiply( tempAxis, ((refEntity_t *)parent)->axis, entity->axis );
}
/*
==========================================================================
FUNCTIONS CALLED EACH FRAME
==========================================================================
*/
/*
======================
CG_SetEntitySoundPosition
Also called by event processing code
======================
*/
void CG_SetEntitySoundPosition( centity_t *cent ) {
if ( cent->currentState.solid == SOLID_BMODEL ) {
vec3_t origin;
float *v;
v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ];
VectorAdd( cent->lerpOrigin, v, origin );
trap_S_UpdateEntityPosition( cent->currentState.number, origin );
} else {
trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin );
}
}
/*
==================
CG_EntityEffects
Add continuous entity effects, like local entity emission and lighting
==================
*/
static void CG_EntityEffects( centity_t *cent ) {
// update sound origins
CG_SetEntitySoundPosition( cent );
// add loop sound
if ( cent->currentState.loopSound ) {
if (cent->currentState.eType != ET_SPEAKER) {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin,
cgs.gameSounds[ cent->currentState.loopSound ] );
} else {
trap_S_AddRealLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin,
cgs.gameSounds[ cent->currentState.loopSound ] );
}
}
// constant light glow
if ( cent->currentState.constantLight ) {
int cl;
int i, r, g, b;
cl = cent->currentState.constantLight;
r = cl & 255;
g = ( cl >> 8 ) & 255;
b = ( cl >> 16 ) & 255;
i = ( ( cl >> 24 ) & 255 ) * 4;
trap_R_AddLightToScene( cent->lerpOrigin, i, r, g, b );
}
}
/*
==================
CG_General
==================
*/
static void CG_General( centity_t *cent ) {
refEntity_t ent;
entityState_t *s1;
s1 = ¢->currentState;
// if set to invisible, skip
if (!s1->modelindex) {
return;
}
memset (&ent, 0, sizeof(ent));
// set frame
ent.frame = s1->frame;
ent.oldframe = ent.frame;
ent.backlerp = 0;
VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin);
ent.hModel = cgs.gameModels[s1->modelindex];
// player model
if (s1->number == cg.snap->ps.clientNum) {
ent.renderfx |= RF_THIRD_PERSON; // only draw from mirrors
}
// convert angles to axis
AnglesToAxis( cent->lerpAngles, ent.axis );
// add to refresh list
trap_R_AddRefEntityToScene (&ent);
}
/*
==================
CG_Speaker
Speaker entities can automatically play sounds
==================
*/
static void CG_Speaker( centity_t *cent ) {
if ( ! cent->currentState.clientNum ) { // FIXME: use something other than clientNum...
return; // not auto triggering
}
if ( cg.time < cent->miscTime ) {
return;
}
trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.gameSounds[cent->currentState.eventParm] );
// ent->s.frame = ent->wait * 10;
// ent->s.clientNum = ent->random * 10;
cent->miscTime = cg.time + cent->currentState.frame * 100 + cent->currentState.clientNum * 100 * crandom();
}
/*
==================
CG_Item
==================
*/
static void CG_Item( centity_t *cent ) {
refEntity_t ent;
entityState_t *es;
gitem_t *item;
int msec;
float frac;
float scale;
weaponInfo_t *wi;
es = ¢->currentState;
if ( es->modelindex >= bg_numItems ) {
CG_Error( "Bad item index %i on entity", es->modelindex );
}
// if set to invisible, skip
if ( !es->modelindex || ( es->eFlags & EF_NODRAW ) ) {
return;
}
item = &bg_itemlist[ es->modelindex ];
if ( cg_simpleItems.integer && item->giType != IT_TEAM ) {
memset( &ent, 0, sizeof( ent ) );
ent.reType = RT_SPRITE;
VectorCopy( cent->lerpOrigin, ent.origin );
ent.radius = 14;
ent.customShader = cg_items[es->modelindex].icon;
ent.shaderRGBA[0] = 255;
ent.shaderRGBA[1] = 255;
ent.shaderRGBA[2] = 255;
ent.shaderRGBA[3] = 255;
trap_R_AddRefEntityToScene(&ent);
return;
}
// items bob up and down continuously
scale = 0.005 + cent->currentState.number * 0.00001;
cent->lerpOrigin[2] += 4 + cos( ( cg.time + 1000 ) * scale ) * 4;
memset (&ent, 0, sizeof(ent));
// autorotate at one of two speeds
if ( item->giType == IT_HEALTH ) {
VectorCopy( cg.autoAnglesFast, cent->lerpAngles );
AxisCopy( cg.autoAxisFast, ent.axis );
} else {
VectorCopy( cg.autoAngles, cent->lerpAngles );
AxisCopy( cg.autoAxis, ent.axis );
}
wi = NULL;
// the weapons have their origin where they attatch to player
// models, so we need to offset them or they will rotate
// eccentricly
if ( item->giType == IT_WEAPON ) {
wi = &cg_weapons[item->giTag];
cent->lerpOrigin[0] -=
wi->weaponMidpoint[0] * ent.axis[0][0] +
wi->weaponMidpoint[1] * ent.axis[1][0] +
wi->weaponMidpoint[2] * ent.axis[2][0];
cent->lerpOrigin[1] -=
wi->weaponMidpoint[0] * ent.axis[0][1] +
wi->weaponMidpoint[1] * ent.axis[1][1] +
wi->weaponMidpoint[2] * ent.axis[2][1];
cent->lerpOrigin[2] -=
wi->weaponMidpoint[0] * ent.axis[0][2] +
wi->weaponMidpoint[1] * ent.axis[1][2] +
wi->weaponMidpoint[2] * ent.axis[2][2];
cent->lerpOrigin[2] += 8; // an extra height boost
}
ent.hModel = cg_items[es->modelindex].models[0];
VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin);
ent.nonNormalizedAxes = qfalse;
// if just respawned, slowly scale up
msec = cg.time - cent->miscTime;
if ( msec >= 0 && msec < ITEM_SCALEUP_TIME ) {
frac = (float)msec / ITEM_SCALEUP_TIME;
VectorScale( ent.axis[0], frac, ent.axis[0] );
VectorScale( ent.axis[1], frac, ent.axis[1] );
VectorScale( ent.axis[2], frac, ent.axis[2] );
ent.nonNormalizedAxes = qtrue;
} else {
frac = 1.0;
}
// items without glow textures need to keep a minimum light value
// so they are always visible
if ( ( item->giType == IT_WEAPON ) ||
( item->giType == IT_ARMOR ) ) {
ent.renderfx |= RF_MINLIGHT;
}
// increase the size of the weapons when they are presented as items
if ( item->giType == IT_WEAPON ) {
VectorScale( ent.axis[0], 1.5, ent.axis[0] );
VectorScale( ent.axis[1], 1.5, ent.axis[1] );
VectorScale( ent.axis[2], 1.5, ent.axis[2] );
ent.nonNormalizedAxes = qtrue;
}
// add to refresh list
trap_R_AddRefEntityToScene(&ent);
// accompanying rings / spheres for powerups
if ( !cg_simpleItems.integer )
{
vec3_t spinAngles;
VectorClear( spinAngles );
if ( item->giType == IT_HEALTH || item->giType == IT_POWERUP )
{
if ( ( ent.hModel = cg_items[es->modelindex].models[1] ) != 0 )
{
if ( item->giType == IT_POWERUP )
{
ent.origin[2] += 12;
spinAngles[1] = ( cg.time & 1023 ) * 360 / -1024.0f;
}
AnglesToAxis( spinAngles, ent.axis );
// scale up if respawning
if ( frac != 1.0 ) {
VectorScale( ent.axis[0], frac, ent.axis[0] );
VectorScale( ent.axis[1], frac, ent.axis[1] );
VectorScale( ent.axis[2], frac, ent.axis[2] );
ent.nonNormalizedAxes = qtrue;
}
trap_R_AddRefEntityToScene( &ent );
}
}
}
}
//============================================================================
/*
===============
CG_Missile
===============
*/
static void CG_Missile( centity_t *cent ) {
refEntity_t ent;
entityState_t *s1;
const weaponInfo_t *weapon;
// int col;
s1 = ¢->currentState;
if ( s1->weapon > WP_NUM_WEAPONS ) {
s1->weapon = 0;
}
weapon = &cg_weapons[s1->weapon];
// calculate the axis
VectorCopy( s1->angles, cent->lerpAngles);
// add trails
if ( weapon->missileTrailFunc )
{
weapon->missileTrailFunc( cent, weapon );
}
/*
if ( cent->currentState.modelindex == TEAM_RED ) {
col = 1;
}
else if ( cent->currentState.modelindex == TEAM_BLUE ) {
col = 2;
}
else {
col = 0;
}
// add dynamic light
if ( weapon->missileDlight ) {
trap_R_AddLightToScene(cent->lerpOrigin, weapon->missileDlight,
weapon->missileDlightColor[col][0], weapon->missileDlightColor[col][1], weapon->missileDlightColor[col][2] );
}
*/
// add dynamic light
if ( weapon->missileDlight ) {
trap_R_AddLightToScene(cent->lerpOrigin, weapon->missileDlight,
weapon->missileDlightColor[0], weapon->missileDlightColor[1], weapon->missileDlightColor[2] );
}
// add missile sound
if ( weapon->missileSound ) {
vec3_t velocity;
BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity );
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->missileSound );
}
// create the render entity
memset (&ent, 0, sizeof(ent));
VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin);
if ( cent->currentState.weapon == WP_PLASMAGUN ) {
ent.reType = RT_SPRITE;
ent.radius = 16;
ent.rotation = 0;
ent.customShader = cgs.media.plasmaBallShader;
trap_R_AddRefEntityToScene( &ent );
return;
}
// flicker between two skins
ent.skinNum = cg.clientFrame & 1;
ent.hModel = weapon->missileModel;
ent.renderfx = weapon->missileRenderfx | RF_NOSHADOW;
// convert direction of travel into axis
if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) {
ent.axis[0][2] = 1;
}
// spin as it moves
if ( s1->pos.trType != TR_STATIONARY ) {
RotateAroundDirection( ent.axis, cg.time / 4 );
} else {
{
RotateAroundDirection( ent.axis, s1->time );
}
}
// add to refresh list, possibly with quad glow
CG_AddRefEntityWithPowerups( &ent, s1, TEAM_FREE );
}
/*
===============
CG_Grapple
This is called when the grapple is sitting up against the wall
===============
*/
static void CG_Grapple( centity_t *cent ) {
refEntity_t ent;
entityState_t *s1;
const weaponInfo_t *weapon;
s1 = ¢->currentState;
if ( s1->weapon > WP_NUM_WEAPONS ) {
s1->weapon = 0;
}
weapon = &cg_weapons[s1->weapon];
// calculate the axis
VectorCopy( s1->angles, cent->lerpAngles);
#if 0 // FIXME add grapple pull sound here..?
// add missile sound
if ( weapon->missileSound ) {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->missileSound );
}
#endif
// Will draw cable if needed
CG_GrappleTrail ( cent, weapon );
// create the render entity
memset (&ent, 0, sizeof(ent));
VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin);
// flicker between two skins
ent.skinNum = cg.clientFrame & 1;
ent.hModel = weapon->missileModel;
ent.renderfx = weapon->missileRenderfx | RF_NOSHADOW;
// convert direction of travel into axis
if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) {
ent.axis[0][2] = 1;
}
trap_R_AddRefEntityToScene( &ent );
}
/*
===============
CG_Mover
===============
*/
static void CG_Mover( centity_t *cent ) {
refEntity_t ent;
entityState_t *s1;
s1 = ¢->currentState;
// create the render entity
memset (&ent, 0, sizeof(ent));
VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin);
AnglesToAxis( cent->lerpAngles, ent.axis );
ent.renderfx = RF_NOSHADOW;
// flicker between two skins (FIXME?)
ent.skinNum = ( cg.time >> 6 ) & 1;
// get the model, either as a bmodel or a modelindex
if ( s1->solid == SOLID_BMODEL ) {
ent.hModel = cgs.inlineDrawModel[s1->modelindex];
} else {
ent.hModel = cgs.gameModels[s1->modelindex];
}
// add to refresh list
trap_R_AddRefEntityToScene(&ent);
// add the secondary model
if ( s1->modelindex2 ) {
ent.skinNum = 0;
ent.hModel = cgs.gameModels[s1->modelindex2];
trap_R_AddRefEntityToScene(&ent);
}
}
/*
===============
CG_Beam
Also called as an event
===============
*/
void CG_Beam( centity_t *cent ) {
refEntity_t ent;
entityState_t *s1;
s1 = ¢->currentState;
// create the render entity
memset (&ent, 0, sizeof(ent));
VectorCopy( s1->pos.trBase, ent.origin );
VectorCopy( s1->origin2, ent.oldorigin );
AxisClear( ent.axis );
ent.reType = RT_BEAM;
ent.renderfx = RF_NOSHADOW;
// add to refresh list
trap_R_AddRefEntityToScene(&ent);
}
/*
===============
CG_Portal
===============
*/
static void CG_Portal( centity_t *cent ) {
refEntity_t ent;
entityState_t *s1;
s1 = ¢->currentState;
// create the render entity
memset (&ent, 0, sizeof(ent));
VectorCopy( cent->lerpOrigin, ent.origin );
VectorCopy( s1->origin2, ent.oldorigin );
ByteToDir( s1->eventParm, ent.axis[0] );
PerpendicularVector( ent.axis[1], ent.axis[0] );
// negating this tends to get the directions like they want
// we really should have a camera roll value
VectorSubtract( vec3_origin, ent.axis[1], ent.axis[1] );
CrossProduct( ent.axis[0], ent.axis[1], ent.axis[2] );
ent.reType = RT_PORTALSURFACE;
ent.oldframe = s1->powerups;
ent.frame = s1->frame; // rotation speed
ent.skinNum = s1->clientNum/256.0 * 360; // roll offset
// add to refresh list
trap_R_AddRefEntityToScene(&ent);
}
/*
=========================
CG_AdjustPositionForMover
Also called by client movement prediction code
=========================
*/
void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) {
centity_t *cent;
vec3_t oldOrigin, origin, deltaOrigin;
vec3_t oldAngles, angles, deltaAngles;
if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) {
VectorCopy( in, out );
return;
}
cent = &cg_entities[ moverNum ];
if ( cent->currentState.eType != ET_MOVER ) {
VectorCopy( in, out );
return;
}
BG_EvaluateTrajectory( ¢->currentState.pos, fromTime, oldOrigin );
BG_EvaluateTrajectory( ¢->currentState.apos, fromTime, oldAngles );
BG_EvaluateTrajectory( ¢->currentState.pos, toTime, origin );
BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles );
VectorSubtract( origin, oldOrigin, deltaOrigin );
VectorSubtract( angles, oldAngles, deltaAngles );
VectorAdd( in, deltaOrigin, out );
// FIXME: origin change when on a rotating object
}
/*
=============================
CG_InterpolateEntityPosition
=============================
*/
static void CG_InterpolateEntityPosition( centity_t *cent ) {
vec3_t current, next;
float f;
// it would be an internal error to find an entity that interpolates without
// a snapshot ahead of the current one
if ( cg.nextSnap == NULL ) {
CG_Error( "CG_InterpoateEntityPosition: cg.nextSnap == NULL" );
}
f = cg.frameInterpolation;
// this will linearize a sine or parabolic curve, but it is important
// to not extrapolate player positions if more recent data is available
BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, current );
BG_EvaluateTrajectory( ¢->nextState.pos, cg.nextSnap->serverTime, next );
cent->lerpOrigin[0] = current[0] + f * ( next[0] - current[0] );
cent->lerpOrigin[1] = current[1] + f * ( next[1] - current[1] );
cent->lerpOrigin[2] = current[2] + f * ( next[2] - current[2] );
BG_EvaluateTrajectory( ¢->currentState.apos, cg.snap->serverTime, current );
BG_EvaluateTrajectory( ¢->nextState.apos, cg.nextSnap->serverTime, next );
cent->lerpAngles[0] = LerpAngle( current[0], next[0], f );
cent->lerpAngles[1] = LerpAngle( current[1], next[1], f );
cent->lerpAngles[2] = LerpAngle( current[2], next[2], f );
}
/*
===============
CG_CalcEntityLerpPositions
===============
*/
static void CG_CalcEntityLerpPositions( centity_t *cent ) {
// if this player does not want to see extrapolated players
if ( !cg_smoothClients.integer ) {
// make sure the clients use TR_INTERPOLATE
if ( cent->currentState.number < MAX_CLIENTS ) {
cent->currentState.pos.trType = TR_INTERPOLATE;
cent->nextState.pos.trType = TR_INTERPOLATE;
}
}
if ( cent->interpolate && cent->currentState.pos.trType == TR_INTERPOLATE ) {
CG_InterpolateEntityPosition( cent );
return;
}
// first see if we can interpolate between two snaps for
// linear extrapolated clients
if ( cent->interpolate && cent->currentState.pos.trType == TR_LINEAR_STOP &&
cent->currentState.number < MAX_CLIENTS) {
CG_InterpolateEntityPosition( cent );
return;
}
// just use the current frame and evaluate as best we can
BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin );
BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles );
// adjust for riding a mover if it wasn't rolled into the predicted
// player state
if ( cent != &cg.predictedPlayerEntity ) {
CG_AdjustPositionForMover( cent->lerpOrigin, cent->currentState.groundEntityNum,
cg.snap->serverTime, cg.time, cent->lerpOrigin );
}
}
/*
===============
CG_TeamBase
===============
*/
static void CG_TeamBase( centity_t *cent ) {
refEntity_t model;
if ( cgs.gametype == GT_CTF) {
// show the flag base
memset(&model, 0, sizeof(model));
model.reType = RT_MODEL;
VectorCopy( cent->lerpOrigin, model.lightingOrigin );
VectorCopy( cent->lerpOrigin, model.origin );
AnglesToAxis( cent->currentState.angles, model.axis );
if ( cent->currentState.modelindex == TEAM_RED ) {
model.hModel = cgs.media.redFlagBaseModel;
}
else if ( cent->currentState.modelindex == TEAM_BLUE ) {
model.hModel = cgs.media.blueFlagBaseModel;
}
else {
model.hModel = cgs.media.neutralFlagBaseModel;
}
trap_R_AddRefEntityToScene( &model );
}
}
/*
===============
CG_AddCEntity
===============
*/
static void CG_AddCEntity( centity_t *cent ) {
// event-only entities will have been dealt with already
if ( cent->currentState.eType >= ET_EVENTS ) {
return;
}
// calculate the current origin
CG_CalcEntityLerpPositions( cent );
// add automatic effects
CG_EntityEffects( cent );
switch ( cent->currentState.eType ) {
default:
CG_Error( "Bad entity type: %i\n", cent->currentState.eType );
break;
case ET_INVISIBLE:
case ET_PUSH_TRIGGER:
case ET_TELEPORT_TRIGGER:
break;
case ET_GENERAL:
CG_General( cent );
break;
case ET_PLAYER:
CG_Player( cent );
break;
case ET_ITEM:
CG_Item( cent );
break;
case ET_MISSILE:
CG_Missile( cent );
break;
case ET_MOVER:
CG_Mover( cent );
break;
case ET_BEAM:
CG_Beam( cent );
break;
case ET_PORTAL:
CG_Portal( cent );
break;
case ET_SPEAKER:
CG_Speaker( cent );
break;
case ET_GRAPPLE:
CG_Grapple( cent );
break;
case ET_TEAM:
CG_TeamBase( cent );
break;
}
}
/*
===============
CG_AddPacketEntities
===============
*/
void CG_AddPacketEntities( void ) {
int num;
centity_t *cent;
playerState_t *ps;
// set cg.frameInterpolation
if ( cg.nextSnap ) {
int delta;
delta = (cg.nextSnap->serverTime - cg.snap->serverTime);
if ( delta == 0 ) {
cg.frameInterpolation = 0;
} else {
cg.frameInterpolation = (float)( cg.time - cg.snap->serverTime ) / delta;
}
} else {
cg.frameInterpolation = 0; // actually, it should never be used, because
// no entities should be marked as interpolating
}
// the auto-rotating items will all have the same axis
cg.autoAngles[0] = 0;
cg.autoAngles[1] = ( cg.time & 2047 ) * 360 / 2048.0;
cg.autoAngles[2] = 0;
cg.autoAnglesFast[0] = 0;
cg.autoAnglesFast[1] = ( cg.time & 1023 ) * 360 / 1024.0f;
cg.autoAnglesFast[2] = 0;
AnglesToAxis( cg.autoAngles, cg.autoAxis );
AnglesToAxis( cg.autoAnglesFast, cg.autoAxisFast );
// generate and add the entity from the playerstate
ps = &cg.predictedPlayerState;
BG_PlayerStateToEntityState( ps, &cg.predictedPlayerEntity.currentState, qfalse );
CG_AddCEntity( &cg.predictedPlayerEntity );
// lerp the non-predicted value for lightning gun origins
CG_CalcEntityLerpPositions( &cg_entities[ cg.snap->ps.clientNum ] );
// add each entity sent over by the server
for ( num = 0 ; num < cg.snap->numEntities ; num++ ) {
cent = &cg_entities[ cg.snap->entities[ num ].number ];
CG_AddCEntity( cent );
}
}
================================================
FILE: src/cgame/cg_event.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_event.c -- handle entity events at snapshot or playerstate transitions
#include "cg_local.h"
/*
===================
CG_PlaceString
Also called by scoreboard drawing
===================
*/
const char *CG_PlaceString( int rank ) {
static char str[64];
char *s, *t;
if ( rank & RANK_TIED_FLAG ) {
rank &= ~RANK_TIED_FLAG;
t = "Tied for ";
} else {
t = "";
}
if ( rank == 1 ) {
s = S_COLOR_BLUE "1st" S_COLOR_WHITE; // draw in blue
} else if ( rank == 2 ) {
s = S_COLOR_RED "2nd" S_COLOR_WHITE; // draw in red
} else if ( rank == 3 ) {
s = S_COLOR_YELLOW "3rd" S_COLOR_WHITE; // draw in yellow
} else if ( rank == 11 ) {
s = "11th";
} else if ( rank == 12 ) {
s = "12th";
} else if ( rank == 13 ) {
s = "13th";
} else if ( rank % 10 == 1 ) {
s = va("%ist", rank);
} else if ( rank % 10 == 2 ) {
s = va("%ind", rank);
} else if ( rank % 10 == 3 ) {
s = va("%ird", rank);
} else {
s = va("%ith", rank);
}
Com_sprintf( str, sizeof( str ), "%s%s", t, s );
return str;
}
/*
=============
CG_Obituary
=============
*/
static void CG_Obituary( entityState_t *ent ) {
int mod;
int target, attacker;
char *message;
char *message2;
const char *targetInfo;
const char *attackerInfo;
char targetName[32];
char attackerName[32];
gender_t gender;
clientInfo_t *ci;
target = ent->otherEntityNum;
attacker = ent->otherEntityNum2;
mod = ent->eventParm;
if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" );
}
ci = &cgs.clientinfo[target];
if ( attacker < 0 || attacker >= MAX_CLIENTS ) {
attacker = ENTITYNUM_WORLD;
attackerInfo = NULL;
} else {
attackerInfo = CG_ConfigString( CS_PLAYERS + attacker );
}
targetInfo = CG_ConfigString( CS_PLAYERS + target );
if ( !targetInfo ) {
return;
}
Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2);
strcat( targetName, S_COLOR_WHITE );
message2 = "";
// check for single client messages
switch( mod ) {
case MOD_SUICIDE:
message = "suicides";
break;
case MOD_FALLING:
message = "cratered";
break;
case MOD_CRUSH:
message = "was squished";
break;
case MOD_WATER:
message = "sank like a rock";
break;
case MOD_SLIME:
message = "melted";
break;
case MOD_LAVA:
message = "does a back flip into the lava";
break;
case MOD_TARGET_LASER:
message = "saw the light";
break;
case MOD_TRIGGER_HURT:
message = "was in the wrong place";
break;
default:
message = NULL;
break;
}
if (attacker == target) {
gender = ci->gender;
switch (mod) {
case MOD_GRENADE_SPLASH:
if ( gender == GENDER_FEMALE )
message = "tripped on her own grenade";
else if ( gender == GENDER_NEUTER )
message = "tripped on its own grenade";
else
message = "tripped on his own grenade";
break;
case MOD_ROCKET_SPLASH:
if ( gender == GENDER_FEMALE )
message = "blew herself up";
else if ( gender == GENDER_NEUTER )
message = "blew itself up";
else
message = "blew himself up";
break;
case MOD_PLASMA_SPLASH:
if ( gender == GENDER_FEMALE )
message = "melted herself";
else if ( gender == GENDER_NEUTER )
message = "melted itself";
else
message = "melted himself";
break;
case MOD_BFG_SPLASH:
message = "should have used a smaller gun";
break;
default:
if ( gender == GENDER_FEMALE )
message = "killed herself";
else if ( gender == GENDER_NEUTER )
message = "killed itself";
else
message = "killed himself";
break;
}
}
if (message) {
CG_Printf( "%s %s.\n", targetName, message);
return;
}
// check for kill messages from the current clientNum
if ( attacker == cg.snap->ps.clientNum ) {
char *s;
if ( cgs.gametype < GT_TEAM ) {
s = va("You fragged %s\n%s place with %i", targetName,
CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ),
cg.snap->ps.persistant[PERS_SCORE] );
} else {
s = va("You fragged %s", targetName );
}
CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH );
// print the text message as well
}
// check for double client messages
if ( !attackerInfo ) {
attacker = ENTITYNUM_WORLD;
strcpy( attackerName, "noname" );
} else {
Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2);
strcat( attackerName, S_COLOR_WHITE );
// check for kill messages about the current clientNum
if ( target == cg.snap->ps.clientNum ) {
Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) );
}
}
if ( attacker != ENTITYNUM_WORLD ) {
switch (mod) {
case MOD_GRAPPLE:
message = "was caught by";
break;
case MOD_GAUNTLET:
message = "was pummeled by";
break;
case MOD_MACHINEGUN:
message = "was machinegunned by";
break;
case MOD_SHOTGUN:
message = "was gunned down by";
break;
case MOD_GRENADE:
message = "ate";
message2 = "'s grenade";
break;
case MOD_GRENADE_SPLASH:
message = "was shredded by";
message2 = "'s shrapnel";
break;
case MOD_ROCKET:
message = "ate";
message2 = "'s rocket";
break;
case MOD_ROCKET_SPLASH:
message = "almost dodged";
message2 = "'s rocket";
break;
case MOD_PLASMA:
message = "was melted by";
message2 = "'s plasmagun";
break;
case MOD_PLASMA_SPLASH:
message = "was melted by";
message2 = "'s plasmagun";
break;
case MOD_RAILGUN:
message = "was railed by";
break;
case MOD_LIGHTNING:
message = "was electrocuted by";
break;
case MOD_BFG:
case MOD_BFG_SPLASH:
message = "was blasted by";
message2 = "'s BFG";
break;
case MOD_TELEFRAG:
message = "tried to invade";
message2 = "'s personal space";
break;
default:
message = "was killed by";
break;
}
if (message) {
CG_Printf( "%s %s %s%s\n",
targetName, message, attackerName, message2);
return;
}
}
// we don't know what it was
CG_Printf( "%s died.\n", targetName );
}
//==========================================================================
/*
===============
CG_UseItem
===============
*/
static void CG_UseItem( centity_t *cent ) {
clientInfo_t *ci;
int itemNum, clientNum;
gitem_t *item;
entityState_t *es;
es = ¢->currentState;
itemNum = (es->event & ~EV_EVENT_BITS) - EV_USE_ITEM0;
if ( itemNum < 0 || itemNum > HI_NUM_HOLDABLE ) {
itemNum = 0;
}
// print a message if the local player
if ( es->number == cg.snap->ps.clientNum ) {
if ( !itemNum ) {
CG_CenterPrint( "No item to use", SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH );
} else {
item = BG_FindItemForHoldable( itemNum );
CG_CenterPrint( va("Use %s", item->pickup_name), SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH );
}
}
switch ( itemNum ) {
default:
case HI_NONE:
trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useNothingSound );
break;
case HI_TELEPORTER:
break;
case HI_MEDKIT:
clientNum = cent->currentState.clientNum;
if ( clientNum >= 0 && clientNum < MAX_CLIENTS ) {
ci = &cgs.clientinfo[ clientNum ];
ci->medkitUsageTime = cg.time;
}
trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.medkitSound );
break;
}
}
/*
================
CG_ItemPickup
A new item was picked up this frame
================
*/
static void CG_ItemPickup( int itemNum ) {
cg.itemPickup = itemNum;
cg.itemPickupTime = cg.time;
cg.itemPickupBlendTime = cg.time;
// see if it should be the grabbed weapon
if ( bg_itemlist[itemNum].giType == IT_WEAPON ) {
// select it immediately
if ( cg_autoswitch.integer && bg_itemlist[itemNum].giTag != WP_MACHINEGUN ) {
cg.weaponSelectTime = cg.time;
cg.weaponSelect = bg_itemlist[itemNum].giTag;
}
}
}
/*
================
CG_PainEvent
Also called by playerstate transition
================
*/
void CG_PainEvent( centity_t *cent, int health ) {
char *snd;
// don't do more than two pain sounds a second
if ( cg.time - cent->pe.painTime < 500 ) {
return;
}
if ( health < 25 ) {
snd = "*pain25_1.wav";
} else if ( health < 50 ) {
snd = "*pain50_1.wav";
} else if ( health < 75 ) {
snd = "*pain75_1.wav";
} else {
snd = "*pain100_1.wav";
}
trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE,
CG_CustomSound( cent->currentState.number, snd ) );
// save pain time for programitic twitch animation
cent->pe.painTime = cg.time;
cent->pe.painDirection ^= 1;
}
/*
==============
CG_EntityEvent
An entity has an event value
also called by CG_CheckPlayerstateEvents
==============
*/
#define DEBUGNAME(x) if(cg_debugEvents.integer){CG_Printf(x"\n");}
void CG_EntityEvent( centity_t *cent, vec3_t position ) {
entityState_t *es;
int event;
vec3_t dir;
const char *s;
int clientNum;
clientInfo_t *ci;
es = ¢->currentState;
event = es->event & ~EV_EVENT_BITS;
if ( cg_debugEvents.integer ) {
CG_Printf( "ent:%3i event:%3i ", es->number, event );
}
if ( !event ) {
DEBUGNAME("ZEROEVENT");
return;
}
clientNum = es->clientNum;
if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) {
clientNum = 0;
}
ci = &cgs.clientinfo[ clientNum ];
switch ( event ) {
//
// movement generated events
//
case EV_FOOTSTEP:
DEBUGNAME("EV_FOOTSTEP");
if (cg_footsteps.integer) {
trap_S_StartSound (NULL, es->number, CHAN_BODY,
cgs.media.footsteps[ ci->footsteps ][rand()&3] );
}
break;
case EV_FOOTSTEP_METAL:
DEBUGNAME("EV_FOOTSTEP_METAL");
if (cg_footsteps.integer) {
trap_S_StartSound (NULL, es->number, CHAN_BODY,
cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] );
}
break;
case EV_FOOTSPLASH:
DEBUGNAME("EV_FOOTSPLASH");
if (cg_footsteps.integer) {
trap_S_StartSound (NULL, es->number, CHAN_BODY,
cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] );
}
break;
case EV_FOOTWADE:
DEBUGNAME("EV_FOOTWADE");
if (cg_footsteps.integer) {
trap_S_StartSound (NULL, es->number, CHAN_BODY,
cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] );
}
break;
case EV_SWIM:
DEBUGNAME("EV_SWIM");
if (cg_footsteps.integer) {
trap_S_StartSound (NULL, es->number, CHAN_BODY,
cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] );
}
break;
case EV_FALL_SHORT:
DEBUGNAME("EV_FALL_SHORT");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.landSound );
if ( clientNum == cg.predictedPlayerState.clientNum ) {
// smooth landing z changes
cg.landChange = -8;
cg.landTime = cg.time;
}
break;
case EV_FALL_MEDIUM:
DEBUGNAME("EV_FALL_MEDIUM");
// use normal pain sound
trap_S_StartSound( NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*pain100_1.wav" ) );
if ( clientNum == cg.predictedPlayerState.clientNum ) {
// smooth landing z changes
cg.landChange = -16;
cg.landTime = cg.time;
}
break;
case EV_FALL_FAR:
DEBUGNAME("EV_FALL_FAR");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*fall1.wav" ) );
cent->pe.painTime = cg.time; // don't play a pain sound right after this
if ( clientNum == cg.predictedPlayerState.clientNum ) {
// smooth landing z changes
cg.landChange = -24;
cg.landTime = cg.time;
}
break;
case EV_STEP_4:
case EV_STEP_8:
case EV_STEP_12:
case EV_STEP_16: // smooth out step up transitions
DEBUGNAME("EV_STEP");
{
float oldStep;
int delta;
int step;
if ( clientNum != cg.predictedPlayerState.clientNum ) {
break;
}
// if we are interpolating, we don't need to smooth steps
if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) ||
cg_nopredict.integer || cg_synchronousClients.integer ) {
break;
}
// check for stepping up before a previous step is completed
delta = cg.time - cg.stepTime;
if (delta < STEP_TIME) {
oldStep = cg.stepChange * (STEP_TIME - delta) / STEP_TIME;
} else {
oldStep = 0;
}
// add this amount
step = 4 * (event - EV_STEP_4 + 1 );
cg.stepChange = oldStep + step;
if ( cg.stepChange > MAX_STEP_CHANGE ) {
cg.stepChange = MAX_STEP_CHANGE;
}
cg.stepTime = cg.time;
break;
}
case EV_JUMP_PAD:
DEBUGNAME("EV_JUMP_PAD");
// CG_Printf( "EV_JUMP_PAD w/effect #%i\n", es->eventParm );
{
localEntity_t *smoke;
vec3_t up = {0, 0, 1};
smoke = CG_SmokePuff( cent->lerpOrigin, up,
32,
1, 1, 1, 0.33f,
1000,
cg.time, 0,
LEF_PUFF_DONT_SCALE,
cgs.media.smokePuffShader );
}
// boing sound at origin, jump sound on player
trap_S_StartSound ( cent->lerpOrigin, -1, CHAN_VOICE, cgs.media.jumpPadSound );
trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) );
break;
case EV_JUMP:
DEBUGNAME("EV_JUMP");
trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) );
break;
case EV_TAUNT:
DEBUGNAME("EV_TAUNT");
trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*taunt.wav" ) );
break;
case EV_WATER_TOUCH:
DEBUGNAME("EV_WATER_TOUCH");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrInSound );
break;
case EV_WATER_LEAVE:
DEBUGNAME("EV_WATER_LEAVE");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrOutSound );
break;
case EV_WATER_UNDER:
DEBUGNAME("EV_WATER_UNDER");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrUnSound );
break;
case EV_WATER_CLEAR:
DEBUGNAME("EV_WATER_CLEAR");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*gasp.wav" ) );
break;
case EV_ITEM_PICKUP:
DEBUGNAME("EV_ITEM_PICKUP");
{
gitem_t *item;
int index;
index = es->eventParm; // player predicted
if ( index < 1 || index >= bg_numItems ) {
break;
}
item = &bg_itemlist[ index ];
// powerups and team items will have a separate global sound, this one
// will be played at prediction time
if ( item->giType == IT_POWERUP || item->giType == IT_TEAM) {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.n_healthSound );
} else if (item->giType == IT_PERSISTANT_POWERUP) {
} else {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound, qfalse ) );
}
// show icon and name on status bar
if ( es->number == cg.snap->ps.clientNum ) {
CG_ItemPickup( index );
}
}
break;
case EV_GLOBAL_ITEM_PICKUP:
DEBUGNAME("EV_GLOBAL_ITEM_PICKUP");
{
gitem_t *item;
int index;
index = es->eventParm; // player predicted
if ( index < 1 || index >= bg_numItems ) {
break;
}
item = &bg_itemlist[ index ];
// powerup pickups are global
if( item->pickup_sound ) {
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound, qfalse ) );
}
// show icon and name on status bar
if ( es->number == cg.snap->ps.clientNum ) {
CG_ItemPickup( index );
}
}
break;
//
// weapon events
//
case EV_NOAMMO:
DEBUGNAME("EV_NOAMMO");
// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.noAmmoSound );
if ( es->number == cg.snap->ps.clientNum ) {
CG_OutOfAmmoChange();
}
break;
case EV_CHANGE_WEAPON:
DEBUGNAME("EV_CHANGE_WEAPON");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound );
break;
case EV_FIRE_WEAPON:
DEBUGNAME("EV_FIRE_WEAPON");
CG_FireWeapon( cent );
break;
case EV_USE_ITEM0:
DEBUGNAME("EV_USE_ITEM0");
CG_UseItem( cent );
break;
case EV_USE_ITEM1:
DEBUGNAME("EV_USE_ITEM1");
CG_UseItem( cent );
break;
case EV_USE_ITEM2:
DEBUGNAME("EV_USE_ITEM2");
CG_UseItem( cent );
break;
case EV_USE_ITEM3:
DEBUGNAME("EV_USE_ITEM3");
CG_UseItem( cent );
break;
case EV_USE_ITEM4:
DEBUGNAME("EV_USE_ITEM4");
CG_UseItem( cent );
break;
case EV_USE_ITEM5:
DEBUGNAME("EV_USE_ITEM5");
CG_UseItem( cent );
break;
case EV_USE_ITEM6:
DEBUGNAME("EV_USE_ITEM6");
CG_UseItem( cent );
break;
case EV_USE_ITEM7:
DEBUGNAME("EV_USE_ITEM7");
CG_UseItem( cent );
break;
case EV_USE_ITEM8:
DEBUGNAME("EV_USE_ITEM8");
CG_UseItem( cent );
break;
case EV_USE_ITEM9:
DEBUGNAME("EV_USE_ITEM9");
CG_UseItem( cent );
break;
case EV_USE_ITEM10:
DEBUGNAME("EV_USE_ITEM10");
CG_UseItem( cent );
break;
case EV_USE_ITEM11:
DEBUGNAME("EV_USE_ITEM11");
CG_UseItem( cent );
break;
case EV_USE_ITEM12:
DEBUGNAME("EV_USE_ITEM12");
CG_UseItem( cent );
break;
case EV_USE_ITEM13:
DEBUGNAME("EV_USE_ITEM13");
CG_UseItem( cent );
break;
case EV_USE_ITEM14:
DEBUGNAME("EV_USE_ITEM14");
CG_UseItem( cent );
break;
//=================================================================
//
// other events
//
case EV_PLAYER_TELEPORT_IN:
DEBUGNAME("EV_PLAYER_TELEPORT_IN");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleInSound );
CG_SpawnEffect( position);
break;
case EV_PLAYER_TELEPORT_OUT:
DEBUGNAME("EV_PLAYER_TELEPORT_OUT");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleOutSound );
CG_SpawnEffect( position);
break;
case EV_ITEM_POP:
DEBUGNAME("EV_ITEM_POP");
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound );
break;
case EV_ITEM_RESPAWN:
DEBUGNAME("EV_ITEM_RESPAWN");
cent->miscTime = cg.time; // scale up from this
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound );
break;
case EV_GRENADE_BOUNCE:
DEBUGNAME("EV_GRENADE_BOUNCE");
if ( rand() & 1 ) {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.hgrenb1aSound );
} else {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.hgrenb2aSound );
}
break;
case EV_SCOREPLUM:
DEBUGNAME("EV_SCOREPLUM");
CG_ScorePlum( cent->currentState.otherEntityNum, cent->lerpOrigin, cent->currentState.time );
break;
//
// missile impacts
//
case EV_MISSILE_HIT:
DEBUGNAME("EV_MISSILE_HIT");
ByteToDir( es->eventParm, dir );
CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum );
break;
case EV_MISSILE_MISS:
DEBUGNAME("EV_MISSILE_MISS");
ByteToDir( es->eventParm, dir );
CG_MissileHitWall( es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT );
break;
case EV_MISSILE_MISS_METAL:
DEBUGNAME("EV_MISSILE_MISS_METAL");
ByteToDir( es->eventParm, dir );
CG_MissileHitWall( es->weapon, 0, position, dir, IMPACTSOUND_METAL );
break;
case EV_RAILTRAIL:
DEBUGNAME("EV_RAILTRAIL");
cent->currentState.weapon = WP_RAILGUN;
// if the end was on a nomark surface, don't make an explosion
CG_RailTrail( ci, es->origin2, es->pos.trBase );
if ( es->eventParm != 255 ) {
ByteToDir( es->eventParm, dir );
CG_MissileHitWall( es->weapon, es->clientNum, position, dir, IMPACTSOUND_DEFAULT );
}
break;
case EV_BULLET_HIT_WALL:
DEBUGNAME("EV_BULLET_HIT_WALL");
ByteToDir( es->eventParm, dir );
CG_Bullet( es->pos.trBase, es->otherEntityNum, dir, qfalse, ENTITYNUM_WORLD );
break;
case EV_BULLET_HIT_FLESH:
DEBUGNAME("EV_BULLET_HIT_FLESH");
CG_Bullet( es->pos.trBase, es->otherEntityNum, dir, qtrue, es->eventParm );
break;
case EV_SHOTGUN:
DEBUGNAME("EV_SHOTGUN");
CG_ShotgunFire( es );
break;
case EV_GENERAL_SOUND:
DEBUGNAME("EV_GENERAL_SOUND");
if ( cgs.gameSounds[ es->eventParm ] ) {
trap_S_StartSound (NULL, es->number, CHAN_VOICE, cgs.gameSounds[ es->eventParm ] );
} else {
s = CG_ConfigString( CS_SOUNDS + es->eventParm );
trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, s ) );
}
break;
case EV_GLOBAL_SOUND: // play from the player's head so it never diminishes
DEBUGNAME("EV_GLOBAL_SOUND");
if ( cgs.gameSounds[ es->eventParm ] ) {
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.gameSounds[ es->eventParm ] );
} else {
s = CG_ConfigString( CS_SOUNDS + es->eventParm );
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, CG_CustomSound( es->number, s ) );
}
break;
case EV_GLOBAL_TEAM_SOUND: // play from the player's head so it never diminishes
{
DEBUGNAME("EV_GLOBAL_TEAM_SOUND");
switch( es->eventParm ) {
case GTS_RED_CAPTURE: // CTF: red team captured the blue flag, 1FCTF: red team captured the neutral flag
if ( cgs.clientinfo[cg.clientNum].team == TEAM_RED )
CG_AddBufferedSound( cgs.media.captureYourTeamSound );
else
CG_AddBufferedSound( cgs.media.captureOpponentSound );
break;
case GTS_BLUE_CAPTURE: // CTF: blue team captured the red flag, 1FCTF: blue team captured the neutral flag
if ( cgs.clientinfo[cg.clientNum].team == TEAM_BLUE )
CG_AddBufferedSound( cgs.media.captureYourTeamSound );
else
CG_AddBufferedSound( cgs.media.captureOpponentSound );
break;
case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used
if ( cgs.clientinfo[cg.clientNum].team == TEAM_RED )
CG_AddBufferedSound( cgs.media.returnYourTeamSound );
else
CG_AddBufferedSound( cgs.media.returnOpponentSound );
//
CG_AddBufferedSound( cgs.media.blueFlagReturnedSound );
break;
case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned
if ( cgs.clientinfo[cg.clientNum].team == TEAM_BLUE )
CG_AddBufferedSound( cgs.media.returnYourTeamSound );
else
CG_AddBufferedSound( cgs.media.returnOpponentSound );
//
CG_AddBufferedSound( cgs.media.redFlagReturnedSound );
break;
case GTS_RED_TAKEN: // CTF: red team took blue flag, 1FCTF: blue team took the neutral flag
// if this player picked up the flag then a sound is played in CG_CheckLocalSounds
if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) {
}
else {
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
}
else if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound );
}
}
break;
case GTS_BLUE_TAKEN: // CTF: blue team took the red flag, 1FCTF red team took the neutral flag
// if this player picked up the flag then a sound is played in CG_CheckLocalSounds
if (cg.snap->ps.powerups[PW_REDFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) {
}
else {
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
}
else if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound );
}
}
break;
case GTS_REDOBELISK_ATTACKED: // Overload: red obelisk is being attacked
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound );
}
break;
case GTS_BLUEOBELISK_ATTACKED: // Overload: blue obelisk is being attacked
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound );
}
break;
case GTS_REDTEAM_SCORED:
CG_AddBufferedSound(cgs.media.redScoredSound);
break;
case GTS_BLUETEAM_SCORED:
CG_AddBufferedSound(cgs.media.blueScoredSound);
break;
case GTS_REDTEAM_TOOK_LEAD:
CG_AddBufferedSound(cgs.media.redLeadsSound);
break;
case GTS_BLUETEAM_TOOK_LEAD:
CG_AddBufferedSound(cgs.media.blueLeadsSound);
break;
case GTS_TEAMS_ARE_TIED:
CG_AddBufferedSound( cgs.media.teamsTiedSound );
break;
default:
break;
}
break;
}
case EV_PAIN:
// local player sounds are triggered in CG_CheckLocalSounds,
// so ignore events on the player
DEBUGNAME("EV_PAIN");
if ( cent->currentState.number != cg.snap->ps.clientNum ) {
CG_PainEvent( cent, es->eventParm );
}
break;
case EV_DEATH1:
case EV_DEATH2:
case EV_DEATH3:
DEBUGNAME("EV_DEATHx");
trap_S_StartSound( NULL, es->number, CHAN_VOICE,
CG_CustomSound( es->number, va("*death%i.wav", event - EV_DEATH1 + 1) ) );
break;
case EV_OBITUARY:
DEBUGNAME("EV_OBITUARY");
CG_Obituary( es );
break;
//
// powerup events
//
case EV_POWERUP_QUAD:
DEBUGNAME("EV_POWERUP_QUAD");
if ( es->number == cg.snap->ps.clientNum ) {
cg.powerupActive = PW_QUAD;
cg.powerupTime = cg.time;
}
trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.quadSound );
break;
case EV_POWERUP_BATTLESUIT:
DEBUGNAME("EV_POWERUP_BATTLESUIT");
if ( es->number == cg.snap->ps.clientNum ) {
cg.powerupActive = PW_BATTLESUIT;
cg.powerupTime = cg.time;
}
trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.protectSound );
break;
case EV_POWERUP_REGEN:
DEBUGNAME("EV_POWERUP_REGEN");
if ( es->number == cg.snap->ps.clientNum ) {
cg.powerupActive = PW_REGEN;
cg.powerupTime = cg.time;
}
trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.regenSound );
break;
case EV_GIB_PLAYER:
DEBUGNAME("EV_GIB_PLAYER");
// don't play gib sound when using the kamikaze because it interferes
// with the kamikaze sound, downside is that the gib sound will also
// not be played when someone is gibbed while just carrying the kamikaze
if ( !(es->eFlags & EF_KAMIKAZE) ) {
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.gibSound );
}
CG_GibPlayer( cent->lerpOrigin );
break;
case EV_STOPLOOPINGSOUND:
DEBUGNAME("EV_STOPLOOPINGSOUND");
trap_S_StopLoopingSound( es->number );
es->loopSound = 0;
break;
case EV_DEBUG_LINE:
DEBUGNAME("EV_DEBUG_LINE");
CG_Beam( cent );
break;
default:
DEBUGNAME("UNKNOWN");
CG_Error( "Unknown event: %i", event );
break;
}
}
/*
==============
CG_CheckEvents
==============
*/
void CG_CheckEvents( centity_t *cent ) {
// check for event-only entities
if ( cent->currentState.eType > ET_EVENTS ) {
if ( cent->previousEvent ) {
return; // already fired
}
// if this is a player event set the entity number of the client entity number
if ( cent->currentState.eFlags & EF_PLAYER_EVENT ) {
cent->currentState.number = cent->currentState.otherEntityNum;
}
cent->previousEvent = 1;
cent->currentState.event = cent->currentState.eType - ET_EVENTS;
} else {
// check for events riding with another entity
if ( cent->currentState.event == cent->previousEvent ) {
return;
}
cent->previousEvent = cent->currentState.event;
if ( ( cent->currentState.event & ~EV_EVENT_BITS ) == 0 ) {
return;
}
}
// calculate the position at exactly the frame time
BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, cent->lerpOrigin );
CG_SetEntitySoundPosition( cent );
CG_EntityEvent( cent, cent->lerpOrigin );
}
================================================
FILE: src/cgame/cg_info.c
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
// cg_info.c -- display information while data is being loading
#include "cg_local.h"
#define MAX_LOADING_PLAYER_ICONS 16
#define MAX_LOADING_ITEM_ICONS 26
static int loadingPlayerIconCount;
static int loadingItemIconCount;
static qhandle_t loadingPlayerIcons[MAX_LOADING_PLAYER_ICONS];
static qhandle_t loadingItemIcons[MAX_LOADING_ITEM_ICONS];
/*
===================
CG_DrawLoadingIcons
===================
*/
static void CG_DrawLoadingIcons( void ) {
int n;
int x, y;
for( n = 0; n < loadingPlayerIconCount; n++ ) {
x = 16 + n * 78;
y = 324-40;
CG_DrawPic( x, y, 64, 64, loadingPlayerIcons[n] );
}
for( n = 0; n < loadingItemIconCount; n++ ) {
y = 400-40;
if( n >= 13 ) {
y += 40;
}
x = 16 + n % 13 * 48;
CG_DrawPic( x, y, 32, 32, loadingItemIcons[n] );
}
}
/*
======================
CG_LoadingString
======================
*/
void CG_LoadingString( const char *s ) {
Q_strncpyz( cg.infoScreenText, s, sizeof( cg.infoScreenText ) );
trap_UpdateScreen();
}
/*
===================
CG_LoadingItem
===================
*/
void CG_LoadingItem( int itemNum ) {
gitem_t *item;
item = &bg_itemlist[itemNum];
if ( item->icon && loadingItemIconCount < MAX_LOADING_ITEM_ICONS ) {
loadingItemIcons[loadingItemIconCount++] = trap_R_RegisterShaderNoMip( item->icon );
}
CG_LoadingString( item->pickup_name );
}
/*
===================
CG_LoadingClient
===================
*/
void CG_LoadingClient( int clientNum ) {
const char *info;
char *skin;
char personality[MAX_QPATH];
char model[MAX_QPATH];
char iconName[MAX_QPATH];
info = CG_ConfigString( CS_PLAYERS + clientNum );
if ( loadingPlayerIconCount < MAX_LOADING_PLAYER_ICONS ) {
Q_strncpyz( model, Info_ValueForKey( info, "model" ), sizeof( model ) );
skin = Q_strrchr( model, '/' );
if ( skin ) {
*skin++ = '\0';
} else {
skin = "default";
}
Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", model, skin );
loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName );
if ( !loadingPlayerIcons[loadingPlayerIconCount] ) {
Com_sprintf( iconName, MAX_QPATH, "models/players/characters/%s/icon_%s.tga", model, skin );
loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName );
}
if ( !loadingPlayerIcons[loadingPlayerIconCount] ) {
Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", DEFAULT_MODEL, "default" );
loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName );
}
if ( loadingPlayerIcons[loadingPlayerIconCount] ) {
loadingPlayerIconCount++;
}
}
Q_strncpyz( personality, Info_ValueForKey( info, "n" ), sizeof(personality) );
Q_CleanStr( personality );
if( cgs.gametype == GT_SINGLE_PLAYER ) {
trap_S_RegisterSound( va( "sound/player/announce/%s.wav", personality ), qtrue );
}
CG_LoadingString( personality );
}
/*
====================
CG_DrawInformation
Draw all the status / pacifier stuff during level loading
====================
*/
void CG_DrawInformation( void ) {
const char *s;
const char *info;
const char *sysInfo;
int y;
int value;
qhandle_t levelshot;
qhandle_t detail;
char buf[1024];
info = CG_ConfigString( CS_SERVERINFO );
sysInfo = CG_ConfigString( CS_SYSTEMINFO );
s = Info_ValueForKey( info, "mapname" );
levelshot = trap_R_RegisterShaderNoMip( va( "levelshots/%s.tga", s ) );
if ( !levelshot ) {
levelshot = trap_R_RegisterShaderNoMip( "menu/art/unknownmap" );
}
trap_R_SetColor( NULL );
CG_DrawPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, levelshot );
// blend a detail texture over it
detail = trap_R_RegisterShader( "levelShotDetail" );
trap_R_DrawStretchPic( 0, 0, cgs.glconfig.vidWidth, cgs.glconfig.vidHeight, 0, 0, 2.5, 2, detail );
// draw the icons of things as they are loaded
CG_DrawLoadingIcons();
// the first 150 rows are reserved for the client connection
// screen to write into
if ( cg.infoScreenText[0] ) {
UI_DrawProportionalString( 320, 128-32, va("Loading... %s", cg.infoScreenText),
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
} else {
UI_DrawProportionalString( 320, 128-32, "Awaiting snapshot...",
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
}
// draw info string information
y = 180-32;
// don't print server lines if playing a local game
trap_Cvar_VariableStringBuffer( "sv_running", buf, sizeof( buf ) );
if ( !atoi( buf ) ) {
// server hostname
Q_strncpyz(buf, Info_ValueForKey( info, "sv_hostname" ), 1024);
Q_CleanStr(buf);
UI_DrawProportionalString( 320, y, buf,
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
// pure server
s = Info_ValueForKey( sysInfo, "sv_pure" );
if ( s[0] == '1' ) {
UI_DrawProportionalString( 320, y, "Pure Server",
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
// server-specific message of the day
s = CG_ConfigString( CS_MOTD );
if ( s[0] ) {
UI_DrawProportionalString( 320, y, s,
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
// some extra space after hostname and motd
y += 10;
}
// map-specific message (long map name)
s = CG_ConfigString( CS_MESSAGE );
if ( s[0] ) {
UI_DrawProportionalString( 320, y, s,
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
// cheats warning
s = Info_ValueForKey( sysInfo, "sv_cheats" );
if ( s[0] == '1' ) {
UI_DrawProportionalString( 320, y, "CHEATS ARE ENABLED",
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
// game type
switch ( cgs.gametype ) {
case GT_FFA:
s = "Free For All";
break;
case GT_SINGLE_PLAYER:
s = "Single Player";
break;
case GT_TOURNAMENT:
s = "Tournament";
break;
case GT_TEAM:
s = "Team Deathmatch";
break;
case GT_CTF:
s = "Capture The Flag";
break;
default:
s = "Unknown Gametype";
break;
}
UI_DrawProportionalString( 320, y, s,
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
value = atoi( Info_ValueForKey( info, "timelimit" ) );
if ( value ) {
UI_DrawProportionalString( 320, y, va( "timelimit %i", value ),
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
if (cgs.gametype < GT_CTF ) {
value = atoi( Info_ValueForKey( info, "fraglimit" ) );
if ( value ) {
UI_DrawProportionalString( 320, y, va( "fraglimit %i", value ),
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
}
if (cgs.gametype >= GT_CTF) {
value = atoi( Info_ValueForKey( info, "capturelimit" ) );
if ( value ) {
UI_DrawProportionalString( 320, y, va( "capturelimit %i", value ),
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
}
}
================================================
FILE: src/cgame/cg_local.h
================================================
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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 Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
#include "../game/q_shared.h"
#include "tr_types.h"
#include "../game/bg_public.h"
#include "cg_public.h"
// The entire cgame module is unloaded and reloaded on each level change,
// so there is NO persistant data between levels on the client side.
// If you absolutely need something stored, it can either be kept
// by the server in the server stored userinfos, or stashed in a cvar.
#define POWERUP_BLINKS 5
#define POWERUP_BLINK_TIME 1000
#define FADE_TIME 200
#define PULSE_TIME 200
#define DAMAGE_DEFLECT_TIME 100
#define DAMAGE_RETURN_TIME 400
#define DAMAGE_TIME 500
#define LAND_DEFLECT_TIME 150
#define LAND_RETURN_TIME 300
#define STEP_TIME 200
#define DUCK_TIME 100
#define PAIN_TWITCH_TIME 200
#define WEAPON_SELECT_TIME 1400
#define ITEM_SCALEUP_TIME 1000
#define ZOOM_TIME 150
#define ITEM_BLOB_TIME 200
#define MUZZLE_FLASH_TIME 20
#define SINK_TIME 1000 // time for fragments to sink into ground before going away
#define ATTACKER_HEAD_TIME 10000
#define REWARD_TIME 3000
#define PULSE_SCALE 1.5 // amount to scale up the icons when activating
#define MAX_STEP_CHANGE 32
#define MAX_VERTS_ON_POLY 10
#define MAX_MARK_POLYS 256
#define STAT_MINUS 10 // num frame for '-' stats digit
#define ICON_SIZE 48
#define CHAR_WIDTH 32
#define CHAR_HEIGHT 48
#define TEXT_ICON_SPACE 4
#define TEAMCHAT_WIDTH 80
#define TEAMCHAT_HEIGHT 8
// very large characters
#define GIANT_WIDTH 32
#define GIANT_HEIGHT 48
#define NUM_CROSSHAIRS 10
#define TEAM_OVERLAY_MAXNAME_WIDTH 12
#define TEAM_OVERLAY_MAXLOCATION_WIDTH 16
#define DEFAULT_MODEL "sarge"
#define DEFAULT_TEAM_MODEL "sarge"
#define DEFAULT_TEAM_HEAD "sarge"
#define DEFAULT_REDTEAM_NAME "Stroggs"
#define DEFAULT_BLUETEAM_NAME "Pagans"
typedef enum {
FOOTSTEP_NORMAL,
FOOTSTEP_BOOT,
FOOTSTEP_FLESH,
FOOTSTEP_MECH,
FOOTSTEP_ENERGY,
FOOTSTEP_METAL,
FOOTSTEP_SPLASH,
FOOTSTEP_TOTAL
} footstep_t;
typedef enum {
IMPACTSOUND_DEFAULT,
IMPACTSOUND_METAL,
IMPACTSOUND_FLESH
} impactSound_t;
//=================================================
// player entities need to track more information
// than any other type of entity.
// note that not every player entity is a client entity,
// because corpses after respawn are outside the normal
// client numbering range
// when changing animation, set animationTime to frameTime + lerping time
// The current lerp will finish out, then it will lerp to the new animation
typedef struct {
int oldFrame;
int oldFrameTime; // time when ->oldFrame was exactly on
int frame;
int frameTime; // time when ->frame will be exactly on
float backlerp;
float yawAngle;
qboolean yawing;
float pitchAngle;
qboolean pitching;
int animationNumber; // may include ANIM_TOGGLEBIT
animation_t *animation;
int animationTime; // time when the first frame of the animation will be exact
} lerpFrame_t;
typedef struct {
lerpFrame_t legs, torso, flag;
int painTime;
int painDirection; // flip from 0 to 1
int lightningFiring;
// railgun trail spawning
vec3_t railgunImpact;
qboolean railgunFlash;
// machinegun spinning
float barrelAngle;
int barrelTime;
qboolean barrelSpinning;
} playerEntity_t;
//=================================================
// centity_t have a direct corespondence with gentity_t in the game, but
// only the entityState_t is directly communicated to the cgame
typedef struct centity_s {
entityState_t currentState; // from cg.frame
entityState_t nextState; // from cg.nextFrame, if available
qboolean interpolate; // true if next is valid to interpolate to
qboolean currentValid; // true if cg.frame holds this entity
int muzzleFlashTime; // move to playerEntity?
int previousEvent;
int teleportFlag;
int trailTime; // so missile trails can handle dropped initial packets
int dustTrailTime;
int miscTime;
int snapShotTime; // last time this entity was found in a snapshot
playerEntity_t pe;
int errorTime; // decay the error from this time
vec3_t errorOrigin;
vec3_t errorAngles;
qboolean extrapolated; // false if origin / angles is an interpolation
vec3_t rawOrigin;
vec3_t rawAngles;
vec3_t beamEnd;
// exact interpolated position of entity on this frame
vec3_t lerpOrigin;
vec3_t lerpAngles;
} centity_t;
//======================================================================
// local entities are created as a result of events or predicted actions,
// and live independantly from all server transmitted entities
typedef struct markPoly_s {
struct markPoly_s *prevMark, *nextMark;
int time;
qhandle_t markShader;
qboolean alphaFade; // fade alpha instead of rgb
float color[4];
poly_t poly;
polyVert_t verts[MAX_VERTS_ON_POLY];
} markPoly_t;
typedef enum {
LE_MARK,
LE_EXPLOSION,
LE_SPRITE_EXPLOSION,
LE_FRAGMENT,
LE_MOVE_SCALE_FADE,
LE_FALL_SCALE_FADE,
LE_FADE_RGB,
LE_SCALE_FADE,
LE_SCOREPLUM,
} leType_t;
typedef enum {
LEF_PUFF_DONT_SCALE = 0x0001, // do not scale size over time
LEF_TUMBLE = 0x0002, // tumble over time, used for ejecting shells
LEF_SOUND1 = 0x0004, // sound 1 for kamikaze
LEF_SOUND2 = 0x0008 // sound 2 for kamikaze
} leFlag_t;
typedef enum {
LEMT_NONE,
LEMT_BURN,
LEMT_BLOOD
} leMarkType_t; // fragment local entities can leave marks on walls
typedef enum {
LEBS_NONE,
LEBS_BLOOD,
LEBS_BRASS
} leBounceSoundType_t; // fragment local entities can make sounds on impacts
typedef struct localEntity_s {
struct localEntity_s *prev, *next;
leType_t leType;
int leFlags;
int startTime;
int endTime;
int fadeInTime;
float lifeRate; // 1.0 / (endTime - startTime)
trajectory_t pos;
trajectory_t angles;
float bounceFactor; // 0.0 = no bounce, 1.0 = perfect
float color[4];
float radius;
float light;
vec3_t lightColor;
leMarkType_t leMarkType; // mark to leave on fragment impact
leBounceSoundType_t leBounceSoundType;
refEntity_t refEntity;
} localEntity_t;
//======================================================================
typedef struct {
int client;
int score;
int ping;
int time;
int scoreFlags;
int powerUps;
int accuracy;
int impressiveCount;
int excellentCount;
int guantletCount;
int defendCount;
int assistCount;
int captures;
qboolean perfect;
int team;
} score_t;
// each client has an associated clientInfo_t
// that contains media references necessary to present the
// client model and other color coded effects
// this is regenerated each time a client's configstring changes,
// usually as a result of a userinfo (name, model, etc) change
#define MAX_CUSTOM_SOUNDS 32
typedef struct {
qboolean infoValid;
char name[MAX_QPATH];
team_t team;
int botSkill; // 0 = not bot, 1-5 = bot
vec3_t color1;
vec3_t color2;
int score; // updated by score servercmds
int location; // location index for team mode
int health; // you only get this info about your teammates
int armor;
int curWeapon;
int handicap;
int wins, losses; // in tourney mode
int teamTask; // task in teamplay (offence/defence)
qboolean teamLeader; // true when this is a team leader
int powerups; // so can display quad/flag status
int medkitUsageTime;
int invulnerabilityStartTime;
int invulnerabilityStopTime;
int breathPuffTime;
// when clientinfo is changed, the loading of models/skins/sounds
// can be deferred until you are dead, to prevent hitches in
// gameplay
char modelName[MAX_QPATH];
char skinName[MAX_QPATH];
char headModelName[MAX_QPATH];
char headSkinName[MAX_QPATH];
char redTeam[MAX_TEAMNAME];
char blueTeam[MAX_TEAMNAME];
qboolean deferred;
qboolean newAnims; // true if using the new mission pack animations
qboolean fixedlegs; // true if legs yaw is always the same as torso yaw
qboolean fixedtorso; // true if torso never changes yaw
vec3_t headOffset; // move head in icon views
footstep_t footsteps;
gender_t gender; // from model
qhandle_t legsModel;
qhandle_t legsSkin;
qhandle_t torsoModel;
qhandle_t torsoSkin;
qhandle_t headModel;
qhandle_t headSkin;
qhandle_t modelIcon;
animation_t animations[MAX_TOTALANIMATIONS];
sfxHandle_t sounds[MAX_CUSTOM_SOUNDS];
} clientInfo_t;
// each WP_* weapon enum has an associated weaponInfo_t
// that contains media references necessary to present the
// weapon and its effects
typedef struct weaponInfo_s {
qboolean registered;
gitem_t *item;
qhandle_t handsModel; // the hands don't actually draw, they just position the weapon
qhandle_t weaponModel;
qhandle_t barrelModel;
qhandle_t flashModel;
vec3_t weaponMidpoint; // so it will rotate centered instead of by tag
float flashDlight;
vec3_t flashDlightColor;
sfxHandle_t flashSound[4]; // fast firing weapons randomly choose
qhandle_t weaponIcon;
qhandle_t ammoIcon;
qhandle_t ammoModel;
qhandle_t missileModel;
sfxHandle_t missileSound;
void (*missileTrailFunc)( centity_t *, const struct weaponInfo_s *wi );
float missileDlight;
vec3_t missileDlightColor;
int missileRenderfx;
void (*ejectBrassFunc)( centity_t * );
float trailRadius;
float wiTrailTime;
sfxHandle_t readySound;
sfxHandle_t firingSound;
qboolean loopFireSound;
} weaponInfo_t;
// each IT_* item has an associated itemInfo_t
// that constains media references necessary to present the
// item and its effects
typedef struct {
qboolean registered;
qhandle_t models[MAX_ITEM_MODELS];
qhandle_t icon;
} itemInfo_t;
typedef struct {
int itemNum;
} powerupInfo_t;
#define MAX_SKULLTRAIL 10
typedef struct {
vec3_t positions[MAX_SKULLTRAIL];
int numpositions;
} skulltrail_t;
#define MAX_REWARDSTACK 10
#define MAX_SOUNDBUFFER 20
//======================================================================
// all cg.stepTime, cg.duckTime, cg.landTime, etc are set to cg.time when the action
// occurs, and they will have visible effects for #define STEP_TIME or whatever msec after
#define MAX_PREDICTED_EVENTS 16
typedef struct {
int clientFrame; // incremented each frame
int clientNum;
qboolean demoPlayback;
qboolean levelShot; // taking a level menu screenshot
int deferredPlayerLoading;
qboolean loading; // don't defer players at initial startup
qboolean intermissionStarted; // don't play voice rewards, because game will end shortly
// there are only one or two snapshot_t that are relevent at a time
int latestSnapshotNum; // the number of snapshots the client system has received
int latestSnapshotTime; // the time from latestSnapshotNum, so we don't need to read the snapshot yet
snapshot_t *snap; // cg.snap->serverTime <= cg.time
snapshot_t *nextSnap; // cg.nextSnap->serverTime > cg.time, or NULL
snapshot_t activeSnapshots[2];
float frameInterpolation; // (float)( cg.time - cg.frame->serverTime ) / (cg.nextFrame->serverTime - cg.frame->serverTime)
qboolean thisFrameTeleport;
qboolean nextFrameTeleport;
int frametime; // cg.time - cg.oldTime
int time; // this is the time value that the client
// is rendering at.
int oldTime; // time at last frame, used for missile trails and prediction checking
int physicsTime; // either cg.snap->time or cg.nextSnap->time
int timelimitWarnings; // 5 min, 1 min, overtime
int fraglimitWarnings;
qboolean mapRestart; // set on a map restart to set back the weapon
qboolean renderingThirdPerson; // during deaths, chasecams, etc
// prediction state
qboolean hyperspace; // true if prediction has hit a trigger_teleport
playerState_t predictedPlayerState;
centity_t predictedPlayerEntity;
qboolean validPPS; // clear until the first call to CG_PredictPlayerState
int predictedErrorTime;
vec3_t predictedError;
int eventSequence;
int predictableEvents[MAX_PREDICTED_EVENTS];
float stepChange; // for stair up smoothing
int stepTime;
float duckChange; // for duck viewheight smoothing
int duckTime;
float landChange; // for landing hard
int landTime;
// input state sent to server
int weaponSelect;
// auto rotating items
vec3_t autoAngles;
vec3_t autoAxis[3];
vec3_t autoAnglesFast;
vec3_t autoAxisFast[3];
// view rendering
refdef_t refdef;
vec3_t refdefViewAngles; // will be converted to refdef.viewaxis
// zoom key
qboolean zoomed;
int zoomTime;
float zoomSensitivity;
// information screen text during loading
char infoScreenText[MAX_STRING_CHARS];
// scoreboard
int scoresRequestTime;
int numScores;
int selectedScore;
int teamScores[2];
score_t scores[MAX_CLIENTS];
qboolean showScores;
qboolean scoreBoardShowing;
int scoreFadeTime;
char killerName[MAX_NAME_LENGTH];
char spectatorList[MAX_STRING_CHARS]; // list of names
int spectatorLen; // length of list
float spectatorWidth; // width in device units
int spectatorTime; // next time to offset
int spectatorPaintX; // current paint x
int spectatorPaintX2; // current paint x
int spectatorOffset; // current offset from start
int spectatorPaintLen; // current offset from start
// skull trails
skulltrail_t skulltrails[MAX_CLIENTS];
// centerprinting
int centerPrintTime;
int centerPrintCharWidth;
int centerPrintY;
char centerPrint[1024];
int centerPrintLines;
// low ammo warning state
int lowAmmoWarning; // 1 = low, 2 = empty
// kill timers for carnage reward
int lastKillTime;
// crosshair client ID
int crosshairClientNum;
int crosshairClientTime;
// powerup active flashing
int powerupActive;
int powerupTime;
// attacking player
int attackerTime;
int voiceTime;
// reward medals
int rewardStack;
int rewardTime;
int rewardCount[MAX_REWARDSTACK];
qhandle_t rewardShader[MAX_REWARDSTACK];
qhandle_t rewardSound[MAX_REWARDSTACK];
// sound buffer mainly for announcer sounds
int soundBufferIn;
int soundBufferOut;
int soundTime;
qhandle_t soundBuffer[MAX_SOUNDBUFFER];
// for voice chat buffer
int voiceChatTime;
int voiceChatBufferIn;
int voiceChatBufferOut;
// warmup countdown
int warmup;
int warmupCount;
//==========================
int itemPickup;
int itemPickupTime;
int itemPickupBlendTime; // the pulse around the crosshair is timed seperately
int weaponSelectTime;
int weaponAnimation;
int weaponAnimationTime;
// blend blobs
float damageTime;
float damageX, damageY, damageValue;
// status bar head
float headYaw;
float headEndPitch;
float headEndYaw;
int headEndTime;
float headStartPitch;
float headStartYaw;
int headStartTime;
// view movement
float v_dmg_time;
float v_dmg_pitch;
float v_dmg_roll;
vec3_t kick_angles; // weapon kicks
vec3_t kick_origin;
// temp working variables for player view
float bobfracsin;
int bobcycle;
float xyspeed;
int nextOrbitTime;
//qboolean cameraMode; // if rendering from a loaded camera
// development tool
refEntity_t testModelEntity;
char testModelName[MAX_QPATH];
qboolean testGun;
} cg_t;
// all of the model, shader, and sound references that are
// loaded at gamestate time are stored in cgMedia_t
// Other media that can be tied to clients, weapons, or items are
// stored in the clientInfo_t, itemInfo_t, weaponInfo_t, and powerupInfo_t
typedef struct {
qhandle_t charsetShader;
qhandle_t charsetProp;
qhandle_t charsetPropGlow;
qhandle_t charsetPropB;
qhandle_t whiteShader;
qhandle_t redCubeModel;
qhandle_t blueCubeModel;
qhandle_t redCubeIcon;
qhandle_t blueCubeIcon;
qhandle_t redFlagModel;
qhandle_t blueFlagModel;
qhandle_t neutralFlagModel;
qhandle_t redFlagShader[3];
qhandle_t blueFlagShader[3];
qhandle_t flagShader[4];
qhandle_t flagPoleModel;
qhandle_t flagFlapModel;
qhandle_t redFlagFlapSkin;
qhandle_t blueFlagFlapSkin;
qhandle_t neutralFlagFlapSkin;
qhandle_t redFlagBaseModel;
qhandle_t blueFlagBaseModel;
qhandle_t neutralFlagBaseModel;
qhandle_t armorModel;
qhandle_t armorIcon;
qhandle_t teamStatusBar;
qhandle_t deferShader;
// gib explosions
qhandle_t gibAbdomen;
qhandle_t gibArm;
qhandle_t gibChest;
qhandle_t gibFist;
qhandle_t gibFoot;
qhandle_t gibForearm;
qhandle_t gibIntestine;
qhandle_t gibLeg;
qhandle_t gibSkull;
qhandle_t gibBrain;
qhandle_t smoke2;
qhandle_t machinegunBrassModel;
qhandle_t shotgunBrassModel;
qhandle_t railRingsShader;
qhandle_t railCoreShader;
qhandle_t lightningShader;
qhandle_t friendShader;
qhandle_t balloonShader;
qhandle_t connectionShader;
qhandle_t selectShader;
qhandle_t viewBloodShader;
qhandle_t tracerShader;
qhandle_t crosshairShader[NUM_CROSSHAIRS];
qhandle_t lagometerShader;
qhandle_t backTileShader;
qhandle_t noammoShader;
qhandle_t smokePuffShader;
qhandle_t smokePuffRageProShader;
qhandle_t shotgunSmokePuffShader;
qhandle_t plasmaBallShader;
qhandle_t waterBubbleShader;
qhandle_t bloodTrailShader;
qhandle_t numberShaders[11];
qhandle_t shadowMarkShader;
qhandle_t botSkillShaders[5];
// wall mark shaders
qhandle_t wakeMarkShader;
qhandle_t bloodMarkShader;
qhandle_t bulletMarkShader;
qhandle_t burnMarkShader;
qhandle_t holeMarkShader;
qhandle_t energyMarkShader;
// powerup shaders
qhandle_t quadShader;
qhandle_t redQuadShader;
qhandle_t quadWeaponShader;
qhandle_t invisShader;
qhandle_t regenShader;
qhandle_t battleSuitShader;
qhandle_t battleWeaponShader;
qhandle_t hastePuffShader;
qhandle_t redKamikazeShader;
qhandle_t blueKamikazeShader;
// weapon effect models
qhandle_t bulletFlashModel;
qhandle_t ringFlashModel;
qhandle_t dishFlashModel;
qhandle_t lightningExplosionModel;
// weapon effect shaders
qhandle_t railExplosionShader;
qhandle_t plasmaExplosionShader;
qhandle_t bulletExplosionShader;
qhandle_t rocketExplosionShader;
qhandle_t grenadeExplosionShader;
qhandle_t bfgExplosionShader;
qhandle_t bloodExplosionShader;
// special effects models
qhandle_t teleportEffectModel;
qhandle_t teleportEffectShader;
qhandle_t invulnerabilityPowerupModel;
// scoreboard headers
qhandle_t scoreboardName;
qhandle_t scoreboardPing;
qhandle_t scoreboardScore;
qhandle_t scoreboardTime;
// medals shown during gameplay
qhandle_t medalImpressive;
qhandle_t medalExcellent;
qhandle_t medalGauntlet;
qhandle_t medalDefend;
qhandle_t medalAssist;
qhandle_t medalCapture;
// sounds
sfxHandle_t quadSound;
sfxHandle_t tracerSound;
sfxHandle_t selectSound;
sfxHandle_t useNothingSound;
sfxHandle_t wearOffSound;
sfxHandle_t footsteps[FOOTSTEP_TOTAL][4];
sfxHandle_t sfx_lghit1;
sfxHandle_t sfx_lghit2;
sfxHandle_t sfx_lghit3;
sfxHandle_t sfx_ric1;
sfxHandle_t sfx_ric2;
sfxHandle_t sfx_ric3;
sfxHandle_t sfx_railg;
sfxHandle_t sfx_rockexp;
sfxHandle_t sfx_plasmaexp;
sfxHandle_t gibSound;
sfxHandle_t gibBounce1Sound;
sfxHandle_t gibBounce2Sound;
sfxHandle_t gibBounce3Sound;
sfxHandle_t teleInSound;
sfxHandle_t teleOutSound;
sfxHandle_t noAmmoSound;
sfxHandle_t respawnSound;
sfxHandle_t talkSound;
sfxHandle_t landSound;
sfxHandle_t fallSound;
sfxHandle_t jumpPadSound;
sfxHandle_t oneMinuteSound;
sfxHandle_t fiveMinuteSound;
sfxHandle_t suddenDeathSound;
sfxHandle_t threeFragSound;
sfxHandle_t twoFragSound;
sfxHandle_t oneFragSound;
sfxHandle_t hitSound;
sfxHandle_t hitSoundHighArmor;
sfxHandle_t hitSoundLowArmor;
sfxHandle_t hitTeamSound;
sfxHandle_t impressiveSound;
sfxHandle_t excellentSound;
sfxHandle_t deniedSound;
sfxHandle_t humiliationSound;
sfxHandle_t assistSound;
sfxHandle_t defendSound;
sfxHandle_t firstImpressiveSound;
sfxHandle_t firstExcellentSound;
sfxHandle_t firstHumiliationSound;
sfxHandle_t takenLeadSound;
sfxHandle_t tiedLeadSound;
sfxHandle_t lostLeadSound;
sfxHandle_t voteNow;
sfxHandle_t votePassed;
sfxHandle_t voteFailed;
sfxHandle_t watrInSound;
sfxHandle_t watrOutSound;
sfxHandle_t watrUnSound;
sfxHandle_t flightSound;
sfxHandle_t medkitSound;
sfxHandle_t weaponHoverSound;
// teamplay sounds
sfxHandle_t captureAwardSound;
sfxHandle_t redScoredSound;
sfxHandle_t blueScoredSound;
sfxHandle_t redLeadsSound;
sfxHandle_t blueLeadsSound;
sfxHandle_t teamsTiedSound;
sfxHandle_t captureYourTeamSound;
sfxHandle_t captureOpponentSound;
sfxHandle_t returnYourTeamSound;
sfxHandle_t returnOpponentSound;
sfxHandle_t takenYourTeamSound;
sfxHandle_t takenOpponentSound;
sfxHandle_t redFlagReturnedSound;
sfxHandle_t blueFlagReturnedSound;
sfxHandle_t neutralFlagReturnedSound;
sfxHandle_t enemyTookYourFlagSound;
sfxHandle_t enemyTookTheFlagSound;
sfxHandle_t yourTeamTookEnemyFlagSound;
sfxHandle_t yourTeamTookTheFlagSound;
sfxHandle_t youHaveFlagSound;
sfxHandle_t yourBaseIsUnderAttackSound;
sfxHandle_t holyShitSound;
// tournament sounds
sfxHandle_t count3Sound;
sfxHandle_t count2Sound;
sfxHandle_t count1Sound;
sfxHandle_t countFightSound;
sfxHandle_t countPrepareSound;
qhandle_t cursor;
qhandle_t selectCursor;
qhandle_t sizeCursor;
sfxHandle_t regenSound;
sfxHandle_t protectSound;
sfxHandle_t n_healthSound;
sfxHandle_t hgrenb1aSound;
sfxHandle_t hgrenb2aSound;
sfxHandle_t wstbimplSound;
sfxHandle_t wstbimpmSound;
sfxHandle_t wstbimpdSound;
sfxHandle_t wstbactvSound;
} cgMedia_t;
// The client game static (cgs) structure hold everything
// loaded or calculated from the gamestate. It will NOT
// be cleared when a tournement restart is done, allowing
// all clients to begin playing instantly
typedef struct {
gameState_t gameState; // gamestate from server
glconfig_t glconfig; // rendering configuration
float screenXScale; // derived from glconfig
float screenYScale;
float screenXBias;
int serverCommandSequence; // reliable command stream counter
int processedSnapshotNum;// the number of snapshots cgame has requested
qboolean localServer; // detected on startup by checking sv_running
// parsed from serverinfo
gametype_t gametype;
int dmflags;
int teamflags;
int fraglimit;
int capturelimit;
int timelimit;
int maxclients;
char mapname[MAX_QPATH];
char redTeam[MAX_QPATH];
char blueTeam[MAX_QPATH];
int voteTime;
int voteYes;
int voteNo;
qboolean voteModified; // beep whenever changed
char voteString[MAX_STRING_TOKENS];
int teamVoteTime[2];
int teamVoteYes[2];
int teamVoteNo[2];
qboolean teamVoteModified[2]; // beep whenever changed
char teamVoteString[2][MAX_STRING_TOKENS];
int levelStartTime;
int scores1, scores2; // from configstrings
int redflag, blueflag; // flag status from configstrings
int flagStatus;
qboolean newHud;
//
// locally derived information from gamestate
//
qhandle_t gameModels[MAX_MODELS];
sfxHandle_t gameSounds[MAX_SOUNDS];
int numInlineModels;
qhandle_t inlineDrawModel[MAX_MODELS];
vec3_t inlineModelMidpoints[MAX_MODELS];
clientInfo_t clientinfo[MAX_CLIENTS];
// teamchat width is *3 because of embedded color codes
char teamChatMsgs[TEAMCHAT_HEIGHT][TEAMCHAT_WIDTH*3+1];
int teamChatMsgTimes[TEAMCHAT_HEIGHT];
int teamChatPos;
int teamLastChatPos;
int cursorX;
int cursorY;
qboolean eventHandling;
qboolean mouseCaptured;
qboolean sizingHud;
void *capturedItem;
qhandle_t activeCursor;
// orders
int currentOrder;
qboolean orderPending;
int orderTime;
int currentVoiceClient;
int acceptOrderTime;
int acceptTask;
int acceptLeader;
char acceptVoice[MAX_NAME_LENGTH];
// media
cgMedia_t media;
} cgs_t;
//==============================================================================
extern cgs_t cgs;
extern cg_t cg;
extern centity_t cg_entities[MAX_GENTITIES];
extern weaponInfo_t cg_weapons[MAX_WEAPONS];
extern itemInfo_t cg_items[MAX_ITEMS];
extern markPoly_t cg_markPolys[MAX_MARK_POLYS];
extern vmCvar_t cg_centertime;
extern vmCvar_t cg_runpitch;
extern vmCvar_t cg_runroll;
extern vmCvar_t cg_bobup;
extern vmCvar_t cg_bobpitch;
extern vmCvar_t cg_bobroll;
extern vmCvar_t cg_swingSpeed;
extern vmCvar_t cg_shadows;
extern vmCvar_t cg_gibs;
extern vmCvar_t cg_drawTimer;
extern vmCvar_t cg_drawFPS;
extern vmCvar_t cg_drawSnapshot;
extern vmCvar_t cg_draw3dIcons;
extern vmCvar_t cg_drawIcons;
extern vmCvar_t cg_drawAmmoWarning;
extern vmCvar_t cg_drawCrosshair;
extern vmCvar_t cg_drawCrosshairNames;
extern vmCvar_t cg_drawRewards;
extern vmCvar_t cg_drawTeamOverlay;
extern vmCvar_t cg_teamOverlayUserinfo;
extern vmCvar_t cg_crosshairX;
extern vmCvar_t cg_crosshairY;
extern vmCvar_t cg_crosshairSize;
extern vmCvar_t cg_crosshairHealth;
extern vmCvar_t cg_drawStatus;
extern vmCvar_t cg_draw2D;
extern vmCvar_t cg_animSpeed;
extern vmCvar_t cg_debugAnim;
extern vmCvar_t cg_debugPosition;
extern vmCvar_t cg_debugEvents;
extern vmCvar_t cg_railTrailTime;
extern vmCvar_t cg_errorDecay;
extern vmCvar_t cg_nopredict;
extern vmCvar_t cg_noPlayerAnims;
extern vmCvar_t cg_showmiss;
extern vmCvar_t cg_footsteps;
extern vmCvar_t cg_addMarks;
extern vmCvar_t cg_brassTime;
extern vmCvar_t cg_gun_frame;
extern vmCvar_t cg_gun_x;
extern vmCvar_t cg_gun_y;
extern vmCvar_t cg_gun_z;
extern vmCvar_t cg_drawGun;
extern vmCvar_t cg_viewsize;
extern vmCvar_t cg_tracerChance;
extern vmCvar_t cg_tracerWidth;
extern vmCvar_t cg_tracerLength;
extern vmCvar_t cg_autoswitch;
extern vmCvar_t cg_ignore;
extern vmCvar_t cg_simpleItems;
extern vmCvar_t cg_fov;
extern vmCvar_t cg_zoomFov;
extern vmCvar_t cg_thirdPersonRange;
extern vmCvar_t cg_thirdPersonAngle;
extern vmCvar_t cg_thirdPerson;
extern vmCvar_t cg_stereoSeparation;
extern vmCvar_t cg_lagometer;
extern vmCvar_t
gitextract_lfy_jed8/
├── .github/
│ └── workflows/
│ └── msbuild.yml
├── .gitignore
├── COPYING.txt
├── README.md
├── README.txt
├── src/
│ ├── cgame/
│ │ ├── cg_consolecmds.c
│ │ ├── cg_draw.c
│ │ ├── cg_drawtools.c
│ │ ├── cg_effects.c
│ │ ├── cg_ents.c
│ │ ├── cg_event.c
│ │ ├── cg_info.c
│ │ ├── cg_local.h
│ │ ├── cg_localents.c
│ │ ├── cg_main.c
│ │ ├── cg_marks.c
│ │ ├── cg_particles.c
│ │ ├── cg_players.c
│ │ ├── cg_playerstate.c
│ │ ├── cg_predict.c
│ │ ├── cg_public.h
│ │ ├── cg_scoreboard.c
│ │ ├── cg_servercmds.c
│ │ ├── cg_snapshot.c
│ │ ├── cg_syscalls.asm
│ │ ├── cg_syscalls.c
│ │ ├── cg_view.c
│ │ ├── cg_weapons.c
│ │ ├── cgame.bat
│ │ ├── cgame.q3asm
│ │ └── tr_types.h
│ ├── engine/
│ │ ├── botlib/
│ │ │ ├── aasfile.h
│ │ │ ├── be_aas_bsp.h
│ │ │ ├── be_aas_bspq3.c
│ │ │ ├── be_aas_cluster.c
│ │ │ ├── be_aas_cluster.h
│ │ │ ├── be_aas_debug.c
│ │ │ ├── be_aas_debug.h
│ │ │ ├── be_aas_def.h
│ │ │ ├── be_aas_entity.c
│ │ │ ├── be_aas_entity.h
│ │ │ ├── be_aas_file.c
│ │ │ ├── be_aas_file.h
│ │ │ ├── be_aas_funcs.h
│ │ │ ├── be_aas_main.c
│ │ │ ├── be_aas_main.h
│ │ │ ├── be_aas_move.c
│ │ │ ├── be_aas_move.h
│ │ │ ├── be_aas_optimize.c
│ │ │ ├── be_aas_optimize.h
│ │ │ ├── be_aas_reach.c
│ │ │ ├── be_aas_reach.h
│ │ │ ├── be_aas_route.c
│ │ │ ├── be_aas_route.h
│ │ │ ├── be_aas_routealt.c
│ │ │ ├── be_aas_routealt.h
│ │ │ ├── be_aas_sample.c
│ │ │ ├── be_aas_sample.h
│ │ │ ├── be_ai_char.c
│ │ │ ├── be_ai_chat.c
│ │ │ ├── be_ai_gen.c
│ │ │ ├── be_ai_goal.c
│ │ │ ├── be_ai_move.c
│ │ │ ├── be_ai_weap.c
│ │ │ ├── be_ai_weight.c
│ │ │ ├── be_ai_weight.h
│ │ │ ├── be_ea.c
│ │ │ ├── be_interface.c
│ │ │ ├── be_interface.h
│ │ │ ├── l_crc.c
│ │ │ ├── l_crc.h
│ │ │ ├── l_libvar.c
│ │ │ ├── l_libvar.h
│ │ │ ├── l_log.c
│ │ │ ├── l_log.h
│ │ │ ├── l_memory.c
│ │ │ ├── l_memory.h
│ │ │ ├── l_precomp.c
│ │ │ ├── l_precomp.h
│ │ │ ├── l_script.c
│ │ │ ├── l_script.h
│ │ │ ├── l_struct.c
│ │ │ ├── l_struct.h
│ │ │ └── l_utils.h
│ │ ├── client/
│ │ │ ├── cl_cgame.c
│ │ │ ├── cl_cin.c
│ │ │ ├── cl_console.c
│ │ │ ├── cl_input.c
│ │ │ ├── cl_keys.c
│ │ │ ├── cl_main.c
│ │ │ ├── cl_net_chan.c
│ │ │ ├── cl_parse.c
│ │ │ ├── cl_scrn.c
│ │ │ ├── cl_ui.c
│ │ │ ├── client.h
│ │ │ ├── keys.h
│ │ │ ├── snd_adpcm.c
│ │ │ ├── snd_dma.c
│ │ │ ├── snd_local.h
│ │ │ ├── snd_mem.c
│ │ │ ├── snd_mix.c
│ │ │ ├── snd_public.h
│ │ │ └── snd_wavelet.c
│ │ ├── platform/
│ │ │ ├── resource.h
│ │ │ ├── win_gamma.c
│ │ │ ├── win_glimp.c
│ │ │ ├── win_input.c
│ │ │ ├── win_local.h
│ │ │ ├── win_main.c
│ │ │ ├── win_net.c
│ │ │ ├── win_qgl.c
│ │ │ ├── win_shared.c
│ │ │ ├── win_snd.c
│ │ │ ├── win_syscon.c
│ │ │ ├── win_wndproc.c
│ │ │ └── winquake.rc
│ │ ├── qcommon/
│ │ │ ├── cm_load.c
│ │ │ ├── cm_local.h
│ │ │ ├── cm_patch.c
│ │ │ ├── cm_patch.h
│ │ │ ├── cm_polylib.c
│ │ │ ├── cm_polylib.h
│ │ │ ├── cm_public.h
│ │ │ ├── cm_test.c
│ │ │ ├── cm_trace.c
│ │ │ ├── cmd.c
│ │ │ ├── common.c
│ │ │ ├── cvar.c
│ │ │ ├── files.c
│ │ │ ├── huffman.c
│ │ │ ├── md4.c
│ │ │ ├── msg.c
│ │ │ ├── net_chan.c
│ │ │ ├── qcommon.h
│ │ │ ├── qfiles.h
│ │ │ ├── unzip.c
│ │ │ ├── unzip.h
│ │ │ ├── vm.c
│ │ │ ├── vm_interpreted.c
│ │ │ └── vm_local.h
│ │ ├── renderer/
│ │ │ ├── dx.cpp
│ │ │ ├── dx.h
│ │ │ ├── jpeg/
│ │ │ │ ├── stb_image.h
│ │ │ │ └── tiny_jpeg.h
│ │ │ ├── qgl.h
│ │ │ ├── shaders/
│ │ │ │ ├── apply_gamma.comp
│ │ │ │ ├── compile.bat
│ │ │ │ ├── compile_hlsl.bat
│ │ │ │ ├── hlsl_compiled/
│ │ │ │ │ ├── multi_texture_add_ge80_ps.cpp
│ │ │ │ │ ├── multi_texture_add_gt0_ps.cpp
│ │ │ │ │ ├── multi_texture_add_lt80_ps.cpp
│ │ │ │ │ ├── multi_texture_add_ps.cpp
│ │ │ │ │ ├── multi_texture_clipping_plane_vs.cpp
│ │ │ │ │ ├── multi_texture_mul_ge80_ps.cpp
│ │ │ │ │ ├── multi_texture_mul_gt0_ps.cpp
│ │ │ │ │ ├── multi_texture_mul_lt80_ps.cpp
│ │ │ │ │ ├── multi_texture_mul_ps.cpp
│ │ │ │ │ ├── multi_texture_vs.cpp
│ │ │ │ │ ├── single_texture_clipping_plane_vs.cpp
│ │ │ │ │ ├── single_texture_ge80_ps.cpp
│ │ │ │ │ ├── single_texture_gt0_ps.cpp
│ │ │ │ │ ├── single_texture_lt80_ps.cpp
│ │ │ │ │ ├── single_texture_ps.cpp
│ │ │ │ │ └── single_texture_vs.cpp
│ │ │ │ ├── multi_texture.vert
│ │ │ │ ├── multi_texture_add.frag
│ │ │ │ ├── multi_texture_clipping_plane.vert
│ │ │ │ ├── multi_texture_mul.frag
│ │ │ │ ├── shaders.hlsl
│ │ │ │ ├── single_texture.frag
│ │ │ │ ├── single_texture.vert
│ │ │ │ ├── single_texture_clipping_plane.vert
│ │ │ │ └── spirv/
│ │ │ │ ├── apply_gamma_comp.cpp
│ │ │ │ ├── multi_texture_add_frag.cpp
│ │ │ │ ├── multi_texture_clipping_plane_vert.cpp
│ │ │ │ ├── multi_texture_mul_frag.cpp
│ │ │ │ ├── multi_texture_vert.cpp
│ │ │ │ ├── single_texture_clipping_plane_vert.cpp
│ │ │ │ ├── single_texture_frag.cpp
│ │ │ │ └── single_texture_vert.cpp
│ │ │ ├── tr_animation.c
│ │ │ ├── tr_backend.c
│ │ │ ├── tr_bsp.c
│ │ │ ├── tr_cmds.c
│ │ │ ├── tr_curve.c
│ │ │ ├── tr_font.c
│ │ │ ├── tr_image.c
│ │ │ ├── tr_init.c
│ │ │ ├── tr_light.c
│ │ │ ├── tr_local.h
│ │ │ ├── tr_main.c
│ │ │ ├── tr_marks.c
│ │ │ ├── tr_mesh.c
│ │ │ ├── tr_model.c
│ │ │ ├── tr_noise.c
│ │ │ ├── tr_public.h
│ │ │ ├── tr_scene.c
│ │ │ ├── tr_shade.c
│ │ │ ├── tr_shade_calc.c
│ │ │ ├── tr_shader.c
│ │ │ ├── tr_shadows.c
│ │ │ ├── tr_sky.c
│ │ │ ├── tr_surface.c
│ │ │ ├── tr_world.c
│ │ │ ├── vk.cpp
│ │ │ ├── vk.h
│ │ │ └── vulkan/
│ │ │ ├── GLSL.std.450.h
│ │ │ ├── spirv.h
│ │ │ ├── spirv.hpp
│ │ │ ├── spirv.hpp11
│ │ │ ├── spirv.json
│ │ │ ├── spirv.lua
│ │ │ ├── spirv.py
│ │ │ ├── vk_icd.h
│ │ │ ├── vk_layer.h
│ │ │ ├── vk_layer_dispatch_table.h
│ │ │ ├── vk_platform.h
│ │ │ ├── vk_sdk_platform.h
│ │ │ ├── vulkan.h
│ │ │ └── vulkan.hpp
│ │ └── server/
│ │ ├── server.h
│ │ ├── sv_bot.c
│ │ ├── sv_ccmds.c
│ │ ├── sv_client.c
│ │ ├── sv_game.c
│ │ ├── sv_init.c
│ │ ├── sv_main.c
│ │ ├── sv_net_chan.c
│ │ ├── sv_snapshot.c
│ │ └── sv_world.c
│ ├── game/
│ │ ├── ai_chat.c
│ │ ├── ai_chat.h
│ │ ├── ai_cmd.c
│ │ ├── ai_cmd.h
│ │ ├── ai_dmnet.c
│ │ ├── ai_dmnet.h
│ │ ├── ai_dmq3.c
│ │ ├── ai_dmq3.h
│ │ ├── ai_main.c
│ │ ├── ai_main.h
│ │ ├── ai_team.c
│ │ ├── ai_team.h
│ │ ├── ai_vcmd.c
│ │ ├── ai_vcmd.h
│ │ ├── be_aas.h
│ │ ├── be_ai_char.h
│ │ ├── be_ai_chat.h
│ │ ├── be_ai_gen.h
│ │ ├── be_ai_goal.h
│ │ ├── be_ai_move.h
│ │ ├── be_ai_weap.h
│ │ ├── be_ea.h
│ │ ├── bg_lib.c
│ │ ├── bg_lib.h
│ │ ├── bg_local.h
│ │ ├── bg_misc.c
│ │ ├── bg_pmove.c
│ │ ├── bg_public.h
│ │ ├── bg_slidemove.c
│ │ ├── botlib.h
│ │ ├── chars.h
│ │ ├── g_active.c
│ │ ├── g_arenas.c
│ │ ├── g_bot.c
│ │ ├── g_client.c
│ │ ├── g_cmds.c
│ │ ├── g_combat.c
│ │ ├── g_items.c
│ │ ├── g_local.h
│ │ ├── g_main.c
│ │ ├── g_mem.c
│ │ ├── g_misc.c
│ │ ├── g_missile.c
│ │ ├── g_mover.c
│ │ ├── g_public.h
│ │ ├── g_rankings.c
│ │ ├── g_rankings.h
│ │ ├── g_session.c
│ │ ├── g_spawn.c
│ │ ├── g_svcmds.c
│ │ ├── g_syscalls.asm
│ │ ├── g_syscalls.c
│ │ ├── g_target.c
│ │ ├── g_team.c
│ │ ├── g_team.h
│ │ ├── g_trigger.c
│ │ ├── g_utils.c
│ │ ├── g_weapon.c
│ │ ├── game.bat
│ │ ├── game.q3asm
│ │ ├── inv.h
│ │ ├── match.h
│ │ ├── menudef.h
│ │ ├── q_math.c
│ │ ├── q_shared.c
│ │ ├── q_shared.h
│ │ ├── surfaceflags.h
│ │ └── syn.h
│ └── q3_ui/
│ ├── keycodes.h
│ ├── q3_ui.bat
│ ├── q3_ui.q3asm
│ ├── ui_addbots.c
│ ├── ui_atoms.c
│ ├── ui_cdkey.c
│ ├── ui_cinematics.c
│ ├── ui_confirm.c
│ ├── ui_connect.c
│ ├── ui_controls2.c
│ ├── ui_credits.c
│ ├── ui_demo2.c
│ ├── ui_display.c
│ ├── ui_gameinfo.c
│ ├── ui_ingame.c
│ ├── ui_local.h
│ ├── ui_login.c
│ ├── ui_main.c
│ ├── ui_menu.c
│ ├── ui_mfield.c
│ ├── ui_mods.c
│ ├── ui_network.c
│ ├── ui_options.c
│ ├── ui_playermodel.c
│ ├── ui_players.c
│ ├── ui_playersettings.c
│ ├── ui_preferences.c
│ ├── ui_public.h
│ ├── ui_qmenu.c
│ ├── ui_rankings.c
│ ├── ui_rankstatus.c
│ ├── ui_removebots.c
│ ├── ui_serverinfo.c
│ ├── ui_servers2.c
│ ├── ui_setup.c
│ ├── ui_signup.c
│ ├── ui_sound.c
│ ├── ui_sparena.c
│ ├── ui_specifyleague.c
│ ├── ui_specifyserver.c
│ ├── ui_splevel.c
│ ├── ui_sppostgame.c
│ ├── ui_spreset.c
│ ├── ui_spskill.c
│ ├── ui_startserver.c
│ ├── ui_syscalls.asm
│ ├── ui_syscalls.c
│ ├── ui_team.c
│ ├── ui_teamorders.c
│ └── ui_video.c
├── tools/
│ └── bin2hex.cpp
└── visual-studio/
├── DeclareDPIAware.manifest
├── botlib.vcxproj
├── botlib.vcxproj.filters
├── cgame.def
├── cgame.vcxproj
├── cgame.vcxproj.filters
├── game.def
├── game.vcxproj
├── game.vcxproj.filters
├── props/
│ └── shared.props
├── q3_ui.vcxproj
├── q3_ui.vcxproj.filters
├── quake3.sln
├── quake3.vcxproj
├── quake3.vcxproj.filters
├── renderer.vcxproj
├── renderer.vcxproj.filters
└── ui.def
Showing preview only (1,218K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (8955 symbols across 258 files)
FILE: src/cgame/cg_consolecmds.c
function CG_TargetCommand_f (line 29) | void CG_TargetCommand_f( void ) {
function CG_SizeUp_f (line 51) | static void CG_SizeUp_f (void) {
function CG_SizeDown_f (line 63) | static void CG_SizeDown_f (void) {
function CG_Viewpos_f (line 75) | static void CG_Viewpos_f (void) {
function CG_ScoresDown_f (line 82) | static void CG_ScoresDown_f( void ) {
function CG_ScoresUp_f (line 102) | static void CG_ScoresUp_f( void ) {
function CG_TellTarget_f (line 109) | static void CG_TellTarget_f( void ) {
function CG_TellAttacker_f (line 124) | static void CG_TellAttacker_f( void ) {
function CG_VoiceTellTarget_f (line 139) | static void CG_VoiceTellTarget_f( void ) {
function CG_VoiceTellAttacker_f (line 154) | static void CG_VoiceTellAttacker_f( void ) {
function CG_StartOrbit_f (line 175) | static void CG_StartOrbit_f( void ) {
type consoleCommand_t (line 207) | typedef struct {
function qboolean (line 248) | qboolean CG_ConsoleCommand( void ) {
function CG_InitConsoleCommands (line 273) | void CG_InitConsoleCommands( void ) {
FILE: src/cgame/cg_draw.c
function CG_DrawField (line 44) | static void CG_DrawField (int x, int y, int width, int value) {
function CG_Draw3DModel (line 104) | void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model...
function CG_DrawHead (line 149) | void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec...
function CG_DrawFlagModel (line 196) | void CG_DrawFlagModel( float x, float y, float w, float h, int team, qbo...
function CG_DrawStatusBarHead (line 256) | static void CG_DrawStatusBarHead( float x ) {
function CG_DrawStatusBarFlag (line 313) | static void CG_DrawStatusBarFlag( float x, int team ) {
function CG_DrawTeamBackground (line 323) | void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int...
function CG_DrawStatusBar (line 350) | static void CG_DrawStatusBar( void ) {
function CG_DrawAttacker (line 492) | static float CG_DrawAttacker( float y ) {
function CG_DrawSnapshot (line 539) | static float CG_DrawSnapshot( float y ) {
function CG_DrawFPS (line 558) | static float CG_DrawFPS( float y ) {
function CG_DrawTimer (line 601) | static float CG_DrawTimer( float y ) {
function CG_DrawTeamOverlay (line 630) | static float CG_DrawTeamOverlay( float y, qboolean right, qboolean upper...
function CG_DrawUpperRight (line 804) | static void CG_DrawUpperRight( void ) {
function CG_DrawScores (line 842) | static float CG_DrawScores( float y ) {
function CG_DrawPowerups (line 993) | static float CG_DrawPowerups( float y ) {
function CG_DrawLowerRight (line 1093) | static void CG_DrawLowerRight( void ) {
function CG_DrawPickupItem (line 1111) | static int CG_DrawPickupItem( int y ) {
function CG_DrawLowerLeft (line 1142) | static void CG_DrawLowerLeft( void ) {
function CG_DrawTeamInfo (line 1163) | static void CG_DrawTeamInfo( void ) {
function CG_DrawHoldableItem (line 1234) | static void CG_DrawHoldableItem( void ) {
function CG_DrawReward (line 1250) | static void CG_DrawReward( void ) {
type lagometer_t (line 1329) | typedef struct {
function CG_AddLagometerFrameInfo (line 1346) | void CG_AddLagometerFrameInfo( void ) {
function CG_AddLagometerSnapshotInfo (line 1364) | void CG_AddLagometerSnapshotInfo( snapshot_t *snap ) {
function CG_DrawDisconnect (line 1385) | static void CG_DrawDisconnect( void ) {
function CG_DrawLagometer (line 1425) | static void CG_DrawLagometer( void ) {
function CG_CenterPrint (line 1546) | void CG_CenterPrint( const char *str, int y, int charWidth ) {
function CG_DrawCenterString (line 1571) | static void CG_DrawCenterString( void ) {
function CG_DrawCrosshair (line 1640) | static void CG_DrawCrosshair(void) {
function CG_ScanForCrosshairEntity (line 1701) | static void CG_ScanForCrosshairEntity( void ) {
function CG_DrawCrosshairNames (line 1737) | static void CG_DrawCrosshairNames( void ) {
function CG_DrawSpectator (line 1776) | static void CG_DrawSpectator(void) {
function CG_DrawVote (line 1791) | static void CG_DrawVote(void) {
function CG_DrawTeamVote (line 1818) | static void CG_DrawTeamVote(void) {
function qboolean (line 1849) | static qboolean CG_DrawScoreboard() {
function CG_DrawIntermission (line 1858) | static void CG_DrawIntermission( void ) {
function qboolean (line 1873) | static qboolean CG_DrawFollow( void ) {
function CG_DrawAmmoWarning (line 1905) | static void CG_DrawAmmoWarning( void ) {
function CG_DrawWarmup (line 1931) | static void CG_DrawWarmup( void ) {
function CG_Draw2D (line 2050) | static void CG_Draw2D( void ) {
function CG_DrawTourneyScoreboard (line 2112) | static void CG_DrawTourneyScoreboard() {
function CG_DrawActive (line 2123) | void CG_DrawActive( stereoFrame_t stereoView ) {
FILE: src/cgame/cg_drawtools.c
function CG_AdjustFrom640 (line 33) | void CG_AdjustFrom640( float *x, float *y, float *w, float *h ) {
function CG_FillRect (line 54) | void CG_FillRect( float x, float y, float width, float height, const flo...
function CG_DrawSides (line 70) | void CG_DrawSides(float x, float y, float w, float h, float size) {
function CG_DrawTopBottom (line 77) | void CG_DrawTopBottom(float x, float y, float w, float h, float size) {
function CG_DrawRect (line 90) | void CG_DrawRect( float x, float y, float width, float height, float siz...
function CG_DrawPic (line 108) | void CG_DrawPic( float x, float y, float width, float height, qhandle_t ...
function CG_DrawChar (line 122) | void CG_DrawChar( int x, int y, int width, int height, int ch ) {
function CG_DrawStringExt (line 164) | void CG_DrawStringExt( int x, int y, const char *string, const float *se...
function CG_DrawBigString (line 217) | void CG_DrawBigString( int x, int y, const char *s, float alpha ) {
function CG_DrawBigStringColor (line 225) | void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ) {
function CG_DrawSmallString (line 229) | void CG_DrawSmallString( int x, int y, const char *s, float alpha ) {
function CG_DrawSmallStringColor (line 237) | void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ) {
function CG_DrawStrlen (line 248) | int CG_DrawStrlen( const char *str ) {
function CG_TileClearBox (line 272) | static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShad...
function CG_TileClear (line 291) | void CG_TileClear( void ) {
function CG_GetColorForHealth (line 384) | void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ) {
function CG_ColorForHealth (line 427) | void CG_ColorForHealth( vec4_t hcolor ) {
function UI_DrawBannerString2 (line 596) | static void UI_DrawBannerString2( int x, int y, const char* str, vec4_t ...
function UI_DrawBannerString (line 639) | void UI_DrawBannerString( int x, int y, const char* str, int style, vec4...
function UI_ProportionalStringWidth (line 684) | int UI_ProportionalStringWidth( const char* str ) {
function UI_DrawProportionalString2 (line 706) | static void UI_DrawProportionalString2( int x, int y, const char* str, v...
function UI_ProportionalSizeScale (line 755) | float UI_ProportionalSizeScale( int style ) {
function UI_DrawProportionalString (line 769) | void UI_DrawProportionalString( int x, int y, const char* str, int style...
FILE: src/cgame/cg_effects.c
function CG_BubbleTrail (line 36) | void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ) {
function localEntity_t (line 99) | localEntity_t *CG_SmokePuff( const vec3_t p, const vec3_t vel,
function CG_SpawnEffect (line 165) | void CG_SpawnEffect( vec3_t org ) {
function CG_ScorePlum (line 196) | void CG_ScorePlum( int client, vec3_t org, int score ) {
function localEntity_t (line 242) | localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir,
function CG_Bleed (line 305) | void CG_Bleed( vec3_t origin, int entityNum ) {
function CG_LaunchGib (line 338) | void CG_LaunchGib( vec3_t origin, vec3_t velocity, qhandle_t hModel ) {
function CG_GibPlayer (line 373) | void CG_GibPlayer( vec3_t playerOrigin ) {
function CG_LaunchExplode (line 455) | void CG_LaunchExplode( vec3_t origin, vec3_t velocity, qhandle_t hModel ) {
function CG_BigExplode (line 490) | void CG_BigExplode( vec3_t playerOrigin ) {
FILE: src/cgame/cg_ents.c
function CG_PositionEntityOnTag (line 36) | void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *par...
function CG_PositionRotatedEntityOnTag (line 65) | void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity...
function CG_SetEntitySoundPosition (line 104) | void CG_SetEntitySoundPosition( centity_t *cent ) {
function CG_EntityEffects (line 124) | static void CG_EntityEffects( centity_t *cent ) {
function CG_General (line 162) | static void CG_General( centity_t *cent ) {
function CG_Speaker (line 205) | static void CG_Speaker( centity_t *cent ) {
function CG_Item (line 226) | static void CG_Item( centity_t *cent ) {
function CG_Missile (line 372) | static void CG_Missile( centity_t *cent ) {
function CG_Grapple (line 468) | static void CG_Grapple( centity_t *cent ) {
function CG_Mover (line 515) | static void CG_Mover( centity_t *cent ) {
function CG_Beam (line 558) | void CG_Beam( centity_t *cent ) {
function CG_Portal (line 583) | static void CG_Portal( centity_t *cent ) {
function CG_AdjustPositionForMover (line 618) | void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromT...
function CG_InterpolateEntityPosition (line 654) | static void CG_InterpolateEntityPosition( centity_t *cent ) {
function CG_CalcEntityLerpPositions (line 690) | static void CG_CalcEntityLerpPositions( centity_t *cent ) {
function CG_TeamBase (line 731) | static void CG_TeamBase( centity_t *cent ) {
function CG_AddCEntity (line 759) | static void CG_AddCEntity( centity_t *cent ) {
function CG_AddPacketEntities (line 818) | void CG_AddPacketEntities( void ) {
FILE: src/cgame/cg_event.c
function CG_Obituary (line 77) | static void CG_Obituary( entityState_t *ent ) {
function CG_UseItem (line 296) | static void CG_UseItem( centity_t *cent ) {
function CG_ItemPickup (line 347) | static void CG_ItemPickup( int itemNum ) {
function CG_PainEvent (line 370) | void CG_PainEvent( centity_t *cent, int health ) {
function CG_EntityEvent (line 406) | void CG_EntityEvent( centity_t *cent, vec3_t position ) {
function CG_CheckEvents (line 1006) | void CG_CheckEvents( centity_t *cent ) {
FILE: src/cgame/cg_info.c
function CG_DrawLoadingIcons (line 41) | static void CG_DrawLoadingIcons( void ) {
function CG_LoadingString (line 68) | void CG_LoadingString( const char *s ) {
function CG_LoadingItem (line 79) | void CG_LoadingItem( int itemNum ) {
function CG_LoadingClient (line 96) | void CG_LoadingClient( int clientNum ) {
function CG_DrawInformation (line 148) | void CG_DrawInformation( void ) {
FILE: src/cgame/cg_local.h
type footstep_t (line 89) | typedef enum {
type impactSound_t (line 101) | typedef enum {
type lerpFrame_t (line 118) | typedef struct {
type playerEntity_t (line 138) | typedef struct {
type centity_t (line 160) | typedef struct centity_s {
type markPoly_t (line 199) | typedef struct markPoly_s {
type leType_t (line 210) | typedef enum {
type leFlag_t (line 222) | typedef enum {
type leMarkType_t (line 229) | typedef enum {
type leBounceSoundType_t (line 235) | typedef enum {
type localEntity_t (line 241) | typedef struct localEntity_s {
type score_t (line 273) | typedef struct {
type clientInfo_t (line 298) | typedef struct {
type weaponInfo_t (line 368) | typedef struct weaponInfo_s {
type itemInfo_t (line 409) | typedef struct {
type powerupInfo_t (line 416) | typedef struct {
type skulltrail_t (line 423) | typedef struct {
type cg_t (line 439) | typedef struct {
type cgMedia_t (line 640) | typedef struct {
type cgs_t (line 902) | typedef struct {
type q3print_t (line 1527) | typedef enum {
FILE: src/cgame/cg_localents.c
function CG_InitLocalEntities (line 41) | void CG_InitLocalEntities( void ) {
function CG_FreeLocalEntity (line 59) | void CG_FreeLocalEntity( localEntity_t *le ) {
function localEntity_t (line 80) | localEntity_t *CG_AllocLocalEntity( void ) {
function CG_BloodTrail (line 121) | void CG_BloodTrail( localEntity_t *le ) {
function CG_FragmentBounceMark (line 156) | void CG_FragmentBounceMark( localEntity_t *le, trace_t *trace ) {
function CG_FragmentBounceSound (line 182) | void CG_FragmentBounceSound( localEntity_t *le, trace_t *trace ) {
function CG_ReflectVelocity (line 213) | void CG_ReflectVelocity( localEntity_t *le, trace_t *trace ) {
function CG_AddFragment (line 245) | void CG_AddFragment( localEntity_t *le ) {
function CG_AddFadeRGB (line 332) | void CG_AddFadeRGB( localEntity_t *le ) {
function CG_AddMoveScaleFade (line 354) | static void CG_AddMoveScaleFade( localEntity_t *le ) {
function CG_AddScaleFade (line 401) | static void CG_AddScaleFade( localEntity_t *le ) {
function CG_AddFallScaleFade (line 438) | static void CG_AddFallScaleFade( localEntity_t *le ) {
function CG_AddExplosion (line 474) | static void CG_AddExplosion( localEntity_t *ex ) {
function CG_AddSpriteExplosion (line 502) | static void CG_AddSpriteExplosion( localEntity_t *le ) {
function CG_AddScorePlum (line 546) | void CG_AddScorePlum( localEntity_t *le ) {
function CG_AddLocalEntities (line 636) | void CG_AddLocalEntities( void ) {
FILE: src/cgame/cg_main.c
function vmMain (line 40) | intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, in...
type cvarTable_t (line 176) | typedef struct {
function CG_RegisterCvars (line 286) | void CG_RegisterCvars( void ) {
function CG_ForceModelChange (line 313) | static void CG_ForceModelChange( void ) {
function CG_UpdateCvars (line 332) | void CG_UpdateCvars( void ) {
function CG_CrosshairPlayer (line 363) | int CG_CrosshairPlayer( void ) {
function CG_LastAttacker (line 370) | int CG_LastAttacker( void ) {
function CG_Printf (line 377) | void QDECL CG_Printf( const char *msg, ... ) {
function CG_Error (line 388) | void QDECL CG_Error( const char *msg, ... ) {
function Com_Error (line 402) | void QDECL Com_Error( int level, const char *error, ... ) {
function Com_Printf (line 413) | void QDECL Com_Printf( const char *msg, ... ) {
function CG_RegisterItemSounds (line 449) | static void CG_RegisterItemSounds( int itemNum ) {
function CG_RegisterSounds (line 498) | static void CG_RegisterSounds( void ) {
function CG_RegisterGraphics (line 659) | static void CG_RegisterGraphics( void ) {
function CG_BuildSpectatorString (line 868) | void CG_BuildSpectatorString() {
function CG_RegisterClients (line 889) | static void CG_RegisterClients( void ) {
function CG_StartMusic (line 934) | void CG_StartMusic( void ) {
function CG_Init (line 954) | void CG_Init( int serverMessageNum, int serverCommandSequence, int clien...
function CG_Shutdown (line 1052) | void CG_Shutdown( void ) {
function CG_EventHandling (line 1067) | void CG_EventHandling(int type) {
function CG_KeyEvent (line 1072) | void CG_KeyEvent(int key, qboolean down) {
function CG_MouseEvent (line 1075) | void CG_MouseEvent(int x, int y) {
FILE: src/cgame/cg_marks.c
function CG_InitMarkPolys (line 48) | void CG_InitMarkPolys( void ) {
function CG_FreeMarkPoly (line 67) | void CG_FreeMarkPoly( markPoly_t *le ) {
function markPoly_t (line 88) | markPoly_t *CG_AllocMark( void ) {
function CG_ImpactMark (line 130) | void CG_ImpactMark( qhandle_t markShader, const vec3_t origin, const vec...
function CG_AddMarks (line 233) | void CG_AddMarks( void ) {
type cparticle_t (line 301) | typedef struct particle_s
type particle_type_t (line 341) | typedef enum
function CG_ClearParticles (line 396) | void CG_ClearParticles (void)
function CG_AddParticleToScene (line 434) | void CG_AddParticleToScene (cparticle_t *p, vec3_t org, float alpha)
function CG_AddParticles (line 1079) | void CG_AddParticles (void)
function CG_ParticleSnowFlurry (line 1213) | void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent)
function CG_ParticleSnow (line 1281) | void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, ...
function CG_ParticleBubble (line 1338) | void CG_ParticleBubble (qhandle_t pshader, vec3_t origin, vec3_t origin2...
function CG_ParticleSmoke (line 1399) | void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent)
function CG_ParticleBulletDebris (line 1447) | void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration)
function CG_ParticleExplosion (line 1494) | void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int...
function CG_AddParticleShrapnel (line 1548) | void CG_AddParticleShrapnel (localEntity_t *le)
function CG_NewParticleArea (line 1554) | int CG_NewParticleArea (int num)
function CG_SnowLink (line 1625) | void CG_SnowLink (centity_t *cent, qboolean particleOn)
function CG_ParticleImpactSmokePuff (line 1650) | void CG_ParticleImpactSmokePuff (qhandle_t pshader, vec3_t origin)
function CG_Particle_Bleed (line 1690) | void CG_Particle_Bleed (qhandle_t pshader, vec3_t start, vec3_t dir, int...
function CG_Particle_OilParticle (line 1740) | void CG_Particle_OilParticle (qhandle_t pshader, centity_t *cent)
function CG_Particle_OilSlick (line 1804) | void CG_Particle_OilSlick (qhandle_t pshader, centity_t *cent)
function CG_OilSlickRemove (line 1870) | void CG_OilSlickRemove (centity_t *cent)
function qboolean (line 1898) | qboolean ValidBloodPool (vec3_t start)
function CG_BloodPool (line 1944) | void CG_BloodPool (localEntity_t *le, qhandle_t pshader, trace_t *tr)
function CG_ParticleBloodCloud (line 2007) | void CG_ParticleBloodCloud (centity_t *cent, vec3_t origin, vec3_t dir)
function CG_ParticleSparks (line 2084) | void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, f...
function CG_ParticleDust (line 2132) | void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir)
function CG_ParticleMisc (line 2228) | void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int du...
FILE: src/cgame/cg_particles.c
type cparticle_t (line 31) | typedef struct particle_s
type particle_type_t (line 71) | typedef enum
function CG_ClearParticles (line 141) | void CG_ClearParticles (void)
function CG_AddParticleToScene (line 179) | void CG_AddParticleToScene (cparticle_t *p, vec3_t org, float alpha)
function CG_AddParticles (line 830) | void CG_AddParticles (void)
function CG_ParticleSnowFlurry (line 964) | void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent)
function CG_ParticleSnow (line 1032) | void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, ...
function CG_ParticleBubble (line 1089) | void CG_ParticleBubble (qhandle_t pshader, vec3_t origin, vec3_t origin2...
function CG_ParticleSmoke (line 1150) | void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent)
function CG_ParticleBulletDebris (line 1198) | void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration)
function CG_ParticleExplosion (line 1245) | void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int...
function CG_AddParticleShrapnel (line 1299) | void CG_AddParticleShrapnel (localEntity_t *le)
function CG_NewParticleArea (line 1305) | int CG_NewParticleArea (int num)
function CG_SnowLink (line 1376) | void CG_SnowLink (centity_t *cent, qboolean particleOn)
function CG_ParticleImpactSmokePuff (line 1401) | void CG_ParticleImpactSmokePuff (qhandle_t pshader, vec3_t origin)
function CG_Particle_Bleed (line 1441) | void CG_Particle_Bleed (qhandle_t pshader, vec3_t start, vec3_t dir, int...
function CG_Particle_OilParticle (line 1491) | void CG_Particle_OilParticle (qhandle_t pshader, centity_t *cent)
function CG_Particle_OilSlick (line 1555) | void CG_Particle_OilSlick (qhandle_t pshader, centity_t *cent)
function CG_OilSlickRemove (line 1621) | void CG_OilSlickRemove (centity_t *cent)
function qboolean (line 1649) | qboolean ValidBloodPool (vec3_t start)
function CG_BloodPool (line 1695) | void CG_BloodPool (localEntity_t *le, qhandle_t pshader, trace_t *tr)
function CG_ParticleBloodCloud (line 1758) | void CG_ParticleBloodCloud (centity_t *cent, vec3_t origin, vec3_t dir)
function CG_ParticleSparks (line 1835) | void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, f...
function CG_ParticleDust (line 1883) | void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir)
function CG_ParticleMisc (line 1979) | void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int du...
FILE: src/cgame/cg_players.c
function sfxHandle_t (line 49) | sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ) {
function qboolean (line 90) | static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_...
function qboolean (line 297) | static qboolean CG_FileExists(const char *filename) {
function qboolean (line 312) | static qboolean CG_FindClientModelFile( char *filename, int length, clie...
function qboolean (line 387) | static qboolean CG_FindClientHeadFile( char *filename, int length, clien...
function qboolean (line 463) | static qboolean CG_RegisterClientSkin( clientInfo_t *ci, const char *tea...
function qboolean (line 521) | static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char...
function CG_ColorFromString (line 620) | static void CG_ColorFromString( const char *v, vec3_t color ) {
function CG_LoadClientInfo (line 651) | static void CG_LoadClientInfo( clientInfo_t *ci ) {
function CG_CopyClientInfoModel (line 730) | static void CG_CopyClientInfoModel( clientInfo_t *from, clientInfo_t *to...
function qboolean (line 754) | static qboolean CG_ScanForExistingClientInfo( clientInfo_t *ci ) {
function CG_SetDeferredClientInfo (line 795) | static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
function CG_NewClientInfo (line 865) | void CG_NewClientInfo( int clientNum ) {
function CG_LoadDeferredPlayers (line 1054) | void CG_LoadDeferredPlayers( void ) {
function CG_SetLerpFrameAnimation (line 1089) | static void CG_SetLerpFrameAnimation( clientInfo_t *ci, lerpFrame_t *lf,...
function CG_RunLerpFrame (line 1117) | static void CG_RunLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int newA...
function CG_ClearLerpFrame (line 1205) | static void CG_ClearLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int an...
function CG_PlayerAnimation (line 1217) | static void CG_PlayerAnimation( centity_t *cent, int *legsOld, int *legs...
function CG_SwingAngles (line 1269) | static void CG_SwingAngles( float destination, float swingTolerance, flo...
function CG_AddPainTwitch (line 1330) | static void CG_AddPainTwitch( centity_t *cent, vec3_t torsoAngles ) {
function CG_PlayerAngles (line 1363) | static void CG_PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t tor...
function CG_HasteTrail (line 1479) | static void CG_HasteTrail( centity_t *cent ) {
function CG_TrailItem (line 1518) | static void CG_TrailItem( centity_t *cent, qhandle_t hModel ) {
function CG_PlayerFlag (line 1544) | static void CG_PlayerFlag( centity_t *cent, qhandle_t hSkin, refEntity_t...
function CG_PlayerPowerups (line 1661) | static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) {
function CG_PlayerFloatSprite (line 1728) | static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) {
function CG_PlayerSprites (line 1761) | static void CG_PlayerSprites( centity_t *cent ) {
function qboolean (line 1825) | static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) {
function CG_PlayerSplash (line 1880) | static void CG_PlayerSplash( centity_t *cent ) {
function CG_AddRefEntityWithPowerups (line 1970) | void CG_AddRefEntityWithPowerups( refEntity_t *ent, entityState_t *state...
function CG_LightVerts (line 2014) | int CG_LightVerts( vec3_t normal, int numVerts, polyVert_t *verts )
function CG_Player (line 2061) | void CG_Player( centity_t *cent ) {
function CG_ResetPlayerEntity (line 2200) | void CG_ResetPlayerEntity( centity_t *cent ) {
FILE: src/cgame/cg_playerstate.c
function CG_CheckAmmo (line 37) | void CG_CheckAmmo( void ) {
function CG_DamageFeedback (line 86) | void CG_DamageFeedback( int yawByte, int pitchByte, int damage ) {
function CG_Respawn (line 188) | void CG_Respawn( void ) {
function CG_CheckPlayerstateEvents (line 206) | void CG_CheckPlayerstateEvents( playerState_t *ps, playerState_t *ops ) {
function CG_CheckChangedPredictableEvents (line 244) | void CG_CheckChangedPredictableEvents( playerState_t *ps ) {
function pushReward (line 280) | static void pushReward(sfxHandle_t sfx, qhandle_t shader, int rewardCoun...
function CG_CheckLocalSounds (line 294) | void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
function CG_TransitionPlayerState (line 449) | void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) {
FILE: src/cgame/cg_predict.c
function CG_BuildSolidList (line 46) | void CG_BuildSolidList( void ) {
function CG_ClipMoveToEntities (line 85) | static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t min...
function CG_Trace (line 145) | void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, c...
function CG_PointContents (line 162) | int CG_PointContents( const vec3_t point, int passEntityNum ) {
function CG_InterpolatePlayerState (line 204) | static void CG_InterpolatePlayerState( qboolean grabAngles ) {
function CG_TouchItem (line 261) | static void CG_TouchItem( centity_t *cent ) {
function CG_TouchTriggerPrediction (line 319) | static void CG_TouchTriggerPrediction( void ) {
function CG_PredictPlayerState (line 405) | void CG_PredictPlayerState( void ) {
FILE: src/cgame/cg_public.h
type snapshot_t (line 39) | typedef struct {
type cgameImport_t (line 74) | typedef enum {
type cgameExport_t (line 197) | typedef enum {
FILE: src/cgame/cg_scoreboard.c
function CG_DrawClientScore (line 81) | static void CG_DrawClientScore( int y, score_t *score, float *color, flo...
function CG_TeamScoreboard (line 221) | static int CG_TeamScoreboard( int y, team_t team, float fade, int maxCli...
function qboolean (line 255) | qboolean CG_DrawOldScoreboard( void ) {
function CG_CenterGiantLine (line 420) | static void CG_CenterGiantLine( float y, const char *string ) {
function CG_DrawOldTourneyScoreboard (line 441) | void CG_DrawOldTourneyScoreboard( void ) {
FILE: src/cgame/cg_servercmds.c
function CG_ParseScores (line 35) | static void CG_ParseScores( void ) {
function CG_ParseTeamInfo (line 80) | static void CG_ParseTeamInfo( void ) {
function CG_ParseServerinfo (line 108) | void CG_ParseServerinfo( void ) {
function CG_ParseWarmup (line 134) | static void CG_ParseWarmup( void ) {
function CG_SetConfigValues (line 161) | void CG_SetConfigValues( void ) {
function CG_ShaderStateChanged (line 180) | void CG_ShaderStateChanged(void) {
function CG_ConfigStringModified (line 221) | static void CG_ConfigStringModified( void ) {
function CG_AddToTeamChat (line 300) | static void CG_AddToTeamChat( const char *str ) {
function CG_MapRestart (line 378) | static void CG_MapRestart( void ) {
type voiceChat_t (line 419) | typedef struct voiceChat_s
type voiceChatList_t (line 427) | typedef struct voiceChatList_s
type headModelVoiceChat_t (line 435) | typedef struct headModelVoiceChat_s
function CG_ParseVoiceChats (line 449) | int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChat...
function CG_LoadVoiceChats (line 550) | void CG_LoadVoiceChats( void ) {
function CG_HeadModelVoiceChats (line 570) | int CG_HeadModelVoiceChats( char *filename ) {
function CG_GetVoiceChat (line 617) | int CG_GetVoiceChat( voiceChatList_t *voiceChatList, const char *id, sfx...
function voiceChatList_t (line 636) | voiceChatList_t *CG_VoiceChatListForClient( int clientNum ) {
type bufferedVoiceChat_t (line 725) | typedef struct bufferedVoiceChat_s
function CG_PlayVoiceChat (line 741) | void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
function CG_PlayBufferedVoiceChats (line 749) | void CG_PlayBufferedVoiceChats( void ) {
function CG_AddBufferedVoiceChat (line 757) | void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) {
function CG_VoiceChatLocal (line 765) | void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int...
function CG_VoiceChat (line 773) | void CG_VoiceChat( int mode ) {
function CG_RemoveChatEscapeChar (line 781) | static void CG_RemoveChatEscapeChar( char *text ) {
function CG_ServerCommand (line 801) | static void CG_ServerCommand( void ) {
function CG_ExecuteNewServerCommands (line 906) | void CG_ExecuteNewServerCommands( int latestSequence ) {
FILE: src/cgame/cg_snapshot.c
function CG_ResetEntity (line 35) | static void CG_ResetEntity( centity_t *cent ) {
function CG_TransitionEntity (line 58) | static void CG_TransitionEntity( centity_t *cent ) {
function CG_SetInitialSnapshot (line 86) | void CG_SetInitialSnapshot( snapshot_t *snap ) {
function CG_TransitionSnapshot (line 128) | static void CG_TransitionSnapshot( void ) {
function CG_SetNextSnap (line 199) | static void CG_SetNextSnap( snapshot_t *snap ) {
function snapshot_t (line 259) | static snapshot_t *CG_ReadNextSnapshot( void ) {
function CG_ProcessSnapshots (line 327) | void CG_ProcessSnapshots( void ) {
FILE: src/cgame/cg_syscalls.c
function dllEntry (line 34) | void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) {
function PASSFLOAT (line 39) | int PASSFLOAT( float x ) {
function trap_Print (line 45) | void trap_Print( const char *fmt ) {
function trap_Error (line 49) | void trap_Error( const char *fmt ) {
function trap_Milliseconds (line 53) | int trap_Milliseconds( void ) {
function trap_Cvar_Register (line 57) | void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const ch...
function trap_Cvar_Update (line 61) | void trap_Cvar_Update( vmCvar_t *vmCvar ) {
function trap_Cvar_Set (line 65) | void trap_Cvar_Set( const char *var_name, const char *value ) {
function trap_Cvar_VariableStringBuffer (line 69) | void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer,...
function trap_Argc (line 73) | int trap_Argc( void ) {
function trap_Argv (line 77) | void trap_Argv( int n, char *buffer, int bufferLength ) {
function trap_Args (line 81) | void trap_Args( char *buffer, int bufferLength ) {
function trap_FS_FOpenFile (line 85) | int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mod...
function trap_FS_Read (line 89) | void trap_FS_Read( void *buffer, int len, fileHandle_t f ) {
function trap_FS_Write (line 93) | void trap_FS_Write( const void *buffer, int len, fileHandle_t f ) {
function trap_FS_FCloseFile (line 97) | void trap_FS_FCloseFile( fileHandle_t f ) {
function trap_FS_Seek (line 101) | int trap_FS_Seek( fileHandle_t f, long offset, int origin ) {
function trap_SendConsoleCommand (line 105) | void trap_SendConsoleCommand( const char *text ) {
function trap_AddCommand (line 109) | void trap_AddCommand( const char *cmdName ) {
function trap_RemoveCommand (line 113) | void trap_RemoveCommand( const char *cmdName ) {
function trap_SendClientCommand (line 117) | void trap_SendClientCommand( const char *s ) {
function trap_UpdateScreen (line 121) | void trap_UpdateScreen( void ) {
function trap_CM_LoadMap (line 125) | void trap_CM_LoadMap( const char *mapname ) {
function trap_CM_NumInlineModels (line 129) | int trap_CM_NumInlineModels( void ) {
function clipHandle_t (line 133) | clipHandle_t trap_CM_InlineModel( int index ) {
function clipHandle_t (line 137) | clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ) {
function clipHandle_t (line 141) | clipHandle_t trap_CM_TempCapsuleModel( const vec3_t mins, const vec3_t m...
function trap_CM_PointContents (line 145) | int trap_CM_PointContents( const vec3_t p, clipHandle_t model ) {
function trap_CM_TransformedPointContents (line 149) | int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t mode...
function trap_CM_BoxTrace (line 153) | void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_...
function trap_CM_CapsuleTrace (line 159) | void trap_CM_CapsuleTrace( trace_t *results, const vec3_t start, const v...
function trap_CM_TransformedBoxTrace (line 165) | void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, ...
function trap_CM_TransformedCapsuleTrace (line 172) | void trap_CM_TransformedCapsuleTrace( trace_t *results, const vec3_t sta...
function trap_CM_MarkFragments (line 179) | int trap_CM_MarkFragments( int numPoints, const vec3_t *points,
function trap_S_StartSound (line 186) | void trap_S_StartSound( vec3_t origin, int entityNum, int entchannel, sf...
function trap_S_StartLocalSound (line 190) | void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ) {
function trap_S_ClearLoopingSounds (line 194) | void trap_S_ClearLoopingSounds( qboolean killall ) {
function trap_S_AddLoopingSound (line 198) | void trap_S_AddLoopingSound( int entityNum, const vec3_t origin, const v...
function trap_S_AddRealLoopingSound (line 202) | void trap_S_AddRealLoopingSound( int entityNum, const vec3_t origin, con...
function trap_S_StopLoopingSound (line 206) | void trap_S_StopLoopingSound( int entityNum ) {
function trap_S_UpdateEntityPosition (line 210) | void trap_S_UpdateEntityPosition( int entityNum, const vec3_t origin ) {
function trap_S_Respatialize (line 214) | void trap_S_Respatialize( int entityNum, const vec3_t origin, vec3_t axi...
function sfxHandle_t (line 218) | sfxHandle_t trap_S_RegisterSound( const char *sample, qboolean compresse...
function trap_S_StartBackgroundTrack (line 222) | void trap_S_StartBackgroundTrack( const char *intro, const char *loop ) {
function trap_R_LoadWorldMap (line 226) | void trap_R_LoadWorldMap( const char *mapname ) {
function qhandle_t (line 230) | qhandle_t trap_R_RegisterModel( const char *name ) {
function qhandle_t (line 234) | qhandle_t trap_R_RegisterSkin( const char *name ) {
function qhandle_t (line 238) | qhandle_t trap_R_RegisterShader( const char *name ) {
function qhandle_t (line 242) | qhandle_t trap_R_RegisterShaderNoMip( const char *name ) {
function trap_R_RegisterFont (line 246) | void trap_R_RegisterFont(const char *fontName, int pointSize, fontInfo_t...
function trap_R_ClearScene (line 250) | void trap_R_ClearScene( void ) {
function trap_R_AddRefEntityToScene (line 254) | void trap_R_AddRefEntityToScene( const refEntity_t *re ) {
function trap_R_AddPolyToScene (line 258) | void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const poly...
function trap_R_AddPolysToScene (line 262) | void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const pol...
function trap_R_LightForPoint (line 266) | int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t dir...
function trap_R_AddLightToScene (line 270) | void trap_R_AddLightToScene( const vec3_t org, float intensity, float r,...
function trap_R_AddAdditiveLightToScene (line 274) | void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, ...
function trap_R_RenderScene (line 278) | void trap_R_RenderScene( const refdef_t *fd ) {
function trap_R_SetColor (line 282) | void trap_R_SetColor( const float *rgba ) {
function trap_R_DrawStretchPic (line 286) | void trap_R_DrawStretchPic( float x, float y, float w, float h,
function trap_R_ModelBounds (line 291) | void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ) {
function trap_R_LerpTag (line 295) | int trap_R_LerpTag( orientation_t *tag, clipHandle_t mod, int startFram...
function trap_R_RemapShader (line 300) | void trap_R_RemapShader( const char *oldShader, const char *newShader, c...
function trap_GetGlconfig (line 304) | void trap_GetGlconfig( glconfig_t *glconfig ) {
function trap_GetGameState (line 308) | void trap_GetGameState( gameState_t *gamestate ) {
function trap_GetCurrentSnapshotNumber (line 312) | void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTim...
function qboolean (line 316) | qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ) {
function qboolean (line 320) | qboolean trap_GetServerCommand( int serverCommandNumber ) {
function trap_GetCurrentCmdNumber (line 324) | int trap_GetCurrentCmdNumber( void ) {
function qboolean (line 328) | qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd ) {
function trap_SetUserCmdValue (line 332) | void trap_SetUserCmdValue( int stateValue, float sensitivityScale ) {
function testPrintInt (line 336) | void testPrintInt( char *string, int i ) {
function testPrintFloat (line 340) | void testPrintFloat( char *string, float f ) {
function trap_MemoryRemaining (line 344) | int trap_MemoryRemaining( void ) {
function qboolean (line 348) | qboolean trap_Key_IsDown( int keynum ) {
function trap_Key_GetCatcher (line 352) | int trap_Key_GetCatcher( void ) {
function trap_Key_SetCatcher (line 356) | void trap_Key_SetCatcher( int catcher ) {
function trap_Key_GetKey (line 360) | int trap_Key_GetKey( const char *binding ) {
function trap_PC_AddGlobalDefine (line 364) | int trap_PC_AddGlobalDefine( char *define ) {
function trap_PC_LoadSource (line 368) | int trap_PC_LoadSource( const char *filename ) {
function trap_PC_FreeSource (line 372) | int trap_PC_FreeSource( int handle ) {
function trap_PC_ReadToken (line 376) | int trap_PC_ReadToken( int handle, pc_token_t *pc_token ) {
function trap_PC_SourceFileAndLine (line 380) | int trap_PC_SourceFileAndLine( int handle, char *filename, int *line ) {
function trap_S_StopBackgroundTrack (line 384) | void trap_S_StopBackgroundTrack( void ) {
function trap_RealTime (line 388) | int trap_RealTime(qtime_t *qtime) {
function trap_SnapVector (line 392) | void trap_SnapVector( float *v ) {
function trap_CIN_PlayCinematic (line 397) | int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int wi...
function e_status (line 403) | e_status trap_CIN_StopCinematic(int handle) {
function e_status (line 409) | e_status trap_CIN_RunCinematic (int handle) {
function trap_CIN_DrawCinematic (line 415) | void trap_CIN_DrawCinematic (int handle) {
function trap_CIN_SetExtents (line 421) | void trap_CIN_SetExtents (int handle, int x, int y, int w, int h) {
function qboolean (line 439) | qboolean trap_GetEntityToken( char *buffer, int bufferSize ) {
function qboolean (line 443) | qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2 ) {
FILE: src/cgame/cg_view.c
function CG_TestModel_f (line 71) | void CG_TestModel_f (void) {
function CG_TestGun_f (line 109) | void CG_TestGun_f (void) {
function CG_TestModelNextFrame_f (line 116) | void CG_TestModelNextFrame_f (void) {
function CG_TestModelPrevFrame_f (line 121) | void CG_TestModelPrevFrame_f (void) {
function CG_TestModelNextSkin_f (line 129) | void CG_TestModelNextSkin_f (void) {
function CG_TestModelPrevSkin_f (line 134) | void CG_TestModelPrevSkin_f (void) {
function CG_AddTestModel (line 142) | static void CG_AddTestModel (void) {
function CG_CalcVrect (line 182) | static void CG_CalcVrect (void) {
function CG_OffsetThirdPersonView (line 221) | static void CG_OffsetThirdPersonView( void ) {
function CG_StepOffset (line 294) | static void CG_StepOffset( void ) {
function CG_OffsetFirstPersonView (line 311) | static void CG_OffsetFirstPersonView( void ) {
function CG_ZoomDown_f (line 445) | void CG_ZoomDown_f( void ) {
function CG_ZoomUp_f (line 453) | void CG_ZoomUp_f( void ) {
function CG_CalcFov (line 472) | static int CG_CalcFov( void ) {
function CG_DamageBlendBlob (line 563) | static void CG_DamageBlendBlob( void ) {
function CG_CalcViewValues (line 608) | static int CG_CalcViewValues( void ) {
function CG_PowerupTimerSounds (line 697) | static void CG_PowerupTimerSounds( void ) {
function CG_AddBufferedSound (line 721) | void CG_AddBufferedSound( sfxHandle_t sfx ) {
function CG_PlayBufferedSounds (line 736) | static void CG_PlayBufferedSounds( void ) {
function CG_DrawActiveFrame (line 756) | void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qbool...
FILE: src/cgame/cg_weapons.c
function CG_MachineGunEjectBrass (line 31) | static void CG_MachineGunEjectBrass( centity_t *cent ) {
function CG_ShotgunEjectBrass (line 103) | static void CG_ShotgunEjectBrass( centity_t *cent ) {
function CG_RailTrail (line 180) | void CG_RailTrail (clientInfo_t *ci, vec3_t start, vec3_t end) {
function CG_RocketTrail (line 290) | static void CG_RocketTrail( centity_t *ent, const weaponInfo_t *wi ) {
function CG_PlasmaTrail (line 357) | static void CG_PlasmaTrail( centity_t *cent, const weaponInfo_t *wi ) {
function CG_GrappleTrail (line 452) | void CG_GrappleTrail( centity_t *ent, const weaponInfo_t *wi ) {
function CG_GrenadeTrail (line 490) | static void CG_GrenadeTrail( centity_t *ent, const weaponInfo_t *wi ) {
function CG_RegisterWeapon (line 502) | void CG_RegisterWeapon( int weaponNum ) {
function CG_RegisterItemVisuals (line 691) | void CG_RegisterItemVisuals( int itemNum ) {
function CG_MapTorsoToWeaponFrame (line 743) | static int CG_MapTorsoToWeaponFrame( clientInfo_t *ci, int frame ) {
function CG_CalculateWeaponPosition (line 772) | static void CG_CalculateWeaponPosition( vec3_t origin, vec3_t angles ) {
function CG_LightningBolt (line 831) | static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
function CG_SpawnRailTrail (line 991) | static void CG_SpawnRailTrail( centity_t *cent, vec3_t origin ) {
function CG_MachinegunSpinAngle (line 1013) | static float CG_MachinegunSpinAngle( centity_t *cent ) {
function CG_AddWeaponWithPowerups (line 1045) | static void CG_AddWeaponWithPowerups( refEntity_t *gun, int powerups ) {
function CG_AddPlayerWeapon (line 1074) | void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity...
function CG_AddViewWeapon (line 1223) | void CG_AddViewWeapon( playerState_t *ps ) {
function CG_DrawWeaponSelect (line 1319) | void CG_DrawWeaponSelect( void ) {
function qboolean (line 1395) | static qboolean CG_WeaponSelectable( int i ) {
function CG_NextWeapon_f (line 1411) | void CG_NextWeapon_f( void ) {
function CG_PrevWeapon_f (line 1447) | void CG_PrevWeapon_f( void ) {
function CG_Weapon_f (line 1483) | void CG_Weapon_f( void ) {
function CG_OutOfAmmoChange (line 1515) | void CG_OutOfAmmoChange( void ) {
function CG_FireWeapon (line 1545) | void CG_FireWeapon( centity_t *cent ) {
function CG_MissileHitWall (line 1604) | void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t...
function CG_MissileHitPlayer (line 1765) | void CG_MissileHitPlayer( int weapon, vec3_t origin, vec3_t dir, int ent...
function CG_ShotgunPellet (line 1795) | static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum ) {
function CG_ShotgunPattern (line 1848) | static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int seed, ...
function CG_ShotgunFire (line 1877) | void CG_ShotgunFire( entityState_t *es ) {
function CG_Tracer (line 1909) | void CG_Tracer( vec3_t source, vec3_t dest ) {
function qboolean (line 1989) | static qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ) {
function CG_Bullet (line 2030) | void CG_Bullet( vec3_t end, int sourceEntityNum, vec3_t normal, qboolean...
FILE: src/cgame/tr_types.h
type polyVert_t (line 49) | typedef struct {
type poly_t (line 55) | typedef struct poly_s {
type refEntityType_t (line 61) | typedef enum {
type refEntity_t (line 74) | typedef struct {
type refdef_t (line 113) | typedef struct {
type stereoFrame_t (line 132) | typedef enum {
type textureCompression_t (line 146) | typedef enum {
type glDriverType_t (line 155) | typedef enum {
type glHardwareType_t (line 163) | typedef enum {
type glconfig_t (line 168) | typedef struct {
FILE: src/engine/botlib/aasfile.h
type aas_bbox_t (line 118) | typedef struct aas_bbox_s
type aas_reachability_t (line 128) | typedef struct aas_reachability_s
type aas_areasettings_t (line 140) | typedef struct aas_areasettings_s
type aas_portal_t (line 153) | typedef struct aas_portal_s
type aas_portalindex_t (line 162) | typedef int aas_portalindex_t;
type aas_cluster_t (line 165) | typedef struct aas_cluster_s
type vec3_t (line 175) | typedef vec3_t aas_vertex_t;
type aas_plane_t (line 178) | typedef struct aas_plane_s
type aas_edge_t (line 186) | typedef struct aas_edge_s
type aas_edgeindex_t (line 192) | typedef int aas_edgeindex_t;
type aas_face_t (line 195) | typedef struct aas_face_s
type aas_faceindex_t (line 206) | typedef int aas_faceindex_t;
type aas_area_t (line 209) | typedef struct aas_area_s
type aas_node_t (line 221) | typedef struct aas_node_s
type aas_lump_t (line 231) | typedef struct
type aas_header_t (line 238) | typedef struct aas_header_s
FILE: src/engine/botlib/be_aas_bspq3.c
type rgb_t (line 52) | typedef struct rgb_s
type bsp_epair_t (line 60) | typedef struct bsp_epair_s
type bsp_entity_t (line 68) | typedef struct bsp_entity_s
type bsp_t (line 74) | typedef struct bsp_s
type cname_t (line 91) | typedef struct cname_s
function PrintContents (line 126) | void PrintContents(int contents)
function bsp_trace_t (line 147) | bsp_trace_t AAS_Trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end...
function AAS_PointContents (line 160) | int AAS_PointContents(vec3_t point)
function qboolean (line 170) | qboolean AAS_EntityCollision(int entnum,
function qboolean (line 191) | qboolean AAS_inPVS(vec3_t p1, vec3_t p2)
function qboolean (line 202) | qboolean AAS_inPHS(vec3_t p1, vec3_t p2)
function AAS_BSPModelMinsMaxsOrigin (line 212) | void AAS_BSPModelMinsMaxsOrigin(int modelnum, vec3_t angles, vec3_t mins...
function AAS_UnlinkFromBSPLeaves (line 223) | void AAS_UnlinkFromBSPLeaves(bsp_link_t *leaves)
function bsp_link_t (line 232) | bsp_link_t *AAS_BSPLinkEntity(vec3_t absmins, vec3_t absmaxs, int entnum...
function AAS_BoxEntities (line 242) | int AAS_BoxEntities(vec3_t absmins, vec3_t absmaxs, int *list, int maxco...
function AAS_NextBSPEntity (line 252) | int AAS_NextBSPEntity(int ent)
function AAS_BSPEntityInRange (line 264) | int AAS_BSPEntityInRange(int ent)
function AAS_ValueForBSPEpairKey (line 279) | int AAS_ValueForBSPEpairKey(int ent, char *key, char *value, int size)
function AAS_VectorForBSPEpairKey (line 302) | int AAS_VectorForBSPEpairKey(int ent, char *key, vec3_t v)
function AAS_FloatForBSPEpairKey (line 323) | int AAS_FloatForBSPEpairKey(int ent, char *key, float *value)
function AAS_IntForBSPEpairKey (line 338) | int AAS_IntForBSPEpairKey(int ent, char *key, int *value)
function AAS_FreeBSPEntities (line 353) | void AAS_FreeBSPEntities(void)
function AAS_ParseBSPEntities (line 379) | void AAS_ParseBSPEntities(void)
function AAS_BSPTraceLight (line 450) | int AAS_BSPTraceLight(vec3_t start, vec3_t end, vec3_t endpos, int *red,...
function AAS_DumpBSPData (line 460) | void AAS_DumpBSPData(void)
function AAS_LoadBSPFile (line 478) | int AAS_LoadBSPFile(void)
FILE: src/engine/botlib/be_aas_cluster.c
function AAS_RemoveClusterAreas (line 63) | void AAS_RemoveClusterAreas(void)
function AAS_ClearCluster (line 78) | void AAS_ClearCluster(int clusternum)
function AAS_RemovePortalsClusterReference (line 96) | void AAS_RemovePortalsClusterReference(int clusternum)
function AAS_UpdatePortal (line 118) | int AAS_UpdatePortal(int areanum, int clusternum)
function AAS_FloodClusterAreas_r (line 177) | int AAS_FloodClusterAreas_r(int areanum, int clusternum)
function AAS_FloodClusterAreasUsingReachabilities (line 250) | int AAS_FloodClusterAreasUsingReachabilities(int clusternum)
function AAS_NumberClusterPortals (line 288) | void AAS_NumberClusterPortals(int clusternum)
function AAS_NumberClusterAreas (line 315) | void AAS_NumberClusterAreas(int clusternum)
function AAS_FindClusters (line 389) | int AAS_FindClusters(void)
function AAS_CreatePortals (line 439) | void AAS_CreatePortals(void)
function AAS_ConnectedAreas_r (line 687) | void AAS_ConnectedAreas_r(int *areanums, int numareas, int *connectedare...
function qboolean (line 723) | qboolean AAS_ConnectedAreas(int *areanums, int numareas)
function AAS_GetAdjacentAreasWithLessPresenceTypes_r (line 744) | int AAS_GetAdjacentAreasWithLessPresenceTypes_r(int *areanums, int numar...
function AAS_CheckAreaForPossiblePortals (line 793) | int AAS_CheckAreaForPossiblePortals(int areanum)
function AAS_FindPossiblePortals (line 920) | void AAS_FindPossiblePortals(void)
function AAS_RemoveAllPortals (line 937) | void AAS_RemoveAllPortals(void)
function AAS_FloodCluster_r (line 954) | void AAS_FloodCluster_r(int areanum, int clusternum)
function AAS_RemoveTeleporterPortals (line 1006) | void AAS_RemoveTeleporterPortals(void)
function AAS_FloodClusterReachabilities (line 1030) | void AAS_FloodClusterReachabilities(int clusternum)
function AAS_RemoveNotClusterClosingPortals (line 1064) | void AAS_RemoveNotClusterClosingPortals(void)
function AAS_RemoveNotClusterClosingPortals (line 1138) | void AAS_RemoveNotClusterClosingPortals(void)
function AAS_AddTeleporterPortals (line 1212) | void AAS_AddTeleporterPortals(void)
function AAS_AddTeleporterPortals (line 1349) | void AAS_AddTeleporterPortals(void)
function AAS_TestPortals (line 1372) | int AAS_TestPortals(void)
function AAS_CountForcedClusterPortals (line 1401) | void AAS_CountForcedClusterPortals(void)
function AAS_CreateViewPortals (line 1422) | void AAS_CreateViewPortals(void)
function AAS_SetViewPortalsAsClusterPortals (line 1440) | void AAS_SetViewPortalsAsClusterPortals(void)
function AAS_InitClustering (line 1458) | void AAS_InitClustering(void)
FILE: src/engine/botlib/be_aas_debug.c
function AAS_ClearShownPolygons (line 60) | void AAS_ClearShownPolygons(void)
function AAS_ShowPolygon (line 84) | void AAS_ShowPolygon(int color, int numpoints, vec3_t *points)
function AAS_ClearShownDebugLines (line 103) | void AAS_ClearShownDebugLines(void)
function AAS_DebugLine (line 125) | void AAS_DebugLine(vec3_t start, vec3_t end, int color)
function AAS_PermanentLine (line 151) | void AAS_PermanentLine(vec3_t start, vec3_t end, int color)
function AAS_DrawPermanentCross (line 164) | void AAS_DrawPermanentCross(vec3_t origin, float size, int color)
function AAS_DrawPlaneCross (line 186) | void AAS_DrawPlaneCross(vec3_t point, vec3_t normal, float dist, int typ...
function AAS_ShowBoundingBox (line 242) | void AAS_ShowBoundingBox(vec3_t origin, vec3_t mins, vec3_t maxs)
function AAS_ShowFace (line 302) | void AAS_ShowFace(int facenum)
function AAS_ShowFacePolygon (line 349) | void AAS_ShowFacePolygon(int facenum, int color, int flip)
function AAS_ShowArea (line 394) | void AAS_ShowArea(int areanum, int groundfacesonly)
function AAS_ShowAreaPolygons (line 486) | void AAS_ShowAreaPolygons(int areanum, int color, int groundfacesonly)
function AAS_DrawCross (line 525) | void AAS_DrawCross(vec3_t origin, float size, int color)
function AAS_PrintTravelType (line 545) | void AAS_PrintTravelType(int traveltype)
function AAS_DrawArrow (line 579) | void AAS_DrawArrow(vec3_t start, vec3_t end, int linecolor, int arrowcolor)
function AAS_ShowReachability (line 605) | void AAS_ShowReachability(aas_reachability_t *reach)
function AAS_ShowReachableAreas (line 684) | void AAS_ShowReachableAreas(int areanum)
function AAS_FloodAreas_r (line 713) | void AAS_FloodAreas_r(int areanum, int cluster, int *done)
function AAS_FloodAreas (line 769) | void AAS_FloodAreas(vec3_t origin)
FILE: src/engine/botlib/be_aas_debug.h
type aas_reachability_s (line 59) | struct aas_reachability_s
FILE: src/engine/botlib/be_aas_def.h
type aas_stringindex_t (line 54) | typedef struct aas_stringindex_s
type aas_link_t (line 61) | typedef struct aas_link_s
type bsp_link_t (line 70) | typedef struct bsp_link_s
type bsp_entdata_t (line 78) | typedef struct bsp_entdata_s
type aas_entity_t (line 89) | typedef struct aas_entity_s
type aas_settings_t (line 99) | typedef struct aas_settings_s
type aas_routingcache_t (line 144) | typedef struct aas_routingcache_s
type aas_routingupdate_t (line 161) | typedef struct aas_routingupdate_s
type aas_reversedlink_t (line 174) | typedef struct aas_reversedlink_s
type aas_reversedreachability_t (line 182) | typedef struct aas_reversedreachability_s
type aas_reachabilityareas_t (line 189) | typedef struct aas_reachabilityareas_s
type aas_t (line 194) | typedef struct aas_s
FILE: src/engine/botlib/be_aas_entity.c
function AAS_UpdateEntity (line 63) | int AAS_UpdateEntity(int entnum, bot_entitystate_t *state)
function AAS_EntityInfo (line 171) | void AAS_EntityInfo(int entnum, aas_entityinfo_t *info)
function AAS_EntityOrigin (line 195) | void AAS_EntityOrigin(int entnum, vec3_t origin)
function AAS_EntityModelindex (line 212) | int AAS_EntityModelindex(int entnum)
function AAS_EntityType (line 227) | int AAS_EntityType(int entnum)
function AAS_EntityModelNum (line 244) | int AAS_EntityModelNum(int entnum)
function AAS_OriginOfMoverWithModelNum (line 261) | int AAS_OriginOfMoverWithModelNum(int modelnum, vec3_t origin)
function AAS_EntitySize (line 286) | void AAS_EntitySize(int entnum, vec3_t mins, vec3_t maxs)
function AAS_EntityBSPData (line 308) | void AAS_EntityBSPData(int entnum, bsp_entdata_t *entdata)
function AAS_ResetEntityLinks (line 326) | void AAS_ResetEntityLinks(void)
function AAS_InvalidateEntities (line 341) | void AAS_InvalidateEntities(void)
function AAS_UnlinkInvalidEntities (line 356) | void AAS_UnlinkInvalidEntities(void)
function AAS_NearestEntity (line 379) | int AAS_NearestEntity(vec3_t origin, int modelindex)
function AAS_BestReachableEntityArea (line 414) | int AAS_BestReachableEntityArea(int entnum)
function AAS_NextEntity (line 427) | int AAS_NextEntity(int entnum)
FILE: src/engine/botlib/be_aas_file.c
function AAS_SwapAASData (line 54) | void AAS_SwapAASData(void)
function AAS_DumpAASData (line 183) | void AAS_DumpAASData(void)
function AAS_FileInfo (line 240) | void AAS_FileInfo(void)
function AAS_DData (line 327) | void AAS_DData(unsigned char *data, int size)
function AAS_LoadAASFile (line 343) | int AAS_LoadAASFile(char *filename)
function AAS_WriteAASLump (line 498) | int AAS_WriteAASLump(fileHandle_t fp, aas_header_t *h, int lumpnum, void...
function qboolean (line 523) | qboolean AAS_WriteAASFile(char *filename)
FILE: src/engine/botlib/be_aas_main.c
function AAS_Error (line 57) | void QDECL AAS_Error(char *fmt, ...)
function AAS_IndexFromString (line 101) | int AAS_IndexFromString(char *indexname, char *stringindex[], int numind...
function AAS_IndexFromModel (line 132) | int AAS_IndexFromModel(char *modelname)
function AAS_UpdateStringIndexes (line 142) | void AAS_UpdateStringIndexes(int numconfigstrings, char *configstrings[])
function AAS_Loaded (line 163) | int AAS_Loaded(void)
function AAS_Initialized (line 173) | int AAS_Initialized(void)
function AAS_SetInitialized (line 183) | void AAS_SetInitialized(void)
function AAS_ContinueInit (line 200) | void AAS_ContinueInit(float time)
function AAS_StartFrame (line 238) | int AAS_StartFrame(float time)
function AAS_Time (line 284) | float AAS_Time(void)
function AAS_ProjectPointOntoVector (line 294) | void AAS_ProjectPointOntoVector( vec3_t point, vec3_t vStart, vec3_t vEn...
function AAS_LoadFiles (line 310) | int AAS_LoadFiles(const char *mapname)
function AAS_LoadMap (line 341) | int AAS_LoadMap(const char *mapname)
function AAS_Setup (line 383) | int AAS_Setup(void)
function AAS_Shutdown (line 406) | void AAS_Shutdown(void)
FILE: src/engine/botlib/be_aas_move.c
function AAS_DropToFloor (line 56) | int AAS_DropToFloor(vec3_t origin, vec3_t mins, vec3_t maxs)
function AAS_InitSettings (line 74) | void AAS_InitSettings(void)
function AAS_AgainstLadder (line 123) | int AAS_AgainstLadder(vec3_t origin)
function AAS_OnGround (line 185) | int AAS_OnGround(vec3_t origin, int presencetype, int passent)
function AAS_Swimming (line 215) | int AAS_Swimming(vec3_t origin)
function AAS_SetMovedir (line 235) | void AAS_SetMovedir(vec3_t angles, vec3_t movedir)
function AAS_JumpReachRunStart (line 256) | void AAS_JumpReachRunStart(aas_reachability_t *reach, vec3_t runstart)
function AAS_WeaponJumpZVelocity (line 290) | float AAS_WeaponJumpZVelocity(vec3_t origin, float radiusdamage)
function AAS_RocketJumpZVelocity (line 341) | float AAS_RocketJumpZVelocity(vec3_t origin)
function AAS_BFGJumpZVelocity (line 352) | float AAS_BFGJumpZVelocity(vec3_t origin)
function AAS_Accelerate (line 364) | void AAS_Accelerate(vec3_t velocity, float frametime, vec3_t wishdir, fl...
function AAS_AirControl (line 390) | void AAS_AirControl(vec3_t start, vec3_t end, vec3_t velocity, vec3_t cm...
function AAS_ApplyFriction (line 403) | void AAS_ApplyFriction(vec3_t vel, float friction, float stopspeed,
function AAS_ClipToBBox (line 426) | int AAS_ClipToBBox(aas_trace_t *trace, vec3_t start, vec3_t end, int pre...
function AAS_ClientMovementPrediction (line 505) | int AAS_ClientMovementPrediction(struct aas_clientmove_s *move,
function AAS_PredictClientMovement (line 994) | int AAS_PredictClientMovement(struct aas_clientmove_s *move,
function AAS_ClientMovementHitBBox (line 1014) | int AAS_ClientMovementHitBBox(struct aas_clientmove_s *move,
function AAS_TestMovementPrediction (line 1033) | void AAS_TestMovementPrediction(int entnum, vec3_t origin, vec3_t dir)
function AAS_HorizontalVelocityForJump (line 1062) | int AAS_HorizontalVelocityForJump(float zvel, vec3_t start, vec3_t end, ...
FILE: src/engine/botlib/be_aas_move.h
type aas_clientmove_s (line 37) | struct aas_clientmove_s
type aas_clientmove_s (line 45) | struct aas_clientmove_s
type aas_reachability_s (line 57) | struct aas_reachability_s
FILE: src/engine/botlib/be_aas_optimize.c
type optimized_t (line 46) | typedef struct optimized_s
function AAS_KeepEdge (line 78) | int AAS_KeepEdge(aas_edge_t *edge)
function AAS_OptimizeEdge (line 88) | int AAS_OptimizeEdge(optimized_t *optimized, int edgenum)
function AAS_KeepFace (line 133) | int AAS_KeepFace(aas_face_t *face)
function AAS_OptimizeFace (line 144) | int AAS_OptimizeFace(optimized_t *optimized, int facenum)
function AAS_OptimizeArea (line 189) | void AAS_OptimizeArea(optimized_t *optimized, int areanum)
function AAS_OptimizeAlloc (line 218) | void AAS_OptimizeAlloc(optimized_t *optimized)
function AAS_OptimizeStore (line 243) | void AAS_OptimizeStore(optimized_t *optimized)
function AAS_Optimize (line 280) | void AAS_Optimize(void)
FILE: src/engine/botlib/be_aas_reach.c
type aas_lreachability_t (line 87) | typedef struct aas_lreachability_s
function AAS_FaceArea (line 112) | float AAS_FaceArea(aas_face_t *face)
function AAS_AreaVolume (line 145) | float AAS_AreaVolume(int areanum)
function AAS_BestReachableLinkArea (line 185) | int AAS_BestReachableLinkArea(aas_link_t *areas)
function AAS_GetJumpPadInfo (line 213) | int AAS_GetJumpPadInfo(int ent, vec3_t areastart, vec3_t absmins, vec3_t...
function AAS_BestReachableFromJumpPadArea (line 290) | int AAS_BestReachableFromJumpPadArea(vec3_t origin, vec3_t mins, vec3_t ...
function AAS_BestReachableArea (line 360) | int AAS_BestReachableArea(vec3_t origin, vec3_t mins, vec3_t maxs, vec3_...
function AAS_SetupReachabilityHeap (line 456) | void AAS_SetupReachabilityHeap(void)
function AAS_ShutDownReachabilityHeap (line 476) | void AAS_ShutDownReachabilityHeap(void)
function aas_lreachability_t (line 488) | aas_lreachability_t *AAS_AllocReachability(void)
function AAS_FreeReachability (line 508) | void AAS_FreeReachability(aas_lreachability_t *lreach)
function AAS_AreaReachability (line 523) | int AAS_AreaReachability(int areanum)
function AAS_AreaGroundFaceArea (line 539) | float AAS_AreaGroundFaceArea(int areanum)
function AAS_FaceCenter (line 564) | void AAS_FaceCenter(int facenum, vec3_t center)
function AAS_FallDamageDistance (line 591) | int AAS_FallDamageDistance(void)
function AAS_FallDelta (line 609) | float AAS_FallDelta(float distance)
function AAS_MaxJumpHeight (line 624) | float AAS_MaxJumpHeight(float phys_jumpvel)
function AAS_MaxJumpDistance (line 639) | float AAS_MaxJumpDistance(float phys_jumpvel)
function AAS_AreaCrouch (line 657) | int AAS_AreaCrouch(int areanum)
function AAS_AreaSwim (line 669) | int AAS_AreaSwim(int areanum)
function AAS_AreaLiquid (line 681) | int AAS_AreaLiquid(int areanum)
function AAS_AreaLava (line 692) | int AAS_AreaLava(int areanum)
function AAS_AreaSlime (line 702) | int AAS_AreaSlime(int areanum)
function AAS_AreaGrounded (line 713) | int AAS_AreaGrounded(int areanum)
function AAS_AreaLadder (line 724) | int AAS_AreaLadder(int areanum)
function AAS_AreaJumpPad (line 734) | int AAS_AreaJumpPad(int areanum)
function AAS_AreaTeleporter (line 744) | int AAS_AreaTeleporter(int areanum)
function AAS_AreaClusterPortal (line 754) | int AAS_AreaClusterPortal(int areanum)
function AAS_AreaDoNotEnter (line 764) | int AAS_AreaDoNotEnter(int areanum)
function AAS_BarrierJumpTravelTime (line 775) | unsigned short int AAS_BarrierJumpTravelTime(void)
function qboolean (line 786) | qboolean AAS_ReachabilityExists(int area1num, int area2num)
function AAS_NearbySolidOrGap (line 804) | int AAS_NearbySolidOrGap(vec3_t start, vec3_t end)
function AAS_Reachability_Swim (line 836) | int AAS_Reachability_Swim(int area1num, int area2num)
function AAS_Reachability_EqualFloorHeight (line 913) | int AAS_Reachability_EqualFloorHeight(int area1num, int area2num)
function AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge (line 1059) | int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, i...
function VectorDistance (line 1610) | float VectorDistance(vec3_t v1, vec3_t v2)
function VectorBetweenVectors (line 1624) | int VectorBetweenVectors(vec3_t v, vec3_t v1, vec3_t v2)
function VectorMiddle (line 1639) | void VectorMiddle(vec3_t v1, vec3_t v2, vec3_t middle)
function AAS_ClosestEdgePoints (line 1831) | float AAS_ClosestEdgePoints(vec3_t v1, vec3_t v2, vec3_t v3, vec3_t v4,
function AAS_Reachability_Jump (line 2109) | int AAS_Reachability_Jump(int area1num, int area2num)
function AAS_Reachability_Ladder (line 2380) | int AAS_Reachability_Ladder(int area1num, int area2num)
function AAS_TravelFlagsForTeam (line 2723) | int AAS_TravelFlagsForTeam(int ent)
function AAS_Reachability_Teleport (line 2753) | void AAS_Reachability_Teleport(void)
function AAS_Reachability_Elevator (line 2947) | void AAS_Reachability_Elevator(void)
function aas_lreachability_t (line 3162) | aas_lreachability_t *AAS_FindFaceReachabilities(vec3_t *facepoints, int ...
function AAS_Reachability_FuncBobbing (line 3285) | void AAS_Reachability_FuncBobbing(void)
function AAS_Reachability_JumpPad (line 3499) | void AAS_Reachability_JumpPad(void)
function AAS_Reachability_Grapple (line 3793) | int AAS_Reachability_Grapple(int area1num, int area2num)
function AAS_SetWeaponJumpAreaFlags (line 3934) | void AAS_SetWeaponJumpAreaFlags(void)
function AAS_Reachability_WeaponJump (line 4006) | int AAS_Reachability_WeaponJump(int area1num, int area2num)
function AAS_Reachability_WalkOffLedge (line 4131) | void AAS_Reachability_WalkOffLedge(int areanum)
function AAS_StoreReachability (line 4312) | void AAS_StoreReachability(void)
function AAS_ContinueInitReachability (line 4369) | int AAS_ContinueInitReachability(float time)
function AAS_InitReachability (line 4516) | void AAS_InitReachability(void)
FILE: src/engine/botlib/be_aas_route.c
function AAS_RoutingInfo (line 94) | void AAS_RoutingInfo(void)
function AAS_ClusterAreaNum (line 109) | __inline int AAS_ClusterAreaNum(int cluster, int areanum)
function AAS_InitTravelFlagFromType (line 135) | void AAS_InitTravelFlagFromType(void)
function AAS_TravelFlagForType_inline (line 169) | __inline int AAS_TravelFlagForType_inline(int traveltype)
function AAS_TravelFlagForType (line 190) | int AAS_TravelFlagForType(int traveltype)
function AAS_UnlinkCache (line 200) | void AAS_UnlinkCache(aas_routingcache_t *cache)
function AAS_LinkCache (line 215) | void AAS_LinkCache(aas_routingcache_t *cache)
function AAS_FreeRoutingCache (line 236) | void AAS_FreeRoutingCache(aas_routingcache_t *cache)
function AAS_RemoveRoutingCacheInCluster (line 248) | void AAS_RemoveRoutingCacheInCluster( int clusternum )
function AAS_RemoveRoutingCacheUsingArea (line 273) | void AAS_RemoveRoutingCacheUsingArea( int areanum )
function AAS_EnableRoutingArea (line 308) | int AAS_EnableRoutingArea(int areanum, int enable)
function AAS_RoutingTime (line 342) | __inline float AAS_RoutingTime(void)
function AAS_GetAreaContentsTravelFlags (line 352) | int AAS_GetAreaContentsTravelFlags(int areanum)
function AAS_AreaContentsTravelFlags_inline (line 382) | __inline int AAS_AreaContentsTravelFlags_inline(int areanum)
function AAS_AreaContentsTravelFlags (line 392) | int AAS_AreaContentsTravelFlags(int areanum)
function AAS_InitAreaContentsTravelFlags (line 402) | void AAS_InitAreaContentsTravelFlags(void)
function AAS_CreateReversedReachability (line 419) | void AAS_CreateReversedReachability(void)
function AAS_AreaTravelTime (line 474) | unsigned short int AAS_AreaTravelTime(int areanum, vec3_t start, vec3_t ...
function AAS_CalculateAreaTravelTimes (line 500) | void AAS_CalculateAreaTravelTimes(void)
function AAS_PortalMaxTravelTime (line 566) | int AAS_PortalMaxTravelTime(int portalnum)
function AAS_InitPortalMaxTravelTimes (line 600) | void AAS_InitPortalMaxTravelTimes(void)
function AAS_FreeOldestCache (line 695) | int AAS_FreeOldestCache(void)
function aas_routingcache_t (line 734) | aas_routingcache_t *AAS_AllocRoutingCache(int numtraveltimes)
function AAS_FreeAllClusterAreaCache (line 758) | void AAS_FreeAllClusterAreaCache(void)
function AAS_InitClusterAreaCache (line 790) | void AAS_InitClusterAreaCache(void)
function AAS_FreeAllPortalCache (line 819) | void AAS_FreeAllPortalCache(void)
function AAS_InitPortalCache (line 845) | void AAS_InitPortalCache(void)
function AAS_InitRoutingUpdate (line 857) | void AAS_InitRoutingUpdate(void)
function AAS_CreateAllRoutingCache (line 887) | void AAS_CreateAllRoutingCache(void)
type routecacheheader_t (line 916) | typedef struct routecacheheader_s
function AAS_WriteRouteCache (line 934) | void AAS_WriteRouteCache(void)
function aas_routingcache_t (line 1031) | aas_routingcache_t *AAS_ReadCache(fileHandle_t fp)
function AAS_ReadRouteCache (line 1050) | int AAS_ReadRouteCache(void)
function AAS_InitReachabilityAreas (line 1143) | void AAS_InitReachabilityAreas(void)
function AAS_InitRouting (line 1215) | void AAS_InitRouting(void)
function AAS_FreeRoutingCaches (line 1251) | void AAS_FreeRoutingCaches(void)
function AAS_UpdateAreaRoutingCache (line 1288) | void AAS_UpdateAreaRoutingCache(aas_routingcache_t *areacache)
function aas_routingcache_t (line 1399) | aas_routingcache_t *AAS_GetAreaRoutingCache(int clusternum, int areanum,...
function AAS_UpdatePortalRoutingCache (line 1445) | void AAS_UpdatePortalRoutingCache(aas_routingcache_t *portalcache)
function aas_routingcache_t (line 1543) | aas_routingcache_t *AAS_GetPortalRoutingCache(int clusternum, int areanu...
function AAS_AreaRouteToGoalArea (line 1585) | int AAS_AreaRouteToGoalArea(int areanum, vec3_t origin, int goalareanum,...
function AAS_AreaTravelTimeToGoalArea (line 1767) | int AAS_AreaTravelTimeToGoalArea(int areanum, vec3_t origin, int goalare...
function AAS_AreaReachabilityToGoalArea (line 1783) | int AAS_AreaReachabilityToGoalArea(int areanum, vec3_t origin, int goala...
function AAS_PredictRoute (line 1800) | int AAS_PredictRoute(struct aas_predictroute_s *route, int areanum, vec3...
function AAS_BridgeWalkable (line 1909) | int AAS_BridgeWalkable(int areanum)
function AAS_ReachabilityFromNum (line 1919) | void AAS_ReachabilityFromNum(int num, struct aas_reachability_s *reach)
function AAS_NextAreaReachability (line 1939) | int AAS_NextAreaReachability(int areanum, int reachnum)
function AAS_NextModelReachability (line 1974) | int AAS_NextModelReachability(int num, int modelnum)
function AAS_RandomGoalArea (line 2001) | int AAS_RandomGoalArea(int areanum, int travelflags, int *goalareanum, v...
function AAS_AreaVisible (line 2056) | int AAS_AreaVisible(int srcarea, int destarea)
function DistancePointToLine (line 2066) | float DistancePointToLine(vec3_t v1, vec3_t v2, vec3_t point)
function AAS_NearestHideArea (line 2080) | int AAS_NearestHideArea(int srcnum, vec3_t origin, int areanum, int enem...
FILE: src/engine/botlib/be_aas_route.h
type aas_reachability_s (line 53) | struct aas_reachability_s
type aas_predictroute_s (line 63) | struct aas_predictroute_s
FILE: src/engine/botlib/be_aas_routealt.c
type midrangearea_t (line 49) | typedef struct midrangearea_s
function AAS_AltRoutingFloodCluster_r (line 66) | void AAS_AltRoutingFloodCluster_r(int areanum)
function AAS_AlternativeRouteGoals (line 99) | int AAS_AlternativeRouteGoals(vec3_t start, int startareanum, vec3_t goa...
function AAS_InitAlternativeRouting (line 216) | void AAS_InitAlternativeRouting(void)
function AAS_ShutdownAlternativeRouting (line 231) | void AAS_ShutdownAlternativeRouting(void)
FILE: src/engine/botlib/be_aas_sample.c
type aas_tracestack_t (line 57) | typedef struct aas_tracestack_s
function AAS_PresenceTypeBoundingBox (line 73) | void AAS_PresenceTypeBoundingBox(int presencetype, vec3_t mins, vec3_t m...
function AAS_InitAASLinkHeap (line 96) | void AAS_InitAASLinkHeap(void)
function AAS_FreeAASLinkHeap (line 134) | void AAS_FreeAASLinkHeap(void)
function aas_link_t (line 146) | aas_link_t *AAS_AllocAASLink(void)
function AAS_DeAllocAASLink (line 172) | void AAS_DeAllocAASLink(aas_link_t *link)
function AAS_InitAASLinkedEntities (line 188) | void AAS_InitAASLinkedEntities(void)
function AAS_FreeAASLinkedEntities (line 201) | void AAS_FreeAASLinkedEntities(void)
function AAS_PointAreaNum (line 213) | int AAS_PointAreaNum(vec3_t point)
function AAS_PointReachabilityAreaIndex (line 266) | int AAS_PointReachabilityAreaIndex( vec3_t origin )
function AAS_AreaCluster (line 308) | int AAS_AreaCluster(int areanum)
function AAS_AreaPresenceType (line 324) | int AAS_AreaPresenceType(int areanum)
function AAS_PointPresenceType (line 341) | int AAS_PointPresenceType(vec3_t point)
function vec_t (line 366) | vec_t AAS_BoxOriginDistanceFromPlane(vec3_t normal, vec3_t mins, vec3_t ...
function qboolean (line 406) | qboolean AAS_AreaEntityCollision(int areanum, vec3_t start, vec3_t end,
function aas_trace_t (line 449) | aas_trace_t AAS_TraceClientBBox(vec3_t start, vec3_t end, int presencetype,
function AAS_TraceAreas (line 700) | int AAS_TraceAreas(vec3_t start, vec3_t end, int *areas, vec3_t *points,...
function qboolean (line 874) | qboolean AAS_InsideFace(aas_face_t *face, vec3_t pnormal, vec3_t point, ...
function qboolean (line 926) | qboolean AAS_PointInsideFace(int facenum, vec3_t point, float epsilon)
function aas_face_t (line 966) | aas_face_t *AAS_AreaGroundFace(int areanum, vec3_t point)
function AAS_FacePlane (line 1000) | void AAS_FacePlane(int facenum, vec3_t normal, float *dist)
function aas_face_t (line 1015) | aas_face_t *AAS_TraceEndFace(aas_trace_t *trace)
function AAS_BoxOnPlaneSide2 (line 1075) | int AAS_BoxOnPlaneSide2(vec3_t absmins, vec3_t absmaxs, aas_plane_t *p)
function AAS_UnlinkFromAreas (line 1140) | void AAS_UnlinkFromAreas(aas_link_t *areas)
type aas_linkstack_t (line 1166) | typedef struct
function aas_link_t (line 1171) | aas_link_t *AAS_AASLinkEntity(vec3_t absmins, vec3_t absmaxs, int entnum)
function aas_link_t (line 1271) | aas_link_t *AAS_LinkEntityClientBBox(vec3_t absmins, vec3_t absmaxs, int...
function AAS_BBoxAreas (line 1288) | int AAS_BBoxAreas(vec3_t absmins, vec3_t absmaxs, int *areas, int maxareas)
function AAS_AreaInfo (line 1311) | int AAS_AreaInfo( int areanum, aas_areainfo_t *info )
function aas_plane_t (line 1337) | aas_plane_t *AAS_PlaneFromNum(int planenum)
FILE: src/engine/botlib/be_ai_char.c
type bot_characteristic_t (line 63) | typedef struct bot_characteristic_s
type bot_character_t (line 70) | typedef struct bot_character_s
function bot_character_t (line 85) | bot_character_t *BotCharacterFromHandle(int handle)
function BotDumpCharacter (line 105) | void BotDumpCharacter(bot_character_t *ch)
function BotFreeCharacterStrings (line 129) | void BotFreeCharacterStrings(bot_character_t *ch)
function BotFreeCharacter2 (line 147) | void BotFreeCharacter2(int handle)
function BotFreeCharacter (line 169) | void BotFreeCharacter(int handle)
function BotDefaultCharacteristics (line 180) | void BotDefaultCharacteristics(bot_character_t *ch, bot_character_t *def...
function bot_character_t (line 212) | bot_character_t *BotLoadCharacterFromFile(char *charfile, int skill)
function BotFindCachedCharacter (line 362) | int BotFindCachedCharacter(char *charfile, float skill)
function BotLoadCachedCharacter (line 383) | int BotLoadCachedCharacter(char *charfile, float skill, int reload)
function BotLoadCharacterSkill (line 496) | int BotLoadCharacterSkill(char *charfile, float skill)
function BotInterpolateCharacters (line 516) | int BotInterpolateCharacters(int handle1, int handle2, float desiredskill)
function BotLoadCharacter (line 568) | int BotLoadCharacter(char *charfile, float skill)
function CheckCharacteristicIndex (line 617) | int CheckCharacteristicIndex(int character, int index)
function Characteristic_Float (line 641) | float Characteristic_Float(int character, int index)
function Characteristic_BFloat (line 673) | float Characteristic_BFloat(int character, int index, float min, float max)
function Characteristic_Integer (line 696) | int Characteristic_Integer(int character, int index)
function Characteristic_BInteger (line 727) | int Characteristic_BInteger(int character, int index, int min, int max)
function Characteristic_String (line 750) | void Characteristic_String(int character, int index, char *buf, int size)
function BotShutdownCharacters (line 778) | void BotShutdownCharacters(void)
FILE: src/engine/botlib/be_ai_chat.c
type bot_chatmessage_t (line 74) | typedef struct bot_chatmessage_s
type bot_chattype_t (line 81) | typedef struct bot_chattype_s
type bot_chat_t (line 89) | typedef struct bot_chat_s
type bot_randomstring_t (line 95) | typedef struct bot_randomstring_s
type bot_randomlist_t (line 101) | typedef struct bot_randomlist_s
type bot_synonym_t (line 110) | typedef struct bot_synonym_s
type bot_synonymlist_t (line 117) | typedef struct bot_synonymlist_s
type bot_matchstring_t (line 126) | typedef struct bot_matchstring_s
type bot_matchpiece_t (line 133) | typedef struct bot_matchpiece_s
type bot_matchtemplate_t (line 141) | typedef struct bot_matchtemplate_s
type bot_replychatkey_t (line 151) | typedef struct bot_replychatkey_s
type bot_replychat_t (line 159) | typedef struct bot_replychat_s
type bot_stringlist_t (line 169) | typedef struct bot_stringlist_s
type bot_chatstate_t (line 176) | typedef struct bot_chatstate_s
type bot_ichatdata_t (line 192) | typedef struct {
function bot_chatstate_t (line 219) | bot_chatstate_t *BotChatStateFromHandle(int handle)
function InitConsoleMessageHeap (line 240) | void InitConsoleMessageHeap(void)
function bot_consolemessage_t (line 268) | bot_consolemessage_t *AllocConsoleMessage(void)
function FreeConsoleMessage (line 283) | void FreeConsoleMessage(bot_consolemessage_t *message)
function BotRemoveConsoleMessage (line 296) | void BotRemoveConsoleMessage(int chatstate, int handle)
function BotQueueConsoleMessage (line 326) | void BotQueueConsoleMessage(int chatstate, int type, char *message)
function BotNextConsoleMessage (line 367) | int BotNextConsoleMessage(int chatstate, bot_consolemessage_t *cm)
function BotNumConsoleMessages (line 387) | int BotNumConsoleMessages(int chatstate)
function IsWhiteSpace (line 401) | int IsWhiteSpace(char c)
function BotRemoveTildes (line 421) | void BotRemoveTildes(char *message)
function UnifyWhiteSpaces (line 440) | void UnifyWhiteSpaces(char *string)
function StringContains (line 464) | int StringContains(char *str1, char *str2, int casesensitive)
function StringReplaceWords (line 537) | void StringReplaceWords(char *string, char *synonym, char *replacement)
function BotDumpSynonymList (line 570) | void BotDumpSynonymList(bot_synonymlist_t *synlist)
function bot_synonymlist_t (line 595) | bot_synonymlist_t *BotLoadSynonyms(char *filename)
function BotReplaceSynonyms (line 761) | void BotReplaceSynonyms(char *string, unsigned long int context)
function BotReplaceWeightedSynonyms (line 781) | void BotReplaceWeightedSynonyms(char *string, unsigned long int context)
function BotReplaceReplySynonyms (line 814) | void BotReplaceReplySynonyms(char *string, unsigned long int context)
function BotLoadChatMessage (line 862) | int BotLoadChatMessage(source_t *source, char *chatmessagestring)
function BotDumpRandomStringList (line 921) | void BotDumpRandomStringList(bot_randomlist_t *randomlist)
function bot_randomlist_t (line 946) | bot_randomlist_t *BotLoadRandomStrings(char *filename)
function BotDumpMatchTemplates (line 1077) | void BotDumpMatchTemplates(bot_matchtemplate_t *matches)
function BotFreeMatchPieces (line 1114) | void BotFreeMatchPieces(bot_matchpiece_t *matchpieces)
function bot_matchpiece_t (line 1139) | bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken)
function BotFreeMatchTemplates (line 1241) | void BotFreeMatchTemplates(bot_matchtemplate_t *mt)
function bot_matchtemplate_t (line 1258) | bot_matchtemplate_t *BotLoadMatchTemplates(char *matchfile)
function StringsMatch (line 1357) | int StringsMatch(bot_matchpiece_t *pieces, bot_match_t *match)
function BotFindMatch (line 1434) | int BotFindMatch(char *str, bot_match_t *match, unsigned long int context)
function BotMatchVariable (line 1468) | void BotMatchVariable(bot_match_t *match, int variable, char *buf, int s...
function bot_stringlist_t (line 1497) | bot_stringlist_t *BotFindStringInList(bot_stringlist_t *list, char *string)
function bot_stringlist_t (line 1513) | bot_stringlist_t *BotCheckChatMessageIntegrety(char *message, bot_string...
function BotCheckInitialChatIntegrety (line 1584) | void BotCheckInitialChatIntegrety(bot_chat_t *chat)
function BotCheckReplyChatIntegrety (line 1610) | void BotCheckReplyChatIntegrety(bot_replychat_t *replychat)
function BotDumpReplyChat (line 1636) | void BotDumpReplyChat(bot_replychat_t *replychat)
function BotFreeReplyChat (line 1691) | void BotFreeReplyChat(bot_replychat_t *replychat)
function BotCheckValidReplyChatKeySet (line 1721) | void BotCheckValidReplyChatKeySet(source_t *source, bot_replychatkey_t *...
function bot_replychat_t (line 1828) | bot_replychat_t *BotLoadReplyChat(char *filename)
function BotDumpInitialChat (line 1988) | void BotDumpInitialChat(bot_chat_t *chat)
function bot_chat_t (line 2013) | bot_chat_t *BotLoadInitialChat(char *chatfile, char *chatname)
function BotFreeChatFile (line 2185) | void BotFreeChatFile(int chatstate)
function BotLoadChatFile (line 2200) | int BotLoadChatFile(int chatstate, char *chatfile, char *chatname)
function BotExpandChatMessage (line 2258) | int BotExpandChatMessage(char *outmessage, char *message, unsigned long ...
function BotConstructChatMessage (line 2379) | void BotConstructChatMessage(bot_chatstate_t *chatstate, char *message, ...
function BotNumInitialChats (line 2465) | int BotNumInitialChats(int chatstate, char *type)
function BotInitialChat (line 2492) | void BotInitialChat(int chatstate, char *type, int mcontext, char *var0,...
function BotPrintReplyChatKeys (line 2573) | void BotPrintReplyChatKeys(bot_replychat_t *replychat)
function BotReplyChat (line 2614) | int BotReplyChat(int chatstate, char *message, int mcontext, int vcontex...
function BotChatLength (line 2771) | int BotChatLength(int chatstate)
function BotEnterChat (line 2785) | void BotEnterChat(int chatstate, int clientto, int sendto)
function BotGetChatMessage (line 2821) | void BotGetChatMessage(int chatstate, char *buf, int size)
function BotSetChatGender (line 2840) | void BotSetChatGender(int chatstate, int gender)
function BotSetChatName (line 2859) | void BotSetChatName(int chatstate, char *name, int client)
function BotResetChatAI (line 2876) | void BotResetChatAI(void)
function BotAllocChatState (line 2895) | int BotAllocChatState(void)
function BotFreeChatState (line 2915) | void BotFreeChatState(int handle)
function BotSetupChatAI (line 2951) | int BotSetupChatAI(void)
function BotShutdownChatAI (line 2985) | void BotShutdownChatAI(void)
FILE: src/engine/botlib/be_ai_gen.c
function GeneticSelection (line 52) | int GeneticSelection(int numranks, float *rankings)
function GeneticParentsAndChildSelection (line 90) | int GeneticParentsAndChildSelection(int numranks, float *ranks, int *par...
FILE: src/engine/botlib/be_ai_goal.c
type maplocation_t (line 70) | typedef struct maplocation_s
type campspot_t (line 79) | typedef struct campspot_s
type gametype_t (line 92) | typedef enum {
type levelitem_t (line 104) | typedef struct levelitem_s
type iteminfo_t (line 118) | typedef struct iteminfo_s
type itemconfig_t (line 152) | typedef struct itemconfig_s
type bot_goalstate_t (line 159) | typedef struct bot_goalstate_s
function bot_goalstate_t (line 197) | bot_goalstate_t *BotGoalStateFromHandle(int handle)
function BotInterbreedGoalFuzzyLogic (line 217) | void BotInterbreedGoalFuzzyLogic(int parent1, int parent2, int child)
function BotSaveGoalFuzzyLogic (line 234) | void BotSaveGoalFuzzyLogic(int goalstate, char *filename)
function BotMutateGoalFuzzyLogic (line 248) | void BotMutateGoalFuzzyLogic(int goalstate, float range)
function itemconfig_t (line 262) | itemconfig_t *LoadItemConfig(char *filename)
function InitLevelItemHeap (line 366) | void InitLevelItemHeap(void)
function levelitem_t (line 389) | levelitem_t *AllocLevelItem(void)
function FreeLevelItem (line 410) | void FreeLevelItem(levelitem_t *li)
function AddLevelItemToList (line 421) | void AddLevelItemToList(levelitem_t *li)
function RemoveLevelItemFromList (line 434) | void RemoveLevelItemFromList(levelitem_t *li)
function BotFreeInfoEntities (line 446) | void BotFreeInfoEntities(void)
function BotInitInfoEntities (line 470) | void BotInitInfoEntities(void)
function BotInitLevelItems (line 532) | void BotInitLevelItems(void)
function BotGoalName (line 674) | void BotGoalName(int number, char *name, int size)
function BotResetAvoidGoals (line 698) | void BotResetAvoidGoals(int goalstate)
function BotDumpAvoidGoals (line 713) | void BotDumpAvoidGoals(int goalstate)
function BotAddToAvoidGoals (line 737) | void BotAddToAvoidGoals(bot_goalstate_t *gs, int number, float avoidtime)
function BotRemoveFromAvoidGoals (line 769) | void BotRemoveFromAvoidGoals(int goalstate, int number)
function BotAvoidGoalTime (line 792) | float BotAvoidGoalTime(int goalstate, int number)
function BotSetAvoidGoalTime (line 815) | void BotSetAvoidGoalTime(int goalstate, int number, float avoidtime)
function BotGetLevelItemGoal (line 854) | int BotGetLevelItemGoal(int index, char *name, bot_goal_t *goal)
function BotGetMapLocationGoal (line 907) | int BotGetMapLocationGoal(char *name, bot_goal_t *goal)
function BotGetNextCampSpotGoal (line 932) | int BotGetNextCampSpotGoal(int num, bot_goal_t *goal)
function BotFindEntityForLevelItem (line 960) | void BotFindEntityForLevelItem(levelitem_t *li)
function BotUpdateEntityItems (line 1004) | void BotUpdateEntityItems(void)
function BotDumpGoalStack (line 1177) | void BotDumpGoalStack(int goalstate)
function BotPushGoal (line 1197) | void BotPushGoal(int goalstate, bot_goal_t *goal)
function BotPopGoal (line 1218) | void BotPopGoal(int goalstate)
function BotEmptyGoalStack (line 1232) | void BotEmptyGoalStack(int goalstate)
function BotGetTopGoal (line 1246) | int BotGetTopGoal(int goalstate, bot_goal_t *goal)
function BotGetSecondGoal (line 1262) | int BotGetSecondGoal(int goalstate, bot_goal_t *goal)
function BotChooseLTGItem (line 1279) | int BotChooseLTGItem(int goalstate, vec3_t origin, int *inventory, int t...
function BotChooseNBGItem (line 1446) | int BotChooseNBGItem(int goalstate, vec3_t origin, int *inventory, int t...
function BotTouchingGoal (line 1603) | int BotTouchingGoal(vec3_t origin, bot_goal_t *goal)
function BotItemGoalInVisButNotVisible (line 1632) | int BotItemGoalInVisButNotVisible(int viewer, vec3_t eye, vec3_t viewang...
function BotResetGoalState (line 1669) | void BotResetGoalState(int goalstate)
function BotLoadItemWeights (line 1685) | int BotLoadItemWeights(int goalstate, char *filename)
function BotFreeItemWeights (line 1711) | void BotFreeItemWeights(int goalstate)
function BotAllocGoalState (line 1726) | int BotAllocGoalState(int client)
function BotFreeGoalState (line 1747) | void BotFreeGoalState(int handle)
function BotSetupGoalAI (line 1769) | int BotSetupGoalAI(void)
function BotShutdownGoalAI (line 1795) | void BotShutdownGoalAI(void)
FILE: src/engine/botlib/be_ai_move.c
type bot_movestate_t (line 59) | typedef struct bot_movestate_s
function BotAllocMoveState (line 127) | int BotAllocMoveState(void)
function BotFreeMoveState (line 147) | void BotFreeMoveState(int handle)
function bot_movestate_t (line 168) | bot_movestate_t *BotMoveStateFromHandle(int handle)
function BotInitMoveState (line 188) | void BotInitMoveState(int handle, bot_initmove_t *initmove)
function AngleDiff (line 220) | float AngleDiff(float ang1, float ang2)
function BotFuzzyPointReachabilityArea (line 241) | int BotFuzzyPointReachabilityArea(vec3_t origin)
function BotReachabilityArea (line 301) | int BotReachabilityArea(vec3_t origin, int client)
function BotOnMover (line 442) | int BotOnMover(vec3_t origin, int entnum, aas_reachability_t *reach)
function MoverDown (line 488) | int MoverDown(aas_reachability_t *reach)
function BotSetBrushModelTypes (line 513) | void BotSetBrushModelTypes(void)
function BotOnTopOfEntity (line 549) | int BotOnTopOfEntity(bot_movestate_t *ms)
function BotValidTravel (line 569) | int BotValidTravel(vec3_t origin, aas_reachability_t *reach, int travelf...
function BotAddToAvoidReach (line 583) | void BotAddToAvoidReach(bot_movestate_t *ms, int number, float avoidtime)
function DistanceFromLineSquared (line 615) | float DistanceFromLineSquared(vec3_t p, vec3_t lp1, vec3_t lp2)
function VectorDistanceSquared (line 641) | float VectorDistanceSquared(vec3_t p1, vec3_t p2)
function BotAvoidSpots (line 653) | int BotAvoidSpots(vec3_t origin, aas_reachability_t *reach, bot_avoidspo...
function BotAddAvoidSpot (line 719) | void BotAddAvoidSpot(int movestate, vec3_t origin, float radius, int type)
function BotGetReachabilityToGoal (line 744) | int BotGetReachabilityToGoal(vec3_t origin, int areanum,
function BotAddToTarget (line 822) | int BotAddToTarget(vec3_t start, vec3_t end, float maxdist, float *dist,...
function BotMovementViewTarget (line 843) | int BotMovementViewTarget(int movestate, bot_goal_t *goal, int travelfla...
function BotVisible (line 898) | int BotVisible(int ent, vec3_t eye, vec3_t target)
function BotPredictVisiblePosition (line 912) | int BotPredictVisiblePosition(vec3_t origin, int areanum, bot_goal_t *go...
function MoverBottomCenter (line 975) | void MoverBottomCenter(aas_reachability_t *reach, vec3_t bottomcenter)
function BotGapDistance (line 1000) | float BotGapDistance(vec3_t origin, vec3_t hordir, int entnum)
function BotCheckBarrierJump (line 1049) | int BotCheckBarrierJump(bot_movestate_t *ms, vec3_t dir, float speed)
function BotSwimInDirection (line 1099) | int BotSwimInDirection(bot_movestate_t *ms, vec3_t dir, float speed, int...
function BotWalkInDirection (line 1114) | int BotWalkInDirection(bot_movestate_t *ms, vec3_t dir, float speed, int...
function BotMoveInDirection (line 1231) | int BotMoveInDirection(int movestate, vec3_t dir, float speed, int type)
function Intersection (line 1253) | int Intersection(vec2_t p1, vec2_t p2, vec2_t p3, vec2_t p4, vec2_t out)
function BotCheckBlocked (line 1282) | void BotCheckBlocked(bot_movestate_t *ms, vec3_t dir, int checkbottom, b...
function BotClearMoveResult (line 1330) | void BotClearMoveResult(bot_moveresult_t *moveresult)
function bot_moveresult_t (line 1345) | bot_moveresult_t BotTravel_Walk(bot_movestate_t *ms, aas_reachability_t ...
function bot_moveresult_t (line 1400) | bot_moveresult_t BotFinishTravel_Walk(bot_movestate_t *ms, aas_reachabil...
function bot_moveresult_t (line 1438) | bot_moveresult_t BotTravel_Crouch(bot_movestate_t *ms, aas_reachability_...
function bot_moveresult_t (line 1468) | bot_moveresult_t BotTravel_BarrierJump(bot_movestate_t *ms, aas_reachabi...
function bot_moveresult_t (line 1503) | bot_moveresult_t BotFinishTravel_BarrierJump(bot_movestate_t *ms, aas_re...
function bot_moveresult_t (line 1532) | bot_moveresult_t BotTravel_Swim(bot_movestate_t *ms, aas_reachability_t ...
function bot_moveresult_t (line 1558) | bot_moveresult_t BotTravel_WaterJump(bot_movestate_t *ms, aas_reachabili...
function bot_moveresult_t (line 1592) | bot_moveresult_t BotFinishTravel_WaterJump(bot_movestate_t *ms, aas_reac...
function bot_moveresult_t (line 1629) | bot_moveresult_t BotTravel_WalkOffLedge(bot_movestate_t *ms, aas_reachab...
function BotAirControl (line 1692) | int BotAirControl(vec3_t origin, vec3_t velocity, vec3_t goal, vec3_t di...
function bot_moveresult_t (line 1729) | bot_moveresult_t BotFinishTravel_WalkOffLedge(bot_movestate_t *ms, aas_r...
function bot_moveresult_t (line 1889) | bot_moveresult_t BotTravel_Jump(bot_movestate_t *ms, aas_reachability_t ...
function bot_moveresult_t (line 1960) | bot_moveresult_t BotFinishTravel_Jump(bot_movestate_t *ms, aas_reachabil...
function bot_moveresult_t (line 1995) | bot_moveresult_t BotTravel_Ladder(bot_movestate_t *ms, aas_reachability_...
function bot_moveresult_t (line 2051) | bot_moveresult_t BotTravel_Teleport(bot_movestate_t *ms, aas_reachabilit...
function bot_moveresult_t (line 2082) | bot_moveresult_t BotTravel_Elevator(bot_movestate_t *ms, aas_reachabilit...
function bot_moveresult_t (line 2233) | bot_moveresult_t BotFinishTravel_Elevator(bot_movestate_t *ms, aas_reach...
function BotFuncBobStartEnd (line 2263) | void BotFuncBobStartEnd(aas_reachability_t *reach, vec3_t start, vec3_t ...
function bot_moveresult_t (line 2321) | bot_moveresult_t BotTravel_FuncBobbing(bot_movestate_t *ms, aas_reachabi...
function bot_moveresult_t (line 2479) | bot_moveresult_t BotFinishTravel_FuncBobbing(bot_movestate_t *ms, aas_re...
function GrappleState (line 2534) | int GrappleState(bot_movestate_t *ms, aas_reachability_t *reach)
function BotResetGrapple (line 2564) | void BotResetGrapple(bot_movestate_t *ms)
function bot_moveresult_t (line 2590) | bot_moveresult_t BotTravel_Grapple(bot_movestate_t *ms, aas_reachability...
function bot_moveresult_t (line 2744) | bot_moveresult_t BotTravel_RocketJump(bot_movestate_t *ms, aas_reachabil...
function bot_moveresult_t (line 2809) | bot_moveresult_t BotTravel_BFGJump(bot_movestate_t *ms, aas_reachability...
function bot_moveresult_t (line 2870) | bot_moveresult_t BotFinishTravel_WeaponJump(bot_movestate_t *ms, aas_rea...
function bot_moveresult_t (line 2910) | bot_moveresult_t BotTravel_JumpPad(bot_movestate_t *ms, aas_reachability...
function bot_moveresult_t (line 2937) | bot_moveresult_t BotFinishTravel_JumpPad(bot_movestate_t *ms, aas_reacha...
function BotReachabilityTime (line 2966) | int BotReachabilityTime(aas_reachability_t *reach)
function bot_moveresult_t (line 2998) | bot_moveresult_t BotMoveInGoalArea(bot_movestate_t *ms, bot_goal_t *goal)
function BotMoveToGoal (line 3055) | void BotMoveToGoal(bot_moveresult_t *result, int movestate, bot_goal_t *...
function BotResetAvoidReach (line 3515) | void BotResetAvoidReach(int movestate)
function BotResetLastAvoidReach (line 3531) | void BotResetLastAvoidReach(int movestate)
function BotResetMoveState (line 3561) | void BotResetMoveState(int movestate)
function BotSetupMoveAI (line 3575) | int BotSetupMoveAI(void)
function BotShutdownMoveAI (line 3596) | void BotShutdownMoveAI(void)
FILE: src/engine/botlib/be_ai_weap.c
type weaponconfig_t (line 113) | typedef struct weaponconfig_s
type bot_weaponstate_t (line 122) | typedef struct bot_weaponstate_s
function BotValidWeaponNumber (line 137) | int BotValidWeaponNumber(int weaponnum)
function bot_weaponstate_t (line 152) | bot_weaponstate_t *BotWeaponStateFromHandle(int handle)
function DumpWeaponConfig (line 173) | void DumpWeaponConfig(weaponconfig_t *wc)
function weaponconfig_t (line 198) | weaponconfig_t *LoadWeaponConfig(char *filename)
function BotFreeWeaponWeights (line 349) | void BotFreeWeaponWeights(int weaponstate)
function BotLoadWeaponWeights (line 364) | int BotLoadWeaponWeights(int weaponstate, char *filename)
function BotGetWeaponInfo (line 388) | void BotGetWeaponInfo(int weaponstate, int weapon, weaponinfo_t *weaponi...
function BotChooseBestFightWeapon (line 404) | int BotChooseBestFightWeapon(int weaponstate, int *inventory)
function BotResetWeaponState (line 441) | void BotResetWeaponState(int weaponstate)
function BotAllocWeaponState (line 462) | int BotAllocWeaponState(void)
function BotFreeWeaponState (line 482) | void BotFreeWeaponState(int handle)
function BotSetupWeaponAI (line 504) | int BotSetupWeaponAI(void)
function BotShutdownWeaponAI (line 528) | void BotShutdownWeaponAI(void)
FILE: src/engine/botlib/be_ai_weight.c
function ReadValue (line 59) | int ReadValue(source_t *source, float *value)
function ReadFuzzyWeight (line 83) | int ReadFuzzyWeight(source_t *source, fuzzyseperator_t *fs)
function FreeFuzzySeperators_r (line 112) | void FreeFuzzySeperators_r(fuzzyseperator_t *fs)
function FreeWeightConfig2 (line 125) | void FreeWeightConfig2(weightconfig_t *config)
function FreeWeightConfig (line 142) | void FreeWeightConfig(weightconfig_t *config)
function fuzzyseperator_t (line 153) | fuzzyseperator_t *ReadFuzzySeperators_r(source_t *source)
function weightconfig_t (line 279) | weightconfig_t *ReadWeightConfig(char *filename)
function qboolean (line 445) | qboolean WriteFuzzyWeight(FILE *fp, fuzzyseperator_t *fs)
function qboolean (line 471) | qboolean WriteFuzzySeperators_r(FILE *fp, fuzzyseperator_t *fs, int indent)
function qboolean (line 522) | qboolean WriteWeightConfig(char *filename, weightconfig_t *config)
function FindFuzzyWeight (line 557) | int FindFuzzyWeight(weightconfig_t *wc, char *name)
function FuzzyWeight_r (line 576) | float FuzzyWeight_r(int *inventory, fuzzyseperator_t *fs)
function FuzzyWeightUndecided_r (line 610) | float FuzzyWeightUndecided_r(int *inventory, fuzzyseperator_t *fs)
function FuzzyWeight (line 644) | float FuzzyWeight(int *inventory, weightconfig_t *wc, int weightnum)
function FuzzyWeightUndecided (line 675) | float FuzzyWeightUndecided(int *inventory, weightconfig_t *wc, int weigh...
function EvolveFuzzySeperator_r (line 706) | void EvolveFuzzySeperator_r(fuzzyseperator_t *fs)
function EvolveWeightConfig (line 729) | void EvolveWeightConfig(weightconfig_t *config)
function ScaleFuzzySeperator_r (line 744) | void ScaleFuzzySeperator_r(fuzzyseperator_t *fs, float scale)
function ScaleWeight (line 766) | void ScaleWeight(weightconfig_t *config, char *name, float scale)
function ScaleFuzzySeperatorBalanceRange_r (line 787) | void ScaleFuzzySeperatorBalanceRange_r(fuzzyseperator_t *fs, float scale)
function ScaleFuzzyBalanceRange (line 812) | void ScaleFuzzyBalanceRange(weightconfig_t *config, float scale)
function InterbreedFuzzySeperator_r (line 829) | int InterbreedFuzzySeperator_r(fuzzyseperator_t *fs1, fuzzyseperator_t *...
function InterbreedWeightConfigs (line 876) | void InterbreedWeightConfigs(weightconfig_t *config1, weightconfig_t *co...
function BotShutdownWeights (line 900) | void BotShutdownWeights(void)
FILE: src/engine/botlib/be_ai_weight.h
type fuzzyseperator_t (line 36) | typedef struct fuzzyseperator_s
type weight_t (line 49) | typedef struct weight_s
type weightconfig_t (line 56) | typedef struct weightconfig_s
FILE: src/engine/botlib/be_ea.c
function EA_Say (line 52) | void EA_Say(int client, char *str)
function EA_SayTeam (line 62) | void EA_SayTeam(int client, char *str)
function EA_Tell (line 72) | void EA_Tell(int client, int clientto, char *str)
function EA_UseItem (line 82) | void EA_UseItem(int client, char *it)
function EA_DropItem (line 92) | void EA_DropItem(int client, char *it)
function EA_UseInv (line 102) | void EA_UseInv(int client, char *inv)
function EA_DropInv (line 112) | void EA_DropInv(int client, char *inv)
function EA_Gesture (line 122) | void EA_Gesture(int client)
function EA_Command (line 136) | void EA_Command(int client, char *command)
function EA_SelectWeapon (line 146) | void EA_SelectWeapon(int client, int weapon)
function EA_Attack (line 160) | void EA_Attack(int client)
function EA_Talk (line 174) | void EA_Talk(int client)
function EA_Use (line 188) | void EA_Use(int client)
function EA_Respawn (line 202) | void EA_Respawn(int client)
function EA_Jump (line 216) | void EA_Jump(int client)
function EA_DelayedJump (line 237) | void EA_DelayedJump(int client)
function EA_Crouch (line 258) | void EA_Crouch(int client)
function EA_Walk (line 272) | void EA_Walk(int client)
function EA_Action (line 286) | void EA_Action(int client, int action)
function EA_MoveUp (line 300) | void EA_MoveUp(int client)
function EA_MoveDown (line 314) | void EA_MoveDown(int client)
function EA_MoveForward (line 328) | void EA_MoveForward(int client)
function EA_MoveBack (line 342) | void EA_MoveBack(int client)
function EA_MoveLeft (line 356) | void EA_MoveLeft(int client)
function EA_MoveRight (line 370) | void EA_MoveRight(int client)
function EA_Move (line 384) | void EA_Move(int client, vec3_t dir, float speed)
function EA_View (line 402) | void EA_View(int client, vec3_t viewangles)
function EA_EndRegular (line 416) | void EA_EndRegular(int client, float thinktime)
function EA_GetInput (line 443) | void EA_GetInput(int client, float thinktime, bot_input_t *input)
function EA_ResetInput (line 470) | void EA_ResetInput(int client)
function EA_Setup (line 491) | int EA_Setup(void)
function EA_Shutdown (line 504) | void EA_Shutdown(void)
FILE: src/engine/botlib/be_interface.c
function Sys_MilliSeconds (line 77) | int Sys_MilliSeconds(void)
function qboolean (line 87) | qboolean ValidClientNumber(int num, char *str)
function qboolean (line 104) | qboolean ValidEntityNumber(int num, char *str)
function qboolean (line 120) | qboolean BotLibSetup(char *str)
function Export_BotLibSetup (line 136) | int Export_BotLibSetup(void)
function Export_BotLibShutdown (line 175) | int Export_BotLibShutdown(void)
function Export_BotLibVarSet (line 218) | int Export_BotLibVarSet(char *var_name, char *value)
function Export_BotLibVarGet (line 229) | int Export_BotLibVarGet(char *var_name, char *value, int size)
function Export_BotLibStartFrame (line 244) | int Export_BotLibStartFrame(float time)
function Export_BotLibLoadMap (line 255) | int Export_BotLibLoadMap(const char *mapname)
function Export_BotLibUpdateEntity (line 285) | int Export_BotLibUpdateEntity(int ent, bot_entitystate_t *state)
type bot_avoidspot_s (line 304) | struct bot_avoidspot_s
function BotExportTest (line 318) | int BotExportTest(int parm0, char *parm1, vec3_t parm2, vec3_t parm3)
function Init_AAS_Export (line 655) | static void Init_AAS_Export( aas_export_t *aas ) {
function Init_EA_Export (line 710) | static void Init_EA_Export( ea_export_t *ea ) {
function Init_AI_Export (line 746) | static void Init_AI_Export( ai_export_t *ai ) {
function botlib_export_t (line 848) | botlib_export_t *GetBotLibAPI(int apiVersion, botlib_import_t *import) {
FILE: src/engine/botlib/be_interface.h
type botlib_globals_t (line 36) | typedef struct botlib_globals_s
FILE: src/engine/botlib/l_crc.c
function CRC_Init (line 92) | void CRC_Init(unsigned short *crcvalue)
function CRC_ProcessByte (line 102) | void CRC_ProcessByte(unsigned short *crcvalue, byte data)
function CRC_Value (line 112) | unsigned short CRC_Value(unsigned short crcvalue)
function CRC_ProcessString (line 122) | unsigned short CRC_ProcessString(unsigned char *data, int length)
function CRC_ContinueProcessString (line 143) | void CRC_ContinueProcessString(unsigned short *crc, char *data, int length)
FILE: src/engine/botlib/l_crc.h
type crc_t (line 23) | typedef unsigned short crc_t;
FILE: src/engine/botlib/l_libvar.c
function LibVarStringValue (line 45) | float LibVarStringValue(char *string)
function libvar_t (line 83) | libvar_t *LibVarAlloc(char *var_name)
function LibVarDeAlloc (line 102) | void LibVarDeAlloc(libvar_t *v)
function LibVarDeAllocAll (line 113) | void LibVarDeAllocAll(void)
function libvar_t (line 130) | libvar_t *LibVarGet(char *var_name)
function LibVarGetValue (line 169) | float LibVarGetValue(char *var_name)
function libvar_t (line 189) | libvar_t *LibVar(char *var_name, char *value)
function LibVarValue (line 225) | float LibVarValue(char *var_name, char *value)
function LibVarSet (line 238) | void LibVarSet(char *var_name, char *value)
function qboolean (line 265) | qboolean LibVarChanged(char *var_name)
function LibVarSetNotModified (line 285) | void LibVarSetNotModified(char *var_name)
FILE: src/engine/botlib/l_libvar.h
type libvar_t (line 33) | typedef struct libvar_s
FILE: src/engine/botlib/l_log.c
type logfile_t (line 43) | typedef struct logfile_s
function Log_Open (line 58) | void Log_Open(char *filename)
function Log_Close (line 86) | void Log_Close(void)
function Log_Shutdown (line 103) | void Log_Shutdown(void)
function Log_Write (line 113) | void QDECL Log_Write(char *fmt, ...)
function Log_WriteTimeStamped (line 130) | void QDECL Log_WriteTimeStamped(char *fmt, ...)
function FILE (line 155) | FILE *Log_FilePointer(void)
function Log_Flush (line 165) | void Log_Flush(void)
FILE: src/engine/botlib/l_memory.c
type memoryblock_t (line 49) | typedef struct memoryblock_s
function LinkMemoryBlock (line 70) | void LinkMemoryBlock(memoryblock_t *block)
function UnlinkMemoryBlock (line 83) | void UnlinkMemoryBlock(memoryblock_t *block)
function memoryblock_t (line 199) | memoryblock_t *BlockFromPointer(void *ptr, char *str)
function FreeMemory (line 231) | void FreeMemory(void *ptr)
function AvailableMemory (line 253) | int AvailableMemory(void)
function MemoryByteSize (line 263) | int MemoryByteSize(void *ptr)
function PrintUsedMemorySize (line 277) | void PrintUsedMemorySize(void)
function PrintMemoryLabels (line 289) | void PrintMemoryLabels(void)
function DumpMemory (line 319) | void DumpMemory(void)
function FreeMemory (line 423) | void FreeMemory(void *ptr)
function AvailableMemory (line 440) | int AvailableMemory(void)
function PrintUsedMemorySize (line 450) | void PrintUsedMemorySize(void)
function PrintMemoryLabels (line 459) | void PrintMemoryLabels(void)
FILE: src/engine/botlib/l_precomp.c
type qboolean (line 52) | typedef enum {qfalse, qtrue} qboolean;
type directive_t (line 102) | typedef struct directive_s
function SourceError (line 128) | void QDECL SourceError(source_t *source, char *str, ...)
function SourceWarning (line 152) | void QDECL SourceWarning(source_t *source, char *str, ...)
function PC_PushIndent (line 176) | void PC_PushIndent(source_t *source, int type, int skip)
function PC_PopIndent (line 194) | void PC_PopIndent(source_t *source, int *type, int *skip)
function PC_PushScript (line 219) | void PC_PushScript(source_t *source, script_t *script)
function PC_InitTokenHeap (line 241) | void PC_InitTokenHeap(void)
function token_t (line 262) | token_t *PC_CopyToken(token_t *token)
function PC_FreeToken (line 290) | void PC_FreeToken(token_t *token)
function PC_ReadSourceToken (line 304) | int PC_ReadSourceToken(source_t *source, token_t *token)
function PC_UnreadSourceToken (line 347) | int PC_UnreadSourceToken(source_t *source, token_t *token)
function PC_ReadDefineParms (line 362) | int PC_ReadDefineParms(source_t *source, define_t *define, token_t **par...
function PC_StringizeTokens (line 461) | int PC_StringizeTokens(token_t *tokens, token_t *token)
function PC_MergeTokens (line 483) | int PC_MergeTokens(token_t *t1, token_t *t2)
function PC_PrintDefineHashTable (line 527) | void PC_PrintDefineHashTable(define_t **definehash)
function PC_NameHash (line 550) | int PC_NameHash(char *name)
function PC_AddDefineToHash (line 570) | void PC_AddDefineToHash(define_t *define, define_t **definehash)
function define_t (line 584) | define_t *PC_FindHashedDefine(define_t **definehash, char *name)
function define_t (line 603) | define_t *PC_FindDefine(define_t *defines, char *name)
function PC_FindDefineParm (line 620) | int PC_FindDefineParm(define_t *define, char *name)
function PC_FreeDefine (line 639) | void PC_FreeDefine(define_t *define)
function PC_AddBuiltinDefines (line 664) | void PC_AddBuiltinDefines(source_t *source)
function PC_ExpandBuiltinDefine (line 707) | int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t...
function PC_ExpandDefine (line 784) | int PC_ExpandDefine(source_t *source, token_t *deftoken, define_t *define,
function PC_ExpandDefineIntoSource (line 922) | int PC_ExpandDefineIntoSource(source_t *source, token_t *deftoken, defin...
function PC_ConvertPath (line 942) | void PC_ConvertPath(char *path)
function PC_Directive_include (line 972) | int PC_Directive_include(source_t *source)
function PC_ReadLine (line 1064) | int PC_ReadLine(source_t *source, token_t *token)
function PC_WhiteSpaceBeforeToken (line 1088) | int PC_WhiteSpaceBeforeToken(token_t *token)
function PC_ClearTokenWhiteSpace (line 1098) | void PC_ClearTokenWhiteSpace(token_t *token)
function PC_Directive_undef (line 1110) | int PC_Directive_undef(source_t *source)
function PC_Directive_define (line 1178) | int PC_Directive_define(source_t *source)
function define_t (line 1321) | define_t *PC_DefineFromString(char *string)
function PC_AddDefine (line 1379) | int PC_AddDefine(source_t *source, char *string)
function PC_AddGlobalDefine (line 1400) | int PC_AddGlobalDefine(char *string)
function PC_RemoveGlobalDefine (line 1417) | int PC_RemoveGlobalDefine(char *name)
function PC_RemoveAllGlobalDefines (line 1436) | void PC_RemoveAllGlobalDefines(void)
function define_t (line 1452) | define_t *PC_CopyDefine(source_t *source, define_t *define)
function PC_AddGlobalDefinesToSource (line 1495) | void PC_AddGlobalDefinesToSource(source_t *source)
function PC_Directive_if_def (line 1516) | int PC_Directive_if_def(source_t *source, int type)
function PC_Directive_ifdef (line 1548) | int PC_Directive_ifdef(source_t *source)
function PC_Directive_ifndef (line 1558) | int PC_Directive_ifndef(source_t *source)
function PC_Directive_else (line 1568) | int PC_Directive_else(source_t *source)
function PC_Directive_endif (line 1592) | int PC_Directive_endif(source_t *source)
type operator_t (line 1610) | typedef struct operator_s
type value_t (line 1618) | typedef struct value_s
function PC_OperatorPriority (line 1626) | int PC_OperatorPriority(int op)
function PC_EvaluateTokens (line 1688) | int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int...
FILE: src/engine/botlib/l_precomp.h
type define_t (line 71) | typedef struct define_s
type indent_t (line 86) | typedef struct indent_s
type source_t (line 95) | typedef struct source_s
type pc_token_t (line 164) | typedef struct pc_token_s
FILE: src/engine/botlib/l_script.c
type qboolean (line 46) | typedef enum {qfalse, qtrue} qboolean;
function PS_CreatePunctuationTable (line 175) | void PS_CreatePunctuationTable(script_t *script, punctuation_t *punctuat...
function ScriptError (line 231) | void QDECL ScriptError(script_t *script, char *str, ...)
function ScriptWarning (line 257) | void QDECL ScriptWarning(script_t *script, char *str, ...)
function SetScriptPunctuations (line 283) | void SetScriptPunctuations(script_t *script, punctuation_t *p)
function PS_ReadWhiteSpace (line 300) | int PS_ReadWhiteSpace(script_t *script)
function PS_ReadEscapeCharacter (line 359) | int PS_ReadEscapeCharacter(script_t *script, char *ch)
function PS_ReadString (line 437) | int PS_ReadString(script_t *script, token_t *token, int quote)
function PS_ReadName (line 526) | int PS_ReadName(script_t *script, token_t *token)
function NumberValue (line 556) | void NumberValue(char *string, int subtype, unsigned long int *intvalue,
function PS_ReadNumber (line 628) | int PS_ReadNumber(script_t *script, token_t *token)
function PS_ReadLiteral (line 736) | int PS_ReadLiteral(script_t *script, token_t *token)
function PS_ReadPrimitive (line 824) | int PS_ReadPrimitive(script_t *script, token_t *token)
function PS_ReadToken (line 850) | int PS_ReadToken(script_t *script, token_t *token)
function PS_ExpectTokenString (line 924) | int PS_ExpectTokenString(script_t *script, char *string)
function PS_ExpectTokenType (line 947) | int PS_ExpectTokenType(script_t *script, int type, int subtype, token_t ...
function PS_ExpectAnyToken (line 1005) | int PS_ExpectAnyToken(script_t *script, token_t *token)
function PS_CheckTokenString (line 1023) | int PS_CheckTokenString(script_t *script, char *string)
function PS_CheckTokenType (line 1040) | int PS_CheckTokenType(script_t *script, int type, int subtype, token_t *...
function PS_SkipUntilString (line 1062) | int PS_SkipUntilString(script_t *script, char *string)
function PS_UnreadLastToken (line 1078) | void PS_UnreadLastToken(script_t *script)
function PS_UnreadToken (line 1088) | void PS_UnreadToken(script_t *script, token_t *token)
function PS_NextWhiteSpaceChar (line 1100) | char PS_NextWhiteSpaceChar(script_t *script)
function StripDoubleQuotes (line 1117) | void StripDoubleQuotes(char *string)
function StripSingleQuotes (line 1134) | void StripSingleQuotes(char *string)
function ReadSignedFloat (line 1151) | long double ReadSignedFloat(script_t *script)
function ReadSignedInt (line 1174) | signed long int ReadSignedInt(script_t *script)
function SetScriptFlags (line 1197) | void SetScriptFlags(script_t *script, int flags)
function GetScriptFlags (line 1207) | int GetScriptFlags(script_t *script)
function ResetScript (line 1217) | void ResetScript(script_t *script)
function EndOfScript (line 1242) | int EndOfScript(script_t *script)
function NumLinesCrossed (line 1252) | int NumLinesCrossed(script_t *script)
function ScriptSkipTo (line 1262) | int ScriptSkipTo(script_t *script, char *value)
function FileLength (line 1289) | int FileLength(FILE *fp)
function script_t (line 1308) | script_t *LoadScriptFile(const char *filename)
function script_t (line 1377) | script_t *LoadScriptMemory(char *ptr, int length, char *name)
function FreeScript (line 1413) | void FreeScript(script_t *script)
function PS_SetBaseFolder (line 1426) | void PS_SetBaseFolder(char *path)
FILE: src/engine/botlib/l_script.h
type punctuation_t (line 149) | typedef struct punctuation_s
type token_t (line 157) | typedef struct token_s
type script_t (line 174) | typedef struct script_s
FILE: src/engine/botlib/l_struct.c
function fielddef_t (line 60) | fielddef_t *FindField(fielddef_t *defs, char *name)
function qboolean (line 76) | qboolean ReadNumber(source_t *source, fielddef_t *fd, void *p)
function qboolean (line 191) | qboolean ReadChar(source_t *source, fielddef_t *fd, void *p)
function ReadString (line 216) | int ReadString(source_t *source, fielddef_t *fd, void *p)
function ReadStructure (line 236) | int ReadStructure(source_t *source, structdef_t *def, char *structure)
function WriteIndent (line 330) | int WriteIndent(FILE *fp, int indent)
function WriteFloat (line 344) | int WriteFloat(FILE *fp, float value)
function WriteStructWithIndent (line 372) | int WriteStructWithIndent(FILE *fp, structdef_t *def, char *structure, i...
function WriteStructure (line 458) | int WriteStructure(FILE *fp, structdef_t *def, char *structure)
FILE: src/engine/botlib/l_struct.h
type fielddef_t (line 48) | typedef struct fielddef_s
type structdef_t (line 60) | typedef struct structdef_s
FILE: src/engine/client/cl_cgame.c
function CL_GetGameState (line 39) | void CL_GetGameState( gameState_t *gs ) {
function CL_GetGlconfig (line 48) | void CL_GetGlconfig( glconfig_t *glconfig ) {
function qboolean (line 58) | qboolean CL_GetUserCmd( int cmdNumber, usercmd_t *ucmd ) {
function CL_GetCurrentCmdNumber (line 77) | int CL_GetCurrentCmdNumber( void ) {
function qboolean (line 87) | qboolean CL_GetParseEntityState( int parseEntityNumber, entityState_t *s...
function CL_GetCurrentSnapshotNumber (line 108) | void CL_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime ) {
function qboolean (line 118) | qboolean CL_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ) {
function CL_SetUserCmdValue (line 171) | void CL_SetUserCmdValue( int userCmdValue, float sensitivityScale ) {
function CL_AddCgameCommand (line 181) | void CL_AddCgameCommand( const char *cmdName ) {
function CL_CgameError (line 190) | void CL_CgameError( const char *string ) {
function CL_ConfigstringModified (line 200) | void CL_ConfigstringModified( void ) {
function qboolean (line 264) | qboolean CL_GetServerCommand( int serverCommandNumber ) {
function CL_CM_LoadMap (line 377) | void CL_CM_LoadMap( const char *mapname ) {
function CL_ShutdownCGame (line 389) | void CL_ShutdownCGame( void ) {
function FloatAsInt (line 400) | static int FloatAsInt( float f ) {
function CL_CgameSystemCalls (line 418) | intptr_t CL_CgameSystemCalls( intptr_t *args ) {
function CL_InitCGame (line 717) | void CL_InitCGame( void ) {
function qboolean (line 781) | qboolean CL_GameCommand( void ) {
function CL_CGameRendering (line 796) | void CL_CGameRendering( stereoFrame_t stereo ) {
function CL_AdjustTimeDelta (line 824) | void CL_AdjustTimeDelta( void ) {
function CL_FirstSnapshot (line 887) | void CL_FirstSnapshot( void ) {
function CL_SetCGameTime (line 917) | void CL_SetCGameTime( void ) {
FILE: src/engine/client/cl_cin.c
type cinematics_t (line 80) | typedef struct {
type cin_cache (line 93) | typedef struct {
function CIN_CloseAllVideos (line 142) | void CIN_CloseAllVideos(void) {
function CIN_HandleForVideo (line 153) | static int CIN_HandleForVideo(void) {
function RllSetupTable (line 177) | static void RllSetupTable()
function RllDecodeMonoToMono (line 202) | long RllDecodeMonoToMono(unsigned char *from,short *to,unsigned int size...
function RllDecodeMonoToStereo (line 233) | long RllDecodeMonoToStereo(unsigned char *from,short *to,unsigned int si...
function RllDecodeStereoToStereo (line 265) | long RllDecodeStereoToStereo(unsigned char *from,short *to,unsigned int ...
function RllDecodeStereoToMono (line 303) | long RllDecodeStereoToMono(unsigned char *from,short *to,unsigned int si...
function move8_32 (line 333) | static void move8_32( byte *src, byte *dst, int spl )
function move4_32 (line 367) | static void move4_32( byte *src, byte *dst, int spl )
function blit8_32 (line 393) | static void blit8_32( byte *src, byte *dst, int spl )
function blit4_32 (line 427) | static void blit4_32( byte *src, byte *dst, int spl )
function blit2_32 (line 453) | static void blit2_32( byte *src, byte *dst, int spl )
function blitVQQuad32fs (line 474) | static void blitVQQuad32fs( byte **status, unsigned char *data )
function ROQ_GenYUVTables (line 560) | static void ROQ_GenYUVTables( void )
function yuv_to_rgb (line 624) | static unsigned short yuv_to_rgb( long y, long u, long v )
function yuv_to_rgb24 (line 647) | static inline unsigned int yuv_to_rgb24( long y, long u, long v )
function yuv_to_rgb24 (line 664) | static unsigned int yuv_to_rgb24( long y, long u, long v )
function decodeCodeBook (line 687) | static void decodeCodeBook( byte *input, unsigned short roq_flags )
function recurseQuad (line 946) | static void recurseQuad( long startX, long startY, long quadSize, long x...
function setupQuad (line 987) | static void setupQuad( long xOff, long yOff )
function readQuadInfo (line 1031) | static void readQuadInfo( byte *qData )
function RoQPrepMcomp (line 1067) | static void RoQPrepMcomp( long xoff, long yoff )
function initRoQ (line 1091) | static void initRoQ()
function RoQReset (line 1125) | static void RoQReset() {
function RoQInterrupt (line 1147) | static void RoQInterrupt(void)
function RoQ_init (line 1283) | static void RoQ_init( void )
function RoQShutdown (line 1315) | static void RoQShutdown( void ) {
function e_status (line 1356) | e_status CIN_StopCinematic(int handle) {
function e_status (line 1387) | e_status CIN_RunCinematic (int handle)
function CIN_PlayCinematic (line 1463) | int CIN_PlayCinematic( const char *arg, int x, int y, int w, int h, int ...
function CIN_SetExtents (line 1551) | void CIN_SetExtents (int handle, int x, int y, int w, int h) {
function CIN_SetLooping (line 1560) | void CIN_SetLooping(int handle, qboolean loop) {
function CIN_DrawCinematic (line 1571) | void CIN_DrawCinematic (int handle) {
function CL_PlayCinematic_f (line 1647) | void CL_PlayCinematic_f(void) {
function SCR_DrawCinematic (line 1679) | void SCR_DrawCinematic (void) {
function SCR_RunCinematic (line 1685) | void SCR_RunCinematic (void)
function SCR_StopCinematic (line 1692) | void SCR_StopCinematic(void) {
function CIN_UploadCinematic (line 1700) | void CIN_UploadCinematic(int handle) {
FILE: src/engine/client/cl_console.c
type console_t (line 33) | typedef struct {
function Con_ToggleConsole_f (line 73) | void Con_ToggleConsole_f (void) {
function Con_MessageMode_f (line 92) | void Con_MessageMode_f (void) {
function Con_MessageMode2_f (line 106) | void Con_MessageMode2_f (void) {
function Con_MessageMode3_f (line 119) | void Con_MessageMode3_f (void) {
function Con_MessageMode4_f (line 136) | void Con_MessageMode4_f (void) {
function Con_Clear_f (line 153) | void Con_Clear_f (void) {
function Con_Dump_f (line 171) | void Con_Dump_f (void)
function Con_ClearNotify (line 231) | void Con_ClearNotify( void ) {
function Con_CheckResize (line 248) | void Con_CheckResize (void)
function Con_Init (line 312) | void Con_Init (void) {
function Con_Linefeed (line 340) | void Con_Linefeed (qboolean skipnotify)
function CL_ConsolePrint (line 370) | void CL_ConsolePrint( char *txt ) {
function Con_DrawInput (line 477) | void Con_DrawInput (void) {
function Con_DrawNotify (line 502) | void Con_DrawNotify (void)
function Con_DrawSolidConsole (line 580) | void Con_DrawSolidConsole( float frac ) {
function Con_DrawConsole (line 695) | void Con_DrawConsole( void ) {
function Con_RunConsole (line 726) | void Con_RunConsole (void) {
function Con_PageUp (line 751) | void Con_PageUp( void ) {
function Con_PageDown (line 758) | void Con_PageDown( void ) {
function Con_Top (line 765) | void Con_Top( void ) {
function Con_Bottom (line 772) | void Con_Bottom( void ) {
function Con_Close (line 777) | void Con_Close( void ) {
FILE: src/engine/client/cl_input.c
function IN_MLookDown (line 61) | void IN_MLookDown( void ) {
function IN_MLookUp (line 65) | void IN_MLookUp( void ) {
function IN_KeyDown (line 72) | void IN_KeyDown( kbutton_t *b ) {
function IN_KeyUp (line 108) | void IN_KeyUp( kbutton_t *b ) {
function CL_KeyState (line 157) | float CL_KeyState( kbutton_t *key ) {
function IN_UpDown (line 193) | void IN_UpDown(void) {IN_KeyDown(&in_up);}
function IN_UpUp (line 194) | void IN_UpUp(void) {IN_KeyUp(&in_up);}
function IN_DownDown (line 195) | void IN_DownDown(void) {IN_KeyDown(&in_down);}
function IN_DownUp (line 196) | void IN_DownUp(void) {IN_KeyUp(&in_down);}
function IN_LeftDown (line 197) | void IN_LeftDown(void) {IN_KeyDown(&in_left);}
function IN_LeftUp (line 198) | void IN_LeftUp(void) {IN_KeyUp(&in_left);}
function IN_RightDown (line 199) | void IN_RightDown(void) {IN_KeyDown(&in_right);}
function IN_RightUp (line 200) | void IN_RightUp(void) {IN_KeyUp(&in_right);}
function IN_ForwardDown (line 201) | void IN_ForwardDown(void) {IN_KeyDown(&in_forward);}
function IN_ForwardUp (line 202) | void IN_ForwardUp(void) {IN_KeyUp(&in_forward);}
function IN_BackDown (line 203) | void IN_BackDown(void) {IN_KeyDown(&in_back);}
function IN_BackUp (line 204) | void IN_BackUp(void) {IN_KeyUp(&in_back);}
function IN_LookupDown (line 205) | void IN_LookupDown(void) {IN_KeyDown(&in_lookup);}
function IN_LookupUp (line 206) | void IN_LookupUp(void) {IN_KeyUp(&in_lookup);}
function IN_LookdownDown (line 207) | void IN_LookdownDown(void) {IN_KeyDown(&in_lookdown);}
function IN_LookdownUp (line 208) | void IN_LookdownUp(void) {IN_KeyUp(&in_lookdown);}
function IN_MoveleftDown (line 209) | void IN_MoveleftDown(void) {IN_KeyDown(&in_moveleft);}
function IN_MoveleftUp (line 210) | void IN_MoveleftUp(void) {IN_KeyUp(&in_moveleft);}
function IN_MoverightDown (line 211) | void IN_MoverightDown(void) {IN_KeyDown(&in_moveright);}
function IN_MoverightUp (line 212) | void IN_MoverightUp(void) {IN_KeyUp(&in_moveright);}
function IN_SpeedDown (line 214) | void IN_SpeedDown(void) {IN_KeyDown(&in_speed);}
function IN_SpeedUp (line 215) | void IN_SpeedUp(void) {IN_KeyUp(&in_speed);}
function IN_StrafeDown (line 216) | void IN_StrafeDown(void) {IN_KeyDown(&in_strafe);}
function IN_StrafeUp (line 217) | void IN_StrafeUp(void) {IN_KeyUp(&in_strafe);}
function IN_Button0Down (line 219) | void IN_Button0Down(void) {IN_KeyDown(&in_buttons[0]);}
function IN_Button0Up (line 220) | void IN_Button0Up(void) {IN_KeyUp(&in_buttons[0]);}
function IN_Button1Down (line 221) | void IN_Button1Down(void) {IN_KeyDown(&in_buttons[1]);}
function IN_Button1Up (line 222) | void IN_Button1Up(void) {IN_KeyUp(&in_buttons[1]);}
function IN_Button2Down (line 223) | void IN_Button2Down(void) {IN_KeyDown(&in_buttons[2]);}
function IN_Button2Up (line 224) | void IN_Button2Up(void) {IN_KeyUp(&in_buttons[2]);}
function IN_Button3Down (line 225) | void IN_Button3Down(void) {IN_KeyDown(&in_buttons[3]);}
function IN_Button3Up (line 226) | void IN_Button3Up(void) {IN_KeyUp(&in_buttons[3]);}
function IN_Button4Down (line 227) | void IN_Button4Down(void) {IN_KeyDown(&in_buttons[4]);}
function IN_Button4Up (line 228) | void IN_Button4Up(void) {IN_KeyUp(&in_buttons[4]);}
function IN_Button5Down (line 229) | void IN_Button5Down(void) {IN_KeyDown(&in_buttons[5]);}
function IN_Button5Up (line 230) | void IN_Button5Up(void) {IN_KeyUp(&in_buttons[5]);}
function IN_Button6Down (line 231) | void IN_Button6Down(void) {IN_KeyDown(&in_buttons[6]);}
function IN_Button6Up (line 232) | void IN_Button6Up(void) {IN_KeyUp(&in_buttons[6]);}
function IN_Button7Down (line 233) | void IN_Button7Down(void) {IN_KeyDown(&in_buttons[7]);}
function IN_Button7Up (line 234) | void IN_Button7Up(void) {IN_KeyUp(&in_buttons[7]);}
function IN_Button8Down (line 235) | void IN_Button8Down(void) {IN_KeyDown(&in_buttons[8]);}
function IN_Button8Up (line 236) | void IN_Button8Up(void) {IN_KeyUp(&in_buttons[8]);}
function IN_Button9Down (line 237) | void IN_Button9Down(void) {IN_KeyDown(&in_buttons[9]);}
function IN_Button9Up (line 238) | void IN_Button9Up(void) {IN_KeyUp(&in_buttons[9]);}
function IN_Button10Down (line 239) | void IN_Button10Down(void) {IN_KeyDown(&in_buttons[10]);}
function IN_Button10Up (line 240) | void IN_Button10Up(void) {IN_KeyUp(&in_buttons[10]);}
function IN_Button11Down (line 241) | void IN_Button11Down(void) {IN_KeyDown(&in_buttons[11]);}
function IN_Button11Up (line 242) | void IN_Button11Up(void) {IN_KeyUp(&in_buttons[11]);}
function IN_Button12Down (line 243) | void IN_Button12Down(void) {IN_KeyDown(&in_buttons[12]);}
function IN_Button12Up (line 244) | void IN_Button12Up(void) {IN_KeyUp(&in_buttons[12]);}
function IN_Button13Down (line 245) | void IN_Button13Down(void) {IN_KeyDown(&in_buttons[13]);}
function IN_Button13Up (line 246) | void IN_Button13Up(void) {IN_KeyUp(&in_buttons[13]);}
function IN_Button14Down (line 247) | void IN_Button14Down(void) {IN_KeyDown(&in_buttons[14]);}
function IN_Button14Up (line 248) | void IN_Button14Up(void) {IN_KeyUp(&in_buttons[14]);}
function IN_Button15Down (line 249) | void IN_Button15Down(void) {IN_KeyDown(&in_buttons[15]);}
function IN_Button15Up (line 250) | void IN_Button15Up(void) {IN_KeyUp(&in_buttons[15]);}
function IN_ButtonDown (line 252) | void IN_ButtonDown (void) {
function IN_ButtonUp (line 254) | void IN_ButtonUp (void) {
function IN_CenterView (line 257) | void IN_CenterView (void) {
function CL_AdjustAngles (line 283) | void CL_AdjustAngles( void ) {
function CL_KeyMove (line 308) | void CL_KeyMove( usercmd_t *cmd ) {
function CL_MouseEvent (line 353) | void CL_MouseEvent( int dx, int dy, int time ) {
function CL_JoystickEvent (line 371) | void CL_JoystickEvent( int axis, int value, int time ) {
function CL_JoystickMove (line 383) | void CL_JoystickMove( usercmd_t *cmd ) {
function CL_MouseMove (line 420) | void CL_MouseMove( usercmd_t *cmd ) {
function CL_CmdButtons (line 474) | void CL_CmdButtons( usercmd_t *cmd ) {
function CL_FinishMove (line 506) | void CL_FinishMove( usercmd_t *cmd ) {
function usercmd_t (line 527) | usercmd_t CL_CreateCmd( void ) {
function CL_CreateNewCommands (line 580) | void CL_CreateNewCommands( void ) {
function qboolean (line 617) | qboolean CL_ReadyToSendPacket( void ) {
function CL_WritePacket (line 688) | void CL_WritePacket( void ) {
function CL_SendCmd (line 807) | void CL_SendCmd( void ) {
function CL_InitInput (line 837) | void CL_InitInput( void ) {
FILE: src/engine/client/cl_keys.c
type keyname_t (line 49) | typedef struct {
function Field_VariableSizeDraw (line 199) | void Field_VariableSizeDraw( field_t *edit, int x, int y, int width, int...
function Field_Draw (line 281) | void Field_Draw( field_t *edit, int x, int y, int width, qboolean showCu...
function Field_BigDraw (line 286) | void Field_BigDraw( field_t *edit, int x, int y, int width, qboolean sho...
function Field_Paste (line 296) | void Field_Paste( field_t *edit ) {
function Field_KeyDownEvent (line 325) | void Field_KeyDownEvent( field_t *edit, int key ) {
function Field_CharEvent (line 390) | void Field_CharEvent( field_t *edit, int ch ) {
function Console_Key (line 477) | void Console_Key (int key) {
function Message_Key (line 611) | void Message_Key( int key ) {
function qboolean (line 650) | qboolean Key_GetOverstrikeMode( void ) {
function Key_SetOverstrikeMode (line 655) | void Key_SetOverstrikeMode( qboolean state ) {
function qboolean (line 665) | qboolean Key_IsDown( int keynum ) {
function Key_StringToKeynum (line 687) | int Key_StringToKeynum( char *str ) {
function Key_SetBinding (line 785) | void Key_SetBinding( int keynum, const char *binding ) {
function Key_GetKey (line 823) | int Key_GetKey(const char *binding) {
function Key_Unbind_f (line 841) | void Key_Unbind_f (void)
function Key_Unbindall_f (line 866) | void Key_Unbindall_f (void)
function Key_Bind_f (line 881) | void Key_Bind_f (void)
function Key_WriteBindings (line 928) | void Key_WriteBindings( fileHandle_t f ) {
function Key_Bindlist_f (line 949) | void Key_Bindlist_f( void ) {
function CL_InitKeyCommands (line 964) | void CL_InitKeyCommands( void ) {
function CL_AddKeyUpCommands (line 977) | void CL_AddKeyUpCommands( int key, char *kb ) {
function CL_KeyEvent (line 1023) | void CL_KeyEvent (int key, qboolean down, unsigned time) {
function CL_CharEvent (line 1206) | void CL_CharEvent( int key ) {
function Key_ClearStates (line 1237) | void Key_ClearStates (void)
FILE: src/engine/client/cl_main.c
type serverStatus_t (line 82) | typedef struct serverStatus_s
function CL_CDDialog (line 112) | void CL_CDDialog( void ) {
function CL_AddReliableCommand (line 133) | void CL_AddReliableCommand( const char *cmd ) {
function CL_ChangeReliableCommand (line 151) | void CL_ChangeReliableCommand( void ) {
function CL_WriteDemoMessage (line 179) | void CL_WriteDemoMessage ( msg_t *msg, int headerBytes ) {
function CL_StopRecord_f (line 202) | void CL_StopRecord_f( void ) {
function CL_DemoFilename (line 226) | void CL_DemoFilename( int number, char *fileName ) {
function CL_Record_f (line 256) | void CL_Record_f( void ) {
function CL_DemoCompleted (line 396) | void CL_DemoCompleted( void ) {
function CL_ReadDemoMessage (line 416) | void CL_ReadDemoMessage( void ) {
function CL_WalkDemoExt (line 469) | static void CL_WalkDemoExt(char *arg, char *name, int *demofile)
function CL_PlayDemo_f (line 496) | void CL_PlayDemo_f( void ) {
function CL_StartDemoLoop (line 570) | void CL_StartDemoLoop( void ) {
function CL_NextDemo (line 584) | void CL_NextDemo( void ) {
function CL_ShutdownAll (line 608) | void CL_ShutdownAll(void) {
function CL_FlushMemory (line 637) | void CL_FlushMemory( void ) {
function CL_MapLoading (line 666) | void CL_MapLoading( void ) {
function CL_ClearState (line 705) | void CL_ClearState (void) {
function CL_Disconnect (line 723) | void CL_Disconnect( qboolean showMainMenu ) {
function CL_ForwardCommandToServer (line 787) | void CL_ForwardCommandToServer( const char *string ) {
function CL_RequestMotd (line 815) | void CL_RequestMotd( void ) {
function CL_RequestAuthorization (line 885) | void CL_RequestAuthorization( void ) {
function CL_ForwardToServer_f (line 946) | void CL_ForwardToServer_f( void ) {
function CL_Setenv_f (line 965) | void CL_Setenv_f( void ) {
function CL_Disconnect_f (line 998) | void CL_Disconnect_f( void ) {
function CL_Reconnect_f (line 1013) | void CL_Reconnect_f( void ) {
function CL_Connect_f (line 1028) | void CL_Connect_f( void ) {
function CL_Rcon_f (line 1102) | void CL_Rcon_f( void ) {
function CL_SendPureChecksums (line 1150) | void CL_SendPureChecksums( void ) {
function CL_ResetPureClientAtServer (line 1174) | void CL_ResetPureClientAtServer( void ) {
function CL_Vid_Restart_f (line 1188) | void CL_Vid_Restart_f( void ) {
function CL_Snd_Restart_f (line 1247) | void CL_Snd_Restart_f( void ) {
function CL_OpenedPK3List_f (line 1260) | void CL_OpenedPK3List_f( void ) {
function CL_ReferencedPK3List_f (line 1269) | void CL_ReferencedPK3List_f( void ) {
function CL_Configstrings_f (line 1278) | void CL_Configstrings_f( void ) {
function CL_Clientinfo_f (line 1301) | void CL_Clientinfo_f( void ) {
function CL_DownloadsComplete (line 1320) | void CL_DownloadsComplete( void ) {
function CL_BeginDownload (line 1377) | void CL_BeginDownload( const char *localName, const char *remoteName ) {
function CL_NextDownload (line 1406) | void CL_NextDownload(void) {
function CL_InitDownloads (line 1454) | void CL_InitDownloads(void) {
function CL_CheckForResend (line 1493) | void CL_CheckForResend( void ) {
function CL_DisconnectPacket (line 1567) | void CL_DisconnectPacket( netadr_t from ) {
function CL_MotdPacket (line 1596) | void CL_MotdPacket( netadr_t from ) {
function CL_InitServerInfo (line 1624) | void CL_InitServerInfo( serverInfo_t *server, serverAddress_t *address ) {
function CL_ServersResponsePacket (line 1650) | void CL_ServersResponsePacket( netadr_t from, msg_t *msg ) {
function CL_ConnectionlessPacket (line 1771) | void CL_ConnectionlessPacket( netadr_t from, msg_t *msg ) {
function CL_PacketEvent (line 1889) | void CL_PacketEvent( netadr_t from, msg_t *msg ) {
function CL_CheckTimeout (line 1948) | void CL_CheckTimeout( void ) {
function CL_CheckUserinfo (line 1974) | void CL_CheckUserinfo( void ) {
function CL_Frame (line 1997) | void CL_Frame ( int msec ) {
function CL_RefPrintf (line 2079) | void QDECL CL_RefPrintf( int print_level, const char *fmt, ...) {
function CL_ShutdownRef (line 2103) | void CL_ShutdownRef( void ) {
function CL_InitRenderer (line 2116) | void CL_InitRenderer( void ) {
function CL_StartHunkUsers (line 2136) | void CL_StartHunkUsers( void ) {
function CL_ScaledMilliseconds (line 2175) | int CL_ScaledMilliseconds(void) {
function CL_InitRef (line 2184) | void CL_InitRef( void ) {
function CL_SetModel_f (line 2246) | void CL_SetModel_f( void ) {
function CL_Init (line 2265) | void CL_Init( void ) {
function CL_Shutdown (line 2413) | void CL_Shutdown( void ) {
function CL_SetServerInfo (line 2461) | static void CL_SetServerInfo(serverInfo_t *server, const char *info, int...
function CL_SetServerInfoByAddress (line 2479) | static void CL_SetServerInfoByAddress(netadr_t from, const char *info, i...
function CL_ServerInfoPacket (line 2513) | void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) {
function serverStatus_t (line 2620) | serverStatus_t *CL_GetServerStatus( netadr_t from ) {
function CL_ServerStatus (line 2655) | int CL_ServerStatus( char *serverAddress, char *serverStatusString, int ...
function CL_ServerStatusResponse (line 2718) | void CL_ServerStatusResponse( netadr_t from, msg_t *msg ) {
function CL_LocalServers_f (line 2811) | void CL_LocalServers_f( void ) {
function CL_GlobalServers_f (line 2856) | void CL_GlobalServers_f( void ) {
function CL_GetPing (line 2910) | void CL_GetPing( int n, char *buf, int buflen, int *pingtime )
function CL_UpdateServerInfo (line 2953) | void CL_UpdateServerInfo( int n )
function CL_GetPingInfo (line 2968) | void CL_GetPingInfo( int n, char *buf, int buflen )
function CL_ClearPing (line 2986) | void CL_ClearPing( int n )
function CL_GetPingQueueCount (line 2999) | int CL_GetPingQueueCount( void )
function ping_t (line 3022) | ping_t* CL_GetFreePing( void )
function CL_Ping_f (line 3079) | void CL_Ping_f( void ) {
function qboolean (line 3113) | qboolean CL_UpdateVisiblePings_f(int source) {
function CL_ServerStatus_f (line 3220) | void CL_ServerStatus_f(void) {
function CL_ShowIP_f (line 3256) | void CL_ShowIP_f(void) {
function qboolean (line 3265) | qboolean CL_CDKeyValidate( const char *key, const char *checksum ) {
FILE: src/engine/client/cl_net_chan.c
function CL_Netchan_Encode (line 38) | static void CL_Netchan_Encode( msg_t *msg ) {
function CL_Netchan_Decode (line 92) | static void CL_Netchan_Decode( msg_t *msg ) {
function CL_Netchan_TransmitNextFragment (line 134) | void CL_Netchan_TransmitNextFragment( netchan_t *chan ) {
function CL_Netchan_Transmit (line 143) | void CL_Netchan_Transmit( netchan_t *chan, msg_t* msg ) {
function qboolean (line 158) | qboolean CL_Netchan_Process( netchan_t *chan, msg_t *msg ) {
FILE: src/engine/client/cl_parse.c
function SHOWNET (line 38) | void SHOWNET( msg_t *msg, char *s) {
function CL_DeltaEntity (line 61) | void CL_DeltaEntity (msg_t *msg, clSnapshot_t *frame, int newnum, entity...
function CL_ParsePacketEntities (line 88) | void CL_ParsePacketEntities( msg_t *msg, clSnapshot_t *oldframe, clSnaps...
function CL_ParseSnapshot (line 200) | void CL_ParseSnapshot( msg_t *msg ) {
function CL_SystemInfoChanged (line 327) | void CL_SystemInfoChanged( void ) {
function CL_ParseGamestate (line 387) | void CL_ParseGamestate( msg_t *msg ) {
function CL_ParseDownload (line 473) | void CL_ParseDownload ( msg_t *msg ) {
function CL_ParseCommandString (line 566) | void CL_ParseCommandString( msg_t *msg ) {
function CL_ParseServerMessage (line 590) | void CL_ParseServerMessage( msg_t *msg ) {
FILE: src/engine/client/cl_scrn.c
function SCR_DrawNamedPic (line 41) | void SCR_DrawNamedPic( float x, float y, float width, float height, cons...
function SCR_AdjustFrom640 (line 59) | void SCR_AdjustFrom640( float *x, float *y, float *w, float *h ) {
function SCR_FillRect (line 94) | void SCR_FillRect( float x, float y, float width, float height, const fl...
function SCR_DrawPic (line 111) | void SCR_DrawPic( float x, float y, float width, float height, qhandle_t...
function SCR_DrawChar (line 122) | static void SCR_DrawChar( int x, int y, float size, int ch ) {
function SCR_DrawSmallChar (line 160) | void SCR_DrawSmallChar( int x, int y, int ch ) {
function SCR_DrawStringExt (line 199) | void SCR_DrawStringExt( int x, int y, float size, const char *string, fl...
function SCR_DrawBigString (line 243) | void SCR_DrawBigString( int x, int y, const char *s, float alpha ) {
function SCR_DrawBigStringColor (line 251) | void SCR_DrawBigStringColor( int x, int y, const char *s, vec4_t color ) {
function SCR_DrawSmallStringExt (line 266) | void SCR_DrawSmallStringExt( int x, int y, const char *string, float *se...
function SCR_Strlen (line 297) | static int SCR_Strlen( const char *str ) {
function SCR_GetBigStringWidth (line 316) | int SCR_GetBigStringWidth( const char *str ) {
function SCR_DrawDemoRecording (line 328) | void SCR_DrawDemoRecording( void ) {
type graphsamp_t (line 354) | typedef struct
function SCR_DebugGraph (line 368) | void SCR_DebugGraph (float value, int color)
function SCR_DrawDebugGraph (line 380) | void SCR_DrawDebugGraph (void)
function SCR_Init (line 418) | void SCR_Init( void ) {
function SCR_DrawScreenField (line 438) | void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {
function SCR_UpdateScreen (line 519) | void SCR_UpdateScreen( void ) {
FILE: src/engine/client/cl_ui.c
function GetClientState (line 36) | static void GetClientState( uiClientState_t *state ) {
function LAN_LoadCachedServers (line 50) | void LAN_LoadCachedServers( ) {
function LAN_SaveServersToCache (line 77) | void LAN_SaveServersToCache( ) {
function LAN_ResetPings (line 97) | static void LAN_ResetPings(int source) {
function LAN_AddServer (line 132) | static int LAN_AddServer(int source, const char *name, const char *addre...
function LAN_RemoveServer (line 182) | static void LAN_RemoveServer(int source, const char *addr) {
function LAN_GetServerCount (line 227) | static int LAN_GetServerCount( int source ) {
function LAN_GetServerAddressString (line 250) | static void LAN_GetServerAddressString( int source, int n, char *buf, in...
function LAN_GetServerInfo (line 285) | static void LAN_GetServerInfo( int source, int n, char *buf, int buflen ) {
function LAN_GetServerPing (line 338) | static int LAN_GetServerPing( int source, int n ) {
function serverInfo_t (line 373) | static serverInfo_t *LAN_GetServerPtr( int source, int n ) {
function LAN_CompareServers (line 404) | static int LAN_CompareServers( int source, int sortKey, int sortDir, int...
function LAN_GetPingQueueCount (line 473) | static int LAN_GetPingQueueCount( void ) {
function LAN_ClearPing (line 482) | static void LAN_ClearPing( int n ) {
function LAN_GetPing (line 491) | static void LAN_GetPing( int n, char *buf, int buflen, int *pingtime ) {
function LAN_GetPingInfo (line 500) | static void LAN_GetPingInfo( int n, char *buf, int buflen ) {
function LAN_MarkServerVisible (line 509) | static void LAN_MarkServerVisible(int source, int n, qboolean visible ) {
function LAN_ServerIsVisible (line 566) | static int LAN_ServerIsVisible(int source, int n ) {
function qboolean (line 597) | qboolean LAN_UpdateVisiblePings(int source ) {
function LAN_GetServerStatus (line 606) | int LAN_GetServerStatus( char *serverAddress, char *serverStatus, int ma...
function CL_GetGlconfig (line 615) | static void CL_GetGlconfig( glconfig_t *config ) {
function GetClipboardData (line 624) | static void GetClipboardData( char *buf, int buflen ) {
function Key_KeynumToStringBuf (line 644) | static void Key_KeynumToStringBuf( int keynum, char *buf, int buflen ) {
function Key_GetBindingBuf (line 653) | static void Key_GetBindingBuf( int keynum, char *buf, int buflen ) {
function Key_GetCatcher (line 670) | int Key_GetCatcher( void ) {
function Key_SetCatcher (line 679) | void Key_SetCatcher( int catcher ) {
function CLUI_GetCDKey (line 689) | static void CLUI_GetCDKey( char *buf, int buflen ) {
function CLUI_SetCDKey (line 707) | static void CLUI_SetCDKey( char *buf ) {
function GetConfigString (line 727) | static int GetConfigString(int index, char *buf, int size)
function FloatAsInt (line 752) | static int FloatAsInt( float f ) {
function CL_UISystemCalls (line 771) | intptr_t CL_UISystemCalls( intptr_t *args ) {
function CL_ShutdownUI (line 1127) | void CL_ShutdownUI( void ) {
function CL_InitUI (line 1145) | void CL_InitUI( void ) {
function qboolean (line 1179) | qboolean UI_usesUniqueCDKey() {
function qboolean (line 1194) | qboolean UI_GameCommand( void ) {
FILE: src/engine/client/client.h
type clSnapshot_t (line 37) | typedef struct {
type outPacket_t (line 69) | typedef struct {
type clientActive_t (line 82) | typedef struct {
type clientConnection_t (line 150) | typedef struct {
type ping_t (line 221) | typedef struct {
type serverInfo_t (line 228) | typedef struct {
type serverAddress_t (line 244) | typedef struct {
type clientStatic_t (line 249) | typedef struct {
type kbutton_t (line 389) | typedef struct {
FILE: src/engine/client/keys.h
type qkey_t (line 26) | typedef struct {
FILE: src/engine/client/snd_adpcm.c
function S_AdpcmEncode (line 56) | void S_AdpcmEncode( short indata[], char outdata[], int len, struct adpc...
function S_AdpcmDecode (line 155) | void S_AdpcmDecode( const char indata[], short *outdata, int len, struct...
function S_AdpcmMemoryNeeded (line 237) | int S_AdpcmMemoryNeeded( const wavinfo_t *info ) {
function S_AdpcmGetSamples (line 271) | void S_AdpcmGetSamples(sndBuffer *chunk, short *to) {
function S_AdpcmEncodeSound (line 290) | void S_AdpcmEncodeSound( sfx_t *sfx, short *samples ) {
FILE: src/engine/client/snd_dma.c
function S_SoundInfo_f (line 107) | void S_SoundInfo_f(void) {
function S_Init (line 139) | void S_Init( void ) {
function S_ChannelFree (line 190) | void S_ChannelFree(channel_t *v) {
function channel_t (line 196) | channel_t* S_ChannelMalloc() {
function S_ChannelSetup (line 207) | void S_ChannelSetup() {
function S_Shutdown (line 228) | void S_Shutdown( void ) {
function S_HashSFXName (line 254) | static long S_HashSFXName(const char *name) {
function sfx_t (line 279) | static sfx_t *S_FindName( const char *name ) {
function S_DefaultSound (line 336) | void S_DefaultSound( sfx_t *sfx ) {
function S_DisableSounds (line 359) | void S_DisableSounds( void ) {
function S_BeginRegistration (line 370) | void S_BeginRegistration( void ) {
function sfxHandle_t (line 392) | sfxHandle_t S_RegisterSound( const char *name, qboolean compressed ) {
function S_memoryLoad (line 427) | void S_memoryLoad(sfx_t *sfx) {
function S_SpatializeOrigin (line 445) | void S_SpatializeOrigin (vec3_t origin, int master_vol, int *left_vol, i...
function S_StartSound (line 512) | void S_StartSound(vec3_t origin, int entityNum, int entchannel, sfxHandl...
function S_StartLocalSound (line 633) | void S_StartLocalSound( sfxHandle_t sfxHandle, int channelNum ) {
function S_ClearSoundBuffer (line 655) | void S_ClearSoundBuffer( void ) {
function S_StopAllSounds (line 690) | void S_StopAllSounds(void) {
function S_StopLoopingSound (line 709) | void S_StopLoopingSound(int entityNum) {
function S_ClearLoopingSounds (line 721) | void S_ClearLoopingSounds( qboolean killall ) {
function S_AddLoopingSound (line 740) | void S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t...
function S_AddRealLoopingSound (line 801) | void S_AddRealLoopingSound( int entityNum, const vec3_t origin, const ve...
function S_AddLoopSounds (line 841) | void S_AddLoopSounds (void) {
function S_ByteSwapRawSamples (line 923) | void S_ByteSwapRawSamples( int samples, int width, int s_channels, const...
function portable_samplepair_t (line 941) | portable_samplepair_t *S_GetRawSamplePointer() {
function S_RawSamples (line 952) | void S_RawSamples( int samples, int rate, int width, int s_channels, con...
function S_UpdateEntityPosition (line 1056) | void S_UpdateEntityPosition( int entityNum, const vec3_t origin ) {
function S_Respatialize (line 1071) | void S_Respatialize( int entityNum, const vec3_t head, vec3_t axis[3], i...
function qboolean (line 1119) | qboolean S_ScanChannelStarts( void ) {
function S_Update (line 1156) | void S_Update( void ) {
function S_GetSoundtime (line 1189) | void S_GetSoundtime(void)
function S_Update_ (line 1233) | void S_Update_(void) {
function S_Play_f (line 1302) | void S_Play_f( void ) {
function S_Music_f (line 1322) | void S_Music_f( void ) {
function S_SoundList_f (line 1339) | void S_SoundList_f( void ) {
function FGetLittleLong (line 1371) | int FGetLittleLong( fileHandle_t f ) {
function FGetLittleShort (line 1379) | int FGetLittleShort( fileHandle_t f ) {
function S_FindWavChunk (line 1388) | int S_FindWavChunk( fileHandle_t f, char *chunk ) {
function S_StopBackgroundTrack (line 1419) | void S_StopBackgroundTrack( void ) {
function S_StartBackgroundTrack (line 1434) | void S_StartBackgroundTrack( const char *intro, const char *loop ){
function S_UpdateBackgroundTrack (line 1525) | void S_UpdateBackgroundTrack( void ) {
function S_FreeOldestSound (line 1608) | void S_FreeOldestSound() {
FILE: src/engine/client/snd_local.h
type portable_samplepair_t (line 35) | typedef struct {
type adpcm_state_t (line 40) | typedef struct adpcm_state {
type sndBuffer (line 45) | typedef struct sndBuffer_s {
type sfx_t (line 52) | typedef struct sfx_s {
type dma_t (line 64) | typedef struct {
type loopSound_t (line 75) | typedef struct loopSound_s {
type channel_t (line 88) | typedef struct
type wavinfo_t (line 109) | typedef struct {
FILE: src/engine/client/snd_mem.c
function SND_free (line 53) | void SND_free(sndBuffer *v) {
function sndBuffer (line 59) | sndBuffer* SND_malloc() {
function SND_setup (line 76) | void SND_setup() {
function GetLittleShort (line 116) | static short GetLittleShort(void)
function GetLittleLong (line 125) | static int GetLittleLong(void)
function FindNextChunk (line 136) | static void FindNextChunk(char *name)
function FindChunk (line 162) | static void FindChunk(char *name)
function wavinfo_t (line 173) | static wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength)
function ResampleSfx (line 240) | static void ResampleSfx( sfx_t *sfx, int inrate, int inwidth, byte *data...
function ResampleSfxRaw (line 290) | static int ResampleSfxRaw( short *sfx, int inrate, int inwidth, int samp...
function qboolean (line 329) | qboolean S_LoadSound( sfx_t *sfx )
function S_DisplayFreeMemory (line 402) | void S_DisplayFreeMemory() {
FILE: src/engine/client/snd_mix.c
function S_WriteLinearBlastStereo16 (line 37) | void S_WriteLinearBlastStereo16 (void)
function S_TransferStereo16 (line 113) | void S_TransferStereo16 (unsigned long *pbuf, int endtime)
function S_TransferPaintBuffer (line 148) | void S_TransferPaintBuffer(int endtime)
function S_PaintChannelFrom16 (line 226) | static void S_PaintChannelFrom16( channel_t *ch, const sfx_t *sc, int co...
function S_PaintChannelFromWavelet (line 414) | void S_PaintChannelFromWavelet( channel_t *ch, sfx_t *sc, int count, int...
function S_PaintChannelFromADPCM (line 456) | void S_PaintChannelFromADPCM( channel_t *ch, sfx_t *sc, int count, int s...
function S_PaintChannelFromMuLaw (line 503) | void S_PaintChannelFromMuLaw( channel_t *ch, sfx_t *sc, int count, int s...
function S_PaintChannels (line 562) | void S_PaintChannels( int endtime ) {
FILE: src/engine/client/snd_wavelet.c
function daub4 (line 32) | void daub4(float b[], unsigned long n, int isign)
function wt1 (line 62) | void wt1(float a[], unsigned long n, int isign)
function byte (line 86) | byte MuLawEncode(short s) {
function MuLawDecode (line 101) | short MuLawDecode(byte uLaw) {
function NXPutc (line 118) | void NXPutc(NXStream *stream, char out) {
function encodeWavelet (line 123) | void encodeWavelet( sfx_t *sfx, short *packets) {
function decodeWavelet (line 173) | void decodeWavelet(sndBuffer *chunk, short *to) {
function encodeMuLaw (line 195) | void encodeMuLaw( sfx_t *sfx, short *packets) {
function decodeMuLaw (line 241) | void decodeMuLaw(sndBuffer *chunk, short *to) {
FILE: src/engine/platform/win_gamma.c
function WG_CheckHardwareGamma (line 37) | void WG_CheckHardwareGamma( void )
function GLimp_SetGamma (line 88) | void GLimp_SetGamma( unsigned char mapping[256]) {
function WG_RestoreGamma (line 137) | void WG_RestoreGamma( void )
function GLimp_RestoreGamma (line 149) | void GLimp_RestoreGamma()
FILE: src/engine/platform/win_glimp.c
function GetDesktopCaps (line 61) | static int GetDesktopCaps(int index) {
function GetDesktopColorDepth (line 67) | static int GetDesktopColorDepth() { return GetDesktopCaps(BITSPIXEL); }
function GetDesktopWidth (line 68) | static int GetDesktopWidth() { return GetDesktopCaps(HORZRES); }
function GetDesktopHeight (line 69) | static int GetDesktopHeight() { return GetDesktopCaps(VERTRES); }
function GLW_ChoosePixelFormat (line 76) | static int GLW_ChoosePixelFormat(HDC hDC, const PIXELFORMATDESCRIPTOR *p...
function GLW_SetPixelFormat (line 206) | static bool GLW_SetPixelFormat(HDC hdc, PIXELFORMATDESCRIPTOR *pPFD, int...
function qboolean (line 257) | static qboolean GLW_InitDriver(HWND hwnd) {
function HWND (line 322) | static HWND create_main_window(int width, int height, qboolean fullscreen)
function HWND (line 448) | static HWND create_twin_window(int width, int height, RenderApi render_api)
function SetMode (line 554) | static void SetMode(int mode, qboolean fullscreen) {
function GLW_InitExtensions (line 590) | static void GLW_InitExtensions( void )
function GLimp_EndFrame (line 693) | void GLimp_EndFrame (void)
function GLimp_Init (line 732) | void GLimp_Init( void )
function GLimp_Shutdown (line 783) | void GLimp_Shutdown( void )
function GLimp_LogComment (line 832) | void GLimp_LogComment( char *comment )
function vk_imp_init (line 839) | void vk_imp_init() {
function vk_imp_shutdown (line 877) | void vk_imp_shutdown() {
function vk_imp_create_surface (line 912) | void vk_imp_create_surface() {
function dx_imp_init (line 922) | void dx_imp_init() {
function dx_imp_shutdown (line 946) | void dx_imp_shutdown() {
function GLimp_RenderThreadWrapper (line 988) | void GLimp_RenderThreadWrapper( void ) {
function qboolean (line 1002) | qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) {
function GLimp_FrontEndSleep (line 1058) | void GLimp_FrontEndSleep( void ) {
function GLimp_WakeRenderer (line 1067) | void GLimp_WakeRenderer( void *data ) {
FILE: src/engine/platform/win_input.c
type WinMouseVars_t (line 29) | typedef struct {
function IN_InitWin32Mouse (line 58) | void IN_InitWin32Mouse( void )
function IN_ShutdownWin32Mouse (line 67) | void IN_ShutdownWin32Mouse( void ) {
function IN_ActivateWin32Mouse (line 75) | void IN_ActivateWin32Mouse( void ) {
function IN_DeactivateWin32Mouse (line 107) | void IN_DeactivateWin32Mouse( void )
function IN_Win32Mouse (line 120) | void IN_Win32Mouse( int *mx, int *my ) {
function IN_ActivateMouse (line 148) | void IN_ActivateMouse( void )
function IN_DeactivateMouse (line 176) | void IN_DeactivateMouse( void ) {
function IN_StartupMouse (line 195) | void IN_StartupMouse( void )
function IN_MouseEvent (line 214) | void IN_MouseEvent (int mstate)
function IN_MouseMove (line 246) | void IN_MouseMove ( void ) {
function IN_Startup (line 270) | void IN_Startup( void ) {
function IN_Shutdown (line 283) | void IN_Shutdown( void ) {
function IN_Init (line 293) | void IN_Init( void ) {
function IN_Activate (line 310) | void IN_Activate (qboolean active) {
function IN_Frame (line 327) | void IN_Frame (void) {
FILE: src/engine/platform/win_local.h
type WinVars_t (line 72) | typedef struct
FILE: src/engine/platform/win_main.c
function Spk_Open (line 54) | void Spk_Open(char *name)
function Spk_Close (line 59) | void Spk_Close()
function Spk_Printf (line 68) | void Spk_Printf (const char *text, ...)
function qboolean (line 91) | qboolean Sys_LowPhysicalMemory() {
function Sys_BeginProfiling (line 102) | void Sys_BeginProfiling( void ) {
function Sys_Error (line 113) | void QDECL Sys_Error( const char *error, ... ) {
function Sys_Quit (line 150) | void Sys_Quit( void ) {
function Sys_Print (line 163) | void Sys_Print( const char *msg ) {
function Sys_Mkdir (line 173) | void Sys_Mkdir( const char *path ) {
function Sys_ListFilteredFiles (line 219) | void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *fi...
function qboolean (line 266) | static qboolean strgtr(const char *s0, const char *s1) {
type _finddata_t (line 292) | struct _finddata_t
function Sys_FreeFileList (line 382) | void Sys_FreeFileList( char **list ) {
function qboolean (line 407) | qboolean Sys_ScanForCD( void ) {
function qboolean (line 457) | qboolean Sys_CheckCD( void ) {
function Sys_UnloadDll (line 506) | void Sys_UnloadDll( void *dllHandle ) {
function Sys_InitStreamThread (line 632) | void Sys_InitStreamThread( void ) {
function Sys_ShutdownStreamThread (line 635) | void Sys_ShutdownStreamThread( void ) {
function Sys_BeginStreamedFile (line 638) | void Sys_BeginStreamedFile( fileHandle_t f, int readAhead ) {
function Sys_EndStreamedFile (line 641) | void Sys_EndStreamedFile( fileHandle_t f ) {
function Sys_StreamedRead (line 644) | int Sys_StreamedRead( void *buffer, int size, int count, fileHandle_t f ) {
function Sys_StreamSeek (line 648) | void Sys_StreamSeek( fileHandle_t f, int offset, int origin ) {
type streamsIO_t (line 655) | typedef struct {
type streamState_t (line 665) | typedef struct {
function Sys_StreamThread (line 681) | void Sys_StreamThread( void ) {
function Sys_InitStreamThread (line 722) | void Sys_InitStreamThread( void ) {
function Sys_ShutdownStreamThread (line 750) | void Sys_ShutdownStreamThread( void ) {
function Sys_BeginStreamedFile (line 760) | void Sys_BeginStreamedFile( fileHandle_t f, int readAhead ) {
function Sys_EndStreamedFile (line 783) | void Sys_EndStreamedFile( fileHandle_t f ) {
function Sys_StreamedRead (line 805) | int Sys_StreamedRead( void *buffer, int size, int count, fileHandle_t f ) {
function Sys_StreamSeek (line 868) | void Sys_StreamSeek( fileHandle_t f, int offset, int origin ) {
function Sys_QueEvent (line 909) | void Sys_QueEvent( int time, sysEventType_t type, int value, int value2,...
function sysEvent_t (line 942) | sysEvent_t Sys_GetEvent( void ) {
function Sys_In_Restart_f (line 1018) | void Sys_In_Restart_f( void ) {
function Sys_Net_Restart_f (line 1031) | void Sys_Net_Restart_f( void ) {
function Sys_Init (line 1047) | void Sys_Init( void ) {
function WinMain (line 1146) | int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR ...
FILE: src/engine/platform/win_net.c
type sockaddr (line 41) | struct sockaddr
function NetadrToSockadr (line 112) | void NetadrToSockadr( netadr_t *a, struct sockaddr *s ) {
function SockadrToNetadr (line 140) | void SockadrToNetadr( struct sockaddr *s, netadr_t *a ) {
function qboolean (line 170) | qboolean Sys_StringToSockaddr( const char *s, struct sockaddr *sadr ) {
function qboolean (line 220) | qboolean Sys_StringToAdr( const char *s, netadr_t *a ) {
function qboolean (line 242) | qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message ) {
function Sys_SendPacket (line 318) | void Sys_SendPacket( int length, const void *data, netadr_t to ) {
function qboolean (line 386) | qboolean Sys_IsLANAddress( netadr_t adr ) {
function Sys_ShowIP (line 451) | void Sys_ShowIP(void) {
function NET_IPSocket (line 468) | int NET_IPSocket( char *net_interface, int port ) {
function NET_OpenSocks (line 533) | void NET_OpenSocks( int port ) {
function NET_GetLocalAddress (line 710) | void NET_GetLocalAddress( void ) {
function NET_OpenIP (line 756) | void NET_OpenIP( void ) {
function NET_IPXSocket (line 787) | int NET_IPXSocket( int port ) {
function NET_OpenIPX (line 838) | void NET_OpenIPX( void ) {
function qboolean (line 855) | static qboolean NET_GetCvars( void ) {
function NET_Config (line 906) | void NET_Config( qboolean enableNetworking ) {
function NET_Init (line 978) | void NET_Init( void ) {
function NET_Shutdown (line 1003) | void NET_Shutdown( void ) {
function NET_Sleep (line 1020) | void NET_Sleep( int msec ) {
function NET_Restart (line 1029) | void NET_Restart( void ) {
FILE: src/engine/platform/win_qgl.c
function HGLRC (line 157) | static HGLRC nowglCreateContext(HDC) { return NULL;}
function BOOL (line 158) | static BOOL nowglDeleteContext(HGLRC) { return FALSE; }
function PROC (line 159) | static PROC nowglGetProcAddress(LPCSTR) { return NULL; }
function BOOL (line 160) | static BOOL nowglMakeCurrent(HDC, HGLRC) { return FALSE; }
function nowglSwapIntervalEXT (line 161) | static int nowglSwapIntervalEXT( int interval ) { return -1; }
function noglActiveTextureARB (line 163) | static void noglActiveTextureARB ( GLenum texture ) {}
function noglClientActiveTextureARB (line 164) | static void noglClientActiveTextureARB ( GLenum texture ) {}
function noglLockArraysEXT (line 165) | static void noglLockArraysEXT (GLint, GLint) {}
function noglUnlockArraysEXT (line 166) | static void noglUnlockArraysEXT (void) {}
function noglAlphaFunc (line 167) | static void noglAlphaFunc(GLenum func, GLclampf ref) {}
function noglBegin (line 168) | static void noglBegin(GLenum mode) {}
function noglBindTexture (line 169) | static void noglBindTexture(GLenum target, GLuint texture) {}
function noglBlendFunc (line 170) | static void noglBlendFunc(GLenum sfactor, GLenum dfactor) {}
function noglClear (line 171) | static void noglClear(GLbitfield mask) {}
function noglClearColor (line 172) | static void noglClearColor(GLclampf red, GLclampf green, GLclampf blue, ...
function noglClipPlane (line 173) | static void noglClipPlane(GLenum plane, const GLdouble *equation) {}
function noglColor3f (line 174) | static void noglColor3f(GLfloat red, GLfloat green, GLfloat blue) {}
function noglColorMask (line 175) | static void noglColorMask(GLboolean red, GLboolean green, GLboolean blue...
function noglColorPointer (line 176) | static void noglColorPointer(GLint size, GLenum type, GLsizei stride, co...
function noglCullFace (line 177) | static void noglCullFace(GLenum mode) {}
function noglDeleteTextures (line 178) | static void noglDeleteTextures(GLsizei n, const GLuint *textures) {}
function noglDepthFunc (line 179) | static void noglDepthFunc(GLenum func) {}
function noglDepthMask (line 180) | static void noglDepthMask(GLboolean flag) {}
function noglDepthRange (line 181) | static void noglDepthRange(GLclampd zNear, GLclampd zFar) {}
function noglDisable (line 182) | static void noglDisable(GLenum cap) {}
function noglDisableClientState (line 183) | static void noglDisableClientState(GLenum array) {}
function noglDrawBuffer (line 184) | static void noglDrawBuffer(GLenum mode) {}
function noglDrawElements (line 185) | static void noglDrawElements(GLenum mode, GLsizei count, GLenum type, co...
function noglEnable (line 186) | static void noglEnable(GLenum cap) {}
function noglEnableClientState (line 187) | static void noglEnableClientState(GLenum array) {}
function noglEnd (line 188) | static void noglEnd(void) {}
function noglFinish (line 189) | static void noglFinish(void) {}
function GLenum (line 190) | static GLenum noglGetError(void) { return GL_NO_ERROR; }
function noglGetIntegerv (line 191) | static void noglGetIntegerv(GLenum pname, GLint *params) {}
function GLubyte (line 192) | static const GLubyte* noglGetString(GLenum name) { static char* s = ""; ...
function noglLineWidth (line 193) | static void noglLineWidth(GLfloat width) {}
function noglLoadIdentity (line 194) | static void noglLoadIdentity(void) {}
function noglLoadMatrixf (line 195) | static void noglLoadMatrixf(const GLfloat *m) {}
function noglMatrixMode (line 196) | static void noglMatrixMode(GLenum mode) {}
function noglOrtho (line 197) | static void noglOrtho(GLdouble left, GLdouble right, GLdouble bottom, GL...
function noglPolygonMode (line 198) | static void noglPolygonMode(GLenum face, GLenum mode) {}
function noglPolygonOffset (line 199) | static void noglPolygonOffset(GLfloat factor, GLfloat units) {}
function noglPopMatrix (line 200) | static void noglPopMatrix(void) {}
function noglPushMatrix (line 201) | static void noglPushMatrix(void) {}
function noglReadPixels (line 202) | static void noglReadPixels(GLint x, GLint y, GLsizei width, GLsizei heig...
function noglScissor (line 203) | static void noglScissor(GLint x, GLint y, GLsizei width, GLsizei height) {}
function noglStencilFunc (line 204) | static void noglStencilFunc(GLenum func, GLint ref, GLuint mask) {}
function noglStencilOp (line 205) | static void noglStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {}
function noglTexCoord2f (line 206) | static void noglTexCoord2f(GLfloat s, GLfloat t) {}
function noglTexCoord2fv (line 207) | static void noglTexCoord2fv(const GLfloat *v) {}
function noglTexCoordPointer (line 208) | static void noglTexCoordPointer(GLint size, GLenum type, GLsizei stride,...
function noglTexEnvf (line 209) | static void noglTexEnvf(GLenum target, GLenum pname, GLfloat param) {}
function noglTexImage2D (line 210) | static void noglTexImage2D(GLenum target, GLint level, GLint internalfor...
function noglTexParameterf (line 211) | static void noglTexParameterf(GLenum target, GLenum pname, GLfloat param...
function noglTexParameterfv (line 212) | static void noglTexParameterfv(GLenum target, GLenum pname, const GLfloa...
function noglTexSubImage2D (line 213) | static void noglTexSubImage2D(GLenum target, GLint level, GLint xoffset,...
function noglVertex2f (line 214) | static void noglVertex2f(GLfloat x, GLfloat y) {}
function noglVertex3f (line 215) | static void noglVertex3f(GLfloat x, GLfloat y, GLfloat z) {}
function noglVertex3fv (line 216) | static void noglVertex3fv(const GLfloat *v) {}
function noglVertexPointer (line 217) | static void noglVertexPointer(GLint size, GLenum type, GLsizei stride, c...
function noglViewport (line 218) | static void noglViewport(GLint x, GLint y, GLsizei width, GLsizei height...
function logAlphaFunc (line 344) | static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref)
function logBegin (line 349) | static void APIENTRY logBegin(GLenum mode)
function logBindTexture (line 354) | static void APIENTRY logBindTexture(GLenum target, GLuint texture)
function BlendToName (line 359) | static void BlendToName( char *n, GLenum f )
function logBlendFunc (line 388) | static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor)
function logClear (line 398) | static void APIENTRY logClear(GLbitfield mask)
function logClearColor (line 414) | static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclamp...
function logClipPlane (line 419) | static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation)
function logColor3f (line 424) | static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue)
function logColorMask (line 432) | static void APIENTRY logColorMask(GLboolean red, GLboolean green, GLbool...
function logColorPointer (line 437) | static void APIENTRY logColorPointer(GLint size, GLenum type, GLsizei st...
function logCullFace (line 442) | static void APIENTRY logCullFace(GLenum mode)
function logDeleteTextures (line 447) | static void APIENTRY logDeleteTextures(GLsizei n, const GLuint *textures)
function logDepthFunc (line 452) | static void APIENTRY logDepthFunc(GLenum func)
function logDepthMask (line 457) | static void APIENTRY logDepthMask(GLboolean flag)
function logDepthRange (line 462) | static void APIENTRY logDepthRange(GLclampd zNear, GLclampd zFar)
function logDisable (line 467) | static void APIENTRY logDisable(GLenum cap)
function logDisableClientState (line 472) | static void APIENTRY logDisableClientState(GLenum array)
function logDrawBuffer (line 477) | static void APIENTRY logDrawBuffer(GLenum mode)
function logDrawElements (line 482) | static void APIENTRY logDrawElements(GLenum mode, GLsizei count, GLenum ...
function logEnable (line 487) | static void APIENTRY logEnable(GLenum cap)
function logEnableClientState (line 493) | static void APIENTRY logEnableClientState(GLenum array)
function logEnd (line 499) | static void APIENTRY logEnd(void)
function logFinish (line 504) | static void APIENTRY logFinish(void)
function GLenum (line 509) | static GLenum APIENTRY logGetError(void)
function logGetIntegerv (line 514) | static void APIENTRY logGetIntegerv(GLenum pname, GLint *params)
function GLubyte (line 519) | static const GLubyte * APIENTRY logGetString(GLenum name)
function logLineWidth (line 524) | static void APIENTRY logLineWidth(GLfloat width)
function logLoadIdentity (line 529) | static void APIENTRY logLoadIdentity(void)
function logLoadMatrixf (line 534) | static void APIENTRY logLoadMatrixf(const GLfloat *m)
function logMatrixMode (line 539) | static void APIENTRY logMatrixMode(GLenum mode)
function logOrtho (line 544) | static void APIENTRY logOrtho(GLdouble left, GLdouble right, GLdouble bo...
function logPolygonMode (line 549) | static void APIENTRY logPolygonMode(GLenum face, GLenum mode)
function logPolygonOffset (line 554) | static void APIENTRY logPolygonOffset(GLfloat factor, GLfloat units)
function logPopMatrix (line 559) | static void APIENTRY logPopMatrix(void)
function logPushMatrix (line 564) | static void APIENTRY logPushMatrix(void)
function logReadPixels (line 569) | static void APIENTRY logReadPixels(GLint x, GLint y, GLsizei width, GLsi...
function logScissor (line 574) | static void APIENTRY logScissor(GLint x, GLint y, GLsizei width, GLsizei...
function logStencilFunc (line 579) | static void APIENTRY logStencilFunc(GLenum func, GLint ref, GLuint mask)
function logStencilOp (line 584) | static void APIENTRY logStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
function logTexCoord2f (line 589) | static void APIENTRY logTexCoord2f(GLfloat s, GLfloat t)
function logTexCoord2fv (line 594) | static void APIENTRY logTexCoord2fv(const GLfloat *v)
function logTexCoordPointer (line 599) | static void APIENTRY logTexCoordPointer(GLint size, GLenum type, GLsizei...
function logTexEnvf (line 605) | static void APIENTRY logTexEnvf(GLenum target, GLenum pname, GLfloat param)
function logTexImage2D (line 610) | static void APIENTRY logTexImage2D(GLenum target, GLint level, GLint int...
function logTexParameterf (line 615) | static void APIENTRY logTexParameterf(GLenum target, GLenum pname, GLflo...
function logTexParameterfv (line 620) | static void APIENTRY logTexParameterfv(GLenum target, GLenum pname, cons...
function logTexSubImage2D (line 625) | static void APIENTRY logTexSubImage2D(GLenum target, GLint level, GLint ...
function logVertex2f (line 630) | static void APIENTRY logVertex2f(GLfloat x, GLfloat y)
function logVertex3f (line 635) | static void APIENTRY logVertex3f(GLfloat x, GLfloat y, GLfloat z)
function logVertex3fv (line 640) | static void APIENTRY logVertex3fv(const GLfloat *v)
function logVertexPointer (line 645) | static void APIENTRY logVertexPointer(GLint size, GLenum type, GLsizei s...
function logViewport (line 650) | static void APIENTRY logViewport(GLint x, GLint y, GLsizei width, GLsize...
function QGL_Shutdown (line 662) | void QGL_Shutdown( void )
function qboolean (line 743) | qboolean QGL_Init( const char *dllname )
function QGL_EnableLogging (line 831) | void QGL_EnableLogging( qboolean enable )
FILE: src/engine/platform/win_shared.c
function Sys_Milliseconds (line 42) | int Sys_Milliseconds (void)
function Sys_SnapVector (line 61) | void Sys_SnapVector( float *v )
function Sys_GetProcessorId (line 84) | int Sys_GetProcessorId( void )
FILE: src/engine/platform/win_snd.c
function SNDDMA_Shutdown (line 63) | void SNDDMA_Shutdown( void ) {
function qboolean (line 118) | qboolean SNDDMA_Init(void) {
function SNDDMA_InitDS (line 136) | int SNDDMA_InitDS ()
function SNDDMA_GetDMAPos (line 269) | int SNDDMA_GetDMAPos( void ) {
function SNDDMA_BeginPainting (line 297) | void SNDDMA_BeginPainting( void ) {
function SNDDMA_Submit (line 352) | void SNDDMA_Submit( void ) {
function SNDDMA_Activate (line 367) | void SNDDMA_Activate( void ) {
FILE: src/engine/platform/win_syscon.c
type WinConData (line 44) | typedef struct
function LRESULT (line 80) | static LRESULT WINAPI ConWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, L...
function LONG (line 197) | LONG WINAPI InputLineWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA...
function Sys_CreateConsole (line 232) | void Sys_CreateConsole( void )
function Sys_DestroyConsole (line 370) | void Sys_DestroyConsole( void ) {
function Sys_ShowConsole (line 382) | void Sys_ShowConsole( int visLevel, qboolean quitOnClose )
function Conbuf_AppendText (line 433) | void Conbuf_AppendText( const char *pMsg )
function Sys_SetErrorText (line 516) | void Sys_SetErrorText( const char *buf )
FILE: src/engine/platform/win_wndproc.c
function VID_AppActivate (line 46) | static void VID_AppActivate(BOOL fActive, BOOL minimize)
function MapKey (line 106) | static int MapKey (int key)
function LONG (line 185) | LONG WINAPI MainWndProc (
FILE: src/engine/qcommon/cm_load.c
function SetPlaneSignbits (line 30) | void SetPlaneSignbits (cplane_t *out) {
function CMod_LoadShaders (line 90) | void CMod_LoadShaders( lump_t *l ) {
function CMod_LoadSubmodels (line 121) | void CMod_LoadSubmodels( lump_t *l ) {
function CMod_LoadNodes (line 179) | void CMod_LoadNodes( lump_t *l ) {
function CM_BoundBrush (line 215) | void CM_BoundBrush( cbrush_t *b ) {
function CMod_LoadBrushes (line 233) | void CMod_LoadBrushes( lump_t *l ) {
function CMod_LoadLeafs (line 269) | void CMod_LoadLeafs (lump_t *l)
function CMod_LoadPlanes (line 312) | void CMod_LoadPlanes (lump_t *l)
function CMod_LoadLeafBrushes (line 353) | void CMod_LoadLeafBrushes (lump_t *l)
function CMod_LoadLeafSurfaces (line 380) | void CMod_LoadLeafSurfaces( lump_t *l )
function CMod_LoadBrushSides (line 407) | void CMod_LoadBrushSides (lump_t *l)
function CMod_LoadEntityString (line 443) | void CMod_LoadEntityString( lump_t *l ) {
function CMod_LoadVisibility (line 455) | void CMod_LoadVisibility( lump_t *l ) {
function CMod_LoadPatches (line 484) | void CMod_LoadPatches( lump_t *surfs, lump_t *verts ) {
function CM_LumpChecksum (line 541) | unsigned CM_LumpChecksum(lump_t *lump) {
function CM_Checksum (line 545) | unsigned CM_Checksum(dheader_t *header) {
function CM_LoadMap (line 569) | void CM_LoadMap( const char *name, qboolean clientload, int *checksum ) {
function CM_ClearMap (line 665) | void CM_ClearMap( void ) {
function cmodel_t (line 675) | cmodel_t *CM_ClipHandleToModel( clipHandle_t handle ) {
function clipHandle_t (line 700) | clipHandle_t CM_InlineModel( int index ) {
function CM_NumClusters (line 707) | int CM_NumClusters( void ) {
function CM_NumInlineModels (line 711) | int CM_NumInlineModels( void ) {
function CM_LeafCluster (line 719) | int CM_LeafCluster( int leafnum ) {
function CM_LeafArea (line 726) | int CM_LeafArea( int leafnum ) {
function CM_InitBoxHull (line 744) | void CM_InitBoxHull (void)
function clipHandle_t (line 798) | clipHandle_t CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, int ...
function CM_ModelBounds (line 831) | void CM_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ) {
FILE: src/engine/qcommon/cm_local.h
type cNode_t (line 32) | typedef struct {
type cLeaf_t (line 37) | typedef struct {
type cmodel_t (line 48) | typedef struct cmodel_s {
type cbrushside_t (line 53) | typedef struct {
type cbrush_t (line 59) | typedef struct {
type cPatch_t (line 69) | typedef struct {
type cArea_t (line 77) | typedef struct {
type clipMap_t (line 82) | typedef struct {
type sphere_t (line 146) | typedef struct
type traceWork_t (line 154) | typedef struct {
type leafList_t (line 169) | typedef struct leafList_s {
type patchCollide_s (line 191) | struct patchCollide_s
type patchCollide_s (line 192) | struct patchCollide_s
type patchCollide_s (line 193) | struct patchCollide_s
FILE: src/engine/qcommon/cm_patch.c
function CM_ClearLevelPatches (line 97) | void CM_ClearLevelPatches( void ) {
function CM_SignbitsForNormal (line 107) | static int CM_SignbitsForNormal( vec3_t normal ) {
function qboolean (line 127) | static qboolean CM_PlaneFromPoints( vec4_t plane, vec3_t a, vec3_t b, ve...
function qboolean (line 158) | static qboolean CM_NeedsSubdivision( vec3_t a, vec3_t b, vec3_t c ) {
function CM_Subdivide (line 190) | static void CM_Subdivide( vec3_t a, vec3_t b, vec3_t c, vec3_t out1, vec...
function CM_TransposeGrid (line 207) | static void CM_TransposeGrid( cGrid_t *grid ) {
function CM_SetGridWrapWidth (line 258) | static void CM_SetGridWrapWidth( cGrid_t *grid ) {
function CM_SubdivideGridColumns (line 289) | static void CM_SubdivideGridColumns( cGrid_t *grid ) {
function qboolean (line 357) | static qboolean CM_ComparePoints( float *a, float *b ) {
function CM_RemoveDegenerateColumns (line 382) | static void CM_RemoveDegenerateColumns( cGrid_t *grid ) {
function CM_PlaneEqual (line 431) | int CM_PlaneEqual(patchPlane_t *p, float plane[4], int *flipped) {
function CM_SnapVector (line 465) | void CM_SnapVector(vec3_t normal) {
function CM_FindPlane2 (line 490) | int CM_FindPlane2(float plane[4], int *flipped) {
function CM_FindPlane (line 518) | static int CM_FindPlane( float *p1, float *p2, float *p3 ) {
function CM_PointOnPlaneSide (line 570) | static int CM_PointOnPlaneSide( float *p, int planeNum ) {
function CM_GridPlane (line 597) | static int CM_GridPlane( int gridPlanes[MAX_GRID_SIZE][MAX_GRID_SIZE][2]...
function CM_EdgePlaneNum (line 619) | static int CM_EdgePlaneNum( cGrid_t *grid, int gridPlanes[MAX_GRID_SIZE]...
function CM_SetBorderInward (line 678) | static void CM_SetBorderInward( facet_t *facet, cGrid_t *grid, int gridP...
function qboolean (line 756) | static qboolean CM_ValidateFacet( facet_t *facet ) {
function CM_AddFacetBevels (line 807) | void CM_AddFacetBevels( facet_t *facet ) {
type edgeName_t (line 968) | typedef enum {
function CM_PatchCollideFromGrid (line 980) | static void CM_PatchCollideFromGrid( cGrid_t *grid, patchCollide_t *pf ) {
type patchCollide_s (line 1148) | struct patchCollide_s
function CM_TracePointThroughPatchCollide (line 1231) | void CM_TracePointThroughPatchCollide( traceWork_t *tw, const struct pat...
function CM_CheckFacetPlane (line 1331) | int CM_CheckFacetPlane(float *plane, vec3_t start, vec3_t end, float *en...
function CM_TraceThroughPatchCollide (line 1377) | void CM_TraceThroughPatchCollide( traceWork_t *tw, const struct patchCol...
function qboolean (line 1513) | qboolean CM_PositionTestInPatchCollide( traceWork_t *tw, const struct pa...
function CM_DrawDebugSurface (line 1616) | void CM_DrawDebugSurface( void (*drawPoly)(int color, int numPoints, flo...
FILE: src/engine/qcommon/cm_patch.h
type patchPlane_t (line 66) | typedef struct {
type facet_t (line 71) | typedef struct {
type patchCollide_t (line 79) | typedef struct patchCollide_s {
type cGrid_t (line 90) | typedef struct {
type patchCollide_s (line 103) | struct patchCollide_s
FILE: src/engine/qcommon/cm_polylib.c
function pw (line 36) | void pw(winding_t *w)
function winding_t (line 49) | winding_t *AllocWinding (int points)
function FreeWinding (line 66) | void FreeWinding (winding_t *w)
function RemoveColinearPoints (line 83) | void RemoveColinearPoints (winding_t *w)
function WindingPlane (line 119) | void WindingPlane (winding_t *w, vec3_t normal, vec_t *dist)
function vec_t (line 136) | vec_t WindingArea (winding_t *w)
function WindingBounds (line 158) | void WindingBounds (winding_t *w, vec3_t mins, vec3_t maxs)
function WindingCenter (line 184) | void WindingCenter (winding_t *w, vec3_t center)
function winding_t (line 202) | winding_t *BaseWindingForPlane (vec3_t normal, vec_t dist)
function winding_t (line 273) | winding_t *CopyWinding (winding_t *w)
function winding_t (line 289) | winding_t *ReverseWinding (winding_t *w)
function ClipWindingEpsilon (line 309) | void ClipWindingEpsilon (winding_t *in, vec3_t normal, vec_t dist,
function ChopWindingInPlace (line 421) | void ChopWindingInPlace (winding_t **inout, vec3_t normal, vec_t dist, v...
function winding_t (line 526) | winding_t *ChopWinding (winding_t *in, vec3_t normal, vec_t dist)
function CheckWinding (line 544) | void CheckWinding (winding_t *w)
function WindingOnPlaneSide (line 607) | int WindingOnPlaneSide (winding_t *w, vec3_t normal, vec_t dist)
function AddWindingToConvexHull (line 650) | void AddWindingToConvexHull( winding_t *w, winding_t **hull, vec3_t norm...
FILE: src/engine/qcommon/cm_polylib.h
type winding_t (line 25) | typedef struct
FILE: src/engine/qcommon/cm_test.c
function CM_PointLeafnum_r (line 31) | int CM_PointLeafnum_r( const vec3_t p, int num ) {
function CM_PointLeafnum (line 56) | int CM_PointLeafnum( const vec3_t p ) {
function CM_StoreLeafs (line 73) | void CM_StoreLeafs( leafList_t *ll, int nodenum ) {
function CM_StoreBrushes (line 90) | void CM_StoreBrushes( leafList_t *ll, int nodenum ) {
function CM_BoxLeafnums_r (line 140) | void CM_BoxLeafnums_r( leafList_t *ll, int nodenum ) {
function CM_BoxLeafnums (line 172) | int CM_BoxLeafnums( const vec3_t mins, const vec3_t maxs, int *list, int...
function CM_BoxBrushes (line 197) | int CM_BoxBrushes( const vec3_t mins, const vec3_t maxs, cbrush_t **list...
function CM_PointContents (line 226) | int CM_PointContents( const vec3_t p, clipHandle_t model ) {
function CM_TransformedPointContents (line 279) | int CM_TransformedPointContents( const vec3_t p, clipHandle_t model, con...
function byte (line 312) | byte *CM_ClusterPVS (int cluster) {
function CM_FloodArea_r (line 330) | void CM_FloodArea_r( int areaNum, int floodnum) {
function CM_FloodAreaConnections (line 359) | void CM_FloodAreaConnections( void ) {
function CM_AdjustAreaPortalState (line 385) | void CM_AdjustAreaPortalState( int area1, int area2, qboolean open ) {
function qboolean (line 414) | qboolean CM_AreasConnected( int area1, int area2 ) {
function CM_WriteAreaBits (line 450) | int CM_WriteAreaBits (byte *buffer, int area)
FILE: src/engine/qcommon/cm_trace.c
function RotatePoint (line 44) | void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // bk: FIXME
function TransposeMatrix (line 58) | void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]) { ...
function CreateRotationMatrix (line 72) | void CreateRotationMatrix(const vec3_t angles, vec3_t matrix[3]) {
function CM_ProjectPointOntoVector (line 82) | void CM_ProjectPointOntoVector( vec3_t point, vec3_t vStart, vec3_t vDir...
function CM_DistanceFromLineSquared (line 96) | float CM_DistanceFromLineSquared(vec3_t p, vec3_t lp1, vec3_t lp2, vec3_...
function CM_VectorDistanceSquared (line 121) | float CM_VectorDistanceSquared(vec3_t p1, vec3_t p2) {
function SquareRootFloat (line 133) | float SquareRootFloat(float number) {
function CM_TestBoxInBrush (line 162) | void CM_TestBoxInBrush( traceWork_t *tw, cbrush_t *brush ) {
function CM_TestCapsuleInCapsule (line 305) | void CM_TestCapsuleInCapsule( traceWork_t *tw, clipHandle_t model ) {
function CM_TestBoundingBoxInCapsule (line 374) | void CM_TestBoundingBoxInCapsule( traceWork_t *tw, clipHandle_t model ) {
function CM_PositionTest (line 411) | void CM_PositionTest( traceWork_t *tw ) {
function CM_TraceThroughPatch (line 463) | void CM_TraceThroughPatch( traceWork_t *tw, cPatch_t *patch ) {
function CM_TraceThroughBrush (line 483) | void CM_TraceThroughBrush( traceWork_t *tw, cbrush_t *brush ) {
function CM_TraceThroughSphere (line 729) | void CM_TraceThroughSphere( traceWork_t *tw, vec3_t origin, float radius...
function CM_TraceThroughVerticalCylinder (line 817) | void CM_TraceThroughVerticalCylinder( traceWork_t *tw, vec3_t origin, fl...
function CM_TraceCapsuleThroughCapsule (line 920) | void CM_TraceCapsuleThroughCapsule( traceWork_t *tw, clipHandle_t model ) {
function CM_TraceBoundingBoxThroughCapsule (line 982) | void CM_TraceBoundingBoxThroughCapsule( traceWork_t *tw, clipHandle_t mo...
function CM_TraceThroughTree (line 1025) | void CM_TraceThroughTree( traceWork_t *tw, int num, float p1f, float p2f...
function CM_Trace (line 1149) | void CM_Trace( trace_t *results, const vec3_t start, const vec3_t end, v...
function CM_BoxTrace (line 1367) | void CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
function CM_TransformedBoxTrace (line 1381) | void CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const...
FILE: src/engine/qcommon/cmd.c
type cmd_t (line 30) | typedef struct {
function Cmd_Wait_f (line 52) | void Cmd_Wait_f( void ) {
function Cbuf_Init (line 74) | void Cbuf_Init (void)
function Cbuf_AddText (line 88) | void Cbuf_AddText( const char *text ) {
function Cbuf_InsertText (line 111) | void Cbuf_InsertText( const char *text ) {
function Cbuf_ExecuteText (line 141) | void Cbuf_ExecuteText (int exec_when, const char *text)
function Cbuf_Execute (line 168) | void Cbuf_Execute (void)
function Cmd_Exec_f (line 239) | void Cmd_Exec_f( void ) {
function Cmd_Vstr_f (line 271) | void Cmd_Vstr_f( void ) {
function Cmd_Echo_f (line 291) | void Cmd_Echo_f (void)
type cmd_function_t (line 309) | typedef struct cmd_function_s
function Cmd_Argc (line 329) | int Cmd_Argc( void ) {
function Cmd_ArgvBuffer (line 353) | void Cmd_ArgvBuffer( int arg, char *buffer, int bufferLength ) {
function Cmd_ArgsBuffer (line 412) | void Cmd_ArgsBuffer( char *buffer, int bufferLength ) {
function Cmd_TokenizeString (line 442) | void Cmd_TokenizeString( const char *text_in ) {
function Cmd_AddCommand (line 550) | void Cmd_AddCommand( const char *cmd_name, xcommand_t function ) {
function Cmd_RemoveCommand (line 577) | void Cmd_RemoveCommand( const char *cmd_name ) {
function Cmd_CommandCompletion (line 605) | void Cmd_CommandCompletion( void(*callback)(const char *s) ) {
function Cmd_ExecuteString (line 621) | void Cmd_ExecuteString( const char *text ) {
function Cmd_List_f (line 681) | void Cmd_List_f (void)
function Cmd_Init (line 708) | void Cmd_Init (void) {
FILE: src/engine/qcommon/common.c
function Com_BeginRedirect (line 111) | void Com_BeginRedirect (char *buffer, int buffersize, void (*flush)( cha...
function Com_EndRedirect (line 122) | void Com_EndRedirect (void)
function Com_Printf (line 143) | void QDECL Com_Printf( const char *fmt, ... ) {
function Com_DPrintf (line 209) | void QDECL Com_DPrintf( const char *fmt, ...) {
function Com_Error (line 232) | void QDECL Com_Error( int code, const char *fmt, ... ) {
function Com_Quit_f (line 321) | void Com_Quit_f( void ) {
function Com_ParseCommandLine (line 362) | void Com_ParseCommandLine( char *commandLine ) {
function qboolean (line 394) | qboolean Com_SafeMode( void ) {
function Com_StartupVariable (line 420) | void Com_StartupVariable( const char *match ) {
function qboolean (line 453) | qboolean Com_AddStartupCommands( void ) {
function Info_Print (line 478) | void Info_Print( const char *s ) {
function Com_Filter (line 554) | int Com_Filter(char *filter, char *name, int casesensitive)
function Com_FilterPath (line 634) | int Com_FilterPath(char *filter, char *name, int casesensitive)
function Com_HashKey (line 666) | int Com_HashKey(char *string, int maxlen) {
function Com_RealTime (line 682) | int Com_RealTime(qtime_t *qtime) {
type zonedebug_t (line 723) | typedef struct zonedebug_s {
type memblock_t (line 730) | typedef struct memblock_s {
type memzone_t (line 740) | typedef struct {
function Z_ClearZone (line 760) | void Z_ClearZone( memzone_t *zone, int size ) {
function Z_AvailableZoneMemory (line 785) | int Z_AvailableZoneMemory( memzone_t *zone ) {
function Z_AvailableMemory (line 794) | int Z_AvailableMemory( void ) {
function Z_Free (line 803) | void Z_Free( void *ptr ) {
function Z_FreeTags (line 874) | void Z_FreeTags( int tag ) {
function Z_CheckHeap (line 1029) | void Z_CheckHeap( void ) {
function Z_LogZoneHeap (line 1052) | void Z_LogZoneHeap( memzone_t *zone, char *name ) {
function Z_LogHeap (line 1105) | void Z_LogHeap( void ) {
type memstatic_t (line 1111) | typedef struct memstatic_s {
type hunkHeader_t (line 1194) | typedef struct {
type hunkUsed_t (line 1199) | typedef struct {
type hunkblock_t (line 1206) | typedef struct hunkblock_s {
function Com_Meminfo_f (line 1232) | void Com_Meminfo_f( void ) {
function Com_TouchMemory (line 1326) | void Com_TouchMemory( void ) {
function Com_InitSmallZoneMemory (line 1373) | void Com_InitSmallZoneMemory( void ) {
function Com_InitZoneMemory (line 1385) | void Com_InitZoneMemory( void ) {
function Hunk_Log (line 1410) | void Hunk_Log( void) {
function Hunk_SmallLog (line 1440) | void Hunk_SmallLog( void) {
function Com_InitHunkMemory (line 1488) | void Com_InitHunkMemory( void ) {
function Hunk_MemoryRemaining (line 1546) | int Hunk_MemoryRemaining( void ) {
function Hunk_SetMark (line 1562) | void Hunk_SetMark( void ) {
function Hunk_ClearToMark (line 1574) | void Hunk_ClearToMark( void ) {
function qboolean (line 1584) | qboolean Hunk_CheckMark( void ) {
function Hunk_Clear (line 1602) | void Hunk_Clear( void ) {
function Hunk_SwapBanks (line 1632) | static void Hunk_SwapBanks( void ) {
function Hunk_FreeTempMemory (line 1782) | void Hunk_FreeTempMemory( void *buf ) {
function Hunk_ClearTempMemory (line 1830) | void Hunk_ClearTempMemory( void ) {
function Hunk_Trash (line 1841) | void Hunk_Trash( void ) {
function Com_InitJournaling (line 1901) | void Com_InitJournaling( void ) {
function sysEvent_t (line 1931) | sysEvent_t Com_GetRealEvent( void ) {
function Com_InitPushEvent (line 1976) | void Com_InitPushEvent( void ) {
function Com_PushEvent (line 1992) | void Com_PushEvent( sysEvent_t *event ) {
function sysEvent_t (line 2023) | sysEvent_t Com_GetEvent( void ) {
function Com_RunAndTimeServerPacket (line 2036) | void Com_RunAndTimeServerPacket( netadr_t *evFrom, msg_t *buf ) {
function Com_EventLoop (line 2063) | int Com_EventLoop( void ) {
function Com_Milliseconds (line 2163) | int Com_Milliseconds (void) {
function Com_Error_f (line 2188) | static void Com_Error_f (void) {
function Com_Freeze_f (line 2205) | static void Com_Freeze_f (void) {
function Com_Crash_f (line 2232) | static void Com_Crash_f( void ) {
function Com_ReadCDKey (line 2251) | void Com_ReadCDKey( const char *filename ) {
function Com_AppendCDKey (line 2281) | void Com_AppendCDKey( const char *filename ) {
function Com_WriteCDKey (line 2312) | static void Com_WriteCDKey( const char *filename, const char *ikey ) {
function Com_Init (line 2349) | void Com_Init( char *commandLine ) {
function Com_WriteConfigToFile (line 2504) | void Com_WriteConfigToFile( const char *filename ) {
function Com_WriteConfiguration (line 2527) | void Com_WriteConfiguration( void ) {
function Com_WriteConfig_f (line 2563) | void Com_WriteConfig_f( void ) {
function Com_ModifyMsec (line 2582) | int Com_ModifyMsec( int msec ) {
function Com_Frame (line 2633) | void Com_Frame( void ) {
function Com_Shutdown (line 2803) | void Com_Shutdown (void) {
function Com_Memcpy (line 2820) | void Com_Memcpy (void* dest, const void* src, const size_t count)
function Com_Memset (line 2825) | void Com_Memset (void* dest, const int val, const size_t count)
type e_prefetch (line 2832) | typedef enum
function Q_acos (line 3148) | float Q_acos(float c) {
function Field_Clear (line 3173) | void Field_Clear( field_t *edit ) {
function FindMatches (line 3191) | static void FindMatches( const char *s ) {
function PrintMatches (line 3217) | static void PrintMatches( const char *s ) {
function keyConcatArgs (line 3223) | static void keyConcatArgs( void ) {
function ConcatRemaining (line 3244) | static void ConcatRemaining( const char *src, const char *start ) {
function Field_CompleteCommand (line 3266) | void Field_CompleteCommand( field_t *field ) {
FILE: src/engine/qcommon/cvar.c
function generateHashValue (line 45) | static long generateHashValue( const char *fname ) {
function qboolean (line 66) | static qboolean Cvar_ValidateString( const char *s ) {
function cvar_t (line 87) | static cvar_t *Cvar_FindVar( const char *var_name ) {
function Cvar_VariableValue (line 107) | float Cvar_VariableValue( const char *var_name ) {
function Cvar_VariableIntegerValue (line 122) | int Cvar_VariableIntegerValue( const char *var_name ) {
function Cvar_VariableStringBuffer (line 152) | void Cvar_VariableStringBuffer( const char *var_name, char *buffer, int ...
function Cvar_CommandCompletion (line 170) | void Cvar_CommandCompletion( void(*callback)(const char *s) ) {
function cvar_t (line 187) | cvar_t *Cvar_Get( const char *var_name, const char *var_value, int flags...
function cvar_t (line 286) | cvar_t *Cvar_Set2( const char *var_name, const char *value, qboolean for...
function Cvar_Set (line 397) | void Cvar_Set( const char *var_name, const char *value) {
function Cvar_SetLatched (line 406) | void Cvar_SetLatched( const char *var_name, const char *value) {
function Cvar_SetValue (line 415) | void Cvar_SetValue( const char *var_name, float value) {
function Cvar_Reset (line 432) | void Cvar_Reset( const char *var_name ) {
function Cvar_SetCheatState (line 444) | void Cvar_SetCheatState( void ) {
function qboolean (line 471) | qboolean Cvar_Command( void ) {
function Cvar_Toggle_f (line 502) | void Cvar_Toggle_f( void ) {
function Cvar_Set_f (line 524) | void Cvar_Set_f( void ) {
function Cvar_SetU_f (line 557) | void Cvar_SetU_f( void ) {
function Cvar_SetS_f (line 579) | void Cvar_SetS_f( void ) {
function Cvar_SetA_f (line 601) | void Cvar_SetA_f( void ) {
function Cvar_Reset_f (line 621) | void Cvar_Reset_f( void ) {
function Cvar_WriteVariables (line 637) | void Cvar_WriteVariables( fileHandle_t f ) {
function Cvar_List_f (line 662) | void Cvar_List_f( void ) {
function Cvar_Restart_f (line 728) | void Cvar_Restart_f( void ) {
function Cvar_InfoStringBuffer (line 822) | void Cvar_InfoStringBuffer( int bit, char* buff, int buffsize ) {
function Cvar_Register (line 833) | void Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *d...
function Cvar_Update (line 853) | void Cvar_Update( vmCvar_t *vmCvar ) {
function Cvar_Init (line 895) | void Cvar_Init (void) {
FILE: src/engine/qcommon/files.c
type fileInPack_t (line 217) | typedef struct fileInPack_s {
type pack_t (line 223) | typedef struct {
type directory_t (line 237) | typedef struct {
type searchpath_t (line 242) | typedef struct searchpath_s {
type qfile_gut (line 267) | typedef union qfile_gus {
type qfile_ut (line 272) | typedef struct qfile_us {
type fileHandleData_t (line 277) | typedef struct {
function qboolean (line 324) | qboolean FS_Initialized() {
function qboolean (line 333) | qboolean FS_PakIsPure( pack_t *pack ) {
function FS_LoadStack (line 357) | int FS_LoadStack()
function FS_HashFileName (line 367) | static long FS_HashFileName( const char *fname, int hashSize ) {
function fileHandle_t (line 387) | static fileHandle_t FS_HandleForFile(void) {
function FILE (line 399) | static FILE *FS_FileForHandle( fileHandle_t f ) {
function FS_ForceFlush (line 413) | void FS_ForceFlush( fileHandle_t f ) {
function FS_filelength (line 429) | int FS_filelength( fileHandle_t f ) {
function FS_ReplaceSeparators (line 450) | static void FS_ReplaceSeparators( char *path ) {
function qboolean (line 493) | static qboolean FS_CreatePath (char *OSPath) {
function FS_CopyFile (line 521) | static void FS_CopyFile( char *fromOSPath, char *toOSPath ) {
function FS_Remove (line 568) | static void FS_Remove( const char *osPath ) {
function qboolean (line 582) | qboolean FS_FileExists( const char *file )
function qboolean (line 604) | qboolean FS_SV_FileExists( const char *file )
function fileHandle_t (line 627) | fileHandle_t FS_SV_FOpenFileWrite( const char *filename ) {
function FS_SV_FOpenFileRead (line 668) | int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp ) {
function FS_SV_Rename (line 751) | void FS_SV_Rename( const char *from, const char *to ) {
function FS_Rename (line 785) | void FS_Rename( const char *from, const char *to ) {
function FS_FCloseFile (line 819) | void FS_FCloseFile( fileHandle_t f ) {
function fileHandle_t (line 849) | fileHandle_t FS_FOpenFileWrite( const char *filename ) {
function fileHandle_t (line 890) | fileHandle_t FS_FOpenFileAppend( const char *filename ) {
function qboolean (line 931) | qboolean FS_FilenameCompare( const char *s1, const char *s2 ) {
function FS_FOpenFileRead (line 988) | int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean...
function FS_Read2 (line 1235) | int FS_Read2( void *buffer, int len, fileHandle_t f ) {
function FS_Read (line 1254) | int FS_Read( void *buffer, int len, fileHandle_t f ) {
function FS_Write (line 1307) | int FS_Write( const void *buffer, int len, fileHandle_t h ) {
function FS_Printf (line 1353) | void QDECL FS_Printf( fileHandle_t h, const char *fmt, ... ) {
function FS_Seek (line 1370) | int FS_Seek( fileHandle_t f, long offset, int origin ) {
function FS_FileIsInPAK (line 1431) | int FS_FileIsInPAK(const char *filename, int *pChecksum ) {
function FS_ReadFile (line 1499) | int FS_ReadFile( const char *qpath, void **buffer ) {
function FS_FreeFile (line 1613) | void FS_FreeFile( void *buffer ) {
function FS_WriteFile (line 1637) | void FS_WriteFile( const char *qpath, const void *buffer, int size ) {
function pack_t (line 1677) | static pack_t *FS_LoadZipFile( char *zipfile, const char *basename )
function FS_ReturnPath (line 1788) | static int FS_ReturnPath( const char *zname, char *zpath, int *depth ) {
function FS_AddFileToList (line 1816) | static int FS_AddFileToList( char *name, char *list[MAX_FOUND_FILES], in...
function FS_FreeFileList (line 1982) | void FS_FreeFileList( char **list ) {
function FS_GetFileList (line 2006) | int FS_GetFileList( const char *path, const char *extension, char *list...
function Sys_CountFileList (line 2049) | static unsigned int Sys_CountFileList(char **list)
function FS_GetModList (line 2114) | int FS_GetModList( char *listbuf, int bufsize ) {
function FS_Dir_f (line 2237) | void FS_Dir_f( void ) {
function FS_ConvertPath (line 2273) | void FS_ConvertPath( char *s ) {
function FS_PathCmp (line 2289) | int FS_PathCmp( const char *s1, const char *s2 ) {
function FS_SortFileList (line 2326) | void FS_SortFileList(char **filelist, int numfiles) {
function FS_NewDir_f (line 2354) | void FS_NewDir_f( void ) {
function FS_Path_f (line 2388) | void FS_Path_f( void ) {
function FS_TouchFile_f (line 2425) | void FS_TouchFile_f( void ) {
function paksort (line 2442) | static int QDECL paksort( const void *a, const void *b ) {
function FS_AddGameDirectory (line 2460) | static void FS_AddGameDirectory( const char *path, const char *dir ) {
function qboolean (line 2530) | qboolean FS_idPak( char *pak, char *base ) {
function qboolean (line 2570) | qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) {
function FS_Shutdown (line 2652) | void FS_Shutdown( qboolean closemfp ) {
function FS_ReorderPurePaks (line 2702) | static void FS_ReorderPurePaks()
function FS_Startup (line 2740) | static void FS_Startup( const char *gameName ) {
function FS_SetRestrictions (line 2838) | static void FS_SetRestrictions( void ) {
function FS_ClearPakReferences (line 3113) | void FS_ClearPakReferences( int flags ) {
function FS_PureServerSetLoadedPaks (line 3138) | void FS_PureServerSetLoadedPaks( const char *pakSums, const char *pakNam...
function FS_PureServerSetReferencedPaks (line 3198) | void FS_PureServerSetReferencedPaks( const char *pakSums, const char *pa...
function FS_InitFilesystem (line 3242) | void FS_InitFilesystem( void ) {
function FS_Restart (line 3280) | void FS_Restart( int checksumFeed ) {
function qboolean (line 3336) | qboolean FS_ConditionalRestart( int checksumFeed ) {
function FS_FOpenFileByMode (line 3352) | int FS_FOpenFileByMode( const char *qpath, fileHandle_t *f, fsMode_t mo...
function FS_FTell (line 3406) | int FS_FTell( fileHandle_t f ) {
function FS_Flush (line 3416) | void FS_Flush( fileHandle_t f ) {
FILE: src/engine/qcommon/huffman.c
function Huff_putBit (line 32) | void Huff_putBit( int bit, byte *fout, int *offset) {
function Huff_getBit (line 42) | int Huff_getBit( byte *fin, int *offset) {
function add_bit (line 52) | static void add_bit (char bit, byte *fout) {
function get_bit (line 61) | static int get_bit (byte *fin) {
function node_t (line 68) | static node_t **get_ppnode(huff_t* huff) {
function free_ppnode (line 79) | static void free_ppnode(huff_t* huff, node_t **ppnode) {
function swap (line 85) | static void swap (huff_t* huff, node_t *node1, node_t *node2) {
function swaplist (line 116) | static void swaplist(node_t *node1, node_t *node2) {
function increment (line 148) | static void increment(huff_t* huff, node_t *node) {
func
Condensed preview — 367 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,741K chars).
[
{
"path": ".github/workflows/msbuild.yml",
"chars": 862,
"preview": "name: MSBuild\n\non:\n push:\n branches: [ \"master\" ]\n paths-ignore:\n - '*.md'\n pull_request:\n branches: [ \""
},
{
"path": ".gitignore",
"chars": 185,
"preview": "*.opendb\n*.opensdf\n*.sdf\n*.suo\n*.user\nbin/\ntools/bin2hex.exe\ntools/bin2hex.obj\nvisual-studio/.vs/\nvisual-studio/vk_repor"
},
{
"path": "COPYING.txt",
"chars": 15148,
"preview": "\t\t GNU GENERAL PUBLIC LICENSE\n\t\t Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc."
},
{
"path": "README.md",
"chars": 2747,
"preview": "# Welcome to Quake 3 source code!\n\n 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_draw.c",
"chars": 47832,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_drawtools.c",
"chars": 17669,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_effects.c",
"chars": 13111,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_ents.c",
"chars": 22407,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_event.c",
"chars": 27490,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_info.c",
"chars": 7742,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_local.h",
"chars": 46140,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_localents.c",
"chars": 16332,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_main.c",
"chars": 37151,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_marks.c",
"chars": 47315,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_particles.c",
"chars": 40763,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_players.c",
"chars": 59533,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_playerstate.c",
"chars": 14114,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_predict.c",
"chars": 16856,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_public.h",
"chars": 6167,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_scoreboard.c",
"chars": 14594,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_servercmds.c",
"chars": 23687,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_snapshot.c",
"chars": 11084,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_syscalls.asm",
"chars": 3125,
"preview": "code\n\nequ\ttrap_Print\t\t\t\t\t\t\t-1\nequ\ttrap_Error\t\t\t\t\t\t\t-2\nequ\ttrap_Milliseconds\t\t\t\t\t-3\nequ\ttrap_Cvar_Register\t\t\t\t\t-4\nequ\ttra"
},
{
"path": "src/cgame/cg_syscalls.c",
"chars": 13859,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_view.c",
"chars": 22509,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cg_weapons.c",
"chars": 54755,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/cgame/cgame.bat",
"chars": 1683,
"preview": "rem make sure we have a safe environement\nset LIBRARY=\nset INCLUDE=\n\nmkdir ..\\..\\intermediate\\vm\\cgame\ncd ..\\..\\intermed"
},
{
"path": "src/cgame/cgame.q3asm",
"chars": 321,
"preview": "-o \"..\\..\\..\\binaries\\vm\\cgame.qvm\"\ncg_main\n..\\..\\..\\source\\cgame\\cg_syscalls\ncg_consolecmds\ncg_draw\ncg_drawtools\ncg_eff"
},
{
"path": "src/cgame/tr_types.h",
"chars": 6690,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/aasfile.h",
"chars": 8911,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_bsp.h",
"chars": 3254,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_bspq3.c",
"chars": 14680,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_cluster.c",
"chars": 50964,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_cluster.h",
"chars": 1366,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_debug.c",
"chars": 23607,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_debug.h",
"chars": 2381,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_def.h",
"chars": 8450,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_entity.c",
"chars": 12958,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_entity.h",
"chars": 2497,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_file.c",
"chars": 24515,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_file.h",
"chars": 1519,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_funcs.h",
"chars": 1572,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_main.c",
"chars": 13552,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_main.h",
"chars": 2055,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_move.c",
"chars": 37589,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_move.h",
"chars": 2886,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_optimize.c",
"chars": 11002,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_optimize.h",
"chars": 1244,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_reach.c",
"chars": 152894,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_reach.h",
"chars": 2828,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_route.c",
"chars": 74730,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_route.h",
"chars": 2872,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_routealt.c",
"chars": 8284,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_routealt.h",
"chars": 1535,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_sample.c",
"chars": 42934,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_aas_sample.h",
"chars": 3112,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_char.c",
"chars": 23207,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_chat.c",
"chars": 87078,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_gen.c",
"chars": 3966,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_goal.c",
"chars": 53171,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_move.c",
"chars": 113108,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_weap.c",
"chars": 18467,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_weight.c",
"chars": 26700,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ai_weight.h",
"chars": 2888,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_ea.c",
"chars": 14369,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_interface.c",
"chars": 29232,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/be_interface.h",
"chars": 1884,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_crc.c",
"chars": 5853,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_crc.h",
"chars": 1280,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_libvar.c",
"chars": 7591,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_libvar.h",
"chars": 2386,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_log.c",
"chars": 5082,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_log.h",
"chars": 1644,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_memory.c",
"chars": 13580,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_memory.h",
"chars": 3011,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_precomp.c",
"chars": 88834,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_precomp.h",
"chars": 6176,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_script.c",
"chars": 40402,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_script.h",
"chars": 8224,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_struct.c",
"chars": 12532,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_struct.h",
"chars": 2494,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/botlib/l_utils.h",
"chars": 1355,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_cgame.c",
"chars": 28857,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_cin.c",
"chars": 49085,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_console.c",
"chars": 16326,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_input.c",
"chars": 23869,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_keys.c",
"chars": 25676,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_main.c",
"chars": 77940,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_net_chan.c",
"chars": 4301,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_parse.c",
"chars": 17026,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_scrn.c",
"chars": 11721,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/cl_ui.c",
"chars": 27030,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/client.h",
"chars": 15985,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/keys.h",
"chars": 2079,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/snd_adpcm.c",
"chars": 8824,
"preview": "/***********************************************************\nCopyright 1992 by Stichting Mathematisch Centrum, Amsterdam"
},
{
"path": "src/engine/client/snd_dma.c",
"chars": 37203,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/snd_local.h",
"chars": 5334,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/snd_mem.c",
"chars": 9124,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/snd_mix.c",
"chars": 17274,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/snd_public.h",
"chars": 2770,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/client/snd_wavelet.c",
"chars": 5930,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/resource.h",
"chars": 1694,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_gamma.c",
"chars": 4002,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_glimp.c",
"chars": 30383,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_input.c",
"chars": 6461,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_local.h",
"chars": 2505,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_main.c",
"chars": 25953,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_net.c",
"chars": 25396,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_qgl.c",
"chars": 41259,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_shared.c",
"chars": 2576,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_snd.c",
"chars": 9209,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_syscon.c",
"chars": 12481,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/win_wndproc.c",
"chars": 8380,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/platform/winquake.rc",
"chars": 1529,
"preview": "//Microsoft Developer Studio generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n////"
},
{
"path": "src/engine/qcommon/cm_load.c",
"chars": 20739,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_local.h",
"chars": 4944,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_patch.c",
"chars": 43933,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_patch.h",
"chars": 3173,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_polylib.c",
"chars": 14765,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_polylib.h",
"chars": 2360,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_public.h",
"chars": 2981,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_test.c",
"chars": 9855,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cm_trace.c",
"chars": 38549,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cmd.c",
"chars": 13767,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/common.c",
"chars": 76913,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/cvar.c",
"chars": 18321,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/files.c",
"chars": 87588,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/huffman.c",
"chars": 10892,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/md4.c",
"chars": 10144,
"preview": "/* GLOBAL.H - RSAREF types and constants */\n\n#include <string.h>\n#if defined(_WIN32)\n#pragma warning(disable : 4711)\t\t//"
},
{
"path": "src/engine/qcommon/msg.c",
"chars": 39111,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/net_chan.c",
"chars": 17829,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/qcommon.h",
"chars": 32247,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/qfiles.h",
"chars": 11319,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/unzip.c",
"chars": 146165,
"preview": "/*****************************************************************************\n * name:\t\tunzip.c\n *\n * desc:\t\tIO on .zip"
},
{
"path": "src/engine/qcommon/unzip.h",
"chars": 13527,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/vm.c",
"chars": 16079,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/vm_interpreted.c",
"chars": 19838,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/qcommon/vm_local.h",
"chars": 3446,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/dx.cpp",
"chars": 50788,
"preview": "#include \"tr_local.h\"\n#include \"../../engine/platform/win_local.h\"\n\n#include <chrono>\n#include <functional>\n\n#ifdef ENAB"
},
{
"path": "src/engine/renderer/dx.h",
"chars": 4437,
"preview": "#pragma once\n\n//\n// DirectX 12 backend implementation is provided mostly for educational purposes and is not included in"
},
{
"path": "src/engine/renderer/jpeg/stb_image.h",
"chars": 244960,
"preview": "/* stb_image - v2.14 - public domain image loader - http://nothings.org/stb_image.h\n "
},
{
"path": "src/engine/renderer/jpeg/tiny_jpeg.h",
"chars": 41050,
"preview": "/**\n * tiny_jpeg.h\n *\n * Tiny JPEG Encoder\n * - Sergio Gonzalez\n *\n * This is a readable and simple single-header JPEG "
},
{
"path": "src/engine/renderer/qgl.h",
"chars": 6347,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/shaders/apply_gamma.comp",
"chars": 946,
"preview": "#version 450\n#extension GL_EXT_samplerless_texture_functions : require\n\nlayout(local_size_x = 8, local_size_y = 8) in;\n\n"
},
{
"path": "src/engine/renderer/shaders/compile.bat",
"chars": 829,
"preview": "@echo off\nset \"VSCMD_START_DIR=%CD%\"\ncall \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\VsDevCm"
},
{
"path": "src/engine/renderer/shaders/compile_hlsl.bat",
"chars": 3577,
"preview": "@echo off\nset \"VSCMD_START_DIR=%CD%\"\ncall \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\V"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_add_ge80_ps.cpp",
"chars": 6000,
"preview": "unsigned char multi_texture_add_ge80_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xAC, 0x4E, 0x52, 0x94, 0x46, 0xAA, 0xBC, 0x34, 0"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_add_gt0_ps.cpp",
"chars": 5998,
"preview": "unsigned char multi_texture_add_gt0_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x0D, 0x09, 0x41, 0xC2, 0x6D, 0x93, 0x9E, 0x74, 0x"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_add_lt80_ps.cpp",
"chars": 6000,
"preview": "unsigned char multi_texture_add_lt80_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x50, 0x45, 0xD8, 0x74, 0x74, 0x33, 0xD0, 0x77, 0"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_add_ps.cpp",
"chars": 5622,
"preview": "unsigned char multi_texture_add_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x19, 0xA2, 0x34, 0xAB, 0xC2, 0x02, 0x75, 0x6D, 0xC1, "
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_clipping_plane_vs.cpp",
"chars": 8315,
"preview": "unsigned char multi_texture_clipping_plane_vs[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xF1, 0x59, 0xAC, 0x11, 0xC8, 0x58, 0x63, 0"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_mul_ge80_ps.cpp",
"chars": 5780,
"preview": "unsigned char multi_texture_mul_ge80_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xB4, 0x1D, 0x86, 0x5A, 0x10, 0x10, 0x46, 0x4B, 0"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_mul_gt0_ps.cpp",
"chars": 5778,
"preview": "unsigned char multi_texture_mul_gt0_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x26, 0x5B, 0x38, 0x4E, 0xB1, 0x89, 0x0B, 0x4A, 0x"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_mul_lt80_ps.cpp",
"chars": 5780,
"preview": "unsigned char multi_texture_mul_lt80_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x64, 0x9F, 0xD8, 0x94, 0x47, 0xF5, 0x30, 0xE4, 0"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_mul_ps.cpp",
"chars": 5402,
"preview": "unsigned char multi_texture_mul_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x50, 0x19, 0x9C, 0x2F, 0x2D, 0xEE, 0xD3, 0xC4, 0xEA, "
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/multi_texture_vs.cpp",
"chars": 6963,
"preview": "unsigned char multi_texture_vs[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x17, 0xD0, 0x46, 0xDC, 0xB7, 0x33, 0x49, 0x2C, 0x96, 0x9D"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/single_texture_clipping_plane_vs.cpp",
"chars": 7755,
"preview": "unsigned char single_texture_clipping_plane_vs[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x18, 0xE4, 0x5E, 0x68, 0xE6, 0xA1, 0xD6, "
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/single_texture_ge80_ps.cpp",
"chars": 4500,
"preview": "unsigned char single_texture_ge80_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xE7, 0xDE, 0xCF, 0x2D, 0xC7, 0xD8, 0xE0, 0x89, 0x9E"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/single_texture_gt0_ps.cpp",
"chars": 4498,
"preview": "unsigned char single_texture_gt0_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xB0, 0xD6, 0x4F, 0x95, 0xC6, 0xA4, 0x6B, 0x65, 0x14,"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/single_texture_lt80_ps.cpp",
"chars": 4500,
"preview": "unsigned char single_texture_lt80_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xAF, 0x67, 0xD3, 0x17, 0x36, 0xC1, 0x86, 0xDD, 0x1E"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/single_texture_ps.cpp",
"chars": 4122,
"preview": "unsigned char single_texture_ps[] = {\n\t0x44, 0x58, 0x42, 0x43, 0x70, 0x57, 0xC0, 0xFF, 0x10, 0xA3, 0x7E, 0x94, 0x79, 0xE"
},
{
"path": "src/engine/renderer/shaders/hlsl_compiled/single_texture_vs.cpp",
"chars": 6401,
"preview": "unsigned char single_texture_vs[] = {\n\t0x44, 0x58, 0x42, 0x43, 0xBD, 0x59, 0x1D, 0x43, 0x84, 0x50, 0x25, 0xE8, 0x09, 0x0"
},
{
"path": "src/engine/renderer/shaders/multi_texture.vert",
"chars": 591,
"preview": "#version 450\n\nlayout(push_constant) uniform Transform {\n mat4 mvp;\n};\n\nlayout(location = 0) in vec3 in_position;\nlayo"
},
{
"path": "src/engine/renderer/shaders/multi_texture_add.frag",
"chars": 815,
"preview": "#version 450\n\nlayout(set = 0, binding = 0) uniform sampler2D texture0;\nlayout(set = 1, binding = 0) uniform sampler2D te"
},
{
"path": "src/engine/renderer/shaders/multi_texture_clipping_plane.vert",
"chars": 826,
"preview": "#version 450\n\n// 128 bytes\nlayout(push_constant) uniform Transform {\n mat4 clip_space_xform;\n mat3x4 eye_space_xfo"
},
{
"path": "src/engine/renderer/shaders/multi_texture_mul.frag",
"chars": 722,
"preview": "#version 450\n\nlayout(set = 0, binding = 0) uniform sampler2D texture0;\nlayout(set = 1, binding = 0) uniform sampler2D te"
},
{
"path": "src/engine/renderer/shaders/shaders.hlsl",
"chars": 3559,
"preview": "struct Single_Texture_PS_Data {\n float4 position : SV_POSITION;\n float4 color : COLOR;\n float2 uv0 : TEXCOORD;"
},
{
"path": "src/engine/renderer/shaders/single_texture.frag",
"chars": 580,
"preview": "#version 450\n\nlayout(set = 0, binding = 0) uniform sampler2D texture0;\n\nlayout(location = 0) in vec4 frag_color;\nlayout("
},
{
"path": "src/engine/renderer/shaders/single_texture.vert",
"chars": 460,
"preview": "#version 450\n\nlayout(push_constant) uniform Transform {\n mat4 mvp;\n};\n\nlayout(location = 0) in vec3 in_position;\nlayo"
},
{
"path": "src/engine/renderer/shaders/single_texture_clipping_plane.vert",
"chars": 694,
"preview": "#version 450\n\n// 128 bytes\nlayout(push_constant) uniform Transform {\n mat4 clip_space_xform;\n mat3x4 eye_space_xfo"
},
{
"path": "src/engine/renderer/shaders/spirv/apply_gamma_comp.cpp",
"chars": 17555,
"preview": "unsigned char apply_gamma_comp_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x6D, "
},
{
"path": "src/engine/renderer/shaders/spirv/multi_texture_add_frag.cpp",
"chars": 12765,
"preview": "unsigned char multi_texture_add_frag_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, "
},
{
"path": "src/engine/renderer/shaders/spirv/multi_texture_clipping_plane_vert.cpp",
"chars": 12713,
"preview": "unsigned char multi_texture_clipping_plane_vert_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0"
},
{
"path": "src/engine/renderer/shaders/spirv/multi_texture_mul_frag.cpp",
"chars": 10241,
"preview": "unsigned char multi_texture_mul_frag_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, "
},
{
"path": "src/engine/renderer/shaders/spirv/multi_texture_vert.cpp",
"chars": 8493,
"preview": "unsigned char multi_texture_vert_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x2D"
},
{
"path": "src/engine/renderer/shaders/spirv/single_texture_clipping_plane_vert.cpp",
"chars": 11809,
"preview": "unsigned char single_texture_clipping_plane_vert_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, "
},
{
"path": "src/engine/renderer/shaders/spirv/single_texture_frag.cpp",
"chars": 9011,
"preview": "unsigned char single_texture_frag_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x4"
},
{
"path": "src/engine/renderer/shaders/spirv/single_texture_vert.cpp",
"chars": 7589,
"preview": "unsigned char single_texture_vert_spv[] = {\n\t0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x2"
},
{
"path": "src/engine/renderer/tr_animation.c",
"chars": 5273,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_backend.c",
"chars": 27977,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_bsp.c",
"chars": 51916,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_cmds.c",
"chars": 9636,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_curve.c",
"chars": 15857,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_font.c",
"chars": 16416,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_image.c",
"chars": 54270,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_init.c",
"chars": 35380,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_light.c",
"chars": 10756,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_local.h",
"chars": 42622,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_main.c",
"chars": 41922,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_marks.c",
"chars": 13781,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_mesh.c",
"chars": 10252,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_model.c",
"chars": 17941,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_noise.c",
"chars": 2824,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_public.h",
"chars": 6838,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_scene.c",
"chars": 10009,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_shade.c",
"chars": 25700,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_shade_calc.c",
"chars": 28781,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "src/engine/renderer/tr_shader.c",
"chars": 76627,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
}
]
// ... and 167 more files (download for full content)
About this extraction
This page contains the full source code of the kennyalive/Quake-III-Arena-Kenny-Edition GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 367 files (7.7 MB), approximately 2.0M tokens, and a symbol index with 8955 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.