├── CMakeLists.txt ├── COPYING.txt ├── README.txt ├── main └── ui │ └── menudef.h ├── src ├── CMakeLists.txt ├── Makefile ├── botai │ ├── 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 │ ├── botai.h │ ├── chars.h │ ├── inv.h │ ├── match.h │ └── syn.h ├── botlib │ ├── CMakeLists.txt │ ├── aasfile.h │ ├── be_aas.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_routetable.c │ ├── be_aas_routetable.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 │ ├── botlib.h │ ├── botlib.vcproj │ ├── 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 ├── bspc │ ├── _files.c │ ├── aas_areamerging.c │ ├── aas_areamerging.h │ ├── aas_cfg.c │ ├── aas_cfg.h │ ├── aas_create.c │ ├── aas_create.h │ ├── aas_edgemelting.c │ ├── aas_edgemelting.h │ ├── aas_facemerging.c │ ├── aas_facemerging.h │ ├── aas_file.c │ ├── aas_file.h │ ├── aas_gsubdiv.c │ ├── aas_gsubdiv.h │ ├── aas_map.c │ ├── aas_map.h │ ├── aas_prunenodes.c │ ├── aas_prunenodes.h │ ├── aas_store.c │ ├── aas_store.h │ ├── be_aas_bspc.c │ ├── be_aas_bspc.h │ ├── brushbsp.c │ ├── bspc.c │ ├── csg.c │ ├── faces.c │ ├── glfile.c │ ├── l_bsp_ent.c │ ├── l_bsp_ent.h │ ├── l_bsp_hl.c │ ├── l_bsp_hl.h │ ├── l_bsp_q1.c │ ├── l_bsp_q1.h │ ├── l_bsp_q2.c │ ├── l_bsp_q2.h │ ├── l_bsp_q3.c │ ├── l_bsp_q3.h │ ├── l_bsp_sin.c │ ├── l_bsp_sin.h │ ├── l_cmd.c │ ├── l_cmd.h │ ├── l_log.c │ ├── l_log.h │ ├── l_math.c │ ├── l_math.h │ ├── l_mem.c │ ├── l_mem.h │ ├── l_poly.c │ ├── l_poly.h │ ├── l_qfiles.c │ ├── l_qfiles.h │ ├── l_threads.c │ ├── l_threads.h │ ├── l_utils.c │ ├── l_utils.h │ ├── leakfile.c │ ├── map.c │ ├── map_hl.c │ ├── map_q1.c │ ├── map_q2.c │ ├── map_q3.c │ ├── map_sin.c │ ├── nodraw.c │ ├── portals.c │ ├── prtfile.c │ ├── q2files.h │ ├── q3files.h │ ├── qbsp.h │ ├── qfiles.h │ ├── sinfiles.h │ ├── textures.c │ ├── tree.c │ └── writebsp.c ├── cgame │ ├── CMakeLists.txt │ ├── cg_consolecmds.c │ ├── cg_draw.c │ ├── cg_drawtools.c │ ├── cg_effects.c │ ├── cg_ents.c │ ├── cg_event.c │ ├── cg_flamethrower.c │ ├── cg_info.c │ ├── cg_local.h │ ├── cg_localents.c │ ├── cg_main.c │ ├── cg_marks.c │ ├── cg_newDraw.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_sound.c │ ├── cg_syscalls.c │ ├── cg_trails.c │ ├── cg_view.c │ ├── cg_weapons.c │ ├── cgame.def │ ├── cgame.vcproj │ └── tr_types.h ├── client │ ├── CMakeLists.txt │ ├── 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 ├── extractfuncs │ ├── ChangeLog │ ├── Conscript │ ├── extractfuncs.bat │ ├── extractfuncs.c │ ├── extractfuncs.vcproj │ ├── l_log.c │ ├── l_log.h │ ├── l_memory.c │ ├── l_memory.h │ ├── l_precomp.c │ ├── l_precomp.h │ ├── l_script.c │ └── l_script.h ├── ft2 │ ├── ahangles.c │ ├── ahangles.h │ ├── ahglobal.c │ ├── ahglobal.h │ ├── ahglyph.c │ ├── ahglyph.h │ ├── ahhint.c │ ├── ahhint.h │ ├── ahloader.h │ ├── ahmodule.c │ ├── ahmodule.h │ ├── ahoptim.c │ ├── ahoptim.h │ ├── ahtypes.h │ ├── autohint.h │ ├── freetype.h │ ├── ftcalc.c │ ├── ftcalc.h │ ├── ftconfig.h │ ├── ftdebug.c │ ├── ftdebug.h │ ├── ftdriver.h │ ├── fterrors.h │ ├── ftextend.c │ ├── ftextend.h │ ├── ftglyph.c │ ├── ftglyph.h │ ├── ftgrays.c │ ├── ftgrays.h │ ├── ftimage.h │ ├── ftinit.c │ ├── ftlist.c │ ├── ftlist.h │ ├── ftmemory.h │ ├── ftmm.c │ ├── ftmm.h │ ├── ftmodule.h │ ├── ftnames.c │ ├── ftnames.h │ ├── ftobjs.c │ ├── ftobjs.h │ ├── ftoption.h │ ├── ftoutln.c │ ├── ftoutln.h │ ├── ftraster.c │ ├── ftraster.h │ ├── ftrend1.c │ ├── ftrend1.h │ ├── ftrender.h │ ├── ftsmooth.c │ ├── ftsmooth.h │ ├── ftstream.c │ ├── ftstream.h │ ├── ftsystem.c │ ├── ftsystem.h │ ├── fttypes.h │ ├── psnames.h │ ├── sfdriver.c │ ├── sfdriver.h │ ├── sfnt.h │ ├── sfobjs.c │ ├── sfobjs.h │ ├── t1tables.h │ ├── ttcmap.c │ ├── ttcmap.h │ ├── ttdriver.c │ ├── ttdriver.h │ ├── tterrors.h │ ├── ttgload.c │ ├── ttgload.h │ ├── ttinterp.c │ ├── ttinterp.h │ ├── ttload.c │ ├── ttload.h │ ├── ttnameid.h │ ├── ttobjs.c │ ├── ttobjs.h │ ├── ttpload.c │ ├── ttpload.h │ ├── ttpost.c │ ├── ttpost.h │ ├── ttsbit.c │ ├── ttsbit.h │ ├── tttables.h │ ├── tttags.h │ └── tttypes.h ├── game │ ├── CMakeLists.txt │ ├── ai_cast.c │ ├── ai_cast.h │ ├── ai_cast_characters.c │ ├── ai_cast_debug.c │ ├── ai_cast_events.c │ ├── ai_cast_fight.c │ ├── ai_cast_fight.h │ ├── ai_cast_func_attack.c │ ├── ai_cast_func_boss1.c │ ├── ai_cast_funcs.c │ ├── ai_cast_global.h │ ├── ai_cast_script.c │ ├── ai_cast_script_actions.c │ ├── ai_cast_script_ents.c │ ├── ai_cast_sight.c │ ├── ai_cast_think.c │ ├── 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_animation.c │ ├── bg_lib.c │ ├── bg_local.h │ ├── bg_misc.c │ ├── bg_pmove.c │ ├── bg_public.h │ ├── bg_slidemove.c │ ├── botlib.h │ ├── g_active.c │ ├── g_alarm.c │ ├── g_bot.c │ ├── g_client.c │ ├── g_cmds.c │ ├── g_combat.c │ ├── g_func_decs.h │ ├── g_funcs.h │ ├── g_items.c │ ├── g_local.h │ ├── g_main.c │ ├── g_mem.c │ ├── g_misc.c │ ├── g_missile.c │ ├── g_mover.c │ ├── g_props.c │ ├── g_public.h │ ├── g_save.c │ ├── g_script.c │ ├── g_script_actions.c │ ├── g_session.c │ ├── g_spawn.c │ ├── g_svcmds.c │ ├── g_syscalls.c │ ├── g_target.c │ ├── g_team.c │ ├── g_team.h │ ├── g_tramcar.c │ ├── g_trigger.c │ ├── g_utils.c │ ├── g_weapon.c │ ├── game.def │ ├── game.vcproj │ ├── q_math.c │ ├── q_shared.c │ ├── q_shared.h │ └── surfaceflags.h ├── idLib │ ├── idAudio.h │ ├── idAudioHardware.h │ ├── idLib.h │ ├── idQ3Asnd.cpp │ ├── idSound.cpp │ ├── idSound.h │ ├── idSpeaker.cpp │ ├── idSpeaker.h │ └── sys │ │ └── win32 │ │ ├── eax.h │ │ ├── eaxguid.lib │ │ └── win_snd.cpp ├── jpeg-6 │ ├── CMakeLists.txt │ ├── jcapimin.c │ ├── jccoefct.c │ ├── jccolor.c │ ├── jcdctmgr.c │ ├── jchuff.c │ ├── jchuff.h │ ├── jcinit.c │ ├── jcmainct.c │ ├── jcmarker.c │ ├── jcmaster.c │ ├── jcomapi.c │ ├── jconfig.h │ ├── jcparam.c │ ├── jcphuff.c │ ├── jcprepct.c │ ├── jcsample.c │ ├── jctrans.c │ ├── jdapimin.c │ ├── jdapistd.c │ ├── jdatadst.c │ ├── jdatasrc.c │ ├── jdcoefct.c │ ├── jdcolor.c │ ├── jdct.h │ ├── jddctmgr.c │ ├── jdhuff.c │ ├── jdhuff.h │ ├── jdinput.c │ ├── jdmainct.c │ ├── jdmarker.c │ ├── jdmaster.c │ ├── jdpostct.c │ ├── jdsample.c │ ├── jdtrans.c │ ├── jerror.c │ ├── jerror.h │ ├── jfdctflt.c │ ├── jidctflt.c │ ├── jinclude.h │ ├── jmemmgr.c │ ├── jmemnobs.c │ ├── jmemsys.h │ ├── jmorecfg.h │ ├── jpegint.h │ ├── jpeglib.h │ ├── jutils.c │ └── jversion.h ├── macosx │ ├── BuildRelease │ ├── CGMouseDeltaFix.h │ ├── CGMouseDeltaFix.m │ ├── CGPrivateAPI.h │ ├── GenerateQGL.pl │ ├── Performance.rtf │ ├── Q3Controller.h │ ├── Q3Controller.m │ ├── Quake3.icns │ ├── Quake3.nib │ │ ├── classes.nib │ │ ├── info.nib │ │ └── objects.nib │ ├── RecordDemo.zsh │ ├── WolfSP.pbproj │ │ ├── bungi.pbxuser │ │ ├── duane.pbxuser │ │ ├── johnson.pbxuser │ │ ├── project.pbxproj │ │ └── zaphod.pbxuser │ ├── banner.jpg │ ├── macosx_display.h │ ├── macosx_display.m │ ├── macosx_glimp.h │ ├── macosx_glimp.m │ ├── macosx_glsmp_mutex.m │ ├── macosx_glsmp_null.m │ ├── macosx_glsmp_ports.m │ ├── macosx_input.m │ ├── macosx_local.h │ ├── macosx_qgl.h │ ├── macosx_sndcore.m │ ├── macosx_snddma.m │ ├── macosx_sys.m │ ├── macosx_timers.h │ ├── macosx_timers.m │ └── timedemo.zsh ├── 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 │ ├── vm_none.c │ └── vm_x86.c ├── renderer │ ├── anorms256.h │ ├── qgl.h │ ├── qgl_linked.h │ ├── ref_trin.def │ ├── renderer.vcproj │ ├── tr_animation.c │ ├── tr_backend.c │ ├── tr_bsp.c │ ├── tr_cmds.c │ ├── tr_cmesh.c │ ├── tr_curve.c │ ├── tr_flares.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 ├── 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 ├── splines │ ├── CMakeLists.txt │ ├── Splines.vcproj │ ├── math_angles.cpp │ ├── math_angles.h │ ├── math_matrix.cpp │ ├── math_matrix.h │ ├── math_quaternion.cpp │ ├── math_quaternion.h │ ├── math_vector.cpp │ ├── math_vector.h │ ├── q_parse.cpp │ ├── q_shared.cpp │ ├── q_splineshared.h │ ├── splines.cpp │ ├── splines.h │ ├── util_list.h │ ├── util_str.cpp │ └── util_str.h ├── ui │ ├── CMakeLists.txt │ ├── keycodes.h │ ├── ui.def │ ├── ui.vcproj │ ├── ui_atoms.c │ ├── ui_gameinfo.c │ ├── ui_local.h │ ├── ui_main.c │ ├── ui_players.c │ ├── ui_public.h │ ├── ui_shared.c │ ├── ui_shared.h │ ├── ui_syscalls.c │ └── ui_util.c ├── unix │ ├── ChangeLog │ ├── Conscript-bspc │ ├── Conscript-cgame │ ├── Conscript-client │ ├── Conscript-client2 │ ├── Conscript-game │ ├── Conscript-setup │ ├── Conscript-ui │ ├── Construct │ ├── README.EULA │ ├── README.Linux │ ├── README.Q3Test │ ├── bspc.vpj │ ├── build_setup.sh │ ├── build_tarball.sh │ ├── cgame.vpj │ ├── client.vpj │ ├── cons │ ├── extractfuncs.vpj │ ├── ftol.nasm │ ├── game.vpj │ ├── linux_common.c │ ├── linux_glimp.c │ ├── linux_joystick.c │ ├── linux_local.h │ ├── linux_qgl.c │ ├── linux_snd.c │ ├── matha.s │ ├── pcons-2.3.1 │ ├── qasm.h │ ├── quake3.xpm │ ├── sdl2_gamma.c │ ├── sdl2_glimp.c │ ├── sdl2_input.c │ ├── sdl2_snd.c │ ├── sdl_gamma.c │ ├── sdl_glimp.c │ ├── sdl_input.c │ ├── sdl_snd.c │ ├── snapvector.nasm │ ├── snd_mixa.s │ ├── sys_dosa.s │ ├── ui.vpj │ ├── unix_glw.h │ ├── unix_main.c │ ├── unix_net.c │ ├── unix_shared.c │ ├── vm_x86.c │ ├── vm_x86a.s │ └── wolf.vpw ├── win32 │ ├── background.bmp │ ├── clear.bmp │ ├── glw_win.h │ ├── qe3.ico │ ├── resource.h │ ├── save │ │ └── win_snd.c │ ├── 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 ├── wolf.sln └── wolf.vcproj └── uncrustify.cfg /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(wolf.exe) 2 | 3 | cmake_minimum_required(VERSION 2.6) 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 NEW) 6 | endif(COMMAND cmake_policy) 7 | 8 | option(ENABLE_DEMO "Build demo version") 9 | 10 | set(CMAKE_BUILD_TYPE "Release") 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -fsigned-char -fno-strict-aliasing -Wall") 12 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused") 13 | 14 | set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g") 15 | set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O3 -ffast-math") 16 | 17 | 18 | if(ENABLE_DEMO) 19 | add_definitions(-DWOLF_SP_DEMO) 20 | endif() 21 | 22 | set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) 23 | 24 | add_subdirectory(src) 25 | -------------------------------------------------------------------------------- /COPYING.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/COPYING.txt -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(game) 2 | add_subdirectory(cgame) 3 | add_subdirectory(ui) 4 | #add_subdirectory(jpeg-6) 5 | add_subdirectory(splines) 6 | add_subdirectory(botlib) 7 | add_subdirectory(client) 8 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | cd unix && ./cons 3 | 4 | debug: 5 | cd unix && ./cons -- debug 6 | 7 | sdl2: 8 | cd unix && ./cons -- sdl2 9 | -------------------------------------------------------------------------------- /src/botai/ai_chat.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: ai_chat.h 32 | * 33 | * desc: Quake3 bot AI 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | // 39 | int BotChat_EnterGame( bot_state_t *bs ); 40 | // 41 | int BotChat_ExitGame( bot_state_t *bs ); 42 | // 43 | int BotChat_StartLevel( bot_state_t *bs ); 44 | // 45 | int BotChat_EndLevel( bot_state_t *bs ); 46 | // 47 | int BotChat_HitTalking( bot_state_t *bs ); 48 | // 49 | int BotChat_HitNoDeath( bot_state_t *bs ); 50 | // 51 | int BotChat_HitNoKill( bot_state_t *bs ); 52 | // 53 | int BotChat_Death( bot_state_t *bs ); 54 | // 55 | int BotChat_Kill( bot_state_t *bs ); 56 | // 57 | int BotChat_EnemySuicide( bot_state_t *bs ); 58 | // 59 | int BotChat_Random( bot_state_t *bs ); 60 | // time the selected chat takes to type in 61 | float BotChatTime( bot_state_t *bs ); 62 | // returns true if the bot can chat at the current position 63 | int BotValidChatPosition( bot_state_t *bs ); 64 | // test the initial bot chats 65 | void BotChatTest( bot_state_t *bs ); 66 | 67 | -------------------------------------------------------------------------------- /src/botai/ai_cmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: ai_cmd.h 32 | * 33 | * desc: Quake3 bot AI 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | int BotMatchMessage( bot_state_t *bs, char *message ); 39 | void BotPrintTeamGoal( bot_state_t *bs ); 40 | 41 | -------------------------------------------------------------------------------- /src/botai/ai_dmnet.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: ai_dmnet.h 32 | * 33 | * desc: Quake3 bot AI 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #define MAX_NODESWITCHES 50 39 | 40 | void AIEnter_Intermission( bot_state_t *bs ); 41 | void AIEnter_Observer( bot_state_t *bs ); 42 | void AIEnter_Respawn( bot_state_t *bs ); 43 | void AIEnter_Stand( bot_state_t *bs ); 44 | void AIEnter_Seek_ActivateEntity( bot_state_t *bs ); 45 | void AIEnter_Seek_NBG( bot_state_t *bs ); 46 | void AIEnter_Seek_LTG( bot_state_t *bs ); 47 | void AIEnter_Seek_Camp( bot_state_t *bs ); 48 | void AIEnter_Battle_Fight( bot_state_t *bs ); 49 | void AIEnter_Battle_Chase( bot_state_t *bs ); 50 | void AIEnter_Battle_Retreat( bot_state_t *bs ); 51 | void AIEnter_Battle_NBG( bot_state_t *bs ); 52 | int AINode_Intermission( bot_state_t *bs ); 53 | int AINode_Observer( bot_state_t *bs ); 54 | int AINode_Respawn( bot_state_t *bs ); 55 | int AINode_Stand( bot_state_t *bs ); 56 | int AINode_Seek_ActivateEntity( bot_state_t *bs ); 57 | int AINode_Seek_NBG( bot_state_t *bs ); 58 | int AINode_Seek_LTG( bot_state_t *bs ); 59 | int AINode_Battle_Fight( bot_state_t *bs ); 60 | int AINode_Battle_Chase( bot_state_t *bs ); 61 | int AINode_Battle_Retreat( bot_state_t *bs ); 62 | int AINode_Battle_NBG( bot_state_t *bs ); 63 | 64 | void BotResetNodeSwitches( void ); 65 | void BotDumpNodeSwitches( bot_state_t *bs ); 66 | 67 | -------------------------------------------------------------------------------- /src/botai/ai_team.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: ai_team.h 32 | * 33 | * desc: Quake3 bot AI 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | void BotTeamAI( bot_state_t *bs ); 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/botai/syn.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: syn.h 32 | // Function: synonyms 33 | // Programmer: Mr Elusive (MrElusive@idsoftware.com) 34 | // Last update: 1999-09-08 35 | // Tab Size: 4 (real tabs) 36 | // Notes: - 37 | //=========================================================================== 38 | 39 | #define CONTEXT_ALL 0xFFFFFFFF 40 | #define CONTEXT_NORMAL 1 41 | #define CONTEXT_NEARBYITEM 2 42 | #define CONTEXT_CTFREDTEAM 4 43 | #define CONTEXT_CTFBLUETEAM 8 44 | #define CONTEXT_REPLY 16 45 | 46 | #define CONTEXT_NAMES 1024 47 | -------------------------------------------------------------------------------- /src/botlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | # Get all C source files 4 | file(GLOB C_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") 5 | 6 | # Sort the C sources into a neat list 7 | list(SORT C_SOURCES) 8 | 9 | add_definitions(-DBOTLIB) 10 | 11 | # Set the compiler to use 12 | # Set_source_files_properties(${C_SOURCES} PROPERTIES LANGUAGE C COMPILE_FLAGS "-g") 13 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed") 14 | 15 | # Add to our library. 16 | add_library(botlib.a STATIC ${C_SOURCES}) 17 | set_target_properties(botlib.a PROPERTIES LINKER_LANGUAGE C PREFIX "" SUFFIX "") 18 | -------------------------------------------------------------------------------- /src/botlib/be_aas_cluster.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_cluster.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifdef AASINTERN 39 | //initialize the AAS clustering 40 | void AAS_InitClustering( void ); 41 | void AAS_SetViewPortalsAsClusterPortals( void ); 42 | #endif //AASINTERN 43 | 44 | -------------------------------------------------------------------------------- /src/botlib/be_aas_debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_debug.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | //clear the shown debug lines 39 | void AAS_ClearShownDebugLines( void ); 40 | // 41 | void AAS_ClearShownPolygons( void ); 42 | //show a debug line 43 | void AAS_DebugLine( vec3_t start, vec3_t end, int color ); 44 | //show a permenent line 45 | void AAS_PermanentLine( vec3_t start, vec3_t end, int color ); 46 | //show a permanent cross 47 | void AAS_DrawPermanentCross( vec3_t origin, float size, int color ); 48 | //draw a cross in the plane 49 | void AAS_DrawPlaneCross( vec3_t point, vec3_t normal, float dist, int type, int color ); 50 | //show a bounding box 51 | void AAS_ShowBoundingBox( vec3_t origin, vec3_t mins, vec3_t maxs ); 52 | //show a face 53 | void AAS_ShowFace( int facenum ); 54 | //show an area 55 | void AAS_ShowArea( int areanum, int groundfacesonly ); 56 | // 57 | void AAS_ShowAreaPolygons( int areanum, int color, int groundfacesonly ); 58 | //draw a cros 59 | void AAS_DrawCross( vec3_t origin, float size, int color ); 60 | //print the travel type 61 | void AAS_PrintTravelType( int traveltype ); 62 | //draw an arrow 63 | void AAS_DrawArrow( vec3_t start, vec3_t end, int linecolor, int arrowcolor ); 64 | //visualize the given reachability 65 | void AAS_ShowReachability( struct aas_reachability_s *reach ); 66 | //show the reachable areas from the given area 67 | void AAS_ShowReachableAreas( int areanum ); 68 | 69 | -------------------------------------------------------------------------------- /src/botlib/be_aas_entity.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_entity.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifdef AASINTERN 39 | //invalidates all entity infos 40 | void AAS_InvalidateEntities( void ); 41 | //resets the entity AAS and BSP links (sets areas and leaves pointers to NULL) 42 | void AAS_ResetEntityLinks( void ); 43 | //updates an entity 44 | int AAS_UpdateEntity( int ent, bot_entitystate_t *state ); 45 | //gives the entity data used for collision detection 46 | void AAS_EntityBSPData( int entnum, bsp_entdata_t *entdata ); 47 | #endif //AASINTERN 48 | 49 | //returns the size of the entity bounding box in mins and maxs 50 | void AAS_EntitySize( int entnum, vec3_t mins, vec3_t maxs ); 51 | //returns the BSP model number of the entity 52 | int AAS_EntityModelNum( int entnum ); 53 | //returns the origin of an entity with the given model number 54 | int AAS_OriginOfEntityWithModelNum( int modelnum, vec3_t origin ); 55 | //returns the best reachable area the entity is situated in 56 | int AAS_BestReachableEntityArea( int entnum ); 57 | //returns the info of the given entity 58 | void AAS_EntityInfo( int entnum, aas_entityinfo_t *info ); 59 | //returns the next entity 60 | int AAS_NextEntity( int entnum ); 61 | //returns the origin of the entity 62 | void AAS_EntityOrigin( int entnum, vec3_t origin ); 63 | //returns the entity type 64 | int AAS_EntityType( int entnum ); 65 | //returns the model index of the entity 66 | int AAS_EntityModelindex( int entnum ); 67 | // Ridah 68 | int AAS_IsEntityInArea( int entnumIgnore, int entnumIgnore2, int areanum ); 69 | -------------------------------------------------------------------------------- /src/botlib/be_aas_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_file.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifdef AASINTERN 39 | //loads the AAS file with the given name 40 | int AAS_LoadAASFile( char *filename ); 41 | //writes an AAS file with the given name 42 | qboolean AAS_WriteAASFile( char *filename ); 43 | //dumps the loaded AAS data 44 | void AAS_DumpAASData( void ); 45 | //print AAS file information 46 | void AAS_FileInfo( void ); 47 | #endif //AASINTERN 48 | 49 | -------------------------------------------------------------------------------- /src/botlib/be_aas_funcs.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_funcs.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifndef BSPCINCLUDE 39 | 40 | #include "be_aas_main.h" 41 | #include "be_aas_entity.h" 42 | #include "be_aas_sample.h" 43 | #include "be_aas_cluster.h" 44 | #include "be_aas_reach.h" 45 | #include "be_aas_route.h" 46 | #include "be_aas_routealt.h" 47 | #include "be_aas_debug.h" 48 | #include "be_aas_file.h" 49 | #include "be_aas_optimize.h" 50 | #include "be_aas_bsp.h" 51 | #include "be_aas_move.h" 52 | 53 | // Ridah, route-tables 54 | #include "be_aas_routetable.h" 55 | 56 | #endif //BSPCINCLUDE 57 | -------------------------------------------------------------------------------- /src/botlib/be_aas_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_main.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifdef AASINTERN 39 | 40 | extern aas_t( *aasworld ); 41 | 42 | //AAS error message 43 | void QDECL AAS_Error( char *fmt, ... ); 44 | //set AAS initialized 45 | void AAS_SetInitialized( void ); 46 | //setup AAS with the given number of entities and clients 47 | int AAS_Setup( void ); 48 | //shutdown AAS 49 | void AAS_Shutdown( void ); 50 | //start a new map 51 | int AAS_LoadMap( const char *mapname ); 52 | //start a new time frame 53 | int AAS_StartFrame( float time ); 54 | #endif //AASINTERN 55 | 56 | //returns true if AAS is initialized 57 | int AAS_Initialized( void ); 58 | //returns true if the AAS file is loaded 59 | int AAS_Loaded( void ); 60 | //returns the model name from the given index 61 | char *AAS_ModelFromIndex( int index ); 62 | //returns the index from the given model name 63 | int AAS_IndexFromModel( char *modelname ); 64 | //returns the current time 65 | float AAS_Time( void ); 66 | 67 | // Ridah 68 | void AAS_SetCurrentWorld( int index ); 69 | // done. 70 | -------------------------------------------------------------------------------- /src/botlib/be_aas_move.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_move.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifdef AASINTERN 39 | extern aas_settings_t aassettings; 40 | #endif //AASINTERN 41 | 42 | //movement prediction 43 | int AAS_PredictClientMovement( struct aas_clientmove_s *move, 44 | int entnum, vec3_t origin, 45 | int presencetype, int onground, 46 | vec3_t velocity, vec3_t cmdmove, 47 | int cmdframes, 48 | int maxframes, float frametime, 49 | int stopevent, int stopareanum, int visualize ); 50 | //returns true if on the ground at the given origin 51 | int AAS_OnGround( vec3_t origin, int presencetype, int passent ); 52 | //returns true if swimming at the given origin 53 | int AAS_Swimming( vec3_t origin ); 54 | //returns the jump reachability run start point 55 | void AAS_JumpReachRunStart( struct aas_reachability_s *reach, vec3_t runstart ); 56 | //returns true if against a ladder at the given origin 57 | int AAS_AgainstLadder( vec3_t origin, int ms_areanum ); 58 | //rocket jump Z velocity when rocket-jumping at origin 59 | float AAS_RocketJumpZVelocity( vec3_t origin ); 60 | //bfg jump Z velocity when bfg-jumping at origin 61 | float AAS_BFGJumpZVelocity( vec3_t origin ); 62 | //calculates the horizontal velocity needed for a jump and returns true this velocity could be calculated 63 | int AAS_HorizontalVelocityForJump( float zvel, vec3_t start, vec3_t end, float *velocity ); 64 | // 65 | void AAS_SetMovedir( vec3_t angles, vec3_t movedir ); 66 | // 67 | int AAS_DropToFloor( vec3_t origin, vec3_t mins, vec3_t maxs ); 68 | // 69 | void AAS_InitSettings( void ); 70 | -------------------------------------------------------------------------------- /src/botlib/be_aas_optimize.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_optimize.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | void AAS_Optimize( void ); 39 | 40 | -------------------------------------------------------------------------------- /src/botlib/be_aas_routealt.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_aas_routealt.h 32 | * 33 | * desc: AAS 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #ifdef AASINTERN 39 | void AAS_InitAlternativeRouting( void ); 40 | void AAS_ShutdownAlternativeRouting( void ); 41 | #endif //AASINTERN 42 | 43 | 44 | int AAS_AlternativeRouteGoals( vec3_t start, vec3_t goal, int travelflags, 45 | aas_altroutegoal_t *altroutegoals, int maxaltroutegoals, 46 | int color ); 47 | -------------------------------------------------------------------------------- /src/botlib/l_crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: l_crc.h 32 | // Function: for CRC checks 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-31 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | typedef unsigned short crc_t; 39 | 40 | void CRC_Init( unsigned short *crcvalue ); 41 | void CRC_ProcessByte( unsigned short *crcvalue, byte data ); 42 | unsigned short CRC_Value( unsigned short crcvalue ); 43 | unsigned short CRC_ProcessString( unsigned char *data, int length ); 44 | void CRC_ContinueProcessString( unsigned short *crc, char *data, int length ); 45 | -------------------------------------------------------------------------------- /src/botlib/l_libvar.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: l_libvar.h 32 | * 33 | * desc: botlib vars 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | //library variable 39 | typedef struct libvar_s 40 | { 41 | char *name; 42 | char *string; 43 | int flags; 44 | qboolean modified; // set each time the cvar is changed 45 | float value; 46 | struct libvar_s *next; 47 | } libvar_t; 48 | 49 | //removes all library variables 50 | void LibVarDeAllocAll( void ); 51 | //gets the library variable with the given name 52 | libvar_t *LibVarGet( char *var_name ); 53 | //gets the string of the library variable with the given name 54 | char *LibVarGetString( char *var_name ); 55 | //gets the value of the library variable with the given name 56 | float LibVarGetValue( char *var_name ); 57 | //creates the library variable if not existing already and returns it 58 | libvar_t *LibVar( char *var_name, char *value ); 59 | //creates the library variable if not existing already and returns the value 60 | float LibVarValue( char *var_name, char *value ); 61 | //creates the library variable if not existing already and returns the value string 62 | char *LibVarString( char *var_name, char *value ); 63 | //sets the library variable 64 | void LibVarSet( char *var_name, char *value ); 65 | //returns true if the library variable has been modified 66 | qboolean LibVarChanged( char *var_name ); 67 | //sets the library variable to unmodified 68 | void LibVarSetNotModified( char *var_name ); 69 | 70 | -------------------------------------------------------------------------------- /src/botlib/l_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: l_log.h 32 | * 33 | * desc: log file 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | //open a log file 39 | void Log_Open( char *filename ); 40 | // 41 | void Log_AlwaysOpen( char *filename ); 42 | //close the current log file 43 | void Log_Close( void ); 44 | //close log file if present 45 | void Log_Shutdown( void ); 46 | //write to the current opened log file 47 | void QDECL Log_Write( char *fmt, ... ); 48 | //write to the current opened log file with a time stamp 49 | void QDECL Log_WriteTimeStamped( char *fmt, ... ); 50 | //returns a pointer to the log file 51 | FILE *Log_FilePointer( void ); 52 | //flush log file 53 | void Log_Flush( void ); 54 | 55 | -------------------------------------------------------------------------------- /src/botlib/l_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: l_util.h 32 | * 33 | * desc: utils 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | #define Vector2Angles( v,a ) vectoangles( v,a ) 39 | #define MAX_PATH MAX_QPATH 40 | #define Maximum( x,y ) ( x > y ? x : y ) 41 | #define Minimum( x,y ) ( x < y ? x : y ) 42 | -------------------------------------------------------------------------------- /src/bspc/aas_areamerging.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_areamerging.h 32 | // Function: Merging of Areas 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | 39 | void AAS_MergeAreas( void ); 40 | 41 | -------------------------------------------------------------------------------- /src/bspc/aas_edgemelting.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_edgemelting.h 32 | // Function: Melting of Edges 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | 39 | void AAS_MeltAreaFaceWindings( void ); 40 | 41 | -------------------------------------------------------------------------------- /src/bspc/aas_facemerging.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_facemerging.h 32 | // Function: Merging of Faces 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | void AAS_MergeAreaFaces( void ); 39 | void AAS_MergeAreaPlaneFaces( void ); 40 | -------------------------------------------------------------------------------- /src/bspc/aas_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_write.h 32 | // Function: 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | qboolean AAS_WriteAASFile( char *filename ); 39 | qboolean AAS_LoadAASFile( char *filename, int fpoffset, int fplength ); 40 | 41 | -------------------------------------------------------------------------------- /src/bspc/aas_gsubdiv.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_gsubdiv.h 32 | // Function: Gravitational subdivision 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | //works with the global tmpaasworld 39 | void AAS_GravitationalSubdivision( void ); 40 | void AAS_LadderSubdivision( void ); 41 | -------------------------------------------------------------------------------- /src/bspc/aas_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_map.h 32 | // Function: 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | void AAS_CreateMapBrushes( mapbrush_t *brush, entity_t *mapent, int addbevels ); 39 | -------------------------------------------------------------------------------- /src/bspc/aas_prunenodes.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: aas_prunenodes.h 32 | // Function: Prune Nodes 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-04 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | void AAS_PruneNodes( void ); 39 | 40 | -------------------------------------------------------------------------------- /src/bspc/be_aas_bspc.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: b_aas_bspc.h 32 | // Function: Area Awareness System 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1999-02-28 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | void AAS_CalcReachAndClusters( struct quakefile_s *qf ); 39 | 40 | // Ridah 41 | void AAS_SetWorldPointer( aas_t *newaasworld ); 42 | // done. 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/bspc/l_bsp_ent.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | #ifndef MAX_MAP_ENTITIES 31 | #define MAX_MAP_ENTITIES 2048 32 | #endif 33 | 34 | typedef struct epair_s 35 | { 36 | struct epair_s *next; 37 | char *key; 38 | char *value; 39 | } epair_t; 40 | 41 | typedef struct 42 | { 43 | vec3_t origin; 44 | int firstbrush; 45 | int numbrushes; 46 | epair_t *epairs; 47 | // only valid for func_areaportals 48 | int areaportalnum; 49 | int portalareas[2]; 50 | int modelnum; //for bsp 2 map conversion 51 | qboolean wasdetail; //for SIN 52 | } entity_t; 53 | 54 | extern int num_entities; 55 | extern entity_t entities[MAX_MAP_ENTITIES]; 56 | 57 | void StripTrailing( char *e ); 58 | void SetKeyValue( entity_t *ent, char *key, char *value ); 59 | char *ValueForKey( entity_t *ent, char *key ); // will return "" if not present 60 | vec_t FloatForKey( entity_t *ent, char *key ); 61 | void GetVectorForKey( entity_t *ent, char *key, vec3_t vec ); 62 | qboolean ParseEntity( script_t *script ); 63 | epair_t *ParseEpair( script_t *script ); 64 | void PrintEntity( entity_t *ent ); 65 | 66 | -------------------------------------------------------------------------------- /src/bspc/l_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: l_log.h 32 | // Function: log file stuff 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-31 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | //open a log file 39 | void Log_Open( char *filename ); 40 | //close the current log file 41 | void Log_Close( void ); 42 | //close log file if present 43 | void Log_Shutdown( void ); 44 | //print on stdout and write to the current opened log file 45 | void Log_Print( char *fmt, ... ); 46 | //write to the current opened log file 47 | void Log_Write( char *fmt, ... ); 48 | //write to the current opened log file with a time stamp 49 | void Log_WriteTimeStamped( char *fmt, ... ); 50 | //returns the log file structure 51 | FILE *Log_FileStruct( void ); 52 | //flush log file 53 | void Log_Flush( void ); 54 | 55 | #ifdef WINBSPC 56 | void WinBSPCPrint( char *str ); 57 | #endif //WINBSPC 58 | -------------------------------------------------------------------------------- /src/bspc/l_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | 31 | //============================================================================= 32 | 33 | // memory.h 34 | //#define MEMDEBUG 35 | #undef MEMDEBUG 36 | 37 | #ifndef MEMDEBUG 38 | 39 | void *GetClearedMemory( int size ); 40 | void *GetMemory( unsigned long size ); 41 | 42 | #else 43 | 44 | #define GetMemory( size ) GetMemoryDebug( size, # size, __FILE__, __LINE__ ); 45 | #define GetClearedMemory( size ) GetClearedMemoryDebug( size, # size, __FILE__, __LINE__ ); 46 | //allocate a memory block of the given size 47 | void *GetMemoryDebug( unsigned long size, char *label, char *file, int line ); 48 | //allocate a memory block of the given size and clear it 49 | void *GetClearedMemoryDebug( unsigned long size, char *label, char *file, int line ); 50 | // 51 | void PrintMemoryLabels( void ); 52 | #endif //MEMDEBUG 53 | 54 | void FreeMemory( void *ptr ); 55 | int MemorySize( void *ptr ); 56 | void PrintMemorySize( unsigned long size ); 57 | int TotalAllocatedMemory( void ); 58 | 59 | -------------------------------------------------------------------------------- /src/bspc/l_threads.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | extern int numthreads; 31 | 32 | void ThreadSetDefault( void ); 33 | int GetThreadWork( void ); 34 | void RunThreadsOnIndividual( int workcnt, qboolean showpacifier, void ( *func )( int ) ); 35 | void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ); 36 | 37 | //mutex 38 | void ThreadSetupLock( void ); 39 | void ThreadShutdownLock( void ); 40 | void ThreadLock( void ); 41 | void ThreadUnlock( void ); 42 | //semaphore 43 | void ThreadSetupSemaphore( void ); 44 | void ThreadShutdownSemaphore( void ); 45 | void ThreadSemaphoreWait( void ); 46 | void ThreadSemaphoreIncrease( int count ); 47 | //add/remove threads 48 | void AddThread( void ( *func )( int ) ); 49 | void RemoveThread( int threadid ); 50 | void WaitForAllThreadsFinished( void ); 51 | int GetNumThreads( void ); 52 | 53 | -------------------------------------------------------------------------------- /src/bspc/nodraw.c: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | #include "qbsp.h" 31 | 32 | vec3_t draw_mins, draw_maxs; 33 | qboolean drawflag; 34 | 35 | void Draw_ClearWindow( void ) { 36 | } 37 | 38 | //============================================================ 39 | 40 | #define GLSERV_PORT 25001 41 | 42 | 43 | void GLS_BeginScene( void ) { 44 | } 45 | 46 | void GLS_Winding( winding_t *w, int code ) { 47 | } 48 | 49 | void GLS_EndScene( void ) { 50 | } 51 | -------------------------------------------------------------------------------- /src/cgame/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DCGAMEDLL) 2 | 3 | add_library(cgame SHARED 4 | ../game/bg_animation.c 5 | ../game/bg_misc.c 6 | ../game/bg_pmove.c 7 | ../game/bg_slidemove.c 8 | ../game/q_math.c 9 | ../game/q_shared.c 10 | ../ui/ui_shared.c 11 | cg_consolecmds.c 12 | cg_draw.c 13 | cg_drawtools.c 14 | cg_effects.c 15 | cg_ents.c 16 | cg_event.c 17 | cg_flamethrower.c 18 | cg_info.c 19 | cg_localents.c 20 | cg_main.c 21 | cg_marks.c 22 | cg_newDraw.c 23 | cg_particles.c 24 | cg_players.c 25 | cg_playerstate.c 26 | cg_predict.c 27 | cg_scoreboard.c 28 | cg_servercmds.c 29 | cg_snapshot.c 30 | cg_sound.c 31 | cg_syscalls.c 32 | cg_trails.c 33 | cg_view.c 34 | cg_weapons.c 35 | ) 36 | target_link_libraries(cgame m) 37 | set_target_properties(cgame PROPERTIES PREFIX "" OUTPUT_NAME "cgame-rtcw") 38 | -------------------------------------------------------------------------------- /src/cgame/cgame.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | vmMain 3 | dllEntry 4 | -------------------------------------------------------------------------------- /src/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | # initialize our variables 4 | set(RENDERER_SOURCES) 5 | set(QCOMMON_SOURCES) 6 | set(BOTLIB_SOURCES) 7 | set(UNIX_SOURCES) 8 | set(JPEG_SOURCES) 9 | set(SERVER_SOURCES) 10 | set(CLIENT_SOURCES) 11 | 12 | ## Make lists of all the sources we need 13 | file(GLOB RENDERER_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../renderer/*.c") 14 | file(GLOB QCOMMON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../qcommon/*.c") 15 | file(GLOB SERVER_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../server/*.c") 16 | #file(GLOB BOTLIB_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../botlib/*.c") 17 | file(GLOB JPEG_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../jpeg-6/*.c") 18 | list(SORT RENDERER_SOURCES) 19 | list(SORT QCOMMON_SOURCES) 20 | list(SORT SERVER_SOURCES) 21 | #list(SORT BOTLIB_SOURCES) 22 | list(SORT JPEG_SOURCES) 23 | 24 | # Remove this for now. 25 | list(REMOVE_ITEM QCOMMON_SOURCES "../qcommon/vm_x86.c") 26 | 27 | set(UNIX_SOURCES 28 | ${CMAKE_SOURCE_DIR}/src/unix/unix_main.c 29 | ${CMAKE_SOURCE_DIR}/src/unix/unix_net.c 30 | ${CMAKE_SOURCE_DIR}/src/unix/unix_shared.c 31 | ${CMAKE_SOURCE_DIR}/src/unix/linux_common.c 32 | ${CMAKE_SOURCE_DIR}/src/unix/sdl2_gamma.c 33 | ${CMAKE_SOURCE_DIR}/src/unix/sdl2_glimp.c 34 | ${CMAKE_SOURCE_DIR}/src/unix/sdl2_input.c 35 | ${CMAKE_SOURCE_DIR}/src/unix/sdl2_snd.c 36 | ) 37 | 38 | # Get all the client .c files for compile 39 | file(GLOB CLIENT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") 40 | list(SORT CLIENT_SOURCES) 41 | # message(STATUS "CLIENT_SOURCES: ${CLIENT_SOURCES}") 42 | 43 | set(ADDITONAL_SOURCES 44 | ${CMAKE_SOURCE_DIR}/src/game/q_shared.c 45 | ${CMAKE_SOURCE_DIR}/src/game/q_math.c 46 | ) 47 | # message(STATUS "ADDITIONAL_SOURCES: ${ADDITIONAL_SOURCES}") 48 | # Append all of our sources to one list and set it ready to compile. 49 | list(APPEND CLIENT_SOURCES ${RENDERER_SOURCES} ${QCOMMON_SOURCES} ${UNIX_SOURCES}) 50 | list(APPEND CLIENT_SOURCES ${BOTLIB_SOURCES} ${JPEG_SOURCES} ${ADDITONAL_SOURCES} ${SERVER_SOURCES}) 51 | 52 | # TODO: Fix all warnings 53 | set_source_files_properties(${CLIENT_SOURCES} PROPERTIES LANGUAGE C COMPILE_FLAGS "-g -Wno-unused") 54 | 55 | # Compile our program 56 | add_executable(${PROJECT_NAME} ${CLIENT_SOURCES}) 57 | #add_definitions(-DBOTLIB) 58 | 59 | # Our executable 60 | set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE C PREFIX "../../" SUFFIX "") 61 | target_link_libraries(${PROJECT_NAME} SDL2 GL dl m botlib.a splines.a ) 62 | -------------------------------------------------------------------------------- /src/client/cl_keys.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/client/cl_keys.c -------------------------------------------------------------------------------- /src/client/keys.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #include "../ui/keycodes.h" 30 | 31 | typedef struct { 32 | qboolean down; 33 | int repeats; // if > 1, it is autorepeating 34 | char *binding; 35 | } qkey_t; 36 | 37 | extern qboolean key_overstrikeMode; 38 | extern qkey_t keys[MAX_KEYS]; 39 | 40 | // NOTE TTimo the declaration of field_t and Field_Clear is now in qcommon/qcommon.h 41 | 42 | void Field_KeyDownEvent( field_t *edit, int key ); 43 | void Field_CharEvent( field_t *edit, int ch ); 44 | void Field_Draw( field_t *edit, int x, int y, int width, qboolean showCursor ); 45 | void Field_BigDraw( field_t *edit, int x, int y, int width, qboolean showCursor ); 46 | 47 | #define COMMAND_HISTORY 32 48 | extern field_t historyEditLines[COMMAND_HISTORY]; 49 | 50 | extern field_t g_consoleField; 51 | extern field_t chatField; 52 | extern qboolean anykeydown; 53 | extern qboolean chat_team; 54 | extern qboolean chat_limbo; // NERVE - SMF 55 | extern int chat_playerNum; 56 | 57 | void Key_WriteBindings( fileHandle_t f ); 58 | void Key_SetBinding( int keynum, const char *binding ); 59 | char *Key_GetBinding( int keynum ); 60 | qboolean Key_IsDown( int keynum ); 61 | qboolean Key_GetOverstrikeMode( void ); 62 | void Key_SetOverstrikeMode( qboolean state ); 63 | void Key_ClearStates( void ); 64 | int Key_GetKey( const char *binding ); 65 | -------------------------------------------------------------------------------- /src/extractfuncs/ChangeLog: -------------------------------------------------------------------------------- 1 | 2001-12-07 Timothee Besset 2 | 3 | Imported from the Wolf MP version, Mac/Linux friendly version 4 | Fixed argbase bug in *nix main 5 | Escape BoxOnPlaneSide on linux (taken out by preprocessing) 6 | 7 | 2001-11-02 Timothee Besset 8 | 9 | Modified extractfuncs to works on linux 10 | Would still need to integrate it correctly with the build system 11 | Changed the command line syntax of the linux ver: 12 | screwup [-o ] [ ..] 13 | 14 | if none specified, is "g_funcs" 15 | 16 | on linux at least, those header files need to be tweaked by hand 17 | because unresolved externs are not ignored by gcc (otherwise harmless on win32) 18 | -------------------------------------------------------------------------------- /src/extractfuncs/Conscript: -------------------------------------------------------------------------------- 1 | # extractfuncs building 2 | 3 | $env = new cons( 4 | CC => 'gcc', 5 | CFLAGS => '-g -DSCREWUP ' 6 | ); 7 | 8 | Program $env 'extractfuncs', 'extractfuncs.c', 'l_log.c', 'l_memory.c', 'l_precomp.c', 'l_script.c'; 9 | Install $env '#', 'extractfuncs'; 10 | -------------------------------------------------------------------------------- /src/extractfuncs/extractfuncs.bat: -------------------------------------------------------------------------------- 1 | cd ..\game 2 | ..\extractfuncs\extractfuncs *.c 3 | cd .. -------------------------------------------------------------------------------- /src/extractfuncs/l_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: l_log.h 32 | // Function: log file stuff 33 | // Programmer: Mr Elusive (MrElusive@demigod.demon.nl) 34 | // Last update: 1997-12-31 35 | // Tab Size: 3 36 | //=========================================================================== 37 | 38 | //open a log file 39 | void Log_Open( char *filename ); 40 | //close the current log file 41 | void Log_Close( void ); 42 | //close log file if present 43 | void Log_Shutdown( void ); 44 | //print on stdout and write to the current opened log file 45 | void Log_Print( char *fmt, ... ); 46 | //write to the current opened log file 47 | void Log_Write( char *fmt, ... ); 48 | //write to the current opened log file with a time stamp 49 | void Log_WriteTimeStamped( char *fmt, ... ); 50 | //returns the log file structure 51 | FILE *Log_FileStruct( void ); 52 | //flush log file 53 | void Log_Flush( void ); 54 | 55 | int Log_Written( void ); 56 | 57 | #ifdef WINBSPC 58 | void WinBSPCPrint( char *str ); 59 | #endif //WINBSPC 60 | -------------------------------------------------------------------------------- /src/ft2/ahangles.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ahangles.h */ 4 | /* */ 5 | /* A routine used to compute vector angles with limited accuracy */ 6 | /* and very high speed (specification). */ 7 | /* */ 8 | /* Copyright 2000 Catharon Productions Inc. */ 9 | /* Author: David Turner */ 10 | /* */ 11 | /* This file is part of the Catharon Typography Project and shall only */ 12 | /* be used, modified, and distributed under the terms of the Catharon */ 13 | /* Open Source License that should come with this file under the name */ 14 | /* `CatharonLicense.txt'. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /* Note that this license is compatible with the FreeType license. */ 19 | /* */ 20 | /***************************************************************************/ 21 | 22 | 23 | #ifndef AHANGLES_H 24 | #define AHANGLES_H 25 | 26 | 27 | 28 | #include "ahtypes.h" 29 | 30 | #include "ftobjs.h" 31 | 32 | 33 | /* PI expressed in ah_angles -- we don't really need an important */ 34 | /* precision, so 256 should be enough */ 35 | #define AH_PI 256 36 | #define AH_2PI ( AH_PI * 2 ) 37 | #define AH_HALF_PI ( AH_PI / 2 ) 38 | #define AH_2PIMASK ( AH_2PI - 1 ) 39 | 40 | /* the number of bits used to express an arc tangent; */ 41 | /* see the structure of the lookup table */ 42 | #define AH_ATAN_BITS 8 43 | 44 | extern 45 | const AH_Angle ah_arctan[1L << AH_ATAN_BITS]; 46 | 47 | 48 | LOCAL_DEF 49 | AH_Angle ah_angle( FT_Vector* v ); 50 | 51 | 52 | #endif /* AHANGLES_H */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /src/ft2/ahglobal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ahglobal.h */ 4 | /* */ 5 | /* Routines used to compute global metrics automatically */ 6 | /* (specification). */ 7 | /* */ 8 | /* Copyright 2000 Catharon Productions Inc. */ 9 | /* Author: David Turner */ 10 | /* */ 11 | /* This file is part of the Catharon Typography Project and shall only */ 12 | /* be used, modified, and distributed under the terms of the Catharon */ 13 | /* Open Source License that should come with this file under the name */ 14 | /* `CatharonLicense.txt'. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /* Note that this license is compatible with the FreeType license. */ 19 | /* */ 20 | /***************************************************************************/ 21 | 22 | 23 | #ifndef AHGLOBAL_H 24 | #define AHGLOBAL_H 25 | 26 | #include "ahtypes.h" 27 | 28 | #include "ftobjs.h" 29 | 30 | #define AH_IS_TOP_BLUE( b ) ( ( b ) == ah_blue_capital_top || \ 31 | ( b ) == ah_blue_small_top ) 32 | 33 | 34 | /* compute global metrics automatically */ 35 | LOCAL_DEF 36 | FT_Error ah_hinter_compute_globals( AH_Hinter* hinter ); 37 | 38 | 39 | #endif /* AHGLOBAL_H */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /src/ft2/ahglyph.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ahglyph.h */ 4 | /* */ 5 | /* Routines used to load and analyze a given glyph before hinting */ 6 | /* (specification). */ 7 | /* */ 8 | /* Copyright 2000 Catharon Productions Inc. */ 9 | /* Author: David Turner */ 10 | /* */ 11 | /* This file is part of the Catharon Typography Project and shall only */ 12 | /* be used, modified, and distributed under the terms of the Catharon */ 13 | /* Open Source License that should come with this file under the name */ 14 | /* `CatharonLicense.txt'. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /* Note that this license is compatible with the FreeType license. */ 19 | /* */ 20 | /***************************************************************************/ 21 | 22 | 23 | #ifndef AHGLYPH_H 24 | #define AHGLYPH_H 25 | 26 | 27 | #include "ahtypes.h" 28 | 29 | 30 | typedef enum AH_UV_ 31 | { 32 | ah_uv_fxy, 33 | ah_uv_fyx, 34 | ah_uv_oxy, 35 | ah_uv_oyx, 36 | ah_uv_ox, 37 | ah_uv_oy, 38 | ah_uv_yx, 39 | ah_uv_xy /* should always be last! */ 40 | 41 | } AH_UV; 42 | 43 | 44 | LOCAL_DEF 45 | void ah_setup_uv( AH_Outline* outline, 46 | AH_UV source ); 47 | 48 | 49 | /* AH_Outline functions - they should be typically called in this order */ 50 | 51 | LOCAL_DEF 52 | FT_Error ah_outline_new( FT_Memory memory, 53 | AH_Outline** aoutline ); 54 | 55 | LOCAL_DEF 56 | FT_Error ah_outline_load( AH_Outline* outline, 57 | FT_Face face ); 58 | 59 | LOCAL_DEF 60 | void ah_outline_compute_segments( AH_Outline* outline ); 61 | 62 | LOCAL_DEF 63 | void ah_outline_link_segments( AH_Outline* outline ); 64 | 65 | LOCAL_DEF 66 | void ah_outline_detect_features( AH_Outline* outline ); 67 | 68 | LOCAL_DEF 69 | void ah_outline_compute_blue_edges( AH_Outline* outline, 70 | AH_Face_Globals* globals ); 71 | 72 | LOCAL_DEF 73 | void ah_outline_scale_blue_edges( AH_Outline* outline, 74 | AH_Face_Globals* globals ); 75 | 76 | LOCAL_DEF 77 | void ah_outline_save( AH_Outline* outline, AH_Loader* loader ); 78 | 79 | LOCAL_DEF 80 | void ah_outline_done( AH_Outline* outline ); 81 | 82 | 83 | #endif /* AHGLYPH_H */ 84 | 85 | 86 | /* END */ 87 | -------------------------------------------------------------------------------- /src/ft2/ahhint.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ahhint.h */ 4 | /* */ 5 | /* Glyph hinter (declaration). */ 6 | /* */ 7 | /* Copyright 2000 Catharon Productions Inc. */ 8 | /* Author: David Turner */ 9 | /* */ 10 | /* This file is part of the Catharon Typography Project and shall only */ 11 | /* be used, modified, and distributed under the terms of the Catharon */ 12 | /* Open Source License that should come with this file under the name */ 13 | /* `CatharonLicense.txt'. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /* Note that this license is compatible with the FreeType license. */ 18 | /* */ 19 | /***************************************************************************/ 20 | 21 | 22 | #ifndef AHHINT_H 23 | #define AHHINT_H 24 | 25 | 26 | 27 | #include "ahglobal.h" 28 | 29 | 30 | #define AH_HINT_DEFAULT 0 31 | #define AH_HINT_NO_ALIGNMENT 1 32 | #define AH_HINT_NO_HORZ_EDGES 0x20000L 33 | #define AH_HINT_NO_VERT_EDGES 0x40000L 34 | 35 | 36 | /* create a new empty hinter object */ 37 | FT_Error ah_hinter_new( FT_Library library, 38 | AH_Hinter** ahinter ); 39 | 40 | /* Load a hinted glyph in the hinter */ 41 | FT_Error ah_hinter_load_glyph( AH_Hinter* hinter, 42 | FT_GlyphSlot slot, 43 | FT_Size size, 44 | FT_UInt glyph_index, 45 | FT_Int load_flags ); 46 | 47 | /* finalize a hinter object */ 48 | void ah_hinter_done( AH_Hinter* hinter ); 49 | 50 | LOCAL_DEF 51 | void ah_hinter_done_face_globals( AH_Face_Globals* globals ); 52 | 53 | void ah_hinter_get_global_hints( AH_Hinter* hinter, 54 | FT_Face face, 55 | void** global_hints, 56 | long* global_len ); 57 | 58 | void ah_hinter_done_global_hints( AH_Hinter* hinter, 59 | void* global_hints ); 60 | 61 | 62 | #endif /* AHHINT_H */ 63 | 64 | 65 | /* END */ 66 | -------------------------------------------------------------------------------- /src/ft2/ahmodule.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ahmodule.h */ 4 | /* */ 5 | /* Auto-hinting module (declaration). */ 6 | /* */ 7 | /* Copyright 2000 Catharon Productions Inc. */ 8 | /* Author: David Turner */ 9 | /* */ 10 | /* This file is part of the Catharon Typography Project and shall only */ 11 | /* be used, modified, and distributed under the terms of the Catharon */ 12 | /* Open Source License that should come with this file under the name */ 13 | /* `CatharonLicense.txt'. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /* Note that this license is compatible with the FreeType license. */ 18 | /* */ 19 | /***************************************************************************/ 20 | 21 | 22 | #ifndef AHMODULE_H 23 | #define AHMODULE_H 24 | 25 | #include "ftmodule.h" 26 | 27 | FT_EXPORT_VAR( const FT_Module_Class ) autohint_module_class; 28 | 29 | #endif /* AHMODULE_H */ 30 | 31 | 32 | /* END */ 33 | -------------------------------------------------------------------------------- /src/ft2/ftgrays.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftgrays.h */ 4 | /* */ 5 | /* FreeType smooth renderer declaration */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | #ifndef FTGRAYS_H 19 | #define FTGRAYS_H 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | #include "ftimage.h" 26 | 27 | /*************************************************************************/ 28 | /* */ 29 | /* To make ftgrays.h independent from configuration files we check */ 30 | /* whether FT_EXPORT_DEF has been defined already. */ 31 | /* */ 32 | /* On some systems and compilers (Win32 mostly), an extra keyword is */ 33 | /* necessary to compile the library as a DLL. */ 34 | /* */ 35 | #ifndef FT_EXPORT_VAR 36 | #define FT_EXPORT_VAR( x ) extern x 37 | #endif 38 | 39 | FT_EXPORT_VAR( FT_Raster_Funcs ) ft_grays_raster; 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif /* FTGRAYS_H */ 46 | 47 | 48 | /* END */ 49 | -------------------------------------------------------------------------------- /src/ft2/ftnames.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftnames.c */ 4 | /* */ 5 | /* Simple interface to access SFNT name tables (which are used */ 6 | /* to hold font names, copyright info, notices, etc.). */ 7 | /* */ 8 | /* This is _not_ used to retrieve glyph names! */ 9 | /* */ 10 | /* Copyright 1996-2000 by */ 11 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 12 | /* */ 13 | /* This file is part of the FreeType project, and may only be used, */ 14 | /* modified, and distributed under the terms of the FreeType project */ 15 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 16 | /* this file you indicate that you have read the license and */ 17 | /* understand and accept it fully. */ 18 | /* */ 19 | /***************************************************************************/ 20 | 21 | 22 | #include "ftnames.h" 23 | #include "tttypes.h" 24 | 25 | 26 | #ifdef FT_CONFIG_OPTION_SFNT_NAMES 27 | 28 | 29 | FT_EXPORT_FUNC( FT_UInt ) FT_Get_Sfnt_Name_Count( FT_Face face ) 30 | { 31 | return face && ( FT_IS_SFNT( face ) ? ( (TT_Face)face )->num_names : 0 ); 32 | } 33 | 34 | 35 | FT_EXPORT_FUNC( FT_Error ) FT_Get_Sfnt_Name( FT_Face face, 36 | FT_UInt index, 37 | FT_SfntName * aname ) 38 | { 39 | FT_Error error = FT_Err_Invalid_Argument; 40 | 41 | 42 | if ( aname && face && FT_IS_SFNT( face ) ) { 43 | TT_Face ttface = (TT_Face)face; 44 | 45 | 46 | if ( index < ttface->num_names ) { 47 | TT_NameRec* name = ttface->name_table.names + index; 48 | 49 | 50 | aname->platform_id = name->platformID; 51 | aname->encoding_id = name->encodingID; 52 | aname->language_id = name->languageID; 53 | aname->name_id = name->nameID; 54 | aname->string = (FT_Byte*)name->string; 55 | aname->string_len = name->stringLength; 56 | 57 | error = FT_Err_Ok; 58 | } 59 | } 60 | 61 | return error; 62 | } 63 | 64 | 65 | #endif /* FT_CONFIG_OPTION_SFNT_NAMES */ 66 | 67 | 68 | /* END */ 69 | -------------------------------------------------------------------------------- /src/ft2/ftnames.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftnames.h */ 4 | /* */ 5 | /* Simple interface to access SFNT name tables (which are used */ 6 | /* to hold font names, copyright info, notices, etc.). */ 7 | /* */ 8 | /* This is _not_ used to retrieve glyph names! */ 9 | /* */ 10 | /* Copyright 1996-2000 by */ 11 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 12 | /* */ 13 | /* This file is part of the FreeType project, and may only be used, */ 14 | /* modified, and distributed under the terms of the FreeType project */ 15 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 16 | /* this file you indicate that you have read the license and */ 17 | /* understand and accept it fully. */ 18 | /* */ 19 | /***************************************************************************/ 20 | 21 | 22 | #ifndef FTNAMES_H 23 | #define FTNAMES_H 24 | 25 | 26 | #include "freetype.h" 27 | 28 | 29 | typedef struct FT_SfntName_ 30 | { 31 | FT_UShort platform_id; 32 | FT_UShort encoding_id; 33 | FT_UShort language_id; 34 | FT_UShort name_id; 35 | 36 | FT_Byte* string; 37 | FT_UInt string_len; /* in bytes */ 38 | 39 | } FT_SfntName; 40 | 41 | 42 | FT_EXPORT_DEF( FT_UInt ) FT_Get_Sfnt_Name_Count( FT_Face face ); 43 | 44 | FT_EXPORT_DEF( FT_Error ) FT_Get_Sfnt_Name( FT_Face face, 45 | FT_UInt index, 46 | FT_SfntName * aname ); 47 | 48 | 49 | #endif /* FTNAMES_H */ 50 | 51 | 52 | /* END */ 53 | -------------------------------------------------------------------------------- /src/ft2/ftraster.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftraster.h */ 4 | /* */ 5 | /* The FreeType glyph rasterizer (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used */ 11 | /* modified and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef FTRASTER_H 20 | #define FTRASTER_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | #include "ftimage.h" 27 | 28 | 29 | /*************************************************************************/ 30 | /* */ 31 | /* Uncomment the following line if you are using ftraster.c as a */ 32 | /* standalone module, fully independent of FreeType. */ 33 | /* */ 34 | /* #define _STANDALONE_ */ 35 | 36 | #ifndef FT_EXPORT_VAR 37 | #define FT_EXPORT_VAR( x ) extern x 38 | #endif 39 | 40 | FT_EXPORT_VAR( FT_Raster_Funcs ) ft_standard_raster; 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | 47 | #endif /* FTRASTER_H */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /src/ft2/ftrend1.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftrend1.h */ 4 | /* */ 5 | /* The FreeType glyph rasterizer interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef FTREND1_H 20 | #define FTREND1_H 21 | 22 | #include "ftrender.h" 23 | 24 | 25 | FT_EXPORT_VAR( const FT_Renderer_Class ) ft_raster1_renderer_class; 26 | 27 | /* this renderer is _NOT_ part of the default modules, you'll need */ 28 | /* to register it by hand in your application. It should only be */ 29 | /* used for backwards-compatibility with FT 1.x anyway. */ 30 | /* */ 31 | FT_EXPORT_VAR( const FT_Renderer_Class ) ft_raster5_renderer_class; 32 | 33 | 34 | #endif /* FTREND1_H */ 35 | 36 | 37 | /* END */ 38 | -------------------------------------------------------------------------------- /src/ft2/ftsmooth.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftsmooth.h */ 4 | /* */ 5 | /* Anti-aliasing renderer interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef FTSMOOTH_H 20 | #define FTSMOOTH_H 21 | 22 | #include "ftrender.h" 23 | 24 | #ifndef FT_CONFIG_OPTION_NO_STD_RASTER 25 | FT_EXPORT_VAR( const FT_Renderer_Class ) ft_std_renderer_class; 26 | #endif 27 | 28 | #ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER 29 | FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_renderer_class; 30 | #endif 31 | 32 | #endif /* FTSMOOTH_H */ 33 | 34 | 35 | /* END */ 36 | -------------------------------------------------------------------------------- /src/ft2/sfdriver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* sfdriver.h */ 4 | /* */ 5 | /* High-level SFNT driver interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef SFDRIVER_H 20 | #define SFDRIVER_H 21 | 22 | #include "ftmodule.h" 23 | 24 | FT_EXPORT_VAR( const FT_Module_Class ) sfnt_module_class; 25 | 26 | #endif /* SFDRIVER_H */ 27 | 28 | 29 | /* END */ 30 | -------------------------------------------------------------------------------- /src/ft2/sfobjs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* sfobjs.h */ 4 | /* */ 5 | /* SFNT object management (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef SFOBJS_H 20 | #define SFOBJS_H 21 | 22 | #include "sfnt.h" 23 | #include "ftobjs.h" 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | 31 | LOCAL_DEF 32 | FT_Error SFNT_Init_Face( FT_Stream stream, 33 | TT_Face face, 34 | FT_Int face_index, 35 | FT_Int num_params, 36 | FT_Parameter* params ); 37 | 38 | LOCAL_DEF 39 | FT_Error SFNT_Load_Face( FT_Stream stream, 40 | TT_Face face, 41 | FT_Int face_index, 42 | FT_Int num_params, 43 | FT_Parameter* params ); 44 | 45 | LOCAL_DEF 46 | void SFNT_Done_Face( TT_Face face ); 47 | 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | 54 | #endif /* SFDRIVER_H */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /src/ft2/ttcmap.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttcmap.h */ 4 | /* */ 5 | /* TrueType character mapping table (cmap) support (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef TTCMAP_H 20 | #define TTCMAP_H 21 | 22 | #include "tttypes.h" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | 29 | LOCAL_DEF 30 | FT_Error TT_CharMap_Load( TT_Face face, 31 | TT_CMapTable* cmap, 32 | FT_Stream input ); 33 | 34 | LOCAL_DEF 35 | FT_Error TT_CharMap_Free( TT_Face face, 36 | TT_CMapTable* cmap ); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* TTCMAP_H */ 43 | 44 | 45 | /* END */ 46 | -------------------------------------------------------------------------------- /src/ft2/ttdriver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttdriver.h */ 4 | /* */ 5 | /* High-level TrueType driver interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef TTDRIVER_H 20 | #define TTDRIVER_H 21 | 22 | #include "ftdriver.h" 23 | 24 | 25 | FT_EXPORT_VAR( const FT_Driver_Class ) tt_driver_class; 26 | 27 | 28 | #endif /* TTDRIVER_H */ 29 | 30 | 31 | /* END */ 32 | -------------------------------------------------------------------------------- /src/ft2/ttgload.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttgload.h */ 4 | /* */ 5 | /* TrueType Glyph Loader (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef TTGLOAD_H 20 | #define TTGLOAD_H 21 | 22 | 23 | #include "ttobjs.h" 24 | 25 | #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER 26 | #include "ttinterp.h" 27 | #endif 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | 35 | LOCAL_DEF 36 | void TT_Get_Metrics( TT_HoriHeader* header, 37 | FT_UInt index, 38 | FT_Short* bearing, 39 | FT_UShort* advance ); 40 | 41 | LOCAL_DEF 42 | void TT_Init_Glyph_Loading( TT_Face face ); 43 | 44 | LOCAL_DEF 45 | FT_Error TT_Load_Glyph( TT_Size size, 46 | TT_GlyphSlot glyph, 47 | FT_UShort glyph_index, 48 | FT_UInt load_flags ); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif /* TTGLOAD_H */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /src/ft2/ttpload.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttpload.h */ 4 | /* */ 5 | /* TrueType glyph data/program tables loader (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef TTPLOAD_H 20 | #define TTPLOAD_H 21 | 22 | #include "tttypes.h" 23 | 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | 30 | LOCAL_DEF 31 | FT_Error TT_Load_Locations( TT_Face face, 32 | FT_Stream stream ); 33 | 34 | LOCAL_DEF 35 | FT_Error TT_Load_CVT( TT_Face face, 36 | FT_Stream stream ); 37 | 38 | LOCAL_DEF 39 | FT_Error TT_Load_Programs( TT_Face face, 40 | FT_Stream stream ); 41 | 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | 48 | #endif /* TTPLOAD_H */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /src/ft2/ttpost.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttpost.h */ 4 | /* */ 5 | /* Postcript name table processing for TrueType and OpenType fonts */ 6 | /* (specification). */ 7 | /* */ 8 | /* Copyright 1996-2000 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | #ifndef TTPOST_H 21 | #define TTPOST_H 22 | 23 | #include "ftconfig.h" 24 | #include "tttypes.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | 31 | #define TT_Err_Invalid_Post_Table_Format 0x0B00 32 | #define TT_Err_Invalid_Post_Table 0x0B01 33 | 34 | 35 | LOCAL_DEF 36 | FT_Error TT_Get_PS_Name( TT_Face face, 37 | FT_UInt index, 38 | FT_String** PSname ); 39 | 40 | LOCAL_DEF 41 | void TT_Free_Post_Names( TT_Face face ); 42 | 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | 49 | #endif /* TTPOST_H */ 50 | 51 | 52 | /* END */ 53 | -------------------------------------------------------------------------------- /src/ft2/ttsbit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttsbit.h */ 4 | /* */ 5 | /* TrueType and OpenType embedded bitmap support (specification). */ 6 | /* */ 7 | /* Copyright 1996-2000 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef TTSBIT_H 20 | #define TTSBIT_H 21 | 22 | 23 | #include "ttload.h" 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | 31 | LOCAL_DEF 32 | FT_Error TT_Load_SBit_Strikes( TT_Face face, 33 | FT_Stream stream ); 34 | 35 | LOCAL_DEF 36 | void TT_Free_SBit_Strikes( TT_Face face ); 37 | 38 | LOCAL_DEF 39 | FT_Error TT_Load_SBit_Image( TT_Face face, 40 | FT_Int x_ppem, 41 | FT_Int y_ppem, 42 | FT_UInt glyph_index, 43 | FT_UInt load_flags, 44 | FT_Stream stream, 45 | FT_Bitmap* map, 46 | TT_SBit_Metrics* metrics ); 47 | 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | 54 | #endif /* TTSBIT_H */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /src/game/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DGAMEDLL) 2 | 3 | add_library(game SHARED 4 | ../botai/ai_chat.c 5 | ../botai/ai_cmd.c 6 | ../botai/ai_dmnet.c 7 | ../botai/ai_dmq3.c 8 | ../botai/ai_main.c 9 | ../botai/ai_team.c 10 | ai_cast.c 11 | ai_cast_characters.c 12 | ai_cast_debug.c 13 | ai_cast_events.c 14 | ai_cast_fight.c 15 | ai_cast_func_attack.c 16 | ai_cast_func_boss1.c 17 | ai_cast_funcs.c 18 | ai_cast_script.c 19 | ai_cast_script_actions.c 20 | ai_cast_script_ents.c 21 | ai_cast_sight.c 22 | ai_cast_think.c 23 | bg_animation.c 24 | bg_misc.c 25 | bg_pmove.c 26 | bg_slidemove.c 27 | g_active.c 28 | g_alarm.c 29 | g_bot.c 30 | g_client.c 31 | g_cmds.c 32 | g_combat.c 33 | g_items.c 34 | g_main.c 35 | g_mem.c 36 | g_misc.c 37 | g_missile.c 38 | g_mover.c 39 | g_props.c 40 | g_save.c 41 | g_script.c 42 | g_script_actions.c 43 | g_session.c 44 | g_spawn.c 45 | g_svcmds.c 46 | g_syscalls.c 47 | g_target.c 48 | g_team.c 49 | g_tramcar.c 50 | g_trigger.c 51 | g_utils.c 52 | g_weapon.c 53 | q_math.c 54 | q_shared.c 55 | ) 56 | target_link_libraries(game m) 57 | set_target_properties(game PROPERTIES PREFIX "" OUTPUT_NAME "qagame-rtcw") 58 | -------------------------------------------------------------------------------- /src/game/ai_cast_fight.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //=========================================================================== 30 | // 31 | // Name: ai_cast_fight.h 32 | // Function: Wolfenstein AI Fighting Values 33 | // Programmer: Ridah 34 | // Tab Size: 4 (real tabs) 35 | //=========================================================================== 36 | 37 | // This is where all constants should reside, which decide when or if a character 38 | // can attack it's enemy. 39 | 40 | #define LOPER_GROUND_RANGE 200 41 | #define BLACKGUARD_MELEE_RANGE 48 42 | #define REJECT_MELEE_RANGE 90 //----(SA) added 43 | -------------------------------------------------------------------------------- /src/game/be_ai_char.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_ai_char.h 32 | * 33 | * desc: bot characters 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | //loads a bot character from a file 39 | int BotLoadCharacter( char *charfile, int skill ); 40 | //frees a bot character 41 | void BotFreeCharacter( int character ); 42 | //float characteristic 43 | float Characteristic_Float( int character, int index ); 44 | //bounded float characteristic 45 | float Characteristic_BFloat( int character, int index, float min, float max ); 46 | //integer characteristic 47 | int Characteristic_Integer( int character, int index ); 48 | //bounded integer characteristic 49 | int Characteristic_BInteger( int character, int index, int min, int max ); 50 | //string characteristic 51 | void Characteristic_String( int character, int index, char *buf, int size ); 52 | //free cached bot characters 53 | void BotShutdownCharacters( void ); 54 | -------------------------------------------------------------------------------- /src/game/be_ai_gen.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_ai_gen.h 32 | * 33 | * desc: genetic selection 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | int GeneticParentsAndChildSelection( int numranks, float *ranks, int *parent1, int *parent2, int *child ); 39 | -------------------------------------------------------------------------------- /src/game/be_ea.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | /***************************************************************************** 31 | * name: be_ea.h 32 | * 33 | * desc: elementary actions 34 | * 35 | * 36 | *****************************************************************************/ 37 | 38 | //ClientCommand elementary actions 39 | void EA_Say( int client, char *str ); 40 | void EA_SayTeam( int client, char *str ); 41 | void EA_UseItem( int client, char *it ); 42 | void EA_DropItem( int client, char *it ); 43 | void EA_UseInv( int client, char *inv ); 44 | void EA_DropInv( int client, char *inv ); 45 | void EA_Command( int client, char *command ); 46 | //regular elementary actions 47 | void EA_SelectWeapon( int client, int weapon ); 48 | void EA_Attack( int client ); 49 | void EA_Reload( int client ); 50 | void EA_Respawn( int client ); 51 | void EA_Talk( int client ); 52 | void EA_Gesture( int client ); 53 | void EA_Use( int client ); 54 | void EA_Jump( int client ); 55 | void EA_DelayedJump( int client ); 56 | void EA_Crouch( int client ); 57 | void EA_Walk( int client ); 58 | void EA_MoveUp( int client ); 59 | void EA_MoveDown( int client ); 60 | void EA_MoveForward( int client ); 61 | void EA_MoveBack( int client ); 62 | void EA_MoveLeft( int client ); 63 | void EA_MoveRight( int client ); 64 | void EA_Move( int client, vec3_t dir, float speed ); 65 | void EA_View( int client, vec3_t viewangles ); 66 | //send regular input to the server 67 | void EA_EndRegular( int client, float thinktime ); 68 | void EA_GetInput( int client, float thinktime, bot_input_t *input ); 69 | void EA_ResetInput( int client, bot_input_t *init ); 70 | //setup and shutdown routines 71 | int EA_Setup( void ); 72 | void EA_Shutdown( void ); 73 | -------------------------------------------------------------------------------- /src/game/g_mem.c: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | // 30 | // g_mem.c 31 | // 32 | 33 | 34 | #include "g_local.h" 35 | 36 | // Ridah, increased this (fixes Dan's crash) 37 | //#define POOLSIZE (256 * 1024) 38 | //#define POOLSIZE (2048 * 1024) 39 | #define POOLSIZE ( 4096 * 1024 ) //----(SA) upped to try to get assault_34 going 40 | 41 | static char memoryPool[POOLSIZE]; 42 | static int allocPoint; 43 | 44 | void *G_Alloc( int size ) { 45 | char *p; 46 | 47 | if ( g_debugAlloc.integer ) { 48 | G_Printf( "G_Alloc of %i bytes (%i left)\n", size, POOLSIZE - allocPoint - ( ( size + 31 ) & ~31 ) ); 49 | } 50 | 51 | if ( allocPoint + size > POOLSIZE ) { 52 | G_Error( "G_Alloc: failed on allocation of %u bytes\n", size ); 53 | return NULL; 54 | } 55 | 56 | p = &memoryPool[allocPoint]; 57 | 58 | allocPoint += ( size + 31 ) & ~31; 59 | 60 | return p; 61 | } 62 | 63 | void G_InitMemory( void ) { 64 | allocPoint = 0; 65 | } 66 | 67 | void Svcmd_GameMem_f( void ) { 68 | G_Printf( "Game memory status: %i out of %i bytes allocated\n", allocPoint, POOLSIZE ); 69 | } 70 | -------------------------------------------------------------------------------- /src/game/game.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | dllEntry 3 | vmMain 4 | -------------------------------------------------------------------------------- /src/idLib/sys/win32/eaxguid.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/idLib/sys/win32/eaxguid.lib -------------------------------------------------------------------------------- /src/jpeg-6/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | # Get all C source files 4 | file(GLOB C_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") 5 | 6 | # Sort the C sources into a neat list 7 | list(SORT C_SOURCES) 8 | 9 | # Set the compiler to use 10 | set_source_files_properties(${C_SOURCES} PROPERTIES LANGUAGE C COMPILE_FLAGS "-g") 11 | 12 | # Add to our library. 13 | add_library(jpeg-6.a STATIC ${C_SOURCES}) 14 | set_target_properties(jpeg-6.a PROPERTIES LINKER_LANGUAGE C PREFIX "" SUFFIX "") -------------------------------------------------------------------------------- /src/jpeg-6/jchuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jchuff.h 3 | * 4 | * Copyright (C) 1991-1995, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for Huffman entropy encoding routines 9 | * that are shared between the sequential encoder (jchuff.c) and the 10 | * progressive encoder (jcphuff.c). No other modules need to see these. 11 | */ 12 | 13 | /* Derived data constructed for each Huffman table */ 14 | 15 | typedef struct { 16 | unsigned int ehufco[256]; /* code for each symbol */ 17 | char ehufsi[256]; /* length of code for each symbol */ 18 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ 19 | } c_derived_tbl; 20 | 21 | /* Short forms of external names for systems with brain-damaged linkers. */ 22 | 23 | #ifdef NEED_SHORT_EXTERNAL_NAMES 24 | #define jpeg_make_c_derived_tbl jMkCDerived 25 | #define jpeg_gen_optimal_table jGenOptTbl 26 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 27 | 28 | /* Expand a Huffman table definition into the derived format */ 29 | EXTERN void jpeg_make_c_derived_tbl JPP( ( j_compress_ptr cinfo, 30 | JHUFF_TBL * htbl, c_derived_tbl * *pdtbl ) ); 31 | 32 | /* Generate an optimal table definition given the specified counts */ 33 | EXTERN void jpeg_gen_optimal_table JPP( ( j_compress_ptr cinfo, 34 | JHUFF_TBL * htbl, long freq[] ) ); 35 | -------------------------------------------------------------------------------- /src/jpeg-6/jcinit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcinit.c 3 | * 4 | * Copyright (C) 1991-1995, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains initialization logic for the JPEG compressor. 9 | * This routine is in charge of selecting the modules to be executed and 10 | * making an initialization call to each one. 11 | * 12 | * Logically, this code belongs in jcmaster.c. It's split out because 13 | * linking this routine implies linking the entire compression library. 14 | * For a transcoding-only application, we want to be able to use jcmaster.c 15 | * without linking in the whole library. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | 22 | 23 | /* 24 | * Master selection of compression modules. 25 | * This is done once at the start of processing an image. We determine 26 | * which modules will be used and give them appropriate initialization calls. 27 | */ 28 | 29 | GLOBAL void 30 | jinit_compress_master( j_compress_ptr cinfo ) { 31 | /* Initialize master control (includes parameter checking/processing) */ 32 | jinit_c_master_control( cinfo, FALSE /* full compression */ ); 33 | 34 | /* Preprocessing */ 35 | if ( !cinfo->raw_data_in ) { 36 | jinit_color_converter( cinfo ); 37 | jinit_downsampler( cinfo ); 38 | jinit_c_prep_controller( cinfo, FALSE /* never need full buffer here */ ); 39 | } 40 | /* Forward DCT */ 41 | jinit_forward_dct( cinfo ); 42 | /* Entropy encoding: either Huffman or arithmetic coding. */ 43 | if ( cinfo->arith_code ) { 44 | ERREXIT( cinfo, JERR_ARITH_NOTIMPL ); 45 | } else { 46 | if ( cinfo->progressive_mode ) { 47 | #ifdef C_PROGRESSIVE_SUPPORTED 48 | jinit_phuff_encoder( cinfo ); 49 | #else 50 | ERREXIT( cinfo, JERR_NOT_COMPILED ); 51 | #endif 52 | } else { 53 | jinit_huff_encoder( cinfo ); 54 | } 55 | } 56 | 57 | /* Need a full-image coefficient buffer in any multi-pass mode. */ 58 | jinit_c_coef_controller( cinfo, 59 | ( cinfo->num_scans > 1 || cinfo->optimize_coding ) ); 60 | jinit_c_main_controller( cinfo, FALSE /* never need full buffer here */ ); 61 | 62 | jinit_marker_writer( cinfo ); 63 | 64 | /* We can now tell the memory manager to allocate virtual arrays. */ 65 | ( *cinfo->mem->realize_virt_arrays )( (j_common_ptr) cinfo ); 66 | 67 | /* Write the datastream header (SOI) immediately. 68 | * Frame and scan headers are postponed till later. 69 | * This lets application insert special markers after the SOI. 70 | */ 71 | ( *cinfo->marker->write_file_header )( cinfo ); 72 | } 73 | -------------------------------------------------------------------------------- /src/jpeg-6/jcomapi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcomapi.c 3 | * 4 | * Copyright (C) 1994, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains application interface routines that are used for both 9 | * compression and decompression. 10 | */ 11 | 12 | #define JPEG_INTERNALS 13 | #include "jinclude.h" 14 | #include "jpeglib.h" 15 | 16 | 17 | /* 18 | * Abort processing of a JPEG compression or decompression operation, 19 | * but don't destroy the object itself. 20 | * 21 | * For this, we merely clean up all the nonpermanent memory pools. 22 | * Note that temp files (virtual arrays) are not allowed to belong to 23 | * the permanent pool, so we will be able to close all temp files here. 24 | * Closing a data source or destination, if necessary, is the application's 25 | * responsibility. 26 | */ 27 | 28 | GLOBAL void 29 | jpeg_abort( j_common_ptr cinfo ) { 30 | int pool; 31 | 32 | /* Releasing pools in reverse order might help avoid fragmentation 33 | * with some (brain-damaged) malloc libraries. 34 | */ 35 | for ( pool = JPOOL_NUMPOOLS - 1; pool > JPOOL_PERMANENT; pool-- ) { 36 | ( *cinfo->mem->free_pool )( cinfo, pool ); 37 | } 38 | 39 | /* Reset overall state for possible reuse of object */ 40 | cinfo->global_state = ( cinfo->is_decompressor ? DSTATE_START : CSTATE_START ); 41 | } 42 | 43 | 44 | /* 45 | * Destruction of a JPEG object. 46 | * 47 | * Everything gets deallocated except the master jpeg_compress_struct itself 48 | * and the error manager struct. Both of these are supplied by the application 49 | * and must be freed, if necessary, by the application. (Often they are on 50 | * the stack and so don't need to be freed anyway.) 51 | * Closing a data source or destination, if necessary, is the application's 52 | * responsibility. 53 | */ 54 | 55 | GLOBAL void 56 | jpeg_destroy( j_common_ptr cinfo ) { 57 | /* We need only tell the memory manager to release everything. */ 58 | /* NB: mem pointer is NULL if memory mgr failed to initialize. */ 59 | if ( cinfo->mem != NULL ) { 60 | ( *cinfo->mem->self_destruct )( cinfo ); 61 | } 62 | cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ 63 | cinfo->global_state = 0; /* mark it destroyed */ 64 | } 65 | 66 | 67 | /* 68 | * Convenience routines for allocating quantization and Huffman tables. 69 | * (Would jutils.c be a more reasonable place to put these?) 70 | */ 71 | 72 | GLOBAL JQUANT_TBL * 73 | jpeg_alloc_quant_table( j_common_ptr cinfo ) { 74 | JQUANT_TBL *tbl; 75 | 76 | tbl = ( JQUANT_TBL * ) 77 | ( *cinfo->mem->alloc_small )( cinfo, JPOOL_PERMANENT, SIZEOF( JQUANT_TBL ) ); 78 | tbl->sent_table = FALSE; /* make sure this is false in any new table */ 79 | return tbl; 80 | } 81 | 82 | 83 | GLOBAL JHUFF_TBL * 84 | jpeg_alloc_huff_table( j_common_ptr cinfo ) { 85 | JHUFF_TBL *tbl; 86 | 87 | tbl = ( JHUFF_TBL * ) 88 | ( *cinfo->mem->alloc_small )( cinfo, JPOOL_PERMANENT, SIZEOF( JHUFF_TBL ) ); 89 | tbl->sent_table = FALSE; /* make sure this is false in any new table */ 90 | return tbl; 91 | } 92 | -------------------------------------------------------------------------------- /src/jpeg-6/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #define CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #define JDCT_DEFAULT JDCT_FLOAT 19 | #define JDCT_FASTEST JDCT_FLOAT 20 | 21 | #ifdef JPEG_INTERNALS 22 | 23 | #undef RIGHT_SHIFT_IS_UNSIGNED 24 | 25 | #endif /* JPEG_INTERNALS */ 26 | 27 | #ifdef JPEG_CJPEG_DJPEG 28 | 29 | #define BMP_SUPPORTED /* BMP image file format */ 30 | #define GIF_SUPPORTED /* GIF image file format */ 31 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 32 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 33 | #define TARGA_SUPPORTED /* Targa image file format */ 34 | 35 | #undef TWO_FILE_COMMANDLINE /* optional */ 36 | #define USE_SETMODE /* Needed to make one-file style work in Watcom */ 37 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 38 | #undef DONT_USE_B_MODE 39 | #undef PROGRESS_REPORT /* optional */ 40 | 41 | #endif /* JPEG_CJPEG_DJPEG */ 42 | -------------------------------------------------------------------------------- /src/jpeg-6/jmemnobs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jmemnobs.c 3 | * 4 | * Copyright (C) 1992-1994, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file provides a really simple implementation of the system- 9 | * dependent portion of the JPEG memory manager. This implementation 10 | * assumes that no backing-store files are needed: all required space 11 | * can be obtained from ri.Z_Malloc(). 12 | * This is very portable in the sense that it'll compile on almost anything, 13 | * but you'd better have lots of main memory (or virtual memory) if you want 14 | * to process big images. 15 | * Note that the max_memory_to_use option is ignored by this implementation. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | #include "jmemsys.h" /* import the system-dependent declarations */ 22 | 23 | #include "../renderer/tr_local.h" 24 | 25 | /* 26 | * Memory allocation and ri.Freeing are controlled by the regular library 27 | * routines ri.Malloc() and ri.Free(). 28 | */ 29 | 30 | GLOBAL void * 31 | jpeg_get_small( j_common_ptr cinfo, size_t sizeofobject ) { 32 | return Z_Malloc( sizeofobject ); 33 | } 34 | 35 | GLOBAL void 36 | jpeg_free_small( j_common_ptr cinfo, void * object, size_t sizeofobject ) { 37 | free( object ); 38 | } 39 | 40 | 41 | /* 42 | * "Large" objects are treated the same as "small" ones. 43 | * NB: although we include FAR keywords in the routine declarations, 44 | * this file won't actually work in 80x86 small/medium model; at least, 45 | * you probably won't be able to process useful-size images in only 64KB. 46 | */ 47 | 48 | GLOBAL void FAR * 49 | jpeg_get_large( j_common_ptr cinfo, size_t sizeofobject ) { 50 | return Z_Malloc( sizeofobject ); 51 | } 52 | 53 | GLOBAL void 54 | jpeg_free_large( j_common_ptr cinfo, void FAR * object, size_t sizeofobject ) { 55 | free( object ); 56 | } 57 | 58 | 59 | /* 60 | * This routine computes the total memory space available for allocation. 61 | * Here we always say, "we got all you want bud!" 62 | */ 63 | 64 | GLOBAL long 65 | jpeg_mem_available( j_common_ptr cinfo, long min_bytes_needed, 66 | long max_bytes_needed, long already_allocated ) { 67 | return max_bytes_needed; 68 | } 69 | 70 | 71 | /* 72 | * Backing store (temporary file) management. 73 | * Since jpeg_mem_available always promised the moon, 74 | * this should never be called and we can just error out. 75 | */ 76 | 77 | GLOBAL void 78 | jpeg_open_backing_store( j_common_ptr cinfo, backing_store_ptr info, 79 | long total_bytes_needed ) { 80 | ERREXIT( cinfo, JERR_NO_BACKING_STORE ); 81 | } 82 | 83 | 84 | /* 85 | * These routines take care of any system-dependent initialization and 86 | * cleanup required. Here, there isn't any. 87 | */ 88 | 89 | GLOBAL long 90 | jpeg_mem_init( j_common_ptr cinfo ) { 91 | return 0; /* just set max_memory_to_use to 0 */ 92 | } 93 | 94 | GLOBAL void 95 | jpeg_mem_term( j_common_ptr cinfo ) { 96 | /* no work */ 97 | } 98 | -------------------------------------------------------------------------------- /src/jpeg-6/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1995, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6 2-Aug-95" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1995, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /src/macosx/BuildRelease: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | 4 | 5 | APPNAME="Quake3" 6 | 7 | PACKAGENAME= Quake3 8 | 9 | 10 | 11 | (cd $OMNI_SOURCE_ROOT; ./Build Quake3 install) 12 | 13 | 14 | 15 | rm -rf "/tmp/$APPNAME" 16 | 17 | mkdir "/tmp/$APPNAME" 18 | 19 | cp "Read Me.rtf" "/tmp/$APPNAME" 20 | 21 | 22 | 23 | cd /Users/Shared/$USER/InstalledProducts 24 | 25 | gnutar cf - FAKK2.app | (cd "/tmp/$APPNAME"; gnutar xf -) 26 | 27 | 28 | 29 | cd "/tmp/$APPNAME" 30 | 31 | sudo ~bungi/Unix/bin/files2image $PACKAGENAME ./* 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/macosx/CGMouseDeltaFix.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #import 30 | 31 | extern void CGFix_Initialize(); 32 | 33 | extern void CGFix_GetLastMouseDelta( CGMouseDelta *dx, CGMouseDelta *dy ); 34 | 35 | -------------------------------------------------------------------------------- /src/macosx/Q3Controller.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | #import 31 | 32 | @interface Q3Controller : NSObject 33 | { 34 | IBOutlet NSPanel *bannerPanel; 35 | } 36 | 37 | #ifndef DEDICATED 38 | -(IBAction)paste : (id)sender; 39 | -(IBAction)requestTerminate : (id)sender; 40 | 41 | -(void) showBanner; 42 | #endif 43 | 44 | -(void)quakeMain; 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /src/macosx/Quake3.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/macosx/Quake3.icns -------------------------------------------------------------------------------- /src/macosx/Quake3.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | 3 | IBClasses = ( 4 | 5 | { 6 | 7 | ACTIONS = {showHelp = id; }; 8 | 9 | CLASS = FirstResponder; 10 | 11 | LANGUAGE = ObjC; 12 | 13 | SUPERCLASS = NSObject; 14 | 15 | }, 16 | 17 | { 18 | 19 | ACTIONS = {paste = id; requestTerminate = id; }; 20 | 21 | CLASS = Q3Controller; 22 | 23 | LANGUAGE = ObjC; 24 | 25 | OUTLETS = {bannerPanel = id; }; 26 | 27 | SUPERCLASS = NSObject; 28 | 29 | } 30 | 31 | ); 32 | 33 | IBVersion = 1; 34 | 35 | } -------------------------------------------------------------------------------- /src/macosx/Quake3.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | IBMainMenuLocation 10 | 11 | 15 329 121 44 0 47 1152 801 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/macosx/Quake3.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/macosx/Quake3.nib/objects.nib -------------------------------------------------------------------------------- /src/macosx/RecordDemo.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh -x 2 | 3 | 4 | 5 | /Local/Public/bungi/BuildOutput/Quake3.app/Contents/MacOS/Quake3 \ 6 | 7 | +set sv_pure 0 \ 8 | 9 | +set g_syncronousClients 1 \ 10 | 11 | +map q3dm6 \ 12 | 13 | +record foo 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/macosx/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/macosx/banner.jpg -------------------------------------------------------------------------------- /src/macosx/macosx_display.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #include "tr_local.h" 30 | #include "macosx_local.h" 31 | 32 | @class NSDictionary; 33 | 34 | extern NSDictionary *Sys_GetMatchingDisplayMode( qboolean allowStretchedModes ); 35 | 36 | extern void Sys_StoreGammaTables(); 37 | extern void Sys_GetGammaTable( glwgamma_t *table ); 38 | extern void Sys_SetScreenFade( glwgamma_t *table, float fraction ); 39 | 40 | extern void Sys_FadeScreens(); 41 | extern void Sys_FadeScreen( CGDirectDisplayID display ); 42 | extern void Sys_UnfadeScreens(); 43 | extern void Sys_UnfadeScreen( CGDirectDisplayID display, glwgamma_t *table ); 44 | extern void Sys_ReleaseAllDisplays(); 45 | 46 | -------------------------------------------------------------------------------- /src/macosx/macosx_glimp.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #ifndef GL_EXT_abgr 33 | #include 34 | #endif 35 | 36 | // This can be defined to use the CGLMacro.h support which avoids looking up 37 | // the current context. 38 | //#define USE_CGLMACROS 39 | 40 | #ifdef USE_CGLMACROS 41 | #include "macosx_local.h" 42 | #define cgl_ctx glw_state._cgl_ctx 43 | #include 44 | #endif 45 | -------------------------------------------------------------------------------- /src/macosx/macosx_glsmp_null.m: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #import "macosx_glimp.h" 30 | 31 | #include "tr_local.h" 32 | #import "macosx_local.h" 33 | 34 | qboolean GLimp_SpawnRenderThread( void ( *function )( void ) ) { 35 | return qfalse; 36 | } 37 | 38 | void *GLimp_RendererSleep( void ) { 39 | return NULL; 40 | } 41 | 42 | void GLimp_FrontEndSleep( void ) { 43 | 44 | } 45 | 46 | void GLimp_WakeRenderer( void *data ) { 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/macosx/macosx_timers.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #ifdef OMNI_TIMER 30 | 31 | #import 32 | 33 | #define OTSTART( node ) OTStackPush( node ) 34 | #define OTSTOP( node ) OTStackPop() 35 | 36 | extern OTStackNode *rootNode; 37 | extern OTStackNode *markFragmentsNode1; 38 | extern OTStackNode *markFragmentsNode2; 39 | extern OTStackNode *markFragmentsGrid; 40 | extern OTStackNode *markFragmentsNode4; 41 | extern OTStackNode *addMarkFragmentsNode; 42 | extern OTStackNode *chopPolyNode; 43 | extern OTStackNode *boxTraceNode; 44 | extern OTStackNode *boxOnPlaneSideNode; 45 | extern OTStackNode *recursiveWorldNode; 46 | extern OTStackNode *surfaceAnimNode; 47 | extern OTStackNode *surfaceFaceNode; 48 | extern OTStackNode *surfaceMeshNode; 49 | extern OTStackNode *surfaceEndNode; 50 | extern OTStackNode *shadowEndNode; 51 | extern OTStackNode *stageIteratorGenericNode; 52 | extern OTStackNode *computeColorAndTexNode; 53 | extern OTStackNode *mp3DecodeNode; 54 | 55 | extern void InitializeTimers(); 56 | 57 | #else 58 | 59 | #define OTSTART( node ) 60 | #define OTSTOP( node ) 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /src/macosx/timedemo.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | 4 | 5 | buildRoot=./build 6 | 7 | executable=$buildRoot/Quake3.app/Contents/MacOS/Quake3 8 | 9 | ls -l $executable 10 | 11 | 12 | 13 | flags="$flags +set timedemo 1" 14 | 15 | flags="$flags +set s_initsound 0" 16 | 17 | flags="$flags +set vm_cgame 1" 18 | 19 | flags="$flags +set vm_game 1" 20 | 21 | flags="$flags +set r_texturebits 16" 22 | 23 | flags="$flags +set r_depthbits 16" 24 | 25 | flags="$flags +set r_colorbits 16" 26 | 27 | flags="$flags +set stencilbits 8" 28 | 29 | 30 | 31 | flags="$flags +set r_appleTransformHint 1" 32 | 33 | 34 | 35 | echo flags=$flags 36 | 37 | 38 | 39 | function demo { 40 | 41 | echo Demo $* 42 | 43 | $executable $flags +demo $* |& egrep "(seconds|VM)" 44 | 45 | } 46 | 47 | 48 | 49 | demo foo 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/qcommon/md4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/qcommon/md4.c -------------------------------------------------------------------------------- /src/qcommon/vm_none.c: -------------------------------------------------------------------------------- 1 | #include "vm_local.h" 2 | 3 | intptr_t VM_CallCompiled( vm_t *vm, intptr_t *args ) { 4 | exit(99); 5 | return 0; 6 | } 7 | 8 | void VM_Compile( vm_t *vm, vmHeader_t *header ) { 9 | exit(99); 10 | } 11 | -------------------------------------------------------------------------------- /src/renderer/ref_trin.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | GetRefAPI 3 | -------------------------------------------------------------------------------- /src/splines/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | # Get all C source files 4 | file(GLOB CXX_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp") 5 | 6 | # Sort the C sources into a neat list 7 | list(SORT CXX_SOURCES) 8 | 9 | # Set the compiler to use 10 | set_source_files_properties(${CXX_SOURCES} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "-Wno-write-strings") 11 | 12 | # Add to our library. 13 | add_library(splines.a STATIC ${CXX_SOURCES}) 14 | set_target_properties(splines.a PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "") 15 | -------------------------------------------------------------------------------- /src/splines/math_quaternion.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #include "math_quaternion.h" 30 | #include "math_matrix.h" 31 | 32 | void toQuat( idVec3 &src, quat_t &dst ) { 33 | dst.x = src.x; 34 | dst.y = src.y; 35 | dst.z = src.z; 36 | dst.w = 0.0f; 37 | } 38 | 39 | void toQuat( angles_t &src, quat_t &dst ) { 40 | mat3_t temp; 41 | 42 | toMatrix( src, temp ); 43 | toQuat( temp, dst ); 44 | } 45 | 46 | void toQuat( mat3_t &src, quat_t &dst ) { 47 | float trace; 48 | float s; 49 | int i; 50 | int j; 51 | int k; 52 | 53 | static int next[ 3 ] = { 1, 2, 0 }; 54 | 55 | trace = src[ 0 ][ 0 ] + src[ 1 ][ 1 ] + src[ 2 ][ 2 ]; 56 | if ( trace > 0.0f ) { 57 | s = ( float )sqrt( trace + 1.0f ); 58 | dst.w = s * 0.5f; 59 | s = 0.5f / s; 60 | 61 | dst.x = ( src[ 2 ][ 1 ] - src[ 1 ][ 2 ] ) * s; 62 | dst.y = ( src[ 0 ][ 2 ] - src[ 2 ][ 0 ] ) * s; 63 | dst.z = ( src[ 1 ][ 0 ] - src[ 0 ][ 1 ] ) * s; 64 | } else { 65 | i = 0; 66 | if ( src[ 1 ][ 1 ] > src[ 0 ][ 0 ] ) { 67 | i = 1; 68 | } 69 | if ( src[ 2 ][ 2 ] > src[ i ][ i ] ) { 70 | i = 2; 71 | } 72 | 73 | j = next[ i ]; 74 | k = next[ j ]; 75 | 76 | s = ( float )sqrt( ( src[ i ][ i ] - ( src[ j ][ j ] + src[ k ][ k ] ) ) + 1.0f ); 77 | dst[ i ] = s * 0.5f; 78 | 79 | s = 0.5f / s; 80 | 81 | dst.w = ( src[ k ][ j ] - src[ j ][ k ] ) * s; 82 | dst[ j ] = ( src[ j ][ i ] + src[ i ][ j ] ) * s; 83 | dst[ k ] = ( src[ k ][ i ] + src[ i ][ k ] ) * s; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/ui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(ui SHARED 2 | ../game/bg_misc.c 3 | ../game/q_math.c 4 | ../game/q_shared.c 5 | ui_atoms.c 6 | ui_gameinfo.c 7 | ui_main.c 8 | ui_players.c 9 | ui_shared.c 10 | ui_syscalls.c 11 | ui_util.c 12 | ) 13 | target_link_libraries(ui m) 14 | set_target_properties(ui PROPERTIES PREFIX "" OUTPUT_NAME "ui-rtcw") 15 | -------------------------------------------------------------------------------- /src/ui/ui.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | vmMain 3 | dllEntry 4 | -------------------------------------------------------------------------------- /src/ui/ui_util.c: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | // ui_util.c 30 | // 31 | // origin: rad 32 | // new ui support stuff 33 | // 34 | // memory, string alloc 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/unix/Conscript-bspc: -------------------------------------------------------------------------------- 1 | # bspc build script 2 | 3 | Import qw( BASE_CFLAGS CONFIG_DIR BUILD_DIR CC CXX LINK ); 4 | 5 | @BSPC_FILES = qw( 6 | ../bspc/aas_areamerging.c 7 | ../bspc/aas_cfg.c 8 | ../bspc/aas_create.c 9 | ../bspc/aas_edgemelting.c 10 | ../bspc/aas_facemerging.c 11 | ../bspc/aas_file.c 12 | ../bspc/aas_gsubdiv.c 13 | ../bspc/aas_map.c 14 | ../bspc/aas_prunenodes.c 15 | ../bspc/aas_store.c 16 | ../bspc/be_aas_bspc.c 17 | ../botlib/be_aas_bspq3.c 18 | ../botlib/be_aas_cluster.c 19 | ../botlib/be_aas_move.c 20 | ../botlib/be_aas_optimize.c 21 | ../botlib/be_aas_reach.c 22 | ../botlib/be_aas_sample.c 23 | ../bspc/brushbsp.c 24 | ../bspc/bspc.c 25 | ../qcommon/cm_load.c 26 | ../qcommon/cm_patch.c 27 | ../qcommon/cm_test.c 28 | ../qcommon/cm_trace.c 29 | ../bspc/csg.c 30 | ../bspc/faces.c 31 | ../bspc/glfile.c 32 | ../bspc/l_bsp_ent.c 33 | ../bspc/l_bsp_hl.c 34 | ../bspc/l_bsp_q1.c 35 | ../bspc/l_bsp_q2.c 36 | ../bspc/l_bsp_q3.c 37 | ../bspc/l_bsp_sin.c 38 | ../bspc/l_cmd.c 39 | ../botlib/l_libvar.c 40 | ../bspc/l_log.c 41 | ../bspc/l_math.c 42 | ../bspc/l_mem.c 43 | ../bspc/l_poly.c 44 | ../botlib/l_precomp.c 45 | ../bspc/l_qfiles.c 46 | ../botlib/l_script.c 47 | ../botlib/l_struct.c 48 | ../bspc/l_threads.c 49 | ../bspc/l_utils.c 50 | ../bspc/leakfile.c 51 | ../bspc/map.c 52 | ../bspc/map_hl.c 53 | ../bspc/map_q1.c 54 | ../bspc/map_q2.c 55 | ../bspc/map_q3.c 56 | ../bspc/map_sin.c 57 | ../qcommon/md4.c 58 | ../bspc/nodraw.c 59 | ../bspc/portals.c 60 | ../bspc/prtfile.c 61 | ../bspc/textures.c 62 | ../bspc/tree.c 63 | ../qcommon/unzip.c 64 | ../bspc/writebsp.c 65 | ); 66 | $BSPC_FILES_REF = \@BSPC_FILES; 67 | 68 | $env = new cons( 69 | CC => $CC, 70 | CXX => $CXX, 71 | LINK => $LINK, 72 | CFLAGS => $BASE_CFLAGS . '-DBSPC -DGTKRADIANT -I../../../../GtkRadiant', 73 | LDFLAGS => '-lm' 74 | ); 75 | 76 | Program $env 'bspc', @$BSPC_FILES_REF; 77 | Install $env '#' . $CONFIG_DIR . '/out', 'bspc' 78 | 79 | -------------------------------------------------------------------------------- /src/unix/Conscript-cgame: -------------------------------------------------------------------------------- 1 | # cgame 2 | 3 | Import qw( BASE_CFLAGS CONFIG_DIR BUILD_DIR BASEGAME CC CXX LINK ); 4 | 5 | $env = new cons( 6 | CC => $CC, 7 | CXX => $CXX, 8 | LINK => $LINK, 9 | CFLAGS => $BASE_CFLAGS . '-fPIC -DCGAMEDLL', 10 | LDFLAGS => '-shared -ldl -lm' 11 | ); 12 | 13 | @FILES = qw( 14 | ../game/bg_animation.c 15 | ../game/bg_misc.c 16 | ../game/bg_pmove.c 17 | ../game/bg_slidemove.c 18 | ../cgame/cg_consolecmds.c 19 | ../cgame/cg_draw.c 20 | ../cgame/cg_drawtools.c 21 | ../cgame/cg_effects.c 22 | ../cgame/cg_ents.c 23 | ../cgame/cg_event.c 24 | ../cgame/cg_flamethrower.c 25 | ../cgame/cg_info.c 26 | ../cgame/cg_localents.c 27 | ../cgame/cg_main.c 28 | ../cgame/cg_marks.c 29 | ../cgame/cg_newDraw.c 30 | ../cgame/cg_particles.c 31 | ../cgame/cg_players.c 32 | ../cgame/cg_playerstate.c 33 | ../cgame/cg_predict.c 34 | ../cgame/cg_scoreboard.c 35 | ../cgame/cg_servercmds.c 36 | ../cgame/cg_snapshot.c 37 | ../cgame/cg_sound.c 38 | ../cgame/cg_syscalls.c 39 | ../cgame/cg_trails.c 40 | ../cgame/cg_view.c 41 | ../cgame/cg_weapons.c 42 | ../game/q_math.c 43 | ../game/q_shared.c 44 | ../ui/ui_shared.c 45 | ); 46 | $FILESREF = \@FILES; 47 | 48 | Program $env 'cgame-rtcw.so', @$FILESREF; 49 | Install $env '#' . $CONFIG_DIR . '/out/' . $BASEGAME, 'cgame-rtcw.so'; 50 | -------------------------------------------------------------------------------- /src/unix/Conscript-game: -------------------------------------------------------------------------------- 1 | # game 2 | 3 | Import qw( BASE_CFLAGS CONFIG_DIR BUILD_DIR BASEGAME CC CXX LINK ); 4 | 5 | $env = new cons( 6 | CC => $CC, 7 | CXX => $CXX, 8 | LINK => $LINK, 9 | CPPPATH => '#../game:#../botai', 10 | # NOTE TTimo what about the GAMEDLL define? where is it needed? 11 | CFLAGS => $BASE_CFLAGS . '-fPIC -DGAMEDLL', 12 | LDFLAGS => '-shared -ldl -lm' 13 | ); 14 | 15 | @FILES = qw( 16 | ../game/ai_cast.c 17 | ../game/ai_cast_characters.c 18 | ../game/ai_cast_debug.c 19 | ../game/ai_cast_events.c 20 | ../game/ai_cast_fight.c 21 | ../game/ai_cast_func_attack.c 22 | ../game/ai_cast_func_boss1.c 23 | ../game/ai_cast_funcs.c 24 | ../game/ai_cast_script.c 25 | ../game/ai_cast_script_actions.c 26 | ../game/ai_cast_script_ents.c 27 | ../game/ai_cast_sight.c 28 | ../game/ai_cast_think.c 29 | ../botai/ai_chat.c 30 | ../botai/ai_cmd.c 31 | ../botai/ai_dmnet.c 32 | ../botai/ai_dmq3.c 33 | ../botai/ai_main.c 34 | ../botai/ai_team.c 35 | ../game/bg_animation.c 36 | ../game/bg_misc.c 37 | ../game/bg_pmove.c 38 | ../game/bg_slidemove.c 39 | ../game/g_active.c 40 | ../game/g_alarm.c 41 | ../game/g_bot.c 42 | ../game/g_client.c 43 | ../game/g_cmds.c 44 | ../game/g_combat.c 45 | ../game/g_items.c 46 | ../game/g_main.c 47 | ../game/g_mem.c 48 | ../game/g_misc.c 49 | ../game/g_missile.c 50 | ../game/g_mover.c 51 | ../game/g_props.c 52 | ../game/g_save.c 53 | ../game/g_script.c 54 | ../game/g_script_actions.c 55 | ../game/g_session.c 56 | ../game/g_spawn.c 57 | ../game/g_svcmds.c 58 | ../game/g_syscalls.c 59 | ../game/g_target.c 60 | ../game/g_team.c 61 | ../game/g_tramcar.c 62 | ../game/g_trigger.c 63 | ../game/g_utils.c 64 | ../game/g_weapon.c 65 | ../game/q_math.c 66 | ../game/q_shared.c 67 | ); 68 | $FILESREF = \@FILES; 69 | 70 | # build a list of the *.c files in game/ for generation and dependencies 71 | # we exclude g_save of course 72 | $game_files_string = `ls -1 ../game/*.c | grep -v g_save`; 73 | @GAMES = split "\n", $game_files_string; 74 | $GAMESREF = \@GAMES; 75 | # process into a friendly string for extractfunc 76 | $GAMES_STRING = ""; 77 | $LDIR = `pwd`; 78 | chop $LDIR; 79 | $LDIR .= '/../game'; 80 | for($i=0; $i $CC, 7 | CXX => $CXX, 8 | LINK => $LINK, 9 | CFLAGS => $BASE_CFLAGS . '-fPIC', 10 | LDFLAGS => '-shared -ldl -lm' 11 | ); 12 | 13 | @FILES = qw( 14 | ../game/bg_misc.c 15 | ../game/q_math.c 16 | ../game/q_shared.c 17 | ../ui/ui_atoms.c 18 | ../ui/ui_gameinfo.c 19 | ../ui/ui_main.c 20 | ../ui/ui_players.c 21 | ../ui/ui_shared.c 22 | ../ui/ui_syscalls.c 23 | ../ui/ui_util.c 24 | ); 25 | $FILESREF = \@FILES; 26 | 27 | Program $env 'ui-rtcw.so', @$FILESREF; 28 | Install $env '#' . $CONFIG_DIR . '/out/' . $BASEGAME, 'ui-rtcw.so'; 29 | 30 | -------------------------------------------------------------------------------- /src/unix/build_tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # temporary script to build a tarball out of a build tree 3 | 4 | IN_DIR=$1 5 | VERSION=$2 6 | 7 | TMP_DIR=wolf-$VERSION 8 | rm -rf $TMP_DIR 9 | mkdir $TMP_DIR 10 | 11 | echo "Building tarball from $IN_DIR" 12 | echo "Version $VERSION" 13 | 14 | cp -R $IN_DIR/* $TMP_DIR 15 | find $TMP_DIR -name '*.so' -exec strip {} \; 16 | strip $TMP_DIR/wolf.x86 17 | 18 | rm wolf-linux-$VERSION.tar.gz 19 | tar cvzf wolf-linux-$VERSION.tar.gz $TMP_DIR 20 | 21 | echo "done: wolf-linux-$VERSION.tar.gz" 22 | -------------------------------------------------------------------------------- /src/unix/cgame.vpj: -------------------------------------------------------------------------------- 1 | [GLOBAL] 2 | workingdir=. 3 | version=6.0 4 | packname=GNU gcc or g++ 5 | MACRO=\n 6 | [CONFIGURATIONS] 7 | activeconfig=,Release 8 | config=,Release 9 | [COMPILER.Release] 10 | compile=copts: concur|capture|menu: Compile:&Compilecmd: make %n.ootheropts: 11 | make=copts: concur|capture|savemodified|menu: Build:&Buildcmd: consotheropts: 12 | rebuild=copts: concur|capture|menu: Rebuild:&Rebuildcmd: otheropts: 13 | debug=copts: |menu: Debug:&Debugcmd: xxgdb [exename-here]otheropts: 14 | execute=copts: |menu: Execute:E&xecutecmd: cgameotheropts: 15 | includedirs=%(INCLUDE) 16 | reffile= 17 | [FILES] 18 | Conscript-cgame 19 | ../cgame/cg_consolecmds.c 20 | ../cgame/cg_draw.c 21 | ../cgame/cg_drawtools.c 22 | ../cgame/cg_effects.c 23 | ../cgame/cg_ents.c 24 | ../cgame/cg_event.c 25 | ../cgame/cg_flamethrower.c 26 | ../cgame/cg_info.c 27 | ../cgame/cg_local.h 28 | ../cgame/cg_localents.c 29 | ../cgame/cg_main.c 30 | ../cgame/cg_marks.c 31 | ../cgame/cg_newDraw.c 32 | ../cgame/cg_particles.c 33 | ../cgame/cg_players.c 34 | ../cgame/cg_playerstate.c 35 | ../cgame/cg_predict.c 36 | ../cgame/cg_public.h 37 | ../cgame/cg_scoreboard.c 38 | ../cgame/cg_servercmds.c 39 | ../cgame/cg_snapshot.c 40 | ../cgame/cg_sound.c 41 | ../cgame/cg_syscalls.c 42 | ../cgame/cg_trails.c 43 | ../cgame/cg_view.c 44 | ../cgame/cg_weapons.c 45 | ../cgame/tr_types.h 46 | ../game/bg_animation.c 47 | [ASSOCIATION] 48 | -------------------------------------------------------------------------------- /src/unix/client.vpj: -------------------------------------------------------------------------------- 1 | [GLOBAL] 2 | workingdir=. 3 | version=6.0 4 | packname=GNU gcc or g++ 5 | MACRO=\n 6 | [CONFIGURATIONS] 7 | activeconfig=,Release 8 | config=,Release 9 | [COMPILER.Release] 10 | compile=copts: concur|capture|menu: Compile:&Compilecmd: make %n.ootheropts: 11 | make=copts: concur|capture|savemodified|menu: Build:&Buildcmd: ./consotheropts: 12 | rebuild=copts: concur|capture|menu: Rebuild:&Rebuildcmd: otheropts: 13 | debug=copts: |menu: Debug:&Debugcmd: xxgdb [exename-here]otheropts: 14 | execute=copts: |menu: Execute:E&xecutecmd: clientotheropts: 15 | includedirs=%(INCLUDE) 16 | reffile= 17 | [ASSOCIATION] 18 | [FILES] 19 | ChangeLog 20 | Conscript-client 21 | Conscript-setup 22 | Construct 23 | linux_common.c 24 | linux_glimp.c 25 | linux_joystick.c 26 | linux_local.h 27 | linux_snd.c 28 | snd_mixa.s 29 | unix_glw.h 30 | unix_main.c 31 | unix_net.c 32 | unix_shared.c 33 | ../botai/ai_cmd.c 34 | ../botai/ai_cmd.h 35 | ../botai/ai_main.c 36 | ../botai/ai_main.h 37 | ../botai/ai_team.c 38 | ../botai/ai_team.h 39 | ../botai/botai.h 40 | ../botlib/l_script.h 41 | ../client/cl_cgame.c 42 | ../client/cl_cin.c 43 | ../client/cl_console.c 44 | ../client/cl_input.c 45 | ../client/cl_keys.c 46 | ../client/cl_main.c 47 | ../client/cl_net_chan.c 48 | ../client/cl_parse.c 49 | ../client/cl_scrn.c 50 | ../client/cl_ui.c 51 | ../client/client.h 52 | ../client/snd_dma.c 53 | ../client/snd_mem.c 54 | ../client/snd_mix.c 55 | ../client/snd_public.h 56 | ../game/q_shared.h 57 | ../qcommon/cm_load.c 58 | ../qcommon/cm_local.h 59 | ../qcommon/cm_patch.c 60 | ../qcommon/cm_patch.h 61 | ../qcommon/cm_polylib.c 62 | ../qcommon/cm_polylib.h 63 | ../qcommon/cm_public.h 64 | ../qcommon/cm_test.c 65 | ../qcommon/cm_trace.c 66 | ../qcommon/cmd.c 67 | ../qcommon/common.c 68 | ../qcommon/cvar.c 69 | ../qcommon/files.c 70 | ../qcommon/md4.c 71 | ../qcommon/msg.c 72 | ../qcommon/net_chan.c 73 | ../qcommon/qcommon.h 74 | ../qcommon/qfiles.h 75 | ../qcommon/unzip.c 76 | ../qcommon/unzip.h 77 | ../qcommon/vm.c 78 | ../qcommon/vm_local.h 79 | ../renderer/qgl.h 80 | ../renderer/tr_animation.c 81 | ../renderer/tr_backend.c 82 | ../renderer/tr_bsp.c 83 | ../renderer/tr_cmds.c 84 | ../renderer/tr_cmesh.c 85 | ../renderer/tr_curve.c 86 | ../renderer/tr_flares.c 87 | ../renderer/tr_font.c 88 | ../renderer/tr_image.c 89 | ../renderer/tr_init.c 90 | ../renderer/tr_light.c 91 | ../renderer/tr_local.h 92 | ../renderer/tr_main.c 93 | ../renderer/tr_marks.c 94 | ../renderer/tr_mesh.c 95 | ../renderer/tr_model.c 96 | ../renderer/tr_noise.c 97 | ../renderer/tr_public.h 98 | ../renderer/tr_scene.c 99 | ../renderer/tr_shade.c 100 | ../renderer/tr_shade_calc.c 101 | ../renderer/tr_shader.c 102 | ../renderer/tr_shadows.c 103 | ../renderer/tr_sky.c 104 | ../renderer/tr_surface.c 105 | ../renderer/tr_world.c 106 | ../server/sv_client.c 107 | ../splines/q_shared.cpp 108 | ../splines/splines.cpp 109 | ../splines/splines.h 110 | -------------------------------------------------------------------------------- /src/unix/extractfuncs.vpj: -------------------------------------------------------------------------------- 1 | [GLOBAL] 2 | workingdir=. 3 | version=6.0 4 | packname=GNU gcc or g++ 5 | MACRO=\n 6 | [CONFIGURATIONS] 7 | activeconfig=,Release 8 | config=,Release 9 | [COMPILER.Release] 10 | compile=copts: concur|capture|menu: Compile:&Compilecmd: make %n.ootheropts: 11 | make=copts: concur|capture|savemodified|menu: Build:&Buildcmd: consotheropts: 12 | rebuild=copts: concur|capture|menu: Rebuild:&Rebuildcmd: otheropts: 13 | debug=copts: |menu: Debug:&Debugcmd: xxgdb [exename-here]otheropts: 14 | execute=copts: |menu: Execute:E&xecutecmd: extractfuncsotheropts: 15 | includedirs=%(INCLUDE) 16 | reffile= 17 | [FILES] 18 | ../extractfuncs/Conscript 19 | ../extractfuncs/extractfuncs.c 20 | ../extractfuncs/l_log.c 21 | ../extractfuncs/l_log.h 22 | ../extractfuncs/l_memory.c 23 | ../extractfuncs/l_memory.h 24 | ../extractfuncs/l_precomp.c 25 | ../extractfuncs/l_precomp.h 26 | ../extractfuncs/l_script.c 27 | ../extractfuncs/l_script.h 28 | [ASSOCIATION] 29 | -------------------------------------------------------------------------------- /src/unix/ftol.nasm: -------------------------------------------------------------------------------- 1 | ; 2 | ; qftol -- fast floating point to long conversion. 3 | ; 4 | 5 | segment .data 6 | 7 | temp dd 0.0 8 | fpucw dd 0 9 | 10 | ; Precision Control Field , 2 bits / 0x0300 11 | ; PC24 0x0000 Single precision (24 bits). 12 | ; PC53 0x0200 Double precision (53 bits). 13 | ; PC64 0x0300 Extended precision (64 bits). 14 | 15 | ; Rounding Control Field, 2 bits / 0x0C00 16 | ; RCN 0x0000 Rounding to nearest (even). 17 | ; RCD 0x0400 Rounding down (directed, minus). 18 | ; RCU 0x0800 Rounding up (directed plus). 19 | ; RC0 0x0C00 Rounding towards zero (chop mode). 20 | 21 | 22 | ; rounding towards nearest (even) 23 | cw027F dd 0x027F ; double precision 24 | cw037F dd 0x037F ; extended precision 25 | 26 | ; rounding towards zero (chop mode) 27 | cw0E7F dd 0x0E7F ; double precision 28 | cw0F7F dd 0x0F7F ; extended precision 29 | 30 | 31 | segment .text 32 | 33 | ; 34 | ; int qftol( void ) - default control word 35 | ; 36 | 37 | global qftol 38 | 39 | qftol: 40 | fistp dword [temp] 41 | mov eax, [temp] 42 | ret 43 | 44 | 45 | ; 46 | ; int qftol027F( void ) - DirectX FPU 47 | ; 48 | 49 | global qftol027F 50 | 51 | qftol027F: 52 | fnstcw [fpucw] 53 | fldcw [cw027F] 54 | fistp dword [temp] 55 | fldcw [fpucw] 56 | mov eax, [temp] 57 | ret 58 | 59 | ; 60 | ; int qftol037F( void ) - Linux FPU 61 | ; 62 | 63 | global qftol037F 64 | 65 | qftol037F: 66 | fnstcw [fpucw] 67 | fldcw [cw037F] 68 | fistp dword [temp] 69 | fldcw [fpucw] 70 | mov eax, [temp] 71 | ret 72 | 73 | 74 | ; 75 | ; int qftol0F7F( void ) - ANSI 76 | ; 77 | 78 | global qftol0F7F 79 | 80 | qftol0F7F: 81 | fnstcw [fpucw] 82 | fldcw [cw0F7F] 83 | fistp dword [temp] 84 | fldcw [fpucw] 85 | mov eax, [temp] 86 | ret 87 | 88 | ; 89 | ; int qftol0E7F( void ) 90 | ; 91 | 92 | global qftol0E7F 93 | 94 | qftol0E7F: 95 | fnstcw [fpucw] 96 | fldcw [cw0E7F] 97 | fistp dword [temp] 98 | fldcw [fpucw] 99 | mov eax, [temp] 100 | ret 101 | 102 | 103 | 104 | ; 105 | ; long Q_ftol( float q ) 106 | ; 107 | 108 | global Q_ftol 109 | 110 | Q_ftol: 111 | fld dword [esp+4] 112 | fistp dword [temp] 113 | mov eax, [temp] 114 | ret 115 | 116 | 117 | ; 118 | ; long qftol0F7F( float q ) - Linux FPU 119 | ; 120 | 121 | global Q_ftol0F7F 122 | 123 | Q_ftol0F7F: 124 | fnstcw [fpucw] 125 | fld dword [esp+4] 126 | fldcw [cw0F7F] 127 | fistp dword [temp] 128 | fldcw [fpucw] 129 | mov eax, [temp] 130 | ret 131 | 132 | -------------------------------------------------------------------------------- /src/unix/game.vpj: -------------------------------------------------------------------------------- 1 | [GLOBAL] 2 | workingdir=. 3 | version=6.0 4 | packname=GNU gcc or g++ 5 | MACRO=\n 6 | [CONFIGURATIONS] 7 | activeconfig=,Release 8 | config=,Release 9 | [COMPILER.Release] 10 | compile=copts: concur|capture|menu: Compile:&Compilecmd: make %n.ootheropts: 11 | make=copts: concur|capture|savemodified|menu: Build:&Buildcmd: ./consotheropts: 12 | rebuild=copts: concur|capture|menu: Rebuild:&Rebuildcmd: otheropts: 13 | debug=copts: |menu: Debug:&Debugcmd: xxgdb [exename-here]otheropts: 14 | execute=copts: |menu: Execute:E&xecutecmd: gameotheropts: 15 | includedirs=%(INCLUDE) 16 | reffile= 17 | [FILES] 18 | Conscript-game 19 | ../game/ai_cast.c 20 | ../game/ai_cast.h 21 | ../game/ai_cast_characters.c 22 | ../game/ai_cast_debug.c 23 | ../game/ai_cast_events.c 24 | ../game/ai_cast_fight.c 25 | ../game/ai_cast_fight.h 26 | ../game/ai_cast_func_attack.c 27 | ../game/ai_cast_func_boss1.c 28 | ../game/ai_cast_funcs.c 29 | ../game/ai_cast_global.h 30 | ../game/ai_cast_script.c 31 | ../game/ai_cast_script_actions.c 32 | ../game/ai_cast_script_ents.c 33 | ../game/ai_cast_sight.c 34 | ../game/ai_cast_think.c 35 | ../game/be_aas.h 36 | ../game/be_ai_char.h 37 | ../game/be_ai_chat.h 38 | ../game/be_ai_gen.h 39 | ../game/be_ai_goal.h 40 | ../game/be_ai_move.h 41 | ../game/be_ai_weap.h 42 | ../game/be_ea.h 43 | ../game/bg_animation.c 44 | ../game/bg_lib.c 45 | ../game/bg_local.h 46 | ../game/bg_misc.c 47 | ../game/bg_pmove.c 48 | ../game/bg_public.h 49 | ../game/bg_slidemove.c 50 | ../game/botlib.h 51 | ../game/g_active.c 52 | ../game/g_alarm.c 53 | ../game/g_arenas.c 54 | ../game/g_bot.c 55 | ../game/g_client.c 56 | ../game/g_cmds.c 57 | ../game/g_combat.c 58 | ../game/g_items.c 59 | ../game/g_local.h 60 | ../game/g_main.c 61 | ../game/g_mem.c 62 | ../game/g_misc.c 63 | ../game/g_missile.c 64 | ../game/g_mover.c 65 | ../game/g_props.c 66 | ../game/g_public.h 67 | ../game/g_save.c 68 | ../game/g_script.c 69 | ../game/g_script_actions.c 70 | ../game/g_session.c 71 | ../game/g_spawn.c 72 | ../game/g_svcmds.c 73 | ../game/g_syscalls.c 74 | ../game/g_target.c 75 | ../game/g_team.c 76 | ../game/g_team.h 77 | ../game/g_tramcar.c 78 | ../game/g_trigger.c 79 | ../game/g_utils.c 80 | ../game/g_vehicles.c 81 | ../game/g_weapon.c 82 | ../game/q_math.c 83 | ../game/q_shared.c 84 | ../game/q_shared.h 85 | ../game/surfaceflags.h 86 | [ASSOCIATION] 87 | -------------------------------------------------------------------------------- /src/unix/linux_local.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | // linux_local.h: Linux-specific Quake3 header file 30 | 31 | #define ARRAY_LEN(x) (sizeof(x) / sizeof(*(x))) 32 | #define Com_QueueEvent Sys_QueEvent 33 | 34 | void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ); 35 | qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message ); 36 | 37 | // Input subsystem 38 | void IN_Init( void ); 39 | void IN_Frame( void ); 40 | void IN_Shutdown( void ); 41 | void IN_JoyMove( void ); 42 | void Sys_SendKeyEvents(); 43 | 44 | // void IN_StartupJoystick( void ); 45 | 46 | // GL subsystem 47 | qboolean QGL_Init( const char *dllname ); 48 | void QGL_EnableLogging( qboolean enable ); 49 | void QGL_Shutdown( void ); 50 | void GLimp_ShutdownRenderThread( void ); 51 | 52 | char *strlwr( char *s ); 53 | -------------------------------------------------------------------------------- /src/unix/sdl2_gamma.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Wolfenstein: Enemy Territory GPL Source Code 3 | * Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 4 | * 5 | * ET: Legacy 6 | * Copyright (C) 2012 Jan Simek 7 | * 8 | * This file is part of ET: Legacy - http://www.etlegacy.com 9 | * 10 | * ET: Legacy is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * ET: Legacy is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with ET: Legacy. If not, see . 22 | * 23 | * In addition, Wolfenstein: Enemy Territory GPL Source Code is also 24 | * subject to certain additional terms. You should have received a copy 25 | * of these additional terms immediately following the terms and conditions 26 | * of the GNU General Public License which accompanied the source code. 27 | * If not, please request a copy in writing from id Software at the address below. 28 | * 29 | * id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 30 | * 31 | * @file sdl_gamma.c 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | #include "../renderer/tr_local.h" 38 | #include "../qcommon/qcommon.h" 39 | 40 | extern SDL_Window *SDLvidscreen; 41 | /* 42 | ================= 43 | GLimp_SetGamma 44 | ================= 45 | */ 46 | void GLimp_SetGamma(unsigned char red[256], unsigned char green[256], unsigned char blue[256]) 47 | { 48 | Uint16 table[3][256]; 49 | int i, j; 50 | 51 | if (!glConfig.deviceSupportsGamma || r_ignorehwgamma->integer > 0) 52 | { 53 | return; 54 | } 55 | 56 | for (i = 0; i < 256; i++) 57 | { 58 | table[0][i] = ((( Uint16 ) red[i]) << 8) | red[i]; 59 | table[1][i] = ((( Uint16 ) green[i]) << 8) | green[i]; 60 | table[2][i] = ((( Uint16 ) blue[i]) << 8) | blue[i]; 61 | } 62 | 63 | #ifdef _WIN32 64 | #include 65 | 66 | // Win2K and newer put this odd restriction on gamma ramps... 67 | { 68 | OSVERSIONINFO vinfo; 69 | 70 | vinfo.dwOSVersionInfoSize = sizeof(vinfo); 71 | GetVersionEx(&vinfo); 72 | if (vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT) 73 | { 74 | ri.Printf(PRINT_DEVELOPER, "performing gamma clamp.\n"); 75 | for (j = 0 ; j < 3 ; j++) 76 | { 77 | for (i = 0 ; i < 128 ; i++) 78 | { 79 | if (table[j][i] > ((128 + i) << 8)) 80 | { 81 | table[j][i] = (128 + i) << 8; 82 | } 83 | } 84 | 85 | if (table[j][127] > 254 << 8) 86 | { 87 | table[j][127] = 254 << 8; 88 | } 89 | } 90 | } 91 | } 92 | #endif 93 | 94 | // enforce constantly increasing 95 | for (j = 0; j < 3; j++) 96 | { 97 | for (i = 1; i < 256; i++) 98 | { 99 | if (table[j][i] < table[j][i - 1]) 100 | { 101 | table[j][i] = table[j][i - 1]; 102 | } 103 | } 104 | } 105 | 106 | SDL_SetWindowGammaRamp( SDLvidscreen, table[0], table[1], table[2]); 107 | } 108 | -------------------------------------------------------------------------------- /src/unix/sdl_gamma.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Wolfenstein: Enemy Territory GPL Source Code 3 | * Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 4 | * 5 | * ET: Legacy 6 | * Copyright (C) 2012 Jan Simek 7 | * 8 | * This file is part of ET: Legacy - http://www.etlegacy.com 9 | * 10 | * ET: Legacy is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * ET: Legacy is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with ET: Legacy. If not, see . 22 | * 23 | * In addition, Wolfenstein: Enemy Territory GPL Source Code is also 24 | * subject to certain additional terms. You should have received a copy 25 | * of these additional terms immediately following the terms and conditions 26 | * of the GNU General Public License which accompanied the source code. 27 | * If not, please request a copy in writing from id Software at the address below. 28 | * 29 | * id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 30 | * 31 | * @file sdl_gamma.c 32 | */ 33 | 34 | void GLimp_SetGamma(unsigned char red[256], unsigned char green[256], unsigned char blue[256]) 35 | { 36 | } 37 | -------------------------------------------------------------------------------- /src/unix/snapvector.nasm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Sys_SnapVector NASM code (Andrew Henderson) 3 | ; See win32/win_shared.c for the Win32 equivalent 4 | ; This code is provided to ensure that the 5 | ; rounding behavior (and, if necessary, the 6 | ; precision) of DLL and QVM code are identical 7 | ; e.g. for network-visible operations. 8 | ; See ftol.nasm for operations on a single float, 9 | ; as used in compiled VM and DLL code that does 10 | ; not use this system trap. 11 | ; 12 | 13 | 14 | segment .data 15 | 16 | fpucw dd 0 17 | cw037F dd 0x037F ; Rounding to nearest (even). 18 | 19 | segment .text 20 | 21 | ; void Sys_SnapVector( float *v ) 22 | global Sys_SnapVector 23 | Sys_SnapVector: 24 | push eax 25 | push ebp 26 | mov ebp, esp 27 | 28 | fnstcw [fpucw] 29 | mov eax, dword [ebp + 12] 30 | fldcw [cw037F] 31 | fld dword [eax] 32 | fistp dword [eax] 33 | fild dword [eax] 34 | fstp dword [eax] 35 | fld dword [eax + 4] 36 | fistp dword [eax + 4] 37 | fild dword [eax + 4] 38 | fstp dword [eax + 4] 39 | fld dword [eax + 8] 40 | fistp dword [eax + 8] 41 | fild dword [eax + 8] 42 | fstp dword [eax + 8] 43 | fldcw [fpucw] 44 | 45 | pop ebp 46 | pop eax 47 | ret 48 | 49 | ; void Sys_SnapVectorCW( float *v, unsigned short int cw ) 50 | global Sys_SnapVectorCW 51 | Sys_SnapVector_cw: 52 | push eax 53 | push ebp 54 | mov ebp, esp 55 | 56 | fnstcw [fpucw] 57 | mov eax, dword [ebp + 12] 58 | fldcw [ebp + 16] 59 | fld dword [eax] 60 | fistp dword [eax] 61 | fild dword [eax] 62 | fstp dword [eax] 63 | fld dword [eax + 4] 64 | fistp dword [eax + 4] 65 | fild dword [eax + 4] 66 | fstp dword [eax + 4] 67 | fld dword [eax + 8] 68 | fistp dword [eax + 8] 69 | fild dword [eax + 8] 70 | fstp dword [eax + 8] 71 | fldcw [fpucw] 72 | 73 | pop ebp 74 | pop eax 75 | ret -------------------------------------------------------------------------------- /src/unix/sys_dosa.s: -------------------------------------------------------------------------------- 1 | // 2 | // sys_dosa.s 3 | // x86 assembly-language DOS-dependent routines. 4 | 5 | #include "qasm.h" 6 | 7 | 8 | .data 9 | 10 | .align 4 11 | fpenv: 12 | .long 0, 0, 0, 0, 0, 0, 0, 0 13 | 14 | .text 15 | 16 | .globl C(MaskExceptions) 17 | C(MaskExceptions): 18 | fnstenv fpenv 19 | orl $0x3F,fpenv 20 | fldenv fpenv 21 | 22 | ret 23 | 24 | #if 0 25 | .globl C(unmaskexceptions) 26 | C(unmaskexceptions): 27 | fnstenv fpenv 28 | andl $0xFFFFFFE0,fpenv 29 | fldenv fpenv 30 | 31 | ret 32 | #endif 33 | 34 | .data 35 | 36 | .align 4 37 | .globl ceil_cw, single_cw, full_cw, cw, pushed_cw 38 | ceil_cw: .long 0 39 | single_cw: .long 0 40 | full_cw: .long 0 41 | cw: .long 0 42 | pushed_cw: .long 0 43 | 44 | .text 45 | 46 | .globl C(Sys_LowFPPrecision) 47 | C(Sys_LowFPPrecision): 48 | fldcw single_cw 49 | 50 | ret 51 | 52 | .globl C(Sys_HighFPPrecision) 53 | C(Sys_HighFPPrecision): 54 | fldcw full_cw 55 | 56 | ret 57 | 58 | .globl C(Sys_PushFPCW_SetHigh) 59 | C(Sys_PushFPCW_SetHigh): 60 | fnstcw pushed_cw 61 | fldcw full_cw 62 | 63 | ret 64 | 65 | .globl C(Sys_PopFPCW) 66 | C(Sys_PopFPCW): 67 | fldcw pushed_cw 68 | 69 | ret 70 | 71 | .globl C(Sys_SetFPCW) 72 | C(Sys_SetFPCW): 73 | fnstcw cw 74 | movl cw,%eax 75 | #if id386 76 | andb $0xF0,%ah 77 | orb $0x03,%ah // round mode, 64-bit precision 78 | #endif 79 | movl %eax,full_cw 80 | 81 | #if id386 82 | andb $0xF0,%ah 83 | orb $0x0C,%ah // chop mode, single precision 84 | #endif 85 | movl %eax,single_cw 86 | 87 | #if id386 88 | andb $0xF0,%ah 89 | orb $0x08,%ah // ceil mode, single precision 90 | #endif 91 | movl %eax,ceil_cw 92 | 93 | ret 94 | 95 | -------------------------------------------------------------------------------- /src/unix/ui.vpj: -------------------------------------------------------------------------------- 1 | [GLOBAL] 2 | workingdir=. 3 | version=6.0 4 | packname=GNU gcc or g++ 5 | MACRO=\n 6 | [CONFIGURATIONS] 7 | activeconfig=,Release 8 | config=,Release 9 | [COMPILER.Release] 10 | compile=copts: concur|capture|menu: Compile:&Compilecmd: make %n.ootheropts: 11 | make=copts: concur|capture|savemodified|menu: Build:&Buildcmd: consotheropts: 12 | rebuild=copts: concur|capture|menu: Rebuild:&Rebuildcmd: otheropts: 13 | debug=copts: |menu: Debug:&Debugcmd: xxgdb [exename-here]otheropts: 14 | execute=copts: |menu: Execute:E&xecutecmd: uiotheropts: 15 | includedirs=%(INCLUDE) 16 | reffile= 17 | [FILES] 18 | Conscript-ui 19 | Construct 20 | ../ui/keycodes.h 21 | ../ui/ui_atoms.c 22 | ../ui/ui_gameinfo.c 23 | ../ui/ui_local.h 24 | ../ui/ui_main.c 25 | ../ui/ui_players.c 26 | ../ui/ui_public.h 27 | ../ui/ui_shared.c 28 | ../ui/ui_shared.h 29 | ../ui/ui_syscalls.c 30 | ../ui/ui_util.c 31 | [ASSOCIATION] 32 | -------------------------------------------------------------------------------- /src/unix/unix_glw.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #if !( defined __linux__ || defined __FreeBSD__ ) 30 | #error You should include this file only on Linux/FreeBSD platforms 31 | #endif 32 | 33 | #ifndef __GLW_LINUX_H__ 34 | #define __GLW_LINUX_H__ 35 | 36 | typedef struct 37 | { 38 | void *OpenGLLib; // instance of OpenGL library 39 | 40 | FILE *log_fp; 41 | } glwstate_t; 42 | 43 | extern glwstate_t glw_state; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/unix/unix_main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/unix/unix_main.c -------------------------------------------------------------------------------- /src/unix/vm_x86.c: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | 30 | #include "../qcommon/vm_local.h" 31 | 32 | void VM_Compile( vm_t *vm, vmHeader_t *header ) {} 33 | int VM_CallCompiled( vm_t *vm, int *args ) {} 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/win32/background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/win32/background.bmp -------------------------------------------------------------------------------- /src/win32/clear.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/win32/clear.bmp -------------------------------------------------------------------------------- /src/win32/glw_win.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | #ifndef _WIN32 30 | # error You should not be including this file on this platform 31 | #endif 32 | 33 | #ifndef __GLW_WIN_H__ 34 | #define __GLW_WIN_H__ 35 | 36 | typedef struct 37 | { 38 | WNDPROC wndproc; 39 | 40 | HDC hDC; // handle to device context 41 | HGLRC hGLRC; // handle to GL rendering context 42 | 43 | HINSTANCE hinstOpenGL; // HINSTANCE for the OpenGL library 44 | 45 | qboolean allowdisplaydepthchange; 46 | qboolean pixelFormatSet; 47 | 48 | int desktopBitsPixel; 49 | int desktopWidth, desktopHeight; 50 | 51 | qboolean cdsFullscreen; 52 | 53 | FILE *log_fp; 54 | } glwstate_t; 55 | 56 | extern glwstate_t glw_state; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/win32/qe3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexameron/RTCW-SP-linux/cb5c90511352f8cfa058a6b05066e7350fa7c2a3/src/win32/qe3.ico -------------------------------------------------------------------------------- /src/win32/resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | =========================================================================== 3 | 4 | Return to Castle Wolfenstein single player GPL Source Code 5 | Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 | 7 | This file is part of the Return to Castle Wolfenstein single player GPL Source Code (“RTCW SP Source Code”). 8 | 9 | RTCW SP Source Code is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | RTCW SP Source Code is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with RTCW SP Source Code. If not, see . 21 | 22 | In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 | 24 | If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 | 26 | =========================================================================== 27 | */ 28 | 29 | //{{NO_DEPENDENCIES}} 30 | // Microsoft Developer Studio generated include file. 31 | // Used by winquake.rc 32 | // 33 | #define IDS_STRING1 1 34 | #define IDI_ICON1 1 35 | #define IDB_BITMAP1 1 36 | #define IDB_BITMAP2 128 37 | #define IDC_CURSOR1 129 38 | 39 | // Next default values for new objects 40 | // 41 | #ifdef APSTUDIO_INVOKED 42 | #ifndef APSTUDIO_READONLY_SYMBOLS 43 | #define _APS_NO_MFC 1 44 | #define _APS_NEXT_RESOURCE_VALUE 130 45 | #define _APS_NEXT_COMMAND_VALUE 40001 46 | #define _APS_NEXT_CONTROL_VALUE 1005 47 | #define _APS_NEXT_SYMED_VALUE 101 48 | #endif 49 | #endif 50 | -------------------------------------------------------------------------------- /src/win32/winquake.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "winres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (U.S.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | #ifdef _WIN32 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | #pragma code_page(1252) 22 | #endif //_WIN32 23 | 24 | #ifdef APSTUDIO_INVOKED 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // 27 | // TEXTINCLUDE 28 | // 29 | 30 | 1 TEXTINCLUDE DISCARDABLE 31 | BEGIN 32 | "resource.h\0" 33 | END 34 | 35 | 2 TEXTINCLUDE DISCARDABLE 36 | BEGIN 37 | "#include ""winres.h""\r\n" 38 | "\0" 39 | END 40 | 41 | 3 TEXTINCLUDE DISCARDABLE 42 | BEGIN 43 | "\0" 44 | END 45 | 46 | #endif // APSTUDIO_INVOKED 47 | 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | // 51 | // Icon 52 | // 53 | 54 | // Icon with lowest ID value placed first to ensure application icon 55 | // remains consistent on all systems. 56 | IDI_ICON1 ICON DISCARDABLE "qe3.ico" 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Bitmap 61 | // 62 | 63 | IDB_BITMAP1 BITMAP DISCARDABLE "background.bmp" 64 | IDB_BITMAP2 BITMAP DISCARDABLE "clear.bmp" 65 | 66 | ///////////////////////////////////////////////////////////////////////////// 67 | // 68 | // String Table 69 | // 70 | 71 | STRINGTABLE DISCARDABLE 72 | BEGIN 73 | IDS_STRING1 "Wolfenstein" 74 | END 75 | 76 | #endif // English (U.S.) resources 77 | ///////////////////////////////////////////////////////////////////////////// 78 | 79 | 80 | --------------------------------------------------------------------------------