├── common ├── beamdef.h ├── cl_entity.h ├── com_model.h ├── con_nprint.h ├── const.h ├── crc.h ├── cvardef.h ├── demo_api.h ├── director_cmds.h ├── dlight.h ├── dll_state.h ├── engine_launcher_api.h ├── entity_state.h ├── entity_types.h ├── event_api.h ├── event_args.h ├── event_flags.h ├── exefuncs.h ├── hltv.h ├── in_buttons.h ├── interface.cpp ├── interface.h ├── ivoicetweak.h ├── mathlib.h ├── net_api.h ├── netadr.h ├── nowin.h ├── particledef.h ├── pmtrace.h ├── qfont.h ├── r_efx.h ├── r_studioint.h ├── ref_params.h ├── screenfade.h ├── studio_event.h ├── triangleapi.h ├── usercmd.h └── weaponinfo.h ├── dlls ├── MemPool.cpp ├── MemPool.h ├── activity.h ├── activitymap.h ├── airtank.cpp ├── ammo.cpp ├── animating.cpp ├── animation.cpp ├── animation.h ├── basemonster.h ├── bmodels.cpp ├── buttons.cpp ├── cbase.cpp ├── cbase.h ├── cdll_dll.h ├── client.cpp ├── client.h ├── combat.cpp ├── decals.h ├── doors.cpp ├── doors.h ├── effects.cpp ├── effects.h ├── enginecallback.h ├── explode.cpp ├── explode.h ├── extdll.h ├── func_break.cpp ├── func_break.h ├── func_tank.cpp ├── game.cpp ├── game.h ├── gamerules.cpp ├── gamerules.h ├── ggrenade.cpp ├── globals.cpp ├── h_ai.cpp ├── h_battery.cpp ├── h_cycler.cpp ├── h_export.cpp ├── healthkit.cpp ├── hintmessage.cpp ├── hintmessage.h ├── hostage.cpp ├── hostage.h ├── hostage_localnav.cpp ├── items.cpp ├── items.h ├── lights.cpp ├── mapinfo.cpp ├── mapinfo.h ├── maprules.cpp ├── maprules.h ├── monsterevent.h ├── monsters.h ├── mortar.cpp ├── mp.def ├── mp.dsp ├── mp.dsw ├── mp.sln ├── mp.vcproj ├── mpstubb.cpp ├── multiplay_gamerules.cpp ├── nodes.h ├── observer.cpp ├── pathcorner.cpp ├── perf_counter.cpp ├── perf_counter.h ├── plane.cpp ├── plane.h ├── plats.cpp ├── player.cpp ├── player.h ├── saverestore.h ├── schedule.h ├── scriptevent.h ├── singleplay_gamerules.cpp ├── skill.cpp ├── skill.h ├── sound.cpp ├── soundent.cpp ├── soundent.h ├── spectator.cpp ├── spectator.h ├── subs.cpp ├── talkmonster.h ├── training_gamerules.cpp ├── training_gamerules.h ├── trains.h ├── triggers.cpp ├── util.cpp ├── util.h ├── vector.h ├── vehicle.cpp ├── vehicle.h ├── weapons.cpp ├── weapons.h ├── world.cpp ├── wpn_ak47.cpp ├── wpn_aug.cpp ├── wpn_awp.cpp ├── wpn_c4.cpp ├── wpn_deagle.cpp ├── wpn_elite.cpp ├── wpn_famas.cpp ├── wpn_fiveseven.cpp ├── wpn_flashbang.cpp ├── wpn_g3sg1.cpp ├── wpn_galil.cpp ├── wpn_glock18.cpp ├── wpn_hegrenade.cpp ├── wpn_knife.cpp ├── wpn_m249.cpp ├── wpn_m3.cpp ├── wpn_m4a1.cpp ├── wpn_mac10.cpp ├── wpn_mp5navy.cpp ├── wpn_p228.cpp ├── wpn_p90.cpp ├── wpn_scout.cpp ├── wpn_sg550.cpp ├── wpn_sg552.cpp ├── wpn_smokegrenade.cpp ├── wpn_tmp.cpp ├── wpn_ump45.cpp ├── wpn_usp.cpp └── wpn_xm1014.cpp ├── engine ├── Sequence.h ├── anorms.h ├── archtypes.h ├── cdll_int.h ├── custom.h ├── customentity.h ├── edict.h ├── eiface.h ├── keydefs.h ├── progdefs.h ├── progs.h ├── shake.h └── studio.h ├── game_shared ├── bitvec.h ├── vgui_checkbutton2.cpp ├── vgui_checkbutton2.h ├── vgui_defaultinputsignal.h ├── vgui_grid.cpp ├── vgui_grid.h ├── vgui_helpers.cpp ├── vgui_helpers.h ├── vgui_listbox.cpp ├── vgui_listbox.h ├── vgui_loadtga.cpp ├── vgui_loadtga.h ├── vgui_scrollbar2.cpp ├── vgui_scrollbar2.h ├── vgui_slider2.cpp ├── vgui_slider2.h ├── voice_banmgr.cpp ├── voice_banmgr.h ├── voice_common.h ├── voice_gamemgr.cpp ├── voice_gamemgr.h ├── voice_status.cpp ├── voice_status.h ├── voice_vgui_tweakdlg.cpp └── voice_vgui_tweakdlg.h ├── pm_shared ├── pm_debug.c ├── pm_debug.h ├── pm_defs.h ├── pm_info.h ├── pm_materials.h ├── pm_math.c ├── pm_movevars.h ├── pm_shared.c └── pm_shared.h ├── public └── tier1 │ ├── UtlMemory.h │ └── UtlVector.h └── utils ├── bspinfo ├── bspinfo.c ├── msvc6 │ ├── bspinfo.dsp │ └── bspinfo.dsw ├── msvc7 │ └── bspinfo.vcproj └── msvc8 │ └── bspinfo.vcproj ├── common ├── bspfile.c ├── bspfile.h ├── cmdlib.c ├── cmdlib.h ├── lbmlib.c ├── lbmlib.h ├── mathlib.c ├── mathlib.h ├── movie.h ├── polylib.c ├── polylib.h ├── scriplib.c ├── scriplib.h ├── threads.c ├── threads.h ├── trilib.c ├── trilib.h ├── wadlib.c └── wadlib.h ├── light ├── light.c ├── light.h ├── ltface.c ├── msvc6 │ └── light.dsp ├── msvc7 │ └── light.vcproj ├── msvc8 │ └── light.vcproj └── trace.c ├── makefont ├── makefont.cpp ├── msvc6 │ ├── makefont.dsp │ └── makefont.dsw ├── msvc7 │ └── makefont.vcproj └── msvc8 │ └── makefont.vcproj ├── makels ├── makels.cpp ├── makels.mak ├── msvc6 │ ├── makels.dsp │ └── makels.dsw ├── msvc7 │ └── makels.vcproj └── msvc8 │ └── makels.vcproj ├── mdlviewer ├── mdlviewer.cpp ├── mdlviewer.h ├── msvc6 │ ├── mdlviewer.dsp │ └── mdlviewer.dsw ├── msvc7 │ └── mdlviewer.vcproj ├── msvc8 │ └── mdlviewer.vcproj ├── studio_render.cpp └── studio_utils.cpp ├── mkmovie └── mkmovie.c ├── procinfo ├── lib │ └── win32_vc6 │ │ └── procinfo.lib └── procinfo.h ├── qbsp2 ├── bsp5.h ├── cull.c ├── gldraw.c ├── merge.c ├── msvc6 │ ├── qbsp2.dsp │ └── qbsp2.dsw ├── msvc7 │ └── qbsp2.vcproj ├── msvc8 │ └── qbsp2.vcproj ├── nodraw.c ├── outside.c ├── portals.c ├── qbsp.c ├── solidbsp.c ├── surfaces.c ├── tjunc.c └── writebsp.c ├── qcsg ├── brush.c ├── csg.h ├── gldraw.c ├── hullfile.c ├── hulls.txt ├── map.c ├── msvc6 │ ├── qcsg.dsp │ └── qcsg.dsw ├── msvc7 │ └── qcsg.vcproj ├── msvc8 │ └── qcsg.vcproj ├── qcsg.c └── textures.c ├── qlumpy ├── msvc6 │ ├── qlumpy.dsp │ └── qlumpy.dsw ├── msvc7 │ └── qlumpy.vcproj ├── msvc8 │ └── qlumpy.vcproj ├── qlumpy.c ├── qlumpy.h └── quakegrb.c ├── qrad ├── lightmap.c ├── msvc6 │ ├── qrad.dsp │ └── qrad.dsw ├── msvc7 │ └── qrad.vcproj ├── msvc8 │ └── qrad.vcproj ├── qrad.c ├── qrad.h ├── trace.c └── vismat.c ├── serverctrl ├── ServerCtrl.cpp ├── ServerCtrl.h ├── ServerCtrl.rc ├── ServerCtrlDlg.cpp ├── ServerCtrlDlg.h ├── StdAfx.cpp ├── StdAfx.h ├── msvc6 │ └── serverctrl.dsp ├── msvc7 │ └── serverctrl.vcproj ├── msvc8 │ └── serverctrl.vcproj ├── res │ ├── serverctrl.ico │ └── serverctrl.rc2 └── resource.h ├── smdlexp ├── smdlexp.cpp ├── smdlexp.def ├── smdlexp.dsp ├── smdlexp.dsw ├── smdlexp.rc ├── smedefs.h └── smexprc.h ├── sprgen ├── msvc6 │ ├── sprgen.dsp │ └── sprgen.dsw ├── msvc7 │ └── sprgen.vcproj ├── msvc8 │ └── sprgen.vcproj ├── sprgen.c └── spritegn.h ├── studiomdl ├── bmpread.c ├── msvc6 │ ├── studiomdl.dsp │ └── studiomdl.dsw ├── msvc7 │ └── studiomdl.vcproj ├── msvc8 │ └── studiomdl.vcproj ├── studiomdl.c ├── studiomdl.h ├── tristrip.c └── write.c ├── vgui ├── include │ ├── VGUI.h │ ├── VGUI_ActionSignal.h │ ├── VGUI_App.h │ ├── VGUI_Bitmap.h │ ├── VGUI_BitmapTGA.h │ ├── VGUI_Border.h │ ├── VGUI_BorderLayout.h │ ├── VGUI_BorderPair.h │ ├── VGUI_BuildGroup.h │ ├── VGUI_Button.h │ ├── VGUI_ButtonController.h │ ├── VGUI_ButtonGroup.h │ ├── VGUI_ChangeSignal.h │ ├── VGUI_CheckButton.h │ ├── VGUI_Color.h │ ├── VGUI_ComboKey.h │ ├── VGUI_ConfigWizard.h │ ├── VGUI_Cursor.h │ ├── VGUI_Dar.h │ ├── VGUI_DataInputStream.h │ ├── VGUI_Desktop.h │ ├── VGUI_DesktopIcon.h │ ├── VGUI_EditPanel.h │ ├── VGUI_EtchedBorder.h │ ├── VGUI_FileInputStream.h │ ├── VGUI_FlowLayout.h │ ├── VGUI_FocusChangeSignal.h │ ├── VGUI_FocusNavGroup.h │ ├── VGUI_Font.h │ ├── VGUI_Frame.h │ ├── VGUI_FrameSignal.h │ ├── VGUI_GridLayout.h │ ├── VGUI_HeaderPanel.h │ ├── VGUI_Image.h │ ├── VGUI_ImagePanel.h │ ├── VGUI_InputSignal.h │ ├── VGUI_InputStream.h │ ├── VGUI_IntChangeSignal.h │ ├── VGUI_IntLabel.h │ ├── VGUI_KeyCode.h │ ├── VGUI_Label.h │ ├── VGUI_Layout.h │ ├── VGUI_LayoutInfo.h │ ├── VGUI_LineBorder.h │ ├── VGUI_ListPanel.h │ ├── VGUI_LoweredBorder.h │ ├── VGUI_Menu.h │ ├── VGUI_MenuItem.h │ ├── VGUI_MenuSeparator.h │ ├── VGUI_MessageBox.h │ ├── VGUI_MiniApp.h │ ├── VGUI_MouseCode.h │ ├── VGUI_Panel.h │ ├── VGUI_PopupMenu.h │ ├── VGUI_ProgressBar.h │ ├── VGUI_RadioButton.h │ ├── VGUI_RaisedBorder.h │ ├── VGUI_RepaintSignal.h │ ├── VGUI_Scheme.h │ ├── VGUI_ScrollBar.h │ ├── VGUI_ScrollPanel.h │ ├── VGUI_Slider.h │ ├── VGUI_StackLayout.h │ ├── VGUI_String.h │ ├── VGUI_Surface.h │ ├── VGUI_SurfaceBase.h │ ├── VGUI_SurfaceGL.h │ ├── VGUI_TabPanel.h │ ├── VGUI_TablePanel.h │ ├── VGUI_TaskBar.h │ ├── VGUI_TextEntry.h │ ├── VGUI_TextGrid.h │ ├── VGUI_TextImage.h │ ├── VGUI_TextPanel.h │ ├── VGUI_TickSignal.h │ ├── VGUI_ToggleButton.h │ ├── VGUI_TreeFolder.h │ └── VGUI_WizardPanel.h └── lib │ └── win32_vc6 │ └── vgui.lib ├── visx2 ├── flow.c ├── msvc6 │ ├── vis.dsp │ └── vis.dsw ├── msvc7 │ └── vis.vcproj ├── msvc8 │ └── vis.vcproj ├── soundpvs.c ├── vis.c └── vis.h └── xwad └── xwad.c /common/beamdef.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( BEAMDEFH ) 16 | #define BEAMDEFH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | #define FBEAM_STARTENTITY 0x00000001 24 | #define FBEAM_ENDENTITY 0x00000002 25 | #define FBEAM_FADEIN 0x00000004 26 | #define FBEAM_FADEOUT 0x00000008 27 | #define FBEAM_SINENOISE 0x00000010 28 | #define FBEAM_SOLID 0x00000020 29 | #define FBEAM_SHADEIN 0x00000040 30 | #define FBEAM_SHADEOUT 0x00000080 31 | #define FBEAM_STARTVISIBLE 0x10000000 // Has this client actually seen this beam's start entity yet? 32 | #define FBEAM_ENDVISIBLE 0x20000000 // Has this client actually seen this beam's end entity yet? 33 | #define FBEAM_ISACTIVE 0x40000000 34 | #define FBEAM_FOREVER 0x80000000 35 | 36 | typedef struct beam_s BEAM; 37 | struct beam_s 38 | { 39 | BEAM *next; 40 | int type; 41 | int flags; 42 | vec3_t source; 43 | vec3_t target; 44 | vec3_t delta; 45 | float t; // 0 .. 1 over lifetime of beam 46 | float freq; 47 | float die; 48 | float width; 49 | float amplitude; 50 | float r, g, b; 51 | float brightness; 52 | float speed; 53 | float frameRate; 54 | float frame; 55 | int segments; 56 | int startEntity; 57 | int endEntity; 58 | int modelIndex; 59 | int frameCount; 60 | struct model_s *pFollowModel; 61 | struct particle_s *particles; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /common/com_model.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/com_model.h -------------------------------------------------------------------------------- /common/con_nprint.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( CON_NPRINTH ) 16 | #define CON_NPRINTH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef struct con_nprint_s 24 | { 25 | int index; // Row # 26 | float time_to_live; // # of seconds before it dissappears 27 | float color[ 3 ]; // RGB colors ( 0.0 -> 1.0 scale ) 28 | } con_nprint_t; 29 | 30 | void Con_NPrintf( int idx, char *fmt, ... ); 31 | void Con_NXPrintf( struct con_nprint_s *info, char *fmt, ... ); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /common/crc.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | /* crc.h */ 16 | #ifndef CRC_H 17 | #define CRC_H 18 | #ifdef _WIN32 19 | #ifndef __MINGW32__ 20 | #pragma once 21 | #endif /* not __MINGW32__ */ 22 | #endif 23 | 24 | // MD5 Hash 25 | typedef struct 26 | { 27 | unsigned int buf[4]; 28 | unsigned int bits[2]; 29 | unsigned char in[64]; 30 | } MD5Context_t; 31 | 32 | 33 | typedef unsigned long CRC32_t; 34 | void CRC32_Init(CRC32_t *pulCRC); 35 | CRC32_t CRC32_Final(CRC32_t pulCRC); 36 | void CRC32_ProcessBuffer(CRC32_t *pulCRC, void *p, int len); 37 | void CRC32_ProcessByte(CRC32_t *pulCRC, unsigned char ch); 38 | int CRC_File(CRC32_t *crcvalue, char *pszFileName); 39 | 40 | unsigned char COM_BlockSequenceCRCByte (unsigned char *base, int length, int sequence); 41 | 42 | void MD5Init(MD5Context_t *context); 43 | void MD5Update(MD5Context_t *context, unsigned char const *buf, 44 | unsigned int len); 45 | void MD5Final(unsigned char digest[16], MD5Context_t *context); 46 | void Transform(unsigned int buf[4], unsigned int const in[16]); 47 | 48 | int MD5_Hash_File(unsigned char digest[16], char *pszFileName, int bUsefopen, int bSeed, unsigned int seed[4]); 49 | char *MD5_Print(unsigned char hash[16]); 50 | int MD5_Hash_CachedFile(unsigned char digest[16], unsigned char *pCache, int nFileSize, int bSeed, unsigned int seed[4]); 51 | 52 | int CRC_MapFile(CRC32_t *crcvalue, char *pszFileName); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /common/cvardef.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef CVARDEF_H 16 | #define CVARDEF_H 17 | 18 | #define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc 19 | #define FCVAR_USERINFO (1<<1) // changes the client's info string 20 | #define FCVAR_SERVER (1<<2) // notifies players when changed 21 | #define FCVAR_EXTDLL (1<<3) // defined by external DLL 22 | #define FCVAR_CLIENTDLL (1<<4) // defined by the client dll 23 | #define FCVAR_PROTECTED (1<<5) // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value 24 | #define FCVAR_SPONLY (1<<6) // This cvar cannot be changed by clients connected to a multiplayer server. 25 | #define FCVAR_PRINTABLEONLY (1<<7) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ). 26 | #define FCVAR_UNLOGGED (1<<8) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log 27 | 28 | typedef struct cvar_s 29 | { 30 | char *name; 31 | char *string; 32 | int flags; 33 | float value; 34 | struct cvar_s *next; 35 | } cvar_t; 36 | #endif 37 | -------------------------------------------------------------------------------- /common/demo_api.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( DEMO_APIH ) 16 | #define DEMO_APIH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef struct demo_api_s 24 | { 25 | int ( *IsRecording ) ( void ); 26 | int ( *IsPlayingback ) ( void ); 27 | int ( *IsTimeDemo ) ( void ); 28 | void ( *WriteBuffer ) ( int size, unsigned char *buffer ); 29 | } demo_api_t; 30 | 31 | extern demo_api_t demoapi; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /common/director_cmds.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/director_cmds.h -------------------------------------------------------------------------------- /common/dlight.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( DLIGHTH ) 16 | #define DLIGHTH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef struct dlight_s 24 | { 25 | vec3_t origin; 26 | float radius; 27 | color24 color; 28 | float die; // stop lighting after this time 29 | float decay; // drop this each second 30 | float minlight; // don't add when contributing less 31 | int key; 32 | qboolean dark; // subtracts light instead of adding 33 | } dlight_t; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /common/dll_state.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/dll_state.h -------------------------------------------------------------------------------- /common/engine_launcher_api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/engine_launcher_api.h -------------------------------------------------------------------------------- /common/entity_types.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | // entity_types.h 16 | #if !defined( ENTITY_TYPESH ) 17 | #define ENTITY_TYPESH 18 | 19 | #define ET_NORMAL 0 20 | #define ET_PLAYER 1 21 | #define ET_TEMPENTITY 2 22 | #define ET_BEAM 3 23 | // BMODEL or SPRITE that was split across BSP nodes 24 | #define ET_FRAGMENTED 4 25 | 26 | #endif // !ENTITY_TYPESH 27 | -------------------------------------------------------------------------------- /common/event_api.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( EVENT_APIH ) 16 | #define EVENT_APIH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | #define EVENT_API_VERSION 1 24 | 25 | typedef struct event_api_s 26 | { 27 | int version; 28 | void ( *EV_PlaySound ) ( int ent, float *origin, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch ); 29 | void ( *EV_StopSound ) ( int ent, int channel, const char *sample ); 30 | int ( *EV_FindModelIndex )( const char *pmodel ); 31 | int ( *EV_IsLocal ) ( int playernum ); 32 | int ( *EV_LocalPlayerDucking ) ( void ); 33 | void ( *EV_LocalPlayerViewheight ) ( float * ); 34 | void ( *EV_LocalPlayerBounds ) ( int hull, float *mins, float *maxs ); 35 | int ( *EV_IndexFromTrace) ( struct pmtrace_s *pTrace ); 36 | struct physent_s *( *EV_GetPhysent ) ( int idx ); 37 | void ( *EV_SetUpPlayerPrediction ) ( int dopred, int bIncludeLocalClient ); 38 | void ( *EV_PushPMStates ) ( void ); 39 | void ( *EV_PopPMStates ) ( void ); 40 | void ( *EV_SetSolidPlayers ) (int playernum); 41 | void ( *EV_SetTraceHull ) ( int hull ); 42 | void ( *EV_PlayerTrace ) ( float *start, float *end, int traceFlags, int ignore_pe, struct pmtrace_s *tr ); 43 | void ( *EV_WeaponAnimation ) ( int sequence, int body ); 44 | unsigned short ( *EV_PrecacheEvent ) ( int type, const char* psz ); 45 | void ( *EV_PlaybackEvent ) ( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ); 46 | const char *( *EV_TraceTexture ) ( int ground, float *vstart, float *vend ); 47 | void ( *EV_StopAllSounds ) ( int entnum, int entchannel ); 48 | void ( *EV_KillEvents ) ( int entnum, const char *eventname ); 49 | } event_api_t; 50 | 51 | extern event_api_t eventapi; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /common/event_args.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( EVENT_ARGSH ) 16 | #define EVENT_ARGSH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | // Event was invoked with stated origin 24 | #define FEVENT_ORIGIN ( 1<<0 ) 25 | 26 | // Event was invoked with stated angles 27 | #define FEVENT_ANGLES ( 1<<1 ) 28 | 29 | typedef struct event_args_s 30 | { 31 | int flags; 32 | 33 | // Transmitted 34 | int entindex; 35 | 36 | float origin[3]; 37 | float angles[3]; 38 | float velocity[3]; 39 | 40 | int ducking; 41 | 42 | float fparam1; 43 | float fparam2; 44 | 45 | int iparam1; 46 | int iparam2; 47 | 48 | int bparam1; 49 | int bparam2; 50 | } event_args_t; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /common/event_flags.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( EVENT_FLAGSH ) 16 | #define EVENT_FLAGSH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | // Skip local host for event send. 24 | #define FEV_NOTHOST (1<<0) 25 | 26 | // Send the event reliably. You must specify the origin and angles and use 27 | // PLAYBACK_EVENT_FULL for this to work correctly on the server for anything 28 | // that depends on the event origin/angles. I.e., the origin/angles are not 29 | // taken from the invoking edict for reliable events. 30 | #define FEV_RELIABLE (1<<1) 31 | 32 | // Don't restrict to PAS/PVS, send this event to _everybody_ on the server ( useful for stopping CHAN_STATIC 33 | // sounds started by client event when client is not in PVS anymore ( hwguy in TFC e.g. ). 34 | #define FEV_GLOBAL (1<<2) 35 | 36 | // If this client already has one of these events in its queue, just update the event instead of sending it as a duplicate 37 | // 38 | #define FEV_UPDATE (1<<3) 39 | 40 | // Only send to entity specified as the invoker 41 | #define FEV_HOSTONLY (1<<4) 42 | 43 | // Only send if the event was created on the server. 44 | #define FEV_SERVER (1<<5) 45 | 46 | // Only issue event client side ( from shared code ) 47 | #define FEV_CLIENT (1<<6) 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /common/exefuncs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/exefuncs.h -------------------------------------------------------------------------------- /common/hltv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/hltv.h -------------------------------------------------------------------------------- /common/in_buttons.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef IN_BUTTONS_H 16 | #define IN_BUTTONS_H 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | #define IN_ATTACK (1 << 0) 24 | #define IN_JUMP (1 << 1) 25 | #define IN_DUCK (1 << 2) 26 | #define IN_FORWARD (1 << 3) 27 | #define IN_BACK (1 << 4) 28 | #define IN_USE (1 << 5) 29 | #define IN_CANCEL (1 << 6) 30 | #define IN_LEFT (1 << 7) 31 | #define IN_RIGHT (1 << 8) 32 | #define IN_MOVELEFT (1 << 9) 33 | #define IN_MOVERIGHT (1 << 10) 34 | #define IN_ATTACK2 (1 << 11) 35 | #define IN_RUN (1 << 12) 36 | #define IN_RELOAD (1 << 13) 37 | #define IN_ALT1 (1 << 14) 38 | #define IN_SCORE (1 << 15) // Used by client.dll for when scoreboard is held down 39 | 40 | #endif // IN_BUTTONS_H 41 | -------------------------------------------------------------------------------- /common/interface.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/interface.h -------------------------------------------------------------------------------- /common/ivoicetweak.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/ivoicetweak.h -------------------------------------------------------------------------------- /common/net_api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/net_api.h -------------------------------------------------------------------------------- /common/netadr.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | // netadr.h 16 | #ifndef NETADR_H 17 | #define NETADR_H 18 | #ifdef _WIN32 19 | #ifndef __MINGW32__ 20 | #pragma once 21 | #endif /* not __MINGW32__ */ 22 | #endif 23 | 24 | typedef enum 25 | { 26 | NA_UNUSED, 27 | NA_LOOPBACK, 28 | NA_BROADCAST, 29 | NA_IP, 30 | NA_IPX, 31 | NA_BROADCAST_IPX, 32 | } netadrtype_t; 33 | 34 | typedef struct netadr_s 35 | { 36 | netadrtype_t type; 37 | unsigned char ip[4]; 38 | unsigned char ipx[10]; 39 | unsigned short port; 40 | } netadr_t; 41 | 42 | #endif // NETADR_H 43 | -------------------------------------------------------------------------------- /common/nowin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/nowin.h -------------------------------------------------------------------------------- /common/particledef.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( PARTICLEDEFH ) 16 | #define PARTICLEDEFH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef enum { 24 | pt_static, 25 | pt_grav, 26 | pt_slowgrav, 27 | pt_fire, 28 | pt_explode, 29 | pt_explode2, 30 | pt_blob, 31 | pt_blob2, 32 | pt_vox_slowgrav, 33 | pt_vox_grav, 34 | pt_clientcustom // Must have callback function specified 35 | } ptype_t; 36 | 37 | // !!! if this is changed, it must be changed in d_ifacea.h too !!! 38 | typedef struct particle_s 39 | { 40 | // driver-usable fields 41 | vec3_t org; 42 | short color; 43 | short packedColor; 44 | // drivers never touch the following fields 45 | struct particle_s *next; 46 | vec3_t vel; 47 | float ramp; 48 | float die; 49 | ptype_t type; 50 | void (*deathfunc)( struct particle_s *particle ); 51 | 52 | // for pt_clientcusttom, we'll call this function each frame 53 | void (*callback)( struct particle_s *particle, float frametime ); 54 | 55 | // For deathfunc, etc. 56 | unsigned char context; 57 | } particle_t; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /common/pmtrace.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( PMTRACEH ) 16 | #define PMTRACEH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef struct 24 | { 25 | vec3_t normal; 26 | float dist; 27 | } pmplane_t; 28 | 29 | typedef struct pmtrace_s pmtrace_t; 30 | 31 | struct pmtrace_s 32 | { 33 | qboolean allsolid; // if true, plane is not valid 34 | qboolean startsolid; // if true, the initial point was in a solid area 35 | qboolean inopen, inwater; // End point is in empty space or in water 36 | float fraction; // time completed, 1.0 = didn't hit anything 37 | vec3_t endpos; // final position 38 | pmplane_t plane; // surface normal at impact 39 | int ent; // entity at impact 40 | vec3_t deltavelocity; // Change in player's velocity caused by impact. 41 | // Only run on server. 42 | int hitgroup; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /common/qfont.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( QFONTH ) 16 | #define QFONTH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | // Font stuff 24 | 25 | #define NUM_GLYPHS 256 26 | 27 | typedef struct 28 | { 29 | short startoffset; 30 | short charwidth; 31 | } charinfo; 32 | 33 | typedef struct qfont_s 34 | { 35 | int width, height; 36 | int rowcount; 37 | int rowheight; 38 | charinfo fontinfo[ NUM_GLYPHS ]; 39 | byte data[4]; 40 | } qfont_t; 41 | 42 | #endif // qfont.h 43 | -------------------------------------------------------------------------------- /common/r_studioint.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/r_studioint.h -------------------------------------------------------------------------------- /common/ref_params.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( REF_PARAMSH ) 16 | #define REF_PARAMSH 17 | 18 | typedef struct ref_params_s 19 | { 20 | // Output 21 | float vieworg[3]; 22 | float viewangles[3]; 23 | 24 | float forward[3]; 25 | float right[3]; 26 | float up[3]; 27 | 28 | // Client frametime; 29 | float frametime; 30 | // Client time 31 | float time; 32 | 33 | // Misc 34 | int intermission; 35 | int paused; 36 | int spectator; 37 | int onground; 38 | int waterlevel; 39 | 40 | float simvel[3]; 41 | float simorg[3]; 42 | 43 | float viewheight[3]; 44 | float idealpitch; 45 | 46 | float cl_viewangles[3]; 47 | 48 | int health; 49 | float crosshairangle[3]; 50 | float viewsize; 51 | 52 | float punchangle[3]; 53 | int maxclients; 54 | int viewentity; 55 | int playernum; 56 | int max_entities; 57 | int demoplayback; 58 | int hardware; 59 | 60 | int smoothing; 61 | 62 | // Last issued usercmd 63 | struct usercmd_s *cmd; 64 | 65 | // Movevars 66 | struct movevars_s *movevars; 67 | 68 | int viewport[4]; // the viewport coordinates x ,y , width, height 69 | 70 | int nextView; // the renderer calls ClientDLL_CalcRefdef() and Renderview 71 | // so long in cycles until this value is 0 (multiple views) 72 | int onlyClientDraw; // if !=0 nothing is drawn by the engine except clientDraw functions 73 | } ref_params_t; 74 | 75 | #endif // !REF_PARAMSH 76 | -------------------------------------------------------------------------------- /common/screenfade.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/common/screenfade.h -------------------------------------------------------------------------------- /common/studio_event.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( STUDIO_EVENTH ) 16 | #define STUDIO_EVENTH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef struct mstudioevent_s 24 | { 25 | int frame; 26 | int event; 27 | int type; 28 | char options[64]; 29 | } mstudioevent_t; 30 | 31 | #endif // STUDIO_EVENTH 32 | -------------------------------------------------------------------------------- /common/triangleapi.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( TRIANGLEAPIH ) 16 | #define TRIANGLEAPIH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef enum 24 | { 25 | TRI_FRONT = 0, 26 | TRI_NONE = 1, 27 | } TRICULLSTYLE; 28 | 29 | #define TRI_API_VERSION 1 30 | 31 | #define TRI_TRIANGLES 0 32 | #define TRI_TRIANGLE_FAN 1 33 | #define TRI_QUADS 2 34 | #define TRI_POLYGON 3 35 | #define TRI_LINES 4 36 | #define TRI_TRIANGLE_STRIP 5 37 | #define TRI_QUAD_STRIP 6 38 | 39 | typedef struct triangleapi_s 40 | { 41 | int version; 42 | 43 | void ( *RenderMode )( int mode ); 44 | void ( *Begin )( int primitiveCode ); 45 | void ( *End ) ( void ); 46 | 47 | void ( *Color4f ) ( float r, float g, float b, float a ); 48 | void ( *Color4ub ) ( unsigned char r, unsigned char g, unsigned char b, unsigned char a ); 49 | void ( *TexCoord2f ) ( float u, float v ); 50 | void ( *Vertex3fv ) ( float *worldPnt ); 51 | void ( *Vertex3f ) ( float x, float y, float z ); 52 | void ( *Brightness ) ( float brightness ); 53 | void ( *CullFace ) ( TRICULLSTYLE style ); 54 | int ( *SpriteTexture ) ( struct model_s *pSpriteModel, int frame ); 55 | int ( *WorldToScreen ) ( float *world, float *screen ); // Returns 1 if it's z clipped 56 | void ( *Fog ) ( float flFogColor[3], float flStart, float flEnd, int bOn ); //Works just like GL_FOG, flFogColor is r/g/b. 57 | void ( *ScreenToWorld ) ( float *screen, float *world ); 58 | 59 | } triangleapi_t; 60 | 61 | #endif // !TRIANGLEAPIH 62 | -------------------------------------------------------------------------------- /common/usercmd.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef USERCMD_H 16 | #define USERCMD_H 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | typedef struct usercmd_s 24 | { 25 | short lerp_msec; // Interpolation time on client 26 | byte msec; // Duration in ms of command 27 | vec3_t viewangles; // Command view angles. 28 | 29 | // intended velocities 30 | float forwardmove; // Forward velocity. 31 | float sidemove; // Sideways velocity. 32 | float upmove; // Upward velocity. 33 | byte lightlevel; // Light level at spot where we are standing. 34 | unsigned short buttons; // Attack buttons 35 | byte impulse; // Impulse command issued. 36 | byte weaponselect; // Current weapon id 37 | 38 | // Experimental player impact stuff. 39 | int impact_index; 40 | vec3_t impact_position; 41 | } usercmd_t; 42 | 43 | #endif // USERCMD_H 44 | -------------------------------------------------------------------------------- /common/weaponinfo.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( WEAPONINFOH ) 16 | #define WEAPONINFOH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | // Info about weapons player might have in his/her possession 24 | typedef struct weapon_data_s 25 | { 26 | int m_iId; 27 | int m_iClip; 28 | 29 | float m_flNextPrimaryAttack; 30 | float m_flNextSecondaryAttack; 31 | float m_flTimeWeaponIdle; 32 | 33 | int m_fInReload; 34 | int m_fInSpecialReload; 35 | float m_flNextReload; 36 | float m_flPumpTime; 37 | float m_fReloadTime; 38 | 39 | float m_fAimedDamage; 40 | float m_fNextAimBonus; 41 | int m_fInZoom; 42 | int m_iWeaponState; 43 | 44 | int iuser1; 45 | int iuser2; 46 | int iuser3; 47 | int iuser4; 48 | float fuser1; 49 | float fuser2; 50 | float fuser3; 51 | float fuser4; 52 | } weapon_data_t; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /dlls/MemPool.cpp: -------------------------------------------------------------------------------- 1 | //===== Copyright ?1996-2005, Valve Corporation, All rights reserved. ======// 2 | // 3 | // Purpose: 4 | // 5 | //===========================================================================// 6 | 7 | #include 8 | #include 9 | #include "MemPool.h" 10 | 11 | CMemoryPool::CMemoryPool(int blockSize, int numElements) 12 | { 13 | _blocksPerBlob = numElements; 14 | _blockSize = blockSize; 15 | _numBlobs = 0; 16 | _numElements = 0; 17 | 18 | AddNewBlob(); 19 | 20 | _peakAlloc = 0; 21 | _blocksAllocated = 0; 22 | } 23 | 24 | CMemoryPool::~CMemoryPool(void) 25 | { 26 | for (int i = 0; i < _numBlobs; i++) 27 | free(_memBlob[i]); 28 | } 29 | 30 | void *CMemoryPool::Alloc(unsigned int amount) 31 | { 32 | void *returnBlock; 33 | 34 | if (amount > (unsigned int)_blockSize) 35 | return NULL; 36 | 37 | _blocksAllocated++; 38 | _peakAlloc = max(_peakAlloc, _blocksAllocated); 39 | 40 | if (_blocksAllocated >= _numElements) 41 | AddNewBlob(); 42 | 43 | if (!_headOfFreeList) 44 | DebugBreak(); 45 | 46 | returnBlock = _headOfFreeList; 47 | _headOfFreeList = *((void **)_headOfFreeList); 48 | 49 | return returnBlock; 50 | } 51 | 52 | void CMemoryPool::Free(void *memblock) 53 | { 54 | if (!memblock) 55 | return; 56 | 57 | #ifdef _DEBUG 58 | memset(memblock, 0xDD, _blockSize); 59 | #endif 60 | _blocksAllocated--; 61 | *((void **)memblock) = _headOfFreeList; 62 | _headOfFreeList = memblock; 63 | } 64 | 65 | void CMemoryPool::AddNewBlob(void) 66 | { 67 | int sizeMultiplier = pow(2.0, _numBlobs); 68 | int nElements = _blocksPerBlob * sizeMultiplier; 69 | int blobSize = nElements * _blockSize; 70 | 71 | _memBlob[_numBlobs] = malloc(blobSize); 72 | 73 | if (!_memBlob[_numBlobs]) 74 | DebugBreak(); 75 | 76 | _headOfFreeList = _memBlob[_numBlobs]; 77 | 78 | if (!_headOfFreeList) 79 | DebugBreak(); 80 | 81 | void **newBlob = (void **)_headOfFreeList; 82 | 83 | for (int j = 0; j < nElements - 1; j++) 84 | { 85 | newBlob[0] = (char *)newBlob + _blockSize; 86 | newBlob = (void **)newBlob[0]; 87 | } 88 | 89 | newBlob[0] = NULL; 90 | 91 | _numElements += nElements; 92 | _numBlobs++; 93 | 94 | if (_numBlobs >= MAX_BLOBS - 1) 95 | DebugBreak(); 96 | } -------------------------------------------------------------------------------- /dlls/MemPool.h: -------------------------------------------------------------------------------- 1 | //===== Copyright ?1996-2005, Valve Corporation, All rights reserved. ======// 2 | // 3 | // Purpose: 4 | // 5 | // $Workfile: $ 6 | // $Date: $ 7 | // 8 | //----------------------------------------------------------------------------- 9 | // $Log: $ 10 | // 11 | // $NoKeywords: $ 12 | //===========================================================================// 13 | 14 | #ifndef MEMPOOL_H 15 | #define MEMPOOL_H 16 | 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | class CMemoryPool 22 | { 23 | public: 24 | CMemoryPool(int blockSize, int numElements); 25 | ~CMemoryPool(void); 26 | 27 | public: 28 | void *Alloc(unsigned int amount); 29 | void Free(void *memblock); 30 | int Count(void) { return _blocksAllocated; } 31 | void AddNewBlob(void); 32 | 33 | public: 34 | enum 35 | { 36 | MAX_BLOBS = 16 37 | }; 38 | 39 | int _blockSize; 40 | int _blocksPerBlob; 41 | int _numElements; 42 | void *_memBlob[MAX_BLOBS]; 43 | void *_headOfFreeList; 44 | int _numBlobs; 45 | int _peakAlloc; 46 | int _blocksAllocated; 47 | }; 48 | 49 | #endif -------------------------------------------------------------------------------- /dlls/activity.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef ACTIVITY_H 16 | #define ACTIVITY_H 17 | 18 | typedef enum 19 | { 20 | ACT_RESET, 21 | ACT_IDLE, 22 | ACT_GUARD, 23 | ACT_WALK, 24 | ACT_RUN, 25 | ACT_FLY, 26 | ACT_SWIM, 27 | ACT_HOP, 28 | ACT_LEAP, 29 | ACT_FALL, 30 | ACT_LAND, 31 | ACT_STRAFE_LEFT, 32 | ACT_STRAFE_RIGHT, 33 | ACT_ROLL_LEFT, 34 | ACT_ROLL_RIGHT, 35 | ACT_TURN_LEFT, 36 | ACT_TURN_RIGHT, 37 | ACT_CROUCH, 38 | ACT_CROUCHIDLE, 39 | ACT_STAND, 40 | ACT_USE, 41 | ACT_SIGNAL1, 42 | ACT_SIGNAL2, 43 | ACT_SIGNAL3, 44 | ACT_TWITCH, 45 | ACT_COWER, 46 | ACT_SMALL_FLINCH, 47 | ACT_BIG_FLINCH, 48 | ACT_RANGE_ATTACK1, 49 | ACT_RANGE_ATTACK2, 50 | ACT_MELEE_ATTACK1, 51 | ACT_MELEE_ATTACK2, 52 | ACT_RELOAD, 53 | ACT_ARM, 54 | ACT_DISARM, 55 | ACT_EAT, 56 | ACT_DIESIMPLE, 57 | ACT_DIEBACKWARD, 58 | ACT_DIEFORWARD, 59 | ACT_DIEVIOLENT, 60 | ACT_BARNACLE_HIT, 61 | ACT_BARNACLE_PULL, 62 | ACT_BARNACLE_CHOMP, 63 | ACT_BARNACLE_CHEW, 64 | ACT_SLEEP, 65 | ACT_INSPECT_FLOOR, 66 | ACT_INSPECT_WALL, 67 | ACT_IDLE_ANGRY, 68 | ACT_WALK_HURT, 69 | ACT_RUN_HURT, 70 | ACT_HOVER, 71 | ACT_GLIDE, 72 | ACT_FLY_LEFT, 73 | ACT_FLY_RIGHT, 74 | ACT_DETECT_SCENT, 75 | ACT_SNIFF, 76 | ACT_BITE, 77 | ACT_THREAT_DISPLAY, 78 | ACT_FEAR_DISPLAY, 79 | ACT_EXCITED, 80 | ACT_SPECIAL_ATTACK1, 81 | ACT_SPECIAL_ATTACK2, 82 | ACT_COMBAT_IDLE, 83 | ACT_WALK_SCARED, 84 | ACT_RUN_SCARED, 85 | ACT_VICTORY_DANCE, 86 | ACT_DIE_HEADSHOT, 87 | ACT_DIE_CHESTSHOT, 88 | ACT_DIE_GUTSHOT, 89 | ACT_DIE_BACKSHOT, 90 | ACT_FLINCH_HEAD, 91 | ACT_FLINCH_CHEST, 92 | ACT_FLINCH_STOMACH, 93 | ACT_FLINCH_LEFTARM, 94 | ACT_FLINCH_RIGHTARM, 95 | ACT_FLINCH_LEFTLEG, 96 | ACT_FLINCH_RIGHTLEG, 97 | ACT_FLINCH, 98 | ACT_LARGE_FLINCH, 99 | ACT_HOLDBOMB, 100 | ACT_IDLE_FIDGET, 101 | ACT_IDLE_SCARED, 102 | ACT_IDLE_SCARED_FIDGET, 103 | ACT_FOLLOW_IDLE, 104 | ACT_FOLLOW_IDLE_FIDGET, 105 | ACT_FOLLOW_IDLE_SCARED, 106 | ACT_FOLLOW_IDLE_SCARED_FIDGET, 107 | ACT_CROUCH_IDLE, 108 | ACT_CROUCH_IDLE_FIDGET, 109 | ACT_CROUCH_IDLE_SCARED, 110 | ACT_CROUCH_IDLE_SCARED_FIDGET, 111 | ACT_CROUCH_WALK, 112 | ACT_CROUCH_WALK_SCARED, 113 | ACT_CROUCH_DIE, 114 | ACT_WALK_BACK, 115 | ACT_IDLE_SNEAKY, 116 | ACT_IDLE_SNEAKY_FIDGET, 117 | ACT_WALK_SNEAKY, 118 | ACT_WAVE, 119 | ACT_YES, 120 | ACT_NO 121 | } 122 | Activity; 123 | 124 | typedef struct 125 | { 126 | int type; 127 | char *name; 128 | } 129 | activity_map_t; 130 | 131 | extern activity_map_t activity_map[]; 132 | #endif -------------------------------------------------------------------------------- /dlls/activitymap.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #define _A(a) { a, #a } 17 | 18 | activity_map_t activity_map[] = 19 | { 20 | _A(ACT_IDLE), 21 | _A(ACT_GUARD), 22 | _A(ACT_WALK), 23 | _A(ACT_RUN), 24 | _A(ACT_FLY), 25 | _A(ACT_SWIM), 26 | _A(ACT_HOP), 27 | _A(ACT_LEAP), 28 | _A(ACT_FALL), 29 | _A(ACT_LAND), 30 | _A(ACT_STRAFE_LEFT), 31 | _A(ACT_STRAFE_RIGHT), 32 | _A(ACT_ROLL_LEFT), 33 | _A(ACT_ROLL_RIGHT), 34 | _A(ACT_TURN_LEFT), 35 | _A(ACT_TURN_RIGHT), 36 | _A(ACT_CROUCH), 37 | _A(ACT_CROUCHIDLE), 38 | _A(ACT_STAND), 39 | _A(ACT_USE), 40 | _A(ACT_SIGNAL1), 41 | _A(ACT_SIGNAL2), 42 | _A(ACT_SIGNAL3), 43 | _A(ACT_TWITCH), 44 | _A(ACT_COWER), 45 | _A(ACT_SMALL_FLINCH), 46 | _A(ACT_BIG_FLINCH), 47 | _A(ACT_RANGE_ATTACK1), 48 | _A(ACT_RANGE_ATTACK2), 49 | _A(ACT_MELEE_ATTACK1), 50 | _A(ACT_MELEE_ATTACK2), 51 | _A(ACT_RELOAD), 52 | _A(ACT_ARM), 53 | _A(ACT_DISARM), 54 | _A(ACT_EAT), 55 | _A(ACT_DIESIMPLE), 56 | _A(ACT_DIEBACKWARD), 57 | _A(ACT_DIEFORWARD), 58 | _A(ACT_DIEVIOLENT), 59 | _A(ACT_BARNACLE_HIT), 60 | _A(ACT_BARNACLE_PULL), 61 | _A(ACT_BARNACLE_CHOMP), 62 | _A(ACT_BARNACLE_CHEW), 63 | _A(ACT_SLEEP), 64 | _A(ACT_INSPECT_FLOOR), 65 | _A(ACT_INSPECT_WALL), 66 | _A(ACT_IDLE_ANGRY), 67 | _A(ACT_WALK_HURT), 68 | _A(ACT_RUN_HURT), 69 | _A(ACT_HOVER), 70 | _A(ACT_GLIDE), 71 | _A(ACT_FLY_LEFT), 72 | _A(ACT_FLY_RIGHT), 73 | _A(ACT_DETECT_SCENT), 74 | _A(ACT_SNIFF), 75 | _A(ACT_BITE), 76 | _A(ACT_THREAT_DISPLAY), 77 | _A(ACT_FEAR_DISPLAY), 78 | _A(ACT_EXCITED), 79 | _A(ACT_SPECIAL_ATTACK1), 80 | _A(ACT_SPECIAL_ATTACK2), 81 | _A(ACT_COMBAT_IDLE), 82 | _A(ACT_WALK_SCARED), 83 | _A(ACT_RUN_SCARED), 84 | _A(ACT_VICTORY_DANCE), 85 | _A(ACT_DIE_HEADSHOT), 86 | _A(ACT_DIE_CHESTSHOT), 87 | _A(ACT_DIE_GUTSHOT), 88 | _A(ACT_DIE_BACKSHOT), 89 | _A(ACT_FLINCH_HEAD), 90 | _A(ACT_FLINCH_CHEST), 91 | _A(ACT_FLINCH_STOMACH), 92 | _A(ACT_FLINCH_LEFTARM), 93 | _A(ACT_FLINCH_RIGHTARM), 94 | _A(ACT_FLINCH_LEFTLEG), 95 | _A(ACT_FLINCH_RIGHTLEG), 96 | _A(ACT_FLINCH), 97 | _A(ACT_LARGE_FLINCH), 98 | _A(ACT_HOLDBOMB), 99 | _A(ACT_IDLE_FIDGET), 100 | _A(ACT_IDLE_SCARED), 101 | _A(ACT_IDLE_SCARED_FIDGET), 102 | _A(ACT_FOLLOW_IDLE), 103 | _A(ACT_FOLLOW_IDLE_FIDGET), 104 | _A(ACT_FOLLOW_IDLE_SCARED), 105 | _A(ACT_FOLLOW_IDLE_SCARED_FIDGET), 106 | _A(ACT_CROUCH_IDLE), 107 | _A(ACT_CROUCH_IDLE_FIDGET), 108 | _A(ACT_CROUCH_IDLE_SCARED), 109 | _A(ACT_CROUCH_IDLE_SCARED_FIDGET), 110 | _A(ACT_CROUCH_WALK), 111 | _A(ACT_CROUCH_WALK_SCARED), 112 | _A(ACT_CROUCH_DIE), 113 | _A(ACT_WALK_BACK), 114 | _A(ACT_IDLE_SNEAKY), 115 | _A(ACT_IDLE_SNEAKY_FIDGET), 116 | _A(ACT_WALK_SNEAKY), 117 | _A(ACT_WAVE), 118 | _A(ACT_YES), 119 | _A(ACT_NO), 120 | { 0, NULL } 121 | }; -------------------------------------------------------------------------------- /dlls/airtank.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | #include "monsters.h" 20 | #include "weapons.h" 21 | #include "nodes.h" 22 | #include "player.h" 23 | 24 | class CAirtank : public CGrenade 25 | { 26 | public: 27 | void Spawn(void); 28 | void Precache(void); 29 | int Save(CSave &save); 30 | int Restore(CRestore &restore); 31 | void Killed(entvars_t *pevAttacker, int iGib); 32 | 33 | public: 34 | void EXPORT TankThink(void); 35 | void EXPORT TankTouch(CBaseEntity *pOther); 36 | 37 | public: 38 | static TYPEDESCRIPTION m_SaveData[]; 39 | 40 | public: 41 | int m_state; 42 | }; 43 | 44 | LINK_ENTITY_TO_CLASS(item_airtank, CAirtank); 45 | 46 | TYPEDESCRIPTION CAirtank::m_SaveData[] = 47 | { 48 | DEFINE_FIELD(CAirtank, m_state, FIELD_INTEGER) 49 | }; 50 | 51 | IMPLEMENT_SAVERESTORE(CAirtank, CGrenade); 52 | 53 | void CAirtank::Spawn(void) 54 | { 55 | Precache(); 56 | pev->movetype = MOVETYPE_FLY; 57 | pev->solid = SOLID_BBOX; 58 | 59 | SET_MODEL(ENT(pev), "models/w_oxygen.mdl"); 60 | UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 36)); 61 | UTIL_SetOrigin(pev, pev->origin); 62 | 63 | SetThink(&CAirtank::TankThink); 64 | SetTouch(&CAirtank::TankTouch); 65 | 66 | pev->flags |= FL_MONSTER; 67 | pev->takedamage = DAMAGE_YES; 68 | pev->health = 20; 69 | pev->dmg = 50; 70 | m_state = 1; 71 | } 72 | 73 | void CAirtank::Precache(void) 74 | { 75 | PRECACHE_MODEL("models/w_oxygen.mdl"); 76 | PRECACHE_SOUND("doors/aliendoor3.wav"); 77 | } 78 | 79 | void CAirtank::Killed(entvars_t *pevAttacker, int iGib) 80 | { 81 | pev->owner = ENT(pevAttacker); 82 | Explode(pev->origin, Vector(0, 0, -1)); 83 | } 84 | 85 | void CAirtank::TankThink(void) 86 | { 87 | m_state = 1; 88 | SUB_UseTargets(this, USE_TOGGLE, 0); 89 | } 90 | 91 | void CAirtank::TankTouch(CBaseEntity *pOther) 92 | { 93 | if (!pOther->IsPlayer()) 94 | return; 95 | 96 | if (!m_state) 97 | { 98 | EMIT_SOUND(ENT(pev), CHAN_BODY, "player/pl_swim2.wav", VOL_NORM, ATTN_NORM); 99 | return; 100 | } 101 | 102 | pOther->pev->air_finished = gpGlobals->time + 12; 103 | EMIT_SOUND(ENT(pev), CHAN_VOICE, "doors/aliendoor3.wav", VOL_NORM, ATTN_NORM); 104 | pev->nextthink = gpGlobals->time + 30; 105 | m_state = 0; 106 | SUB_UseTargets(this, USE_TOGGLE, 1); 107 | } -------------------------------------------------------------------------------- /dlls/animation.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef ANIMATION_H 16 | #define ANIMATION_H 17 | 18 | #define ACTIVITY_NOT_AVAILABLE -1 19 | 20 | #ifndef MONSTEREVENT_H 21 | #include "monsterevent.h" 22 | #endif 23 | 24 | extern int IsSoundEvent(int eventNumber); 25 | int LookupActivity(void *pmodel, entvars_t *pev, int activity); 26 | int LookupActivityHeaviest(void *pmodel, entvars_t *pev, int activity); 27 | int LookupSequence(void *pmodel, const char *label); 28 | void GetSequenceInfo(void *pmodel, entvars_t *pev, float *pflFrameRate, float *pflGroundSpeed); 29 | int GetSequenceFlags(void *pmodel, entvars_t *pev); 30 | int LookupAnimationEvents(void *pmodel, entvars_t *pev, float flStart, float flEnd); 31 | float SetController(void *pmodel, entvars_t *pev, int iController, float flValue); 32 | float SetBlending(void *pmodel, entvars_t *pev, int iBlender, float flValue); 33 | void GetEyePosition(void *pmodel, float *vecEyePosition); 34 | void SequencePrecache(void *pmodel, const char *pSequenceName); 35 | int FindTransition(void *pmodel, int iEndingAnim, int iGoalAnim, int *piDir); 36 | void SetBodygroup(void *pmodel, entvars_t *pev, int iGroup, int iValue); 37 | int GetBodygroup(void *pmodel, entvars_t *pev, int iGroup); 38 | int GetAnimationEvent(void *pmodel, entvars_t *pev, MonsterEvent_t *pMonsterEvent, float flStart, float flEnd, int index); 39 | int ExtractBbox(void *pmodel, int sequence, float *mins, float *maxs); 40 | 41 | // From /engine/studio.h 42 | #define STUDIO_LOOPING 0x0001 43 | #endif -------------------------------------------------------------------------------- /dlls/cdll_dll.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef CDLL_DLL_H 16 | #define CDLL_DLL_H 17 | 18 | #define MAX_WEAPONS 32 19 | #define MAX_WEAPON_SLOTS 5 20 | #define MAX_ITEM_TYPES 6 21 | #define MAX_ITEMS 4 22 | 23 | #define HIDEHUD_WEAPONS (1<<0) 24 | #define HIDEHUD_FLASHLIGHT (1<<1) 25 | #define HIDEHUD_ALL (1<<2) 26 | #define HIDEHUD_HEALTH (1<<3) 27 | #define HIDEHUD_TIMER (1<<4) 28 | #define HIDEHUD_MONEY (1<<5) 29 | #define HIDEHUD_CROSSHAIR (1<<6) 30 | 31 | #define MAX_AMMO_TYPES 32 32 | #define MAX_AMMO_SLOTS 32 33 | 34 | #define HUD_PRINTNOTIFY 1 35 | #define HUD_PRINTCONSOLE 2 36 | #define HUD_PRINTTALK 3 37 | #define HUD_PRINTCENTER 4 38 | #define HUD_PRINTRADIO 5 39 | 40 | #define SCOREATTRIB_DEAD (1<<0) 41 | #define SCOREATTRIB_BOMB (1<<1) 42 | #define SCOREATTRIB_VIP (1<<2) 43 | 44 | #define STATUSICON_HIDE 0 45 | #define STATUSICON_SHOW 1 46 | #define STATUSICON_FLASH 2 47 | 48 | #define TEAM_UNASSIGNED 0 49 | #define TEAM_TERRORIST 1 50 | #define TEAM_CT 2 51 | #define TEAM_SPECTATOR 3 52 | 53 | #define CLASS_UNASSIGNED 0 54 | #define CLASS_URBAN 1 55 | #define CLASS_TERROR 2 56 | #define CLASS_LEET 3 57 | #define CLASS_ARCTIC 4 58 | #define CLASS_GSG9 5 59 | #define CLASS_GIGN 6 60 | #define CLASS_SAS 7 61 | #define CLASS_GUERILLA 8 62 | #define CLASS_VIP 9 63 | #define CLASS_MILITIA 10 64 | #define CLASS_SPETSNAZ 11 65 | 66 | #define MENU_KEY_1 (1<<0) 67 | #define MENU_KEY_2 (1<<1) 68 | #define MENU_KEY_3 (1<<2) 69 | #define MENU_KEY_4 (1<<3) 70 | #define MENU_KEY_5 (1<<4) 71 | #define MENU_KEY_6 (1<<5) 72 | #define MENU_KEY_7 (1<<6) 73 | #define MENU_KEY_8 (1<<7) 74 | #define MENU_KEY_9 (1<<8) 75 | #define MENU_KEY_0 (1<<9) 76 | 77 | #define MENU_TEAM 2 78 | #define MENU_MAPBRIEFING 4 79 | #define MENU_CLASS_T 26 80 | #define MENU_CLASS_CT 27 81 | #define MENU_BUY 28 82 | #define MENU_BUY_PISTOL 29 83 | #define MENU_BUY_SHOTGUN 30 84 | #define MENU_BUY_RIFLE 31 85 | #define MENU_BUY_SUBMACHINEGUN 32 86 | #define MENU_BUY_MACHINEGUN 33 87 | #define MENU_BUY_ITEM 34 88 | 89 | #define IUSER3_CANSHOOT (1<<0) 90 | #define IUSER3_FREEZETIMEOVER (1<<1) 91 | #define IUSER3_INBOMBZONE (1<<2) 92 | #define IUSER3_HOLDINGSHIELD (1<<3) 93 | 94 | #define ITEMSTATE_HASNIGHTVISION (1<<0) 95 | #define ITEMSTATE_HASDEFUSER (1<<1) 96 | 97 | #define WEAPON_SUIT 31 98 | #endif -------------------------------------------------------------------------------- /dlls/client.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef CLIENT_H 16 | #define CLIENT_H 17 | 18 | extern "C" EXPORT float g_flTimeLimit; 19 | extern "C" EXPORT int CountTeams(void); 20 | extern "C" EXPORT int CountTeamPlayers(int iTeam); 21 | 22 | extern void respawn(entvars_t *pev, BOOL fCopyCorpse); 23 | extern BOOL ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]); 24 | extern void ClientDisconnect(edict_t *pEntity); 25 | extern void ClientKill(edict_t *pEntity); 26 | extern void ClientPutInServer(edict_t *pEntity); 27 | extern void ClientCommand(edict_t *pEntity); 28 | extern void ClientUserInfoChanged(edict_t *pEntity, char *infobuffer); 29 | extern void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); 30 | extern void ServerDeactivate(void); 31 | extern void StartFrame(void); 32 | extern void PlayerPostThink(edict_t *pEntity); 33 | extern void PlayerPreThink(edict_t *pEntity); 34 | extern void ParmsNewLevel(void); 35 | extern void ParmsChangeLevel(void); 36 | extern void ClientPrecache(void); 37 | extern const char *GetGameDescription(void); 38 | extern void PlayerCustomization(edict_t *pEntity, customization_t *pCust); 39 | extern void SpectatorConnect(edict_t *pEntity); 40 | extern void SpectatorDisconnect(edict_t *pEntity); 41 | extern void SpectatorThink(edict_t *pEntity); 42 | extern void Sys_Error(const char *error_string); 43 | extern void SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas); 44 | extern void UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); 45 | extern int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); 46 | extern void CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); 47 | extern void RegisterEncoders(void); 48 | extern int GetWeaponData(struct edict_s *player, struct weapon_data_s *info); 49 | extern void CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); 50 | extern void CmdEnd(const edict_t *player); 51 | extern int ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size); 52 | extern int GetHullBounds(int hullnumber, float *mins, float *maxs); 53 | extern void CreateInstancedBaselines(void); 54 | extern int InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message); 55 | extern int AllowLagCompensation(void); 56 | #endif -------------------------------------------------------------------------------- /dlls/decals.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #ifndef DECALS_H 17 | #define DECALS_H 18 | 19 | enum decal_e 20 | { 21 | DECAL_GUNSHOT1 = 0, 22 | DECAL_GUNSHOT2, 23 | DECAL_GUNSHOT3, 24 | DECAL_GUNSHOT4, 25 | DECAL_GUNSHOT5, 26 | DECAL_LAMBDA1, 27 | DECAL_LAMBDA2, 28 | DECAL_LAMBDA3, 29 | DECAL_LAMBDA4, 30 | DECAL_LAMBDA5, 31 | DECAL_LAMBDA6, 32 | DECAL_SCORCH1, 33 | DECAL_SCORCH2, 34 | DECAL_BLOOD1, 35 | DECAL_BLOOD2, 36 | DECAL_BLOOD3, 37 | DECAL_BLOOD4, 38 | DECAL_BLOOD5, 39 | DECAL_BLOOD6, 40 | DECAL_YBLOOD1, 41 | DECAL_YBLOOD2, 42 | DECAL_YBLOOD3, 43 | DECAL_YBLOOD4, 44 | DECAL_YBLOOD5, 45 | DECAL_YBLOOD6, 46 | DECAL_GLASSBREAK1, 47 | DECAL_GLASSBREAK2, 48 | DECAL_GLASSBREAK3, 49 | DECAL_BIGSHOT1, 50 | DECAL_BIGSHOT2, 51 | DECAL_BIGSHOT3, 52 | DECAL_BIGSHOT4, 53 | DECAL_BIGSHOT5, 54 | DECAL_SPIT1, 55 | DECAL_SPIT2, 56 | DECAL_BPROOF1, 57 | DECAL_GARGSTOMP1, 58 | DECAL_SMALLSCORCH1, 59 | DECAL_SMALLSCORCH2, 60 | DECAL_SMALLSCORCH3, 61 | DECAL_MOMMABIRTH, 62 | DECAL_MOMMASPLAT, 63 | }; 64 | 65 | typedef struct 66 | { 67 | char *name; 68 | int index; 69 | } 70 | DLL_DECALLIST; 71 | 72 | extern DLL_DECALLIST gDecals[]; 73 | #endif -------------------------------------------------------------------------------- /dlls/doors.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #ifndef DOORS_H 17 | #define DOORS_H 18 | 19 | #define SF_DOOR_ROTATE_Y 0 20 | #define SF_DOOR_START_OPEN 1 21 | #define SF_DOOR_ROTATE_BACKWARDS 2 22 | #define SF_DOOR_PASSABLE 8 23 | #define SF_DOOR_ONEWAY 16 24 | #define SF_DOOR_NO_AUTO_RETURN 32 25 | #define SF_DOOR_ROTATE_Z 64 26 | #define SF_DOOR_ROTATE_X 128 27 | #define SF_DOOR_USE_ONLY 256 28 | #define SF_DOOR_NOMONSTERS 512 29 | #define SF_DOOR_SILENT 0x80000000 30 | #endif -------------------------------------------------------------------------------- /dlls/explode.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef EXPLODE_H 16 | #define EXPLODE_H 17 | 18 | #define SF_ENVEXPLOSION_NODAMAGE (1<<0) 19 | #define SF_ENVEXPLOSION_REPEATABLE (1<< 1) 20 | #define SF_ENVEXPLOSION_NOFIREBALL (1<< 2) 21 | #define SF_ENVEXPLOSION_NOSMOKE (1<<3) 22 | #define SF_ENVEXPLOSION_NODECAL (1<<4) 23 | #define SF_ENVEXPLOSION_NOSPARKS (1<<5) 24 | 25 | extern DLL_GLOBAL short g_sModelIndexFireball; 26 | extern DLL_GLOBAL short g_sModelIndexSmoke; 27 | 28 | extern void ExplosionCreate(const Vector ¢er, const Vector &angles, edict_t *pOwner, int magnitude, BOOL doDamage); 29 | #endif -------------------------------------------------------------------------------- /dlls/extdll.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef EXTDLL_H 16 | #define EXTDLL_H 17 | 18 | 19 | // 20 | // Global header file for extension DLLs 21 | // 22 | 23 | // Allow "DEBUG" in addition to default "_DEBUG" 24 | #ifdef _DEBUG 25 | #define DEBUG 1 26 | #endif 27 | 28 | // Silence certain warnings 29 | #pragma warning(disable : 4244) // int or float down-conversion 30 | #pragma warning(disable : 4305) // int or float data truncation 31 | #pragma warning(disable : 4201) // nameless struct/union 32 | #pragma warning(disable : 4514) // unreferenced inline function removed 33 | #pragma warning(disable : 4100) // unreferenced formal parameter 34 | 35 | // Prevent tons of unused windows definitions 36 | #ifdef _WIN32 37 | #define WIN32_LEAN_AND_MEAN 38 | #define NOWINRES 39 | #define NOSERVICE 40 | #define NOMCX 41 | #define NOIME 42 | #include "windows.h" 43 | #else // _WIN32 44 | #define FALSE 0 45 | #define TRUE (!FALSE) 46 | typedef unsigned long ULONG; 47 | typedef unsigned char BYTE; 48 | typedef int BOOL; 49 | #define MAX_PATH PATH_MAX 50 | #include 51 | #include 52 | #ifndef min 53 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 54 | #endif 55 | #ifndef max 56 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 57 | #define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d) 58 | #endif 59 | #endif //_WIN32 60 | 61 | // Misc C-runtime library headers 62 | #include "stdio.h" 63 | #include "stdlib.h" 64 | #include "math.h" 65 | 66 | // Header file containing definition of globalvars_t and entvars_t 67 | typedef int func_t; // 68 | typedef int string_t; // from engine's pr_comp.h; 69 | typedef float vec_t; // needed before including progdefs.h 70 | 71 | // Vector class 72 | #include "vector.h" 73 | 74 | // Defining it as a (bogus) struct helps enforce type-checking 75 | #define vec3_t Vector 76 | 77 | // Shared engine/DLL constants 78 | #include "const.h" 79 | #include "progdefs.h" 80 | #include "edict.h" 81 | 82 | // Shared header describing protocol between engine and DLLs 83 | #include "eiface.h" 84 | 85 | // Shared header between the client DLL and the game DLLs 86 | #include "cdll_dll.h" 87 | 88 | #endif //EXTDLL_H 89 | -------------------------------------------------------------------------------- /dlls/func_break.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef FUNC_BREAK_H 16 | #define FUNC_BREAK_H 17 | 18 | typedef enum { expRandom, expDirected } Explosions; 19 | typedef enum { matGlass = 0, matWood, matMetal, matFlesh, matCinderBlock, matCeilingTile, matComputer, matUnbreakableGlass, matRocks, matNone, matLastMaterial } Materials; 20 | 21 | #define NUM_SHARDS 6 22 | 23 | class CBreakable : public CBaseDelay 24 | { 25 | public: 26 | void Spawn(void); 27 | void Restart(void); 28 | void Precache(void); 29 | void KeyValue(KeyValueData *pkvd); 30 | void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); 31 | void DamageSound(void); 32 | int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType); 33 | void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType); 34 | BOOL IsBreakable(void); 35 | BOOL SparkWhenHit(void); 36 | int DamageDecal(int bitsDamageType); 37 | int ObjectCaps(void) { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); } 38 | int Save(CSave &save); 39 | int Restore(CRestore &restore); 40 | 41 | public: 42 | void EXPORT Die(void); 43 | void EXPORT BreakTouch(CBaseEntity *pOther); 44 | 45 | public: 46 | inline BOOL Explodable(void) { return ExplosionMagnitude() > 0; } 47 | inline int ExplosionMagnitude(void) { return pev->impulse; } 48 | inline void ExplosionSetMagnitude(int magnitude) { pev->impulse = magnitude; } 49 | 50 | public: 51 | static void MaterialSoundPrecache(Materials precacheMaterial); 52 | static void MaterialSoundRandom(edict_t *pEdict, Materials soundMaterial, float volume); 53 | static const char **MaterialSoundList(Materials precacheMaterial, int &soundCount); 54 | 55 | public: 56 | static const char *pSoundsWood[]; 57 | static const char *pSoundsFlesh[]; 58 | static const char *pSoundsGlass[]; 59 | static const char *pSoundsMetal[]; 60 | static const char *pSoundsConcrete[]; 61 | static const char *pSpawnObjects[]; 62 | 63 | public: 64 | static TYPEDESCRIPTION m_SaveData[]; 65 | 66 | public: 67 | Materials m_Material; 68 | Explosions m_Explosion; 69 | int m_idShard; 70 | float m_angle; 71 | int m_iszGibModel; 72 | int m_iszSpawnObject; 73 | float m_flSaveHealth; 74 | }; 75 | 76 | #endif -------------------------------------------------------------------------------- /dlls/game.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef GAME_H 16 | #define GAME_H 17 | 18 | extern void GameDLLInit(void); 19 | 20 | extern cvar_t *g_psv_gravity, *g_psv_aim; 21 | extern cvar_t *g_footsteps; 22 | extern cvar_t *g_psv_accelerate, *g_psv_friction, *g_psv_stopspeed; 23 | 24 | extern cvar_t displaysoundlist; 25 | 26 | extern cvar_t timelimit; 27 | extern cvar_t friendlyfire; 28 | extern cvar_t flashlight; 29 | 30 | extern cvar_t decalfrequency; 31 | 32 | extern cvar_t allowmonsters; 33 | extern cvar_t roundtime; 34 | extern cvar_t buytime; 35 | extern cvar_t freezetime; 36 | extern cvar_t c4timer; 37 | 38 | extern cvar_t ghostfrequency; 39 | extern cvar_t autokick; 40 | 41 | extern cvar_t restartround; 42 | extern cvar_t sv_restart; 43 | 44 | extern cvar_t limitteams; 45 | extern cvar_t autoteambalance; 46 | extern cvar_t tkpunish; 47 | extern cvar_t hostagepenalty; 48 | extern cvar_t mirrordamage; 49 | extern cvar_t logmessages; 50 | 51 | #define FORCECAMERA_SPECTATE_ANYONE 0 52 | #define FORCECAMERA_SPECTATE_ONLY_TEAM 1 53 | #define FORCECAMERA_ONLY_FRIST_PERSON 2 54 | 55 | extern cvar_t forcecamera; 56 | extern cvar_t forcechasecam; 57 | extern cvar_t mapvoteratio; 58 | 59 | #define LOG_ENEMYATTACK 0x1 60 | #define LOG_TEAMMATEATTACK 0x2 61 | 62 | extern cvar_t logdetail; 63 | extern cvar_t startmoney; 64 | extern cvar_t maxrounds; 65 | extern cvar_t fadetoblack; 66 | 67 | #define PLAYERID_EVERYONE 0 68 | #define PLAYERID_TEAMONLY 1 69 | #define PLAYERID_OFF 2 70 | 71 | extern cvar_t playerid; 72 | extern cvar_t winlimit; 73 | extern cvar_t allow_spectators; 74 | extern cvar_t mp_chattime; 75 | extern cvar_t kick_percent; 76 | 77 | extern cvar_t fragsleft; 78 | extern cvar_t timeleft; 79 | 80 | extern cvar_t humans_join_team; 81 | 82 | #endif -------------------------------------------------------------------------------- /dlls/gamerules.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | #include "player.h" 20 | #include "weapons.h" 21 | #include "gamerules.h" 22 | #include "training_gamerules.h" 23 | #include "skill.h" 24 | #include "game.h" 25 | 26 | extern edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer); 27 | 28 | DLL_GLOBAL CHalfLifeMultiplay *g_pGameRules = NULL; 29 | extern DLL_GLOBAL BOOL g_fGameOver; 30 | extern int gmsgDeathMsg; 31 | extern int gmsgMOTD; 32 | 33 | BOOL CGameRules::CanHaveAmmo(CBasePlayer *pPlayer, const char *pszAmmoName, int iMaxCarry) 34 | { 35 | if (pszAmmoName) 36 | { 37 | int iAmmoIndex = pPlayer->GetAmmoIndex(pszAmmoName); 38 | 39 | if (iAmmoIndex > -1) 40 | { 41 | if (pPlayer->AmmoInventory(iAmmoIndex) < iMaxCarry) 42 | return TRUE; 43 | } 44 | } 45 | 46 | return FALSE; 47 | } 48 | 49 | edict_t *CGameRules::GetPlayerSpawnSpot(CBasePlayer *pPlayer) 50 | { 51 | edict_t *pentSpawnSpot = EntSelectSpawnPoint(pPlayer); 52 | 53 | pPlayer->pev->origin = VARS(pentSpawnSpot)->origin + Vector(0, 0, 1); 54 | pPlayer->pev->v_angle = g_vecZero; 55 | pPlayer->pev->velocity = g_vecZero; 56 | pPlayer->pev->angles = VARS(pentSpawnSpot)->angles; 57 | pPlayer->pev->punchangle = g_vecZero; 58 | pPlayer->pev->fixangle = TRUE; 59 | return pentSpawnSpot; 60 | } 61 | 62 | BOOL CGameRules::CanHavePlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon) 63 | { 64 | if (pPlayer->pev->deadflag != DEAD_NO) 65 | return FALSE; 66 | 67 | if (pWeapon->pszAmmo1()) 68 | { 69 | if (!CanHaveAmmo(pPlayer, pWeapon->pszAmmo1(), pWeapon->iMaxAmmo1())) 70 | { 71 | if (pPlayer->HasPlayerItem(pWeapon)) 72 | return FALSE; 73 | } 74 | } 75 | else 76 | { 77 | if (pPlayer->HasPlayerItem(pWeapon)) 78 | return FALSE; 79 | } 80 | 81 | return TRUE; 82 | } 83 | 84 | void CGameRules::RefreshSkillData(void) 85 | { 86 | int iSkill = (int)CVAR_GET_FLOAT("skill"); 87 | 88 | if (iSkill < 1) 89 | iSkill = 1; 90 | else if (iSkill > 3) 91 | iSkill = 3; 92 | 93 | gSkillData.iSkillLevel = iSkill; 94 | ALERT(at_console, "\nGAME SKILL LEVEL:%d\n", iSkill); 95 | 96 | gSkillData.bullsquidDmgBite = 8; 97 | gSkillData.bullsquidHealth = 3; 98 | gSkillData.bigmommaRadiusBlast = 5; 99 | gSkillData.bullsquidDmgWhip = 75; 100 | gSkillData.bullsquidDmgSpit = 15; 101 | gSkillData.gargantuaHealth = 50; 102 | gSkillData.gargantuaDmgSlash = 15; 103 | } 104 | 105 | CGameRules *InstallGameRules(void) 106 | { 107 | SERVER_COMMAND("exec game.cfg\n"); 108 | SERVER_EXECUTE(); 109 | 110 | if (!gpGlobals->deathmatch) 111 | return new CHalfLifeTraining; 112 | 113 | return new CHalfLifeMultiplay; 114 | } -------------------------------------------------------------------------------- /dlls/globals.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | #include "soundent.h" 20 | 21 | DLL_GLOBAL ULONG g_ulFrameCount; 22 | DLL_GLOBAL ULONG g_ulModelIndexEyes; 23 | DLL_GLOBAL Vector g_vecAttackDir; 24 | DLL_GLOBAL int g_iSkillLevel; 25 | DLL_GLOBAL int gDisplayTitle; 26 | DLL_GLOBAL BOOL g_fGameOver; 27 | DLL_GLOBAL const Vector g_vecZero = Vector(0, 0, 0); 28 | DLL_GLOBAL int g_Language; -------------------------------------------------------------------------------- /dlls/h_export.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | 20 | enginefuncs_t g_engfuncs; 21 | globalvars_t *gpGlobals; 22 | 23 | #ifdef _WIN32 24 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 25 | { 26 | if (fdwReason == DLL_PROCESS_ATTACH) 27 | { 28 | } 29 | else if (fdwReason == DLL_PROCESS_DETACH) 30 | { 31 | } 32 | 33 | return TRUE; 34 | } 35 | 36 | void DLLEXPORT GiveFnptrsToDll(enginefuncs_t *pengfuncsFromEngine, globalvars_t *pGlobals) 37 | { 38 | memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); 39 | gpGlobals = pGlobals; 40 | } 41 | #else 42 | extern "C" 43 | { 44 | void GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals) 45 | { 46 | memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); 47 | gpGlobals = pGlobals; 48 | } 49 | } 50 | #endif -------------------------------------------------------------------------------- /dlls/hintmessage.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | #include "player.h" 20 | 21 | inline char *CloneString(const char *str) 22 | { 23 | char *cloneStr = new char [strlen(str) + 1]; 24 | strcpy(cloneStr, str); 25 | return cloneStr; 26 | } 27 | 28 | CHintMessage::CHintMessage(const char *hintString, bool isHint, CUtlVector *args, float duration) 29 | { 30 | m_hintString = hintString; 31 | m_duration = duration; 32 | m_isHint = isHint; 33 | 34 | if (args) 35 | { 36 | for (int i = 0; i < args->Count(); ++i) 37 | m_args.AddToTail(CloneString((*args)[i])); 38 | } 39 | } 40 | 41 | CHintMessage::~CHintMessage(void) 42 | { 43 | for (int i = 0; i < m_args.Count(); ++i) 44 | delete [] m_args[i]; 45 | 46 | m_args.RemoveAll(); 47 | } 48 | 49 | void CHintMessage::Send(CBaseEntity *client) 50 | { 51 | UTIL_ShowMessageArgs(m_hintString, client, &m_args, m_isHint); 52 | } 53 | 54 | void CHintMessageQueue::Reset(void) 55 | { 56 | m_tmMessageEnd = 0; 57 | 58 | for (int i = 0; i < m_messages.Count(); ++i) 59 | delete m_messages[i]; 60 | 61 | m_messages.RemoveAll(); 62 | } 63 | 64 | void CHintMessageQueue::Update(CBaseEntity *player) 65 | { 66 | if (gpGlobals->time <= m_tmMessageEnd) 67 | return; 68 | 69 | if (!m_messages.Count()) 70 | return; 71 | 72 | CHintMessage *msg = m_messages[0]; 73 | m_tmMessageEnd = gpGlobals->time + msg->GetDuration(); 74 | msg->Send(player); 75 | delete msg; 76 | m_messages.Remove(0); 77 | } 78 | 79 | bool CHintMessageQueue::AddMessage(const char *message, float duration, bool isHint, CUtlVector *args) 80 | { 81 | CHintMessage *msg = new CHintMessage(message, isHint, args, duration); 82 | m_messages.AddToTail(msg); 83 | return true; 84 | } -------------------------------------------------------------------------------- /dlls/hintmessage.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include 17 | 18 | class CHintMessage 19 | { 20 | public: 21 | CHintMessage(const char *hintString, bool isHint, CUtlVector *args, float duration); 22 | ~CHintMessage(void); 23 | 24 | public: 25 | float GetDuration(void) const { return m_duration; } 26 | void Send(CBaseEntity *client); 27 | bool IsEquivalent(const char *hintString, CUtlVector *args) const; 28 | 29 | private: 30 | const char *m_hintString; 31 | CUtlVector m_args; 32 | float m_duration; 33 | bool m_isHint; 34 | }; 35 | 36 | class CHintMessageQueue 37 | { 38 | public: 39 | void Reset(void); 40 | void Update(CBaseEntity *player); 41 | bool AddMessage(const char *message, float duration, bool isHint, CUtlVector *args); 42 | bool IsEmpty(void) { return m_messages.Count() == 0; } 43 | 44 | private: 45 | float m_tmMessageEnd; 46 | CUtlVector m_messages; 47 | }; -------------------------------------------------------------------------------- /dlls/items.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef ITEMS_H 16 | #define ITEMS_H 17 | 18 | class CItem : public CBaseEntity 19 | { 20 | public: 21 | virtual void Spawn(void); 22 | virtual CBaseEntity *Respawn(void); 23 | virtual BOOL MyTouch(CBasePlayer *pPlayer) { return FALSE; } 24 | 25 | public: 26 | void EXPORT ItemTouch(CBaseEntity *pOther); 27 | void EXPORT Materialize(void); 28 | }; 29 | 30 | #endif -------------------------------------------------------------------------------- /dlls/mapinfo.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | #include "mapinfo.h" 20 | 21 | LINK_ENTITY_TO_CLASS(info_map_parameters, CMapInfo); 22 | 23 | void CMapInfo::KeyValue(KeyValueData *pkvd) 24 | { 25 | if (FStrEq(pkvd->szKeyName, "buying")) 26 | { 27 | m_iBuyingStatus = atoi(pkvd->szValue); 28 | pkvd->fHandled = TRUE; 29 | } 30 | else if (FStrEq(pkvd->szKeyName, "bombradius")) 31 | { 32 | m_flBombRadius = atoi(pkvd->szValue); 33 | 34 | if (m_flBombRadius > 2048) 35 | m_flBombRadius = 2048; 36 | 37 | pkvd->fHandled = TRUE; 38 | } 39 | } 40 | 41 | void CMapInfo::Spawn(void) 42 | { 43 | pev->movetype = MOVETYPE_NONE; 44 | pev->solid = SOLID_NOT; 45 | pev->effects |= EF_NODRAW; 46 | } -------------------------------------------------------------------------------- /dlls/mapinfo.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #define BUYING_EVERYONE 0 17 | #define BUYING_ONLY_CT 1 18 | #define BUYING_ONLY_T 2 19 | #define BUYING_NO_ONE 3 20 | 21 | class CMapInfo : public CPointEntity 22 | { 23 | public: 24 | void Spawn(void); 25 | void KeyValue(KeyValueData *pkvd); 26 | 27 | public: 28 | int m_iBuyingStatus; 29 | int m_flBombRadius; 30 | }; -------------------------------------------------------------------------------- /dlls/maprules.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef MAPRULES_H 16 | #define MAPRULES_H 17 | 18 | #endif -------------------------------------------------------------------------------- /dlls/monsterevent.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef MONSTEREVENT_H 16 | #define MONSTEREVENT_H 17 | 18 | typedef struct 19 | { 20 | int event; 21 | char *options; 22 | } 23 | MonsterEvent_t; 24 | 25 | #define EVENT_SPECIFIC 0 26 | #define EVENT_SCRIPTED 1000 27 | #define EVENT_SHARED 2000 28 | #define EVENT_CLIENT 5000 29 | 30 | #define MONSTER_EVENT_BODYDROP_LIGHT 2001 31 | #define MONSTER_EVENT_BODYDROP_HEAVY 2002 32 | #define MONSTER_EVENT_SWISHSOUND 2010 33 | 34 | #endif -------------------------------------------------------------------------------- /dlls/monsters.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef MONSTERS_H 16 | #include "skill.h" 17 | #define MONSTERS_H 18 | 19 | typedef enum 20 | { 21 | HITGROUP_GENERIC, 22 | HITGROUP_HEAD, 23 | HITGROUP_CHEST, 24 | HITGROUP_STOMACH, 25 | HITGROUP_LEFTARM, 26 | HITGROUP_RIGHTARM, 27 | HITGROUP_LEFTLEG, 28 | HITGROUP_RIGHTLEG, 29 | HITGROUP_SHIELD, 30 | NUM_HITGROUPS 31 | } 32 | HitBoxGroup; 33 | 34 | #define SF_MONSTER_WAIT_TILL_SEEN 1 35 | #define SF_MONSTER_GAG 2 36 | #define SF_MONSTER_HITMONSTERCLIP 4 37 | #define SF_MONSTER_PRISONER 16 38 | #define SF_MONSTER_WAIT_FOR_SCRIPT 128 39 | #define SF_MONSTER_PREDISASTER 256 40 | #define SF_MONSTER_FADECORPSE 512 41 | #define SF_MONSTER_FALL_TO_GROUND 0x80000000 42 | #define SF_MONSTER_TURRET_AUTOACTIVATE 32 43 | #define SF_MONSTER_TURRET_STARTINACTIVE 64 44 | 45 | extern void UTIL_MoveToOrigin(edict_t *pent, const Vector &vecGoal, float flDist, int iMoveType); 46 | Vector VecCheckToss(entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, float flGravityAdj = 1); 47 | Vector VecCheckThrow(entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, float flSpeed, float flGravityAdj = 1); 48 | 49 | extern DLL_GLOBAL Vector g_vecAttackDir; 50 | extern DLL_GLOBAL CONSTANT float g_flMeleeRange; 51 | extern DLL_GLOBAL CONSTANT float g_flMediumRange; 52 | extern DLL_GLOBAL CONSTANT float g_flLongRange; 53 | 54 | extern void EjectBrass(const Vector &vecOrigin, const Vector &vecLeft, const Vector &vecVelocity, float rotation, int model, int soundtype, int entityIndex); 55 | extern void EjectBrass2(const Vector &vecOrigin, const Vector &vecVelocity, float rotation, int model, int soundtype, entvars_t *pev); 56 | extern void ExplodeModel(const Vector &vecOrigin, float speed, int model, int count); 57 | 58 | BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget); 59 | BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecTargetOrigin, float flSize = 0); 60 | 61 | #define R_AL -2 62 | #define R_FR -1 63 | #define R_NO 0 64 | #define R_DL 1 65 | #define R_HT 2 66 | #define R_NM 3 67 | 68 | #define bits_MEMORY_KILLED (1<<7) 69 | 70 | class CGib : public CBaseEntity 71 | { 72 | public: 73 | void Spawn(const char *szGibModel); 74 | int ObjectCaps(void) { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION) | FCAP_DONT_SAVE; } 75 | 76 | public: 77 | void EXPORT BounceGibTouch(CBaseEntity *pOther); 78 | void EXPORT StickyGibTouch(CBaseEntity *pOther); 79 | void EXPORT WaitTillLand(void); 80 | void LimitVelocity(void); 81 | 82 | public: 83 | static void SpawnHeadGib(entvars_t *pevVictim); 84 | static void SpawnRandomGibs(entvars_t *pevVictim, int cGibs, int human); 85 | static void SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cGibs); 86 | 87 | public: 88 | int m_bloodColor; 89 | int m_cBloodDecals; 90 | int m_material; 91 | float m_lifeTime; 92 | }; 93 | 94 | #endif -------------------------------------------------------------------------------- /dlls/mp.def: -------------------------------------------------------------------------------- 1 | LIBRARY mp 2 | EXPORTS 3 | GiveFnptrsToDll @1 4 | SECTIONS 5 | .data READ WRITE 6 | -------------------------------------------------------------------------------- /dlls/mp.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "mp"=.\mp.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /dlls/mp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mp", "mp.vcproj", "{96C66587-0491-4A58-891A-69635D294A23}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Profile|Win32 = Profile|Win32 10 | Release|Win32 = Release|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {96C66587-0491-4A58-891A-69635D294A23}.Debug|Win32.ActiveCfg = Debug|Win32 14 | {96C66587-0491-4A58-891A-69635D294A23}.Debug|Win32.Build.0 = Debug|Win32 15 | {96C66587-0491-4A58-891A-69635D294A23}.Profile|Win32.ActiveCfg = Profile|Win32 16 | {96C66587-0491-4A58-891A-69635D294A23}.Profile|Win32.Build.0 = Profile|Win32 17 | {96C66587-0491-4A58-891A-69635D294A23}.Release|Win32.ActiveCfg = Release|Win32 18 | {96C66587-0491-4A58-891A-69635D294A23}.Release|Win32.Build.0 = Release|Win32 19 | EndGlobalSection 20 | GlobalSection(SolutionProperties) = preSolution 21 | HideSolutionNode = FALSE 22 | EndGlobalSection 23 | EndGlobal 24 | -------------------------------------------------------------------------------- /dlls/nodes.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef NODES_H 16 | #define NODES_H 17 | 18 | #define bits_NODE_GROUP_REALM 1 19 | 20 | class CLink 21 | { 22 | public: 23 | entvars_t *m_pLinkEnt; 24 | }; 25 | 26 | class CGraph 27 | { 28 | public: 29 | BOOL m_fGraphPresent; 30 | BOOL m_fGraphPointersSet; 31 | int m_cLinks; 32 | CLink *m_pLinkPool; 33 | 34 | public: 35 | void InitGraph(void); 36 | int AllocNodes(void); 37 | int CheckNODFile(char *szMapName); 38 | int FLoadGraph(char *szMapName); 39 | int FSetGraphPointers(void); 40 | void ShowNodeConnections(int iNode); 41 | int FindNearestNode(const Vector &vecOrigin, CBaseEntity *pEntity); 42 | int FindNearestNode(const Vector &vecOrigin, int afNodeTypes); 43 | }; 44 | 45 | extern CGraph WorldGraph; 46 | #endif -------------------------------------------------------------------------------- /dlls/perf_counter.cpp: -------------------------------------------------------------------------------- 1 | //===== Copyright ?1996-2005, Valve Corporation, All rights reserved. ======// 2 | // 3 | // Purpose: 4 | // 5 | //===========================================================================// 6 | 7 | #include 8 | #include "perf_counter.h" 9 | 10 | void CPerformanceCounter::InitializePerformanceCounter(void) 11 | { 12 | LARGE_INTEGER PerformanceFreq; 13 | unsigned int lowpart, highpart; 14 | 15 | QueryPerformanceFrequency(&PerformanceFreq); 16 | 17 | lowpart = (unsigned int)PerformanceFreq.LowPart; 18 | highpart = (unsigned int)PerformanceFreq.HighPart; 19 | m_iLowShift = 0; 20 | 21 | while (highpart || (lowpart > 2000000.0)) 22 | { 23 | m_iLowShift++; 24 | lowpart >>= 1; 25 | lowpart |= (highpart & 1) << 31; 26 | highpart >>= 1; 27 | } 28 | 29 | m_flPerfCounterFreq = 1.0 / (double)lowpart; 30 | } 31 | 32 | float CPerformanceCounter::GetCurTime(void) 33 | { 34 | static int sametimecount; 35 | static unsigned int oldtime; 36 | static int first = 1; 37 | LARGE_INTEGER PerformanceCount; 38 | unsigned int temp, t2; 39 | double time; 40 | 41 | QueryPerformanceCounter(&PerformanceCount); 42 | 43 | temp = ((unsigned int)PerformanceCount.LowPart >> m_iLowShift) | ((unsigned int)PerformanceCount.HighPart << (32 - m_iLowShift)); 44 | 45 | if (first) 46 | { 47 | oldtime = temp; 48 | first = 0; 49 | } 50 | else 51 | { 52 | if ((temp <= oldtime) && ((oldtime - temp) < 0x10000000)) 53 | { 54 | oldtime = temp; 55 | } 56 | else 57 | { 58 | t2 = temp - oldtime; 59 | time = (double)t2 * m_flPerfCounterFreq; 60 | oldtime = temp; 61 | m_flCurrentTime += time; 62 | 63 | if (m_flCurrentTime == m_flLastCurrentTime) 64 | { 65 | sametimecount++; 66 | 67 | if (sametimecount > 100000) 68 | { 69 | m_flCurrentTime += 1.0; 70 | sametimecount = 0; 71 | } 72 | } 73 | else 74 | sametimecount = 0; 75 | 76 | m_flLastCurrentTime = m_flCurrentTime; 77 | } 78 | } 79 | 80 | return m_flCurrentTime; 81 | } -------------------------------------------------------------------------------- /dlls/perf_counter.h: -------------------------------------------------------------------------------- 1 | //===== Copyright ?1996-2005, Valve Corporation, All rights reserved. ======// 2 | // 3 | // Purpose: 4 | // 5 | // $Workfile: $ 6 | // $Date: $ 7 | // 8 | //----------------------------------------------------------------------------- 9 | // $Log: $ 10 | // 11 | // $NoKeywords: $ 12 | //===========================================================================// 13 | 14 | class CPerformanceCounter 15 | { 16 | public: 17 | void InitializePerformanceCounter(void); 18 | float GetCurTime(void); 19 | 20 | public: 21 | int m_iLowShift; 22 | float m_flPerfCounterFreq; 23 | float m_flCurrentTime; 24 | float m_flLastCurrentTime; 25 | }; -------------------------------------------------------------------------------- /dlls/plane.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "plane.h" 18 | 19 | CPlane::CPlane(void) 20 | { 21 | m_fInitialized = FALSE; 22 | } 23 | 24 | void CPlane::InitializePlane(const Vector &vecNormal, const Vector &vecPoint) 25 | { 26 | m_vecNormal = vecNormal; 27 | m_flDist = DotProduct(m_vecNormal, vecPoint); 28 | m_fInitialized = TRUE; 29 | } 30 | 31 | BOOL CPlane::PointInFront(const Vector &vecPoint) 32 | { 33 | if (!m_fInitialized) 34 | return FALSE; 35 | 36 | float flFace = DotProduct(m_vecNormal, vecPoint) - m_flDist; 37 | 38 | if (flFace >= 0) 39 | return TRUE; 40 | 41 | return FALSE; 42 | } -------------------------------------------------------------------------------- /dlls/plane.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef PLANE_H 16 | #define PLANE_H 17 | 18 | class CPlane 19 | { 20 | public: 21 | CPlane(void); 22 | 23 | public: 24 | void InitializePlane(const Vector &vecNormal, const Vector &vecPoint); 25 | BOOL PointInFront(const Vector &vecPoint); 26 | 27 | public: 28 | Vector m_vecNormal; 29 | float m_flDist; 30 | BOOL m_fInitialized; 31 | }; 32 | 33 | #endif -------------------------------------------------------------------------------- /dlls/schedule.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef SCHEDULE_H 16 | #define SCHEDULE_H 17 | 18 | #define bits_COND_SEE_HATE (1<<1) 19 | #define bits_COND_SEE_FEAR (1<<2) 20 | #define bits_COND_SEE_DISLIKE (1<<3) 21 | #define bits_COND_SEE_ENEMY (1<<4) 22 | #define bits_COND_LIGHT_DAMAGE (1<<8) 23 | #define bits_COND_HEAVY_DAMAGE (1<<9) 24 | #define bits_COND_SEE_CLIENT (1<<21) 25 | #define bits_COND_SEE_NEMESIS (1<<22) 26 | 27 | #endif -------------------------------------------------------------------------------- /dlls/scriptevent.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef SCRIPTEVENT_H 16 | #define SCRIPTEVENT_H 17 | 18 | #define SCRIPT_EVENT_DEAD 1000 19 | #define SCRIPT_EVENT_NOINTERRUPT 1001 20 | #define SCRIPT_EVENT_CANINTERRUPT 1002 21 | #define SCRIPT_EVENT_FIREEVENT 1003 22 | #define SCRIPT_EVENT_SOUND 1004 23 | #define SCRIPT_EVENT_SENTENCE 1005 24 | #define SCRIPT_EVENT_INAIR 1006 25 | #define SCRIPT_EVENT_ENDANIMATION 1007 26 | #define SCRIPT_EVENT_SOUND_VOICE 1008 27 | #define SCRIPT_EVENT_SENTENCE_RND1 1009 28 | #define SCRIPT_EVENT_NOT_DEAD 1010 29 | 30 | #endif -------------------------------------------------------------------------------- /dlls/skill.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "skill.h" 19 | 20 | skilldata_t gSkillData; 21 | 22 | float GetSkillCvar(char *pName) 23 | { 24 | char szBuffer[64]; 25 | int iCount = sprintf(szBuffer, "%s%d",pName, gSkillData.iSkillLevel); 26 | float flValue = CVAR_GET_FLOAT(szBuffer); 27 | 28 | if (flValue <= 0) 29 | ALERT(at_console, "\n\n** GetSkillCVar Got a zero for %s **\n\n", szBuffer); 30 | 31 | return flValue; 32 | } -------------------------------------------------------------------------------- /dlls/skill.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | struct skilldata_t 17 | { 18 | int iSkillLevel; 19 | float agruntHealth; 20 | float agruntDmgPunch; 21 | float apacheHealth; 22 | float barneyHealth; 23 | float bigmommaHealthFactor; 24 | float bigmommaDmgSlash; 25 | float bigmommaDmgBlast; 26 | float bigmommaRadiusBlast; 27 | float bullsquidHealth; 28 | float bullsquidDmgBite; 29 | float bullsquidDmgWhip; 30 | float bullsquidDmgSpit; 31 | float gargantuaHealth; 32 | float gargantuaDmgSlash; 33 | float gargantuaDmgFire; 34 | float gargantuaDmgStomp; 35 | float hassassinHealth; 36 | float headcrabHealth; 37 | float headcrabDmgBite; 38 | float hgruntHealth; 39 | float hgruntDmgKick; 40 | float hgruntShotgunPellets; 41 | float hgruntGrenadeSpeed; 42 | float houndeyeHealth; 43 | float houndeyeDmgBlast; 44 | float slaveHealth; 45 | float slaveDmgClaw; 46 | float slaveDmgClawrake; 47 | float slaveDmgZap; 48 | float ichthyosaurHealth; 49 | float ichthyosaurDmgShake; 50 | float leechHealth; 51 | float leechDmgBite; 52 | float controllerHealth; 53 | float controllerDmgZap; 54 | float controllerSpeedBall; 55 | float controllerDmgBall; 56 | float nihilanthHealth; 57 | float nihilanthZap; 58 | float scientistHealth; 59 | float snarkHealth; 60 | float snarkDmgBite; 61 | float snarkDmgPop; 62 | float zombieHealth; 63 | float zombieDmgOneSlash; 64 | float zombieDmgBothSlash; 65 | float turretHealth; 66 | float miniturretHealth; 67 | float sentryHealth; 68 | float plrDmgCrowbar; 69 | float plrDmg9MM; 70 | float plrDmg357; 71 | float plrDmgMP5; 72 | float plrDmgM203Grenade; 73 | float plrDmgBuckshot; 74 | float plrDmgCrossbowClient; 75 | float plrDmgCrossbowMonster; 76 | float plrDmgRPG; 77 | float plrDmgGauss; 78 | float plrDmgEgonNarrow; 79 | float plrDmgEgonWide; 80 | float plrDmgHornet; 81 | float plrDmgHandGrenade; 82 | float plrDmgSatchel; 83 | float plrDmgTripmine; 84 | float monDmg9MM; 85 | float monDmgMP5; 86 | float monDmg12MM; 87 | float monDmgHornet; 88 | float suitchargerCapacity; 89 | float batteryCapacity; 90 | float healthchargerCapacity; 91 | float healthkitCapacity; 92 | float scientistHeal; 93 | float monHead; 94 | float monChest; 95 | float monStomach; 96 | float monLeg; 97 | float monArm; 98 | float plrHead; 99 | float plrChest; 100 | float plrStomach; 101 | float plrLeg; 102 | float plrArm; 103 | }; 104 | 105 | extern DLL_GLOBAL skilldata_t gSkillData; 106 | float GetSkillCvar(char *pName); 107 | extern DLL_GLOBAL int g_iSkillLevel; 108 | 109 | #define SKILL_EASY 1 110 | #define SKILL_MEDIUM 2 111 | #define SKILL_HARD 3 -------------------------------------------------------------------------------- /dlls/soundent.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #define MAX_WORLD_SOUNDS 64 17 | 18 | #define bits_SOUND_NONE 0 19 | #define bits_SOUND_COMBAT (1<<0) 20 | #define bits_SOUND_WORLD (1<<1) 21 | #define bits_SOUND_PLAYER (1<< 2) 22 | #define bits_SOUND_CARCASS (1<< 3) 23 | #define bits_SOUND_MEAT (1<< 4) 24 | #define bits_SOUND_DANGER (1<< 5) 25 | #define bits_SOUND_GARBAGE (1<< 6) 26 | 27 | #define bits_ALL_SOUNDS 0xFFFFFFFF 28 | 29 | #define SOUNDLIST_EMPTY -1 30 | 31 | #define SOUNDLISTTYPE_FREE 1 32 | #define SOUNDLISTTYPE_ACTIVE 2 33 | 34 | #define SOUND_NEVER_EXPIRE -1 35 | 36 | class CSound 37 | { 38 | public: 39 | void Clear(void); 40 | void Reset(void); 41 | 42 | public: 43 | Vector m_vecOrigin; 44 | int m_iType; 45 | int m_iVolume; 46 | float m_flExpireTime; 47 | int m_iNext; 48 | int m_iNextAudible; 49 | 50 | public: 51 | BOOL FIsSound(void); 52 | BOOL FIsScent(void); 53 | }; 54 | 55 | class CSoundEnt : public CBaseEntity 56 | { 57 | public: 58 | void Precache(void); 59 | void Spawn(void); 60 | void Think(void); 61 | void Initialize(void); 62 | int ObjectCaps(void) { return FCAP_DONT_SAVE; } 63 | 64 | public: 65 | static void InsertSound(int iType, const Vector &vecOrigin, int iVolume, float flDuration); 66 | static void FreeSound(int iSound, int iPrevious); 67 | static int ActiveList(void); 68 | static int FreeList(void); 69 | static CSound *SoundPointerForIndex(int iIndex); 70 | static int ClientSoundIndex(edict_t *pClient); 71 | 72 | public: 73 | BOOL IsEmpty(void) { return m_iActiveSound == SOUNDLIST_EMPTY; } 74 | int ISoundsInList(int iListType); 75 | int IAllocSound(void); 76 | 77 | public: 78 | int m_iFreeSound; 79 | int m_iActiveSound; 80 | int m_cLastActiveSounds; 81 | BOOL m_fShowReport; 82 | 83 | private: 84 | CSound m_SoundPool[MAX_WORLD_SOUNDS]; 85 | }; -------------------------------------------------------------------------------- /dlls/spectator.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #include "extdll.h" 17 | #include "util.h" 18 | #include "cbase.h" 19 | #include "monsters.h" 20 | #include "spectator.h" 21 | 22 | void CBaseSpectator::SpectatorConnect(void) 23 | { 24 | pev->flags = FL_SPECTATOR; 25 | pev->solid = SOLID_NOT; 26 | pev->movetype = MOVETYPE_NOCLIP; 27 | m_pGoalEnt = NULL; 28 | } 29 | 30 | void CBaseSpectator::SpectatorDisconnect(void) 31 | { 32 | } 33 | 34 | void CBaseSpectator::SpectatorImpulseCommand(void) 35 | { 36 | switch (pev->impulse) 37 | { 38 | case 1: 39 | { 40 | static edict_t *pGoal = NULL; 41 | edict_t *pPreviousGoal = pGoal; 42 | edict_t *pCurrentGoal = pGoal; 43 | BOOL bFound = FALSE; 44 | 45 | while (1) 46 | { 47 | pCurrentGoal = FIND_ENTITY_BY_CLASSNAME(pCurrentGoal, "info_player_deathmatch"); 48 | 49 | if (pCurrentGoal == pPreviousGoal) 50 | { 51 | ALERT(at_console, "Could not find a spawn spot.\n"); 52 | break; 53 | } 54 | 55 | if (!FNullEnt(pCurrentGoal)) 56 | { 57 | bFound = TRUE; 58 | break; 59 | } 60 | } 61 | 62 | if (!bFound) 63 | break; 64 | 65 | pGoal = pCurrentGoal; 66 | UTIL_SetOrigin(pev, pGoal->v.origin); 67 | pev->angles = pGoal->v.angles; 68 | pev->fixangle = FALSE; 69 | break; 70 | } 71 | 72 | default: ALERT(at_console, "Unknown spectator impulse\n"); break; 73 | } 74 | 75 | pev->impulse = 0; 76 | } 77 | 78 | void CBaseSpectator::SpectatorThink(void) 79 | { 80 | if (!(pev->flags & FL_SPECTATOR)) 81 | pev->flags = FL_SPECTATOR; 82 | 83 | pev->solid = SOLID_NOT; 84 | pev->movetype = MOVETYPE_NOCLIP; 85 | 86 | if (pev->impulse) 87 | SpectatorImpulseCommand(); 88 | } 89 | 90 | void CBaseSpectator::Spawn(void) 91 | { 92 | pev->flags = FL_SPECTATOR; 93 | pev->solid = SOLID_NOT; 94 | pev->movetype = MOVETYPE_NOCLIP; 95 | m_pGoalEnt = NULL; 96 | } -------------------------------------------------------------------------------- /dlls/spectator.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | class CBaseSpectator : public CBaseEntity 17 | { 18 | public: 19 | void Spawn(void); 20 | void SpectatorConnect(void); 21 | void SpectatorDisconnect(void); 22 | void SpectatorThink(void); 23 | 24 | private: 25 | void SpectatorImpulseCommand(void); 26 | }; -------------------------------------------------------------------------------- /dlls/talkmonster.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef TALKMONSTER_H 16 | #define TALKMONSTER_H 17 | 18 | class CTalkMonster : public CBaseMonster 19 | { 20 | public: 21 | static float g_talkWaitTime; 22 | }; 23 | 24 | #endif -------------------------------------------------------------------------------- /dlls/training_gamerules.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | class CHalfLifeTraining : public CHalfLifeMultiplay 17 | { 18 | public: 19 | CHalfLifeTraining(void); 20 | 21 | public: 22 | virtual BOOL IsMultiplayer(void); 23 | virtual BOOL IsDeathmatch(void); 24 | virtual void InitHUD(CBasePlayer *pl); 25 | virtual void PlayerSpawn(CBasePlayer *pPlayer); 26 | virtual void PlayerThink(CBasePlayer *pPlayer); 27 | virtual BOOL FPlayerCanRespawn(CBasePlayer *pPlayer); 28 | virtual edict_t *GetPlayerSpawnSpot(CBasePlayer *pPlayer); 29 | virtual void PlayerKilled(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor); 30 | virtual int ItemShouldRespawn(CItem *pItem); 31 | virtual void CheckMapConditions(void); 32 | virtual void CheckWinConditions(void); 33 | 34 | public: 35 | static void HostageDied(void); 36 | static bool PlayerCanBuy(CBasePlayer *pPlayer); 37 | 38 | private: 39 | float FillAccountTime; 40 | float ServerRestartTime; 41 | BOOL fInBuyArea; 42 | BOOL fVisitedBuyArea; 43 | BOOL fVGUIMenus; 44 | }; -------------------------------------------------------------------------------- /dlls/vehicle.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #define VEHICLE_SPEED0_ACCELERATION 0.005000000000000000 17 | #define VEHICLE_SPEED1_ACCELERATION 0.002142857142857143 18 | #define VEHICLE_SPEED2_ACCELERATION 0.003333333333333334 19 | #define VEHICLE_SPEED3_ACCELERATION 0.004166666666666667 20 | #define VEHICLE_SPEED4_ACCELERATION 0.004000000000000000 21 | #define VEHICLE_SPEED5_ACCELERATION 0.003800000000000000 22 | #define VEHICLE_SPEED6_ACCELERATION 0.004500000000000000 23 | #define VEHICLE_SPEED7_ACCELERATION 0.004250000000000000 24 | #define VEHICLE_SPEED8_ACCELERATION 0.002666666666666667 25 | #define VEHICLE_SPEED9_ACCELERATION 0.002285714285714286 26 | #define VEHICLE_SPEED10_ACCELERATION 0.001875000000000000 27 | #define VEHICLE_SPEED11_ACCELERATION 0.001444444444444444 28 | #define VEHICLE_SPEED12_ACCELERATION 0.001200000000000000 29 | #define VEHICLE_SPEED13_ACCELERATION 0.000916666666666666 30 | #define VEHICLE_SPEED14_ACCELERATION 0.001444444444444444 31 | 32 | class CFuncVehicle : public CBaseEntity 33 | { 34 | public: 35 | void Spawn(void); 36 | void Restart(void); 37 | int Classify(void); 38 | void Precache(void); 39 | void Blocked(CBaseEntity *pOther); 40 | void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); 41 | void KeyValue(KeyValueData *pkvd); 42 | int Save(CSave &save); 43 | int Restore(CRestore &restore); 44 | int ObjectCaps(void) { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION) | FCAP_DIRECTIONAL_USE; } 45 | void OverrideReset(void); 46 | void CheckTurning(void); 47 | void CollisionDetection(void); 48 | void TerrainFollowing(void); 49 | 50 | public: 51 | void EXPORT Next(void); 52 | void EXPORT Find(void); 53 | void EXPORT NearestPath(void); 54 | void EXPORT DeadEnd(void); 55 | 56 | public: 57 | void NextThink(float thinkTime, BOOL alwaysThink); 58 | void SetTrack(CPathTrack *track) { m_ppath = track->Nearest(pev->origin); } 59 | void SetControls(entvars_t *pevControls); 60 | BOOL OnControls(entvars_t *pev); 61 | void StopSound(void); 62 | void UpdateSound(void); 63 | 64 | public: 65 | static CFuncVehicle *Instance(edict_t *pent); 66 | 67 | public: 68 | static TYPEDESCRIPTION m_SaveData[]; 69 | 70 | public: 71 | CPathTrack *m_ppath; 72 | float m_length; 73 | float m_width; 74 | float m_height; 75 | float m_speed; 76 | float m_dir; 77 | float m_startSpeed; 78 | Vector m_controlMins; 79 | Vector m_controlMaxs; 80 | int m_soundPlaying; 81 | int m_sounds; 82 | int m_acceleration; 83 | float m_flVolume; 84 | float m_flBank; 85 | float m_oldSpeed; 86 | int m_iTurnAngle; 87 | float m_flSteeringWheelDecay; 88 | float m_flAcceleratorDecay; 89 | float m_flTurnStartTime; 90 | float m_flLaunchTime; 91 | float m_flLastNormalZ; 92 | float m_flCanTurnNow; 93 | float m_flUpdateSound; 94 | Vector m_vFrontLeft; 95 | Vector m_vFront; 96 | Vector m_vFrontRight; 97 | Vector m_vBackLeft; 98 | Vector m_vBack; 99 | Vector m_vBackRight; 100 | Vector m_vSurfaceNormal; 101 | Vector m_vVehicleDirection; 102 | CBaseEntity *m_pDriver; 103 | 104 | private: 105 | unsigned short m_usAdjustPitch; 106 | }; -------------------------------------------------------------------------------- /engine/archtypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // Word size dependent definitions 3 | // DAL 1/03 4 | // 5 | #ifndef ARCHTYPES_H 6 | #define ARCHTYPES_H 7 | 8 | #ifdef __x86_64__ 9 | #define X64BITS 10 | #endif 11 | 12 | #if defined( _WIN32 ) && (! defined( __MINGW32__ )) 13 | 14 | typedef __int16 int16; 15 | typedef unsigned __int16 uint16; 16 | typedef __int32 int32; 17 | typedef unsigned __int32 uint32; 18 | typedef __int64 int64; 19 | typedef unsigned __int64 uint64; 20 | typedef __int32 intp; // intp is an integer that can accomodate a pointer 21 | typedef unsigned __int32 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *) 22 | 23 | #else /* _WIN32 */ 24 | 25 | typedef short int16; 26 | typedef unsigned short uint16; 27 | typedef int int32; 28 | typedef unsigned int uint32; 29 | typedef long long int64; 30 | typedef unsigned long long uint64; 31 | #ifdef X64BITS 32 | typedef long long intp; 33 | typedef unsigned long long uintp; 34 | #else 35 | typedef int intp; 36 | typedef unsigned int uintp; 37 | #endif 38 | 39 | #endif /* else _WIN32 */ 40 | 41 | #endif /* ARCHTYPES_H */ 42 | -------------------------------------------------------------------------------- /engine/customentity.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef CUSTOMENTITY_H 16 | #define CUSTOMENTITY_H 17 | 18 | // Custom Entities 19 | 20 | // Start/End Entity is encoded as 12 bits of entity index, and 4 bits of attachment (4:12) 21 | #define BEAMENT_ENTITY(x) ((x)&0xFFF) 22 | #define BEAMENT_ATTACHMENT(x) (((x)>>12)&0xF) 23 | 24 | // Beam types, encoded as a byte 25 | enum 26 | { 27 | BEAM_POINTS = 0, 28 | BEAM_ENTPOINT, 29 | BEAM_ENTS, 30 | BEAM_HOSE, 31 | }; 32 | 33 | #define BEAM_FSINE 0x10 34 | #define BEAM_FSOLID 0x20 35 | #define BEAM_FSHADEIN 0x40 36 | #define BEAM_FSHADEOUT 0x80 37 | 38 | #endif //CUSTOMENTITY_H 39 | -------------------------------------------------------------------------------- /engine/edict.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/engine/edict.h -------------------------------------------------------------------------------- /engine/keydefs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/engine/keydefs.h -------------------------------------------------------------------------------- /engine/progs.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef PROGS_H 16 | #define PROGS_H 17 | 18 | #include "progdefs.h" 19 | 20 | // 16 simultaneous events, max 21 | #define MAX_EVENT_QUEUE 64 22 | 23 | #define DEFAULT_EVENT_RESENDS 1 24 | 25 | #include "event_flags.h" 26 | 27 | typedef struct event_info_s event_info_t; 28 | 29 | #include "event_args.h" 30 | 31 | struct event_info_s 32 | { 33 | unsigned short index; // 0 implies not in use 34 | 35 | short packet_index; // Use data from state info for entity in delta_packet . -1 implies separate info based on event 36 | // parameter signature 37 | short entity_index; // The edict this event is associated with 38 | 39 | float fire_time; // if non-zero, the time when the event should be fired ( fixed up on the client ) 40 | 41 | event_args_t args; 42 | 43 | // CLIENT ONLY 44 | int flags; // Reliable or not, etc. 45 | 46 | }; 47 | 48 | typedef struct event_state_s event_state_t; 49 | 50 | struct event_state_s 51 | { 52 | struct event_info_s ei[ MAX_EVENT_QUEUE ]; 53 | }; 54 | 55 | #if !defined( ENTITY_STATEH ) 56 | #include "entity_state.h" 57 | #endif 58 | 59 | #if !defined( EDICT_H ) 60 | #include "edict.h" 61 | #endif 62 | 63 | #define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m))) 64 | #define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area) 65 | 66 | //============================================================================ 67 | 68 | extern char *pr_strings; 69 | extern globalvars_t gGlobalVariables; 70 | 71 | //============================================================================ 72 | 73 | edict_t *ED_Alloc (void); 74 | void ED_Free (edict_t *ed); 75 | void ED_LoadFromFile (char *data); 76 | 77 | edict_t *EDICT_NUM(int n); 78 | int NUM_FOR_EDICT(const edict_t *e); 79 | 80 | #define PROG_TO_EDICT(e) ((edict_t *)((byte *)sv.edicts + e)) 81 | 82 | #endif // PROGS_H 83 | -------------------------------------------------------------------------------- /engine/shake.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef SHAKE_H 16 | #define SHAKE_H 17 | 18 | // Screen / View effects 19 | 20 | // screen shake 21 | extern int gmsgShake; 22 | 23 | // This structure is sent over the net to describe a screen shake event 24 | typedef struct 25 | { 26 | unsigned short amplitude; // FIXED 4.12 amount of shake 27 | unsigned short duration; // FIXED 4.12 seconds duration 28 | unsigned short frequency; // FIXED 8.8 noise frequency (low frequency is a jerk,high frequency is a rumble) 29 | } ScreenShake; 30 | 31 | extern void V_ApplyShake( float *origin, float *angles, float factor ); 32 | extern void V_CalcShake( void ); 33 | extern int V_ScreenShake( const char *pszName, int iSize, void *pbuf ); 34 | extern int V_ScreenFade( const char *pszName, int iSize, void *pbuf ); 35 | 36 | 37 | // Fade in/out 38 | extern int gmsgFade; 39 | 40 | #define FFADE_IN 0x0000 // Just here so we don't pass 0 into the function 41 | #define FFADE_OUT 0x0001 // Fade out (not in) 42 | #define FFADE_MODULATE 0x0002 // Modulate (don't blend) 43 | #define FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received 44 | 45 | // This structure is sent over the net to describe a screen fade event 46 | typedef struct 47 | { 48 | unsigned short duration; // FIXED 4.12 seconds duration 49 | unsigned short holdTime; // FIXED 4.12 seconds duration until reset (fade & hold) 50 | short fadeFlags; // flags 51 | byte r, g, b, a; // fade to color ( max alpha ) 52 | } ScreenFade; 53 | 54 | #endif // SHAKE_H 55 | 56 | -------------------------------------------------------------------------------- /game_shared/bitvec.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/bitvec.h -------------------------------------------------------------------------------- /game_shared/vgui_checkbutton2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_checkbutton2.cpp -------------------------------------------------------------------------------- /game_shared/vgui_checkbutton2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_checkbutton2.h -------------------------------------------------------------------------------- /game_shared/vgui_defaultinputsignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_defaultinputsignal.h -------------------------------------------------------------------------------- /game_shared/vgui_grid.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_grid.cpp -------------------------------------------------------------------------------- /game_shared/vgui_grid.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_grid.h -------------------------------------------------------------------------------- /game_shared/vgui_helpers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_helpers.cpp -------------------------------------------------------------------------------- /game_shared/vgui_helpers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_helpers.h -------------------------------------------------------------------------------- /game_shared/vgui_listbox.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_listbox.cpp -------------------------------------------------------------------------------- /game_shared/vgui_listbox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_listbox.h -------------------------------------------------------------------------------- /game_shared/vgui_loadtga.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_loadtga.cpp -------------------------------------------------------------------------------- /game_shared/vgui_loadtga.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_loadtga.h -------------------------------------------------------------------------------- /game_shared/vgui_scrollbar2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_scrollbar2.cpp -------------------------------------------------------------------------------- /game_shared/vgui_scrollbar2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_scrollbar2.h -------------------------------------------------------------------------------- /game_shared/vgui_slider2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_slider2.cpp -------------------------------------------------------------------------------- /game_shared/vgui_slider2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/vgui_slider2.h -------------------------------------------------------------------------------- /game_shared/voice_banmgr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_banmgr.cpp -------------------------------------------------------------------------------- /game_shared/voice_banmgr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_banmgr.h -------------------------------------------------------------------------------- /game_shared/voice_common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_common.h -------------------------------------------------------------------------------- /game_shared/voice_gamemgr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_gamemgr.cpp -------------------------------------------------------------------------------- /game_shared/voice_gamemgr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_gamemgr.h -------------------------------------------------------------------------------- /game_shared/voice_status.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_status.cpp -------------------------------------------------------------------------------- /game_shared/voice_status.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_status.h -------------------------------------------------------------------------------- /game_shared/voice_vgui_tweakdlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_vgui_tweakdlg.cpp -------------------------------------------------------------------------------- /game_shared/voice_vgui_tweakdlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/game_shared/voice_vgui_tweakdlg.h -------------------------------------------------------------------------------- /pm_shared/pm_debug.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef PM_DEBUG_H 16 | #define PM_DEBUG_H 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif /* not __MINGW32__ */ 21 | #endif 22 | 23 | void PM_ViewEntity(void); 24 | void PM_DrawBBox(vec3_t mins, vec3_t maxs, vec3_t origin, int pcolor, float life); 25 | void PM_ParticleLine(vec3_t start, vec3_t end, int pcolor, float life, float vert); 26 | void PM_ShowClipBox(void); 27 | 28 | #endif // PMOVEDBG_H 29 | -------------------------------------------------------------------------------- /pm_shared/pm_info.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | // Physics info string definition 16 | #if !defined( PM_INFOH ) 17 | #define PM_INFOH 18 | #ifdef _WIN32 19 | #ifndef __MINGW32__ 20 | #pragma once 21 | #endif /* not __MINGW32__ */ 22 | #endif 23 | 24 | #define MAX_PHYSINFO_STRING 256 25 | 26 | #endif // PM_INFOH 27 | -------------------------------------------------------------------------------- /pm_shared/pm_materials.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined(PM_MATERIALSH) 16 | #define PM_MATERIALSH 17 | #ifdef _WIN32 18 | #ifndef __MINGW32__ 19 | #pragma once 20 | #endif 21 | #endif 22 | 23 | #define CBTEXTURENAMEMAX 17 24 | 25 | #define CHAR_TEX_CONCRETE 'C' 26 | #define CHAR_TEX_METAL 'M' 27 | #define CHAR_TEX_DIRT 'D' 28 | #define CHAR_TEX_VENT 'V' 29 | #define CHAR_TEX_GRATE 'G' 30 | #define CHAR_TEX_TILE 'T' 31 | #define CHAR_TEX_SLOSH 'S' 32 | #define CHAR_TEX_WOOD 'W' 33 | #define CHAR_TEX_COMPUTER 'P' 34 | #define CHAR_TEX_GLASS 'Y' 35 | #define CHAR_TEX_FLESH 'F' 36 | #define CHAR_TEX_SNOW 'N' 37 | 38 | #endif -------------------------------------------------------------------------------- /pm_shared/pm_movevars.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/pm_shared/pm_movevars.h -------------------------------------------------------------------------------- /pm_shared/pm_shared.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | // 17 | // pm_shared.h 18 | // 19 | #if !defined( PM_SHAREDH ) 20 | #define PM_SHAREDH 21 | #ifdef _WIN32 22 | #ifndef __MINGW32__ 23 | #pragma once 24 | #endif /* not __MINGW32__ */ 25 | #endif 26 | 27 | void PM_Init( struct playermove_s *ppmove ); 28 | void PM_Move ( struct playermove_s *ppmove, int server ); 29 | char PM_FindTextureType( char *name ); 30 | 31 | // Spectator Movement modes (stored in pev->iuser1, so the physics code can get at them) 32 | #define OBS_NONE 0 33 | #define OBS_CHASE_LOCKED 1 34 | #define OBS_CHASE_FREE 2 35 | #define OBS_ROAMING 3 36 | #define OBS_IN_EYE 4 37 | #define OBS_MAP_FREE 5 38 | #define OBS_MAP_CHASE 6 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /utils/bspinfo/bspinfo.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #include "cmdlib.h" 12 | #include "mathlib.h" 13 | #include "bspfile.h" 14 | 15 | void main (int argc, char **argv) 16 | { 17 | int i; 18 | char source[1024]; 19 | int size; 20 | FILE *f; 21 | 22 | printf( "bspinfo.exe v2.1 (%s)\n", __DATE__ ); 23 | printf ("---- bspinfo ----\n" ); 24 | 25 | 26 | if (argc == 1) 27 | Error ("usage: bspinfo bspfile [bspfiles]"); 28 | 29 | for (i=1 ; i 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/bspinfo", HUGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/bspinfo", HUGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/common/lbmlib.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // lbmlib.h 12 | 13 | typedef unsigned char UBYTE; 14 | 15 | #ifndef _WINDOWS_ 16 | typedef short WORD; 17 | #endif 18 | 19 | typedef unsigned short UWORD; 20 | typedef long LONG; 21 | 22 | typedef enum 23 | { 24 | ms_none, 25 | ms_mask, 26 | ms_transcolor, 27 | ms_lasso 28 | } mask_t; 29 | 30 | typedef enum 31 | { 32 | cm_none, 33 | cm_rle1 34 | } compress_t; 35 | 36 | typedef struct 37 | { 38 | UWORD w,h; 39 | WORD x,y; 40 | UBYTE nPlanes; 41 | UBYTE masking; 42 | UBYTE compression; 43 | UBYTE pad1; 44 | UWORD transparentColor; 45 | UBYTE xAspect,yAspect; 46 | WORD pageWidth,pageHeight; 47 | } bmhd_t; 48 | 49 | extern bmhd_t bmhd; // will be in native byte order 50 | 51 | 52 | void LoadLBM (char *filename, byte **picture, byte **palette); 53 | int LoadBMP (const char* szFile, byte** ppbBits, byte** ppbPalette); 54 | void WriteLBMfile (char *filename, byte *data, int width, int height 55 | , byte *palette); 56 | int WriteBMPfile (char *szFile, byte *pbBits, int width, int height, byte *pbPalette); 57 | 58 | -------------------------------------------------------------------------------- /utils/common/mathlib.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #ifndef __MATHLIB__ 12 | #define __MATHLIB__ 13 | 14 | // mathlib.h 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #ifdef DOUBLEVEC_T 23 | typedef double vec_t; 24 | #else 25 | typedef float vec_t; 26 | #endif 27 | typedef vec_t vec3_t[3]; // x,y,z 28 | typedef vec_t vec4_t[4]; // x,y,z,w 29 | 30 | #define SIDE_FRONT 0 31 | #define SIDE_ON 2 32 | #define SIDE_BACK 1 33 | #define SIDE_CROSS -2 34 | 35 | #define Q_PI 3.14159265358979323846 36 | 37 | extern vec3_t vec3_origin; 38 | 39 | // Use this definition globally 40 | #define ON_EPSILON 0.01 41 | #define EQUAL_EPSILON 0.001 42 | 43 | int VectorCompare (vec3_t v1, vec3_t v2); 44 | 45 | #define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) 46 | #define VectorFill(a,b) { (a)[0]=(b); (a)[1]=(b); (a)[2]=(b);} 47 | #define VectorAvg(a) ( ( (a)[0] + (a)[1] + (a)[2] ) / 3 ) 48 | #define VectorSubtract(a,b,c) {(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];} 49 | #define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];} 50 | #define VectorCopy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];} 51 | #define VectorScale(a,b,c) {(c)[0]=(b)*(a)[0];(c)[1]=(b)*(a)[1];(c)[2]=(b)*(a)[2];} 52 | 53 | vec_t Q_rint (vec_t in); 54 | vec_t _DotProduct (vec3_t v1, vec3_t v2); 55 | void _VectorSubtract (vec3_t va, vec3_t vb, vec3_t out); 56 | void _VectorAdd (vec3_t va, vec3_t vb, vec3_t out); 57 | void _VectorCopy (vec3_t in, vec3_t out); 58 | void _VectorScale (vec3_t v, vec_t scale, vec3_t out); 59 | 60 | double VectorLength(vec3_t v); 61 | 62 | void VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc); 63 | 64 | void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross); 65 | vec_t VectorNormalize (vec3_t v); 66 | void VectorInverse (vec3_t v); 67 | 68 | void ClearBounds (vec3_t mins, vec3_t maxs); 69 | void AddPointToBounds (vec3_t v, vec3_t mins, vec3_t maxs); 70 | 71 | void AngleMatrix (const vec3_t angles, float matrix[3][4] ); 72 | void AngleIMatrix (const vec3_t angles, float matrix[3][4] ); 73 | void R_ConcatTransforms (const float in1[3][4], const float in2[3][4], float out[3][4]); 74 | 75 | void VectorIRotate (const vec3_t in1, const float in2[3][4], vec3_t out); 76 | void VectorRotate (const vec3_t in1, const float in2[3][4], vec3_t out); 77 | 78 | void VectorTransform (const vec3_t in1, const float in2[3][4], vec3_t out); 79 | 80 | void AngleQuaternion( const vec3_t angles, vec4_t quaternion ); 81 | void QuaternionMatrix( const vec4_t quaternion, float (*matrix)[4] ); 82 | void QuaternionSlerp( const vec4_t p, vec4_t q, float t, vec4_t qt ); 83 | 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /utils/common/movie.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #ifndef _MOVIE_H_ 12 | #define _MOVIE_H_ 13 | 14 | /* 15 | movie.h 16 | 17 | definitions and such for dumping screen shots to make a movie 18 | */ 19 | 20 | typedef struct 21 | { 22 | unsigned long tag; 23 | unsigned long size; 24 | } movieblockheader_t; 25 | 26 | 27 | typedef struct 28 | { 29 | short width; 30 | short height; 31 | short depth; 32 | } movieframe_t; 33 | 34 | 35 | 36 | #endif _MOVIE_H_ 37 | -------------------------------------------------------------------------------- /utils/common/polylib.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | 12 | typedef struct 13 | { 14 | int numpoints; 15 | vec3_t p[8]; // variable sized 16 | } winding_t; 17 | 18 | #define MAX_POINTS_ON_WINDING 128 19 | 20 | winding_t *AllocWinding (int points); 21 | vec_t WindingArea (winding_t *w); 22 | void WindingCenter (winding_t *w, vec3_t center); 23 | void ClipWinding (winding_t *in, vec3_t normal, vec_t dist, 24 | winding_t **front, winding_t **back); 25 | void ClipWindingNoCopy (winding_t *in, vec3_t normal, vec_t dist, 26 | winding_t **front, winding_t **back); 27 | winding_t *ChopWinding (winding_t *in, vec3_t normal, vec_t dist); 28 | winding_t *ChopWindingNoFree (winding_t *in, vec3_t normal, vec_t dist); 29 | winding_t *CopyWinding (winding_t *w); 30 | winding_t *BaseWindingForPlane (vec3_t normal, float dist); 31 | void CheckWinding (winding_t *w); 32 | void WindingPlane (winding_t *w, vec3_t normal, vec_t *dist); 33 | void RemoveColinearPoints (winding_t *w); 34 | int WindingOnPlaneSide (winding_t *w, vec3_t normal, vec_t dist); 35 | void FreeWinding (winding_t *w); 36 | void WindingBounds (winding_t *w, vec3_t mins, vec3_t maxs); 37 | -------------------------------------------------------------------------------- /utils/common/scriplib.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // scriplib.h 12 | 13 | #ifndef __CMDLIB__ 14 | #include "cmdlib.h" 15 | #endif 16 | 17 | #define MAXTOKEN 512 18 | 19 | extern char token[MAXTOKEN]; 20 | extern char *scriptbuffer,*script_p,*scriptend_p; 21 | extern int grabbed; 22 | extern int scriptline; 23 | extern qboolean endofscript; 24 | 25 | 26 | void LoadScriptFile (char *filename); 27 | void ParseFromMemory (char *buffer, int size); 28 | 29 | qboolean GetToken (qboolean crossline); 30 | void UnGetToken (void); 31 | qboolean TokenAvailable (void); 32 | 33 | 34 | -------------------------------------------------------------------------------- /utils/common/threads.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | extern int numthreads; 12 | 13 | void ThreadSetDefault (void); 14 | int GetThreadWork (void); 15 | void RunThreadsOnIndividual (int workcnt, qboolean showpacifier, void(*func)(int)); 16 | void RunThreadsOn (int workcnt, qboolean showpacifier, void(*func)(int)); 17 | void ThreadLock (void); 18 | void ThreadUnlock (void); 19 | 20 | #ifndef NO_THREAD_NAMES 21 | #define RunThreadsOn(n,p,f) { if (p) printf("%-20s ", #f ":"); RunThreadsOn(n,p,f); } 22 | #define RunThreadsOnIndividual(n,p,f) { if (p) printf("%-20s ", #f ":"); RunThreadsOnIndividual(n,p,f); } 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /utils/common/trilib.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // 12 | // trilib.h: header file for loading triangles from an Alias triangle file 13 | // 14 | #define MAXTRIANGLES 2048 15 | 16 | typedef struct { 17 | vec3_t verts[3]; 18 | } triangle_t; 19 | 20 | void LoadTriangleList (char *filename, triangle_t **pptri, int *numtriangles); 21 | 22 | -------------------------------------------------------------------------------- /utils/common/wadlib.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // wadlib.h 12 | 13 | // 14 | // wad reading 15 | // 16 | 17 | #define CMP_NONE 0 18 | #define CMP_LZSS 1 19 | 20 | #define TYP_NONE 0 21 | #define TYP_LABEL 1 22 | #define TYP_LUMPY 64 // 64 + grab command number 23 | 24 | typedef struct 25 | { 26 | char identification[4]; // should be WAD2 or 2DAW 27 | int numlumps; 28 | int infotableofs; 29 | } wadinfo_t; 30 | 31 | 32 | typedef struct 33 | { 34 | int filepos; 35 | int disksize; 36 | int size; // uncompressed 37 | char type; 38 | char compression; 39 | char pad1, pad2; 40 | char name[16]; // must be null terminated 41 | } lumpinfo_t; 42 | 43 | extern lumpinfo_t *lumpinfo; // location of each lump on disk 44 | extern int numlumps; 45 | extern wadinfo_t header; 46 | 47 | void W_OpenWad (char *filename); 48 | int W_CheckNumForName (char *name); 49 | int W_GetNumForName (char *name); 50 | int W_LumpLength (int lump); 51 | void W_ReadLumpNum (int lump, void *dest); 52 | void *W_LoadLumpNum (int lump); 53 | void *W_LoadLumpName (char *name); 54 | 55 | void CleanupName (char *in, char *out); 56 | 57 | // 58 | // wad creation 59 | // 60 | void NewWad (char *pathname, qboolean bigendien); 61 | void AddLump (char *name, void *buffer, int length, int type, int compress); 62 | void WriteWad (int wad3); 63 | 64 | -------------------------------------------------------------------------------- /utils/light/light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/light/light.c -------------------------------------------------------------------------------- /utils/light/light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/light/light.h -------------------------------------------------------------------------------- /utils/light/ltface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/light/ltface.c -------------------------------------------------------------------------------- /utils/light/trace.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/light/trace.c -------------------------------------------------------------------------------- /utils/makefont/msvc6/makefont.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "makefont"=.\makefont.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /utils/makels/msvc6/makels.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "makels"=.\makels.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/makels", OUGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/makels", OUGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/mdlviewer/mdlviewer.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | typedef unsigned char byte; 12 | 13 | class StudioModel 14 | { 15 | public: 16 | void Init( char *modelname ); 17 | void DrawModel( void ); 18 | void AdvanceFrame( float dt ); 19 | 20 | void ExtractBbox( float *mins, float *maxs ); 21 | 22 | int SetSequence( int iSequence ); 23 | int GetSequence( void ); 24 | void GetSequenceInfo( float *pflFrameRate, float *pflGroundSpeed ); 25 | 26 | float SetController( int iController, float flValue ); 27 | float SetMouth( float flValue ); 28 | float SetBlending( int iBlender, float flValue ); 29 | int SetBodygroup( int iGroup, int iValue ); 30 | int SetSkin( int iValue ); 31 | 32 | private: 33 | // entity settings 34 | vec3_t m_origin; 35 | vec3_t m_angles; 36 | int m_sequence; // sequence index 37 | float m_frame; // frame 38 | int m_bodynum; // bodypart selection 39 | int m_skinnum; // skin group selection 40 | byte m_controller[4]; // bone controllers 41 | byte m_blending[2]; // animation blending 42 | byte m_mouth; // mouth position 43 | 44 | // internal data 45 | studiohdr_t *m_pstudiohdr; 46 | mstudiomodel_t *m_pmodel; 47 | 48 | studiohdr_t *m_ptexturehdr; 49 | studioseqhdr_t *m_panimhdr[32]; 50 | 51 | vec4_t m_adj; // FIX: non persistant, make static 52 | 53 | studiohdr_t *LoadModel( char *modelname ); 54 | studioseqhdr_t *LoadDemandSequences( char *modelname ); 55 | 56 | void CalcBoneAdj( void ); 57 | void CalcBoneQuaternion( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *q ); 58 | void CalcBonePosition( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *pos ); 59 | void CalcRotations ( vec3_t *pos, vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f ); 60 | mstudioanim_t *GetAnim( mstudioseqdesc_t *pseqdesc ); 61 | void SlerpBones( vec4_t q1[], vec3_t pos1[], vec4_t q2[], vec3_t pos2[], float s ); 62 | void SetUpBones ( void ); 63 | 64 | void DrawPoints( void ); 65 | 66 | void Lighting (float *lv, int bone, int flags, vec3_t normal); 67 | void Chrome (int *chrome, int bone, vec3_t normal); 68 | 69 | void SetupLighting( void ); 70 | 71 | void SetupModel ( int bodypart ); 72 | 73 | void UploadTexture( mstudiotexture_t *ptexture, byte *data, byte *pal ); 74 | }; 75 | 76 | extern vec3_t g_vright; // needs to be set to viewer's right in order for chrome to work 77 | extern float g_lambert; // modifier for pseudo-hemispherical lighting 78 | 79 | -------------------------------------------------------------------------------- /utils/mdlviewer/msvc6/mdlviewer.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "mdlviewer"=".\mdlviewer.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /utils/procinfo/lib/win32_vc6/procinfo.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/procinfo/lib/win32_vc6/procinfo.lib -------------------------------------------------------------------------------- /utils/procinfo/procinfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/procinfo/procinfo.h -------------------------------------------------------------------------------- /utils/qbsp2/cull.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // cull.c 12 | 13 | #include "bsp5.h" 14 | 15 | /* 16 | 17 | removes unused planes and nodes 18 | 19 | */ 20 | 21 | /* 22 | ============= 23 | CullStuff 24 | ============= 25 | */ 26 | void CullStuff (void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /utils/qbsp2/gldraw.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "bsp5.h" 17 | 18 | vec3_t draw_mins, draw_maxs; 19 | 20 | void Draw_ClearBounds (void) 21 | { 22 | } 23 | 24 | void Draw_AddToBounds (vec3_t v) 25 | { 26 | } 27 | 28 | void Draw_DrawFace (face_t *f) 29 | { 30 | int i; 31 | 32 | if (!drawflag) 33 | return; 34 | 35 | glColor4f (0,0,0,0.5); 36 | glBegin (GL_LINE_LOOP); 37 | for (i=0 ; inumpoints ; i++) 38 | glVertex3f (f->pts[i][0], f->pts[i][1], f->pts[i][2]); 39 | glEnd (); 40 | 41 | glColor4f (0,1,0,0.3); 42 | glBegin (GL_POLYGON); 43 | for (i=0 ; inumpoints ; i++) 44 | glVertex3f (f->pts[i][0], f->pts[i][1], f->pts[i][2]); 45 | glEnd (); 46 | 47 | glFlush (); 48 | } 49 | 50 | #define WIN_SIZE 512 51 | 52 | void InitWindow (void) 53 | { 54 | auxInitDisplayMode (AUX_SINGLE | AUX_RGB); 55 | auxInitPosition (0, 0, WIN_SIZE, WIN_SIZE); 56 | auxInitWindow ("qbsp"); 57 | } 58 | 59 | void Draw_ClearWindow (void) 60 | { 61 | static int init; 62 | int w, h, g; 63 | float mx, my; 64 | 65 | if (!drawflag) 66 | return; 67 | 68 | if (!init) 69 | { 70 | init = true; 71 | InitWindow (); 72 | } 73 | 74 | glClearColor (1,0.8,0.8,0); 75 | glClear (GL_COLOR_BUFFER_BIT); 76 | 77 | w = (draw_maxs[0] - draw_mins[0]); 78 | h = (draw_maxs[1] - draw_mins[1]); 79 | 80 | mx = draw_mins[0] + w/2; 81 | my = draw_mins[1] + h/2; 82 | 83 | g = w > h ? w : h; 84 | 85 | glLoadIdentity (); 86 | gluPerspective (90, 1, 2, 16384); 87 | gluLookAt (mx, my, draw_maxs[2] + g/2, mx , my, draw_maxs[2], 0, 1, 0); 88 | 89 | glColor4f (0,0,0,1); 90 | // glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); 91 | glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); 92 | glDisable (GL_DEPTH_TEST); 93 | glDisable (GL_CULL_FACE); 94 | glEnable (GL_BLEND); 95 | glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 96 | 97 | #if 0 98 | glBegin (GL_POLYGON); 99 | 100 | glVertex3f (mx, my, draw_mins[2]); 101 | glVertex3f (mx, my+100, draw_mins[2]); 102 | glVertex3f (mx, my+100, draw_mins[2]+100); 103 | glVertex3f (mx, my, draw_mins[2]+100); 104 | 105 | glEnd (); 106 | #endif 107 | glFlush (); 108 | 109 | } 110 | 111 | void Draw_SetRed (void) 112 | { 113 | if (!drawflag) 114 | return; 115 | 116 | glColor3f (1,0,0); 117 | } 118 | 119 | void Draw_SetGrey (void) 120 | { 121 | if (!drawflag) 122 | return; 123 | 124 | glColor3f (0.5,0.5,0.5); 125 | } 126 | 127 | void Draw_SetBlack (void) 128 | { 129 | if (!drawflag) 130 | return; 131 | 132 | glColor3f (0,0,0); 133 | } 134 | 135 | void DrawPoint (vec3_t v) 136 | { 137 | } 138 | 139 | void DrawLeaf (node_t *l, int color) 140 | { 141 | } 142 | 143 | void DrawWinding (winding_t *w) 144 | { 145 | int i; 146 | 147 | if (!drawflag) 148 | return; 149 | 150 | glBegin (GL_POLYGON); 151 | for (i=0 ; inumpoints ; i++) 152 | glVertex3f (w->points[i][0], w->points[i][1], w->points[i][2]); 153 | glEnd (); 154 | glFlush (); 155 | } 156 | 157 | void DrawTri (vec3_t p1, vec3_t p2, vec3_t p3) 158 | { 159 | } 160 | 161 | void DrawPortal (portal_t *portal) 162 | { 163 | DrawWinding (portal->winding); 164 | } 165 | -------------------------------------------------------------------------------- /utils/qbsp2/msvc6/qbsp2.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "qbsp2"=.\qbsp2.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /utils/qbsp2/nodraw.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #include "bsp5.h" 12 | 13 | void Draw_ClearBounds (void) 14 | { 15 | } 16 | 17 | void Draw_AddToBounds (vec3_t v) 18 | { 19 | } 20 | 21 | void Draw_DrawFace (face_t *f) 22 | { 23 | } 24 | 25 | void Draw_ClearWindow (void) 26 | { 27 | } 28 | 29 | void Draw_SetRed (void) 30 | { 31 | } 32 | 33 | void Draw_SetGrey (void) 34 | { 35 | } 36 | 37 | void Draw_SetBlack (void) 38 | { 39 | } 40 | 41 | void DrawPoint (vec3_t v) 42 | { 43 | } 44 | 45 | void DrawLeaf (node_t *l, int color) 46 | { 47 | } 48 | 49 | void DrawWinding (winding_t *w) 50 | { 51 | } 52 | 53 | void DrawTri (vec3_t p1, vec3_t p2, vec3_t p3) 54 | { 55 | } 56 | 57 | void DrawPortal (portal_t *portal) 58 | { 59 | } 60 | -------------------------------------------------------------------------------- /utils/qcsg/csg.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | 12 | #include "cmdlib.h" 13 | #include "mathlib.h" 14 | #include "scriplib.h" 15 | #include "polylib.h" 16 | #include "threads.h" 17 | #include "bspfile.h" 18 | 19 | #include 20 | 21 | #ifndef DOUBLEVEC_T 22 | #error you must add -dDOUBLEVEC_T to the project! 23 | #endif 24 | 25 | #define BOGUS_RANGE 8192 26 | 27 | typedef struct 28 | { 29 | vec3_t normal; 30 | vec_t dist; 31 | int type; 32 | int iorigin[3]; 33 | int inormal[3]; 34 | } plane_t; 35 | 36 | 37 | extern plane_t mapplanes[MAX_MAP_PLANES]; 38 | extern int nummapplanes; 39 | 40 | extern int g_nMapFileVersion; // map file version * 100 (ie 201), zero for pre-Worldcraft 2.0.1 maps 41 | 42 | typedef struct 43 | { 44 | vec3_t UAxis; 45 | vec3_t VAxis; 46 | vec_t shift[2]; 47 | vec_t rotate; 48 | vec_t scale[2]; 49 | char name[32]; 50 | } brush_texture_t; 51 | 52 | typedef struct side_s 53 | { 54 | brush_texture_t td; 55 | int planepts[3][3]; 56 | } side_t; 57 | 58 | typedef struct bface_s 59 | { 60 | struct bface_s *next; 61 | int planenum; 62 | plane_t *plane; 63 | winding_t *w; 64 | int texinfo; 65 | qboolean used; // just for face counting 66 | int contents, backcontents; 67 | vec3_t mins, maxs; 68 | } bface_t; 69 | 70 | #define NUM_HULLS 4 // no larger than MAX_MAP_HULLS 71 | typedef struct 72 | { 73 | vec3_t mins, maxs; 74 | bface_t *faces; 75 | } brushhull_t; 76 | 77 | typedef struct brush_s 78 | { 79 | int entitynum; 80 | int brushnum; 81 | 82 | int firstside; 83 | int numsides; 84 | 85 | int contents; 86 | brushhull_t hulls[NUM_HULLS]; 87 | } brush_t; 88 | 89 | 90 | extern int nummapbrushes; 91 | extern brush_t mapbrushes[MAX_MAP_BRUSHES]; 92 | 93 | #define MAX_MAP_SIDES (MAX_MAP_BRUSHES*6) 94 | 95 | extern int numbrushplanes; 96 | extern plane_t planes[MAX_MAP_PLANES]; 97 | 98 | extern int numbrushsides; 99 | extern side_t brushsides[MAX_MAP_SIDES]; 100 | 101 | extern qboolean noclip; 102 | extern qboolean wadtextures; 103 | 104 | int nWadInclude; 105 | char *pszWadInclude[]; 106 | 107 | void LoadMapFile (char *filename); 108 | 109 | //============================================================================= 110 | 111 | // textures.c 112 | 113 | extern int nummiptex; 114 | void WriteMiptex (void); 115 | int TexinfoForBrushTexture (plane_t *plane, brush_texture_t *bt, vec3_t origin); 116 | 117 | //============================================================================= 118 | 119 | // brush.c 120 | 121 | void FindGCD (int *v); 122 | 123 | brush_t *Brush_LoadEntity (entity_t *ent, int hullnum); 124 | int PlaneTypeForNormal (vec3_t normal); 125 | 126 | void CreateBrush (int brushnum); 127 | 128 | //============================================================================= 129 | 130 | // csg.c 131 | 132 | bface_t *NewFaceFromFace (bface_t *in); 133 | extern qboolean onlyents; 134 | 135 | //============================================================================= 136 | 137 | // draw.c 138 | 139 | extern vec3_t draw_mins, draw_maxs; 140 | extern qboolean drawflag; 141 | 142 | void Draw_ClearWindow (void); 143 | void DrawWinding (winding_t *w); 144 | 145 | -------------------------------------------------------------------------------- /utils/qcsg/gldraw.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "csg.h" 18 | 19 | // can't use the glvertex3fv functions, because the vec3_t fields 20 | // could be either floats or doubles, depending on DOUBLEVEC_T 21 | 22 | qboolean drawflag; 23 | vec3_t draw_mins, draw_maxs; 24 | 25 | 26 | #define WIN_SIZE 512 27 | 28 | void InitWindow (void) 29 | { 30 | auxInitDisplayMode (AUX_SINGLE | AUX_RGB); 31 | auxInitPosition (0, 0, WIN_SIZE, WIN_SIZE); 32 | auxInitWindow ("qcsg"); 33 | } 34 | 35 | void Draw_ClearWindow (void) 36 | { 37 | static int init; 38 | int w, h, g; 39 | vec_t mx, my; 40 | 41 | if (!drawflag) 42 | return; 43 | 44 | if (!init) 45 | { 46 | init = true; 47 | InitWindow (); 48 | } 49 | 50 | glClearColor (1,0.8,0.8,0); 51 | glClear (GL_COLOR_BUFFER_BIT); 52 | 53 | w = (draw_maxs[0] - draw_mins[0]); 54 | h = (draw_maxs[1] - draw_mins[1]); 55 | 56 | mx = draw_mins[0] + w/2; 57 | my = draw_mins[1] + h/2; 58 | 59 | g = w > h ? w : h; 60 | 61 | glLoadIdentity (); 62 | gluPerspective (90, 1, 2, 16384); 63 | gluLookAt (mx, my, draw_maxs[2] + g/2, mx , my, draw_maxs[2], 0, 1, 0); 64 | 65 | glColor3f (0,0,0); 66 | // glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); 67 | glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); 68 | glDisable (GL_DEPTH_TEST); 69 | glEnable (GL_BLEND); 70 | glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 71 | 72 | #if 0 73 | glColor4f (1,0,0,0.5); 74 | glBegin (GL_POLYGON); 75 | 76 | glVertex3f (0, 500, 0); 77 | glVertex3f (0, 900, 0); 78 | glVertex3f (0, 900, 100); 79 | glVertex3f (0, 500, 100); 80 | 81 | glEnd (); 82 | #endif 83 | 84 | glFlush (); 85 | 86 | } 87 | 88 | void Draw_SetRed (void) 89 | { 90 | if (!drawflag) 91 | return; 92 | 93 | glColor3f (1,0,0); 94 | } 95 | 96 | void Draw_SetGrey (void) 97 | { 98 | if (!drawflag) 99 | return; 100 | 101 | glColor3f (0.5,0.5,0.5); 102 | } 103 | 104 | void Draw_SetBlack (void) 105 | { 106 | if (!drawflag) 107 | return; 108 | 109 | glColor3f (0,0,0); 110 | } 111 | 112 | void DrawWinding (winding_t *w) 113 | { 114 | int i; 115 | 116 | if (!drawflag) 117 | return; 118 | 119 | glColor4f (0,0,0,0.5); 120 | glBegin (GL_LINE_LOOP); 121 | for (i=0 ; inumpoints ; i++) 122 | glVertex3f (w->p[i][0],w->p[i][1],w->p[i][2] ); 123 | glEnd (); 124 | 125 | glColor4f (0,1,0,0.3); 126 | glBegin (GL_POLYGON); 127 | for (i=0 ; inumpoints ; i++) 128 | glVertex3f (w->p[i][0],w->p[i][1],w->p[i][2] ); 129 | glEnd (); 130 | 131 | glFlush (); 132 | } 133 | 134 | void DrawAuxWinding (winding_t *w) 135 | { 136 | int i; 137 | 138 | if (!drawflag) 139 | return; 140 | 141 | glColor4f (0,0,0,0.5); 142 | glBegin (GL_LINE_LOOP); 143 | for (i=0 ; inumpoints ; i++) 144 | glVertex3f (w->p[i][0],w->p[i][1],w->p[i][2] ); 145 | glEnd (); 146 | 147 | glColor4f (1,0,0,0.3); 148 | glBegin (GL_POLYGON); 149 | for (i=0 ; inumpoints ; i++) 150 | glVertex3f (w->p[i][0],w->p[i][1],w->p[i][2] ); 151 | glEnd (); 152 | 153 | glFlush (); 154 | } 155 | -------------------------------------------------------------------------------- /utils/qcsg/hullfile.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #include "csg.h" 12 | 13 | extern vec3_t hull_size[NUM_HULLS][2]; 14 | /* 15 | ============ 16 | CheckHullFile 17 | ============ 18 | */ 19 | void CheckHullFile( qboolean hullfile, char *filename ) 20 | { 21 | FILE *f; 22 | char scan[ 128 ]; 23 | vec3_t new_hulls[NUM_HULLS][2]; 24 | qboolean read_error = false; 25 | int i; 26 | 27 | if ( !hullfile ) 28 | return; 29 | 30 | // Open up hull file 31 | f = fopen (filename, "r"); 32 | if ( !f ) 33 | { 34 | printf ("WARNING: Couldn't open hullfile %s, using default hulls", filename ); 35 | return; 36 | } 37 | else 38 | { 39 | printf("[Reading hulls from '%s']\n", filename); 40 | } 41 | 42 | for ( i = 0 ; i < NUM_HULLS; i++ ) 43 | { 44 | float x1, y1, z1, x2, y2, z2; 45 | 46 | vec3_t mins, maxs; 47 | int argCnt; 48 | 49 | if ( !fgets(scan, sizeof(scan), f ) ) 50 | { 51 | printf ("WARNING: Error parsing %s, couln't read hull line %i, using default hulls", filename, i ); 52 | read_error = true; 53 | break; 54 | } 55 | 56 | argCnt = sscanf (scan, "( %f %f %f ) ( %f %f %f ) ", &x1, &y1, &z1, &x2, &y2, &z2 ); 57 | if ( argCnt != 6 ) 58 | { 59 | printf ("WARNING: Error parsing %s, expeciting '( x y z ) ( x y z )' using default hulls", filename ); 60 | read_error = true; 61 | break; 62 | } 63 | else 64 | { 65 | mins[0] = x1; 66 | mins[1] = y1; 67 | mins[2] = z1; 68 | maxs[0] = x2; 69 | maxs[1] = y2; 70 | maxs[2] = z2; 71 | } 72 | 73 | VectorCopy( mins, new_hulls[ i ][ 0 ] ); 74 | VectorCopy( maxs, new_hulls[ i ][ 1 ] ); 75 | } 76 | 77 | if ( read_error ) 78 | { 79 | printf ("WARNING: Error parsing %s, using default hulls", filename ); 80 | } 81 | else 82 | { 83 | memcpy( hull_size, new_hulls, 2 * NUM_HULLS * sizeof( vec3_t ) ); 84 | } 85 | 86 | fclose( f ); 87 | } 88 | -------------------------------------------------------------------------------- /utils/qcsg/hulls.txt: -------------------------------------------------------------------------------- 1 | ( 0 0 0 ) ( 0 0 0 ) 2 | ( -16 -16 -24 ) ( 16 16 32 ) 3 | ( -32 -32 -32 ) ( 32 32 32 ) 4 | ( -16 -16 -24 ) ( 16 16 32 ) 5 | -------------------------------------------------------------------------------- /utils/qcsg/msvc6/qcsg.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "qcsg"=.\qcsg.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/qcsg", XUGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/qcsg", XUGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/qlumpy/msvc6/qlumpy.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "qlumpy"=.\qlumpy.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/qlumpy", BVGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/qlumpy", BVGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/qlumpy/qlumpy.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #include "cmdlib.h" 12 | #include "scriplib.h" 13 | #include "lbmlib.h" 14 | #include "wadlib.h" 15 | 16 | 17 | extern byte *byteimage, *lbmpalette; 18 | extern int byteimagewidth, byteimageheight; 19 | 20 | #define SCRN(x,y) (*(byteimage+(y)*byteimagewidth+x)) 21 | 22 | extern byte *lump_p; 23 | extern byte *lumpbuffer; 24 | 25 | extern char lumpname[]; 26 | 27 | -------------------------------------------------------------------------------- /utils/qrad/msvc6/qrad.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "qrad"=.\qrad.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/qrad", FVGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/qrad", FVGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/serverctrl/ServerCtrl.cpp: -------------------------------------------------------------------------------- 1 | // ServerCtrl.cpp : Defines the class behaviors for the application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "ServerCtrl.h" 6 | #include "ServerCtrlDlg.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CServerCtrlApp 16 | 17 | BEGIN_MESSAGE_MAP(CServerCtrlApp, CWinApp) 18 | //{{AFX_MSG_MAP(CServerCtrlApp) 19 | //}}AFX_MSG 20 | ON_COMMAND(ID_HELP, CWinApp::OnHelp) 21 | END_MESSAGE_MAP() 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // CServerCtrlApp construction 25 | 26 | CServerCtrlApp::CServerCtrlApp() 27 | { 28 | } 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // The one and only CServerCtrlApp object 32 | 33 | CServerCtrlApp theApp; 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | // CServerCtrlApp initialization 37 | 38 | BOOL CServerCtrlApp::InitInstance() 39 | { 40 | // Standard initialization 41 | 42 | CServerCtrlDlg dlg; 43 | m_pMainWnd = &dlg; 44 | int nResponse = dlg.DoModal(); 45 | if (nResponse == IDOK) 46 | { 47 | } 48 | else if (nResponse == IDCANCEL) 49 | { 50 | } 51 | 52 | // Since the dialog has been closed, return FALSE so that we exit the 53 | // application, rather than start the application's message pump. 54 | return FALSE; 55 | } 56 | -------------------------------------------------------------------------------- /utils/serverctrl/ServerCtrl.h: -------------------------------------------------------------------------------- 1 | // ServerCtrl.h : main header file for the ServerCtrl application 2 | // 3 | 4 | #if !defined(AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 5 | #define AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #ifdef _WIN32 9 | #ifndef __MINGW32__ 10 | #pragma once 11 | #endif /* not __MINGW32__ */ 12 | #endif 13 | #endif // _MSC_VER > 1000 14 | 15 | #if defined _MSC_VER && _MSC_VER >= 1400 16 | #ifndef _CRT_SECURE_NO_DEPRECATE 17 | #define _CRT_SECURE_NO_DEPRECATE 18 | #endif 19 | 20 | #pragma warning(disable: 4996) // deprecated functions 21 | #endif 22 | 23 | #ifndef __AFXWIN_H__ 24 | #error include 'stdafx.h' before including this file for PCH 25 | #endif 26 | 27 | #include "resource.h" // main symbols 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // CServerCtrlApp: 31 | // See ServerCtrl.cpp for the implementation of this class 32 | // 33 | 34 | class CServerCtrlApp : public CWinApp 35 | { 36 | public: 37 | CServerCtrlApp(); 38 | 39 | // Overrides 40 | // ClassWizard generated virtual function overrides 41 | //{{AFX_VIRTUAL(CServerCtrlApp) 42 | public: 43 | virtual BOOL InitInstance(); 44 | //}}AFX_VIRTUAL 45 | 46 | // Implementation 47 | 48 | //{{AFX_MSG(CServerCtrlApp) 49 | //}}AFX_MSG 50 | DECLARE_MESSAGE_MAP() 51 | }; 52 | 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | 56 | //{{AFX_INSERT_LOCATION}} 57 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 58 | 59 | #endif // !defined(AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 60 | -------------------------------------------------------------------------------- /utils/serverctrl/ServerCtrlDlg.h: -------------------------------------------------------------------------------- 1 | // ServerCtrlDlg.h : header file 2 | // 3 | 4 | #if !defined(AFX_ServerCtrlDLG_H__E2974CA8_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 5 | #define AFX_ServerCtrlDLG_H__E2974CA8_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #ifdef _WIN32 9 | #ifndef __MINGW32__ 10 | #pragma once 11 | #endif /* not __MINGW32__ */ 12 | #endif 13 | #endif // _MSC_VER > 1000 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CServerCtrlDlg dialog 17 | 18 | class CServerCtrlDlg : public CDialog 19 | { 20 | // Construction 21 | public: 22 | CServerCtrlDlg( CWnd* pParent = NULL ); // standard constructor 23 | ~CServerCtrlDlg( void ); 24 | 25 | void CloseHandles( void ); 26 | 27 | virtual int RMLPreIdle(void); 28 | 29 | int RunModalLoop(DWORD dwFlags); 30 | int DoModal( void ); 31 | 32 | void SetPumpIfQueued( BOOL bValue ); 33 | 34 | void RefreshText( void ); 35 | 36 | int ProcessMappedResponse( void ); 37 | LPVOID GetMappedBuffer ( HANDLE hfileBuffer ); 38 | void ReleaseMappedBuffer ( LPVOID pBuffer ); 39 | 40 | // Dialog Data 41 | //{{AFX_DATA(CServerCtrlDlg) 42 | enum { IDD = IDD_SERVERCTRL_DIALOG }; 43 | // NOTE: the ClassWizard will add data members here 44 | //}}AFX_DATA 45 | 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CServerCtrlDlg) 48 | protected: 49 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | HICON m_hIcon; 55 | 56 | // Generated message map functions 57 | //{{AFX_MSG(CServerCtrlDlg) 58 | virtual BOOL OnInitDialog(); 59 | afx_msg void OnPaint(); 60 | afx_msg HCURSOR OnQueryDragIcon(); 61 | afx_msg void OnBtnStart(); 62 | afx_msg void OnBtnExecute(); 63 | afx_msg void OnBtnGet(); 64 | //}}AFX_MSG 65 | DECLARE_MESSAGE_MAP() 66 | 67 | private: 68 | 69 | PROCESS_INFORMATION PI; // Information about the HLDS process ( mostly the HANDLE ) 70 | HANDLE m_hMappedFile; // Shared file for sending/receiving commands to HLDS 71 | HANDLE m_hSend; // Event that will be signaled when we have written commands into mapped file 72 | HANDLE m_hReceive; // Engine will set this when it has readied response to our commands 73 | 74 | int m_nPendingRequest; // The last request we issued 75 | int m_nPendingLines; // Number of console lines we want to receive 76 | 77 | BOOL m_bOnlyPumpIfMessageInQueue; // TRUE if we should only go into PumpMessage ( which blocks ) if we have seen a message in the MSG queue using PeekMessage 78 | }; 79 | 80 | //{{AFX_INSERT_LOCATION}} 81 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 82 | 83 | #endif // !defined(AFX_ServerCtrlDLG_H__E2974CA8_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 84 | -------------------------------------------------------------------------------- /utils/serverctrl/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // serverctrl.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /utils/serverctrl/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 7 | #define AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #ifdef _WIN32 11 | #ifndef __MINGW32__ 12 | #pragma once 13 | #endif /* not __MINGW32__ */ 14 | #endif 15 | #endif // _MSC_VER > 1000 16 | 17 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 18 | 19 | #include // MFC core and standard components 20 | #include // MFC extensions 21 | #include // MFC support for Internet Explorer 4 Common Controls 22 | #ifndef _AFX_NO_AFXCMN_SUPPORT 23 | #include // MFC support for Windows Common Controls 24 | #endif // _AFX_NO_AFXCMN_SUPPORT 25 | 26 | 27 | //{{AFX_INSERT_LOCATION}} 28 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 29 | 30 | #endif // !defined(AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 31 | -------------------------------------------------------------------------------- /utils/serverctrl/res/serverctrl.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/serverctrl/res/serverctrl.ico -------------------------------------------------------------------------------- /utils/serverctrl/res/serverctrl.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // SERVERCTRL.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /utils/serverctrl/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by serverctrl.rc 4 | // 5 | #define IDD_SERVERCTRL_DIALOG 102 6 | #define IDR_MAINFRAME 128 7 | #define IDC_EDIT_COMMANDS 1000 8 | #define IDC_BTN_EXECUTE 1001 9 | #define IDC_BTN_START 1003 10 | #define IDC_BTN_GET 1004 11 | #define IDC_EDIT_CONSOLE 1005 12 | 13 | // Next default values for new objects 14 | // 15 | #ifdef APSTUDIO_INVOKED 16 | #ifndef APSTUDIO_READONLY_SYMBOLS 17 | #define _APS_NEXT_RESOURCE_VALUE 129 18 | #define _APS_NEXT_COMMAND_VALUE 32771 19 | #define _APS_NEXT_CONTROL_VALUE 1006 20 | #define _APS_NEXT_SYMED_VALUE 101 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /utils/smdlexp/smdlexp.def: -------------------------------------------------------------------------------- 1 | LIBRARY smdlexp 2 | EXPORTS 3 | LibDescription @1 4 | LibNumberClasses @2 5 | LibClassDesc @3 6 | LibVersion @4 7 | SECTIONS 8 | .data READ WRITE 9 | -------------------------------------------------------------------------------- /utils/smdlexp/smdlexp.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "smdlexp"=.\smdlexp.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/smdlexp", GVGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | }}} 27 | 28 | Package=<3> 29 | {{{ 30 | }}} 31 | 32 | ############################################################################### 33 | 34 | -------------------------------------------------------------------------------- /utils/smdlexp/smdlexp.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/smdlexp/smdlexp.rc -------------------------------------------------------------------------------- /utils/smdlexp/smexprc.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by smdlexp.rc 4 | // 5 | #define IDD_SMDLEXP_UI 101 6 | #define IDD_EXPORTOPTIONS 101 7 | #define IDC_CHECK_SKELETAL 1000 8 | #define IDC_CHECK_DEFORM 1001 9 | #define IDC_CHECK_REFFRAME 1002 10 | #define IDC_CHECK_PHYSIQUE 1003 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 102 17 | #define _APS_NEXT_COMMAND_VALUE 40001 18 | #define _APS_NEXT_CONTROL_VALUE 1006 19 | #define _APS_NEXT_SYMED_VALUE 101 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/sprgen/msvc6/sprgen.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "sprgen"=.\sprgen.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/sprgen", HVGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/sprgen", HVGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/sprgen/spritegn.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // 12 | // spritegn.h: header file for sprite generation program 13 | // 14 | 15 | // ********************************************************** 16 | // * This file must be identical in the spritegen directory * 17 | // * and in the Quake directory, because it's used to * 18 | // * pass data from one to the other via .spr files. * 19 | // ********************************************************** 20 | 21 | //------------------------------------------------------- 22 | // This program generates .spr sprite package files. 23 | // The format of the files is as follows: 24 | // 25 | // dsprite_t file header structure 26 | // 27 | // 28 | // dspriteframe_t frame header structure 29 | // sprite bitmap 30 | // 31 | // dspriteframe_t frame header structure 32 | // sprite bitmap 33 | // 34 | //------------------------------------------------------- 35 | 36 | #ifdef INCLUDELIBS 37 | 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #include "cmdlib.h" 44 | #include "scriplib.h" 45 | #include "lbmlib.h" 46 | 47 | #endif 48 | 49 | #define SPRITE_VERSION 2 50 | 51 | // must match definition in modelgen.h 52 | #ifndef SYNCTYPE_T 53 | #define SYNCTYPE_T 54 | typedef enum {ST_SYNC=0, ST_RAND } synctype_t; 55 | #endif 56 | 57 | // TODO: shorten these? 58 | typedef struct { 59 | int ident; 60 | int version; 61 | int type; 62 | int texFormat; 63 | float boundingradius; 64 | int width; 65 | int height; 66 | int numframes; 67 | float beamlength; 68 | synctype_t synctype; 69 | } dsprite_t; 70 | 71 | #define SPR_VP_PARALLEL_UPRIGHT 0 72 | #define SPR_FACING_UPRIGHT 1 73 | #define SPR_VP_PARALLEL 2 74 | #define SPR_ORIENTED 3 75 | #define SPR_VP_PARALLEL_ORIENTED 4 76 | 77 | #define SPR_NORMAL 0 78 | #define SPR_ADDITIVE 1 79 | #define SPR_INDEXALPHA 2 80 | #define SPR_ALPHTEST 3 81 | 82 | typedef struct { 83 | int origin[2]; 84 | int width; 85 | int height; 86 | } dspriteframe_t; 87 | 88 | typedef struct { 89 | int numframes; 90 | } dspritegroup_t; 91 | 92 | typedef struct { 93 | float interval; 94 | } dspriteinterval_t; 95 | 96 | typedef enum { SPR_SINGLE=0, SPR_GROUP } spriteframetype_t; 97 | 98 | typedef struct { 99 | spriteframetype_t type; 100 | } dspriteframetype_t; 101 | 102 | #define IDSPRITEHEADER (('P'<<24)+('S'<<16)+('D'<<8)+'I') 103 | // little-endian "IDSP" 104 | 105 | -------------------------------------------------------------------------------- /utils/studiomdl/bmpread.c: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | #if defined _MSC_VER && _MSC_VER >= 1400 12 | #ifndef _CRT_SECURE_NO_DEPRECATE 13 | #define _CRT_SECURE_NO_DEPRECATE 14 | #endif 15 | 16 | #pragma warning(disable: 4996) // deprecated functions 17 | #endif 18 | 19 | 20 | #include 21 | #include 22 | 23 | 24 | int 25 | ReadBmpFile( 26 | char* szFile, 27 | unsigned char** ppbPalette, 28 | unsigned char** ppbBits, 29 | int *pwidth, 30 | int *pheight) 31 | { 32 | int rc = 0; 33 | FILE *pfile = NULL; 34 | BITMAPFILEHEADER bmfh; 35 | BITMAPINFOHEADER bmih; 36 | RGBQUAD rgrgbPalette[256]; 37 | ULONG cbPalBytes; 38 | ULONG cbBmpBits; 39 | BYTE* pbBmpBits; 40 | 41 | // Bogus parameter check 42 | if (!(ppbPalette != NULL && ppbBits != NULL)) 43 | { rc = -1000; goto GetOut; } 44 | 45 | // File exists? 46 | if ((pfile = fopen(szFile, "rb")) == NULL) 47 | { rc = -1; goto GetOut; } 48 | 49 | // Read file header 50 | if (fread(&bmfh, sizeof bmfh, 1/*count*/, pfile) != 1) 51 | { rc = -2; goto GetOut; } 52 | 53 | // Bogus file header check 54 | if (!(bmfh.bfReserved1 == 0 && bmfh.bfReserved2 == 0)) 55 | { rc = -2000; goto GetOut; } 56 | 57 | // Read info header 58 | if (fread(&bmih, sizeof bmih, 1/*count*/, pfile) != 1) 59 | { rc = -3; goto GetOut; } 60 | 61 | // Bogus info header check 62 | if (!(bmih.biSize == sizeof bmih && bmih.biPlanes == 1)) 63 | { rc = -3000; goto GetOut; } 64 | 65 | // Bogus bit depth? Only 8-bit supported. 66 | if (bmih.biBitCount != 8) 67 | { rc = -4; goto GetOut; } 68 | 69 | // Bogus compression? Only non-compressed supported. 70 | if (bmih.biCompression != BI_RGB) 71 | { rc = -5; goto GetOut; } 72 | 73 | // Figure out how many entires are actually in the table 74 | if (bmih.biClrUsed == 0) 75 | { 76 | cbPalBytes = (1 << bmih.biBitCount) * sizeof( RGBQUAD ); 77 | } 78 | else 79 | { 80 | cbPalBytes = bmih.biClrUsed * sizeof( RGBQUAD ); 81 | } 82 | 83 | // Read palette (256 entries) 84 | if (fread(rgrgbPalette, cbPalBytes, 1/*count*/, pfile) != 1) 85 | { rc = -6; goto GetOut; } 86 | 87 | // Read bitmap bits (remainder of file) 88 | cbBmpBits = bmfh.bfSize - ftell(pfile); 89 | pbBmpBits = malloc(cbBmpBits); 90 | if (fread(pbBmpBits, cbBmpBits, 1/*count*/, pfile) != 1) 91 | { rc = -7; goto GetOut; } 92 | 93 | // Set output parameters 94 | *ppbPalette = malloc(sizeof rgrgbPalette); 95 | memcpy(*ppbPalette, rgrgbPalette, cbPalBytes); 96 | *ppbBits = pbBmpBits; 97 | 98 | 99 | *pwidth = bmih.biWidth; 100 | *pheight = bmih.biHeight; 101 | 102 | printf("w %d h %d s %d\n",bmih.biWidth, bmih.biHeight, cbBmpBits ); 103 | 104 | GetOut: 105 | if (pfile) fclose(pfile); 106 | return rc; 107 | } 108 | 109 | -------------------------------------------------------------------------------- /utils/studiomdl/msvc6/studiomdl.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "studiomdl"=.\studiomdl.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/studiomdl", IVGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/studiomdl", IVGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ActionSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ActionSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_App.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_App.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Bitmap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Bitmap.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BitmapTGA.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_BitmapTGA.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Border.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Border.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BorderLayout.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_BorderLayout.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BorderPair.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_BorderPair.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BuildGroup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_BuildGroup.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Button.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Button.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ButtonController.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ButtonController.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ButtonGroup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ButtonGroup.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ChangeSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ChangeSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_CheckButton.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_CheckButton.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Color.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Color.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ComboKey.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ComboKey.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ConfigWizard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ConfigWizard.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Cursor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Cursor.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Dar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Dar.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_DataInputStream.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_DataInputStream.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Desktop.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Desktop.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_DesktopIcon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_DesktopIcon.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_EditPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_EditPanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_EtchedBorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_EtchedBorder.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FileInputStream.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_FileInputStream.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FlowLayout.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_FlowLayout.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FocusChangeSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_FocusChangeSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FocusNavGroup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_FocusNavGroup.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Font.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Font.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Frame.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Frame.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FrameSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_FrameSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_GridLayout.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_GridLayout.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_HeaderPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_HeaderPanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Image.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Image.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ImagePanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ImagePanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_InputSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_InputSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_InputStream.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_InputStream.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_IntChangeSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_IntChangeSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_IntLabel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_IntLabel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_KeyCode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_KeyCode.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Label.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Label.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Layout.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Layout.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_LayoutInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_LayoutInfo.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_LineBorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_LineBorder.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ListPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ListPanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_LoweredBorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_LoweredBorder.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Menu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Menu.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MenuItem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_MenuItem.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MenuSeparator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_MenuSeparator.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MessageBox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_MessageBox.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MiniApp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_MiniApp.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MouseCode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_MouseCode.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Panel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Panel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_PopupMenu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_PopupMenu.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ProgressBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ProgressBar.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_RadioButton.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_RadioButton.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_RaisedBorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_RaisedBorder.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_RepaintSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_RepaintSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Scheme.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Scheme.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ScrollBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ScrollBar.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ScrollPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ScrollPanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Slider.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Slider.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_StackLayout.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_StackLayout.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_String.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_String.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Surface.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_Surface.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_SurfaceBase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_SurfaceBase.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_SurfaceGL.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_SurfaceGL.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TabPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TabPanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TablePanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TablePanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TaskBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TaskBar.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextEntry.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TextEntry.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextGrid.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TextGrid.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextImage.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TextImage.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TextPanel.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TickSignal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TickSignal.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ToggleButton.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_ToggleButton.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TreeFolder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_TreeFolder.h -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_WizardPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/include/VGUI_WizardPanel.h -------------------------------------------------------------------------------- /utils/vgui/lib/win32_vc6/vgui.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nagist/cs16nd/cb03c59eaf076b0b4bb2eb8b6a05179651d7763c/utils/vgui/lib/win32_vc6/vgui.lib -------------------------------------------------------------------------------- /utils/visx2/msvc6/vis.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "vis"=.\vis.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/SDKSrc/Tools/utils/visx2", KVGBAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Global: 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/SDKSrc/Tools/utils/visx2", KVGBAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<3> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | -------------------------------------------------------------------------------- /utils/visx2/vis.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | ****/ 10 | 11 | // vis.h 12 | 13 | #include "cmdlib.h" 14 | #include "mathlib.h" 15 | #include "bspfile.h" 16 | 17 | #define MAX_PORTALS 32768 18 | 19 | #define PORTALFILE "PRT1" 20 | 21 | //#define ON_EPSILON 0.1 22 | 23 | typedef struct 24 | { 25 | vec3_t normal; 26 | float dist; 27 | } plane_t; 28 | 29 | #define MAX_POINTS_ON_WINDING 64 30 | #define MAX_POINTS_ON_FIXED_WINDING 12 31 | 32 | typedef struct 33 | { 34 | qboolean original; // don't free, it's part of the portal 35 | int numpoints; 36 | vec3_t points[MAX_POINTS_ON_FIXED_WINDING]; // variable sized 37 | } winding_t; 38 | 39 | winding_t *NewWinding (int points); 40 | void FreeWinding (winding_t *w); 41 | winding_t *ClipWinding (winding_t *in, plane_t *split, qboolean keepon); 42 | winding_t *CopyWinding (winding_t *w); 43 | 44 | 45 | typedef enum {stat_none, stat_working, stat_done} vstatus_t; 46 | typedef struct 47 | { 48 | plane_t plane; // normal pointing into neighbor 49 | int leaf; // neighbor 50 | winding_t *winding; 51 | vstatus_t status; 52 | byte *visbits; 53 | byte *mightsee; 54 | int nummightsee; 55 | int numcansee; 56 | } portal_t; 57 | 58 | typedef struct seperating_plane_s 59 | { 60 | struct seperating_plane_s *next; 61 | plane_t plane; // from portal is on positive side 62 | } sep_t; 63 | 64 | 65 | typedef struct passage_s 66 | { 67 | struct passage_s *next; 68 | int from, to; // leaf numbers 69 | sep_t *planes; 70 | } passage_t; 71 | 72 | #define MAX_PORTALS_ON_LEAF 256 73 | typedef struct leaf_s 74 | { 75 | int numportals; 76 | passage_t *passages; 77 | portal_t *portals[MAX_PORTALS_ON_LEAF]; 78 | } leaf_t; 79 | 80 | 81 | typedef struct pstack_s 82 | { 83 | byte mightsee[MAX_MAP_LEAFS/8]; // bit string 84 | struct pstack_s *next; 85 | leaf_t *leaf; 86 | portal_t *portal; // portal exiting 87 | winding_t *source; 88 | winding_t *pass; 89 | 90 | winding_t windings[3]; // source, pass, temp in any order 91 | int freewindings[3]; 92 | 93 | plane_t portalplane; 94 | } pstack_t; 95 | 96 | typedef struct 97 | { 98 | byte *leafvis; // bit string 99 | // byte fullportal[MAX_PORTALS/8]; // bit string 100 | portal_t *base; 101 | pstack_t pstack_head; 102 | } threaddata_t; 103 | 104 | 105 | #ifdef __alpha 106 | #include 107 | extern pthread_mutex_t *my_mutex; 108 | #define LOCK pthread_mutex_lock (my_mutex) 109 | #define UNLOCK pthread_mutex_unlock (my_mutex) 110 | #else 111 | #define LOCK 112 | #define UNLOCK 113 | #endif 114 | 115 | 116 | extern int numportals; 117 | extern int portalleafs; 118 | 119 | extern portal_t *portals; 120 | extern leaf_t *leafs; 121 | 122 | extern int c_portaltest, c_portalpass, c_portalcheck; 123 | extern int c_portalskip, c_leafskip; 124 | extern int c_vistest, c_mighttest; 125 | extern int c_chains; 126 | 127 | extern byte *vismap, *vismap_p, *vismap_end; // past visfile 128 | 129 | extern qboolean showgetleaf; 130 | 131 | extern byte *uncompressed; 132 | extern int bitbytes; 133 | extern int bitlongs; 134 | 135 | 136 | void LeafFlow (int leafnum); 137 | void BasePortalVis (int threadnum); 138 | 139 | void PortalFlow (portal_t *p); 140 | 141 | void CalcAmbientSounds (void); 142 | --------------------------------------------------------------------------------