Browse Source

Merge branch 'master' into poke646

poke646
Andrey Akhmichin 3 years ago
parent
commit
a7ec04d4bb
  1. 76
      .github/workflows/.github.yml
  2. 2
      .gitignore
  3. 4
      CMakeLists.txt
  4. 15
      appveyor.yml
  5. 2
      cl_dll/CMakeLists.txt
  6. 2
      cl_dll/MOTD.cpp
  7. 2
      cl_dll/ammo.h
  8. 2
      cl_dll/ammohistory.h
  9. 2
      cl_dll/camera.h
  10. 10
      cl_dll/cdll_int.cpp
  11. 8
      cl_dll/cl_dll.h
  12. 7
      cl_dll/cl_util.h
  13. 18
      cl_dll/entity.cpp
  14. 2
      cl_dll/health.h
  15. 2
      cl_dll/hud.h
  16. 2
      cl_dll/hud_spectator.h
  17. 2
      cl_dll/in_camera.cpp
  18. 52
      cl_dll/input_goldsource.cpp
  19. 4
      cl_dll/input_mouse.cpp
  20. 6
      cl_dll/input_mouse.h
  21. 3
      cl_dll/overview.h
  22. 2
      cl_dll/parsemsg.h
  23. 9
      cl_dll/studio_util.h
  24. 5
      cl_dll/tf_defs.h
  25. 8
      cl_dll/tri.cpp
  26. 6
      cl_dll/util.cpp
  27. 2
      cl_dll/util_vector.h
  28. 12
      cl_dll/view.cpp
  29. 2
      common/beamdef.h
  30. 2
      common/cl_entity.h
  31. 3
      common/com_model.h
  32. 2
      common/con_nprint.h
  33. 4
      common/const.h
  34. 2
      common/cvardef.h
  35. 2
      common/demo_api.h
  36. 2
      common/dlight.h
  37. 2
      common/entity_state.h
  38. 2
      common/entity_types.h
  39. 2
      common/event_api.h
  40. 2
      common/event_args.h
  41. 2
      common/event_flags.h
  42. 2
      common/hltv.h
  43. 2
      common/ivoicetweak.h
  44. 14
      common/mathlib.h
  45. 2
      common/net_api.h
  46. 2
      common/netadr.h
  47. 2
      common/particledef.h
  48. 2
      common/pmtrace.h
  49. 2
      common/qfont.h
  50. 2
      common/r_efx.h
  51. 2
      common/r_studioint.h
  52. 2
      common/ref_params.h
  53. 2
      common/screenfade.h
  54. 2
      common/studio_event.h
  55. 2
      common/triangleapi.h
  56. 2
      common/usercmd.h
  57. 2
      common/wadfile.h
  58. 2
      common/weaponinfo.h
  59. 8
      dlls/CMakeLists.txt
  60. 2
      dlls/activity.h
  61. 2
      dlls/activitymap.h
  62. 8
      dlls/animation.cpp
  63. 4
      dlls/animation.h
  64. 2
      dlls/basemonster.h
  65. 4
      dlls/cbase.h
  66. 2
      dlls/cdll_dll.h
  67. 5
      dlls/client.cpp
  68. 2
      dlls/client.h
  69. 2
      dlls/combat.cpp
  70. 2
      dlls/compile.bat
  71. 2
      dlls/decals.h
  72. 2
      dlls/defaultai.h
  73. 2
      dlls/doors.h
  74. 2
      dlls/effects.h
  75. 5
      dlls/enginecallback.h
  76. 2
      dlls/explode.h
  77. 4
      dlls/exportdef.h
  78. 18
      dlls/extdll.h
  79. 2
      dlls/flyingmonster.h
  80. 2
      dlls/func_break.h
  81. 2
      dlls/game.h
  82. 2
      dlls/gamerules.h
  83. 4
      dlls/h_cycler.cpp
  84. 4
      dlls/h_export.cpp
  85. 5
      dlls/hl.def
  86. 2
      dlls/hornet.h
  87. 2
      dlls/items.h
  88. 4
      dlls/maprules.h
  89. 4
      dlls/monsterevent.h
  90. 2
      dlls/monsters.h
  91. 2
      dlls/nodes.cpp
  92. 6
      dlls/nodes.h
  93. 2
      dlls/nodes_compat.h
  94. 2
      dlls/plane.h
  95. 2
      dlls/player.h
  96. 2
      dlls/saverestore.h
  97. 2
      dlls/schedule.h
  98. 4
      dlls/scripted.cpp
  99. 4
      dlls/scripted.h
  100. 2
      dlls/scriptevent.h
  101. Some files were not shown because too many files have changed in this diff Show More

76
.github/workflows/.github.yml

@ -14,6 +14,9 @@ jobs: @@ -14,6 +14,9 @@ jobs:
- os: ubuntu-latest
cc: clang
cxx: clang++
- os: windows-2016
cc: cl
cxx: cl
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
@ -21,25 +24,74 @@ jobs: @@ -21,25 +24,74 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Get SDL2 headers
- name: Checkout steam-runtime
if: startsWith(matrix.os, 'ubuntu')
uses: actions/checkout@v2
with:
repository: libsdl-org/SDL
ref: release-2.0.9
path: SDL2
- name: Link SDL2 headers into system path
run: |
sudo ln -s "$GITHUB_WORKSPACE/SDL2/include" /usr/local/include/SDL2
- name: Install dependencies
repository: ValveSoftware/steam-runtime
path: steam-runtime
- name: Cache steam-runtime
if: startsWith(matrix.os, 'ubuntu')
id: cache-steam-runtime
uses: actions/cache@v2
with:
path: com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
key: ${{ runner.os }}-steam-runtime
- name: Download steam-runtime
if: startsWith(matrix.os, 'ubuntu') && steps.cache-steam-runtime.outputs.cache-hit != 'true'
run: wget --no-verbose https://repo.steampowered.com/steamrt-images-scout/snapshots/0.20210610.0/com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
- name: Install steam runtime
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y install gcc-multilib g++-multilib
./steam-runtime/setup_chroot.sh --i386 --tarball ./com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
sudo sed -i 's/groups=sudo/groups=adm/g' /etc/schroot/chroot.d/steamrt_scout_i386.conf
- name: Build with xash3d-fwgs input
if: startsWith(matrix.os, 'ubuntu')
run: |
cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" && cmake --build build --target all
schroot --chroot steamrt_scout_i386 -- cmake -B build-fwgs -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined"
schroot --chroot steamrt_scout_i386 -- cmake --build build-fwgs --target all
- name: Build with goldsource input
if: startsWith(matrix.os, 'ubuntu')
run: |
cmake -B build-gs -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DGOLDSOURCE_SUPPORT=ON && cmake --build build-gs --target all
schroot --chroot steamrt_scout_i386 -- cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="$PWD/dist"
schroot --chroot steamrt_scout_i386 -- cmake --build build --target all
schroot --chroot steamrt_scout_i386 -- cmake --build build --target install
- name: Build with mingw
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc')
run: |
sudo apt-get install -y mingw-w64-i686-dev binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
cmake -B build-mingw -S . -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
cmake --build build-mingw --target all
- name: Add msbuild to PATH
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1.0.2
- name: Build with msvc
if: startsWith(matrix.os, 'windows')
run: |
cmake -G "Visual Studio 15 2017" -B build -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="dist"
msbuild build/INSTALL.vcxproj
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/} | tr '/' '_')"
id: extract_branch
- name: Extract gamedir
shell: bash
run: echo "##[set-output name=gamedir;]$(grep build/CMakeCache.txt -Ee 'GAMEDIR:STRING=[a-z]+' | cut -d '=' -f 2)"
id: extract_gamedir
- name: Upload linux artifact
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc'
uses: actions/upload-artifact@v2
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-linux
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
- name: Upload windows artifact
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v2
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-windows
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}

2
.gitignore vendored

@ -24,3 +24,5 @@ waf3-* @@ -24,3 +24,5 @@ waf3-*
.lock*
*.pyc
.vscode/
.vs/
CMakeSettings.json

4
CMakeLists.txt

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
# SOFTWARE.
#
cmake_minimum_required(VERSION 2.6.0)
cmake_minimum_required(VERSION 2.8.12)
# Install custom module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
@ -93,6 +93,8 @@ endif() @@ -93,6 +93,8 @@ endif()
if(NOT MSVC)
#add_compile_options(-Wempty-body) # GCC/Clang flag
add_compile_options(-Wreturn-type) # GCC/Clang flag
else()
add_definitions(-D_CRT_SILENCE_NONCONFORMING_TGMATH_H)
endif()

15
appveyor.yml

@ -1,13 +1,7 @@ @@ -1,13 +1,7 @@
version: 1.0.{build}
branches:
only:
- master
environment:
matrix:
- os: Visual Studio 2013
GENERATOR_NAME: "Visual Studio 12 2013"
- os: Visual Studio 2015
GENERATOR_NAME: "Visual Studio 14 2015"
# TODO: Uncomment when AppVeyor will provide XP toolchain for VS2017
@ -17,7 +11,7 @@ environment: @@ -17,7 +11,7 @@ environment:
clone_folder: c:\projects\xash\hlsdk-xash3d
build:
project: INSTALL.vcxproj
project: build/INSTALL.vcxproj
verbosity: normal
configuration:
@ -25,4 +19,9 @@ configuration: @@ -25,4 +19,9 @@ configuration:
before_build:
- git submodule update --init --recursive
- cmake -G "%GENERATOR_NAME%"
- cmake -G "%GENERATOR_NAME%" -B build -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="dist"
artifacts:
- path: dist
name: hlsdk-msvc
type: zip

2
cl_dll/CMakeLists.txt

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
# SOFTWARE.
#
cmake_minimum_required(VERSION 2.6.0)
cmake_minimum_required(VERSION 2.8.12)
project (CLDLL)
set (CLDLL_LIBRARY client)

2
cl_dll/MOTD.cpp

@ -66,7 +66,7 @@ int CHudMOTD::Draw( float fTime ) @@ -66,7 +66,7 @@ int CHudMOTD::Draw( float fTime )
if( !m_bShow )
return 1;
gHUD.m_iNoConsolePrint |= 1 << 1;
bool bScroll;
//bool bScroll;
// find the top of where the MOTD should be drawn, so the whole thing is centered in the screen
int ypos = ( ScreenHeight - LINE_HEIGHT * m_iLines ) / 2; // shift it up slightly
char *ch = m_szMOTD;

2
cl_dll/ammo.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef __AMMO_H__
#if !defined(__AMMO_H__)
#define __AMMO_H__
#define MAX_WEAPON_NAME 128

2
cl_dll/ammohistory.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// ammohistory.h
//
#pragma once
#ifndef AMMOHISTORY_H
#if !defined(AMMOHISTORY_H)
#define AMMOHISTORY_H
// this is the max number of items in each bucket

2
cl_dll/camera.h

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
// Camera.h -- defines and such for a 3rd person camera
// NOTE: must include quakedef.h first
#pragma once
#ifndef _CAMERA_H_
#if !defined(_CAMERA_H_)
#define _CAMERA_H_
// pitch, yaw, dist

10
cl_dll/cdll_int.cpp

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
#include "netadr.h"
#include "parsemsg.h"
#if defined(GOLDSOURCE_SUPPORT) && (defined(_WIN32) || defined(__linux__) || defined(__APPLE__)) && (defined(__i386) || defined(_M_IX86))
#define USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
#define USE_VGUI_FOR_GOLDSOURCE_SUPPORT 1
#include "VGUI_Panel.h"
#include "VGUI_App.h"
#endif
@ -183,7 +183,7 @@ int *HUD_GetRect( void ) @@ -183,7 +183,7 @@ int *HUD_GetRect( void )
return extent;
}
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
class TeamFortressViewport : public vgui::Panel
{
public:
@ -239,7 +239,7 @@ int DLLEXPORT HUD_VidInit( void ) @@ -239,7 +239,7 @@ int DLLEXPORT HUD_VidInit( void )
{
gHUD.VidInit();
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
vgui::Panel* root=(vgui::Panel*)gEngfuncs.VGui_GetPanel();
if (root) {
gEngfuncs.Con_Printf( "Root VGUI panel exists\n" );
@ -338,7 +338,7 @@ Called by engine every frame that client .dll is loaded @@ -338,7 +338,7 @@ Called by engine every frame that client .dll is loaded
void DLLEXPORT HUD_Frame( double time )
{
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
if (!gViewPort)
gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect());
#else

8
cl_dll/cl_dll.h

@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
// - Handling the custum HUD-update packets
//
#pragma once
#ifndef CL_DLL_H
#if !defined(CL_DLL_H)
#define CL_DLL_H
typedef unsigned char byte;
typedef unsigned short word;
@ -39,7 +39,7 @@ typedef float vec_t; @@ -39,7 +39,7 @@ typedef float vec_t;
#include "../engine/cdll_int.h"
#include "../dlls/cdll_dll.h"
#if !defined(_WIN32)
#if !_WIN32
#define _cdecl
#endif
#include "exportdef.h"
@ -49,8 +49,8 @@ typedef float vec_t; @@ -49,8 +49,8 @@ typedef float vec_t;
#else
#include <math.h>
#endif
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define XASH_64BIT
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
#define XASH_64BIT 1
#endif
extern cl_enginefunc_t gEngfuncs;

7
cl_dll/cl_util.h

@ -15,12 +15,12 @@ @@ -15,12 +15,12 @@
//
// cl_util.h
//
#ifndef CL_UTIL_H
#if !defined(CL_UTIL_H)
#define CL_UTIL_H
#include "exportdef.h"
#include "cvardef.h"
#ifndef TRUE
#if !defined(TRUE)
#define TRUE 1
#define FALSE 0
#endif
@ -108,7 +108,8 @@ inline int TextMessageDrawChar( int x, int y, int number, int r, int g, int b ) @@ -108,7 +108,8 @@ inline int TextMessageDrawChar( int x, int y, int number, int r, int g, int b )
inline int DrawConsoleString( int x, int y, const char *string )
{
if( hud_textmode->value == 1 )
return gHUD.DrawHudString( x, y, 9999, (char*)string, 255 * g_hud_text_color[0], 255 * g_hud_text_color[1], 255 * g_hud_text_color[2] );
return gHUD.DrawHudString( x, y, 9999, (char*)string, (int)( (float)g_hud_text_color[0] * 255.0f ),
(int)( (float)g_hud_text_color[1] * 255.0f ), (int)( (float)g_hud_text_color[2] * 255.0f ) );
return gEngfuncs.pfnDrawConsoleString( x, y, (char*) string );
}

18
cl_dll/entity.cpp

@ -227,8 +227,8 @@ void DLLEXPORT HUD_TxferPredictionData( struct entity_state_s *ps, const struct @@ -227,8 +227,8 @@ void DLLEXPORT HUD_TxferPredictionData( struct entity_state_s *ps, const struct
}
/*
//#define TEST_IT
#if defined( TEST_IT )
//#define TEST_IT 1
#if TEST_IT
cl_entity_t mymodel[9];
@ -270,8 +270,8 @@ void MoveModel( void ) @@ -270,8 +270,8 @@ void MoveModel( void )
}
#endif
//#define TRACE_TEST
#if defined( TRACE_TEST )
//#define TRACE_TEST 1
#if TRACE_TEST
extern int hitent;
@ -427,7 +427,7 @@ void TempEnts( void ) @@ -427,7 +427,7 @@ void TempEnts( void )
}
*/
#if defined( BEAM_TEST )
#if BEAM_TEST
// Note can't index beam[0] in Beam callback, so don't use that index
// Room for 1 beam ( 0 can't be used )
static cl_entity_t beams[2];
@ -511,10 +511,10 @@ void DLLEXPORT HUD_CreateEntities( void ) @@ -511,10 +511,10 @@ void DLLEXPORT HUD_CreateEntities( void )
// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )
// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list
/*
#if defined( TEST_IT )
#if TEST_IT
MoveModel();
#endif
#if defined( TRACE_TEST )
#if TRACE_TEST
TraceModel();
#endif
*/
@ -524,7 +524,7 @@ void DLLEXPORT HUD_CreateEntities( void ) @@ -524,7 +524,7 @@ void DLLEXPORT HUD_CreateEntities( void )
/*
TempEnts();
*/
#if defined( BEAM_TEST )
#if BEAM_TEST
Beams();
#endif
// Add in any game specific objects
@ -943,7 +943,7 @@ Indices must start at 1, not zero. @@ -943,7 +943,7 @@ Indices must start at 1, not zero.
*/
cl_entity_t DLLEXPORT *HUD_GetUserEntity( int index )
{
#if defined( BEAM_TEST )
#if BEAM_TEST
// None by default, you would return a valic pointer if you create a client side
// beam and attach it to a client side entity.
if( index > 0 && index <= 1 )

2
cl_dll/health.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef HEALTH_H
#if !defined(HEALTH_H)
#define HEALTH_H
#define DMG_IMAGE_LIFE 2 // seconds that image is up

2
cl_dll/hud.h

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
// CHud handles the message, calculation, and drawing the HUD
//
#pragma once
#ifndef HUD_H
#if !defined(HUD_H)
#define HUD_H
#define RGB_YELLOWISH 0x00C1CFCB //193,207,203
#define RGB_WHITEISH 0x00FAFAFA //250,250,250

2
cl_dll/hud_spectator.h

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
//=============================================================================
#pragma once
#ifndef HUD_SPECTATOR_H
#if !defined(HUD_SPECTATOR_H)
#define HUD_SPECTATOR_H
#include "cl_entity.h"

2
cl_dll/in_camera.cpp

@ -459,7 +459,7 @@ void CAM_OutUp( void ) @@ -459,7 +459,7 @@ void CAM_OutUp( void )
void CAM_ToThirdPerson( void )
{
vec3_t viewangles;
#if !defined( _DEBUG )
#if !_DEBUG
if( gEngfuncs.GetMaxClients() > 1 )
{
// no thirdperson in multiplayer.

52
cl_dll/input_goldsource.cpp

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
#include "input_mouse.h"
#ifdef SUPPORT_GOLDSOURCE_INPUT
#if SUPPORT_GOLDSOURCE_INPUT
#include "hud.h"
#include "cl_util.h"
@ -24,10 +24,10 @@ @@ -24,10 +24,10 @@
#include "view.h"
#if !_WIN32
#define USE_SDL2
#define USE_SDL2 1
#endif
#ifdef USE_SDL2
#if USE_SDL2
#define ARRAYSIZE(p) ( sizeof(p) /sizeof(p[0]) )
#include <dlfcn.h>
#include <SDL2/SDL_mouse.h>
@ -218,7 +218,7 @@ enum _ControlList @@ -218,7 +218,7 @@ enum _ControlList
AxisTurn
};
#if !defined(USE_SDL2) && defined(_WIN32)
#if !USE_SDL2 && _WIN32
DWORD dwAxisFlags[JOY_MAX_AXES] =
{
JOY_RETURNX,
@ -232,9 +232,9 @@ DWORD dwAxisFlags[JOY_MAX_AXES] = @@ -232,9 +232,9 @@ DWORD dwAxisFlags[JOY_MAX_AXES] =
DWORD dwAxisMap[ JOY_MAX_AXES ];
DWORD dwControlMap[ JOY_MAX_AXES ];
#if defined(USE_SDL2)
#if USE_SDL2
int pdwRawValue[ JOY_MAX_AXES ];
#elif defined(_WIN32)
#elif _WIN32
PDWORD pdwRawValue[ JOY_MAX_AXES ];
#endif
DWORD joy_oldbuttonstate, joy_oldpovstate;
@ -242,9 +242,9 @@ DWORD joy_oldbuttonstate, joy_oldpovstate; @@ -242,9 +242,9 @@ DWORD joy_oldbuttonstate, joy_oldpovstate;
int joy_id;
DWORD joy_numbuttons;
#ifdef USE_SDL2
#if USE_SDL2
SDL_GameController *s_pJoystick = NULL;
#elif defined(_WIN32)
#elif _WIN32
DWORD joy_flags;
static JOYINFOEX ji;
#endif
@ -566,7 +566,7 @@ void GoldSourceInput::IN_Shutdown (void) @@ -566,7 +566,7 @@ void GoldSourceInput::IN_Shutdown (void)
}
#endif
#ifdef USE_SDL2
#if USE_SDL2
for (int j=0; j<ARRAYSIZE(sdlFunctions); ++j) {
*(sdlFunctions[j].ppfnFunc) = NULL;
}
@ -735,7 +735,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) @@ -735,7 +735,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
else
#endif
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
current_pos.x = deltaX;
current_pos.y = deltaY;
@ -904,8 +904,8 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd) @@ -904,8 +904,8 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd)
dead_viewangles = viewangles; // keep them actual
/*
//#define TRACE_TEST
#if defined( TRACE_TEST )
//#define TRACE_TEST 1
#if TRACE_TEST
{
int mx, my;
void V_Move( int mx, int my );
@ -942,7 +942,7 @@ void GoldSourceInput::IN_Accumulate (void) @@ -942,7 +942,7 @@ void GoldSourceInput::IN_Accumulate (void)
else
#endif
{
#ifdef USE_SDL2
#if USE_SDL2
int deltaX, deltaY;
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
mx_accum += deltaX;
@ -997,7 +997,7 @@ void IN_StartupJoystick (void) @@ -997,7 +997,7 @@ void IN_StartupJoystick (void)
// assume no joystick
joy_avail = 0;
#ifdef USE_SDL2
#if USE_SDL2
int nJoysticks = safe_pfnSDL_NumJoysticks();
if ( nJoysticks > 0 )
{
@ -1029,7 +1029,7 @@ void IN_StartupJoystick (void) @@ -1029,7 +1029,7 @@ void IN_StartupJoystick (void)
{
gEngfuncs.Con_DPrintf ("joystick not found -- driver not present\n\n");
}
#elif defined(_WIN32)
#elif _WIN32
int numdevs;
JOYCAPS jc;
MMRESULT mmr;
@ -1084,7 +1084,7 @@ void IN_StartupJoystick (void) @@ -1084,7 +1084,7 @@ void IN_StartupJoystick (void)
#endif
}
#ifdef USE_SDL2
#if USE_SDL2
int RawValuePointer (int axis)
{
switch (axis)
@ -1101,7 +1101,7 @@ int RawValuePointer (int axis) @@ -1101,7 +1101,7 @@ int RawValuePointer (int axis)
}
}
#elif defined(_WIN32)
#elif _WIN32
PDWORD RawValuePointer (int axis)
{
switch (axis)
@ -1184,7 +1184,7 @@ void Joy_AdvancedUpdate_f (void) @@ -1184,7 +1184,7 @@ void Joy_AdvancedUpdate_f (void)
dwControlMap[JOY_AXIS_V] = dwTemp & JOY_RELATIVE_AXIS;
}
#if !defined(USE_SDL2) && defined(_WIN32)
#if !USE_SDL2 && _WIN32
// compute the axes to collect from DirectInput
joy_flags = JOY_RETURNCENTERED | JOY_RETURNBUTTONS | JOY_RETURNPOV;
for (i = 0; i < JOY_MAX_AXES; i++)
@ -1216,7 +1216,7 @@ void GoldSourceInput::IN_Commands (void) @@ -1216,7 +1216,7 @@ void GoldSourceInput::IN_Commands (void)
// loop through the joystick buttons
// key a joystick event or auxillary event for higher number buttons for each state change
#ifdef USE_SDL2
#if USE_SDL2
buttonstate = 0;
for ( i = 0; i < SDL_CONTROLLER_BUTTON_MAX; i++ )
{
@ -1230,7 +1230,7 @@ void GoldSourceInput::IN_Commands (void) @@ -1230,7 +1230,7 @@ void GoldSourceInput::IN_Commands (void)
{
pdwRawValue[i] = RawValuePointer(i);
}
#elif defined(_WIN32)
#elif _WIN32
buttonstate = ji.dwButtons;
#endif
@ -1256,7 +1256,7 @@ void GoldSourceInput::IN_Commands (void) @@ -1256,7 +1256,7 @@ void GoldSourceInput::IN_Commands (void)
// this avoids any potential problems related to moving from one
// direction to another without going through the center position
povstate = 0;
#if !defined(USE_SDL2) && defined(_WIN32)
#if !USE_SDL2 && _WIN32
if(ji.dwPOV != JOY_POVCENTERED)
{
if (ji.dwPOV == JOY_POVFORWARD)
@ -1294,10 +1294,10 @@ IN_ReadJoystick @@ -1294,10 +1294,10 @@ IN_ReadJoystick
*/
int IN_ReadJoystick (void)
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_JoystickUpdate();
return 1;
#elif defined(_WIN32)
#elif _WIN32
memset (&ji, 0, sizeof(ji));
ji.dwSize = sizeof(ji);
ji.dwFlags = joy_flags;
@ -1374,9 +1374,9 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd ) @@ -1374,9 +1374,9 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
for (i = 0; i < JOY_MAX_AXES; i++)
{
// get the floating point zero-centered, potentially-inverted data for the current axis
#ifdef USE_SDL2
#if USE_SDL2
fAxisValue = (float)pdwRawValue[i];
#elif defined(_WIN32)
#elif _WIN32
fAxisValue = (float) *pdwRawValue[i];
fAxisValue -= 32768.0;
#endif
@ -1600,7 +1600,7 @@ void GoldSourceInput::IN_Init (void) @@ -1600,7 +1600,7 @@ void GoldSourceInput::IN_Init (void)
}
#endif
#ifdef USE_SDL2
#if USE_SDL2
#if __APPLE__
#define SDL2_FULL_LIBNAME "libsdl2-2.0.0.dylib"
#else

4
cl_dll/input_mouse.cpp

@ -10,7 +10,7 @@ cvar_t *in_joystick; @@ -10,7 +10,7 @@ cvar_t *in_joystick;
FWGSInput fwgsInput;
#ifdef SUPPORT_GOLDSOURCE_INPUT
#if SUPPORT_GOLDSOURCE_INPUT
GoldSourceInput goldSourceInput;
AbstractInput* currentInput = &goldSourceInput;
#else
@ -68,7 +68,7 @@ void IN_Shutdown( void ) @@ -68,7 +68,7 @@ void IN_Shutdown( void )
void IN_Init( void )
{
#ifdef SUPPORT_GOLDSOURCE_INPUT
#if SUPPORT_GOLDSOURCE_INPUT
if (IsXashFWGS()) {
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
currentInput = &fwgsInput;

6
cl_dll/input_mouse.h

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#pragma once
#ifndef INPUT_MOUSE_H
#if !defined(INPUT_MOUSE_H)
#define INPUT_MOUSE_H
#include "cl_dll.h"
#include "usercmd.h"
@ -45,8 +45,8 @@ protected: @@ -45,8 +45,8 @@ protected:
};
// No need for goldsource input support on the platforms that are not supported by GoldSource.
#if defined(GOLDSOURCE_SUPPORT) && (defined(_WIN32) || defined(__linux__) || defined(__APPLE__)) && (defined(__i386) || defined(_M_IX86))
#define SUPPORT_GOLDSOURCE_INPUT
#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
#define SUPPORT_GOLDSOURCE_INPUT 1
class GoldSourceInput : public AbstractInput
{
public:

3
cl_dll/overview.h

@ -4,9 +4,8 @@ @@ -4,9 +4,8 @@
//
// $NoKeywords: $
//=============================================================================
#pragma once
#ifndef OVERVIEW_H
#if !defined(OVERVIEW_H)
#define OVERVIEW_H
//-----------------------------------------------------------------------------

2
cl_dll/parsemsg.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// parsemsg.h
//
#pragma once
#ifndef PARSEMSG_H
#if !defined(PARSEMSG_H)
#define PARSEMSG_H
#define ASSERT( x )

9
cl_dll/studio_util.h

@ -4,20 +4,19 @@ @@ -4,20 +4,19 @@
//
// $NoKeywords: $
//=============================================================================
#pragma once
#if !defined( STUDIO_UTIL_H )
#if !defined(STUDIO_UTIL_H)
#define STUDIO_UTIL_H
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
#ifndef PITCH
#if !defined(PITCH)
// MOVEMENT INFO
// up / down
#define PITCH 0

5
cl_dll/tf_defs.h

@ -7,8 +7,7 @@ @@ -7,8 +7,7 @@
* All Rights Reserved.
*
****/
#ifndef __TF_DEFS_H
#if !defined(__TF_DEFS_H)
#define __TF_DEFS_H
//===========================================================================
@ -1155,7 +1154,7 @@ float already_chosen_map; @@ -1155,7 +1154,7 @@ float already_chosen_map;
#define TS_PRINT_LONG 2
#define TS_PRINT_LONG_TO_ALL 3
#ifndef TF_DEFS_ONLY
#if !defined(TF_DEFS_ONLY)
typedef struct
{

8
cl_dll/tri.cpp

@ -23,8 +23,8 @@ extern "C" @@ -23,8 +23,8 @@ extern "C"
void DLLEXPORT HUD_DrawTransparentTriangles( void );
}
//#define TEST_IT
#if defined( TEST_IT )
//#define TEST_IT 1
#if TEST_IT
/*
=================
@ -98,7 +98,7 @@ Non-transparent triangles-- add them here @@ -98,7 +98,7 @@ Non-transparent triangles-- add them here
void DLLEXPORT HUD_DrawNormalTriangles( void )
{
gHUD.m_Spectator.DrawOverview();
#if defined( TEST_IT )
#if TEST_IT
// Draw_Triangles();
#endif
}
@ -113,7 +113,7 @@ Render any triangles with transparent rendermode needs here @@ -113,7 +113,7 @@ Render any triangles with transparent rendermode needs here
void DLLEXPORT HUD_DrawTransparentTriangles( void )
{
gHUD.m_Scope.DrawScope();
#if defined( TEST_IT )
#if TEST_IT
// Draw_Triangles();
#endif
}

6
cl_dll/util.cpp

@ -26,17 +26,17 @@ @@ -26,17 +26,17 @@
#include "cl_util.h"
#include <string.h>
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
extern vec3_t vec3_origin;
// if C++ mangling differs from C symbol name
#if defined _MSC_VER || defined __WATCOMC__
#if _MSC_VER || __WATCOMC__
vec3_t vec3_origin;
#endif

2
cl_dll/util_vector.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// A subset of the extdll.h in the project HL Entity DLL
//
#pragma once
#ifndef UTIL_VECTOR_H
#if !defined(UTIL_VECTOR_H)
#define UTIL_VECTOR_H
// Misc C-runtime library headers

12
cl_dll/view.cpp

@ -37,11 +37,11 @@ extern "C" @@ -37,11 +37,11 @@ extern "C"
int iIsSpectator;
}
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
@ -1539,8 +1539,8 @@ void DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams ) @@ -1539,8 +1539,8 @@ void DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams )
}
/*
// Example of how to overlay the whole screen with red at 50 % alpha
#define SF_TEST
#if defined SF_TEST
#define SF_TEST 1
#if SF_TEST
{
screenfade_t sf;
gEngfuncs.pfnGetScreenFade( &sf );
@ -1606,8 +1606,8 @@ void V_Init( void ) @@ -1606,8 +1606,8 @@ void V_Init( void )
cl_chasedist = gEngfuncs.pfnRegisterVariable( "cl_chasedist","112", 0 );
}
//#define TRACE_TEST
#if defined( TRACE_TEST )
//#define TRACE_TEST 1
#if TRACE_TEST
extern float in_fov;
/*

2
common/beamdef.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef BEAMDEF_H
#if !defined(BEAMDEF_H)
#define BEAMDEF_H
#define FBEAM_STARTENTITY 0x00000001

2
common/cl_entity.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CL_ENTITY_H
#if !defined(CL_ENTITY_H)
#define CL_ENTITY_H
typedef struct efrag_s

3
common/com_model.h

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
//
// $NoKeywords: $
//=============================================================================
// com_model.h
#pragma once
#if !defined( COM_MODEL_H )
@ -45,7 +44,7 @@ typedef enum @@ -45,7 +44,7 @@ typedef enum
} modtype_t;
// must match definition in modelgen.h
#ifndef SYNCTYPE_T
#if !defined(SYNCTYPE_T)
#define SYNCTYPE_T
typedef enum

2
common/con_nprint.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CON_NPRINT_H
#if !defined(CON_NPRINT_H)
#define CON_NPRINT_H
typedef struct con_nprint_s

4
common/const.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CONST_H
#if !defined(CONST_H)
#define CONST_H
//
// Constants shared by the engine and dlls
@ -742,7 +742,7 @@ typedef unsigned short word; @@ -742,7 +742,7 @@ typedef unsigned short word;
#undef true
#undef false
#ifndef __cplusplus
#if !__cplusplus
typedef enum { false, true } qboolean;
#else
typedef int qboolean;

2
common/cvardef.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CVARDEF_H
#if !defined(CVARDEF_H)
#define CVARDEF_H
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc

2
common/demo_api.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DEMO_API_H
#if !defined(DEMO_API_H)
#define DEMO_API_H
typedef struct demo_api_s

2
common/dlight.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DLIGHT_H
#if !defined(DLIGHT_H)
#define DLIGHT_H
typedef struct dlight_s

2
common/entity_state.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ENTITY_STATE_H
#if !defined(ENTITY_STATE_H)
#define ENTITY_STATE_H
// For entityType below

2
common/entity_types.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ENTITY_TYPES_H
#if !defined(ENTITY_TYPES_H)
#define ENTITY_TYPES_H
#define ET_NORMAL 0

2
common/event_api.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EVENT_API_H
#if !defined(EVENT_API_H)
#define EVENT_API_H
#define EVENT_API_VERSION 1

2
common/event_args.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EVENT_ARGS_H
#if !defined(EVENT_ARGS_H)
#define EVENT_ARGS_H
// Event was invoked with stated origin

2
common/event_flags.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EVENT_FLAGS_H
#if !defined(EVENT_FLAGS_H)
#define EVENT_FLAGS_H
// Skip local host for event send.

2
common/hltv.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef HLTV_H
#if !defined(HLTV_H)
#define HLTV_H
#define TYPE_CLIENT 0 // client is a normal HL client (default)

2
common/ivoicetweak.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef IVOICETWEAK_H
#if !defined(IVOICETWEAK_H)
#define IVOICETWEAK_H
// These provide access to the voice controls.

14
common/mathlib.h

@ -14,11 +14,11 @@ @@ -14,11 +14,11 @@
****/
// mathlib.h
#pragma once
#ifndef MATHLIB_H
#if !defined(MATHLIB_H)
#define MATHLIB_H
#ifndef __cplusplus
#if !__cplusplus
#include <math.h>
#ifdef HAVE_TGMATH_H
#if HAVE_TGMATH_H
#include <tgmath.h>
#endif // HAVE_TGMATH_H
#else // __cplusplus
@ -31,17 +31,17 @@ @@ -31,17 +31,17 @@
typedef float vec_t;
#if !defined DID_VEC3_T_DEFINE
#if !defined(DID_VEC3_T_DEFINE)
#define DID_VEC3_T_DEFINE
typedef vec_t vec3_t[3];
#endif
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
@ -52,7 +52,7 @@ extern int nanmask; @@ -52,7 +52,7 @@ extern int nanmask;
#define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask)
#ifndef VECTOR_H
#if !defined(VECTOR_H)
#define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2])
#endif

2
common/net_api.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef NET_API_H
#if !defined(NET_API_H)
#define NET_API_H
#include "netadr.h"

2
common/netadr.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef NETADR_H
#if !defined(NETADR_H)
#define NETADR_H
typedef enum

2
common/particledef.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef PARTICLEDEF_H
#if !defined(PARTICLEDEF_H)
#define PARTICLEDEF_H
typedef enum

2
common/pmtrace.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef PM_TRACE_H
#if !defined(PM_TRACE_H)
#define PM_TRACE_H
typedef struct

2
common/qfont.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef QFONT_H
#if !defined(QFONT_H)
#define QFONT_H
// Font stuff

2
common/r_efx.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef R_EFX_H
#if !defined(R_EFX_H)
#define R_EFX_H
// particle_t

2
common/r_studioint.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef R_STUDIOINT_H
#if !defined(R_STUDIOINT_H)
#define R_STUDIOINT_H
#define STUDIO_INTERFACE_VERSION 1

2
common/ref_params.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef REF_PARAMS_H
#if !defined(REF_PARAMS_H)
#define REF_PARAMS_H
typedef struct ref_params_s

2
common/screenfade.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef SCREENFADE_H
#if !defined(SCREENFADE_H)
#define SCREENFADE_H
typedef struct screenfade_s

2
common/studio_event.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef STUDIO_EVENT_H
#if !defined(STUDIO_EVENT_H)
#define STUDIO_EVENT_H
typedef struct mstudioevent_s

2
common/triangleapi.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef TRIANGLEAPI_H
#if !defined(TRIANGLEAPI_H)
#define TRIANGLEAPI_H
typedef enum

2
common/usercmd.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef USERCMD_H
#if !defined(USERCMD_H)
#define USERCMD_H
typedef struct usercmd_s

2
common/wadfile.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef WADFILE_H
#if !defined(WADFILE_H)
#define WADFILE_H
/*

2
common/weaponinfo.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef WEAPONINFO_H
#if !defined(WEAPONINFO_H)
#define WEAPONINFO_H
// Info about weapons player might have in his/her possession

8
dlls/CMakeLists.txt

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
# SOFTWARE.
#
cmake_minimum_required(VERSION 2.6.0)
cmake_minimum_required(VERSION 2.8.12)
project (SVDLL)
set (SVDLL_LIBRARY server)
@ -156,6 +156,12 @@ set (SVDLL_SOURCES @@ -156,6 +156,12 @@ set (SVDLL_SOURCES
include_directories (. wpn_shared poke646 ../common ../engine ../pm_shared ../game_shared ../public)
if(MSVC)
set(SVDLL_SOURCES
${SVDLL_SOURCES}
hl.def)
endif()
if(USE_VOICEMGR)
set(SVDLL_SOURCES
${SVDLL_SOURCES}

2
dlls/activity.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ACTIVITY_H
#if !defined(ACTIVITY_H)
#define ACTIVITY_H
typedef enum {

2
dlls/activitymap.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ACTIVITYMAP_H
#if !defined(ACTIVITYMAP_H)
#define ACTIVITYMAP_H
#define _A( a ) { a, #a }

8
dlls/animation.cpp

@ -36,21 +36,21 @@ typedef unsigned char byte; @@ -36,21 +36,21 @@ typedef unsigned char byte;
#include "studio.h"
#ifndef ACTIVITY_H
#if !defined(ACTIVITY_H)
#include "activity.h"
#endif
#include "activitymap.h"
#ifndef ANIMATION_H
#if !defined(ANIMATION_H)
#include "animation.h"
#endif
#ifndef SCRIPTEVENT_H
#if !defined(SCRIPTEVENT_H)
#include "scriptevent.h"
#endif
#ifndef ENGINECALLBACK_H
#if !defined(ENGINECALLBACK_H)
#include "enginecallback.h"
#endif

4
dlls/animation.h

@ -13,12 +13,12 @@ @@ -13,12 +13,12 @@
*
****/
#pragma once
#ifndef ANIMATION_H
#if !defined(ANIMATION_H)
#define ANIMATION_H
#define ACTIVITY_NOT_AVAILABLE -1
#ifndef MONSTEREVENT_H
#if !defined(MONSTEREVENT_H)
#include "monsterevent.h"
#endif

2
dlls/basemonster.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef BASEMONSTER_H
#if !defined(BASEMONSTER_H)
#define BASEMONSTER_H
//

4
dlls/cbase.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CBASE_H
#if !defined(CBASE_H)
#define CBASE_H
/*
@ -48,7 +48,7 @@ CBaseEntity @@ -48,7 +48,7 @@ CBaseEntity
#include "saverestore.h"
#include "schedule.h"
#ifndef MONSTEREVENT_H
#if !defined(MONSTEREVENT_H)
#include "monsterevent.h"
#endif

2
dlls/cdll_dll.h

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
// this file is included by both the game-dll and the client-dll,
#pragma once
#ifndef CDLL_DLL_H
#if !defined(CDLL_DLL_H)
#define CDLL_DLL_H
#define MAX_WEAPONS 32 // ???

5
dlls/client.cpp

@ -271,7 +271,7 @@ decodeError: @@ -271,7 +271,7 @@ decodeError:
uValueOut = '?';
bErrorOut = true;
return nBytes;
#if 0
decodeFinishedMaybeCESU8:
// Do we have a full UTF-16 surrogate pair that's been UTF-8 encoded afterwards?
// That is, do we have 0xD800-0xDBFF followed by 0xDC00-0xDFFF? If so, decode it all.
@ -282,6 +282,7 @@ decodeFinishedMaybeCESU8: @@ -282,6 +282,7 @@ decodeFinishedMaybeCESU8:
uMinValue = 0x10000;
}
goto decodeFinished;
#endif
}
//-----------------------------------------------------------------------------
@ -318,7 +319,7 @@ void Host_Say( edict_t *pEntity, int teamonly ) @@ -318,7 +319,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
{
CBasePlayer *client;
int j;
char *p, *pc;
char *p; //, *pc;
char text[128];
char szTemp[256];
const char *cpSay = "say";

2
dlls/client.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CLIENT_H
#if !defined(CLIENT_H)
#define CLIENT_H
extern void respawn( entvars_t *pev, BOOL fCopyCorpse );

2
dlls/combat.cpp

@ -1484,7 +1484,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi @@ -1484,7 +1484,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
Vector vecRight = gpGlobals->v_right;
Vector vecUp = gpGlobals->v_up;
float x = 0.0f, y = 0.0f;
float z;
//float z;
if( pevAttacker == NULL )
pevAttacker = pev; // the default attacker is ourselves

2
dlls/compile.bat

@ -113,7 +113,7 @@ set LIBS=user32.lib @@ -113,7 +113,7 @@ set LIBS=user32.lib
set OUTNAME=hl.dll
set DEBUG=/debug
cl %DEFINES% %LIBS% %SOURCES% %INCLUDES% -o %OUTNAME% /link /dll /out:%OUTNAME% %DEBUG%
cl %DEFINES% %LIBS% %SOURCES% %INCLUDES% -o %OUTNAME% /link /dll /out:%OUTNAME% %DEBUG% /def:".\hl.def"
echo -- Compile done. Cleaning...

2
dlls/decals.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DECALS_H
#if !defined(DECALS_H)
#define DECALS_H
//

2
dlls/defaultai.h

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef DEFAULTAI_H
#if !defined(DEFAULTAI_H)
#define DEFAULTAI_H
//=========================================================

2
dlls/doors.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DOORS_H
#if !defined(DOORS_H)
#define DOORS_H
// doors

2
dlls/effects.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EFFECTS_H
#if !defined(EFFECTS_H)
#define EFFECTS_H
#define SF_BEAM_STARTON 0x0001

5
dlls/enginecallback.h

@ -12,10 +12,9 @@ @@ -12,10 +12,9 @@
* without written permission from Valve LLC.
*
****/
#ifndef ENGINECALLBACK_H
#define ENGINECALLBACK_H
#pragma once
#if !defined(ENGINECALLBACK_H)
#define ENGINECALLBACK_H
#include "event_flags.h"

2
dlls/explode.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EXPLODE_H
#if !defined(EXPLODE_H)
#define EXPLODE_H
#define SF_ENVEXPLOSION_NODAMAGE ( 1 << 0 ) // when set, ENV_EXPLOSION will not actually inflict damage

4
dlls/exportdef.h

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#pragma once
#ifndef EXPORTDEF_H
#if !defined(EXPORTDEF_H)
#define EXPORTDEF_H
#if defined _WIN32 || defined __CYGWIN__
#if _WIN32 || __CYGWIN__
#if __GNUC__
#define EXPORT __attribute__ ((dllexport))
#else

18
dlls/extdll.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EXTDLL_H
#if !defined(EXTDLL_H)
#define EXTDLL_H
//
@ -45,10 +45,10 @@ @@ -45,10 +45,10 @@
#include <windows.h>
#undef HSPRITE
#else // _WIN32
#ifndef FALSE
#if !defined(FALSE)
#define FALSE 0
#endif
#ifndef TRUE
#if !defined(TRUE)
#define TRUE (!FALSE)
#endif
#include <limits.h>
@ -57,7 +57,7 @@ typedef unsigned int ULONG; @@ -57,7 +57,7 @@ typedef unsigned int ULONG;
typedef unsigned char BYTE;
typedef int BOOL;
#define MAX_PATH PATH_MAX
#ifndef PATH_MAX
#if !defined(PATH_MAX)
#define PATH_MAX 4096
#endif
#endif //_WIN32
@ -72,12 +72,12 @@ typedef int BOOL; @@ -72,12 +72,12 @@ typedef int BOOL;
#include <math.h>
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define XASH_64BIT
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
#define XASH_64BIT 1
#endif
// Header file containing definition of globalvars_t and entvars_t
@ -101,10 +101,10 @@ typedef float vec_t; // needed before including progdefs.h @@ -101,10 +101,10 @@ typedef float vec_t; // needed before including progdefs.h
// Shared header between the client DLL and the game DLLs
#include "cdll_dll.h"
#ifndef Q_min
#if !defined(Q_min)
#define Q_min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef Q_max
#if !defined(Q_max)
#define Q_max(a,b) (((a) > (b)) ? (a) : (b))
#endif

2
dlls/flyingmonster.h

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
****/
// Base class for flying monsters. This overrides the movement test & execution code from CBaseMonster
#pragma once
#ifndef FLYINGMONSTER_H
#if !defined(FLYINGMONSTER_H)
#define FLYINGMONSTER_H
class CFlyingMonster : public CBaseMonster

2
dlls/func_break.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef FUNC_BREAK_H
#if !defined(FUNC_BREAK_H)
#define FUNC_BREAK_H
typedef enum

2
dlls/game.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef GAME_H
#if !defined(GAME_H)
#define GAME_H
extern void GameDLLInit( void );

2
dlls/gamerules.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// GameRules
//=========================================================
#pragma once
#ifndef GAMERULES_H
#if !defined(GAMERULES_H)
#define GAMERULES_H
//#include "weapons.h"
//#include "items.h"

4
dlls/h_cycler.cpp

@ -28,8 +28,8 @@ @@ -28,8 +28,8 @@
#include "weapons.h"
#include "player.h"
#define TEMP_FOR_SCREEN_SHOTS
#if defined(TEMP_FOR_SCREEN_SHOTS) //===================================================
#define TEMP_FOR_SCREEN_SHOTS 1
#if TEMP_FOR_SCREEN_SHOTS //===================================================
class CCycler : public CBaseMonster
{

4
dlls/h_export.cpp

@ -43,8 +43,8 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) @@ -43,8 +43,8 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
return TRUE;
}
// cdecl for win32
#define EXPORT2 WINAPIV
// stdcall for win32
#define EXPORT2 WINAPI
#else
#define EXPORT2
#endif

5
dlls/hl.def

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
LIBRARY hl
EXPORTS
GiveFnptrsToDll @1
SECTIONS
.data READ WRITE

2
dlls/hornet.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// Hornets
//=========================================================
#pragma once
#ifndef HORNET_H
#if !defined(HORNET_H)
#define HORNET_H
//=========================================================
// Hornet Defines

2
dlls/items.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ITEMS_H
#if !defined(ITEMS_H)
#define ITEMS_H
class CItem : public CBaseEntity

4
dlls/maprules.h

@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef MAPRULES_H
#pragma once
#if !defined(MAPRULES_H)
#define MAPRULES_H
#endif //MAPRULES_H

4
dlls/monsterevent.h

@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef MONSTEREVENT_H
#pragma once
#if !defined(MONSTEREVENT_H)
#define MONSTEREVENT_H
typedef struct

2
dlls/monsters.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef MONSTERS_H
#if !defined(MONSTERS_H)
#include "skill.h"
#define MONSTERS_H

2
dlls/nodes.cpp

@ -45,7 +45,7 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt ) @@ -45,7 +45,7 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
#if __DOS__
#include <direct.h>
#define CreateDirectoryA(p, n) mkdir(p)
#elif !defined _WIN32
#elif !_WIN32
#include <unistd.h>
#include <sys/stat.h>
#define CreateDirectoryA(p, n) mkdir(p,777)

6
dlls/nodes.h

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
// nodes.h
//=========================================================
#pragma once
#ifndef NODES_H
#define NODES_H
#if !defined(NODES_H)
#define NODES_H
//=========================================================
// DEFINE
//=========================================================
@ -106,7 +106,7 @@ typedef struct @@ -106,7 +106,7 @@ typedef struct
// CGraph
//=========================================================
#define _GRAPH_VERSION_RETAIL 16 // Retail Half-Life graph version. Don't increment this
#if defined(XASH_64BIT)
#if XASH_64BIT
#define _GRAPH_VERSION (16 * 10)
#else
#define _GRAPH_VERSION (16) // !!!increment this whenever graph/node/link classes change, to obsolesce older disk files.

2
dlls/nodes_compat.h

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#pragma once
#ifndef NODES_32BIT_COMPAT
#if !defined(NODES_32BIT_COMPAT)
#define NODES_32BIT_COMPAT
//#include "nodes.h"

2
dlls/plane.h

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
//=========================================================
// Plane
//=========================================================
#ifndef PLANE_H
#if !defined(PLANE_H)
#define PLANE_H
class CPlane

2
dlls/player.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef PLAYER_H
#if !defined(PLAYER_H)
#define PLAYER_H
#include "pm_materials.h"

2
dlls/saverestore.h

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
****/
// Implementation in UTIL.CPP
#pragma once
#ifndef SAVERESTORE_H
#if !defined(SAVERESTORE_H)
#define SAVERESTORE_H
class CBaseEntity;

2
dlls/schedule.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// Scheduling
//=========================================================
#pragma once
#ifndef SCHEDULE_H
#if !defined(SCHEDULE_H)
#define SCHEDULE_H
#define TASKSTATUS_NEW 0 // Just started

4
dlls/scripted.cpp

@ -24,11 +24,11 @@ @@ -24,11 +24,11 @@
#include "cbase.h"
#include "monsters.h"
#ifndef ANIMATION_H
#if !defined(ANIMATION_H)
#include "animation.h"
#endif
#ifndef SAVERESTORE_H
#if !defined(SAVERESTORE_H)
#include "saverestore.h"
#endif

4
dlls/scripted.h

@ -13,10 +13,10 @@ @@ -13,10 +13,10 @@
*
****/
#pragma once
#ifndef SCRIPTED_H
#if !defined(SCRIPTED_H)
#define SCRIPTED_H
#ifndef SCRIPTEVENT_H
#if !defined(SCRIPTEVENT_H)
#include "scriptevent.h"
#endif

2
dlls/scriptevent.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef SCRIPTEVENT_H
#if !defined(SCRIPTEVENT_H)
#define SCRIPTEVENT_H
#define SCRIPT_EVENT_DEAD 1000 // character is now dead

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save