mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
Merge branch 'master' into opfor
This commit is contained in:
commit
72e42a4e02
69
.github/workflows/.github.yml
vendored
69
.github/workflows/.github.yml
vendored
@ -14,6 +14,9 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
cc: clang
|
cc: clang
|
||||||
cxx: clang++
|
cxx: clang++
|
||||||
|
- os: windows-2016
|
||||||
|
cc: cl
|
||||||
|
cxx: cl
|
||||||
env:
|
env:
|
||||||
CC: ${{ matrix.cc }}
|
CC: ${{ matrix.cc }}
|
||||||
CXX: ${{ matrix.cxx }}
|
CXX: ${{ matrix.cxx }}
|
||||||
@ -21,27 +24,39 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Get SDL2 headers
|
- name: Checkout steam-runtime
|
||||||
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: libsdl-org/SDL
|
repository: ValveSoftware/steam-runtime
|
||||||
ref: release-2.0.9
|
path: steam-runtime
|
||||||
path: SDL2
|
- name: Cache steam-runtime
|
||||||
- name: Link SDL2 headers into system path
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
id: cache-steam-runtime
|
||||||
sudo ln -s "$GITHUB_WORKSPACE/SDL2/include" /usr/local/include/SDL2
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
- name: Install dependencies
|
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')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
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
|
- name: Build with xash3d-fwgs input
|
||||||
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
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
|
- name: Build with goldsource input
|
||||||
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
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
|
- name: Build with mingw
|
||||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc')
|
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc')
|
||||||
@ -50,3 +65,33 @@ jobs:
|
|||||||
cmake -B build-mingw -S . -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
|
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
|
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 }}
|
||||||
|
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -23,4 +23,6 @@ waf-*
|
|||||||
waf3-*
|
waf3-*
|
||||||
.lock*
|
.lock*
|
||||||
*.pyc
|
*.pyc
|
||||||
.vscode/
|
.vscode/
|
||||||
|
.vs/
|
||||||
|
CMakeSettings.json
|
@ -20,7 +20,7 @@
|
|||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6.0)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
|
|
||||||
# Install custom module path
|
# Install custom module path
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
||||||
@ -93,6 +93,8 @@ endif()
|
|||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
#add_compile_options(-Wempty-body) # GCC/Clang flag
|
#add_compile_options(-Wempty-body) # GCC/Clang flag
|
||||||
add_compile_options(-Wreturn-type) # GCC/Clang flag
|
add_compile_options(-Wreturn-type) # GCC/Clang flag
|
||||||
|
else()
|
||||||
|
add_definitions(-D_CRT_SILENCE_NONCONFORMING_TGMATH_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
15
appveyor.yml
15
appveyor.yml
@ -1,13 +1,7 @@
|
|||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- os: Visual Studio 2013
|
|
||||||
GENERATOR_NAME: "Visual Studio 12 2013"
|
|
||||||
- os: Visual Studio 2015
|
- os: Visual Studio 2015
|
||||||
GENERATOR_NAME: "Visual Studio 14 2015"
|
GENERATOR_NAME: "Visual Studio 14 2015"
|
||||||
# TODO: Uncomment when AppVeyor will provide XP toolchain for VS2017
|
# TODO: Uncomment when AppVeyor will provide XP toolchain for VS2017
|
||||||
@ -17,7 +11,7 @@ environment:
|
|||||||
clone_folder: c:\projects\xash\hlsdk-xash3d
|
clone_folder: c:\projects\xash\hlsdk-xash3d
|
||||||
|
|
||||||
build:
|
build:
|
||||||
project: INSTALL.vcxproj
|
project: build/INSTALL.vcxproj
|
||||||
verbosity: normal
|
verbosity: normal
|
||||||
|
|
||||||
configuration:
|
configuration:
|
||||||
@ -25,4 +19,9 @@ configuration:
|
|||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- git submodule update --init --recursive
|
- 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
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6.0)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
project (CLDLL)
|
project (CLDLL)
|
||||||
|
|
||||||
set (CLDLL_LIBRARY client)
|
set (CLDLL_LIBRARY client)
|
||||||
|
@ -66,7 +66,7 @@ int CHudMOTD::Draw( float fTime )
|
|||||||
if( !m_bShow )
|
if( !m_bShow )
|
||||||
return 1;
|
return 1;
|
||||||
gHUD.m_iNoConsolePrint |= 1 << 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
|
// 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
|
int ypos = ( ScreenHeight - LINE_HEIGHT * m_iLines ) / 2; // shift it up slightly
|
||||||
char *ch = m_szMOTD;
|
char *ch = m_szMOTD;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef __AMMO_H__
|
#if !defined(__AMMO_H__)
|
||||||
#define __AMMO_H__
|
#define __AMMO_H__
|
||||||
|
|
||||||
#define MAX_WEAPON_NAME 128
|
#define MAX_WEAPON_NAME 128
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// ammohistory.h
|
// ammohistory.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef AMMOHISTORY_H
|
#if !defined(AMMOHISTORY_H)
|
||||||
#define AMMOHISTORY_H
|
#define AMMOHISTORY_H
|
||||||
|
|
||||||
// this is the max number of items in each bucket
|
// this is the max number of items in each bucket
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// Camera.h -- defines and such for a 3rd person camera
|
// Camera.h -- defines and such for a 3rd person camera
|
||||||
// NOTE: must include quakedef.h first
|
// NOTE: must include quakedef.h first
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef _CAMERA_H_
|
#if !defined(_CAMERA_H_)
|
||||||
#define _CAMERA_H_
|
#define _CAMERA_H_
|
||||||
|
|
||||||
// pitch, yaw, dist
|
// pitch, yaw, dist
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
#include "netadr.h"
|
#include "netadr.h"
|
||||||
#include "parsemsg.h"
|
#include "parsemsg.h"
|
||||||
|
|
||||||
#if defined(GOLDSOURCE_SUPPORT) && (defined(_WIN32) || defined(__linux__) || defined(__APPLE__)) && (defined(__i386) || defined(_M_IX86))
|
#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
|
||||||
#define USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
#define USE_VGUI_FOR_GOLDSOURCE_SUPPORT 1
|
||||||
#include "VGUI_Panel.h"
|
#include "VGUI_Panel.h"
|
||||||
#include "VGUI_App.h"
|
#include "VGUI_App.h"
|
||||||
#endif
|
#endif
|
||||||
@ -183,7 +183,7 @@ int *HUD_GetRect( void )
|
|||||||
return extent;
|
return extent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
||||||
class TeamFortressViewport : public vgui::Panel
|
class TeamFortressViewport : public vgui::Panel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -238,7 +238,7 @@ so the HUD can reinitialize itself.
|
|||||||
int DLLEXPORT HUD_VidInit( void )
|
int DLLEXPORT HUD_VidInit( void )
|
||||||
{
|
{
|
||||||
gHUD.VidInit();
|
gHUD.VidInit();
|
||||||
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
||||||
vgui::Panel* root=(vgui::Panel*)gEngfuncs.VGui_GetPanel();
|
vgui::Panel* root=(vgui::Panel*)gEngfuncs.VGui_GetPanel();
|
||||||
if (root) {
|
if (root) {
|
||||||
gEngfuncs.Con_Printf( "Root VGUI panel exists\n" );
|
gEngfuncs.Con_Printf( "Root VGUI panel exists\n" );
|
||||||
@ -337,7 +337,7 @@ Called by engine every frame that client .dll is loaded
|
|||||||
|
|
||||||
void DLLEXPORT HUD_Frame( double time )
|
void DLLEXPORT HUD_Frame( double time )
|
||||||
{
|
{
|
||||||
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
|
||||||
if (!gViewPort)
|
if (!gViewPort)
|
||||||
gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect());
|
gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect());
|
||||||
#else
|
#else
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
// - Handling the custum HUD-update packets
|
// - Handling the custum HUD-update packets
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CL_DLL_H
|
#if !defined(CL_DLL_H)
|
||||||
#define CL_DLL_H
|
#define CL_DLL_H
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef unsigned short word;
|
typedef unsigned short word;
|
||||||
@ -39,7 +39,7 @@ typedef float vec_t;
|
|||||||
#include "../engine/cdll_int.h"
|
#include "../engine/cdll_int.h"
|
||||||
#include "../dlls/cdll_dll.h"
|
#include "../dlls/cdll_dll.h"
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !_WIN32
|
||||||
#define _cdecl
|
#define _cdecl
|
||||||
#endif
|
#endif
|
||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
@ -49,8 +49,8 @@ typedef float vec_t;
|
|||||||
#else
|
#else
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif
|
#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__)
|
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
|
||||||
#define XASH_64BIT
|
#define XASH_64BIT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern cl_enginefunc_t gEngfuncs;
|
extern cl_enginefunc_t gEngfuncs;
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
//
|
//
|
||||||
// cl_util.h
|
// cl_util.h
|
||||||
//
|
//
|
||||||
#ifndef CL_UTIL_H
|
#if !defined(CL_UTIL_H)
|
||||||
#define CL_UTIL_H
|
#define CL_UTIL_H
|
||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
#include "cvardef.h"
|
#include "cvardef.h"
|
||||||
|
|
||||||
#ifndef TRUE
|
#if !defined(TRUE)
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
@ -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 )
|
inline int DrawConsoleString( int x, int y, const char *string )
|
||||||
{
|
{
|
||||||
if( hud_textmode->value == 1 )
|
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 );
|
return gEngfuncs.pfnDrawConsoleString( x, y, (char*) string );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,8 +224,8 @@ void DLLEXPORT HUD_TxferPredictionData( struct entity_state_s *ps, const struct
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//#define TEST_IT
|
//#define TEST_IT 1
|
||||||
#if defined( TEST_IT )
|
#if TEST_IT
|
||||||
|
|
||||||
cl_entity_t mymodel[9];
|
cl_entity_t mymodel[9];
|
||||||
|
|
||||||
@ -267,8 +267,8 @@ void MoveModel( void )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define TRACE_TEST
|
//#define TRACE_TEST 1
|
||||||
#if defined( TRACE_TEST )
|
#if TRACE_TEST
|
||||||
|
|
||||||
extern int hitent;
|
extern int hitent;
|
||||||
|
|
||||||
@ -424,7 +424,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
|
// Note can't index beam[0] in Beam callback, so don't use that index
|
||||||
// Room for 1 beam ( 0 can't be used )
|
// Room for 1 beam ( 0 can't be used )
|
||||||
static cl_entity_t beams[2];
|
static cl_entity_t beams[2];
|
||||||
@ -508,10 +508,10 @@ void DLLEXPORT HUD_CreateEntities( void )
|
|||||||
// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )
|
// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )
|
||||||
// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list
|
// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list
|
||||||
/*
|
/*
|
||||||
#if defined( TEST_IT )
|
#if TEST_IT
|
||||||
MoveModel();
|
MoveModel();
|
||||||
#endif
|
#endif
|
||||||
#if defined( TRACE_TEST )
|
#if TRACE_TEST
|
||||||
TraceModel();
|
TraceModel();
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
@ -521,7 +521,7 @@ void DLLEXPORT HUD_CreateEntities( void )
|
|||||||
/*
|
/*
|
||||||
TempEnts();
|
TempEnts();
|
||||||
*/
|
*/
|
||||||
#if defined( BEAM_TEST )
|
#if BEAM_TEST
|
||||||
Beams();
|
Beams();
|
||||||
#endif
|
#endif
|
||||||
// Add in any game specific objects
|
// Add in any game specific objects
|
||||||
@ -940,7 +940,7 @@ Indices must start at 1, not zero.
|
|||||||
*/
|
*/
|
||||||
cl_entity_t DLLEXPORT *HUD_GetUserEntity( int index )
|
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
|
// None by default, you would return a valic pointer if you create a client side
|
||||||
// beam and attach it to a client side entity.
|
// beam and attach it to a client side entity.
|
||||||
if( index > 0 && index <= 1 )
|
if( index > 0 && index <= 1 )
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef HEALTH_H
|
#if !defined(HEALTH_H)
|
||||||
#define HEALTH_H
|
#define HEALTH_H
|
||||||
|
|
||||||
#define DMG_IMAGE_LIFE 2 // seconds that image is up
|
#define DMG_IMAGE_LIFE 2 // seconds that image is up
|
||||||
|
@ -1146,7 +1146,7 @@ void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s
|
|||||||
{
|
{
|
||||||
g_runfuncs = runfuncs;
|
g_runfuncs = runfuncs;
|
||||||
|
|
||||||
#if defined( CLIENT_WEAPONS )
|
#if CLIENT_WEAPONS
|
||||||
if( cl_lw && cl_lw->value )
|
if( cl_lw && cl_lw->value )
|
||||||
{
|
{
|
||||||
HUD_WeaponsPostThink( from, to, cmd, time, random_seed );
|
HUD_WeaponsPostThink( from, to, cmd, time, random_seed );
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
// CHud handles the message, calculation, and drawing the HUD
|
// CHud handles the message, calculation, and drawing the HUD
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef HUD_H
|
#if !defined(HUD_H)
|
||||||
#define HUD_H
|
#define HUD_H
|
||||||
#define RGB_YELLOWISH 0x0000A000 //0,160,0
|
#define RGB_YELLOWISH 0x0000A000 //0,160,0
|
||||||
#define RGB_REDISH 0x00FF1010 //255,160,0
|
#define RGB_REDISH 0x00FF1010 //255,160,0
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef HUD_SPECTATOR_H
|
#if !defined(HUD_SPECTATOR_H)
|
||||||
#define HUD_SPECTATOR_H
|
#define HUD_SPECTATOR_H
|
||||||
|
|
||||||
#include "cl_entity.h"
|
#include "cl_entity.h"
|
||||||
|
@ -459,7 +459,7 @@ void CAM_OutUp( void )
|
|||||||
void CAM_ToThirdPerson( void )
|
void CAM_ToThirdPerson( void )
|
||||||
{
|
{
|
||||||
vec3_t viewangles;
|
vec3_t viewangles;
|
||||||
#if !defined( _DEBUG )
|
#if !_DEBUG
|
||||||
if( gEngfuncs.GetMaxClients() > 1 )
|
if( gEngfuncs.GetMaxClients() > 1 )
|
||||||
{
|
{
|
||||||
// no thirdperson in multiplayer.
|
// no thirdperson in multiplayer.
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "input_mouse.h"
|
#include "input_mouse.h"
|
||||||
|
|
||||||
#ifdef SUPPORT_GOLDSOURCE_INPUT
|
#if SUPPORT_GOLDSOURCE_INPUT
|
||||||
|
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
#include "cl_util.h"
|
#include "cl_util.h"
|
||||||
@ -24,10 +24,10 @@
|
|||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
#if !_WIN32
|
#if !_WIN32
|
||||||
#define USE_SDL2
|
#define USE_SDL2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
#define ARRAYSIZE(p) ( sizeof(p) /sizeof(p[0]) )
|
#define ARRAYSIZE(p) ( sizeof(p) /sizeof(p[0]) )
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <SDL2/SDL_mouse.h>
|
#include <SDL2/SDL_mouse.h>
|
||||||
@ -218,7 +218,7 @@ enum _ControlList
|
|||||||
AxisTurn
|
AxisTurn
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(USE_SDL2) && defined(_WIN32)
|
#if !USE_SDL2 && _WIN32
|
||||||
DWORD dwAxisFlags[JOY_MAX_AXES] =
|
DWORD dwAxisFlags[JOY_MAX_AXES] =
|
||||||
{
|
{
|
||||||
JOY_RETURNX,
|
JOY_RETURNX,
|
||||||
@ -232,9 +232,9 @@ DWORD dwAxisFlags[JOY_MAX_AXES] =
|
|||||||
|
|
||||||
DWORD dwAxisMap[ JOY_MAX_AXES ];
|
DWORD dwAxisMap[ JOY_MAX_AXES ];
|
||||||
DWORD dwControlMap[ JOY_MAX_AXES ];
|
DWORD dwControlMap[ JOY_MAX_AXES ];
|
||||||
#if defined(USE_SDL2)
|
#if USE_SDL2
|
||||||
int pdwRawValue[ JOY_MAX_AXES ];
|
int pdwRawValue[ JOY_MAX_AXES ];
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
PDWORD pdwRawValue[ JOY_MAX_AXES ];
|
PDWORD pdwRawValue[ JOY_MAX_AXES ];
|
||||||
#endif
|
#endif
|
||||||
DWORD joy_oldbuttonstate, joy_oldpovstate;
|
DWORD joy_oldbuttonstate, joy_oldpovstate;
|
||||||
@ -242,9 +242,9 @@ DWORD joy_oldbuttonstate, joy_oldpovstate;
|
|||||||
int joy_id;
|
int joy_id;
|
||||||
DWORD joy_numbuttons;
|
DWORD joy_numbuttons;
|
||||||
|
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
SDL_GameController *s_pJoystick = NULL;
|
SDL_GameController *s_pJoystick = NULL;
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
DWORD joy_flags;
|
DWORD joy_flags;
|
||||||
static JOYINFOEX ji;
|
static JOYINFOEX ji;
|
||||||
#endif
|
#endif
|
||||||
@ -566,7 +566,7 @@ void GoldSourceInput::IN_Shutdown (void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
for (int j=0; j<ARRAYSIZE(sdlFunctions); ++j) {
|
for (int j=0; j<ARRAYSIZE(sdlFunctions); ++j) {
|
||||||
*(sdlFunctions[j].ppfnFunc) = NULL;
|
*(sdlFunctions[j].ppfnFunc) = NULL;
|
||||||
}
|
}
|
||||||
@ -735,7 +735,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
|
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
|
||||||
current_pos.x = deltaX;
|
current_pos.x = deltaX;
|
||||||
current_pos.y = deltaY;
|
current_pos.y = deltaY;
|
||||||
@ -904,8 +904,8 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd)
|
|||||||
|
|
||||||
dead_viewangles = viewangles; // keep them actual
|
dead_viewangles = viewangles; // keep them actual
|
||||||
/*
|
/*
|
||||||
//#define TRACE_TEST
|
//#define TRACE_TEST 1
|
||||||
#if defined( TRACE_TEST )
|
#if TRACE_TEST
|
||||||
{
|
{
|
||||||
int mx, my;
|
int mx, my;
|
||||||
void V_Move( int mx, int my );
|
void V_Move( int mx, int my );
|
||||||
@ -942,7 +942,7 @@ void GoldSourceInput::IN_Accumulate (void)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
int deltaX, deltaY;
|
int deltaX, deltaY;
|
||||||
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
|
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
|
||||||
mx_accum += deltaX;
|
mx_accum += deltaX;
|
||||||
@ -997,7 +997,7 @@ void IN_StartupJoystick (void)
|
|||||||
|
|
||||||
// assume no joystick
|
// assume no joystick
|
||||||
joy_avail = 0;
|
joy_avail = 0;
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
int nJoysticks = safe_pfnSDL_NumJoysticks();
|
int nJoysticks = safe_pfnSDL_NumJoysticks();
|
||||||
if ( nJoysticks > 0 )
|
if ( nJoysticks > 0 )
|
||||||
{
|
{
|
||||||
@ -1029,7 +1029,7 @@ void IN_StartupJoystick (void)
|
|||||||
{
|
{
|
||||||
gEngfuncs.Con_DPrintf ("joystick not found -- driver not present\n\n");
|
gEngfuncs.Con_DPrintf ("joystick not found -- driver not present\n\n");
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
int numdevs;
|
int numdevs;
|
||||||
JOYCAPS jc;
|
JOYCAPS jc;
|
||||||
MMRESULT mmr;
|
MMRESULT mmr;
|
||||||
@ -1084,7 +1084,7 @@ void IN_StartupJoystick (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
int RawValuePointer (int axis)
|
int RawValuePointer (int axis)
|
||||||
{
|
{
|
||||||
switch (axis)
|
switch (axis)
|
||||||
@ -1101,7 +1101,7 @@ int RawValuePointer (int axis)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
PDWORD RawValuePointer (int axis)
|
PDWORD RawValuePointer (int axis)
|
||||||
{
|
{
|
||||||
switch (axis)
|
switch (axis)
|
||||||
@ -1184,7 +1184,7 @@ void Joy_AdvancedUpdate_f (void)
|
|||||||
dwControlMap[JOY_AXIS_V] = dwTemp & JOY_RELATIVE_AXIS;
|
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
|
// compute the axes to collect from DirectInput
|
||||||
joy_flags = JOY_RETURNCENTERED | JOY_RETURNBUTTONS | JOY_RETURNPOV;
|
joy_flags = JOY_RETURNCENTERED | JOY_RETURNBUTTONS | JOY_RETURNPOV;
|
||||||
for (i = 0; i < JOY_MAX_AXES; i++)
|
for (i = 0; i < JOY_MAX_AXES; i++)
|
||||||
@ -1216,7 +1216,7 @@ void GoldSourceInput::IN_Commands (void)
|
|||||||
|
|
||||||
// loop through the joystick buttons
|
// loop through the joystick buttons
|
||||||
// key a joystick event or auxillary event for higher number buttons for each state change
|
// key a joystick event or auxillary event for higher number buttons for each state change
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
buttonstate = 0;
|
buttonstate = 0;
|
||||||
for ( i = 0; i < SDL_CONTROLLER_BUTTON_MAX; i++ )
|
for ( i = 0; i < SDL_CONTROLLER_BUTTON_MAX; i++ )
|
||||||
{
|
{
|
||||||
@ -1230,7 +1230,7 @@ void GoldSourceInput::IN_Commands (void)
|
|||||||
{
|
{
|
||||||
pdwRawValue[i] = RawValuePointer(i);
|
pdwRawValue[i] = RawValuePointer(i);
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
buttonstate = ji.dwButtons;
|
buttonstate = ji.dwButtons;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1256,7 +1256,7 @@ void GoldSourceInput::IN_Commands (void)
|
|||||||
// this avoids any potential problems related to moving from one
|
// this avoids any potential problems related to moving from one
|
||||||
// direction to another without going through the center position
|
// direction to another without going through the center position
|
||||||
povstate = 0;
|
povstate = 0;
|
||||||
#if !defined(USE_SDL2) && defined(_WIN32)
|
#if !USE_SDL2 && _WIN32
|
||||||
if(ji.dwPOV != JOY_POVCENTERED)
|
if(ji.dwPOV != JOY_POVCENTERED)
|
||||||
{
|
{
|
||||||
if (ji.dwPOV == JOY_POVFORWARD)
|
if (ji.dwPOV == JOY_POVFORWARD)
|
||||||
@ -1294,10 +1294,10 @@ IN_ReadJoystick
|
|||||||
*/
|
*/
|
||||||
int IN_ReadJoystick (void)
|
int IN_ReadJoystick (void)
|
||||||
{
|
{
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
safe_pfnSDL_JoystickUpdate();
|
safe_pfnSDL_JoystickUpdate();
|
||||||
return 1;
|
return 1;
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
memset (&ji, 0, sizeof(ji));
|
memset (&ji, 0, sizeof(ji));
|
||||||
ji.dwSize = sizeof(ji);
|
ji.dwSize = sizeof(ji);
|
||||||
ji.dwFlags = joy_flags;
|
ji.dwFlags = joy_flags;
|
||||||
@ -1374,9 +1374,9 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
|
|||||||
for (i = 0; i < JOY_MAX_AXES; i++)
|
for (i = 0; i < JOY_MAX_AXES; i++)
|
||||||
{
|
{
|
||||||
// get the floating point zero-centered, potentially-inverted data for the current axis
|
// get the floating point zero-centered, potentially-inverted data for the current axis
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
fAxisValue = (float)pdwRawValue[i];
|
fAxisValue = (float)pdwRawValue[i];
|
||||||
#elif defined(_WIN32)
|
#elif _WIN32
|
||||||
fAxisValue = (float) *pdwRawValue[i];
|
fAxisValue = (float) *pdwRawValue[i];
|
||||||
fAxisValue -= 32768.0;
|
fAxisValue -= 32768.0;
|
||||||
#endif
|
#endif
|
||||||
@ -1600,7 +1600,7 @@ void GoldSourceInput::IN_Init (void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SDL2
|
#if USE_SDL2
|
||||||
#if __APPLE__
|
#if __APPLE__
|
||||||
#define SDL2_FULL_LIBNAME "libsdl2-2.0.0.dylib"
|
#define SDL2_FULL_LIBNAME "libsdl2-2.0.0.dylib"
|
||||||
#else
|
#else
|
||||||
|
@ -10,7 +10,7 @@ cvar_t *in_joystick;
|
|||||||
|
|
||||||
FWGSInput fwgsInput;
|
FWGSInput fwgsInput;
|
||||||
|
|
||||||
#ifdef SUPPORT_GOLDSOURCE_INPUT
|
#if SUPPORT_GOLDSOURCE_INPUT
|
||||||
GoldSourceInput goldSourceInput;
|
GoldSourceInput goldSourceInput;
|
||||||
AbstractInput* currentInput = &goldSourceInput;
|
AbstractInput* currentInput = &goldSourceInput;
|
||||||
#else
|
#else
|
||||||
@ -68,7 +68,7 @@ void IN_Shutdown( void )
|
|||||||
|
|
||||||
void IN_Init( void )
|
void IN_Init( void )
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_GOLDSOURCE_INPUT
|
#if SUPPORT_GOLDSOURCE_INPUT
|
||||||
if (IsXashFWGS()) {
|
if (IsXashFWGS()) {
|
||||||
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
|
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
|
||||||
currentInput = &fwgsInput;
|
currentInput = &fwgsInput;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifndef INPUT_MOUSE_H
|
#if !defined(INPUT_MOUSE_H)
|
||||||
#define INPUT_MOUSE_H
|
#define INPUT_MOUSE_H
|
||||||
#include "cl_dll.h"
|
#include "cl_dll.h"
|
||||||
#include "usercmd.h"
|
#include "usercmd.h"
|
||||||
@ -45,8 +45,8 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// No need for goldsource input support on the platforms that are not supported by GoldSource.
|
// 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))
|
#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
|
||||||
#define SUPPORT_GOLDSOURCE_INPUT
|
#define SUPPORT_GOLDSOURCE_INPUT 1
|
||||||
class GoldSourceInput : public AbstractInput
|
class GoldSourceInput : public AbstractInput
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
//
|
//
|
||||||
// $NoKeywords: $
|
// $NoKeywords: $
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef OVERVIEW_H
|
#if !defined(OVERVIEW_H)
|
||||||
#define OVERVIEW_H
|
#define OVERVIEW_H
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// parsemsg.h
|
// parsemsg.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef PARSEMSG_H
|
#if !defined(PARSEMSG_H)
|
||||||
#define PARSEMSG_H
|
#define PARSEMSG_H
|
||||||
|
|
||||||
#define ASSERT( x )
|
#define ASSERT( x )
|
||||||
|
@ -4,20 +4,19 @@
|
|||||||
//
|
//
|
||||||
// $NoKeywords: $
|
// $NoKeywords: $
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#if !defined( STUDIO_UTIL_H )
|
#if !defined(STUDIO_UTIL_H)
|
||||||
#define 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
|
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI_F
|
#if !defined(M_PI_F)
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PITCH
|
#if !defined(PITCH)
|
||||||
// MOVEMENT INFO
|
// MOVEMENT INFO
|
||||||
// up / down
|
// up / down
|
||||||
#define PITCH 0
|
#define PITCH 0
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
|
#if !defined(__TF_DEFS_H)
|
||||||
#ifndef __TF_DEFS_H
|
|
||||||
#define __TF_DEFS_H
|
#define __TF_DEFS_H
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@ -1155,7 +1154,7 @@ float already_chosen_map;
|
|||||||
#define TS_PRINT_LONG 2
|
#define TS_PRINT_LONG 2
|
||||||
#define TS_PRINT_LONG_TO_ALL 3
|
#define TS_PRINT_LONG_TO_ALL 3
|
||||||
|
|
||||||
#ifndef TF_DEFS_ONLY
|
#if !defined(TF_DEFS_ONLY)
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,8 @@ extern "C"
|
|||||||
void DLLEXPORT HUD_DrawTransparentTriangles( void );
|
void DLLEXPORT HUD_DrawTransparentTriangles( void );
|
||||||
}
|
}
|
||||||
|
|
||||||
//#define TEST_IT
|
//#define TEST_IT 1
|
||||||
#if defined( TEST_IT )
|
#if TEST_IT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
@ -98,7 +98,7 @@ Non-transparent triangles-- add them here
|
|||||||
void DLLEXPORT HUD_DrawNormalTriangles( void )
|
void DLLEXPORT HUD_DrawNormalTriangles( void )
|
||||||
{
|
{
|
||||||
gHUD.m_Spectator.DrawOverview();
|
gHUD.m_Spectator.DrawOverview();
|
||||||
#if defined( TEST_IT )
|
#if TEST_IT
|
||||||
// Draw_Triangles();
|
// Draw_Triangles();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ Render any triangles with transparent rendermode needs here
|
|||||||
*/
|
*/
|
||||||
void DLLEXPORT HUD_DrawTransparentTriangles( void )
|
void DLLEXPORT HUD_DrawTransparentTriangles( void )
|
||||||
{
|
{
|
||||||
#if defined( TEST_IT )
|
#if TEST_IT
|
||||||
// Draw_Triangles();
|
// Draw_Triangles();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -26,17 +26,17 @@
|
|||||||
#include "cl_util.h"
|
#include "cl_util.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef M_PI
|
#if !defined(M_PI)
|
||||||
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI_F
|
#if !defined(M_PI_F)
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
#endif
|
#endif
|
||||||
extern vec3_t vec3_origin;
|
extern vec3_t vec3_origin;
|
||||||
|
|
||||||
// if C++ mangling differs from C symbol name
|
// if C++ mangling differs from C symbol name
|
||||||
#if defined _MSC_VER || defined __WATCOMC__
|
#if _MSC_VER || __WATCOMC__
|
||||||
vec3_t vec3_origin;
|
vec3_t vec3_origin;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// A subset of the extdll.h in the project HL Entity DLL
|
// A subset of the extdll.h in the project HL Entity DLL
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef UTIL_VECTOR_H
|
#if !defined(UTIL_VECTOR_H)
|
||||||
#define UTIL_VECTOR_H
|
#define UTIL_VECTOR_H
|
||||||
|
|
||||||
// Misc C-runtime library headers
|
// Misc C-runtime library headers
|
||||||
|
@ -36,11 +36,11 @@ extern "C"
|
|||||||
int iIsSpectator;
|
int iIsSpectator;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef M_PI
|
#if !defined(M_PI)
|
||||||
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI_F
|
#if !defined(M_PI_F)
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1554,8 +1554,8 @@ void DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams )
|
|||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// Example of how to overlay the whole screen with red at 50 % alpha
|
// Example of how to overlay the whole screen with red at 50 % alpha
|
||||||
#define SF_TEST
|
#define SF_TEST 1
|
||||||
#if defined SF_TEST
|
#if SF_TEST
|
||||||
{
|
{
|
||||||
screenfade_t sf;
|
screenfade_t sf;
|
||||||
gEngfuncs.pfnGetScreenFade( &sf );
|
gEngfuncs.pfnGetScreenFade( &sf );
|
||||||
@ -1621,8 +1621,8 @@ void V_Init( void )
|
|||||||
cl_chasedist = gEngfuncs.pfnRegisterVariable( "cl_chasedist","112", 0 );
|
cl_chasedist = gEngfuncs.pfnRegisterVariable( "cl_chasedist","112", 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//#define TRACE_TEST
|
//#define TRACE_TEST 1
|
||||||
#if defined( TRACE_TEST )
|
#if TRACE_TEST
|
||||||
|
|
||||||
extern float in_fov;
|
extern float in_fov;
|
||||||
/*
|
/*
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef BEAMDEF_H
|
#if !defined(BEAMDEF_H)
|
||||||
#define BEAMDEF_H
|
#define BEAMDEF_H
|
||||||
|
|
||||||
#define FBEAM_STARTENTITY 0x00000001
|
#define FBEAM_STARTENTITY 0x00000001
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CL_ENTITY_H
|
#if !defined(CL_ENTITY_H)
|
||||||
#define CL_ENTITY_H
|
#define CL_ENTITY_H
|
||||||
|
|
||||||
typedef struct efrag_s
|
typedef struct efrag_s
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
//
|
//
|
||||||
// $NoKeywords: $
|
// $NoKeywords: $
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
// com_model.h
|
// com_model.h
|
||||||
#pragma once
|
#pragma once
|
||||||
#if !defined( COM_MODEL_H )
|
#if !defined( COM_MODEL_H )
|
||||||
@ -45,7 +44,7 @@ typedef enum
|
|||||||
} modtype_t;
|
} modtype_t;
|
||||||
|
|
||||||
// must match definition in modelgen.h
|
// must match definition in modelgen.h
|
||||||
#ifndef SYNCTYPE_T
|
#if !defined(SYNCTYPE_T)
|
||||||
#define SYNCTYPE_T
|
#define SYNCTYPE_T
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CON_NPRINT_H
|
#if !defined(CON_NPRINT_H)
|
||||||
#define CON_NPRINT_H
|
#define CON_NPRINT_H
|
||||||
|
|
||||||
typedef struct con_nprint_s
|
typedef struct con_nprint_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CONST_H
|
#if !defined(CONST_H)
|
||||||
#define CONST_H
|
#define CONST_H
|
||||||
//
|
//
|
||||||
// Constants shared by the engine and dlls
|
// Constants shared by the engine and dlls
|
||||||
@ -742,7 +742,7 @@ typedef unsigned short word;
|
|||||||
#undef true
|
#undef true
|
||||||
#undef false
|
#undef false
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#if !__cplusplus
|
||||||
typedef enum { false, true } qboolean;
|
typedef enum { false, true } qboolean;
|
||||||
#else
|
#else
|
||||||
typedef int qboolean;
|
typedef int qboolean;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CVARDEF_H
|
#if !defined(CVARDEF_H)
|
||||||
#define CVARDEF_H
|
#define CVARDEF_H
|
||||||
|
|
||||||
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc
|
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DEMO_API_H
|
#if !defined(DEMO_API_H)
|
||||||
#define DEMO_API_H
|
#define DEMO_API_H
|
||||||
|
|
||||||
typedef struct demo_api_s
|
typedef struct demo_api_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DLIGHT_H
|
#if !defined(DLIGHT_H)
|
||||||
#define DLIGHT_H
|
#define DLIGHT_H
|
||||||
|
|
||||||
typedef struct dlight_s
|
typedef struct dlight_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef ENTITY_STATE_H
|
#if !defined(ENTITY_STATE_H)
|
||||||
#define ENTITY_STATE_H
|
#define ENTITY_STATE_H
|
||||||
|
|
||||||
// For entityType below
|
// For entityType below
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef ENTITY_TYPES_H
|
#if !defined(ENTITY_TYPES_H)
|
||||||
#define ENTITY_TYPES_H
|
#define ENTITY_TYPES_H
|
||||||
|
|
||||||
#define ET_NORMAL 0
|
#define ET_NORMAL 0
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EVENT_API_H
|
#if !defined(EVENT_API_H)
|
||||||
#define EVENT_API_H
|
#define EVENT_API_H
|
||||||
|
|
||||||
#define EVENT_API_VERSION 1
|
#define EVENT_API_VERSION 1
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EVENT_ARGS_H
|
#if !defined(EVENT_ARGS_H)
|
||||||
#define EVENT_ARGS_H
|
#define EVENT_ARGS_H
|
||||||
|
|
||||||
// Event was invoked with stated origin
|
// Event was invoked with stated origin
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EVENT_FLAGS_H
|
#if !defined(EVENT_FLAGS_H)
|
||||||
#define EVENT_FLAGS_H
|
#define EVENT_FLAGS_H
|
||||||
|
|
||||||
// Skip local host for event send.
|
// Skip local host for event send.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef HLTV_H
|
#if !defined(HLTV_H)
|
||||||
#define HLTV_H
|
#define HLTV_H
|
||||||
|
|
||||||
#define TYPE_CLIENT 0 // client is a normal HL client (default)
|
#define TYPE_CLIENT 0 // client is a normal HL client (default)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef IVOICETWEAK_H
|
#if !defined(IVOICETWEAK_H)
|
||||||
#define IVOICETWEAK_H
|
#define IVOICETWEAK_H
|
||||||
|
|
||||||
// These provide access to the voice controls.
|
// These provide access to the voice controls.
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
****/
|
****/
|
||||||
// mathlib.h
|
// mathlib.h
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef MATHLIB_H
|
#if !defined(MATHLIB_H)
|
||||||
#define MATHLIB_H
|
#define MATHLIB_H
|
||||||
#ifndef __cplusplus
|
#if !__cplusplus
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#ifdef HAVE_TGMATH_H
|
#if HAVE_TGMATH_H
|
||||||
#include <tgmath.h>
|
#include <tgmath.h>
|
||||||
#endif // HAVE_TGMATH_H
|
#endif // HAVE_TGMATH_H
|
||||||
#else // __cplusplus
|
#else // __cplusplus
|
||||||
@ -31,17 +31,17 @@
|
|||||||
|
|
||||||
typedef float vec_t;
|
typedef float vec_t;
|
||||||
|
|
||||||
#if !defined DID_VEC3_T_DEFINE
|
#if !defined(DID_VEC3_T_DEFINE)
|
||||||
#define DID_VEC3_T_DEFINE
|
#define DID_VEC3_T_DEFINE
|
||||||
typedef vec_t vec3_t[3];
|
typedef vec_t vec3_t[3];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef M_PI
|
#if !defined(M_PI)
|
||||||
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI_F
|
#if !defined(M_PI_F)
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ extern int nanmask;
|
|||||||
|
|
||||||
#define IS_NAN(x) (((*(int *)&x)&nanmask)==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])
|
#define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef NET_API_H
|
#if !defined(NET_API_H)
|
||||||
#define NET_API_H
|
#define NET_API_H
|
||||||
|
|
||||||
#include "netadr.h"
|
#include "netadr.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef NETADR_H
|
#if !defined(NETADR_H)
|
||||||
#define NETADR_H
|
#define NETADR_H
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef PARTICLEDEF_H
|
#if !defined(PARTICLEDEF_H)
|
||||||
#define PARTICLEDEF_H
|
#define PARTICLEDEF_H
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef PM_TRACE_H
|
#if !defined(PM_TRACE_H)
|
||||||
#define PM_TRACE_H
|
#define PM_TRACE_H
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef QFONT_H
|
#if !defined(QFONT_H)
|
||||||
#define QFONT_H
|
#define QFONT_H
|
||||||
|
|
||||||
// Font stuff
|
// Font stuff
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef R_EFX_H
|
#if !defined(R_EFX_H)
|
||||||
#define R_EFX_H
|
#define R_EFX_H
|
||||||
|
|
||||||
// particle_t
|
// particle_t
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef R_STUDIOINT_H
|
#if !defined(R_STUDIOINT_H)
|
||||||
#define R_STUDIOINT_H
|
#define R_STUDIOINT_H
|
||||||
|
|
||||||
#define STUDIO_INTERFACE_VERSION 1
|
#define STUDIO_INTERFACE_VERSION 1
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef REF_PARAMS_H
|
#if !defined(REF_PARAMS_H)
|
||||||
#define REF_PARAMS_H
|
#define REF_PARAMS_H
|
||||||
|
|
||||||
typedef struct ref_params_s
|
typedef struct ref_params_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef SCREENFADE_H
|
#if !defined(SCREENFADE_H)
|
||||||
#define SCREENFADE_H
|
#define SCREENFADE_H
|
||||||
|
|
||||||
typedef struct screenfade_s
|
typedef struct screenfade_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef STUDIO_EVENT_H
|
#if !defined(STUDIO_EVENT_H)
|
||||||
#define STUDIO_EVENT_H
|
#define STUDIO_EVENT_H
|
||||||
|
|
||||||
typedef struct mstudioevent_s
|
typedef struct mstudioevent_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef TRIANGLEAPI_H
|
#if !defined(TRIANGLEAPI_H)
|
||||||
#define TRIANGLEAPI_H
|
#define TRIANGLEAPI_H
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef USERCMD_H
|
#if !defined(USERCMD_H)
|
||||||
#define USERCMD_H
|
#define USERCMD_H
|
||||||
|
|
||||||
typedef struct usercmd_s
|
typedef struct usercmd_s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef WADFILE_H
|
#if !defined(WADFILE_H)
|
||||||
#define WADFILE_H
|
#define WADFILE_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef WEAPONINFO_H
|
#if !defined(WEAPONINFO_H)
|
||||||
#define WEAPONINFO_H
|
#define WEAPONINFO_H
|
||||||
|
|
||||||
// Info about weapons player might have in his/her possession
|
// Info about weapons player might have in his/her possession
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6.0)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
project (SVDLL)
|
project (SVDLL)
|
||||||
|
|
||||||
set (SVDLL_LIBRARY server)
|
set (SVDLL_LIBRARY server)
|
||||||
@ -201,6 +201,12 @@ endif()
|
|||||||
|
|
||||||
include_directories (. wpn_shared ../common ../engine ../pm_shared ../game_shared ../public gearbox)
|
include_directories (. wpn_shared ../common ../engine ../pm_shared ../game_shared ../public gearbox)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(SVDLL_SOURCES
|
||||||
|
${SVDLL_SOURCES}
|
||||||
|
hl.def)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(USE_VOICEMGR)
|
if(USE_VOICEMGR)
|
||||||
set(SVDLL_SOURCES
|
set(SVDLL_SOURCES
|
||||||
${SVDLL_SOURCES}
|
${SVDLL_SOURCES}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef ACTIVITY_H
|
#if !defined(ACTIVITY_H)
|
||||||
#define ACTIVITY_H
|
#define ACTIVITY_H
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef ACTIVITYMAP_H
|
#if !defined(ACTIVITYMAP_H)
|
||||||
#define ACTIVITYMAP_H
|
#define ACTIVITYMAP_H
|
||||||
#define _A( a ) { a, #a }
|
#define _A( a ) { a, #a }
|
||||||
|
|
||||||
|
@ -36,21 +36,21 @@ typedef unsigned char byte;
|
|||||||
|
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
|
|
||||||
#ifndef ACTIVITY_H
|
#if !defined(ACTIVITY_H)
|
||||||
#include "activity.h"
|
#include "activity.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "activitymap.h"
|
#include "activitymap.h"
|
||||||
|
|
||||||
#ifndef ANIMATION_H
|
#if !defined(ANIMATION_H)
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SCRIPTEVENT_H
|
#if !defined(SCRIPTEVENT_H)
|
||||||
#include "scriptevent.h"
|
#include "scriptevent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ENGINECALLBACK_H
|
#if !defined(ENGINECALLBACK_H)
|
||||||
#include "enginecallback.h"
|
#include "enginecallback.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef ANIMATION_H
|
#if !defined(ANIMATION_H)
|
||||||
#define ANIMATION_H
|
#define ANIMATION_H
|
||||||
|
|
||||||
#define ACTIVITY_NOT_AVAILABLE -1
|
#define ACTIVITY_NOT_AVAILABLE -1
|
||||||
|
|
||||||
#ifndef MONSTEREVENT_H
|
#if !defined(MONSTEREVENT_H)
|
||||||
#include "monsterevent.h"
|
#include "monsterevent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef BASEMONSTER_H
|
#if !defined(BASEMONSTER_H)
|
||||||
#define BASEMONSTER_H
|
#define BASEMONSTER_H
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CBASE_H
|
#if !defined(CBASE_H)
|
||||||
#define CBASE_H
|
#define CBASE_H
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ CBaseEntity
|
|||||||
#include "saverestore.h"
|
#include "saverestore.h"
|
||||||
#include "schedule.h"
|
#include "schedule.h"
|
||||||
|
|
||||||
#ifndef MONSTEREVENT_H
|
#if !defined(MONSTEREVENT_H)
|
||||||
#include "monsterevent.h"
|
#include "monsterevent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
// this file is included by both the game-dll and the client-dll,
|
// this file is included by both the game-dll and the client-dll,
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CDLL_DLL_H
|
#if !defined(CDLL_DLL_H)
|
||||||
#define CDLL_DLL_H
|
#define CDLL_DLL_H
|
||||||
|
|
||||||
#define MAX_WEAPONS 32 // ???
|
#define MAX_WEAPONS 32 // ???
|
||||||
|
@ -272,7 +272,7 @@ decodeError:
|
|||||||
uValueOut = '?';
|
uValueOut = '?';
|
||||||
bErrorOut = true;
|
bErrorOut = true;
|
||||||
return nBytes;
|
return nBytes;
|
||||||
|
#if 0
|
||||||
decodeFinishedMaybeCESU8:
|
decodeFinishedMaybeCESU8:
|
||||||
// Do we have a full UTF-16 surrogate pair that's been UTF-8 encoded afterwards?
|
// 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.
|
// That is, do we have 0xD800-0xDBFF followed by 0xDC00-0xDFFF? If so, decode it all.
|
||||||
@ -283,6 +283,7 @@ decodeFinishedMaybeCESU8:
|
|||||||
uMinValue = 0x10000;
|
uMinValue = 0x10000;
|
||||||
}
|
}
|
||||||
goto decodeFinished;
|
goto decodeFinished;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -319,7 +320,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||||||
{
|
{
|
||||||
CBasePlayer *client;
|
CBasePlayer *client;
|
||||||
int j;
|
int j;
|
||||||
char *p, *pc;
|
char *p; //, *pc;
|
||||||
char text[128];
|
char text[128];
|
||||||
char szTemp[256];
|
char szTemp[256];
|
||||||
const char *cpSay = "say";
|
const char *cpSay = "say";
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef CLIENT_H
|
#if !defined(CLIENT_H)
|
||||||
#define CLIENT_H
|
#define CLIENT_H
|
||||||
|
|
||||||
extern void respawn( entvars_t *pev, BOOL fCopyCorpse );
|
extern void respawn( entvars_t *pev, BOOL fCopyCorpse );
|
||||||
|
@ -1501,7 +1501,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
|
|||||||
Vector vecRight = gpGlobals->v_right;
|
Vector vecRight = gpGlobals->v_right;
|
||||||
Vector vecUp = gpGlobals->v_up;
|
Vector vecUp = gpGlobals->v_up;
|
||||||
float x = 0.0f, y = 0.0f;
|
float x = 0.0f, y = 0.0f;
|
||||||
float z;
|
//float z;
|
||||||
|
|
||||||
if( pevAttacker == NULL )
|
if( pevAttacker == NULL )
|
||||||
pevAttacker = pev; // the default attacker is ourselves
|
pevAttacker = pev; // the default attacker is ourselves
|
||||||
|
@ -159,7 +159,7 @@ set LIBS=user32.lib
|
|||||||
set OUTNAME=hl.dll
|
set OUTNAME=hl.dll
|
||||||
set DEBUG=/debug
|
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...
|
echo -- Compile done. Cleaning...
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DECALS_H
|
#if !defined(DECALS_H)
|
||||||
#define DECALS_H
|
#define DECALS_H
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* use or distribution of this code by or to any unlicensed person is illegal.
|
* use or distribution of this code by or to any unlicensed person is illegal.
|
||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#ifndef DEFAULTAI_H
|
#if !defined(DEFAULTAI_H)
|
||||||
#define DEFAULTAI_H
|
#define DEFAULTAI_H
|
||||||
|
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DOORS_H
|
#if !defined(DOORS_H)
|
||||||
#define DOORS_H
|
#define DOORS_H
|
||||||
|
|
||||||
// doors
|
// doors
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EFFECTS_H
|
#if !defined(EFFECTS_H)
|
||||||
#define EFFECTS_H
|
#define EFFECTS_H
|
||||||
|
|
||||||
#define SF_BEAM_STARTON 0x0001
|
#define SF_BEAM_STARTON 0x0001
|
||||||
|
@ -12,10 +12,9 @@
|
|||||||
* without written permission from Valve LLC.
|
* without written permission from Valve LLC.
|
||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#ifndef ENGINECALLBACK_H
|
|
||||||
#define ENGINECALLBACK_H
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#if !defined(ENGINECALLBACK_H)
|
||||||
|
#define ENGINECALLBACK_H
|
||||||
|
|
||||||
#include "event_flags.h"
|
#include "event_flags.h"
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EXPLODE_H
|
#if !defined(EXPLODE_H)
|
||||||
#define EXPLODE_H
|
#define EXPLODE_H
|
||||||
|
|
||||||
#define SF_ENVEXPLOSION_NODAMAGE ( 1 << 0 ) // when set, ENV_EXPLOSION will not actually inflict damage
|
#define SF_ENVEXPLOSION_NODAMAGE ( 1 << 0 ) // when set, ENV_EXPLOSION will not actually inflict damage
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EXPORTDEF_H
|
#if !defined(EXPORTDEF_H)
|
||||||
#define EXPORTDEF_H
|
#define EXPORTDEF_H
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if _WIN32 || __CYGWIN__
|
||||||
#if __GNUC__
|
#if __GNUC__
|
||||||
#define EXPORT __attribute__ ((dllexport))
|
#define EXPORT __attribute__ ((dllexport))
|
||||||
#else
|
#else
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef EXTDLL_H
|
#if !defined(EXTDLL_H)
|
||||||
#define EXTDLL_H
|
#define EXTDLL_H
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -45,10 +45,10 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef HSPRITE
|
#undef HSPRITE
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
#ifndef FALSE
|
#if !defined(FALSE)
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef TRUE
|
#if !defined(TRUE)
|
||||||
#define TRUE (!FALSE)
|
#define TRUE (!FALSE)
|
||||||
#endif
|
#endif
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@ -57,7 +57,7 @@ typedef unsigned int ULONG;
|
|||||||
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
||||||
typedef int BOOL;
|
typedef int BOOL;
|
||||||
#define MAX_PATH PATH_MAX
|
#define MAX_PATH PATH_MAX
|
||||||
#ifndef PATH_MAX
|
#if !defined(PATH_MAX)
|
||||||
#define PATH_MAX 4096
|
#define PATH_MAX 4096
|
||||||
#endif
|
#endif
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
@ -72,12 +72,12 @@ typedef int BOOL;
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI_F
|
#if !defined(M_PI_F)
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
#endif
|
#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__)
|
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
|
||||||
#define XASH_64BIT
|
#define XASH_64BIT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Header file containing definition of globalvars_t and entvars_t
|
// Header file containing definition of globalvars_t and entvars_t
|
||||||
@ -101,10 +101,10 @@ typedef float vec_t; // needed before including progdefs.h
|
|||||||
|
|
||||||
// Shared header between the client DLL and the game DLLs
|
// Shared header between the client DLL and the game DLLs
|
||||||
#include "cdll_dll.h"
|
#include "cdll_dll.h"
|
||||||
#ifndef Q_min
|
#if !defined(Q_min)
|
||||||
#define Q_min(a,b) (((a) < (b)) ? (a) : (b))
|
#define Q_min(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
#ifndef Q_max
|
#if !defined(Q_max)
|
||||||
#define Q_max(a,b) (((a) > (b)) ? (a) : (b))
|
#define Q_max(a,b) (((a) > (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
****/
|
****/
|
||||||
// Base class for flying monsters. This overrides the movement test & execution code from CBaseMonster
|
// Base class for flying monsters. This overrides the movement test & execution code from CBaseMonster
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef FLYINGMONSTER_H
|
#if !defined(FLYINGMONSTER_H)
|
||||||
#define FLYINGMONSTER_H
|
#define FLYINGMONSTER_H
|
||||||
|
|
||||||
class CFlyingMonster : public CBaseMonster
|
class CFlyingMonster : public CBaseMonster
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef FUNC_BREAK_H
|
#if !defined(FUNC_BREAK_H)
|
||||||
#define FUNC_BREAK_H
|
#define FUNC_BREAK_H
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef GAME_H
|
#if !defined(GAME_H)
|
||||||
#define GAME_H
|
#define GAME_H
|
||||||
|
|
||||||
extern void GameDLLInit( void );
|
extern void GameDLLInit( void );
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// GameRules
|
// GameRules
|
||||||
//=========================================================
|
//=========================================================
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef GAMERULES_H
|
#if !defined(GAMERULES_H)
|
||||||
#define GAMERULES_H
|
#define GAMERULES_H
|
||||||
//#include "weapons.h"
|
//#include "weapons.h"
|
||||||
//#include "items.h"
|
//#include "items.h"
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include "weapons.h"
|
#include "weapons.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
|
||||||
#define TEMP_FOR_SCREEN_SHOTS
|
#define TEMP_FOR_SCREEN_SHOTS 1
|
||||||
#if defined(TEMP_FOR_SCREEN_SHOTS) //===================================================
|
#if TEMP_FOR_SCREEN_SHOTS //===================================================
|
||||||
|
|
||||||
class CCycler : public CBaseMonster
|
class CCycler : public CBaseMonster
|
||||||
{
|
{
|
||||||
|
@ -43,8 +43,8 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cdecl for win32
|
// stdcall for win32
|
||||||
#define EXPORT2 WINAPIV
|
#define EXPORT2 WINAPI
|
||||||
#else
|
#else
|
||||||
#define EXPORT2
|
#define EXPORT2
|
||||||
#endif
|
#endif
|
||||||
|
5
dlls/hl.def
Normal file
5
dlls/hl.def
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
LIBRARY hl
|
||||||
|
EXPORTS
|
||||||
|
GiveFnptrsToDll @1
|
||||||
|
SECTIONS
|
||||||
|
.data READ WRITE
|
@ -16,7 +16,7 @@
|
|||||||
// Hornets
|
// Hornets
|
||||||
//=========================================================
|
//=========================================================
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef HORNET_H
|
#if !defined(HORNET_H)
|
||||||
#define HORNET_H
|
#define HORNET_H
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// Hornet Defines
|
// Hornet Defines
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef ITEMS_H
|
#if !defined(ITEMS_H)
|
||||||
#define ITEMS_H
|
#define ITEMS_H
|
||||||
|
|
||||||
class CItem : public CBaseEntity
|
class CItem : public CBaseEntity
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
* without written permission from Valve LLC.
|
* without written permission from Valve LLC.
|
||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
|
#pragma once
|
||||||
#ifndef MAPRULES_H
|
#if !defined(MAPRULES_H)
|
||||||
#define MAPRULES_H
|
#define MAPRULES_H
|
||||||
#endif //MAPRULES_H
|
#endif //MAPRULES_H
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
* without written permission from Valve LLC.
|
* without written permission from Valve LLC.
|
||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
|
#pragma once
|
||||||
#ifndef MONSTEREVENT_H
|
#if !defined(MONSTEREVENT_H)
|
||||||
#define MONSTEREVENT_H
|
#define MONSTEREVENT_H
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef MONSTERS_H
|
#if !defined(MONSTERS_H)
|
||||||
#include "skill.h"
|
#include "skill.h"
|
||||||
#define MONSTERS_H
|
#define MONSTERS_H
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
|
|||||||
#if __DOS__
|
#if __DOS__
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#define CreateDirectoryA(p, n) mkdir(p)
|
#define CreateDirectoryA(p, n) mkdir(p)
|
||||||
#elif !defined _WIN32
|
#elif !_WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#define CreateDirectoryA(p, n) mkdir(p,777)
|
#define CreateDirectoryA(p, n) mkdir(p,777)
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
// nodes.h
|
// nodes.h
|
||||||
//=========================================================
|
//=========================================================
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef NODES_H
|
#if !defined(NODES_H)
|
||||||
#define NODES_H
|
#define NODES_H
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// DEFINE
|
// DEFINE
|
||||||
//=========================================================
|
//=========================================================
|
||||||
@ -106,7 +106,7 @@ typedef struct
|
|||||||
// CGraph
|
// CGraph
|
||||||
//=========================================================
|
//=========================================================
|
||||||
#define _GRAPH_VERSION_RETAIL 16 // Retail Half-Life graph version. Don't increment this
|
#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)
|
#define _GRAPH_VERSION (16 * 10)
|
||||||
#else
|
#else
|
||||||
#define _GRAPH_VERSION (16) // !!!increment this whenever graph/node/link classes change, to obsolesce older disk files.
|
#define _GRAPH_VERSION (16) // !!!increment this whenever graph/node/link classes change, to obsolesce older disk files.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef NODES_32BIT_COMPAT
|
#if !defined(NODES_32BIT_COMPAT)
|
||||||
#define NODES_32BIT_COMPAT
|
#define NODES_32BIT_COMPAT
|
||||||
|
|
||||||
//#include "nodes.h"
|
//#include "nodes.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
//=========================================================
|
//=========================================================
|
||||||
// Plane
|
// Plane
|
||||||
//=========================================================
|
//=========================================================
|
||||||
#ifndef PLANE_H
|
#if !defined(PLANE_H)
|
||||||
#define PLANE_H
|
#define PLANE_H
|
||||||
|
|
||||||
class CPlane
|
class CPlane
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef PLAYER_H
|
#if !defined(PLAYER_H)
|
||||||
#define PLAYER_H
|
#define PLAYER_H
|
||||||
|
|
||||||
#include "pm_materials.h"
|
#include "pm_materials.h"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
****/
|
****/
|
||||||
// Implementation in UTIL.CPP
|
// Implementation in UTIL.CPP
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef SAVERESTORE_H
|
#if !defined(SAVERESTORE_H)
|
||||||
#define SAVERESTORE_H
|
#define SAVERESTORE_H
|
||||||
|
|
||||||
class CBaseEntity;
|
class CBaseEntity;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Scheduling
|
// Scheduling
|
||||||
//=========================================================
|
//=========================================================
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef SCHEDULE_H
|
#if !defined(SCHEDULE_H)
|
||||||
#define SCHEDULE_H
|
#define SCHEDULE_H
|
||||||
|
|
||||||
#define TASKSTATUS_NEW 0 // Just started
|
#define TASKSTATUS_NEW 0 // Just started
|
||||||
|
@ -24,11 +24,11 @@
|
|||||||
#include "cbase.h"
|
#include "cbase.h"
|
||||||
#include "monsters.h"
|
#include "monsters.h"
|
||||||
|
|
||||||
#ifndef ANIMATION_H
|
#if !defined(ANIMATION_H)
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SAVERESTORE_H
|
#if !defined(SAVERESTORE_H)
|
||||||
#include "saverestore.h"
|
#include "saverestore.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef SCRIPTED_H
|
#if !defined(SCRIPTED_H)
|
||||||
#define SCRIPTED_H
|
#define SCRIPTED_H
|
||||||
|
|
||||||
#ifndef SCRIPTEVENT_H
|
#if !defined(SCRIPTEVENT_H)
|
||||||
#include "scriptevent.h"
|
#include "scriptevent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user