├── .clang-format ├── .clang-tidy ├── .gitattributes ├── .github └── workflows │ └── ci-cd.yml ├── .gitignore ├── BUILDING.md ├── CHANGELOG.md ├── FULL_UPDATED_CHANGELOG.md ├── INSTALL.md ├── LICENSE ├── README.md ├── cl_dll ├── Exports.h ├── GameStudioModelRenderer.cpp ├── GameStudioModelRenderer.h ├── GameStudioModelRenderer_Sample.cpp ├── GameStudioModelRenderer_Sample.h ├── StudioModelRenderer.cpp ├── StudioModelRenderer.h ├── ammo.cpp ├── ammo.h ├── ammo_secondary.cpp ├── ammohistory.cpp ├── ammohistory.h ├── battery.cpp ├── camera.h ├── cdll_int.cpp ├── cl_dll.h ├── cl_util.h ├── com_weapons.cpp ├── com_weapons.h ├── death.cpp ├── demo.cpp ├── demo.h ├── entity.cpp ├── ev_common.cpp ├── ev_hldm.cpp ├── ev_hldm.h ├── events.cpp ├── eventscripts.h ├── flashlight.cpp ├── geiger.cpp ├── global_consts.h ├── health.cpp ├── health.h ├── hl │ ├── hl_baseentity.cpp │ ├── hl_events.cpp │ ├── hl_objects.cpp │ └── hl_weapons.cpp ├── hud.cpp ├── hud.h ├── hud_msg.cpp ├── hud_redraw.cpp ├── hud_spectator.cpp ├── hud_spectator.h ├── hud_update.cpp ├── in_camera.cpp ├── in_defs.h ├── input.cpp ├── inputw32.cpp ├── interpolation.cpp ├── interpolation.h ├── kbutton.h ├── menu.cpp ├── message.cpp ├── overview.cpp ├── overview.h ├── particleman │ ├── CBaseParticle.cpp │ ├── CBaseParticle.h │ ├── CFrustum.cpp │ ├── CFrustum.h │ ├── CMiniMem.cpp │ ├── CMiniMem.h │ ├── IParticleMan_Active.cpp │ ├── IParticleMan_Active.h │ ├── particleman.h │ └── particleman_internal.h ├── player_info.h ├── readme.txt ├── saytext.cpp ├── status_icons.cpp ├── statusbar.cpp ├── studio_util.cpp ├── studio_util.h ├── text_message.cpp ├── tf_defs.h ├── train.cpp ├── tri.cpp ├── tri.h ├── util.cpp ├── vgui_ClassMenu.cpp ├── vgui_CustomObjects.cpp ├── vgui_MOTDWindow.cpp ├── vgui_SchemeManager.cpp ├── vgui_SchemeManager.h ├── vgui_ScorePanel.cpp ├── vgui_ScorePanel.h ├── vgui_SpectatorPanel.cpp ├── vgui_SpectatorPanel.h ├── vgui_TeamFortressViewport.cpp ├── vgui_TeamFortressViewport.h ├── vgui_int.cpp ├── vgui_int.h ├── vgui_teammenu.cpp ├── view.cpp ├── view.h ├── voice_status.cpp └── voice_status.h ├── common ├── Platform.h ├── PlatformHeaders.h ├── Sequence.h ├── beamdef.h ├── cl_entity.h ├── com_model.h ├── common_types.h ├── con_nprint.h ├── const.h ├── crc.h ├── cvardef.h ├── demo_api.h ├── director_cmds.h ├── dlight.h ├── dll_state.h ├── entity_state.h ├── entity_types.h ├── enums.h ├── event_api.h ├── event_args.h ├── event_flags.h ├── hltv.h ├── in_buttons.h ├── ivoicetweak.h ├── mathlib.cpp ├── mathlib.h ├── net_api.h ├── netadr.h ├── parsemsg.cpp ├── parsemsg.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 ├── UserMessages.cpp ├── UserMessages.h ├── Wxdebug.cpp ├── activity.h ├── activitymap.h ├── aflock.cpp ├── agrunt.cpp ├── airtank.cpp ├── animating.cpp ├── animation.cpp ├── animation.h ├── apache.cpp ├── barnacle.cpp ├── barney.cpp ├── basemonster.h ├── bigmomma.cpp ├── bloater.cpp ├── bmodels.cpp ├── bullsquid.cpp ├── buttons.cpp ├── cbase.cpp ├── cbase.h ├── cdll_dll.h ├── client.cpp ├── client.h ├── combat.cpp ├── controller.cpp ├── crossbow.cpp ├── crowbar.cpp ├── decals.h ├── defaultai.cpp ├── defaultai.h ├── doors.cpp ├── doors.h ├── effects.cpp ├── effects.h ├── egon.cpp ├── enginecallback.h ├── explode.cpp ├── explode.h ├── extdll.h ├── flyingmonster.cpp ├── flyingmonster.h ├── func_break.cpp ├── func_break.h ├── func_tank.cpp ├── game.cpp ├── game.h ├── gamerules.cpp ├── gamerules.h ├── gargantua.cpp ├── gauss.cpp ├── genericmonster.cpp ├── ggrenade.cpp ├── glock.cpp ├── gman.cpp ├── h_ai.cpp ├── h_battery.cpp ├── h_cine.cpp ├── h_cycler.cpp ├── h_export.cpp ├── handgrenade.cpp ├── hassassin.cpp ├── headcrab.cpp ├── healthkit.cpp ├── hgrunt.cpp ├── hl.def ├── hornet.cpp ├── hornet.h ├── hornetgun.cpp ├── houndeye.cpp ├── ichthyosaur.cpp ├── islave.cpp ├── items.cpp ├── items.h ├── leech.cpp ├── lights.cpp ├── maprules.cpp ├── maprules.h ├── monsterevent.h ├── monstermaker.cpp ├── monsters.cpp ├── monsters.h ├── monsterstate.cpp ├── mortar.cpp ├── mp5.cpp ├── multiplay_gamerules.cpp ├── nihilanth.cpp ├── nodes.cpp ├── nodes.h ├── observer.cpp ├── osprey.cpp ├── pathcorner.cpp ├── plane.cpp ├── plane.h ├── plats.cpp ├── player.cpp ├── player.h ├── playermonster.cpp ├── python.cpp ├── rat.cpp ├── roach.cpp ├── rpg.cpp ├── satchel.cpp ├── saverestore.h ├── schedule.cpp ├── schedule.h ├── scientist.cpp ├── scripted.cpp ├── scripted.h ├── scriptevent.h ├── shotgun.cpp ├── singleplay_gamerules.cpp ├── skill.cpp ├── skill.h ├── sound.cpp ├── soundent.cpp ├── soundent.h ├── spectator.cpp ├── spectator.h ├── squad.h ├── squadmonster.cpp ├── squadmonster.h ├── squeakgrenade.cpp ├── stats.cpp ├── subs.cpp ├── talkmonster.cpp ├── talkmonster.h ├── teamplay_gamerules.cpp ├── teamplay_gamerules.h ├── tempmonster.cpp ├── tentacle.cpp ├── trains.h ├── triggers.cpp ├── tripmine.cpp ├── turret.cpp ├── util.cpp ├── util.h ├── vector.h ├── vehicle.cpp ├── weapons.cpp ├── weapons.h ├── weapons_shared.cpp ├── world.cpp ├── wxdebug.h ├── xen.cpp └── zombie.cpp ├── docs └── tutorials │ ├── setting-up-and-using-dotnet-script.md │ └── setting-up-dotnet-sdk.md ├── engine ├── APIProxy.h ├── anorms.h ├── cdll_int.h ├── custom.h ├── customentity.h ├── edict.h ├── eiface.h ├── progdefs.h ├── progs.h ├── shake.h └── studio.h ├── external └── SDL2 │ ├── SDL.h │ ├── SDL_assert.h │ ├── SDL_atomic.h │ ├── SDL_audio.h │ ├── SDL_bits.h │ ├── SDL_blendmode.h │ ├── SDL_clipboard.h │ ├── SDL_config.h │ ├── SDL_config.h.cmake │ ├── SDL_config.h.in │ ├── SDL_config_android.h │ ├── SDL_config_iphoneos.h │ ├── SDL_config_macosx.h │ ├── SDL_config_macosx.h.orig │ ├── SDL_config_minimal.h │ ├── SDL_config_pandora.h │ ├── SDL_config_psp.h │ ├── SDL_config_windows.h │ ├── SDL_config_winrt.h │ ├── SDL_config_wiz.h │ ├── SDL_copying.h │ ├── SDL_cpuinfo.h │ ├── SDL_egl.h │ ├── SDL_endian.h │ ├── SDL_error.h │ ├── SDL_events.h │ ├── SDL_filesystem.h │ ├── SDL_gamecontroller.h │ ├── SDL_gesture.h │ ├── SDL_haptic.h │ ├── SDL_hidapi.h │ ├── SDL_hints.h │ ├── SDL_joystick.h │ ├── SDL_keyboard.h │ ├── SDL_keycode.h │ ├── SDL_loadso.h │ ├── SDL_locale.h │ ├── SDL_log.h │ ├── SDL_main.h │ ├── SDL_messagebox.h │ ├── SDL_metal.h │ ├── SDL_misc.h │ ├── SDL_mouse.h │ ├── SDL_mutex.h │ ├── SDL_name.h │ ├── SDL_opengl.h │ ├── SDL_opengl_glext.h │ ├── SDL_opengles.h │ ├── SDL_opengles2.h │ ├── SDL_opengles2_gl2.h │ ├── SDL_opengles2_gl2ext.h │ ├── SDL_opengles2_gl2platform.h │ ├── SDL_opengles2_khrplatform.h │ ├── SDL_pixels.h │ ├── SDL_platform.h │ ├── SDL_power.h │ ├── SDL_quit.h │ ├── SDL_rect.h │ ├── SDL_render.h │ ├── SDL_revision.h │ ├── SDL_rwops.h │ ├── SDL_scancode.h │ ├── SDL_sensor.h │ ├── SDL_shape.h │ ├── SDL_stdinc.h │ ├── SDL_surface.h │ ├── SDL_system.h │ ├── SDL_syswm.h │ ├── SDL_test.h │ ├── SDL_test_assert.h │ ├── SDL_test_common.h │ ├── SDL_test_compare.h │ ├── SDL_test_crc32.h │ ├── SDL_test_font.h │ ├── SDL_test_fuzzer.h │ ├── SDL_test_harness.h │ ├── SDL_test_images.h │ ├── SDL_test_log.h │ ├── SDL_test_md5.h │ ├── SDL_test_memory.h │ ├── SDL_test_random.h │ ├── SDL_thread.h │ ├── SDL_timer.h │ ├── SDL_touch.h │ ├── SDL_types.h │ ├── SDL_version.h │ ├── SDL_video.h │ ├── SDL_vulkan.h │ ├── begin_code.h │ └── close_code.h ├── fgd └── halflife.fgd ├── filecopy.bat ├── game_shared ├── GameEvent.h ├── bitvec.h ├── bot │ ├── bot.cpp │ ├── bot.h │ ├── bot_constants.h │ ├── bot_manager.cpp │ ├── bot_manager.h │ ├── bot_profile.cpp │ ├── bot_profile.h │ ├── bot_util.cpp │ ├── bot_util.h │ ├── improv.h │ ├── nav.h │ ├── nav_area.cpp │ ├── nav_area.h │ ├── nav_file.cpp │ ├── nav_node.cpp │ ├── nav_node.h │ ├── nav_path.cpp │ ├── nav_path.h │ └── simple_state_machine.h ├── filesystem_utils.cpp ├── filesystem_utils.h ├── perf_counter.h ├── shared_util.cpp ├── shared_util.h ├── simple_checksum.h ├── steam_util.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_status_hud.cpp ├── voice_status_hud.h ├── voice_vgui_tweakdlg.cpp └── voice_vgui_tweakdlg.h ├── lib └── public │ └── SDL2.lib ├── linux ├── .gitignore ├── Makefile ├── Makefile.hl_cdll ├── Makefile.hldll ├── gendbg.sh ├── libSDL2-2.0.so.0 ├── libSDL2-2.0.so.0.dbg ├── libSDL2.so ├── release │ └── vgui.so └── vgui.so ├── network ├── Delta.txt └── delta.lst ├── pm_shared ├── pm_debug.cpp ├── pm_debug.h ├── pm_defs.h ├── pm_info.h ├── pm_materials.h ├── pm_math.cpp ├── pm_movevars.h ├── pm_shared.cpp └── pm_shared.h ├── projects ├── .gitignore ├── readme.txt └── vs2019 │ ├── bspinfo.vcxproj │ ├── bspinfo.vcxproj.filters │ ├── hl_cdll.vcxproj │ ├── hl_cdll.vcxproj.filters │ ├── hldll.vcxproj │ ├── hldll.vcxproj.filters │ ├── light.vcxproj │ ├── light.vcxproj.filters │ ├── makefont.vcxproj │ ├── makefont.vcxproj.filters │ ├── makels.vcxproj │ ├── makels.vcxproj.filters │ ├── mdlviewer.vcxproj │ ├── mdlviewer.vcxproj.filters │ ├── mkmovie.vcxproj │ ├── mkmovie.vcxproj.filters │ ├── procinfo.vcxproj │ ├── procinfo.vcxproj.filters │ ├── projects.sln │ ├── qbsp2.vcxproj │ ├── qbsp2.vcxproj.filters │ ├── qcsg.vcxproj │ ├── qcsg.vcxproj.filters │ ├── qlumpy.vcxproj │ ├── qlumpy.vcxproj.filters │ ├── qrad.vcxproj │ ├── qrad.vcxproj.filters │ ├── readme.txt │ ├── serverctrl.vcxproj │ ├── serverctrl.vcxproj.filters │ ├── smdlexp.vcxproj │ ├── smdlexp.vcxproj.filters │ ├── sprgen.vcxproj │ ├── sprgen.vcxproj.filters │ ├── studiomdl.vcxproj │ ├── studiomdl.vcxproj.filters │ ├── utils.sln │ ├── vis.vcxproj │ ├── vis.vcxproj.filters │ ├── xwad.vcxproj │ └── xwad.vcxproj.filters ├── public ├── FileSystem.h ├── cl_dll │ └── IGameClientExports.h ├── interface.cpp ├── interface.h ├── keydefs.h ├── steam │ └── steamtypes.h └── tier1 │ └── interface.h └── utils ├── bspinfo └── bspinfo.cpp ├── common ├── bspfile.cpp ├── bspfile.h ├── cmdlib.cpp ├── cmdlib.h ├── l3dslib.cpp ├── l3dslib.h ├── lbmlib.cpp ├── lbmlib.h ├── mathlib.cpp ├── mathlib.h ├── meter.cpp ├── meter.h ├── movie.h ├── polylib.cpp ├── polylib.h ├── scriplib.cpp ├── scriplib.h ├── threads.cpp ├── threads.h ├── trilib.cpp ├── trilib.h ├── wadlib.cpp └── wadlib.h ├── light ├── light.cpp ├── light.h ├── ltface.cpp └── trace.cpp ├── makefont └── makefont.cpp ├── makels └── makels.cpp ├── mdlviewer ├── mdlviewer.cpp ├── mdlviewer.h ├── studio_render.cpp └── studio_utils.cpp ├── mkmovie └── mkmovie.cpp ├── procinfo ├── lib │ └── win32_vc6 │ │ └── procinfo.lib ├── procinfo.cpp └── procinfo.h ├── qbsp2 ├── bsp5.h ├── cull.cpp ├── gldraw.cpp ├── merge.cpp ├── nodraw.cpp ├── outside.cpp ├── portals.cpp ├── qbsp.cpp ├── solidbsp.cpp ├── surfaces.cpp ├── tjunc.cpp └── writebsp.cpp ├── qcsg ├── brush.cpp ├── csg.h ├── gldraw.cpp ├── hullfile.cpp ├── hulls.txt ├── map.cpp ├── qcsg.cpp ├── source.p0 ├── source.p1 ├── source.p2 └── textures.cpp ├── qlumpy ├── qlumpy.cpp ├── qlumpy.doc ├── qlumpy.h └── quakegrb.cpp ├── qrad ├── lightmap.cpp ├── qrad.cpp ├── qrad.h ├── qrad.txt ├── trace.cpp └── vismat.cpp ├── serverctrl ├── ServerCtrl.cpp ├── ServerCtrl.h ├── ServerCtrl.rc ├── ServerCtrlDlg.cpp ├── ServerCtrlDlg.h ├── StdAfx.cpp ├── StdAfx.h ├── res │ ├── serverctrl.ico │ └── serverctrl.rc2 └── resource.h ├── smdlexp ├── smdlexp.cpp ├── smdlexp.def ├── smdlexp.rc ├── smedefs.h └── smexprc.h ├── sprgen ├── s_bubble.spr ├── s_explod.spr ├── s_light.spr ├── sprgen.cpp └── spritegn.h ├── studiomdl ├── bmpread.cpp ├── studiomdl.cpp ├── studiomdl.h ├── tristrip.cpp └── write.cpp ├── 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_Point.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_vc16 │ └── vgui.lib ├── visx2 ├── flow.cpp ├── soundpvs.cpp ├── vis.cpp └── vis.h └── xwad └── xwad.cpp /.clang-format: -------------------------------------------------------------------------------- 1 | # Visual Studio generated .clang-format file 2 | 3 | # The style options in this file are a best effort attempt to replicate the 4 | # current IDE formatting configuration from Tools > Options. 5 | 6 | AccessModifierOffset: -4 7 | AlignAfterOpenBracket: DontAlign 8 | AllowShortBlocksOnASingleLine: true 9 | AllowShortCaseLabelsOnASingleLine: true 10 | AllowShortFunctionsOnASingleLine: All 11 | BasedOnStyle: LLVM 12 | BraceWrapping: 13 | BeforeLambdaBody: true 14 | AfterCaseLabel: true 15 | AfterClass: true 16 | AfterControlStatement: true 17 | AfterEnum: true 18 | AfterFunction: true 19 | AfterNamespace: true 20 | AfterStruct: true 21 | AfterUnion: true 22 | BeforeCatch: true 23 | BeforeElse: true 24 | IndentBraces: false 25 | SplitEmptyFunction: true 26 | SplitEmptyRecord: true 27 | BreakBeforeBraces: Custom 28 | ColumnLimit: 0 29 | Cpp11BracedListStyle: true 30 | FixNamespaceComments: false 31 | IndentCaseLabels: false 32 | IndentPPDirectives: None 33 | IndentWidth: 4 34 | MaxEmptyLinesToKeep: 10 35 | NamespaceIndentation: None 36 | PointerAlignment: Left 37 | SortIncludes: false 38 | SortUsingDeclarations: false 39 | SpaceAfterCStyleCast: false 40 | SpaceBeforeAssignmentOperators: true 41 | SpaceBeforeParens: ControlStatements 42 | SpaceInEmptyParentheses: false 43 | SpacesInCStyleCastParentheses: false 44 | SpacesInParentheses: false 45 | SpacesInSquareBrackets: false 46 | TabWidth: 4 47 | UseTab: true 48 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | Checks: '-*,readability-delete-null-pointer,readability-implicit-bool-conversion' 2 | CheckOptions: 3 | - key: readability-implicit-bool-conversion.AllowPointerConditions 4 | value: '1' 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Force CRLF for Windows files: 2 | *.bat text eol=crlf 3 | *.sln text eol=crlf 4 | *.vcxproj text eol=crlf 5 | *.vcxproj.filters text eol=crlf 6 | 7 | # Force LF for Linux files: 8 | Makefile text eol=lf 9 | Makefile.* text eol=lf 10 | *.sh text eol=lf 11 | -------------------------------------------------------------------------------- /.github/workflows/ci-cd.yml: -------------------------------------------------------------------------------- 1 | name: CI/CD 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | linux: 7 | name: Linux-x86 8 | runs-on: ubuntu-latest 9 | strategy: 10 | matrix: 11 | compiler: [g++, clang++] 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v4 15 | 16 | - name: Install G++ Multilib, Clang++ & OpenGL library 17 | run: | 18 | sudo apt update 19 | sudo apt install -y g++-multilib clang libgl1-mesa-dev 20 | 21 | - name: Build 22 | run: | 23 | cd linux 24 | make COMPILER=${{ matrix.compiler }} CFG=release -j2 25 | 26 | - name: Deploy 27 | uses: actions/upload-artifact@v4 28 | with: 29 | name: Linux-x86-${{ matrix.compiler }} 30 | path: | 31 | linux/release/client.so 32 | linux/release/client.so.dbg 33 | linux/release/hl.so 34 | linux/release/hl.so.dbg 35 | 36 | win32: 37 | name: Win32 38 | runs-on: windows-latest 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@v4 42 | 43 | - name: Add MSBuild to PATH 44 | uses: microsoft/setup-msbuild@v2 45 | with: 46 | msbuild-architecture: x86 47 | 48 | - name: Build 49 | run: msbuild projects/vs2019/projects.sln -t:rebuild -property:Configuration=Release -maxcpucount:2 50 | 51 | - name: Deploy 52 | uses: actions/upload-artifact@v4 53 | with: 54 | name: Win32 55 | path: | 56 | projects/vs2019/Release/hl_cdll/client.dll 57 | projects/vs2019/Release/hl_cdll/client.pdb 58 | projects/vs2019/Release/hldll/hl.dll 59 | projects/vs2019/Release/hldll/hl.pdb 60 | 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | 3 | # Allow Half-Life-specific files that would otherwise be ignored 4 | !lib/public/SDL2.lib 5 | !utils/procinfo/lib/win32_vc6/procinfo.lib 6 | !utils/vgui/lib/win32_vc16/vgui.lib 7 | -------------------------------------------------------------------------------- /BUILDING.md: -------------------------------------------------------------------------------- 1 | # Building this SDK 2 | 3 | ## Requirements 4 | 5 | ### Windows 6 | 7 | * Windows 7 or newer 8 | * Visual Studio 2019 or newer 9 | 10 | ### Linux 11 | 12 | * GCC 9 or newer (C++17 support or newer required) 13 | * Packages: 14 | * `g++-multilib` 15 | * `libgl1-mesa-dev` (or an equivalent package that provides the OpenGL headers) 16 | 17 | ## Building 18 | 19 | The TWHL tutorial on setting up the Half-Life SDK for C++ mod development explains how to set up the source code and how to configure the mod installation: https://twhl.info/wiki/page/Half-Life_Programming_-_Getting_Started 20 | 21 | ## Packaging mod files 22 | 23 | To package a mod for distribution as an archive, use the `CreatePackage` script: 24 | 25 | ``` 26 | cd path/to/Half-Life 27 | dotnet script halflife_updated/scripts/packager/CreatePackage.csx --package-name 28 | ``` 29 | -------------------------------------------------------------------------------- /cl_dll/GameStudioModelRenderer.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | /* 11 | ==================== 12 | CGameStudioModelRenderer 13 | 14 | ==================== 15 | */ 16 | class CGameStudioModelRenderer : public CStudioModelRenderer 17 | { 18 | public: 19 | CGameStudioModelRenderer(); 20 | }; 21 | -------------------------------------------------------------------------------- /cl_dll/GameStudioModelRenderer_Sample.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #if !defined( GAMESTUDIOMODELRENDERER_H ) 9 | #define GAMESTUDIOMODELRENDERER_H 10 | #if defined( _WIN32 ) 11 | #pragma once 12 | #endif 13 | 14 | /* 15 | ==================== 16 | CGameStudioModelRenderer 17 | 18 | ==================== 19 | */ 20 | class CGameStudioModelRenderer : public CStudioModelRenderer 21 | { 22 | public: 23 | CGameStudioModelRenderer( void ); 24 | 25 | // Set up model bone positions 26 | virtual void StudioSetupBones ( void ); 27 | 28 | // Estimate gait frame for player 29 | virtual void StudioEstimateGait ( entity_state_t *pplayer ); 30 | 31 | // Process movement of player 32 | virtual void StudioProcessGait ( entity_state_t *pplayer ); 33 | 34 | // Player drawing code 35 | virtual int StudioDrawPlayer( int flags, entity_state_t *pplayer ); 36 | virtual int _StudioDrawPlayer( int flags, entity_state_t *pplayer ); 37 | 38 | // Apply special effects to transform matrix 39 | virtual void StudioFxTransform( cl_entity_t *ent, float transform[3][4] ); 40 | 41 | private: 42 | // For local player, in third person, we need to store real render data and then 43 | // setup for with fake/client side animation data 44 | void SavePlayerState( entity_state_t *pplayer ); 45 | // Called to set up local player's animation values 46 | void SetupClientAnimation( entity_state_t *pplayer ); 47 | // Called to restore original player state information 48 | void RestorePlayerState( entity_state_t *pplayer ); 49 | 50 | private: 51 | // Private data 52 | bool m_bLocal; 53 | }; 54 | 55 | #endif // GAMESTUDIOMODELRENDERER_H 56 | -------------------------------------------------------------------------------- /cl_dll/ammo.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 | #pragma once 17 | 18 | #define MAX_WEAPON_NAME 128 19 | 20 | 21 | #define WEAPON_FLAGS_SELECTONEMPTY 1 22 | 23 | #define WEAPON_IS_ONTARGET 0x40 24 | 25 | struct WEAPON 26 | { 27 | char szName[MAX_WEAPON_NAME]; 28 | int iAmmoType; 29 | int iAmmo2Type; 30 | int iMax1; 31 | int iMax2; 32 | int iSlot; 33 | int iSlotPos; 34 | int iFlags; 35 | int iId; 36 | int iClip; 37 | 38 | int iCount; // # of itesm in plist 39 | 40 | HSPRITE hActive; 41 | Rect rcActive; 42 | HSPRITE hInactive; 43 | Rect rcInactive; 44 | HSPRITE hAmmo; 45 | Rect rcAmmo; 46 | HSPRITE hAmmo2; 47 | Rect rcAmmo2; 48 | HSPRITE hCrosshair; 49 | Rect rcCrosshair; 50 | HSPRITE hAutoaim; 51 | Rect rcAutoaim; 52 | HSPRITE hZoomedCrosshair; 53 | Rect rcZoomedCrosshair; 54 | HSPRITE hZoomedAutoaim; 55 | Rect rcZoomedAutoaim; 56 | }; 57 | -------------------------------------------------------------------------------- /cl_dll/camera.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // Camera.h -- defines and such for a 3rd person camera 9 | // NOTE: must include quakedef.h first 10 | 11 | #pragma once 12 | 13 | // pitch, yaw, dist 14 | extern Vector cam_ofs; 15 | // Using third person camera 16 | extern bool cam_thirdperson; 17 | 18 | void CAM_Init(); 19 | void CAM_ClearStates(); 20 | void CAM_StartMouseMove(); 21 | void CAM_EndMouseMove(); 22 | -------------------------------------------------------------------------------- /cl_dll/cl_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 | // 16 | // cl_dll.h 17 | // 18 | 19 | #pragma once 20 | 21 | // 4-23-98 JOHN 22 | 23 | // 24 | // This DLL is linked by the client when they first initialize. 25 | // This DLL is responsible for the following tasks: 26 | // - Loading the HUD graphics upon initialization 27 | // - Drawing the HUD graphics every frame 28 | // - Handling the custum HUD-update packets 29 | // 30 | 31 | #include "Platform.h" 32 | 33 | typedef int (*pfnUserMsgHook)(const char* pszName, int iSize, void* pbuf); 34 | 35 | #include "mathlib.h" 36 | 37 | #include "../engine/cdll_int.h" 38 | #include "../dlls/cdll_dll.h" 39 | 40 | extern cl_enginefunc_t gEngfuncs; 41 | -------------------------------------------------------------------------------- /cl_dll/com_weapons.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // com_weapons.h 9 | // Shared weapons common function prototypes 10 | 11 | #pragma once 12 | 13 | #include "Exports.h" 14 | 15 | void COM_Log(const char* pszFile, const char* fmt, ...); 16 | bool CL_IsDead(); 17 | 18 | float UTIL_SharedRandomFloat(unsigned int seed, float low, float high); 19 | int UTIL_SharedRandomLong(unsigned int seed, int low, int high); 20 | 21 | int HUD_GetWeaponAnim(); 22 | void HUD_SendWeaponAnim(int iAnim, int body, bool force); 23 | void HUD_PlaySound(const char* sound, float volume); 24 | void HUD_PlaybackEvent(int flags, const struct edict_s* pInvoker, unsigned short eventindex, float delay, const float* origin, const float* angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); 25 | void HUD_SetMaxSpeed(const struct edict_s* ed, float speed); 26 | int stub_PrecacheModel(const char* s); 27 | int stub_PrecacheSound(const char* s); 28 | unsigned short stub_PrecacheEvent(int type, const char* s); 29 | const char* stub_NameForFunction(uint32 function); 30 | void stub_SetModel(struct edict_s* e, const char* m); 31 | 32 | 33 | extern cvar_t* cl_lw; 34 | 35 | extern bool g_runfuncs; 36 | extern Vector v_angles; 37 | extern Vector v_client_aimangles; 38 | extern float g_lastFOV; 39 | extern struct local_state_s* g_finalstate; 40 | extern int g_CurrentWeaponId; 41 | -------------------------------------------------------------------------------- /cl_dll/demo.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | // Types of demo messages we can write/parse 11 | enum 12 | { 13 | TYPE_SNIPERDOT = 0, 14 | TYPE_ZOOM 15 | }; 16 | 17 | void Demo_WriteBuffer(int type, int size, unsigned char* buffer); 18 | 19 | extern int g_demosniper; 20 | extern int g_demosniperdamage; 21 | extern float g_demosniperorg[3]; 22 | extern float g_demosniperangles[3]; 23 | extern float g_demozoom; 24 | -------------------------------------------------------------------------------- /cl_dll/ev_hldm.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | void EV_HLDM_GunshotDecalTrace(pmtrace_t* pTrace, char* decalName); 11 | void EV_HLDM_DecalGunshot(pmtrace_t* pTrace, int iBulletType); 12 | void EV_HLDM_CheckTracer(int idx, float* vecSrc, float* end, float* forward, float* right, int iBulletType, int iTracerFreq, int* tracerCount); 13 | void EV_HLDM_FireBullets(int idx, float* forward, float* right, float* up, int cShots, float* vecSrc, float* vecDirShooting, float flDistance, int iBulletType, int iTracerFreq, int* tracerCount, float flSpreadX, float flSpreadY); 14 | 15 | // HLDM 16 | void EV_FireGlock1(event_args_t* args); 17 | void EV_FireGlock2(event_args_t* args); 18 | void EV_FireShotGunSingle(event_args_t* args); 19 | void EV_FireShotGunDouble(event_args_t* args); 20 | void EV_FireMP5(event_args_t* args); 21 | void EV_FireMP52(event_args_t* args); 22 | void EV_FirePython(event_args_t* args); 23 | void EV_FireGauss(event_args_t* args); 24 | void EV_SpinGauss(event_args_t* args); 25 | void EV_Crowbar(event_args_t* args); 26 | void EV_FireCrossbow(event_args_t* args); 27 | void EV_FireCrossbow2(event_args_t* args); 28 | void EV_FireRpg(event_args_t* args); 29 | void EV_EgonFire(event_args_t* args); 30 | void EV_EgonStop(event_args_t* args); 31 | void EV_HornetGunFire(event_args_t* args); 32 | void EV_TripmineFire(event_args_t* args); 33 | void EV_SnarkFire(event_args_t* args); 34 | 35 | 36 | 37 | void EV_TrainPitchAdjust(event_args_t* args); 38 | void EV_VehiclePitchAdjust(event_args_t* args); 39 | -------------------------------------------------------------------------------- /cl_dll/events.cpp: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #include "hud.h" 9 | #include "cl_util.h" 10 | 11 | void Game_HookEvents(); 12 | 13 | /* 14 | =================== 15 | EV_HookEvents 16 | 17 | See if game specific code wants to hook any events. 18 | =================== 19 | */ 20 | void EV_HookEvents() 21 | { 22 | Game_HookEvents(); 23 | } 24 | -------------------------------------------------------------------------------- /cl_dll/eventscripts.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // eventscripts.h 9 | 10 | #pragma once 11 | 12 | // Some of these are HL/TFC specific? 13 | void EV_EjectBrass(float* origin, float* velocity, float rotation, int model, int soundtype); 14 | void EV_GetGunPosition(struct event_args_s* args, float* pos, float* origin); 15 | void EV_GetDefaultShellInfo(struct event_args_s* args, float* origin, float* velocity, float* ShellVelocity, float* ShellOrigin, float* forward, float* right, float* up, float forwardScale, float upScale, float rightScale); 16 | bool EV_IsLocal(int idx); 17 | bool EV_IsPlayer(int idx); 18 | void EV_CreateTracer(float* start, float* end); 19 | 20 | struct cl_entity_s* GetEntity(int idx); 21 | struct cl_entity_s* GetViewEntity(); 22 | void EV_MuzzleFlash(); 23 | -------------------------------------------------------------------------------- /cl_dll/global_consts.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | enum 11 | { 12 | MAX_PLAYERS_HUD = 64, 13 | MAX_TEAMS = 64, 14 | MAX_TEAM_NAME = 16, 15 | }; 16 | 17 | #define MAX_SCORES 10 18 | #define MAX_SCOREBOARD_TEAMS 5 19 | 20 | #define NUM_ROWS (MAX_PLAYERS_HUD + (MAX_SCOREBOARD_TEAMS * 2)) 21 | 22 | #define MAX_SERVERNAME_LENGTH 64 23 | #define MAX_TEAMNAME_SIZE 32 24 | -------------------------------------------------------------------------------- /cl_dll/hud_update.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 | // hud_update.cpp 17 | // 18 | 19 | #include "hud.h" 20 | #include "cl_util.h" 21 | #include 22 | #include 23 | 24 | int CL_ButtonBits(bool); 25 | void CL_ResetButtonBits(int bits); 26 | 27 | extern float v_idlescale; 28 | float in_fov; 29 | extern void HUD_SetCmdBits(int bits); 30 | 31 | bool CHud::UpdateClientData(client_data_t* cdata, float time) 32 | { 33 | memcpy(m_vecOrigin, cdata->origin, sizeof(Vector)); 34 | memcpy(m_vecAngles, cdata->viewangles, sizeof(Vector)); 35 | 36 | m_iKeyBits = CL_ButtonBits(false); 37 | //Handled in MsgFunc_Weapons now. 38 | //m_iWeaponBits = cdata->iWeaponBits; 39 | 40 | in_fov = cdata->fov; 41 | 42 | Think(); 43 | 44 | cdata->fov = m_iFOV; 45 | 46 | v_idlescale = m_iConcussionEffect; 47 | 48 | CL_ResetButtonBits(m_iKeyBits); 49 | 50 | // return 1 if in anything in the client_data struct has been changed, 0 otherwise 51 | return true; 52 | } 53 | -------------------------------------------------------------------------------- /cl_dll/in_defs.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | // up / down 11 | #define PITCH 0 12 | // left / right 13 | #define YAW 1 14 | // fall over 15 | #define ROLL 2 16 | -------------------------------------------------------------------------------- /cl_dll/interpolation.h: -------------------------------------------------------------------------------- 1 | /************ (C) Copyright 2003 Valve, L.L.C. All rights reserved. *********** 2 | ** 3 | ** The copyright to the contents herein is the property of Valve, L.L.C. 4 | ** The contents may be used and/or copied only with the written permission of 5 | ** Valve, L.L.C., or in accordance with the terms and conditions stipulated in 6 | ** the agreement/contract under which the contents have been supplied. 7 | ** 8 | ******************************************************************************* 9 | ** 10 | ** Contents: 11 | ** 12 | ** interpolation.h: Bezier inpolation classes 13 | ** 14 | ******************************************************************************/ 15 | 16 | #pragma once 17 | 18 | // interpolation class 19 | class CInterpolation 20 | { 21 | public: 22 | CInterpolation(); 23 | virtual ~CInterpolation(); 24 | 25 | void SetWaypoints(Vector* prev, Vector start, Vector end, Vector* next); 26 | void SetViewAngles(Vector start, Vector end); 27 | void SetFOVs(float start, float end); 28 | void SetSmoothing(bool start, bool end); 29 | 30 | // get interpolated point 0 =< t =< 1, 0 = start, 1 = end 31 | void Interpolate(float t, Vector& point, Vector& angle, float* fov); 32 | 33 | protected: 34 | void BezierInterpolatePoint(float t, Vector& point); 35 | void InterpolateAngle(float t, Vector& angle); 36 | 37 | Vector m_StartPoint; 38 | Vector m_EndPoint; 39 | Vector m_StartAngle; 40 | Vector m_EndAngle; 41 | Vector m_Center; 42 | float m_StartFov; 43 | float m_EndFov; 44 | 45 | bool m_SmoothStart; 46 | bool m_SmoothEnd; 47 | }; 48 | -------------------------------------------------------------------------------- /cl_dll/kbutton.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | typedef struct kbutton_s 11 | { 12 | int down[2]; // key nums holding it down 13 | int state; // low bit is down state 14 | } kbutton_t; 15 | -------------------------------------------------------------------------------- /cl_dll/overview.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef OVERVIEW_H 9 | #define OVERVIEW_H 10 | #pragma once 11 | 12 | 13 | //----------------------------------------------------------------------------- 14 | // Purpose: Handles the drawing of the top-down map and all the things on it 15 | //----------------------------------------------------------------------------- 16 | class CHudOverview : public CHudBase 17 | { 18 | public: 19 | int Init(); 20 | int VidInit(); 21 | 22 | int Draw(float flTime); 23 | void InitHUDData( void ); 24 | 25 | private: 26 | HSPRITE m_hsprPlayer; 27 | HSPRITE m_hsprViewcone; 28 | }; 29 | 30 | 31 | #endif // OVERVIEW_H 32 | -------------------------------------------------------------------------------- /cl_dll/particleman/CFrustum.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 | #pragma once 17 | 18 | enum FrustumSide 19 | { 20 | RIGHT = 0, 21 | LEFT = 1, 22 | BOTTOM = 2, 23 | TOP = 3, 24 | BACK = 4, 25 | FRONT = 5, 26 | }; 27 | 28 | struct CFrustum 29 | { 30 | void CalculateFrustum(); 31 | 32 | bool PointInsideFrustum(float x, float y, float z); 33 | 34 | bool SphereInsideFrustum(float x, float y, float z, float radius); 35 | 36 | bool PlaneInsideFrustum(float x, float y, float z, float size); 37 | 38 | private: 39 | void NormalizeFrustumPlane(float frustum[6][4], int side); 40 | 41 | public: 42 | float g_flFrustum[6][4]; 43 | }; 44 | -------------------------------------------------------------------------------- /cl_dll/particleman/CMiniMem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | class CBaseParticle; 8 | 9 | #define TRIANGLE_FPS 30 10 | 11 | /** 12 | * @brief Simple allocator that uses a chunk-based pool to serve requests. 13 | */ 14 | class CMiniMem 15 | { 16 | private: 17 | static inline CMiniMem* _instance = nullptr; 18 | 19 | std::pmr::unsynchronized_pool_resource _pool; 20 | 21 | std::vector _particles; 22 | std::size_t _visibleParticles = 0; 23 | 24 | protected: 25 | // private constructor and destructor. 26 | CMiniMem() = default; 27 | ~CMiniMem() = default; 28 | 29 | public: 30 | void* Allocate(std::size_t sizeInBytes, std::size_t alignment = alignof(std::max_align_t)); 31 | 32 | void Deallocate(void* memory, std::size_t sizeInBytes, std::size_t alignment = alignof(std::max_align_t)); 33 | 34 | void ProcessAll(); //Processes all 35 | 36 | void Reset(); //clears memory, setting all particles to not used. 37 | 38 | void Shutdown(); 39 | 40 | int ApplyForce(Vector vOrigin, Vector vDirection, float flRadius, float flStrength); 41 | 42 | static CMiniMem* Instance(); 43 | 44 | std::size_t GetTotalParticles() { return _particles.size(); } 45 | std::size_t GetDrawnParticles() { return _visibleParticles; } 46 | }; 47 | -------------------------------------------------------------------------------- /cl_dll/particleman/IParticleMan_Active.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 | #pragma once 17 | 18 | #include "particleman.h" 19 | 20 | class IParticleMan_Active : public IParticleMan 21 | { 22 | public: 23 | IParticleMan_Active(); 24 | 25 | void SetUp(cl_enginefunc_t* pEnginefuncs) override; 26 | void Update() override; 27 | void SetVariables(float flGravity, Vector vViewAngles) override; 28 | void ResetParticles() override; 29 | void ApplyForce(Vector vOrigin, Vector vDirection, float flRadius, float flStrength, float flDuration) override; 30 | 31 | CBaseParticle* CreateParticle(Vector org, Vector normal, model_s* sprite, float size, float brightness, const char* classname) override; 32 | 33 | void SetRender(int iRender) override; 34 | }; 35 | -------------------------------------------------------------------------------- /cl_dll/particleman/particleman.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "interface.h" 4 | #include "CBaseParticle.h" 5 | 6 | #define PARTICLEMAN_INTERFACE "create_particleman" 7 | 8 | class IParticleMan : public IBaseInterface 9 | { 10 | 11 | protected: 12 | virtual ~IParticleMan() {} 13 | 14 | public: 15 | virtual void SetUp(cl_enginefunc_t* pEnginefuncs) = 0; 16 | virtual void Update() = 0; 17 | virtual void SetVariables(float flGravity, Vector vViewAngles) = 0; 18 | virtual void ResetParticles() = 0; 19 | virtual void ApplyForce(Vector vOrigin, Vector vDirection, float flRadius, float flStrength, float flDuration) = 0; 20 | 21 | //Use this if you want to create a new particle without any overloaded functions, Think, Touch, etc. 22 | //Just call this function, set the particle's behavior and let it rip. 23 | virtual CBaseParticle* CreateParticle(Vector org, Vector normal, model_s* sprite, float size, float brightness, const char* classname) = 0; 24 | 25 | virtual void SetRender(int iRender) = 0; 26 | }; 27 | 28 | extern IParticleMan* g_pParticleMan; 29 | -------------------------------------------------------------------------------- /cl_dll/particleman/particleman_internal.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 | #pragma once 17 | 18 | /** 19 | * @file 20 | * 21 | * Internal header for particle manager 22 | */ 23 | 24 | //TODO: remove this once the clamp macro has been removed 25 | #undef clamp 26 | 27 | #include 28 | #include 29 | 30 | #include "CFrustum.h" 31 | 32 | constexpr std::size_t MaxForceElements = 128; 33 | 34 | inline CFrustum g_cFrustum; 35 | inline float g_flGravity; 36 | inline float g_flOldTime; 37 | inline Vector g_vViewAngles; 38 | 39 | inline bool IsGamePaused() 40 | { 41 | return gEngfuncs.GetClientTime() == g_flOldTime; 42 | } 43 | 44 | struct ForceMember 45 | { 46 | Vector m_vOrigin; 47 | Vector m_vDirection; 48 | float m_flRadius; 49 | float m_flStrength; 50 | float m_flDieTime; 51 | }; 52 | -------------------------------------------------------------------------------- /cl_dll/player_info.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 2003', 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 | #pragma once 17 | 18 | extern hud_player_info_t g_PlayerInfoList[MAX_PLAYERS_HUD+1]; // player info from the engine 19 | extern extra_player_info_t g_PlayerExtraInfo[MAX_PLAYERS_HUD+1]; // additional player info sent directly to the client dll 20 | extern team_info_t g_TeamInfo[MAX_TEAMS+1]; 21 | extern int g_IsSpectator[MAX_PLAYERS_HUD+1]; 22 | 23 | -------------------------------------------------------------------------------- /cl_dll/studio_util.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #ifndef PITCH 11 | // MOVEMENT INFO 12 | // up / down 13 | #define PITCH 0 14 | // left / right 15 | #define YAW 1 16 | // fall over 17 | #define ROLL 2 18 | #endif 19 | 20 | #define FDotProduct( a, b ) (fabs((a[0])*(b[0])) + fabs((a[1])*(b[1])) + fabs((a[2])*(b[2]))) 21 | 22 | void AngleMatrix (const float *angles, float (*matrix)[4] ); 23 | bool VectorCompare (const float *v1, const float *v2); 24 | void CrossProduct (const float *v1, const float *v2, float *cross); 25 | void VectorTransform (const float *in1, float in2[3][4], float *out); 26 | void ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); 27 | void MatrixCopy( float in[3][4], float out[3][4] ); 28 | void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] ); 29 | void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt ); 30 | void AngleQuaternion( float *angles, vec4_t quaternion ); 31 | -------------------------------------------------------------------------------- /cl_dll/tri.cpp: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // Triangle rendering, if any 9 | 10 | #include "hud.h" 11 | #include "cl_util.h" 12 | 13 | // Triangle rendering apis are in gEngfuncs.pTriAPI 14 | 15 | #include "const.h" 16 | #include "entity_state.h" 17 | #include "cl_entity.h" 18 | #include "triangleapi.h" 19 | #include "Exports.h" 20 | 21 | #include "particleman.h" 22 | #include "tri.h" 23 | extern IParticleMan* g_pParticleMan; 24 | 25 | /* 26 | ================= 27 | HUD_DrawNormalTriangles 28 | 29 | Non-transparent triangles-- add them here 30 | ================= 31 | */ 32 | void DLLEXPORT HUD_DrawNormalTriangles() 33 | { 34 | // RecClDrawNormalTriangles(); 35 | 36 | gHUD.m_Spectator.DrawOverview(); 37 | } 38 | 39 | 40 | /* 41 | ================= 42 | HUD_DrawTransparentTriangles 43 | 44 | Render any triangles with transparent rendermode needs here 45 | ================= 46 | */ 47 | void DLLEXPORT HUD_DrawTransparentTriangles() 48 | { 49 | // RecClDrawTransparentTriangles(); 50 | 51 | 52 | if (g_pParticleMan) 53 | g_pParticleMan->Update(); 54 | } 55 | -------------------------------------------------------------------------------- /cl_dll/tri.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "particleman.h" 4 | 5 | extern IParticleMan* g_pParticleMan; 6 | -------------------------------------------------------------------------------- /cl_dll/util.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 | // util.cpp 17 | // 18 | // implementation of class-less helper functions 19 | // 20 | 21 | #include 22 | #include 23 | 24 | #include "hud.h" 25 | #include "cl_util.h" 26 | #include 27 | 28 | HSPRITE LoadSprite(const char* pszName) 29 | { 30 | int iRes; 31 | char sz[256]; 32 | 33 | if (ScreenWidth > 2560 && ScreenHeight > 1600) 34 | iRes = 2560; 35 | else if (ScreenWidth >= 1280 && ScreenHeight > 720) 36 | iRes = 1280; 37 | else if (ScreenWidth >= 640) 38 | iRes = 640; 39 | else 40 | iRes = 320; 41 | 42 | sprintf(sz, pszName, iRes); 43 | 44 | return SPR_Load(sz); 45 | } 46 | -------------------------------------------------------------------------------- /cl_dll/vgui_int.cpp: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #include "vgui_int.h" 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include "hud.h" 17 | #include "cl_util.h" 18 | #include "camera.h" 19 | #include "kbutton.h" 20 | #include "cvardef.h" 21 | #include "usercmd.h" 22 | #include "const.h" 23 | #include "camera.h" 24 | #include "in_defs.h" 25 | #include "vgui_TeamFortressViewport.h" 26 | 27 | using namespace vgui; 28 | 29 | void VGui_ViewportPaintBackground(int extents[4]) 30 | { 31 | gEngfuncs.VGui_ViewportPaintBackground(extents); 32 | } 33 | 34 | void* VGui_GetPanel() 35 | { 36 | return (Panel*)gEngfuncs.VGui_GetPanel(); 37 | } 38 | 39 | void VGui_Startup() 40 | { 41 | Panel* root = (Panel*)VGui_GetPanel(); 42 | root->setBgColor(128, 128, 0, 0); 43 | //root->setNonPainted(false); 44 | //root->setBorder(new LineBorder()); 45 | root->setLayout(new BorderLayout(0)); 46 | 47 | 48 | //root->getSurfaceBase()->setEmulatedCursorVisible(true); 49 | 50 | if (gViewPort != NULL) 51 | { 52 | // root->removeChild(gViewPort); 53 | 54 | // free the memory 55 | // delete gViewPort; 56 | // gViewPort = NULL; 57 | 58 | gViewPort->Initialize(); 59 | } 60 | else 61 | { 62 | gViewPort = new TeamFortressViewport(0, 0, root->getWide(), root->getTall()); 63 | gViewPort->setParent(root); 64 | } 65 | } 66 | 67 | void VGui_Shutdown() 68 | { 69 | delete gViewPort; 70 | gViewPort = NULL; 71 | } 72 | -------------------------------------------------------------------------------- /cl_dll/vgui_int.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | void VGui_Startup(); 11 | void VGui_Shutdown(); 12 | 13 | //Only safe to call from inside subclass of Panel::paintBackground 14 | void VGui_ViewportPaintBackground(int extents[4]); 15 | -------------------------------------------------------------------------------- /cl_dll/view.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | void V_StartPitchDrift(); 11 | void V_StopPitchDrift(); 12 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | #define FBEAM_STARTENTITY 0x00000001 19 | #define FBEAM_ENDENTITY 0x00000002 20 | #define FBEAM_FADEIN 0x00000004 21 | #define FBEAM_FADEOUT 0x00000008 22 | #define FBEAM_SINENOISE 0x00000010 23 | #define FBEAM_SOLID 0x00000020 24 | #define FBEAM_SHADEIN 0x00000040 25 | #define FBEAM_SHADEOUT 0x00000080 26 | #define FBEAM_STARTVISIBLE 0x10000000 // Has this client actually seen this beam's start entity yet? 27 | #define FBEAM_ENDVISIBLE 0x20000000 // Has this client actually seen this beam's end entity yet? 28 | #define FBEAM_ISACTIVE 0x40000000 29 | #define FBEAM_FOREVER 0x80000000 30 | 31 | typedef struct beam_s BEAM; 32 | struct beam_s 33 | { 34 | BEAM* next; 35 | int type; 36 | int flags; 37 | Vector source; 38 | Vector target; 39 | Vector delta; 40 | float t; // 0 .. 1 over lifetime of beam 41 | float freq; 42 | float die; 43 | float width; 44 | float amplitude; 45 | float r, g, b; 46 | float brightness; 47 | float speed; 48 | float frameRate; 49 | float frame; 50 | int segments; 51 | int startEntity; 52 | int endEntity; 53 | int modelIndex; 54 | int frameCount; 55 | struct model_s* pFollowModel; 56 | struct particle_s* particles; 57 | }; 58 | -------------------------------------------------------------------------------- /common/common_types.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | /** 11 | * @file 12 | * 13 | * Common data types 14 | */ 15 | 16 | struct Point 17 | { 18 | int x = 0; 19 | int y = 0; 20 | }; 21 | 22 | struct Rect 23 | { 24 | int left = 0; 25 | int right = 0; 26 | int top = 0; 27 | int bottom = 0; 28 | }; 29 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef struct con_nprint_s 19 | { 20 | int index; // Row # 21 | float time_to_live; // # of seconds before it dissappears 22 | float color[3]; // RGB colors ( 0.0 -> 1.0 scale ) 23 | } con_nprint_t; 24 | 25 | void Con_NPrintf(int idx, char* fmt, ...); 26 | void Con_NXPrintf(struct con_nprint_s* info, char* fmt, ...); 27 | -------------------------------------------------------------------------------- /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 | 17 | #pragma once 18 | 19 | #include "steam/steamtypes.h" // DAL 20 | 21 | // MD5 Hash 22 | typedef struct 23 | { 24 | unsigned int buf[4]; 25 | unsigned int bits[2]; 26 | unsigned char in[64]; 27 | } MD5Context_t; 28 | 29 | 30 | typedef uint32 CRC32_t; 31 | 32 | void CRC32_Init(CRC32_t* pulCRC); 33 | CRC32_t CRC32_Final(CRC32_t pulCRC); 34 | void CRC32_ProcessBuffer(CRC32_t* pulCRC, void* p, int len); 35 | void CRC32_ProcessByte(CRC32_t* pulCRC, unsigned char ch); 36 | int CRC_File(CRC32_t* crcvalue, char* pszFileName); 37 | 38 | unsigned char COM_BlockSequenceCRCByte(unsigned char* base, int length, int sequence); 39 | 40 | void MD5Init(MD5Context_t* context); 41 | void MD5Update(MD5Context_t* context, unsigned char const* buf, 42 | unsigned int len); 43 | void MD5Final(unsigned char digest[16], MD5Context_t* context); 44 | void Transform(unsigned int buf[4], unsigned int const in[16]); 45 | 46 | int MD5_Hash_File(unsigned char digest[16], char* pszFileName, int bUsefopen, int bSeed, unsigned int seed[4]); 47 | char* MD5_Print(unsigned char hash[16]); 48 | int MD5_Hash_CachedFile(unsigned char digest[16], unsigned char* pCache, int nFileSize, int bSeed, unsigned int seed[4]); 49 | 50 | int CRC_MapFile(CRC32_t* crcvalue, char* pszFileName); 51 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef struct demo_api_s 19 | { 20 | int (*IsRecording)(void); 21 | int (*IsPlayingback)(void); 22 | int (*IsTimeDemo)(void); 23 | void (*WriteBuffer)(int size, unsigned char* buffer); 24 | } demo_api_t; 25 | 26 | extern demo_api_t demoapi; 27 | -------------------------------------------------------------------------------- /common/director_cmds.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // director_cmds.h 9 | 10 | #pragma once 11 | 12 | // sub commands for svc_director 13 | 14 | #define DRC_ACTIVE 0 // tells client that he's an spectator and will get director command 15 | #define DRC_STATUS 1 // send status infos about proxy 16 | #define DRC_CAMERA 2 // set the actual director camera position 17 | #define DRC_EVENT 3 // informs the dircetor about ann important game event 18 | 19 | 20 | #define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important) 21 | #define DRC_FLAG_SIDE (1 << 4) 22 | #define DRC_FLAG_DRAMATIC (1 << 5) 23 | 24 | 25 | 26 | // commands of the director API function CallDirectorProc(...) 27 | 28 | #define DRCAPI_NOP 0 // no operation 29 | #define DRCAPI_ACTIVE 1 // de/acivates director mode in engine 30 | #define DRCAPI_STATUS 2 // request proxy information 31 | #define DRCAPI_SETCAM 3 // set camera n to given position and angle 32 | #define DRCAPI_GETCAM 4 // request camera n position and angle 33 | #define DRCAPI_DIRPLAY 5 // set director time and play with normal speed 34 | #define DRCAPI_DIRFREEZE 6 // freeze directo at this time 35 | #define DRCAPI_SETVIEWMODE 7 // overview or 4 cameras 36 | #define DRCAPI_SETOVERVIEWPARAMS 8 // sets parameter for overview mode 37 | #define DRCAPI_SETFOCUS 9 // set the camera which has the input focus 38 | #define DRCAPI_GETTARGETS 10 // queries engine for player list 39 | #define DRCAPI_SETVIEWPOINTS 11 // gives engine all waypoints 40 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef struct dlight_s 19 | { 20 | Vector origin; 21 | float radius; 22 | color24 color; 23 | float die; // stop lighting after this time 24 | float decay; // drop this each second 25 | float minlight; // don't add when contributing less 26 | int key; 27 | qboolean dark; // subtracts light instead of adding 28 | } dlight_t; 29 | -------------------------------------------------------------------------------- /common/dll_state.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | //DLL State Flags 11 | 12 | #define DLL_INACTIVE 0 // no dll 13 | #define DLL_ACTIVE 1 // dll is running 14 | #define DLL_PAUSED 2 // dll is paused 15 | #define DLL_CLOSE 3 // closing down dll 16 | #define DLL_TRANS 4 // Level Transition 17 | 18 | // DLL Pause reasons 19 | 20 | #define DLL_NORMAL 0 // User hit Esc or something. 21 | #define DLL_QUIT 4 // Quit now 22 | #define DLL_RESTART 6 // Switch to launcher for linux, does a quit but returns 1 23 | 24 | // DLL Substate info ( not relevant ) 25 | #define ENG_NORMAL (1 << 0) 26 | -------------------------------------------------------------------------------- /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 | 17 | #pragma once 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 | -------------------------------------------------------------------------------- /common/enums.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 2009, 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 | #pragma once 17 | 18 | typedef enum netsrc_s 19 | { 20 | NS_CLIENT, 21 | NS_SERVER, 22 | NS_MULTICAST // xxxMO 23 | } netsrc_t; 24 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | // Event was invoked with stated origin 19 | #define FEVENT_ORIGIN (1 << 0) 20 | 21 | // Event was invoked with stated angles 22 | #define FEVENT_ANGLES (1 << 1) 23 | 24 | typedef struct event_args_s 25 | { 26 | int flags; 27 | 28 | // Transmitted 29 | int entindex; 30 | 31 | float origin[3]; 32 | float angles[3]; 33 | float velocity[3]; 34 | 35 | int ducking; 36 | 37 | float fparam1; 38 | float fparam2; 39 | 40 | int iparam1; 41 | int iparam2; 42 | 43 | int bparam1; 44 | int bparam2; 45 | } event_args_t; 46 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | // Skip local host for event send. 19 | #define FEV_NOTHOST (1 << 0) 20 | 21 | // Send the event reliably. You must specify the origin and angles and use 22 | // PLAYBACK_EVENT_FULL for this to work correctly on the server for anything 23 | // that depends on the event origin/angles. I.e., the origin/angles are not 24 | // taken from the invoking edict for reliable events. 25 | #define FEV_RELIABLE (1 << 1) 26 | 27 | // Don't restrict to PAS/PVS, send this event to _everybody_ on the server ( useful for stopping CHAN_STATIC 28 | // sounds started by client event when client is not in PVS anymore ( hwguy in TFC e.g. ). 29 | #define FEV_GLOBAL (1 << 2) 30 | 31 | // If this client already has one of these events in its queue, just update the event instead of sending it as a duplicate 32 | // 33 | #define FEV_UPDATE (1 << 3) 34 | 35 | // Only send to entity specified as the invoker 36 | #define FEV_HOSTONLY (1 << 4) 37 | 38 | // Only send if the event was created on the server. 39 | #define FEV_SERVER (1 << 5) 40 | 41 | // Only issue event client side ( from shared code ) 42 | #define FEV_CLIENT (1 << 6) 43 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | #define IN_ATTACK (1 << 0) 19 | #define IN_JUMP (1 << 1) 20 | #define IN_DUCK (1 << 2) 21 | #define IN_FORWARD (1 << 3) 22 | #define IN_BACK (1 << 4) 23 | #define IN_USE (1 << 5) 24 | #define IN_CANCEL (1 << 6) 25 | #define IN_LEFT (1 << 7) 26 | #define IN_RIGHT (1 << 8) 27 | #define IN_MOVELEFT (1 << 9) 28 | #define IN_MOVERIGHT (1 << 10) 29 | #define IN_ATTACK2 (1 << 11) 30 | #define IN_RUN (1 << 12) 31 | #define IN_RELOAD (1 << 13) 32 | #define IN_ALT1 (1 << 14) 33 | #define IN_SCORE (1 << 15) // Used by client.dll for when scoreboard is held down 34 | -------------------------------------------------------------------------------- /common/ivoicetweak.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | // These provide access to the voice controls. 11 | typedef enum 12 | { 13 | MicrophoneVolume = 0, // values 0-1. 14 | OtherSpeakerScale, // values 0-1. Scales how loud other players are. 15 | MicBoost, // 20 db gain to voice input 16 | } VoiceTweakControl; 17 | 18 | 19 | typedef struct IVoiceTweak_s 20 | { 21 | // These turn voice tweak mode on and off. While in voice tweak mode, the user's voice is echoed back 22 | // without sending to the server. 23 | int (*StartVoiceTweakMode)(); // Returns 0 on error. 24 | void (*EndVoiceTweakMode)(); 25 | 26 | // Get/set control values. 27 | void (*SetControlFloat)(VoiceTweakControl iControl, float value); 28 | float (*GetControlFloat)(VoiceTweakControl iControl); 29 | 30 | int (*GetSpeakingVolume)(); 31 | } IVoiceTweak; 32 | -------------------------------------------------------------------------------- /common/mathlib.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 | #include "mathlib.h" 16 | -------------------------------------------------------------------------------- /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 | 17 | #pragma once 18 | 19 | // JoshA: Unfortunately netadr_s is passed to clients for connectionless packets. 20 | // No Valve mod uses them, but custom mods *might*, so not changing the start of this struct layout. 21 | // It's very unlikely they touch this, but I'd like to play as safe as possible with all ABI etc for mod compat. 22 | // If we want to add IPv6 someday, bung it at the end of netadr_s and leave ip + ipx alone. 23 | 24 | typedef enum 25 | { 26 | NA_UNUSED, 27 | NA_LOOPBACK, 28 | NA_BROADCAST, 29 | NA_IP, 30 | NA_IPX, // deprecated 31 | NA_BROADCAST_IPX, // deprecated 32 | } netadrtype_t; 33 | 34 | typedef struct netadr_s 35 | { 36 | netadrtype_t type; 37 | unsigned char ip[4]; 38 | unsigned char ipx[10]; // deprecated 39 | unsigned short port; 40 | } netadr_t; 41 | -------------------------------------------------------------------------------- /common/parsemsg.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1999, 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 | // parsemsg.h 17 | // MDC - copying from cstrike\cl_dll so career-mode stuff can catch messages 18 | // in this dll. (and C++ifying it) 19 | // 20 | 21 | #pragma once 22 | 23 | #define ASSERT(x) 24 | //-------------------------------------------------------------------------------------------------------------- 25 | void BEGIN_READ(void* buf, int size); 26 | int READ_CHAR(); 27 | int READ_BYTE(); 28 | int READ_SHORT(); 29 | int READ_WORD(); 30 | int READ_LONG(); 31 | float READ_FLOAT(); 32 | char* READ_STRING(); 33 | float READ_COORD(); 34 | float READ_ANGLE(); 35 | float READ_HIRESANGLE(); 36 | bool READ_OK(); 37 | 38 | //-------------------------------------------------------------------------------------------------------------- 39 | class BufferWriter 40 | { 41 | public: 42 | BufferWriter(); 43 | BufferWriter(unsigned char* buffer, int bufferLen); 44 | void Init(unsigned char* buffer, int bufferLen); 45 | 46 | void WriteByte(unsigned char data); 47 | void WriteLong(int data); 48 | void WriteString(const char* str); 49 | 50 | bool HasOverflowed(); 51 | int GetSpaceUsed(); 52 | 53 | protected: 54 | unsigned char* m_buffer; 55 | int m_remaining; 56 | bool m_overflow; 57 | int m_overallLength; 58 | }; 59 | 60 | //-------------------------------------------------------------------------------------------------------------- 61 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef enum 19 | { 20 | pt_static, 21 | pt_grav, 22 | pt_slowgrav, 23 | pt_fire, 24 | pt_explode, 25 | pt_explode2, 26 | pt_blob, 27 | pt_blob2, 28 | pt_vox_slowgrav, 29 | pt_vox_grav, 30 | pt_clientcustom // Must have callback function specified 31 | } ptype_t; 32 | 33 | // !!! if this is changed, it must be changed in d_ifacea.h too !!! 34 | typedef struct particle_s 35 | { 36 | // driver-usable fields 37 | Vector org; 38 | short color; 39 | short packedColor; 40 | // drivers never touch the following fields 41 | struct particle_s* next; 42 | Vector vel; 43 | float ramp; 44 | float die; 45 | ptype_t type; 46 | void (*deathfunc)(struct particle_s* particle); 47 | 48 | // for pt_clientcusttom, we'll call this function each frame 49 | void (*callback)(struct particle_s* particle, float frametime); 50 | 51 | // For deathfunc, etc. 52 | unsigned char context; 53 | } particle_t; 54 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef struct 19 | { 20 | Vector normal; 21 | float dist; 22 | } pmplane_t; 23 | 24 | typedef struct pmtrace_s pmtrace_t; 25 | 26 | struct pmtrace_s 27 | { 28 | qboolean allsolid; // if true, plane is not valid 29 | qboolean startsolid; // if true, the initial point was in a solid area 30 | qboolean inopen, inwater; // End point is in empty space or in water 31 | float fraction; // time completed, 1.0 = didn't hit anything 32 | Vector endpos; // final position 33 | pmplane_t plane; // surface normal at impact 34 | int ent; // entity at impact 35 | Vector deltavelocity; // Change in player's velocity caused by impact. 36 | // Only run on server. 37 | int hitgroup; 38 | }; 39 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | // Font stuff 19 | 20 | #define NUM_GLYPHS 256 21 | // does not exist: // #include "basetypes.h" 22 | 23 | typedef struct 24 | { 25 | short startoffset; 26 | short charwidth; 27 | } charinfo; 28 | 29 | typedef struct qfont_s 30 | { 31 | int width, height; 32 | int rowcount; 33 | int rowheight; 34 | charinfo fontinfo[NUM_GLYPHS]; 35 | unsigned char data[4]; 36 | } qfont_t; 37 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 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 | -------------------------------------------------------------------------------- /common/screenfade.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | typedef struct screenfade_s 11 | { 12 | float fadeSpeed; // How fast to fade (tics / second) (+ fade in, - fade out) 13 | float fadeEnd; // When the fading hits maximum 14 | float fadeTotalEnd; // Total End Time of the fade (used for FFADE_OUT) 15 | float fadeReset; // When to reset to not fading (for fadeout and hold) 16 | byte fader, fadeg, fadeb, fadealpha; // Fade color 17 | int fadeFlags; // Fading flags 18 | } screenfade_t; 19 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef struct mstudioevent_s 19 | { 20 | int frame; 21 | int event; 22 | int type; 23 | char options[64]; 24 | } mstudioevent_t; 25 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | typedef struct usercmd_s 19 | { 20 | short lerp_msec; // Interpolation time on client 21 | byte msec; // Duration in ms of command 22 | Vector viewangles; // Command view angles. 23 | 24 | // intended velocities 25 | float forwardmove; // Forward velocity. 26 | float sidemove; // Sideways velocity. 27 | float upmove; // Upward velocity. 28 | byte lightlevel; // Light level at spot where we are standing. 29 | unsigned short buttons; // Attack buttons 30 | byte impulse; // Impulse command issued. 31 | byte weaponselect; // Current weapon id 32 | 33 | // Experimental player impact stuff. 34 | int impact_index; 35 | Vector impact_position; 36 | } usercmd_t; 37 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | // Info about weapons player might have in his/her possession 19 | typedef struct weapon_data_s 20 | { 21 | int m_iId; 22 | int m_iClip; 23 | 24 | float m_flNextPrimaryAttack; 25 | float m_flNextSecondaryAttack; 26 | float m_flTimeWeaponIdle; 27 | 28 | int m_fInReload; 29 | int m_fInSpecialReload; 30 | float m_flNextReload; 31 | float m_flPumpTime; 32 | float m_fReloadTime; 33 | 34 | float m_fAimedDamage; 35 | float m_fNextAimBonus; 36 | int m_fInZoom; 37 | int m_iWeaponState; 38 | 39 | int iuser1; 40 | int iuser2; 41 | int iuser3; 42 | int iuser4; 43 | float fuser1; 44 | float fuser2; 45 | float fuser3; 46 | float fuser4; 47 | } weapon_data_t; 48 | -------------------------------------------------------------------------------- /dlls/UserMessages.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | inline int gmsgShake = 0; 19 | inline int gmsgFade = 0; 20 | inline int gmsgFlashlight = 0; 21 | inline int gmsgFlashBattery = 0; 22 | inline int gmsgResetHUD = 0; 23 | inline int gmsgInitHUD = 0; 24 | inline int gmsgShowGameTitle = 0; 25 | inline int gmsgCurWeapon = 0; 26 | inline int gmsgHealth = 0; 27 | inline int gmsgDamage = 0; 28 | inline int gmsgBattery = 0; 29 | inline int gmsgTrain = 0; 30 | inline int gmsgLogo = 0; 31 | inline int gmsgWeaponList = 0; 32 | inline int gmsgAmmoX = 0; 33 | inline int gmsgHudText = 0; 34 | inline int gmsgDeathMsg = 0; 35 | inline int gmsgScoreInfo = 0; 36 | inline int gmsgTeamInfo = 0; 37 | inline int gmsgTeamScore = 0; 38 | inline int gmsgGameMode = 0; 39 | inline int gmsgMOTD = 0; 40 | inline int gmsgServerName = 0; 41 | inline int gmsgAmmoPickup = 0; 42 | inline int gmsgWeapPickup = 0; 43 | inline int gmsgItemPickup = 0; 44 | inline int gmsgHideWeapon = 0; 45 | inline int gmsgSetCurWeap = 0; 46 | inline int gmsgSayText = 0; 47 | inline int gmsgTextMsg = 0; 48 | inline int gmsgSetFOV = 0; 49 | inline int gmsgShowMenu = 0; 50 | inline int gmsgGeigerRange = 0; 51 | inline int gmsgTeamNames = 0; 52 | 53 | inline int gmsgStatusText = 0; 54 | inline int gmsgStatusValue = 0; 55 | 56 | inline int gmsgWeapons = 0; 57 | 58 | void LinkUserMessages(); 59 | -------------------------------------------------------------------------------- /dlls/decals.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | // 19 | // Dynamic Decals 20 | // 21 | enum decal_e 22 | { 23 | DECAL_GUNSHOT1 = 0, 24 | DECAL_GUNSHOT2, 25 | DECAL_GUNSHOT3, 26 | DECAL_GUNSHOT4, 27 | DECAL_GUNSHOT5, 28 | DECAL_LAMBDA1, 29 | DECAL_LAMBDA2, 30 | DECAL_LAMBDA3, 31 | DECAL_LAMBDA4, 32 | DECAL_LAMBDA5, 33 | DECAL_LAMBDA6, 34 | DECAL_SCORCH1, 35 | DECAL_SCORCH2, 36 | DECAL_BLOOD1, 37 | DECAL_BLOOD2, 38 | DECAL_BLOOD3, 39 | DECAL_BLOOD4, 40 | DECAL_BLOOD5, 41 | DECAL_BLOOD6, 42 | DECAL_YBLOOD1, 43 | DECAL_YBLOOD2, 44 | DECAL_YBLOOD3, 45 | DECAL_YBLOOD4, 46 | DECAL_YBLOOD5, 47 | DECAL_YBLOOD6, 48 | DECAL_GLASSBREAK1, 49 | DECAL_GLASSBREAK2, 50 | DECAL_GLASSBREAK3, 51 | DECAL_BIGSHOT1, 52 | DECAL_BIGSHOT2, 53 | DECAL_BIGSHOT3, 54 | DECAL_BIGSHOT4, 55 | DECAL_BIGSHOT5, 56 | DECAL_SPIT1, 57 | DECAL_SPIT2, 58 | DECAL_BPROOF1, // Bulletproof glass decal 59 | DECAL_GARGSTOMP1, // Gargantua stomp crack 60 | DECAL_SMALLSCORCH1, // Small scorch mark 61 | DECAL_SMALLSCORCH2, // Small scorch mark 62 | DECAL_SMALLSCORCH3, // Small scorch mark 63 | DECAL_MOMMABIRTH, // Big momma birth splatter 64 | DECAL_MOMMASPLAT, 65 | }; 66 | 67 | typedef struct 68 | { 69 | const char* name; 70 | int index; 71 | } DLL_DECALLIST; 72 | 73 | extern DLL_DECALLIST gDecals[]; 74 | -------------------------------------------------------------------------------- /dlls/doors.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | // doors 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 // door must be opened by player's use button. 28 | #define SF_DOOR_NOMONSTERS 512 // Monster can't open 29 | #define SF_DOOR_SILENT 0x80000000 30 | -------------------------------------------------------------------------------- /dlls/explode.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | #define SF_ENVEXPLOSION_NODAMAGE (1 << 0) // when set, ENV_EXPLOSION will not actually inflict damage 19 | #define SF_ENVEXPLOSION_REPEATABLE (1 << 1) // can this entity be refired? 20 | #define SF_ENVEXPLOSION_NOFIREBALL (1 << 2) // don't draw the fireball 21 | #define SF_ENVEXPLOSION_NOSMOKE (1 << 3) // don't draw the smoke 22 | #define SF_ENVEXPLOSION_NODECAL (1 << 4) // don't make a scorch mark 23 | #define SF_ENVEXPLOSION_NOSPARKS (1 << 5) // don't make a scorch mark 24 | 25 | extern void ExplosionCreate(const Vector& center, const Vector& angles, edict_t* pOwner, int magnitude, bool doDamage); 26 | -------------------------------------------------------------------------------- /dlls/extdll.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | // 19 | // Global header file for extension DLLs 20 | // 21 | 22 | #include "Platform.h" 23 | 24 | // Header file containing definition of globalvars_t and entvars_t 25 | 26 | // Vector class 27 | #include "mathlib.h" 28 | 29 | // Shared engine/DLL constants 30 | #include "const.h" 31 | #include "progdefs.h" 32 | #include "edict.h" 33 | 34 | // Shared header describing protocol between engine and DLLs 35 | #include "eiface.h" 36 | 37 | // Shared header between the client DLL and the game DLLs 38 | #include "cdll_dll.h" 39 | -------------------------------------------------------------------------------- /dlls/game.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | extern void GameDLLInit( void ); 19 | void GameDLLShutdown(); 20 | 21 | 22 | extern cvar_t displaysoundlist; 23 | 24 | // multiplayer server rules 25 | extern cvar_t fragsleft; 26 | extern cvar_t timeleft; 27 | extern cvar_t teamplay; 28 | extern cvar_t fraglimit; 29 | extern cvar_t timelimit; 30 | extern cvar_t friendlyfire; 31 | extern cvar_t falldamage; 32 | extern cvar_t weaponstay; 33 | extern cvar_t forcerespawn; 34 | extern cvar_t flashlight; 35 | extern cvar_t aimcrosshair; 36 | extern cvar_t decalfrequency; 37 | extern cvar_t teamlist; 38 | extern cvar_t teamoverride; 39 | extern cvar_t defaultteam; 40 | extern cvar_t allowmonsters; 41 | extern cvar_t allow_spectators; 42 | extern cvar_t mp_chattime; 43 | 44 | extern cvar_t sv_allowbunnyhopping; 45 | 46 | extern cvar_t sv_busters; 47 | 48 | // Engine Cvars 49 | inline cvar_t* g_psv_gravity; 50 | inline cvar_t* g_psv_aim; 51 | inline cvar_t* g_psv_allow_autoaim; 52 | inline cvar_t* g_footsteps; 53 | inline cvar_t* g_psv_cheats; 54 | -------------------------------------------------------------------------------- /dlls/h_export.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | ===== h_export.cpp ======================================================== 18 | 19 | Entity classes exported by Halflife. 20 | 21 | */ 22 | 23 | #include "extdll.h" 24 | #include "util.h" 25 | 26 | #include "cbase.h" 27 | 28 | #undef DLLEXPORT 29 | #ifdef WIN32 30 | #define DLLEXPORT __stdcall 31 | #else 32 | #define DLLEXPORT __attribute__((visibility("default"))) 33 | #endif 34 | 35 | extern "C" void DLLEXPORT GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t* pGlobals) 36 | { 37 | memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); 38 | gpGlobals = pGlobals; 39 | } 40 | -------------------------------------------------------------------------------- /dlls/hl.def: -------------------------------------------------------------------------------- 1 | LIBRARY hl 2 | EXPORTS 3 | GiveFnptrsToDll @1 4 | SECTIONS 5 | .data READ WRITE 6 | -------------------------------------------------------------------------------- /dlls/items.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | class CItem : public CBaseEntity 19 | { 20 | public: 21 | void Spawn() override; 22 | CBaseEntity* Respawn() override; 23 | void EXPORT ItemTouch(CBaseEntity* pOther); 24 | void EXPORT Materialize(); 25 | virtual bool MyTouch(CBasePlayer* pPlayer) { return false; } 26 | }; 27 | -------------------------------------------------------------------------------- /dlls/maprules.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | -------------------------------------------------------------------------------- /dlls/monsterevent.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | typedef struct 19 | { 20 | int event; 21 | char* options; 22 | } MonsterEvent_t; 23 | 24 | #define EVENT_SPECIFIC 0 25 | #define EVENT_SCRIPTED 1000 26 | #define EVENT_SHARED 2000 27 | #define EVENT_CLIENT 5000 28 | 29 | #define MONSTER_EVENT_BODYDROP_LIGHT 2001 30 | #define MONSTER_EVENT_BODYDROP_HEAVY 2002 31 | 32 | #define MONSTER_EVENT_SWISHSOUND 2010 33 | -------------------------------------------------------------------------------- /dlls/plane.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #include "extdll.h" 16 | #include "plane.h" 17 | 18 | //========================================================= 19 | // Plane 20 | //========================================================= 21 | CPlane::CPlane() 22 | { 23 | m_fInitialized = false; 24 | } 25 | 26 | //========================================================= 27 | // InitializePlane - Takes a normal for the plane and a 28 | // point on the plane and 29 | //========================================================= 30 | void CPlane::InitializePlane(const Vector& vecNormal, const Vector& vecPoint) 31 | { 32 | m_vecNormal = vecNormal; 33 | m_flDist = DotProduct(m_vecNormal, vecPoint); 34 | m_fInitialized = true; 35 | } 36 | 37 | 38 | //========================================================= 39 | // PointInFront - determines whether the given vector is 40 | // in front of the plane. 41 | //========================================================= 42 | bool CPlane::PointInFront(const Vector& vecPoint) 43 | { 44 | float flFace; 45 | 46 | if (!m_fInitialized) 47 | { 48 | return false; 49 | } 50 | 51 | flFace = DotProduct(m_vecNormal, vecPoint) - m_flDist; 52 | 53 | if (flFace >= 0) 54 | { 55 | return true; 56 | } 57 | 58 | return false; 59 | } 60 | -------------------------------------------------------------------------------- /dlls/plane.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | //========================================================= 19 | // Plane 20 | //========================================================= 21 | class CPlane 22 | { 23 | public: 24 | CPlane(); 25 | 26 | //========================================================= 27 | // InitializePlane - Takes a normal for the plane and a 28 | // point on the plane and 29 | //========================================================= 30 | void InitializePlane(const Vector& vecNormal, const Vector& vecPoint); 31 | 32 | //========================================================= 33 | // PointInFront - determines whether the given vector is 34 | // in front of the plane. 35 | //========================================================= 36 | bool PointInFront(const Vector& vecPoint); 37 | 38 | Vector m_vecNormal; 39 | float m_flDist; 40 | bool m_fInitialized; 41 | }; 42 | -------------------------------------------------------------------------------- /dlls/scriptevent.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | #pragma once 17 | 18 | #define SCRIPT_EVENT_DEAD 1000 // character is now dead 19 | #define SCRIPT_EVENT_NOINTERRUPT 1001 // does not allow interrupt 20 | #define SCRIPT_EVENT_CANINTERRUPT 1002 // will allow interrupt 21 | #define SCRIPT_EVENT_FIREEVENT 1003 // event now fires 22 | #define SCRIPT_EVENT_SOUND 1004 // Play named wave file (on CHAN_BODY) 23 | #define SCRIPT_EVENT_SENTENCE 1005 // Play named sentence 24 | #define SCRIPT_EVENT_INAIR 1006 // Leave the character in air at the end of the sequence (don't find the floor) 25 | #define SCRIPT_EVENT_ENDANIMATION 1007 // Set the animation by name after the sequence completes 26 | #define SCRIPT_EVENT_SOUND_VOICE 1008 // Play named wave file (on CHAN_VOICE) 27 | #define SCRIPT_EVENT_SENTENCE_RND1 1009 // Play sentence group 25% of the time 28 | #define SCRIPT_EVENT_NOT_DEAD 1010 // Bring back to life (for life/death sequences) 29 | -------------------------------------------------------------------------------- /dlls/skill.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | // skill.cpp - code for skill level concerns 17 | //========================================================= 18 | #include "extdll.h" 19 | #include "util.h" 20 | #include "skill.h" 21 | 22 | //========================================================= 23 | // take the name of a cvar, tack a digit for the skill level 24 | // on, and return the value.of that Cvar 25 | //========================================================= 26 | float GetSkillCvar(const char* pName) 27 | { 28 | int iCount; 29 | float flValue; 30 | char szBuffer[64]; 31 | 32 | iCount = sprintf(szBuffer, "%s%d", pName, gSkillData.iSkillLevel); 33 | 34 | flValue = CVAR_GET_FLOAT(szBuffer); 35 | 36 | if (flValue <= 0) 37 | { 38 | ALERT(at_console, "\n\n** GetSkillCVar Got a zero for %s **\n\n", szBuffer); 39 | } 40 | 41 | return flValue; 42 | } 43 | -------------------------------------------------------------------------------- /dlls/spectator.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2001, 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 | // Spectator.h 16 | 17 | #pragma once 18 | 19 | class CBaseSpectator : public CBaseEntity 20 | { 21 | public: 22 | void Spawn() override; 23 | void SpectatorConnect(); 24 | void SpectatorDisconnect(); 25 | void SpectatorThink(); 26 | 27 | private: 28 | void SpectatorImpulseCommand(); 29 | }; 30 | -------------------------------------------------------------------------------- /dlls/squad.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: New version of the slider bar 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | //========================================================= 9 | // squad.h 10 | //========================================================= 11 | 12 | // these are special group roles that are assigned to members when the group is formed. 13 | // the reason these are explicitly assigned and tasks like throwing grenades to flush out 14 | // enemies is that it's bad to have two members trying to flank left at the same time, but 15 | // ok to have two throwing grenades at the same time. When a squad member cannot attack the 16 | // enemy, it will choose to execute its special role. 17 | #define bits_SQUAD_FLANK_LEFT ( 1 << 0 ) 18 | #define bits_SQUAD_FLANK_RIGHT ( 1 << 1 ) 19 | #define bits_SQUAD_ADVANCE ( 1 << 2 ) 20 | #define bits_SQUAD_FLUSH_ATTACK ( 1 << 3 ) 21 | -------------------------------------------------------------------------------- /docs/tutorials/setting-up-dotnet-sdk.md: -------------------------------------------------------------------------------- 1 | # Setting up the .NET SDK 2 | 3 | You can download the SDK here: https://dotnet.microsoft.com/en-us/download 4 | 5 | Install the SDK using the provided installer. 6 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 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 | -------------------------------------------------------------------------------- /engine/edict.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #define MAX_ENT_LEAFS 48 11 | 12 | #include "progdefs.h" 13 | 14 | struct edict_s 15 | { 16 | qboolean free; 17 | int serialnumber; 18 | link_t area; // linked to a division node or leaf 19 | 20 | int headnode; // -1 to use normal leaf check 21 | int num_leafs; 22 | short leafnums[MAX_ENT_LEAFS]; 23 | 24 | float freetime; // sv.time when the object was freed 25 | 26 | void* pvPrivateData; // Alloced and freed by engine, used by DLLs 27 | 28 | entvars_t v; // C exported fields from progs 29 | 30 | // other fields from progs come immediately after 31 | }; 32 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDL_config_h 23 | #define _SDL_config_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /** 28 | * \file SDL_config.h 29 | */ 30 | 31 | /* Add any platform that doesn't build using the configure system. */ 32 | #if defined(__WIN32__) 33 | #include "SDL_config_windows.h" 34 | #elif defined(__MACOSX__) 35 | #include "SDL_config_macosx.h" 36 | #elif defined(__IPHONEOS__) 37 | #include "SDL_config_iphoneos.h" 38 | #elif defined(__ANDROID__) 39 | #include "SDL_config_android.h" 40 | #elif defined(__PSP__) 41 | #include "SDL_config_psp.h" 42 | #else 43 | /* This is a minimal configuration just to get SDL running on new platforms */ 44 | #include "SDL_config_minimal.h" 45 | #endif /* platform config */ 46 | 47 | #ifdef USING_GENERATED_CONFIG_H 48 | #error Wrong SDL_config.h, check your include path? 49 | #endif 50 | 51 | #endif /* _SDL_config_h */ 52 | -------------------------------------------------------------------------------- /external/SDL2/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2017 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /external/SDL2/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2022 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /external/SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2022 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifdef __IPHONEOS__ 30 | #include 31 | #include 32 | #else 33 | #include 34 | #include 35 | #endif 36 | 37 | #ifndef APIENTRY 38 | #define APIENTRY 39 | #endif 40 | -------------------------------------------------------------------------------- /external/SDL2/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2022 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles2.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS) 30 | 31 | #ifdef __IPHONEOS__ 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #include 38 | #endif 39 | 40 | #else /* _MSC_VER */ 41 | 42 | /* OpenGL ES2 headers for Visual Studio */ 43 | #include "SDL_opengles2_khrplatform.h" 44 | #include "SDL_opengles2_gl2platform.h" 45 | #include "SDL_opengles2_gl2.h" 46 | #include "SDL_opengles2_gl2ext.h" 47 | 48 | #endif /* _MSC_VER */ 49 | 50 | #ifndef APIENTRY 51 | #define APIENTRY GL_APIENTRY 52 | #endif 53 | -------------------------------------------------------------------------------- /external/SDL2/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | /*#include */ 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /external/SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "https://github.com/libsdl-org/SDL.git@b424665e0899769b200231ba943353a5fee1b6b6" 2 | #define SDL_REVISION_NUMBER 0 3 | -------------------------------------------------------------------------------- /external/SDL2/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2022 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /external/SDL2/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2022 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #ifndef _begin_code_h 30 | #error close_code.h included without matching begin_code.h 31 | #endif 32 | #undef _begin_code_h 33 | 34 | /* Reset structure packing at previous byte alignment */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #pragma pack(pop) 40 | #endif /* Compiler needs structure packing set */ 41 | -------------------------------------------------------------------------------- /filecopy.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal EnableDelayedExpansion 3 | 4 | rem Set this path to your mod directory. You can use environment variables to avoid hardcoding the path if your team members have different install locations. 5 | set mod_directory=C:/Program Files (x86)/Steam/steamapps/common/Half-Life/halflife_updated 6 | 7 | rem Input paths may end with a backslash which will be interpreted as an escape character when passed into robocopy, so this needs to be escaped. 8 | set source=%~1 9 | set source=%source:\=\\% 10 | 11 | set destination=%mod_directory% 12 | 13 | if NOT "%~2" == "" ( 14 | set destination=!destination!/%~2 15 | ) 16 | 17 | set destination=!destination:\=\\! 18 | 19 | set filename=%~3 20 | 21 | echo Installing "!destination!/%filename%" 22 | 23 | rem If you are having problems with this command, remove the redirect to nul part (> nul) to get error messages from robocopy. 24 | @robocopy "%source%" "!destination!" "%filename%" /njh /njs /ndl /nc /ns /np > nul 25 | 26 | rem Needed because robocopy returns a non-zero code for success which makes Visual Studio treat this as failure. 27 | exit /b 0 28 | -------------------------------------------------------------------------------- /game_shared/bot/bot_constants.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // Author: Matthew D. Campbell (matt@turtlerockstudios.com), 2003 9 | 10 | #ifndef BOT_CONSTANTS_H 11 | #define BOT_CONSTANTS_H 12 | 13 | // 14 | // We'll define our own version of this, because everyone else does. :P 15 | // This needs to stay in sync with MAX_CLIENTS, but there's no header with the #define. Nice. 16 | // 17 | #define BOT_MAX_CLIENTS 32 18 | 19 | /// version number is MAJOR.MINOR 20 | #define BOT_VERSION_MAJOR 1 21 | #define BOT_VERSION_MINOR 50 22 | 23 | //-------------------------------------------------------------------------------------------------------- 24 | /** 25 | * Difficulty levels 26 | */ 27 | enum BotDifficultyType 28 | { 29 | BOT_EASY = 0, 30 | BOT_NORMAL = 1, 31 | BOT_HARD = 2, 32 | BOT_EXPERT = 3, 33 | 34 | NUM_DIFFICULTY_LEVELS 35 | }; 36 | 37 | #ifdef DEFINE_DIFFICULTY_NAMES 38 | char *BotDifficultyName[] = 39 | { 40 | "EASY", "NORMAL", "HARD", "EXPERT", NULL 41 | }; 42 | #else 43 | extern char *BotDifficultyName[]; 44 | #endif 45 | 46 | #endif // BOT_CONSTANTS_H 47 | -------------------------------------------------------------------------------- /game_shared/simple_checksum.h: -------------------------------------------------------------------------------- 1 | // simple_checksum.h 2 | // Functions to compute a simple checksum value for a file 3 | // Author: Michael S. Booth, Turtle Rock Studios (www.turtlerockstudios.com), September 2003 4 | 5 | #ifndef _SIMPLE_CHECKSUM_H_ 6 | #define _SIMPLE_CHECKSUM_H_ 7 | 8 | /** 9 | * Compute a simple checksum for the given data. 10 | * Each byte in the data is multiplied by its position to track re-ordering changes 11 | */ 12 | inline unsigned int ComputeSimpleChecksum( const unsigned char *dataPointer, int dataLength ) 13 | { 14 | unsigned int checksum = 0; 15 | 16 | for( int i=1; i<=dataLength; ++i ) 17 | { 18 | checksum += (*dataPointer) * i; 19 | ++dataPointer; 20 | } 21 | 22 | return checksum; 23 | } 24 | 25 | #endif // _SIMPLE_CHECKSUM_H_ 26 | -------------------------------------------------------------------------------- /game_shared/steam_util.h: -------------------------------------------------------------------------------- 1 | // steam_util.h 2 | // Steam utility classes 3 | // Author: Michael S. Booth (mike@turtlerockstudios.com), April 2003 4 | 5 | #ifndef _STEAM_UTIL_H_ 6 | #define _STEAM_UTIL_H_ 7 | 8 | //-------------------------------------------------------------------------------------------------------------- 9 | /** 10 | * Used to load a file via Steam 11 | */ 12 | class SteamFile 13 | { 14 | public: 15 | SteamFile( const char *filename ); 16 | ~SteamFile(); 17 | 18 | bool IsValid( void ) const { return (m_fileData) ? true : false; } ///< returns true if this file object is attached to a file 19 | bool Read( void *data, int length ); ///< read 'length' bytes from the file 20 | 21 | private: 22 | byte *m_fileData; ///< the file read into memory 23 | int m_fileDataLength; ///< the length of the file 24 | 25 | byte *m_cursor; ///< where we are in the file 26 | int m_bytesLeft; ///< the number of bytes left in the file 27 | }; 28 | 29 | inline SteamFile::SteamFile( const char *filename ) 30 | { 31 | m_fileData = (byte *)LOAD_FILE_FOR_ME( const_cast( filename ), &m_fileDataLength ); 32 | m_cursor = m_fileData; 33 | m_bytesLeft = m_fileDataLength; 34 | } 35 | 36 | inline SteamFile::~SteamFile() 37 | { 38 | if (m_fileData) 39 | FREE_FILE( m_fileData ); 40 | } 41 | 42 | inline bool SteamFile::Read( void *data, int length ) 43 | { 44 | if (length > m_bytesLeft || m_cursor == NULL || m_bytesLeft <= 0) 45 | return false; 46 | 47 | byte *readCursor = static_cast( data ); 48 | 49 | for( int i=0; igetSize(w, h); 18 | pChild->getSize(cw, ch); 19 | 20 | int xCenter = (w - cw) / 2; 21 | int yCenter = (h - ch) / 2; 22 | 23 | if (alignment == Label::a_west) 24 | pChild->setPos(0, yCenter); 25 | else if (alignment == Label::a_northwest) 26 | pChild->setPos(0, 0); 27 | else if (alignment == Label::a_north) 28 | pChild->setPos(xCenter, 0); 29 | else if (alignment == Label::a_northeast) 30 | pChild->setPos(w - cw, 0); 31 | else if (alignment == Label::a_east) 32 | pChild->setPos(w - cw, yCenter); 33 | else if (alignment == Label::a_southeast) 34 | pChild->setPos(w - cw, h - ch); 35 | else if (alignment == Label::a_south) 36 | pChild->setPos(xCenter, h - ch); 37 | else if (alignment == Label::a_southwest) 38 | pChild->setPos(0, h - ch); 39 | else if (alignment == Label::a_center) 40 | pChild->setPos(xCenter, yCenter); 41 | } 42 | -------------------------------------------------------------------------------- /game_shared/vgui_helpers.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include "VGUI_Panel.h" 11 | #include "VGUI_Label.h" 12 | 13 | 14 | inline int PanelTop(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return y;} 15 | inline int PanelLeft(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return x;} 16 | inline int PanelRight(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return x+w;} 17 | inline int PanelBottom(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return y+h;} 18 | inline int PanelWidth(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return w;} 19 | inline int PanelHeight(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return h;} 20 | 21 | // Places child at the requested position inside pParent. iAlignment is from Label::Alignment. 22 | void AlignPanel(vgui::Panel *pChild, vgui::Panel *pParent, int alignment); 23 | -------------------------------------------------------------------------------- /game_shared/vgui_loadtga.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include "VGUI_BitmapTGA.h" 11 | 12 | vgui::BitmapTGA* vgui_LoadTGA(char const *pFilename); 13 | vgui::BitmapTGA* vgui_LoadTGANoInvertAlpha(char const *pFilename); 14 | -------------------------------------------------------------------------------- /game_shared/vgui_scrollbar2.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class IntChangeSignal; 18 | class Button; 19 | class Slider2; 20 | 21 | //----------------------------------------------------------------------------- 22 | // Purpose: Hacked up version of the vgui scrollbar 23 | //----------------------------------------------------------------------------- 24 | class VGUIAPI ScrollBar2 : public Panel 25 | { 26 | public: 27 | ScrollBar2(int x, int y, int wide, int tall, bool vertical); 28 | 29 | public: 30 | virtual void setValue(int value); 31 | virtual int getValue(); 32 | virtual void addIntChangeSignal(IntChangeSignal* s); 33 | virtual void setRange(int min, int max); 34 | virtual void setRangeWindow(int rangeWindow); 35 | virtual void setRangeWindowEnabled(bool state); 36 | void setSize(int wide, int tall) override; 37 | virtual bool isVertical(); 38 | virtual bool hasFullRange(); 39 | virtual void setButton(Button* button, int index); 40 | virtual Button* getButton(int index); 41 | virtual void setSlider(Slider2* slider); 42 | virtual Slider2* getSlider(); 43 | virtual void doButtonPressed(int buttonIndex); 44 | virtual void setButtonPressedScrollValue(int value); 45 | virtual void validate(); 46 | 47 | public: //bullshit public 48 | virtual void fireIntChangeSignal(); 49 | 50 | protected: 51 | void performLayout() override; 52 | 53 | protected: 54 | Button* _button[2]; 55 | Slider2* _slider; 56 | Dar _intChangeSignalDar; 57 | int _buttonPressedScrollValue; 58 | }; 59 | 60 | } 61 | -------------------------------------------------------------------------------- /game_shared/vgui_slider2.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | enum MouseCode; 18 | class IntChangeSignal; 19 | 20 | class VGUIAPI Slider2 : public Panel 21 | { 22 | private: 23 | bool _vertical; 24 | bool _dragging; 25 | int _nobPos[2]; 26 | int _nobDragStartPos[2]; 27 | int _dragStartPos[2]; 28 | Dar _intChangeSignalDar; 29 | int _range[2]; 30 | int _value; 31 | int _rangeWindow; 32 | bool _rangeWindowEnabled; 33 | int _buttonOffset; 34 | 35 | public: 36 | Slider2(int x, int y, int wide, int tall, bool vertical); 37 | 38 | public: 39 | virtual void setValue(int value); 40 | virtual int getValue(); 41 | virtual bool isVertical(); 42 | virtual void addIntChangeSignal(IntChangeSignal* s); 43 | virtual void setRange(int min, int max); 44 | virtual void getRange(int& min, int& max); 45 | virtual void setRangeWindow(int rangeWindow); 46 | virtual void setRangeWindowEnabled(bool state); 47 | void setSize(int wide, int tall) override; 48 | virtual void getNobPos(int& min, int& max); 49 | virtual bool hasFullRange(); 50 | virtual void setButtonOffset(int buttonOffset); 51 | 52 | private: 53 | virtual void recomputeNobPosFromValue(); 54 | virtual void recomputeValueFromNobPos(); 55 | 56 | public: //bullshit public 57 | virtual void privateCursorMoved(int x, int y, Panel* panel); 58 | virtual void privateMousePressed(MouseCode code, Panel* panel); 59 | virtual void privateMouseReleased(MouseCode code, Panel* panel); 60 | 61 | protected: 62 | virtual void fireIntChangeSignal(); 63 | void paintBackground() override; 64 | }; 65 | 66 | } 67 | -------------------------------------------------------------------------------- /game_shared/voice_banmgr.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | // This class manages the (persistent) list of squelched players. 11 | class CVoiceBanMgr 12 | { 13 | public: 14 | CVoiceBanMgr(); 15 | ~CVoiceBanMgr(); 16 | 17 | // Init loads the list of squelched players from disk. 18 | bool Init(char const* pGameDir); 19 | void Term(); 20 | 21 | // Saves the state into voice_squelch.dt. 22 | void SaveState(char const* pGameDir); 23 | 24 | bool GetPlayerBan(char const playerID[16]); 25 | void SetPlayerBan(char const playerID[16], bool bSquelch); 26 | 27 | // Call your callback for each banned player. 28 | void ForEachBannedPlayer(void (*callback)(char id[16])); 29 | 30 | 31 | protected: 32 | class BannedPlayer 33 | { 34 | public: 35 | char m_PlayerID[16]; 36 | BannedPlayer *m_pPrev, *m_pNext; 37 | }; 38 | 39 | void Clear(); 40 | BannedPlayer* InternalFindPlayerSquelch(char const playerID[16]); 41 | BannedPlayer* AddBannedPlayer(char const playerID[16]); 42 | 43 | 44 | protected: 45 | BannedPlayer m_PlayerHash[256]; 46 | }; 47 | -------------------------------------------------------------------------------- /game_shared/voice_common.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include "cdll_dll.h" 11 | #include "bitvec.h" 12 | 13 | constexpr int VOICE_MAX_PLAYERS_DW = (MAX_PLAYERS / 32) + ((MAX_PLAYERS & 31) != 0 ? 1 : 0); 14 | 15 | typedef CBitVec CPlayerBitVec; 16 | -------------------------------------------------------------------------------- /game_shared/voice_vgui_tweakdlg.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VOICE_VGUI_TWEAKDLG_H 9 | #define VOICE_VGUI_TWEAKDLG_H 10 | #ifdef _WIN32 11 | #pragma once 12 | #endif 13 | 14 | 15 | class CMenuPanel; 16 | 17 | 18 | // Returns true if the tweak dialog is currently up. 19 | bool IsTweakDlgOpen(); 20 | 21 | // Returns a global instance of the tweak dialog. 22 | CMenuPanel* GetVoiceTweakDlg(); 23 | 24 | 25 | #endif // VOICE_VGUI_TWEAKDLG_H 26 | -------------------------------------------------------------------------------- /lib/public/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/lib/public/SDL2.lib -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | # Don't commit compiled mod libraries 2 | *.so 3 | *.so.* 4 | *.o 5 | *_map.txt 6 | 7 | # Allow Half-Life-specific files that would otherwise be ignored 8 | !libSDL2.so 9 | !libSDL2-2.0.so.0 10 | !libSDL2-2.0.so.0.dbg 11 | !vgui.so 12 | !release/vgui.so 13 | -------------------------------------------------------------------------------- /linux/gendbg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | OBJCOPY=objcopy 4 | 5 | function usage { 6 | echo "$0 /path/to/input/file [-o /path/to/output/file ]" 7 | echo "" 8 | } 9 | 10 | if [ $# == 0 ]; then 11 | usage 12 | exit 2 13 | fi 14 | 15 | if [ $(basename $1) == $1 ]; then 16 | INFILEDIR=$PWD 17 | else 18 | INFILEDIR=$(cd ${1%/*} && echo $PWD) 19 | fi 20 | INFILE=$(basename $1) 21 | 22 | OUTFILEDIR=$INFILEDIR 23 | OUTFILE=$INFILE.dbg 24 | 25 | while getopts "o:" opt; do 26 | case $opt in 27 | o) 28 | OUTFILEDIR=$(cd ${OPTARG%/*} && echo $PWD) 29 | OUTFILE=$(basename $OPTARG) 30 | ;; 31 | esac 32 | done 33 | 34 | if [ "$OUTFILEDIR" != "$INFILEDIR" ]; then 35 | INFILE=${INFILEDIR}/${INFILE} 36 | OUTFILE=${OUTFILEDIR}/${OUTFILE} 37 | fi 38 | 39 | pushd "$INFILEDIR" 40 | $OBJCOPY "$INFILE" "$OUTFILE" 41 | $OBJCOPY --add-gnu-debuglink="$OUTFILE" "$INFILE" 42 | popd 43 | 44 | -------------------------------------------------------------------------------- /linux/libSDL2-2.0.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/linux/libSDL2-2.0.so.0 -------------------------------------------------------------------------------- /linux/libSDL2-2.0.so.0.dbg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/linux/libSDL2-2.0.so.0.dbg -------------------------------------------------------------------------------- /linux/libSDL2.so: -------------------------------------------------------------------------------- 1 | libSDL2-2.0.so.0 -------------------------------------------------------------------------------- /linux/release/vgui.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/linux/release/vgui.so -------------------------------------------------------------------------------- /linux/vgui.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/linux/vgui.so -------------------------------------------------------------------------------- /network/Delta.txt: -------------------------------------------------------------------------------- 1 | Place delta.lst in the valve\ folder ( or a customized copy can be placed in your game directory's folder ) 2 | 3 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | void PM_ViewEntity(); 19 | void PM_DrawBBox(Vector mins, Vector maxs, Vector origin, int pcolor, float life); 20 | void PM_ParticleLine(Vector start, Vector end, int pcolor, float life, float vert); 21 | void PM_ShowClipBox(); 22 | -------------------------------------------------------------------------------- /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 | 17 | #pragma once 18 | 19 | #define MAX_PHYSINFO_STRING 256 20 | -------------------------------------------------------------------------------- /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 | 16 | #pragma once 17 | 18 | #define CTEXTURESMAX 512 // max number of textures loaded 19 | #define CBTEXTURENAMEMAX 13 // only load first n chars of name 20 | 21 | #define CHAR_TEX_CONCRETE 'C' // texture types 22 | #define CHAR_TEX_METAL 'M' 23 | #define CHAR_TEX_DIRT 'D' 24 | #define CHAR_TEX_VENT 'V' 25 | #define CHAR_TEX_GRATE 'G' 26 | #define CHAR_TEX_TILE 'T' 27 | #define CHAR_TEX_SLOSH 'S' 28 | #define CHAR_TEX_WOOD 'W' 29 | #define CHAR_TEX_COMPUTER 'P' 30 | #define CHAR_TEX_GLASS 'Y' 31 | #define CHAR_TEX_FLESH 'F' 32 | #define CHAR_TEX_SNOW 'N' 33 | -------------------------------------------------------------------------------- /pm_shared/pm_movevars.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | // pm_movevars.h 9 | 10 | #pragma once 11 | 12 | // movevars_t // Physics variables. 13 | typedef struct movevars_s movevars_t; 14 | 15 | struct movevars_s 16 | { 17 | float gravity; // Gravity for map 18 | float stopspeed; // Deceleration when not moving 19 | float maxspeed; // Max allowed speed 20 | float spectatormaxspeed; 21 | float accelerate; // Acceleration factor 22 | float airaccelerate; // Same for when in open air 23 | float wateraccelerate; // Same for when in water 24 | float friction; 25 | float edgefriction; // Extra friction near dropofs 26 | float waterfriction; // Less in water 27 | float entgravity; // 1.0 28 | float bounce; // Wall bounce value. 1.0 29 | float stepsize; // sv_stepsize; 30 | float maxvelocity; // maximum server velocity. 31 | float zmax; // Max z-buffer range (for GL) 32 | float waveHeight; // Water wave height (for GL) 33 | qboolean footsteps; // Play footstep sounds 34 | char skyName[32]; // Name of the sky map 35 | float rollangle; 36 | float rollspeed; 37 | float skycolor_r; // Sky color 38 | float skycolor_g; // 39 | float skycolor_b; // 40 | float skyvec_x; // Sky vector 41 | float skyvec_y; // 42 | float skyvec_z; // 43 | }; 44 | 45 | extern movevars_t movevars; 46 | -------------------------------------------------------------------------------- /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 | 20 | #pragma once 21 | 22 | #include "Platform.h" 23 | 24 | struct playermove_s; 25 | 26 | void PM_Init(playermove_s* ppmove); 27 | void PM_Move(playermove_s* ppmove, qboolean server); 28 | char PM_FindTextureType(const char* name); 29 | 30 | /** 31 | * @brief Engine calls this to enumerate player collision hulls, for prediction. Return false if the hullnumber doesn't exist. 32 | */ 33 | bool PM_GetHullBounds(int hullnumber, float* mins, float* maxs); 34 | 35 | // Spectator Movement modes (stored in pev->iuser1, so the physics code can get at them) 36 | #define OBS_NONE 0 37 | #define OBS_CHASE_LOCKED 1 38 | #define OBS_CHASE_FREE 2 39 | #define OBS_ROAMING 3 40 | #define OBS_IN_EYE 4 41 | #define OBS_MAP_FREE 5 42 | #define OBS_MAP_CHASE 6 43 | 44 | extern playermove_s* pmove; 45 | 46 | inline bool g_CheckForPlayerStuck = false; 47 | -------------------------------------------------------------------------------- /projects/readme.txt: -------------------------------------------------------------------------------- 1 | Directory Contents 2 | ================== 3 | 4 | vs2019 5 | Contains Visual C++ 2019 project and solution files. 6 | Please read readme.txt included in that folder for further instructions. 7 | 8 | 9 | Other notes 10 | =========== 11 | 12 | MSVC++ 6.0 .dsp files can be found in the appropriate folders. 13 | 14 | Linux Makefiles can be found in ../linux/ 15 | -------------------------------------------------------------------------------- /projects/vs2019/makels.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {d5586ccb-fc7d-4e19-8bde-8656f3036ed7} 18 | 19 | 20 | {63245e01-3884-4650-b2a4-90c672eb89e9} 21 | 22 | 23 | 24 | 25 | Source Files\utils\makels 26 | 27 | 28 | -------------------------------------------------------------------------------- /projects/vs2019/procinfo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {3d07af82-de85-47cb-bd87-125a9043c5ad} 18 | 19 | 20 | {b8aff63a-415c-4e31-ad22-ba822090e8a2} 21 | 22 | 23 | {acb9edd8-ccf7-4221-8893-0cd5a3368fbc} 24 | 25 | 26 | {93d4c035-5f6d-4ffd-83c0-af849ad01f21} 27 | 28 | 29 | 30 | 31 | Source Files\utils\procinfo 32 | 33 | 34 | 35 | 36 | Header Files\utils\procinfo 37 | 38 | 39 | -------------------------------------------------------------------------------- /projects/vs2019/projects.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31025.194 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hldll", "hldll.vcxproj", "{69DDADC0-97F4-419E-86EB-C91781A0D2E0}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hl_cdll", "hl_cdll.vcxproj", "{DC1DD765-CFEB-47DA-A2EA-9F1E20A24272}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {69DDADC0-97F4-419E-86EB-C91781A0D2E0} = {69DDADC0-97F4-419E-86EB-C91781A0D2E0} 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Release|Win32 = Release|Win32 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {69DDADC0-97F4-419E-86EB-C91781A0D2E0}.Debug|Win32.ActiveCfg = Debug|Win32 20 | {69DDADC0-97F4-419E-86EB-C91781A0D2E0}.Debug|Win32.Build.0 = Debug|Win32 21 | {69DDADC0-97F4-419E-86EB-C91781A0D2E0}.Release|Win32.ActiveCfg = Release|Win32 22 | {69DDADC0-97F4-419E-86EB-C91781A0D2E0}.Release|Win32.Build.0 = Release|Win32 23 | {DC1DD765-CFEB-47DA-A2EA-9F1E20A24272}.Debug|Win32.ActiveCfg = Debug|Win32 24 | {DC1DD765-CFEB-47DA-A2EA-9F1E20A24272}.Debug|Win32.Build.0 = Debug|Win32 25 | {DC1DD765-CFEB-47DA-A2EA-9F1E20A24272}.Release|Win32.ActiveCfg = Release|Win32 26 | {DC1DD765-CFEB-47DA-A2EA-9F1E20A24272}.Release|Win32.Build.0 = Release|Win32 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | GlobalSection(ExtensibilityGlobals) = postSolution 32 | SolutionGuid = {36647C2B-5E5A-4031-8817-BDE571C97F74} 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /public/cl_dll/IGameClientExports.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include "interface.h" 11 | 12 | //----------------------------------------------------------------------------- 13 | // Purpose: Exports a set of functions for the GameUI interface to interact with the game client 14 | //----------------------------------------------------------------------------- 15 | class IGameClientExports : public IBaseInterface 16 | { 17 | public: 18 | // returns the name of the server the user is connected to, if any 19 | virtual const char *GetServerHostName() = 0; 20 | 21 | // ingame voice manipulation 22 | virtual bool IsPlayerGameVoiceMuted(int playerIndex) = 0; 23 | virtual void MutePlayerGameVoice(int playerIndex) = 0; 24 | virtual void UnmutePlayerGameVoice(int playerIndex) = 0; 25 | }; 26 | 27 | #define GAMECLIENTEXPORTS_INTERFACE_VERSION "GameClientExports001" 28 | -------------------------------------------------------------------------------- /utils/bspinfo/bspinfo.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 | ****/ 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 < argc; i++) 30 | { 31 | printf("---------------------\n"); 32 | strcpy(source, argv[i]); 33 | DefaultExtension(source, ".bsp"); 34 | f = fopen(source, "rb"); 35 | if (f) 36 | { 37 | size = filelength(f); 38 | fclose(f); 39 | } 40 | else 41 | size = 0; 42 | printf("%s: %i\n", source, size); 43 | 44 | LoadBSPFile(source); 45 | PrintBSPFileSizes(); 46 | printf("---------------------\n"); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /utils/common/l3dslib.h: -------------------------------------------------------------------------------- 1 | // 2 | // l3dslib.h: header file for loading triangles from a 3DS triangle file 3 | // 4 | void Load3DSTriangleList (char *filename, triangle_t **pptri, int *numtriangles); 5 | 6 | -------------------------------------------------------------------------------- /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, byte* palette); 55 | int WriteBMPfile(char* szFile, byte* pbBits, int width, int height, byte* pbPalette); 56 | -------------------------------------------------------------------------------- /utils/common/meter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | meter.c 3 | 4 | Implements a dorky progess meter 5 | */ 6 | 7 | int showmeter = 0; 8 | static int meter_cur, meter_max; 9 | 10 | void MeterStart( int max ) 11 | { 12 | meter_cur = 0; 13 | meter_max = max; 14 | } 15 | 16 | 17 | void MeterAdvance( int amt ) 18 | { 19 | float pct; 20 | 21 | meter_cur += amt; 22 | 23 | if( showmeter ) 24 | { 25 | pct = ( (float) meter_cur / (float) meter_max ) * 100.0; 26 | printf( "\r%d/%d (%0.2f%%) ", meter_cur, meter_max, pct ); 27 | } 28 | } 29 | 30 | 31 | void MeterEnd( void ) 32 | { 33 | printf( "\n" ); 34 | } 35 | -------------------------------------------------------------------------------- /utils/common/meter.h: -------------------------------------------------------------------------------- 1 | #ifndef _METER_H_ 2 | #define _METER_H_ 3 | 4 | /* 5 | meter.h 6 | 7 | Dorky status bar stuff 8 | */ 9 | 10 | void MeterStart( int max ); 11 | void MeterAdvance( int amt ); 12 | void MeterEnd( void ); 13 | 14 | extern int showmeter; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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) \ 22 | { \ 23 | if (p) \ 24 | printf("%-20s ", #f ":"); \ 25 | RunThreadsOn(n, p, f); \ 26 | } 27 | #define RunThreadsOnIndividual(n, p, f) \ 28 | { \ 29 | if (p) \ 30 | printf("%-20s ", #f ":"); \ 31 | RunThreadsOnIndividual(n, p, f); \ 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /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 | { 18 | vec3_t verts[3]; 19 | } triangle_t; 20 | 21 | void LoadTriangleList(char* filename, triangle_t** pptri, int* numtriangles); 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 | 46 | void W_OpenWad(char* filename); 47 | int W_CheckNumForName(char* name); 48 | int W_GetNumForName(char* name); 49 | int W_LumpLength(int lump); 50 | void W_ReadLumpNum(int lump, void* dest); 51 | void* W_LoadLumpNum(int lump); 52 | void* W_LoadLumpName(char* name); 53 | 54 | void CleanupName(char* in, char* out); 55 | 56 | // 57 | // wad creation 58 | // 59 | void NewWad(char* pathname, qboolean bigendien); 60 | void AddLump(char* name, void* buffer, int length, int type, int compress); 61 | void WriteWad(int wad3); 62 | -------------------------------------------------------------------------------- /utils/light/light.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #include "cmdlib.h" 9 | #include "mathlib.h" 10 | #include "bspfile.h" 11 | #include "threads.h" 12 | 13 | 14 | #define DEFAULTLIGHTLEVEL 300 15 | 16 | typedef struct entity_s 17 | { 18 | char classname[64]; 19 | vec3_t origin; 20 | float angle; 21 | vec3_t light; 22 | int style; 23 | qboolean targetent; 24 | vec3_t targetorigin; 25 | } lightentity_t; 26 | 27 | extern lightentity_t lightentities[MAX_MAP_ENTITIES]; 28 | extern int numlightentities; 29 | 30 | #define LIGHT_ON_EPSILON 0.1 31 | 32 | #define MAXLIGHTS 1024 33 | 34 | void LoadNodes(char* file); 35 | qboolean TestLine(vec3_t start, vec3_t stop); 36 | 37 | void LightFace(int surfnum); 38 | void LightLeaf(dleaf_t* leaf); 39 | 40 | void MakeTnodes(); 41 | 42 | extern float scaledist; 43 | extern float scalecos; 44 | extern float rangescale; 45 | 46 | extern int c_culldistplane, c_proper; 47 | 48 | byte* GetFileSpace(int size); 49 | extern byte* filebase; 50 | 51 | extern vec3_t bsp_origin; 52 | extern vec3_t bsp_xvector; 53 | extern vec3_t bsp_yvector; 54 | 55 | void TransformSample(vec3_t in, vec3_t out); 56 | void RotateSample(vec3_t in, vec3_t out); 57 | 58 | extern qboolean extrasamples; 59 | 60 | extern float minlights[MAX_MAP_FACES]; 61 | -------------------------------------------------------------------------------- /utils/procinfo/lib/win32_vc6/procinfo.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/procinfo/lib/win32_vc6/procinfo.lib -------------------------------------------------------------------------------- /utils/procinfo/procinfo.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #if !defined(PROCINFOH) 9 | #define PROCINFOH 10 | #pragma once 11 | 12 | int PROC_GetSpeed(void); 13 | int PROC_IsMMX(void); 14 | 15 | #endif // PROCINFOH 16 | -------------------------------------------------------------------------------- /utils/qbsp2/cull.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 | ****/ 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/nodraw.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 | ****/ 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/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/source.p0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/qcsg/source.p0 -------------------------------------------------------------------------------- /utils/qcsg/source.p1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/qcsg/source.p1 -------------------------------------------------------------------------------- /utils/qcsg/source.p2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/qcsg/source.p2 -------------------------------------------------------------------------------- /utils/qlumpy/qlumpy.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/qlumpy/qlumpy.doc -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CServerCtrlApp: 19 | // See ServerCtrl.cpp for the implementation of this class 20 | // 21 | 22 | class CServerCtrlApp : public CWinApp 23 | { 24 | public: 25 | CServerCtrlApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CServerCtrlApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CServerCtrlApp) 37 | //}}AFX_MSG 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 44 | //{{AFX_INSERT_LOCATION}} 45 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 46 | 47 | #endif // !defined(AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 48 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #include // MFC core and standard components 16 | #include // MFC extensions 17 | #include // MFC support for Internet Explorer 4 Common Controls 18 | #ifndef _AFX_NO_AFXCMN_SUPPORT 19 | #include // MFC support for Windows Common Controls 20 | #endif // _AFX_NO_AFXCMN_SUPPORT 21 | 22 | 23 | //{{AFX_INSERT_LOCATION}} 24 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 25 | 26 | #endif // !defined(AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_) 27 | -------------------------------------------------------------------------------- /utils/serverctrl/res/serverctrl.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/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.dle 2 | EXPORTS 3 | LibDescription @1 4 | LibNumberClasses @2 5 | LibClassDesc @3 6 | LibVersion @4 7 | SECTIONS 8 | .data READ WRITE 9 | -------------------------------------------------------------------------------- /utils/smdlexp/smdlexp.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/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/s_bubble.spr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/sprgen/s_bubble.spr -------------------------------------------------------------------------------- /utils/sprgen/s_explod.spr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/sprgen/s_explod.spr -------------------------------------------------------------------------------- /utils/sprgen/s_light.spr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/sprgen/s_light.spr -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ActionSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | /* 13 | 14 | TODO: maybe try something like this.. 15 | 16 | class VGUIAPI ActionSignal 17 | { 18 | }; 19 | 20 | class VGUIAPI ActionSignalSimple : public ActionSignal 21 | { 22 | public: 23 | virtual void actionPerformed(Panel* panel)=0; 24 | }; 25 | 26 | class VGUIAPI ActionSignalInt : public ActionSignal 27 | { 28 | public: 29 | virtual void actionPerformed(int value,Panel* panel)=0; 30 | }; 31 | 32 | 33 | DefaultButtonModel would implement: 34 | 35 | virtual void addActionSignal(ActionSignal* s) 36 | { 37 | if(s!=null) 38 | { 39 | _actionSignalDar.putElement(s); 40 | } 41 | } 42 | 43 | virtual void fireActionSignal() 44 | { 45 | for(int i=0;i<_actionSignalDar.getCount();i++) 46 | { 47 | ActionSignal* signal=_actionSignalDar[i]; 48 | 49 | ActionSignalSimple* ss=dynamic_cast(signal); 50 | if(ss!=null) 51 | { 52 | ss->actionPerformed(this); 53 | } 54 | 55 | ActionSignalCommand* si=dynamic_cast(signal); 56 | if(si!=null) 57 | { 58 | si->actionPerformed(_intValue,this); 59 | } 60 | } 61 | } 62 | 63 | 64 | */ 65 | 66 | #include 67 | 68 | namespace vgui 69 | { 70 | 71 | class Panel; 72 | 73 | class VGUIAPI ActionSignal 74 | { 75 | public: 76 | virtual void actionPerformed(Panel* panel)=0; 77 | }; 78 | 79 | } 80 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Bitmap.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Panel; 17 | 18 | class VGUIAPI Bitmap : public Image 19 | { 20 | private: 21 | int _id; 22 | bool _uploaded; 23 | public: 24 | Bitmap(); 25 | protected: 26 | virtual void setSize(int wide,int tall); 27 | virtual void setRGBA(int x,int y,uchar r,uchar g,uchar b,uchar a); 28 | public: 29 | virtual void paint(Panel* panel); 30 | protected: 31 | uchar* _rgba; 32 | }; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BitmapTGA.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class Panel; 16 | class InputStream; 17 | 18 | class VGUIAPI BitmapTGA : public Bitmap 19 | { 20 | public: 21 | BitmapTGA(InputStream* is,bool invertAlpha); 22 | private: 23 | virtual bool loadTGA(InputStream* is,bool invertAlpha); 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Border.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | //TODO: all borders should be titled 14 | 15 | namespace vgui 16 | { 17 | 18 | class Panel; 19 | 20 | class VGUIAPI Border : public Image 21 | { 22 | public: 23 | Border(); 24 | Border(int left,int top,int right,int bottom); 25 | public: 26 | virtual void setInset(int left,int top,int right,int bottom); 27 | virtual void getInset(int& left,int& top,int& right,int& bottom); 28 | protected: 29 | virtual void drawFilledRect(int x0,int y0,int x1,int y1); 30 | virtual void drawOutlinedRect(int x0,int y0,int x1,int y1); 31 | virtual void drawSetTextPos(int x,int y); 32 | virtual void drawPrintText(int x,int y,const char* str,int strlen); 33 | virtual void drawPrintChar(int x,int y,char ch); 34 | protected: 35 | int _inset[4]; 36 | private: 37 | Panel* _panel; 38 | friend class Panel; 39 | friend class BorderPair; 40 | }; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BorderLayout.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class LayoutInfo; 17 | 18 | class VGUIAPI BorderLayout : public Layout 19 | { 20 | public: 21 | enum Alignment 22 | { 23 | a_center=0, 24 | a_north, 25 | a_south, 26 | a_east, 27 | a_west, 28 | }; 29 | private: 30 | int _inset; 31 | public: 32 | BorderLayout(int inset); 33 | public: 34 | virtual void performLayout(Panel* panel); 35 | virtual LayoutInfo* createLayoutInfo(Alignment alignment); 36 | }; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_BorderPair.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_BORDERPAIR_H 9 | #define VGUI_BORDERPAIR_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI BorderPair : public Border 20 | { 21 | public: 22 | BorderPair(Border* border0,Border* border1); 23 | public: 24 | virtual void doPaint(Panel* panel); 25 | protected: 26 | virtual void paint(Panel* panel); 27 | protected: 28 | Border* _border[2]; 29 | }; 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Button.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | enum MouseCode; 18 | class ButtonController; 19 | class ButtonGroup; 20 | class ActionSignal; 21 | 22 | //TODO: Button should be derived from an AbstractButton 23 | class VGUIAPI Button : public Label 24 | { 25 | public: 26 | Button(const char* text,int x,int y,int wide,int tall); 27 | Button(const char* text,int x,int y); 28 | private: 29 | void init(); 30 | public: 31 | virtual void setSelected(bool state); 32 | virtual void setSelectedDirect(bool state); 33 | virtual void setArmed(bool state); 34 | virtual bool isSelected(); 35 | virtual void doClick(); 36 | virtual void addActionSignal(ActionSignal* s); 37 | virtual void setButtonGroup(ButtonGroup* buttonGroup); 38 | virtual bool isArmed(); 39 | virtual void setButtonBorderEnabled(bool state); 40 | virtual void setMouseClickEnabled(MouseCode code,bool state); 41 | virtual bool isMouseClickEnabled(MouseCode code); 42 | virtual void fireActionSignal(); 43 | virtual Panel* createPropertyPanel(); 44 | protected: 45 | virtual void setButtonController(ButtonController* _buttonController); 46 | virtual void paintBackground(); 47 | protected: 48 | char* _text; 49 | bool _armed; 50 | bool _selected; 51 | bool _buttonBorderEnabled; 52 | Dar _actionSignalDar; 53 | int _mouseClickMask; 54 | ButtonGroup* _buttonGroup; 55 | ButtonController* _buttonController; 56 | }; 57 | 58 | } 59 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ButtonController.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_BUTTONCONTROLLER_H 9 | #define VGUI_BUTTONCONTROLLER_H 10 | 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Button; 17 | 18 | class VGUIAPI ButtonController 19 | { 20 | public: 21 | virtual void addSignals(Button* button)=0; 22 | virtual void removeSignals(Button* button)=0; 23 | }; 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ButtonGroup.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_BUTTONGROUP_H 9 | #define VGUI_BUTTONGROUP_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Button; 18 | 19 | class VGUIAPI ButtonGroup 20 | { 21 | public: 22 | virtual void addButton(Button* button); 23 | virtual void setSelected(Button* button); 24 | protected: 25 | Dar _buttonDar; 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ChangeSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_CHANGESIGNAL_H 9 | #define VGUI_CHANGESIGNAL_H 10 | 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Panel; 17 | 18 | class VGUIAPI ChangeSignal 19 | { 20 | public: 21 | virtual void valueChanged(Panel* panel)=0; 22 | }; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_CheckButton.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_CHECKBUTTON_H 9 | #define VGUI_CHECKBUTTON_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI CheckButton : public ToggleButton 18 | { 19 | public: 20 | CheckButton(const char* text,int x,int y,int wide,int tall); 21 | CheckButton(const char* text,int x,int y); 22 | protected: 23 | virtual void paintBackground(); 24 | }; 25 | 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Color.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | //TODO: rename getColor(r,g,b,a) to getRGBA(r,g,b,a) 14 | //TODO: rename setColor(r,g,b,a) to setRGBA(r,g,b,a) 15 | //TODO: rename getColor(sc) to getSchemeColor(sc) 16 | //TODO: rename setColor(sc) to setSchemeColor(sc) 17 | 18 | namespace vgui 19 | { 20 | 21 | class VGUIAPI Color 22 | { 23 | private: 24 | uchar _color[4]; 25 | Scheme::SchemeColor _schemeColor; 26 | public: 27 | Color(); 28 | Color(int r,int g,int b,int a); 29 | Color(Scheme::SchemeColor sc); 30 | private: 31 | virtual void init(); 32 | public: 33 | virtual void setColor(int r,int g,int b,int a); 34 | virtual void setColor(Scheme::SchemeColor sc); 35 | virtual void getColor(int& r,int& g,int& b,int& a); 36 | virtual void getColor(Scheme::SchemeColor& sc); 37 | virtual int operator[](int index); 38 | }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ComboKey.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_COMBOKEY_H 9 | #define VGUI_COMBOKEY_H 10 | 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | enum KeyCode; 17 | 18 | class ComboKey 19 | { 20 | public: 21 | ComboKey(KeyCode code,KeyCode modifier); 22 | public: 23 | bool isTwoCombo(KeyCode code,KeyCode modifier); 24 | protected: 25 | bool check(KeyCode code); 26 | protected: 27 | KeyCode _keyCode[2]; 28 | friend class Panel; 29 | }; 30 | 31 | } 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ConfigWizard.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_CONFIGWIZARD_H 9 | #define VGUI_CONFIGWIZARD_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class TreeFolder; 18 | class Panel; 19 | class Button; 20 | 21 | class VGUIAPI ConfigWizard : public Panel 22 | { 23 | public: 24 | ConfigWizard(int x,int y,int wide,int tall); 25 | public: 26 | virtual void setSize(int wide,int tall); 27 | virtual Panel* getClient(); 28 | virtual TreeFolder* getFolder(); 29 | protected: 30 | TreeFolder* _treeFolder; 31 | Panel* _client; 32 | Button* _okButton; 33 | Button* _cancelButton; 34 | Button* _applyButton; 35 | Button* _helpButton; 36 | }; 37 | 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Cursor.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class Bitmap; 16 | 17 | class VGUIAPI Cursor 18 | { 19 | public: 20 | enum DefaultCursor 21 | { 22 | dc_user, 23 | dc_none, 24 | dc_arrow, 25 | dc_ibeam, 26 | dc_hourglass, 27 | dc_crosshair, 28 | dc_up, 29 | dc_sizenwse, 30 | dc_sizenesw, 31 | dc_sizewe, 32 | dc_sizens, 33 | dc_sizeall, 34 | dc_no, 35 | dc_hand, 36 | dc_last, 37 | }; 38 | private: 39 | int _hotspot[2]; 40 | Bitmap* _bitmap; 41 | DefaultCursor _dc; 42 | public: 43 | Cursor(DefaultCursor dc); 44 | Cursor(Bitmap* bitmap,int hotspotX,int hotspotY); 45 | public: 46 | virtual void getHotspot(int& x,int& y); 47 | private: 48 | virtual void privateInit(Bitmap* bitmap,int hotspotX,int hotspotY); 49 | public: 50 | virtual Bitmap* getBitmap(); 51 | virtual DefaultCursor getDefaultCursor(); 52 | }; 53 | 54 | } 55 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_DataInputStream.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_DATAINPUTSTREAM_H 9 | #define VGUI_DATAINPUTSTREAM_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI DataInputStream : virtual public InputStream 18 | { 19 | private: 20 | InputStream* _is; 21 | public: 22 | DataInputStream(InputStream* is); 23 | public: 24 | virtual void seekStart(bool& success); 25 | virtual void seekRelative(int count,bool& success); 26 | virtual void seekEnd(bool& success); 27 | virtual int getAvailable(bool& success); 28 | //virtual uchar readUChar(bool& success); 29 | virtual void readUChar(uchar* buf,int count,bool& success); 30 | virtual void close(bool& success); 31 | virtual void close(); 32 | public: 33 | virtual bool readBool(bool& success); 34 | virtual char readChar(bool& success); 35 | virtual uchar readUChar(bool& success); 36 | virtual short readShort(bool& success); 37 | virtual ushort readUShort(bool& success); 38 | virtual int readInt(bool& success); 39 | virtual uint readUInt(bool& success); 40 | virtual long readLong(bool& success); 41 | virtual ulong readULong(bool& success); 42 | virtual float readFloat(bool& success); 43 | virtual double readDouble(bool& success); 44 | virtual void readLine(char* buf,int bufLen,bool& success); 45 | }; 46 | 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Desktop.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_DESKTOP_H 9 | #define VGUI_DESKTOP_H 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace vgui 16 | { 17 | 18 | class DesktopIcon; 19 | class TaskBar; 20 | 21 | class VGUIAPI Desktop : public Panel 22 | { 23 | public: 24 | Desktop(int x,int y,int wide,int tall); 25 | public: 26 | virtual void setSize(int wide,int tall); 27 | virtual void iconActivated(DesktopIcon* icon); 28 | virtual void addIcon(DesktopIcon* icon); 29 | virtual void arrangeIcons(); 30 | virtual Panel* getBackground(); 31 | virtual Panel* getForeground(); 32 | protected: 33 | Panel* _background; 34 | Panel* _foreground; 35 | TaskBar* _taskBar; 36 | Dar _desktopIconDar; 37 | int _cascade[2]; 38 | }; 39 | 40 | } 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_DesktopIcon.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class MiniApp; 17 | class Image; 18 | class Desktop; 19 | 20 | class VGUIAPI DesktopIcon : public Panel 21 | { 22 | public: 23 | DesktopIcon(MiniApp* miniApp,Image* image); 24 | public: 25 | virtual void doActivate(); 26 | virtual void setImage(Image* image); 27 | public: //bullshit public 28 | virtual void setDesktop(Desktop* desktop); 29 | virtual MiniApp* getMiniApp(); 30 | protected: 31 | virtual void paintBackground(); 32 | protected: 33 | Desktop* _desktop; 34 | MiniApp* _miniApp; 35 | Image* _image; 36 | }; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_EtchedBorder.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_ETCHEDBORDER_H 9 | #define VGUI_ETCHEDBORDER_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI EtchedBorder : public Border 20 | { 21 | public: 22 | EtchedBorder(); 23 | protected: 24 | virtual void paint(Panel* panel); 25 | }; 26 | 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FileInputStream.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | //TODO : figure out how to get stdio out of here, I think std namespace is broken for FILE for forward declaring does not work in vc6 11 | 12 | #include 13 | #include 14 | 15 | namespace vgui 16 | { 17 | 18 | class VGUIAPI FileInputStream : public InputStream 19 | { 20 | private: 21 | FILE* _fp; 22 | public: 23 | FileInputStream(const char* fileName,bool textMode); 24 | public: 25 | virtual void seekStart(bool& success); 26 | virtual void seekRelative(int count,bool& success); 27 | virtual void seekEnd(bool& success); 28 | virtual int getAvailable(bool& success); 29 | virtual uchar readUChar(bool& success); 30 | virtual void readUChar(uchar* buf,int count,bool& success); 31 | virtual void close(bool& success); 32 | virtual void close(); 33 | }; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FlowLayout.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_FLOWLAYOUT_H 9 | #define VGUI_FLOWLAYOUT_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI FlowLayout : public Layout 18 | { 19 | private: 20 | int _hgap; 21 | public: 22 | FlowLayout(int hgap); 23 | public: 24 | virtual void performLayout(Panel* panel); 25 | }; 26 | 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FocusChangeSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_FOCUSCHANGESIGNAL_H 9 | #define VGUI_FOCUSCHANGESIGNAL_H 10 | 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Panel; 17 | 18 | class VGUIAPI FocusChangeSignal 19 | { 20 | public: 21 | virtual void focusChanged(bool lost,Panel* panel)=0; 22 | }; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FocusNavGroup.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_FOCUSNAVGROUP_H 9 | #define VGUI_FOCUSNAVGROUP_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI FocusNavGroup 20 | { 21 | public: 22 | FocusNavGroup(); 23 | protected: 24 | virtual void addPanel(Panel* panel); 25 | virtual void requestFocusPrev(); 26 | virtual void requestFocusNext(); 27 | virtual void setCurrentPanel(Panel* panel); 28 | protected: 29 | Dar _panelDar; 30 | int _currentIndex; 31 | friend class Panel; 32 | }; 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Font.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class BaseFontPlat; 16 | 17 | //TODO: cursors and fonts should work like gl binds 18 | class VGUIAPI Font 19 | { 20 | public: 21 | Font(const char* name,int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol); 22 | // If pFileData is non-NULL, then it will try to load the 32-bit (RLE) TGA file. If that fails, 23 | // it will create the font using the specified parameters. 24 | // pUniqueName should be set if pFileData and fileDataLen are set so it can determine if a font is already loaded. 25 | Font(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol); 26 | private: 27 | virtual void init(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol); 28 | public: 29 | BaseFontPlat* getPlat(); 30 | virtual void getCharRGBA(int ch,int rgbaX,int rgbaY,int rgbaWide,int rgbaTall,uchar* rgba); 31 | virtual void getCharABCwide(int ch,int& a,int& b,int& c); 32 | virtual void getTextSize(const char* text,int& wide,int& tall); 33 | virtual int getTall(); 34 | #ifndef WIN32 35 | virtual int getWide(); 36 | #endif 37 | virtual int getId(); 38 | protected: 39 | char* _name; 40 | BaseFontPlat* _plat; 41 | int _id; 42 | friend class Surface; 43 | }; 44 | 45 | 46 | void Font_Reset(); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_FrameSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_FRAMESIGNAL_H 9 | #define VGUI_FRAMESIGNAL_H 10 | 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Frame; 17 | 18 | class VGUIAPI FrameSignal 19 | { 20 | public: 21 | virtual void closing(Frame* frame)=0; 22 | virtual void minimizing(Frame* frame,bool toTray)=0; 23 | }; 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_GridLayout.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_GRIDLAYOUT_H 9 | #define VGUI_GRIDLAYOUT_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | /* 18 | class VGUIAPI GridLayout : public Layout 19 | { 20 | public: 21 | GridLayout(int rows,int cols,int hgap,int vgap); 22 | protected: 23 | int _rows; 24 | int _cols; 25 | }; 26 | */ 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_HeaderPanel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace vgui 16 | { 17 | 18 | enum MouseCode; 19 | class ChangeSignal; 20 | 21 | class VGUIAPI HeaderPanel : public Panel 22 | { 23 | 24 | private: 25 | 26 | Dar _sliderPanelDar; 27 | Dar _sectionPanelDar; 28 | Dar _changeSignalDar; 29 | Panel* _sectionLayer; 30 | int _sliderWide; 31 | bool _dragging; 32 | int _dragSliderIndex; 33 | int _dragSliderStartPos; 34 | int _dragSliderStartX; 35 | 36 | public: 37 | 38 | HeaderPanel(int x,int y,int wide,int tall); 39 | 40 | protected: 41 | 42 | virtual void performLayout(); 43 | 44 | public: 45 | 46 | virtual void addSectionPanel(Panel* panel); 47 | virtual void setSliderPos(int sliderIndex,int pos); 48 | virtual int getSectionCount(); 49 | virtual void getSectionExtents(int sectionIndex,int& x0,int& x1); 50 | virtual void addChangeSignal(ChangeSignal* s); 51 | 52 | public: //bullshit public 53 | 54 | virtual void fireChangeSignal(); 55 | virtual void privateCursorMoved(int x,int y,Panel* panel); 56 | virtual void privateMousePressed(MouseCode code,Panel* panel); 57 | virtual void privateMouseReleased(MouseCode code,Panel* panel); 58 | 59 | }; 60 | 61 | } 62 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ImagePanel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Image; 17 | 18 | class VGUIAPI ImagePanel : public Panel 19 | { 20 | public: 21 | inline ImagePanel() 22 | { 23 | _image=null; 24 | } 25 | 26 | ImagePanel(Image* image); 27 | public: 28 | virtual void setImage(Image* image); 29 | protected: 30 | virtual void paintBackground(); 31 | protected: 32 | Image* _image; 33 | }; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_InputSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | enum MouseCode; 16 | enum KeyCode; 17 | class Panel; 18 | 19 | //these are lumped into one for simplicity sake right now 20 | class VGUIAPI InputSignal 21 | { 22 | public: 23 | virtual void cursorMoved(int x,int y,Panel* panel)=0; 24 | virtual void cursorEntered(Panel* panel)=0; 25 | virtual void cursorExited(Panel* panel)=0; 26 | virtual void mousePressed(MouseCode code,Panel* panel)=0; 27 | virtual void mouseDoublePressed(MouseCode code,Panel* panel)=0; 28 | virtual void mouseReleased(MouseCode code,Panel* panel)=0; 29 | virtual void mouseWheeled(int delta,Panel* panel)=0; 30 | virtual void keyPressed(KeyCode code,Panel* panel)=0; 31 | virtual void keyTyped(KeyCode code,Panel* panel)=0; 32 | virtual void keyReleased(KeyCode code,Panel* panel)=0; 33 | virtual void keyFocusTicked(Panel* panel)=0; 34 | }; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_InputStream.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class VGUIAPI InputStream 16 | { 17 | public: 18 | virtual void seekStart(bool& success)=0; 19 | virtual void seekRelative(int count,bool& success)=0; 20 | virtual void seekEnd(bool& success)=0; 21 | virtual int getAvailable(bool& success)=0; 22 | virtual uchar readUChar(bool& success)=0; 23 | virtual void readUChar(uchar* buf,int count,bool& success)=0; 24 | virtual void close(bool& success)=0; 25 | }; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_IntChangeSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class Panel; 16 | 17 | class VGUIAPI IntChangeSignal 18 | { 19 | public: 20 | virtual void intChanged(int value,Panel* panel)=0; 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_IntLabel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_INTLABEL_H 9 | #define VGUI_INTLABEL_H 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace vgui 16 | { 17 | 18 | class Panel; 19 | 20 | class VGUIAPI IntLabel : public Label , public IntChangeSignal 21 | { 22 | public: 23 | IntLabel(int value,int x,int y,int wide,int tall); 24 | public: 25 | virtual void setValue(int value); 26 | virtual void intChanged(int value,Panel* panel); 27 | protected: 28 | virtual void paintBackground(); 29 | protected: 30 | int _value; 31 | }; 32 | 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Layout.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class Panel; 16 | 17 | class VGUIAPI Layout 18 | { 19 | //private: 20 | // Panel* _panel; 21 | public: 22 | Layout(); 23 | public: 24 | //virtual void setPanel(Panel* panel); //called by Panel::setLayout 25 | virtual void performLayout(Panel* panel); 26 | }; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_LayoutInfo.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_LAYOUTINFO_H 9 | #define VGUI_LAYOUTINFO_H 10 | 11 | namespace vgui 12 | { 13 | 14 | class VGUIAPI LayoutInfo 15 | { 16 | virtual LayoutInfo* getThis()=0; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_LineBorder.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI LineBorder : public Border 20 | { 21 | private: 22 | Color _color; 23 | public: 24 | LineBorder(); 25 | LineBorder(int thickness); 26 | LineBorder(Color color); 27 | LineBorder(int thickness,Color color); 28 | 29 | inline void setLineColor(int r, int g, int b, int a) {_color = Color(r,g,b,a);} 30 | private: 31 | virtual void init(int thickness,Color color); 32 | protected: 33 | virtual void paint(Panel* panel); 34 | }; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ListPanel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_LISTPANEL_H 9 | #define VGUI_LISTPANEL_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class ScrollBar; 18 | 19 | //TODO: make a ScrollPanel and use a constrained one for _vpanel in ListPanel 20 | class VGUIAPI ListPanel : public Panel 21 | { 22 | public: 23 | ListPanel(int x,int y,int wide,int tall); 24 | public: 25 | virtual void setSize(int wide,int tall); 26 | virtual void addString(const char* str); 27 | virtual void addItem(Panel* panel); 28 | virtual void setPixelScroll(int value); 29 | virtual void translatePixelScroll(int delta); 30 | protected: 31 | virtual void performLayout(); 32 | virtual void paintBackground(); 33 | protected: 34 | Panel* _vpanel; 35 | ScrollBar* _scroll; 36 | }; 37 | 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_LoweredBorder.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class Panel; 17 | 18 | class VGUIAPI LoweredBorder : public Border 19 | { 20 | public: 21 | LoweredBorder(); 22 | protected: 23 | virtual void paint(Panel* panel); 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Menu.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_MENU_H 9 | #define VGUI_MENU_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI Menu : public Panel 20 | { 21 | public: 22 | Menu(int x,int y,int wide,int tall); 23 | Menu(int wide,int tall); 24 | public: 25 | virtual void addMenuItem(Panel* panel); 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MenuItem.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_MENUITEM_H 9 | #define VGUI_MENUITEM_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Menu; 18 | 19 | class VGUIAPI MenuItem : public Button 20 | { 21 | public: 22 | MenuItem(const char* text); 23 | MenuItem(const char* text,Menu* subMenu); 24 | protected: 25 | Menu* _subMenu; 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MenuSeparator.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class VGUIAPI MenuSeparator : public Label 17 | { 18 | public: 19 | MenuSeparator(const char* text); 20 | protected: 21 | virtual void paintBackground(); 22 | }; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MessageBox.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_MESSAGEBOX_H 9 | #define VGUI_MESSAGEBOX_H 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | namespace vgui 17 | { 18 | 19 | class Label; 20 | class Button; 21 | class ActionSignal; 22 | 23 | class VGUIAPI MessageBox : public Frame 24 | { 25 | 26 | private: 27 | 28 | Label* _messageLabel; 29 | Button* _okButton; 30 | Dar _actionSignalDar; 31 | 32 | public: 33 | 34 | MessageBox(const char* title,const char* text,int x,int y); 35 | 36 | protected: 37 | 38 | virtual void performLayout(); 39 | 40 | public: 41 | 42 | virtual void addActionSignal(ActionSignal* s); 43 | virtual void fireActionSignal(); 44 | 45 | }; 46 | 47 | } 48 | 49 | 50 | 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MiniApp.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class Frame; 16 | 17 | class VGUIAPI MiniApp 18 | { 19 | public: 20 | MiniApp(); 21 | public: 22 | virtual void getName(char* buf,int bufLen); 23 | virtual Frame* createInstance()=0; 24 | protected: 25 | virtual void setName(const char* name); 26 | protected: 27 | char* _name; 28 | }; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_MouseCode.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | enum VGUIAPI MouseCode 15 | { 16 | MOUSE_LEFT=0, 17 | MOUSE_RIGHT, 18 | MOUSE_MIDDLE, 19 | MOUSE_LAST, 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_PopupMenu.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_POPUPMENU_H 9 | #define VGUI_POPUPMENU_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI PopupMenu : public Menu 20 | { 21 | public: 22 | PopupMenu(int x,int y,int wide,int tall); 23 | PopupMenu(int wide,int tall); 24 | public: 25 | virtual void showModal(Panel* panel); 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ProgressBar.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_PROGRESSBAR_H 9 | #define VGUI_PROGRESSBAR_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI ProgressBar : public Panel 18 | { 19 | private: 20 | int _segmentCount; 21 | float _progress; 22 | public: 23 | ProgressBar(int segmentCount); 24 | protected: 25 | virtual void paintBackground(); 26 | public: 27 | virtual void setProgress(float progress); 28 | virtual int getSegmentCount(); 29 | }; 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_RadioButton.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_RADIOBUTTON_H 9 | #define VGUI_RADIOBUTTON_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI RadioButton : public ToggleButton 18 | { 19 | public: 20 | RadioButton(const char* text,int x,int y,int wide,int tall); 21 | RadioButton(const char* text,int x,int y); 22 | protected: 23 | virtual void paintBackground(); 24 | }; 25 | 26 | } 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_RaisedBorder.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_RAISEDBORDER_H 9 | #define VGUI_RAISEDBORDER_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class Panel; 18 | 19 | class VGUIAPI RaisedBorder : public Border 20 | { 21 | public: 22 | RaisedBorder(); 23 | protected: 24 | virtual void paint(Panel* panel); 25 | }; 26 | 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_RepaintSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | namespace vgui 11 | { 12 | class Panel; 13 | 14 | class RepaintSignal 15 | { 16 | public: 17 | virtual void panelRepainted(Panel* panel)=0; 18 | }; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_Scheme.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class Font; 16 | class Cursor; 17 | 18 | class VGUIAPI Scheme 19 | { 20 | public: 21 | enum SchemeColor 22 | { 23 | sc_user=0, 24 | sc_black, 25 | sc_white, 26 | sc_primary1, 27 | sc_primary2, 28 | sc_primary3, 29 | sc_secondary1, 30 | sc_secondary2, 31 | sc_secondary3, 32 | sc_last, 33 | }; 34 | enum SchemeFont 35 | { 36 | sf_user=0, 37 | sf_primary1, 38 | sf_primary2, 39 | sf_primary3, 40 | sf_secondary1, 41 | sf_last, 42 | }; 43 | enum SchemeCursor 44 | { 45 | scu_user=0, 46 | scu_none, 47 | scu_arrow, 48 | scu_ibeam, 49 | scu_hourglass, 50 | scu_crosshair, 51 | scu_up, 52 | scu_sizenwse, 53 | scu_sizenesw, 54 | scu_sizewe, 55 | scu_sizens, 56 | scu_sizeall, 57 | scu_no, 58 | scu_hand, 59 | scu_last, 60 | }; 61 | public: 62 | Scheme(); 63 | public: 64 | virtual void setColor(SchemeColor sc,int r,int g,int b,int a); 65 | virtual void getColor(SchemeColor sc,int& r,int& g,int& b,int& a); 66 | virtual void setFont(SchemeFont sf,Font* font); 67 | virtual Font* getFont(SchemeFont sf); 68 | virtual void setCursor(SchemeCursor sc,Cursor* cursor); 69 | virtual Cursor* getCursor(SchemeCursor sc); 70 | protected: 71 | int _color[sc_last][4]; 72 | Font* _font[sf_last]; 73 | Cursor* _cursor[scu_last]; 74 | friend class Panel; 75 | friend class Canvas; 76 | }; 77 | 78 | } 79 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ScrollBar.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class IntChangeSignal; 18 | class Button; 19 | class Slider; 20 | 21 | class VGUIAPI ScrollBar : public Panel 22 | { 23 | public: 24 | ScrollBar(int x,int y,int wide,int tall,bool vertical); 25 | public: 26 | virtual void setValue(int value); 27 | virtual int getValue(); 28 | virtual void addIntChangeSignal(IntChangeSignal* s); 29 | virtual void setRange(int min,int max); 30 | virtual void setRangeWindow(int rangeWindow); 31 | virtual void setRangeWindowEnabled(bool state); 32 | virtual void setSize(int wide,int tall); 33 | virtual bool isVertical(); 34 | virtual bool hasFullRange(); 35 | virtual void setButton(Button* button,int index); 36 | virtual Button* getButton(int index); 37 | virtual void setSlider(Slider* slider); 38 | virtual Slider* getSlider(); 39 | virtual void doButtonPressed(int buttonIndex); 40 | virtual void setButtonPressedScrollValue(int value); 41 | virtual void validate(); 42 | public: //bullshit public 43 | virtual void fireIntChangeSignal(); 44 | protected: 45 | virtual void performLayout(); 46 | protected: 47 | Button* _button[2]; 48 | Slider* _slider; 49 | Dar _intChangeSignalDar; 50 | int _buttonPressedScrollValue; 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ScrollPanel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | //NOTE: You need to call validate anytime you change a scrollbar 14 | 15 | namespace vgui 16 | { 17 | 18 | class ScrollBar; 19 | 20 | class VGUIAPI ScrollPanel : public Panel 21 | { 22 | private: 23 | Panel* _clientClip; 24 | Panel* _client; 25 | ScrollBar* _horizontalScrollBar; 26 | ScrollBar* _verticalScrollBar; 27 | bool _autoVisible[2]; 28 | public: 29 | ScrollPanel(int x,int y,int wide,int tall); 30 | protected: 31 | virtual void setSize(int wide,int tall); 32 | public: 33 | virtual void setScrollBarVisible(bool horizontal,bool vertical); 34 | virtual void setScrollBarAutoVisible(bool horizontal,bool vertical); 35 | virtual Panel* getClient(); 36 | virtual Panel* getClientClip(); 37 | virtual void setScrollValue(int horizontal,int vertical); 38 | virtual void getScrollValue(int& horizontal,int& vertical); 39 | virtual void recomputeClientSize(); 40 | virtual ScrollBar* getHorizontalScrollBar(); 41 | virtual ScrollBar* getVerticalScrollBar(); 42 | virtual void validate(); 43 | public: //bullshit public 44 | virtual void recomputeScroll(); 45 | }; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_StackLayout.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace vgui 14 | { 15 | 16 | class VGUIAPI StackLayout : public Layout 17 | { 18 | private: 19 | int _vgap; 20 | bool _fitWide; 21 | public: 22 | StackLayout(int vgap,bool fitWide); 23 | public: 24 | virtual void performLayout(Panel* panel); 25 | }; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_String.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace vgui 13 | { 14 | 15 | class VGUIAPI String 16 | { 17 | 18 | friend class String; 19 | 20 | private: 21 | 22 | char* _text; 23 | 24 | public: 25 | 26 | String(); 27 | String(const char* text); 28 | String(const String& src); 29 | 30 | public: 31 | 32 | ~String(); 33 | 34 | private: 35 | 36 | int getCount(const char* text); 37 | 38 | public: 39 | 40 | int getCount(); 41 | String operator+(String text); 42 | String operator+(const char* text); 43 | bool operator==(String text); 44 | bool operator==(const char* text); 45 | char operator[](int index); 46 | const char* getChars(); 47 | 48 | public: 49 | 50 | static void test(); 51 | 52 | }; 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TabPanel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_TABPANEL_H 9 | #define VGUI_TABPANEL_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class ButtonGroup; 18 | 19 | class VGUIAPI TabPanel : public Panel 20 | { 21 | public: 22 | enum TabPlacement 23 | { 24 | tp_top=0, 25 | tp_bottom, 26 | tp_left, 27 | tp_right, 28 | }; 29 | public: 30 | TabPanel(int x,int y,int wide,int tall); 31 | public: 32 | virtual Panel* addTab(const char* text); 33 | virtual void setSelectedTab(Panel* tab); 34 | virtual void setSize(int wide,int tall); 35 | protected: 36 | virtual void recomputeLayoutTop(); 37 | virtual void recomputeLayout(); 38 | protected: 39 | TabPlacement _tabPlacement; 40 | Panel* _tabArea; 41 | Panel* _clientArea; 42 | Panel* _selectedTab; 43 | Panel* _selectedPanel; 44 | ButtonGroup* _buttonGroup; 45 | }; 46 | 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TaskBar.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_TASKBAR_H 9 | #define VGUI_TASKBAR_H 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace vgui 16 | { 17 | 18 | class Frame; 19 | class Button; 20 | 21 | class VGUIAPI TaskBar : public Panel 22 | { 23 | public: 24 | TaskBar(int x,int y,int wide,int tall); 25 | public: 26 | virtual void addFrame(Frame* frame); 27 | protected: 28 | virtual void performLayout(); 29 | protected: 30 | Dar _frameDar; 31 | Dar _taskButtonDar; 32 | Panel* _tray; 33 | }; 34 | 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextGrid.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI TextGrid : public Panel 18 | { 19 | public: 20 | TextGrid(int gridWide,int gridTall,int x,int y,int wide,int tall); 21 | public: 22 | virtual void setGridSize(int wide,int tall); 23 | virtual void newLine(); 24 | virtual void setXY(int x,int y); 25 | //virtual void setBgColor(int r,int g,int b); 26 | //virtual void setFgColor(int r,int g,int b); 27 | virtual int vprintf(const char* format,va_list argList); 28 | virtual int printf(const char* format,...); 29 | protected: 30 | virtual void paintBackground(); 31 | protected: 32 | int _xy[2]; 33 | int _bgColor[3]; 34 | int _fgColor[3]; 35 | char* _grid; //[_gridSize[0]*_gridSize[1]*7] ch,br,bg,bb,fr,fg,fb 36 | int _gridSize[2]; 37 | }; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextImage.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | //TODO: need to add wrapping flag instead of being arbitrary about when wrapping and auto-resizing actually happens 15 | // This is probably why you are having problems if you had text in a constructor and then changed the font 16 | 17 | namespace vgui 18 | { 19 | 20 | class Panel; 21 | class Font; 22 | class App; 23 | 24 | class VGUIAPI TextImage : public Image 25 | { 26 | private: 27 | char* _text; 28 | int _textBufferLen; 29 | vgui::Scheme::SchemeFont _schemeFont; 30 | vgui::Font* _font; 31 | int _textColor[4]; 32 | vgui::Scheme::SchemeColor _textSchemeColor; 33 | public: 34 | TextImage(int textBufferLen,const char* text); 35 | TextImage(const char* text); 36 | private: 37 | virtual void init(int textBufferLen,const char* text); 38 | public: 39 | virtual void getTextSize(int& wide,int& tall); 40 | virtual void getTextSizeWrapped(int& wide,int& tall); 41 | virtual Font* getFont(); 42 | virtual void setText(int textBufferLen,const char* text); 43 | virtual void setText(const char* text); 44 | virtual void setFont(vgui::Scheme::SchemeFont schemeFont); 45 | virtual void setFont(vgui::Font* font); 46 | virtual void setSize(int wide,int tall); 47 | protected: 48 | virtual void paint(Panel* panel); 49 | }; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TextPanel.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | //NOTE : If you are having trouble with this class, your problem is probably in TextImage 15 | 16 | namespace vgui 17 | { 18 | 19 | class TextImage; 20 | class Font; 21 | 22 | class VGUIAPI TextPanel : public Panel 23 | { 24 | private: 25 | TextImage* _textImage; 26 | public: 27 | TextPanel(const char* text,int x,int y,int wide,int tall); 28 | public: 29 | virtual void setText(const char* text); 30 | virtual void setFont(vgui::Scheme::SchemeFont schemeFont); 31 | virtual void setFont(vgui::Font* font); 32 | virtual void setSize(int wide,int tall); 33 | virtual void setFgColor(int r,int g,int b,int a); 34 | virtual void setFgColor(Scheme::SchemeColor sc); 35 | virtual TextImage* getTextImage(); 36 | protected: 37 | virtual void paint(); 38 | }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TickSignal.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_TICKSIGNAL_H 9 | #define VGUI_TICKSIGNAL_H 10 | 11 | #include 12 | 13 | namespace vgui 14 | { 15 | class VGUIAPI TickSignal 16 | { 17 | public: 18 | virtual void ticked()=0; 19 | }; 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_ToggleButton.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_TOGGLEBUTTON_H 9 | #define VGUI_TOGGLEBUTTON_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI ToggleButton : public Button 18 | { 19 | public: 20 | ToggleButton(const char* text,int x,int y,int wide,int tall); 21 | ToggleButton(const char* text,int x,int y); 22 | }; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /utils/vgui/include/VGUI_TreeFolder.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef VGUI_TREEFOLDER_H 9 | #define VGUI_TREEFOLDER_H 10 | 11 | #include 12 | #include 13 | 14 | namespace vgui 15 | { 16 | 17 | class VGUIAPI TreeFolder : public Panel 18 | { 19 | public: 20 | TreeFolder(const char* name); 21 | TreeFolder(const char* name,int x,int y); 22 | protected: 23 | virtual void init(const char* name); 24 | public: 25 | virtual void setOpenedTraverse(bool state); 26 | virtual void setOpened(bool state); 27 | virtual bool isOpened(); 28 | protected: 29 | virtual void paintBackground(); 30 | protected: 31 | bool _opened; 32 | }; 33 | 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /utils/vgui/lib/win32_vc16/vgui.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LogicAndTrick/halflife-updated/70ee35bbaa339e3ef5753791c5e5daf7b9ce57f9/utils/vgui/lib/win32_vc16/vgui.lib --------------------------------------------------------------------------------