Compare commits

...

10 Commits

Author SHA1 Message Date
nillerusr
2f6aa51749 Upload shitty multiplayer hacks 2021-11-14 17:25:13 +03:00
nillerusr
4243cede59
Merge pull request #29 from nillerusr/misalign-fixes
Misalign fixes
2021-11-14 13:31:02 +03:00
nillerusr
cd72eac63d
Update server_base.vpc 2021-11-05 11:46:37 +03:00
nillerusr
29c83b7867 vpc_parser: typo fix 2021-11-05 10:54:43 +03:00
nillerusr
1b98e8994e vpc_parser: fix python2 compatibility again 2021-11-05 10:53:29 +03:00
nillerusr
31586ce622 vpc_parser: fix python2 compatibility 2021-11-05 10:49:26 +03:00
nillerusr
889829e5b4 upload vpc parser 2021-11-05 10:29:53 +03:00
nillerusr
7a69af7b00 Android OpenGL support( for tegra gpu's ) 2021-10-26 21:30:11 +03:00
nillerusr
6e5ef80a0e
Update README.md, update ivp submodule 2021-10-23 17:09:16 +03:00
nillerusr
18e088f8ff
Update wscript 2021-10-23 15:51:37 +03:00
11 changed files with 330 additions and 1130 deletions

View File

@ -1,20 +1,27 @@
# source-engine
The main purpose of this repository is to port the engine for other platforms.
# Goals
* fixing bugs
* NEON support
* ~~NEON support~~
* DXVK support
* remove unnecessary dependencies
* Elbrus port
* Arm(android) port
* ~~Arm(android) port~~
* improve performance
* replace current buildsystem with waf
* ~~replace current buildsystem with waf~~
* rewrite achivement system( to work without steam )
# How to Build?
1. Clone repo ( ```git clone https://github.com/nillerusr/source-engine```)
2. Run ```git submodule init && git submodule update```
* 64-bit support
# How to Build?
Clone repo and change directory:
```
git clone https://github.com/nillerusr/source-engine --recursive --depth 1
cd source-engine
```
On Linux:
dependencies:
fontconfig, freetype2, OpenAL, SDL2, libbz2, libcurl, libjpeg, libpng, zlib
```
./waf configure -T debug
./waf build
@ -25,5 +32,5 @@ export ANDROID_NDK=/path/to/ndk
./waf configure -T debug --android=armeabi-v7a,4.9,21
./waf build
```
On Windows:
**TODO(WAF is not configured for Windows. Use VPC as temporary solution)**
On Windows/MacOS:
**TODO(WAF is not configured for Windows/MacOS. Use VPC as temporary solution)**

View File

@ -19,6 +19,7 @@
#include "tier1/utllinkedlist.h"
#include "tier1/convar.h"
#include <EGL/egl.h>
// NOTE: This has to be the last file included! (turned off below, since this is included like a header)
#include "tier0/memdbgon.h"
@ -57,8 +58,14 @@ COpenGLEntryPoints *gGL = NULL;
const int kBogusSwapInterval = INT_MAX;
#ifdef ANDROID
static void *gl4es = NULL;
void *(*_glGetProcAddress)( const char * );
static void *l_gl4es = NULL;
static void *l_egl = NULL;
typedef void *(*t_glGetProcAddress)( const char * );
t_glGetProcAddress _glGetProcAddress;
typedef EGLBoolean (*t_eglBindAPI)(EGLenum api);
t_eglBindAPI _eglBindAPI;
#endif
/*
@ -238,7 +245,7 @@ public:
virtual void IncWindowRefCount();
virtual void DecWindowRefCount();
// Get the next N events. The function returns the number of events that were filled into your array.
virtual int GetEvents( CCocoaEvent *pEvents, int nMaxEventsToReturn, bool debugEvents = false );
#ifdef LINUX
@ -374,7 +381,7 @@ private:
Uint32 m_MouseButtonDownTimeStamp;
int m_MouseButtonDownX;
int m_MouseButtonDownY;
double m_flPrevGLSwapWindowTime;
};
@ -544,23 +551,51 @@ InitReturnVal_t CSDLMgr::Init()
m_MouseButtonDownTimeStamp = 0;
m_MouseButtonDownX = 0;
m_MouseButtonDownY = 0;
m_bExpectSyntheticMouseMotion = false;
m_nMouseTargetX = 0;
m_nMouseTargetY = 0;
m_nWarpDelta = 0;
m_bRawInput = false;
m_flPrevGLSwapWindowTime = 0.0f;
memset(m_pixelFormatAttribs, '\0', sizeof (m_pixelFormatAttribs));
int *attCursor = m_pixelFormatAttribs;
#define SET_GL_ATTR(key,value) \
*(attCursor++) = (int) (key); \
*(attCursor++) = (int) (value);
#define SET_GL_ATTR(key,value) \
*(attCursor++) = (int) (key); \
*(attCursor++) = (int) (value);
#ifdef ANDROID
bool m_bOGL = false;
l_egl = dlopen("libEGL.so", RTLD_LAZY);
if( l_egl )
{
_eglBindAPI = (t_eglBindAPI)dlsym(l_egl, "eglBindAPI");
if( _eglBindAPI && _eglBindAPI(EGL_OPENGL_API) )
{
Msg("OpenGL support found!\n");
m_bOGL = true;
}
}
if( m_bOGL )
{
_glGetProcAddress = (t_glGetProcAddress)dlsym(l_egl, "eglGetProcAddress");
SET_GL_ATTR(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
}
else
{
l_gl4es = dlopen("libgl4es.so", RTLD_LAZY);
_glGetProcAddress = (t_glGetProcAddress)dlsym(l_gl4es, "gl4es_glGetProcAddress");
}
#endif
SET_GL_ATTR(SDL_GL_RED_SIZE, 8);
SET_GL_ATTR(SDL_GL_GREEN_SIZE, 8);
SET_GL_ATTR(SDL_GL_BLUE_SIZE, 8);
@ -586,9 +621,9 @@ InitReturnVal_t CSDLMgr::Init()
// to really actually make a window, we just resize the one we built here.
if ( !CreateHiddenGameWindow( "", 640, 480 ) )
Error( "CreateGameWindow failed" );
SDL_HideWindow( m_Window );
return INIT_OK;
}
@ -724,7 +759,7 @@ bool CSDLMgr::CreateHiddenGameWindow( const char *pTitle, int width, int height
#if defined( DX_TO_GL_ABSTRACTION )
flags |= SDL_WINDOW_OPENGL;
#endif
m_Window = SDL_CreateWindow( pTitle, x, y, width, height, flags );
m_Window = SDL_CreateWindow( pTitle, x, y, width, height, flags );
if (m_Window == NULL)
Error( "Failed to create SDL window: %s", SDL_GetError() );
@ -760,13 +795,11 @@ bool CSDLMgr::CreateHiddenGameWindow( const char *pTitle, int width, int height
SDL_GL_MakeCurrent(m_Window, m_GLContext);
#ifdef ANDROID
gl4es = dlopen("libgl4es.so", RTLD_LAZY);
if( gl4es )
if( l_gl4es )
{
_glGetProcAddress = dlsym(gl4es, "gl4es_GetProcAddress" );
_glGetProcAddress = (t_glGetProcAddress)dlsym(l_gl4es, "gl4es_GetProcAddress" );
void (*initialize_gl4es)( );
initialize_gl4es = dlsym(gl4es, "initialize_gl4es" );
initialize_gl4es = (void(*)())dlsym(l_gl4es, "initialize_gl4es" );
initialize_gl4es();
}
#endif

View File

@ -569,7 +569,7 @@ bool CBaseClientState::PrepareSteamConnectResponse( uint64 unGSSteamID, bool bGS
{
return true;
}
/*
#if !defined( NO_STEAM ) && !defined( SWDS )
if ( !Steam3Client().SteamUser() )
{
@ -577,8 +577,8 @@ bool CBaseClientState::PrepareSteamConnectResponse( uint64 unGSSteamID, bool bGS
Disconnect( "#GameUI_ServerRequireSteam", true );
return false;
}
#endif
#endif*/
netadr_t checkAdr = adr;
if ( adr.GetType() == NA_LOOPBACK || adr.IsLocalhost() )
{
@ -592,12 +592,14 @@ bool CBaseClientState::PrepareSteamConnectResponse( uint64 unGSSteamID, bool bGS
Steam3Client().GetAuthSessionTicket( steam3Cookie, sizeof(steam3Cookie), &steam3CookieLen, checkAdr.GetIPHostByteOrder(), checkAdr.GetPort(), unGSSteamID, bGSSecure );
/*
if ( steam3CookieLen == 0 )
{
COM_ExplainDisconnection( true, "#GameUI_ServerRequireSteam" );
Disconnect( "#GameUI_ServerRequireSteam", true );
return false;
}
*/
msg.WriteShort( steam3CookieLen );
if ( steam3CookieLen > 0 )
@ -936,6 +938,7 @@ bool CBaseClientState::ProcessConnectionlessPacket( netpacket_t *packet )
int authprotocol = msg.ReadLong();
uint64 unGSSteamID = 0;
bool bGSSecure = false;
/*
if ( authprotocol == PROTOCOL_STEAM )
{
if ( msg.ReadShort() != 0 )
@ -962,7 +965,7 @@ bool CBaseClientState::ProcessConnectionlessPacket( netpacket_t *packet )
Disconnect( "#GameUI_ServerInsecure", true );
return false;
}
}
}*/
SendConnectPacket( challenge, authprotocol, unGSSteamID, bGSSecure );
}
break;

View File

@ -740,7 +740,7 @@ bool CBaseServer::ProcessConnectionlessPacket(netpacket_t * packet)
// RejectConnection( packet->from, "Cannot connect to a secure server while plug-ins are\nloaded on your client\n" );
// break;
// }
/*
if ( authProtocol == PROTOCOL_STEAM )
{
int keyLen = msg.ReadShort();
@ -753,7 +753,7 @@ bool CBaseServer::ProcessConnectionlessPacket(netpacket_t * packet)
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, keyLen ); // cd key is actually a raw encrypted key
}
else
else*/
{
msg.ReadString( cdkey, sizeof(cdkey) );
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, strlen(cdkey) );
@ -1466,6 +1466,7 @@ bool CBaseServer::CheckChallengeType( CBaseClient * client, int nNewUserID, neta
// {
// return true;
// }
return true;
client->SetSteamID( CSteamID() ); // set an invalid SteamID

View File

@ -1388,6 +1388,7 @@ bool CGameServer::FinishCertificateCheck( netadr_t &adr, int nAuthProtocol, cons
if ( AllowDebugDedicatedServerOutsideSteam() )
return true;
/*
if ( !Host_IsSinglePlayerGame() || sv.IsDedicated()) // PROTOCOL_HASHEDCDKEY isn't allowed for multiplayer servers
{
RejectConnection( adr, clientChallenge, "#GameUI_ServerCDKeyAuthInvalid" );
@ -1398,7 +1399,7 @@ bool CGameServer::FinishCertificateCheck( netadr_t &adr, int nAuthProtocol, cons
{
RejectConnection( adr, clientChallenge, "#GameUI_ServerInvalidCDKey" );
return false;
}
}*/
int nHashCount = 0;

View File

@ -3,534 +3,37 @@
from waflib import Utils
import os
import vpc_parser
top = '.'
PROJECT_NAME = 'client'
def options(opt):
# stub
return
games = {
'hl2': ['client_base.vpc', 'client_hl2.vpc'],
'hl2mp': ['client_base.vpc', 'client_hl2mp.vpc'],
'hl1': ['client_base.vpc', 'client_hl1.vpc'],
'portal': ['client_base.vpc', 'client_portal.vpc'],
'hl1mp': ['client_base.vpc', 'client_hl1.vpc'],
'css': ['client_base.vpc', 'client_cstrike.vpc'],
'dod': ['client_base.vpc', 'client_dod.vpc']
}
def configure(conf):
conf.env.append_unique('DEFINES',[
'NO_STRING_T',
'CLIENT_DLL',
'VECTOR',
'VERSION_SAFE_STEAM_API_INTERFACES',
'strncpy=use_Q_strncpy_instead',
'strncpy=use_Q_strncpy_instead',
'USE_WEBM_FOR_REPLAY', # LINUXALL
'HL2_CLIENT_DLL'
])
game = conf.options.GAMES
conf.env.GAMES = game
if game not in games.keys():
conf.fatal("Couldn't find game: ", game)
def build(bld):
source = [
#'replay/replayyoutubeapi_key_sdk.cpp', [$SOURCESDK]
'game_controls/slideshowpanel.cpp',
'../../common/movieobjects/timeutils.cpp',
'hl2/C_Func_Monitor.cpp',
'geiger.cpp',
'history_resource.cpp',
'hud_weapon.cpp',
'train.cpp',
'../shared/weapon_parse_default.cpp',
'../shared/achievement_saverestore.cpp',
'../shared/achievementmgr.cpp',
'../shared/achievements_hlx.cpp',
'achievement_notification_panel.cpp',
'../shared/activitylist.cpp',
'alphamaterialproxy.cpp',
'../shared/ammodef.cpp',
'animatedentitytextureproxy.cpp',
'animatedoffsettextureproxy.cpp',
'animatedtextureproxy.cpp',
'AnimateSpecificTextureProxy.cpp',
'../shared/animation.cpp',
'../shared/base_playeranimstate.cpp',
'../shared/baseachievement.cpp',
'baseanimatedtextureproxy.cpp',
'baseclientrendertargets.cpp',
'../shared/basecombatcharacter_shared.cpp',
'../shared/basecombatweapon_shared.cpp',
'../shared/baseentity_shared.cpp',
'../shared/basegrenade_shared.cpp',
'../shared/baseparticleentity.cpp',
'../shared/baseplayer_shared.cpp',
'../shared/baseprojectile.cpp',
'../shared/baseviewmodel_shared.cpp',
'beamdraw.cpp',
'../shared/beam_shared.cpp',
'../../public/bone_accessor.cpp',
'bone_merge_cache.cpp',
'c_ai_basehumanoid.cpp',
'c_ai_basenpc.cpp',
'c_baseanimating.cpp',
'c_baseanimatingoverlay.cpp',
'c_basecombatcharacter.cpp',
'c_basecombatweapon.cpp',
'c_basedoor.cpp',
'c_baseentity.cpp',
'c_baseflex.cpp',
'c_baseplayer.cpp',
'c_baseviewmodel.cpp',
'c_breakableprop.cpp',
'c_colorcorrection.cpp',
'c_colorcorrectionvolume.cpp',
'c_dynamiclight.cpp',
'c_entitydissolve.cpp',
'c_entityparticletrail.cpp',
'c_env_fog_controller.cpp',
'c_env_particlescript.cpp',
'c_env_projectedtexture.cpp',
'c_env_screenoverlay.cpp',
'c_env_tonemap_controller.cpp',
'c_fire_smoke.cpp',
'c_fish.cpp',
'c_func_areaportalwindow.cpp',
'c_func_breakablesurf.cpp',
'c_func_conveyor.cpp',
'c_func_dust.cpp',
'c_func_lod.cpp',
'c_func_occluder.cpp',
'c_func_reflective_glass.cpp',
'c_func_rotating.cpp',
'c_func_smokevolume.cpp',
'c_func_tracktrain.cpp',
'c_gib.cpp',
'c_hairball.cpp',
'c_info_overlay_accessor.cpp',
'c_lightglow.cpp',
'C_MaterialModifyControl.cpp',
'c_particle_system.cpp',
'c_physbox.cpp',
'c_physicsprop.cpp',
'c_physmagnet.cpp',
'c_pixel_visibility.cpp',
'c_plasma.cpp',
'c_playerresource.cpp',
'c_point_camera.cpp',
'c_point_commentary_node.cpp',
'c_props.cpp',
'c_ragdoll_manager.cpp',
'c_rope.cpp',
'c_rumble.cpp',
'c_sceneentity.cpp',
'c_shadowcontrol.cpp',
'c_slideshow_display.cpp',
'c_soundscape.cpp',
'c_spotlight_end.cpp',
'c_sprite.cpp',
'c_sprite_perfmonitor.cpp',
'c_sun.cpp',
'c_team.cpp',
'c_tesla.cpp',
'c_test_proxytoggle.cpp',
'c_user_message_register.cpp',
'c_vehicle_choreo_generic.cpp',
'c_vehicle_jeep.cpp',
'c_vguiscreen.cpp',
'hl2/c_waterbullet.cpp',
'hl2/hud_autoaim.cpp',
'C_WaterLODControl.cpp',
'c_world.cpp',
'../shared/cam_thirdperson.cpp',
'camomaterialproxy.cpp',
'cdll_client_int.cpp',
'cdll_bounded_cvars.cpp',
'cdll_util.cpp',
'cl_mat_stub.cpp',
'classmap.cpp',
'client_factorylist.cpp',
'client_thinklist.cpp',
'client_virtualreality.cpp',
'clienteffectprecachesystem.cpp',
'cliententitylist.cpp',
'clientleafsystem.cpp',
'clientmode_shared.cpp',
'clientshadowmgr.cpp',
'clientsideeffects.cpp',
'clientsideeffects_test.cpp',
'clientsteamcontext.cpp',
'colorcorrectionmgr.cpp',
'commentary_modelviewer.cpp',
'../shared/collisionproperty.cpp',
'../shared/death_pose.cpp',
'../shared/debugoverlay_shared.cpp',
'../shared/decals.cpp',
'detailobjectsystem.cpp',
'dummyproxy.cpp',
'../shared/effect_dispatch_data.cpp',
'EffectsClient.cpp',
'../shared/ehandle.cpp',
'../shared/entitylist_base.cpp',
'entityoriginmaterialproxy.cpp',
'../shared/EntityParticleTrail_Shared.cpp',
'../shared/env_detail_controller.cpp',
'../shared/env_wind_shared.cpp',
'../shared/eventlist.cpp',
'flashlighteffect.cpp',
'../shared/func_ladder.cpp',
'functionproxy.cpp',
'fx_blood.cpp',
'fx_cube.cpp',
'fx_explosion.cpp',
'fx_fleck.cpp',
'fx_impact.cpp',
'fx_interpvalue.cpp',
'fx_quad.cpp',
'fx_shelleject.cpp',
'fx_staticline.cpp',
'fx_tracer.cpp',
'fx_trail.cpp',
'fx_water.cpp',
'../shared/gamemovement.cpp',
'../shared/gamerules.cpp',
'../shared/gamerules_register.cpp',
'../shared/GameStats.cpp',
'../shared/gamestringpool.cpp',
'gametrace_client.cpp',
'../shared/gamevars_shared.cpp',
'glow_outline_effect.cpp',
'glow_overlay.cpp',
'../shared/hintmessage.cpp',
'../shared/hintsystem.cpp',
'hltvcamera.cpp',
'hud.cpp',
'hud_animationinfo.cpp',
'hud_basechat.cpp',
'hud_basetimer.cpp',
'hud_bitmapnumericdisplay.cpp',
'hud_closecaption.cpp',
'hud_crosshair.cpp',
'hud_element_helper.cpp',
'hl2/hud_filmdemo.cpp',
'hl2/hud_hdrdemo.cpp',
'hud_hintdisplay.cpp',
'hud_msg.cpp',
'hud_numericdisplay.cpp',
'hud_pdump.cpp',
'hud_redraw.cpp',
'hud_vehicle.cpp',
'../shared/igamesystem.cpp',
'in_camera.cpp',
'in_joystick.cpp',
'in_main.cpp',
'in_steamcontroller.cpp',
'initializer.cpp',
'interpolatedvar.cpp',
'IsNPCProxy.cpp',
'lampbeamproxy.cpp',
'lamphaloproxy.cpp',
'../shared/mapentities_shared.cpp',
'mathproxy.cpp',
'matrixproxy.cpp',
'menu.cpp',
'message.cpp',
'movehelper_client.cpp',
'../shared/movevars_shared.cpp',
'../shared/multiplay_gamerules.cpp',
'../shared/obstacle_pushaway.cpp',
'panelmetaclassmgr.cpp',
'particle_collision.cpp',
'particle_litsmokeemitter.cpp',
'../shared/particle_parse.cpp',
'../shared/particle_property.cpp',
'particle_proxies.cpp',
'particle_simple3d.cpp',
'particlemgr.cpp',
'particles_attractor.cpp',
'particles_ez.cpp',
'particles_localspace.cpp',
'particles_new.cpp',
'particles_simple.cpp',
'../shared/particlesystemquery.cpp',
'perfvisualbenchmark.cpp',
'physics.cpp',
'physics_main_client.cpp',
'../shared/physics_main_shared.cpp',
'../shared/physics_saverestore.cpp',
'../shared/physics_shared.cpp',
'physpropclientside.cpp',
'playerandobjectenumerator.cpp',
'playerspawncache.cpp',
'../shared/point_bonusmaps_accessor.cpp',
'../shared/point_posecontroller.cpp',
'../shared/precache_register.cpp',
'../shared/predictableid.cpp',
'prediction.cpp',
'../shared/predictioncopy.cpp',
'../shared/props_shared.cpp',
'proxyentity.cpp',
'ProxyHealth.cpp',
'proxyplayer.cpp',
'proxypupil.cpp',
'ragdoll.cpp',
'../shared/ragdoll_shared.cpp',
'recvproxy.cpp',
'basepresence.cpp', #[$WIN32||$POSIX]
#'basepresence_xbox.cpp', [$X360]
'../shared/rope_helpers.cpp',
'../shared/saverestore.cpp',
'../shared/sceneentity_shared.cpp',
'ScreenSpaceEffects.cpp',
'../shared/sequence_Transitioner.cpp',
'simple_keys.cpp',
'../shared/simtimer.cpp',
'../shared/singleplay_gamerules.cpp',
'../shared/SoundEmitterSystem.cpp',
'../shared/soundenvelope.cpp',
'../../public/SoundParametersInternal.cpp',
'splinepatch.cpp',
'../shared/Sprite.cpp',
'spritemodel.cpp',
'../shared/SpriteTrail.cpp',
'../shared/studio_shared.cpp',
'studio_stats.cpp',
'../shared/takedamageinfo.cpp',
'../shared/teamplay_gamerules.cpp',
'../shared/teamplayroundbased_gamerules.cpp',
'../shared/test_ehandle.cpp',
'text_message.cpp',
'texturescrollmaterialproxy.cpp',
'timematerialproxy.cpp',
'toggletextureproxy.cpp',
'../shared/usercmd.cpp',
'../shared/usermessages.cpp',
'../shared/util_shared.cpp',
'../shared/vehicle_viewblend_shared.cpp',
'vgui_avatarimage.cpp',
'vgui_basepanel.cpp',
'vgui_bitmapbutton.cpp',
'vgui_bitmapimage.cpp',
'vgui_bitmappanel.cpp',
'vgui_schemevisualizer.cpp',
'vgui_centerstringpanel.cpp',
'vgui_consolepanel.cpp',
'vgui_debugoverlaypanel.cpp',
'vgui_fpspanel.cpp',
'vgui_game_viewport.cpp',
'vgui_grid.cpp',
'vgui_int.cpp',
'vgui_loadingdiscpanel.cpp',
'vgui_messagechars.cpp',
'vgui_netgraphpanel.cpp',
'vgui_slideshow_display_screen.cpp',
'view.cpp',
'view_beams.cpp',
'view_effects.cpp',
'view_scene.cpp',
'viewangleanim.cpp',
'ViewConeImage.cpp',
'viewdebug.cpp',
'viewpostprocess.cpp',
'viewrender.cpp',
'../shared/voice_banmgr.cpp',
'../shared/voice_status.cpp',
'warp_overlay.cpp',
'WaterLODMaterialProxy.cpp',
'../shared/weapon_parse.cpp',
'weapon_selection.cpp',
'weapons_resource.cpp',
'WorldDimsProxy.cpp',
'vgui_video.cpp',
'vgui_video_player.cpp',
'../shared/mp_shareddefs.cpp',
'../client/c_vote_controller.cpp',
'../../public/haptics/haptic_msgs.cpp', #[!$X360]
#'../../public/haptics/haptic_utils.cpp', [$WIN32&&!$X360]
'sixense/in_sixense.cpp',
'sixense/in_sixense_gesture_bindings.cpp',
'../shared/sixense/sixense_convars.cpp',
'../../public/bone_setup.cpp',
'../../public/posedebugger.cpp',
'../../public/client_class.cpp',
'../../common/compiledcaptionswap.cpp',
'../../public/collisionutils.cpp',
'../../public/crtmemdebug.cpp',
'../../public/dt_recv.cpp',
'../../public/dt_utlvector_common.cpp',
'../../public/dt_utlvector_recv.cpp',
'../../public/filesystem_helpers.cpp',
'../../public/interpolatortypes.cpp',
'../shared/interval.cpp',
'../../common/language.cpp',
'../../public/networkvar.cpp',
'../../common/randoverride.cpp',
'../../common/steamid.cpp',
'../../public/rope_physics.cpp',
'../../public/scratchpad3d.cpp',
'../../public/ScratchPadUtils.cpp',
'../../public/sentence.cpp',
'../shared/sheetsimulator.cpp',
'../../public/simple_physics.cpp',
'../../public/stringregistry.cpp',
'../../public/studio.cpp',
'../../public/vallocator.cpp',
'../../public/vgui_controls/vgui_controls.cpp',
'../../public/jigglebones.cpp',
'hud_lcd.cpp',
'in_mouse.cpp',
'mumble.cpp',
'../../public/renamed_recvtable_compat.cpp',
'rendertexture.cpp',
'c_basetempentity.cpp',
'c_effects.cpp',
'c_impact_effects.cpp',
'c_movie_explosion.cpp',
'c_particle_fire.cpp',
'c_particle_smokegrenade.cpp',
'c_prop_vehicle.cpp',
'c_recipientfilter.cpp',
'c_smoke_trail.cpp',
'c_smokestack.cpp',
'c_steamjet.cpp',
'c_stickybolt.cpp',
'c_te.cpp',
'c_te_armorricochet.cpp',
'c_te_basebeam.cpp',
'c_te_beamentpoint.cpp',
'c_te_beaments.cpp',
'c_te_beamfollow.cpp',
'c_te_beamlaser.cpp',
'c_te_beampoints.cpp',
'c_te_beamring.cpp',
'c_te_beamringpoint.cpp',
'c_te_beamspline.cpp',
'c_te_bloodsprite.cpp',
'c_te_bloodstream.cpp',
'c_te_breakmodel.cpp',
'c_te_bspdecal.cpp',
'c_te_bubbles.cpp',
'c_te_bubbletrail.cpp',
'c_te_clientprojectile.cpp',
'c_te_decal.cpp',
'c_te_dynamiclight.cpp',
'c_te_effect_dispatch.cpp',
'c_te_energysplash.cpp',
'c_te_explosion.cpp',
'c_te_fizz.cpp',
'c_te_footprint.cpp',
'c_te_glassshatter.cpp',
'c_te_glowsprite.cpp',
'c_te_impact.cpp',
'c_te_killplayerattachments.cpp',
'c_te_largefunnel.cpp',
'c_te_legacytempents.cpp',
'c_te_muzzleflash.cpp',
'c_te_particlesystem.cpp',
'c_te_physicsprop.cpp',
'c_te_playerdecal.cpp',
'c_te_projecteddecal.cpp',
'c_te_showline.cpp',
'c_te_smoke.cpp',
'c_te_sparks.cpp',
'c_te_sprite.cpp',
'c_te_spritespray.cpp',
'c_te_worlddecal.cpp',
'c_testtraceline.cpp',
'c_tracer.cpp',
'fx.cpp',
'fx_discreetline.cpp',
'fx_envelope.cpp',
'fx_line.cpp',
'fx_sparks.cpp',
'particlesphererenderer.cpp',
'smoke_fog_overlay.cpp',
'game_controls/baseviewport.cpp',
'game_controls/basemodelpanel.cpp',
'game_controls/basemodel_panel.cpp',
'game_controls/ClientScoreBoardDialog.cpp',
'game_controls/commandmenu.cpp',
'game_controls/intromenu.cpp',
'game_controls/MapOverview.cpp',
'game_controls/NavProgress.cpp',
'game_controls/SpectatorGUI.cpp',
'game_controls/teammenu.cpp',
'game_controls/vguitextwindow.cpp',
'game_controls/IconPanel.cpp',
'mp3player.cpp',
'../../public/tools/bonelist.cpp',
'entity_client_tools.cpp',
'toolframework_client.cpp',
'hud_chat.cpp',
'c_team_objectiveresource.cpp',
'../shared/hl2/basehlcombatweapon_shared.cpp',
'../shared/hl2/achievements_hl2.cpp',
'hl2/c_antlion_dust.cpp',
'hl2/c_ar2_explosion.cpp',
'hl2/c_barnacle.cpp',
'hl2/c_barney.cpp',
'hl2/c_basehelicopter.cpp',
'hl2/c_basehlcombatweapon.cpp',
'hl2/c_basehlplayer.cpp',
'hl2/c_citadel_effects.cpp',
'hl2/c_corpse.cpp',
'hl2/c_env_alyxtemp.cpp',
'hl2/c_env_headcrabcanister.cpp',
'hl2/c_env_starfield.cpp',
'hl2/c_func_tankmortar.cpp',
'hl2/c_hl2_playerlocaldata.cpp',
'hl2/c_info_teleporter_countdown.cpp',
'hl2/c_npc_antlionguard.cpp',
'hl2/c_npc_combinegunship.cpp',
'hl2/c_npc_manhack.cpp',
'hl2/c_npc_rollermine.cpp',
'hl2/c_plasma_beam_node.cpp',
'hl2/c_prop_combine_ball.cpp',
'hl2/c_rotorwash.cpp',
'hl2/c_script_intro.cpp',
'../shared/script_intro_shared.cpp',
'hl2/c_strider.cpp',
'hl2/c_te_concussiveexplosion.cpp',
'hl2/c_te_flare.cpp',
'hl2/c_thumper_dust.cpp',
'hl2/c_vehicle_airboat.cpp',
'hl2/c_vehicle_cannon.cpp',
'hl2/c_vehicle_crane.cpp',
'hl2/c_vehicle_prisoner_pod.cpp',
'hl2/c_weapon__stubs_hl2.cpp',
'hl2/c_weapon_crossbow.cpp',
'hl2/c_weapon_physcannon.cpp',
'hl2/c_weapon_stunstick.cpp',
'hl2/clientmode_hlnormal.cpp',
'death.cpp',
'../shared/hl2/env_headcrabcanister_shared.cpp',
'hl2/fx_antlion.cpp',
'hl2/fx_bugbait.cpp',
'hl2/fx_hl2_impacts.cpp',
'hl2/fx_hl2_tracers.cpp',
'hl2/hl2_clientmode.cpp',
'../shared/hl2/hl2_gamerules.cpp',
'../shared/hl2/hl2_usermessages.cpp',
'../shared/hl2/hl_gamemovement.cpp',
'hl2/hl_in_main.cpp',
'hl2/hl_prediction.cpp',
'hl2/hud_ammo.cpp',
'hl2/hud_battery.cpp',
'hl2/hud_blood.cpp',
'hl2/hud_credits.cpp',
'hl2/hud_damageindicator.cpp',
'hl2/hud_flashlight.cpp',
'hl2/hud_health.cpp',
'hl2/hud_poisondamageindicator.cpp',
'hud_posture.cpp',
'hl2/hud_quickinfo.cpp',
'hud_squadstatus.cpp',
'hl2/hud_suitpower.cpp',
'hl2/hud_weaponselection.cpp',
'hl2/hud_zoom.cpp',
'hl2/shieldproxy.cpp',
'hl2/vgui_rootpanel_hl2.cpp',
'episodic/c_vort_charge_token.cpp',
'touch.cpp'
]
game = vpc_parser.parse_vpcs( bld.env, games[bld.env.GAMES], '../..' )
includes = [
'.',
'game_controls',
'hl2',
'hl2/elements',
'../shared/hl2',
'../../common',
'../../public',
'../../public/tier0',
@ -540,8 +43,6 @@ def build(bld):
'../shared'
]
defines = []
libs = [
'tier0',
'particles',
@ -557,13 +58,20 @@ def build(bld):
'steam_api',
'bitmap',
'vtf',
'RT'
'RT',
'ZLIB'
]
install_path = bld.env.PREFIX
if bld.env.DEST_OS != 'android':
install_path += '/hl2/bin'
source = game["sources"]
includes += game["includes"]
defines = game["defines"]
defines.remove('PROTECTED_THINGS_ENABLE')
bld.shlib(
source = source,
target = PROJECT_NAME,

View File

@ -54,7 +54,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories "$BASE;.\;$SRCDIR\game\shared;$SRCDIR\utils\common;$SRCDIR\game\shared\econ;$SRCDIR\game\server\NextBot"
$PreprocessorDefinitions "$BASE;GAME_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;sprintf=use_Q_snprintf_instead_of_sprintf;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead"
$PreprocessorDefinitions "$BASE;GAME_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead"
$PreprocessorDefinitions "$BASE;SWDS" [$POSIX]
$PreprocessorDefinitions "$BASE;fopen=dont_use_fopen" [$WINDOWS||$X360]
$Create/UsePrecompiledHeader "Use Precompiled Header (/Yu)"

View File

@ -3,585 +3,41 @@
from waflib import Utils
import os
import vpc_parser
top = '.'
PROJECT_NAME = 'server'
games = {
'hl2': ['server_base.vpc', 'server_hl2.vpc'],
'episodic':['server_base.vpc', 'server_episodic.vpc'],
'hl2mp': ['server_base.vpc', 'server_hl2mp.vpc'],
'portal': ['server_base.vpc', 'server_portal.vpc'],
'hl1': ['server_base.vpc', 'server_hl1.vpc'],
'hl1mp': ['server_base.vpc', 'server_hl1.vpc'],
'css': ['server_base.vpc', 'server_cstrike.vpc', 'nav_mesh.vpc'],
'dod': ['server_base.vpc', 'server_dod.vpc'],
'tf': [
'server_base.vpc',
'server_econ_base.vpc',
'tf/tf_gcmessages_include.vpc',
'nav_mesh.vpc',
'server_tf.vpc'
]
}
def options(opt):
# stub
return
def configure(conf):
conf.env.append_unique('DEFINES', [
'GAME_DLL',
'VECTOR',
'VERSION_SAFE_STEAM_API_INTERFACES',
'PROTECTED_THINGS_ENABLE'
'sprintf=use_Q_snprintf_instead_of_sprintf',
'strncpy=use_Q_strncpy_instead',
'_snprintf=use_Q_snprintf_instead',
'HL2_DLL',
'USES_SAVERESTORE'
])
game = conf.options.GAMES
conf.env.GAMES = game
if game not in games.keys():
conf.fatal("Couldn't find game: ", game)
def build(bld):
print(bld)
source = [
'../shared/achievement_saverestore.cpp',
'../shared/achievementmgr.cpp',
'../shared/achievements_hlx.cpp',
'../shared/activitylist.cpp',
'ai_activity.cpp',
'ai_baseactor.cpp',
'ai_basehumanoid.cpp',
'ai_basenpc.cpp',
'ai_basenpc_flyer.cpp',
'ai_basenpc_flyer_new.cpp',
'ai_basenpc_movement.cpp',
'ai_basenpc_physicsflyer.cpp',
'ai_basenpc_schedule.cpp',
'ai_basenpc_squad.cpp',
'ai_behavior.cpp',
'ai_behavior_assault.cpp',
'ai_behavior_fear.cpp',
'ai_behavior_follow.cpp',
'ai_behavior_lead.cpp',
'ai_behavior_rappel.cpp',
'ai_behavior_standoff.cpp',
'ai_blended_movement.cpp',
'ai_concommands.cpp',
'ai_condition.cpp',
'AI_Criteria.cpp',
'ai_default.cpp',
'ai_dynamiclink.cpp',
'ai_event.cpp',
'ai_goalentity.cpp',
'ai_hint.cpp',
'ai_hull.cpp',
'ai_initutils.cpp',
'AI_Interest_Target.cpp',
'ai_link.cpp',
'ai_localnavigator.cpp',
'ai_looktarget.cpp',
'ai_memory.cpp',
'ai_motor.cpp',
'ai_moveprobe.cpp',
'ai_moveshoot.cpp',
'ai_movesolver.cpp',
'ai_namespaces.cpp',
'ai_navigator.cpp',
'ai_network.cpp',
'ai_networkmanager.cpp',
'ai_node.cpp',
'ai_pathfinder.cpp',
'ai_planesolver.cpp',
'ai_playerally.cpp',
'AI_ResponseSystem.cpp',
'ai_route.cpp',
'ai_saverestore.cpp',
'ai_schedule.cpp',
'ai_scriptconditions.cpp',
'ai_senses.cpp',
'ai_sentence.cpp',
'ai_speech.cpp',
'ai_speechfilter.cpp',
'ai_squad.cpp',
'ai_squadslot.cpp',
'ai_tacticalservices.cpp',
'ai_task.cpp',
'ai_trackpather.cpp',
'ai_utils.cpp',
'ai_waypoint.cpp',
'../shared/ammodef.cpp',
'../shared/animation.cpp',
'../shared/base_playeranimstate.cpp',
'base_transmit_proxy.cpp',
'../shared/baseachievement.cpp',
'baseanimating.cpp',
'BaseAnimatingOverlay.cpp',
'basecombatcharacter.cpp',
'../shared/basecombatcharacter_shared.cpp',
'basecombatweapon.cpp',
'../shared/basecombatweapon_shared.cpp',
'baseentity.cpp',
'../shared/baseentity_shared.cpp',
'baseflex.cpp',
'../shared/basegrenade_shared.cpp',
'basemultiplayerplayer.cpp',
'../shared/baseparticleentity.cpp',
'../shared/baseplayer_shared.cpp',
'../shared/baseprojectile.cpp',
'baseviewmodel.cpp',
'../shared/baseviewmodel_shared.cpp',
'../shared/beam_shared.cpp',
'bitstring.cpp',
'bmodels.cpp',
'buttons.cpp',
'cbase.cpp',
'client.cpp',
'../shared/collisionproperty.cpp',
'colorcorrection.cpp',
'colorcorrectionvolume.cpp',
'CommentarySystem.cpp',
'controlentities.cpp',
'cplane.cpp',
'CRagdollMagnet.cpp',
'damagemodifier.cpp',
'../shared/death_pose.cpp',
'../shared/debugoverlay_shared.cpp',
'../shared/decals.cpp',
'doors.cpp',
'dynamiclight.cpp',
'../shared/effect_dispatch_data.cpp',
'effects.cpp',
'EffectsServer.cpp',
'../shared/ehandle.cpp',
'entityblocker.cpp',
'EntityDissolve.cpp',
'EntityFlame.cpp',
'entitylist.cpp',
'../shared/entitylist_base.cpp',
'EntityParticleTrail.cpp',
'../shared/EntityParticleTrail_Shared.cpp',
'env_debughistory.cpp',
'../shared/env_detail_controller.cpp',
'env_effectsscript.cpp',
'env_entity_maker.cpp',
'env_particlescript.cpp',
'env_player_surface_trigger.cpp',
'env_projectedtexture.cpp',
'env_screenoverlay.cpp',
'env_texturetoggle.cpp',
'env_tonemap_controller.cpp',
'../shared/env_wind_shared.cpp',
'env_zoom.cpp',
'EnvBeam.cpp',
'EnvFade.cpp',
'EnvHudHint.cpp',
'EnvLaser.cpp',
'EnvMessage.cpp',
'envmicrophone.cpp',
'EnvShake.cpp',
'EnvSpark.cpp',
'../shared/eventlist.cpp',
'EventLog.cpp',
'explode.cpp',
'filters.cpp',
'fire.cpp',
'fire_smoke.cpp',
'fish.cpp',
'fogcontroller.cpp',
'fourwheelvehiclephysics.cpp',
'func_areaportal.cpp',
'func_areaportalbase.cpp',
'func_areaportalwindow.cpp',
'func_break.cpp',
'func_breakablesurf.cpp',
'func_dust.cpp',
'../shared/func_ladder.cpp',
'func_ladder_endpoint.cpp',
'func_lod.cpp',
'func_movelinear.cpp',
'func_occluder.cpp',
'func_reflective_glass.cpp',
'func_smokevolume.cpp',
'game.cpp',
'game_ui.cpp',
'gameinterface.cpp',
'../shared/gamemovement.cpp',
'../shared/gamerules.cpp',
'../shared/gamerules_register.cpp',
'../shared/GameStats.cpp',
'../shared/gamestringpool.cpp',
'gametrace_dll.cpp',
'../shared/gamevars_shared.cpp',
'gameweaponmanager.cpp',
'genericactor.cpp',
'genericmonster.cpp',
'gib.cpp',
'globals.cpp',
'globalstate.cpp',
'guntarget.cpp',
'h_ai.cpp',
'hierarchy.cpp',
'hltvdirector.cpp',
'../shared/hintmessage.cpp',
'../shared/hintsystem.cpp',
'../shared/igamesystem.cpp',
'info_camera_link.cpp',
'info_overlay_accessor.cpp',
'intermission.cpp',
'item_world.cpp',
'lightglow.cpp',
'lights.cpp',
'logic_measure_movement.cpp',
'logic_navigation.cpp',
'logicauto.cpp',
'logicentities.cpp',
'logicrelay.cpp',
'mapentities.cpp',
'../shared/mapentities_shared.cpp',
'maprules.cpp',
'MaterialModifyControl.cpp',
'message_entity.cpp',
'modelentities.cpp',
'../shared/ModelSoundsCache.cpp',
'movehelper_server.cpp',
'movement.cpp',
'../shared/movevars_shared.cpp',
'../shared/multiplay_gamerules.cpp',
'ndebugoverlay.cpp',
'npc_vehicledriver.cpp',
'../shared/obstacle_pushaway.cpp',
'particle_light.cpp',
'../shared/particle_parse.cpp',
'particle_system.cpp',
'../shared/particlesystemquery.cpp',
'pathcorner.cpp',
'pathtrack.cpp',
'phys_controller.cpp',
'physconstraint.cpp',
'physics.cpp',
'physics_bone_follower.cpp',
'physics_cannister.cpp',
'physics_fx.cpp',
'physics_impact_damage.cpp',
'physics_main.cpp',
'../shared/physics_main_shared.cpp',
'physics_npc_solver.cpp',
'physics_prop_ragdoll.cpp',
'../shared/physics_saverestore.cpp',
'../shared/physics_shared.cpp',
'physobj.cpp',
'player.cpp',
'player_command.cpp',
'player_lagcompensation.cpp',
'player_pickup.cpp',
'player_resource.cpp',
'playerinfomanager.cpp',
'playerlocaldata.cpp',
'plugin_check.cpp',
'../shared/point_bonusmaps_accessor.cpp',
'point_camera.cpp',
'point_devshot_camera.cpp',
'point_playermoveconstraint.cpp',
'../shared/point_posecontroller.cpp',
'point_spotlight.cpp',
'point_template.cpp',
'pointanglesensor.cpp',
'PointAngularVelocitySensor.cpp',
'pointhurt.cpp',
'pointteleport.cpp',
'../shared/precache_register.cpp',
'../shared/predictableid.cpp',
'props.cpp',
'../shared/props_shared.cpp',
'../shared/querycache.cpp',
'ragdoll_manager.cpp',
'../shared/ragdoll_shared.cpp',
'RagdollBoogie.cpp',
'recipientfilter.cpp',
'rope.cpp',
'../shared/rope_helpers.cpp',
'../shared/saverestore.cpp',
'saverestore_gamedll.cpp',
'../shared/SceneCache.cpp',
'sceneentity.cpp',
'../shared/sceneentity_shared.cpp',
'scratchpad_gamedll_helpers.cpp',
'scripted.cpp',
'scriptedtarget.cpp',
'sendproxy.cpp',
'../shared/sequence_Transitioner.cpp',
'../server/serverbenchmark_base.cpp',
'ServerNetworkProperty.cpp',
'shadowcontrol.cpp',
'../shared/simtimer.cpp',
'../shared/singleplay_gamerules.cpp',
'SkyCamera.cpp',
'slideshow_display.cpp',
'sound.cpp',
'../shared/SoundEmitterSystem.cpp',
'soundent.cpp',
'../shared/soundenvelope.cpp',
'../../public/SoundParametersInternal.cpp',
'soundscape.cpp',
'soundscape_system.cpp',
'spotlightend.cpp',
'../shared/Sprite.cpp',
'sprite_perfmonitor.cpp',
'../shared/studio_shared.cpp',
'subs.cpp',
'sun.cpp',
'tactical_mission.cpp',
'../shared/takedamageinfo.cpp',
'tanktrain.cpp',
'team.cpp',
'../shared/teamplay_gamerules.cpp',
'TemplateEntities.cpp',
'tempmonster.cpp',
'tesla.cpp',
'../shared/test_ehandle.cpp',
'test_proxytoggle.cpp',
'test_stressentities.cpp',
'testfunctions.cpp',
'testtraceline.cpp',
'textstatsmgr.cpp',
'timedeventmgr.cpp',
'trains.cpp',
'triggers.cpp',
'../shared/usercmd.cpp',
'util.cpp',
'../shared/util_shared.cpp',
'variant_t.cpp',
'vehicle_base.cpp',
'vehicle_baseserver.cpp',
'../shared/vehicle_viewblend_shared.cpp',
'vguiscreen.cpp',
'../shared/voice_gamemgr.cpp',
'waterbullet.cpp',
'WaterLODControl.cpp',
'wcedit.cpp',
'../shared/weapon_parse.cpp',
'../shared/weapon_proficiency.cpp',
'weight_button.cpp',
'world.cpp',
'../shared/mp_shareddefs.cpp',
'../server/vote_controller.cpp',
'../../public/haptics/haptic_msgs.cpp',
# '../../public/haptics/haptic_utils.cpp', [$WIN32]
'../../public/bone_setup.cpp',
'../../public/collisionutils.cpp',
'../../public/dt_send.cpp',
'../../public/dt_utlvector_common.cpp',
'../../public/dt_utlvector_send.cpp',
'../../public/editor_sendcommand.cpp',
'../../public/filesystem_helpers.cpp',
'gamehandle.cpp',
'h_export.cpp',
'init_factory.cpp',
'../../public/interpolatortypes.cpp',
'../../game/shared/interval.cpp',
'../../public/keyframe/keyframe.cpp',
'../../common/language.cpp',
'../../common/steamid.cpp',
'../../public/map_utils.cpp',
'../../public/networkvar.cpp',
'../../common/randoverride.cpp',
'../../public/registry.cpp',
'../../public/rope_physics.cpp',
'../../public/scratchpad3d.cpp',
'../../public/ScratchPadUtils.cpp',
'../../public/server_class.cpp',
'../../game/shared/sheetsimulator.cpp',
'../../public/simple_physics.cpp',
'../../public/stringregistry.cpp',
'../../public/studio.cpp',
'GameStats_BasicStatsFunctions.cpp',
'basetempentity.cpp',
'event_tempentity_tester.cpp',
'movie_explosion.cpp',
'particle_fire.cpp',
'particle_smokegrenade.cpp',
'plasma.cpp',
'smokestack.cpp',
'smoke_trail.cpp',
'../shared/SpriteTrail.cpp',
'steamjet.cpp',
'te.cpp',
'te_armorricochet.cpp',
'te_basebeam.cpp',
'te_beamentpoint.cpp',
'te_beaments.cpp',
'te_beamfollow.cpp',
'te_beamlaser.cpp',
'te_beampoints.cpp',
'te_beamring.cpp',
'te_beamringpoint.cpp',
'te_beamspline.cpp',
'te_bloodsprite.cpp',
'te_bloodstream.cpp',
'te_breakmodel.cpp',
'te_bspdecal.cpp',
'te_bubbles.cpp',
'te_bubbletrail.cpp',
'te_clientprojectile.cpp',
'te_decal.cpp',
'te_dynamiclight.cpp',
'te_effect_dispatch.cpp',
'te_energysplash.cpp',
'te_explosion.cpp',
'te_fizz.cpp',
'te_footprintdecal.cpp',
'hl2/te_gaussexplosion.cpp',
'te_glassshatter.cpp',
'te_glowsprite.cpp',
'te_impact.cpp',
'te_killplayerattachments.cpp',
'te_largefunnel.cpp',
'te_muzzleflash.cpp',
'te_particlesystem.cpp',
'te_physicsprop.cpp',
'te_playerdecal.cpp',
'te_projecteddecal.cpp',
'te_showline.cpp',
'te_smoke.cpp',
'te_sparks.cpp',
'te_sprite.cpp',
'te_spritespray.cpp',
'te_worlddecal.cpp',
'../shared/usermessages.cpp',
'entity_tools_server.cpp',
'toolframework_server.cpp'
] + [
'ai_eventresponse.cpp',
'ai_relationship.cpp',
'base_gameinterface.cpp',
'basegrenade_concussion.cpp',
'basegrenade_contact.cpp',
'basegrenade_timed.cpp',
'hl2/Func_Monitor.cpp',
'grenadethrown.cpp',
'h_cycler.cpp',
'logic_achievement.cpp',
'monstermaker.cpp',
'../shared/hl2/survival_gamerules.cpp',
'team_spawnpoint.cpp',
'vehicle_choreo_generic.cpp',
'../shared/weapon_parse_default.cpp',
'../shared/hl2/achievements_hl2.cpp',
'hl2/ai_allymanager.cpp',
'hl2/ai_behavior_actbusy.cpp',
'hl2/ai_behavior_functank.cpp',
'hl2/ai_behavior_holster.cpp',
'hl2/ai_behavior_operator.cpp',
'hl2/ai_behavior_police.cpp',
'hl2/ai_goal_police.cpp',
'hl2/ai_spotlight.cpp',
'hl2/antlion_dust.cpp',
'hl2/antlion_maker.cpp',
'hl2/ar2_explosion.cpp',
'basebludgeonweapon.cpp',
'hl2/basehlcombatweapon.cpp',
'../shared/hl2/basehlcombatweapon_shared.cpp',
'hl2/cbasehelicopter.cpp',
'hl2/cbasespriteprojectile.cpp',
'hl2/citadel_effects.cpp',
'hl2/combine_mine.cpp',
'hl2/env_alyxemp.cpp',
'hl2/env_headcrabcanister.cpp',
'../shared/hl2/env_headcrabcanister_shared.cpp',
'hl2/env_speaker.cpp',
'hl2/env_starfield.cpp',
'hl2/func_recharge.cpp',
'hl2/func_tank.cpp',
'hl2/grenade_ar2.cpp',
'hl2/grenade_bugbait.cpp',
'hl2/grenade_frag.cpp',
'hl2/hl2_ai_network.cpp',
'hl2/hl2_client.cpp',
'hl2/hl2_eventlog.cpp',
'../shared/hl2/hl2_gamerules.cpp',
'hl2/hl2_gamestats.cpp',
'hl2/hl2_player.cpp',
'hl2/hl2_playerlocaldata.cpp',
'hl2/hl2_triggers.cpp',
'../shared/hl2/hl2_usermessages.cpp',
'../shared/hl2/hl_gamemovement.cpp',
'hl2/hl_playermove.cpp',
'hl2/info_darknessmode_lightsource.cpp',
'hl2/info_teleporter_countdown.cpp',
'hl2/item_ammo.cpp',
'hl2/item_battery.cpp',
'hl2/item_dynamic_resupply.cpp',
'hl2/item_healthkit.cpp',
'hl2/item_itemcrate.cpp',
'hl2/item_suit.cpp',
'hl2/look_door.cpp',
'hl2/monster_dummy.cpp',
'hl2/npc_alyx.cpp',
'hl2/npc_antlion.cpp',
'hl2/npc_antlionguard.cpp',
'hl2/npc_apcdriver.cpp',
'hl2/npc_attackchopper.cpp',
'hl2/npc_barnacle.cpp',
'hl2/npc_barney.cpp',
'hl2/npc_basescanner.cpp',
'hl2/npc_BaseZombie.cpp',
'hl2/npc_blob.cpp',
'hl2/npc_breen.cpp',
'hl2/npc_bullseye.cpp',
'hl2/npc_citizen17.cpp',
'hl2/npc_combine.cpp',
'hl2/npc_combinecamera.cpp',
'hl2/npc_combinedropship.cpp',
'hl2/npc_combinegunship.cpp',
'hl2/npc_combines.cpp',
'hl2/npc_cranedriver.cpp',
'hl2/npc_crow.cpp',
'hl2/npc_dog.cpp',
'hl2/npc_eli.cpp',
'hl2/npc_enemyfinder.cpp',
'hl2/npc_fastzombie.cpp',
'hl2/npc_fisherman.cpp',
'hl2/npc_gman.cpp',
'hl2/npc_headcrab.cpp',
'hl2/npc_ichthyosaur.cpp',
'hl2/npc_kleiner.cpp',
'hl2/npc_launcher.cpp',
'hl2/npc_manhack.cpp',
'hl2/npc_metropolice.cpp',
'hl2/npc_monk.cpp',
'hl2/npc_mossman.cpp',
'hl2/npc_playercompanion.cpp',
'hl2/npc_PoisonZombie.cpp',
'hl2/npc_rollermine.cpp',
'hl2/npc_scanner.cpp',
'hl2/npc_stalker.cpp',
'hl2/npc_strider.cpp',
'npc_talker.cpp',
'hl2/npc_turret_ceiling.cpp',
'hl2/npc_turret_floor.cpp',
'hl2/npc_turret_ground.cpp',
'hl2/npc_vortigaunt_episodic.cpp',
'hl2/npc_zombie.cpp',
'hl2/point_apc_controller.cpp',
'hl2/prop_combine_ball.cpp',
'hl2/prop_thumper.cpp',
'hl2/proto_sniper.cpp',
'hl2/rotorwash.cpp',
'hl2/script_intro.cpp',
'../shared/script_intro_shared.cpp',
'hl2/vehicle_airboat.cpp',
'hl2/vehicle_cannon.cpp',
'hl2/vehicle_crane.cpp',
'hl2/vehicle_jeep.cpp',
'hl2/vehicle_prisoner_pod.cpp',
'hl2/vehicle_viewcontroller.cpp',
'hl2/weapon_357.cpp',
'hl2/weapon_alyxgun.cpp',
'hl2/weapon_annabelle.cpp',
'hl2/weapon_ar2.cpp',
'hl2/weapon_bugbait.cpp',
'hl2/weapon_citizenpackage.cpp',
'hl2/weapon_crossbow.cpp',
'hl2/weapon_crowbar.cpp',
'weapon_cubemap.cpp',
'hl2/weapon_frag.cpp',
'hl2/weapon_physcannon.cpp',
'hl2/weapon_pistol.cpp',
'hl2/weapon_rpg.cpp',
'hl2/weapon_shotgun.cpp',
'hl2/weapon_smg1.cpp',
'hl2/weapon_stunstick.cpp',
'hl2/grenade_beam.cpp',
'hl2/grenade_homer.cpp',
'hl2/grenade_pathfollower.cpp',
'hl2/npc_missiledefense.cpp',
'hl2/vehicle_apc.cpp',
'hl2/weapon_cguard.cpp',
'hl2/weapon_flaregun.cpp'
]
game = vpc_parser.parse_vpcs( bld.env, games[bld.env.GAMES], '../..' )
includes = [
'.',
@ -593,9 +49,6 @@ def build(bld):
'../../public/tier0',
'../../public/tier1',
'../../public'
] + [
'../shared/hl2',
'hl2'
]
defines = []
@ -606,6 +59,12 @@ def build(bld):
if bld.env.DEST_OS != 'android':
install_path += '/hl2/bin'
source = game["sources"]
includes += game["includes"]
defines = game["defines"]
defines.remove('PROTECTED_THINGS_ENABLE')
bld.shlib(
source = source,
target = PROJECT_NAME,

2
ivp

@ -1 +1 @@
Subproject commit 64e06cde5f7b651eb794a5c46ac1ceae198ec182
Subproject commit 82849306f728db57868d7a82fe7bcff333eb468c

View File

@ -0,0 +1,181 @@
# It looks like shit, but I'm not particularly worried about such scripts.
import os
import re
token_list = [
re.compile(r'&&'),
re.compile(r'\|\|'),
re.compile(r'\!'),
re.compile(r'[a-zA-Z0-9_.]*')
]
match_statement = re.compile(r'\[.*\]')
def compute_statement( defines, statement ):
vars = {}
for define in defines:
d=define.split('=')[0]
vars.update({d:True})
def t( op ):
if op == '1': return True
elif op == '0': return False
elif op not in vars: return False
return vars[op]
pos = 0
statement = re.sub(r'\[|\]| |\$', '', statement)
l = []
final = True
final_init = False
while pos < len(statement):
for token in token_list:
r = token.search(statement, pos)
if r and r.start() == pos:
l += [r.group(0)]
pos = r.end()
k = 0
for i in range(len(l)):
j = i-k
if l[j] == '!' and j+1 < len(l):
df = l[j+1]
if df in vars:
vars[df] = not vars[df]
else: vars.update({df:True})
del l[j]
k += 1
k = 0
for i in range(len(l)):
j = i-k
if l[j] == '&&' and j+1 < len(l) and j-1 >= 0:
val = 0
if t(l[j-1]) and t(l[j+1]):
val = 1
del l[j+1], l[j], l[j-1]
l.insert(j, str(val))
k += 2
k = 0
for i in range(len(l)):
j = i-k
if l[j] == '||' and j+1 < len(l) and j-1 >= 0:
val = 0
if t(l[j-1]) or t(l[j+1]):
val = 1
del l[j+1], l[j], l[j-1]
l.insert(j, str(val))
k += 2
return t(l[0])
def project_key(l):
for k in l.keys():
if '$Project' in k:
return k
def fix_dos_path( path ):
path = path.replace('\\', '/')
p = path.split('/')
filename = p[-1]
find_path = '/'.join(p[0:len(p)-1])
if find_path == '': find_path = './'
else: find_path += '/'
dirlist = os.listdir(find_path)
for file in dirlist:
if file == filename:
return find_path+file
elif file.lower() == filename.lower():
return find_path+file
return find_path+filename
def parse_vpcs( env ,vpcs, basedir ):
back_path = os.path.abspath('.')
os.chdir(env.SUBPROJECT_PATH[0])
sources = []
defines = []
includes = []
for vpc in vpcs:
f=open(vpc, 'r').read().replace('\\\n', ';')
l = f.split('\n')
iBrackets = 0
next_br = False
ret = {}
cur_key = ''
for i in l:
if i == '': continue
s = match_statement.search(i)
if s and not compute_statement(env.DEFINES+defines, s.group(0)):
continue
if i.startswith('$') and iBrackets == 0:
ret.update({i:[]})
cur_key = i
next_br = True
elif i == '{':
iBrackets += 1
next_br = False
elif i == '}':
iBrackets -= 1
elif iBrackets > 0:
ret[cur_key].append(i)
if next_br:
next_br = False
key = project_key(ret)
l=ret[key]
for i in l:
if '-$File' in i and '.h"' not in i:
for k in i.split(';'):
k = k.replace('$SRCDIR', basedir)
s = fix_dos_path(k.split('"')[1])
for j in range(len(sources)):
if sources[j] == s:
del sources[j]
break
elif '$File' in i and '.h"' not in i:
for j in i.split(';'):
j = j.replace('$SRCDIR', basedir)
s = fix_dos_path(j.split('"')[1])
sources.append(s)
for i in ret['$Configuration']:
if '$PreprocessorDefinitions' in i:
i = i.replace('$BASE', '')
s = i.split('"')[1]
s = re.split(';|,', s)
for j in s:
if j != '' and j not in defines:
defines.append(j)
if '$AdditionalIncludeDirectories' in i:
i = i.replace('$BASE', '').replace('$SRCDIR', basedir)
s = i.split('"')[1]
s = re.split(';|,', s)
for j in s:
j = j.replace('\\','/')
if j != '' and j not in includes:
includes.append(j)
os.chdir(back_path)
return {'defines':defines, 'includes':includes, 'sources': sources}

17
wscript
View File

@ -112,8 +112,6 @@ projects={
]
}
@Configure.conf
def check_pkg(conf, package, uselib_store, fragment, *k, **kw):
errormsg = '{0} not available! Install {0} development package. Also you may need to set PKG_CONFIG_PATH environment variable'.format(package)
@ -201,6 +199,9 @@ def options(opt):
grp.add_option('--use-togl', action = 'store', dest = 'GL', type = 'int', default = True,
help = 'build engine with ToGL [default: %default]')
grp.add_option('--build-games', action = 'store', dest = 'GAMES', type = 'string', default = 'hl2',
help = 'build games [default: %default]')
grp.add_option('--use-ccache', action = 'store_true', dest = 'CCACHE', default = False,
help = 'build using ccache [default: %default]')
@ -214,7 +215,6 @@ def options(opt):
opt.load('reconfigure')
def configure(conf):
conf.load('fwgslib reconfigure')
# Force XP compability, all build targets should add
@ -245,6 +245,7 @@ def configure(conf):
'-Winit-self',
'-Wstrict-aliasing',
'-faligned-new'
# '-Werror=strict-aliasing'
]
c_compiler_optional_flags = [
@ -267,9 +268,15 @@ def configure(conf):
]
if conf.env.DEST_CPU == 'arm':
flags += ['-mfpu=neon', '-fsigned-char']
flags += ['-fsigned-char', '-mfpu=neon']
if conf.env.DEST_OS == 'android':
flags += ['-mcpu=cortex-a15', '-mtune=cortex-a15']
else:
flags += ['-march=native', '-mtune=native']
else:
flags += ['-march=pentium4','-mtune=core2','-mfpmath=387']
flags += ['-march=native','-mtune=native','-mfpmath=sse', '-msse', '-msse2']
cflags += flags
linkflags += flags