Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 25 additions & 98 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,111 +1,38 @@
name: Build

on: [push, pull_request]

jobs:
build-linux-i386:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build linux-i386
run: |
scripts/build-ubuntu-i386.sh

build-linux-amd64:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Build linux-amd64
run: |
scripts/build-ubuntu-amd64.sh

build-android-armv7a:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Build android-armv7a
run: |
scripts/build-android-armv7a.sh

build-windows-i386:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- name: Build windows-i386
run: |
git submodule init && git submodule update
./waf.bat configure -T debug --32bits
./waf.bat build

build-windows-amd64:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- name: Build windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug
./waf.bat build

build-dedicated-windows-i386:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- name: Build dedicated windows-i386
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -d
./waf.bat build

build-dedicated-windows-amd64:
runs-on: windows-2019

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build dedicated windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -d
./waf.bat build

build-dedicated-linux-i386:
runs-on: ubuntu-20.04
- name: Checkout Repository
uses: actions/checkout@v4

steps:
- uses: actions/checkout@v2
- name: Build dedicated linux-i386
run: |
scripts/build-ubuntu-i386.sh -d
- name: Build android-armv7a
run: |
chmod +x scripts/build-android-armv7a.sh
./scripts/build-android-armv7a.sh

build-dedicated-linux-amd64:
runs-on: ubuntu-20.04
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-armv7a-bundle
path: build/**/*.so # build klasörü altındaki tüm .so dosyalarını seçer

build-android-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build dedicated linux-amd64
run: |
scripts/build-ubuntu-amd64.sh -d
- name: Checkout Repository
uses: actions/checkout@v4

build-macos-amd64:
runs-on: macos-latest
- name: Build android-arm64
run: |
chmod +x scripts/build-android-arm64.sh
./scripts/build-android-arm64.sh

steps:
- uses: actions/checkout@v2
- name: Build macos-amd64
run: |
scripts/build-macos-amd64.sh

build-dedicated-macos-amd64:
runs-on: macos-latest
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-arm64-bundle
path: build/**/*.so # build klasörü altındaki tüm .so dosyalarını seçer

steps:
- uses: actions/checkout@v2
- name: Build dedicated macos-amd64
run: |
scripts/build-macos-amd64.sh -d
15 changes: 15 additions & 0 deletions common/sse2neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,21 @@ typedef float64x2_t __m128d; /* 128-bit vector containing 2 doubles */
#else
typedef float32x4_t __m128d;
#endif

#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 8)
// Workaround for missing double-precision reinterpret intrinsics in older GCC
FORCE_INLINE int64x2_t vreinterpretq_s64_f64(float64x2_t x) { return (int64x2_t)x; }
FORCE_INLINE float64x2_t vreinterpretq_f64_s64(int64x2_t x) { return (float64x2_t)x; }
FORCE_INLINE float64x2_t vreinterpretq_f64_s32(int32x4_t x) { return (float64x2_t)x; }
FORCE_INLINE int32x4_t vreinterpretq_s32_f64(float64x2_t x) { return (int32x4_t)x; }
FORCE_INLINE float64x2_t vreinterpretq_f64_u64(uint64x2_t x) { return (float64x2_t)x; }
FORCE_INLINE uint64x2_t vreinterpretq_u64_f64(float64x2_t x) { return (uint64x2_t)x; }
FORCE_INLINE float64x2_t vreinterpretq_f64_u32(uint32x4_t x) { return (float64x2_t)x; }
FORCE_INLINE uint32x4_t vreinterpretq_u32_f64(float64x2_t x) { return (uint32x4_t)x; }
FORCE_INLINE float32x4_t vreinterpretq_f32_f64(float64x2_t x) { return (float32x4_t)x; }
FORCE_INLINE float64x2_t vreinterpretq_f64_f32(float32x4_t x) { return (float64x2_t)x; }
#endif

typedef int64x2_t __m128i; /* 128-bit vector containing integers */

// __int64 is defined in the Intrinsics Guide which maps to different datatype
Expand Down
81 changes: 78 additions & 3 deletions game/client/cdll_client_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ extern vgui::IInputInternal *g_InputInternal;
#include "sixense/in_sixense.h"
#endif

#if defined( GAMEPADUI )
#include "../gamepadui/igamepadui.h"
#endif // GAMEPADUI

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

Expand Down Expand Up @@ -217,6 +221,10 @@ IEngineClientReplay *g_pEngineClientReplay = NULL;
IReplaySystem *g_pReplay = NULL;
#endif

#if defined(GAMEPADUI)
IGamepadUI* g_pGamepadUI = nullptr;
#endif // GAMEPADUI

IHaptics* haptics = NULL;// NVNT haptics system interface singleton

//=============================================================================
Expand Down Expand Up @@ -1156,6 +1164,43 @@ void CHLClient::PostInit()
}
}
#endif

#if defined(GAMEPADUI)
if ( IsSteamDeck() )
{
CSysModule* pGamepadUIModule = g_pFullFileSystem->LoadModule( "gamepadui", "GAMEBIN", false );
if ( pGamepadUIModule != nullptr )
{
GamepadUI_Log( "Loaded gamepadui module.\n" );

CreateInterfaceFn gamepaduiFactory = Sys_GetFactory( pGamepadUIModule );
if ( gamepaduiFactory != nullptr )
{
g_pGamepadUI = (IGamepadUI*) gamepaduiFactory( GAMEPADUI_INTERFACE_VERSION, NULL );
if ( g_pGamepadUI != nullptr )
{
GamepadUI_Log( "Initializing IGamepadUI interface...\n" );

factorylist_t factories;
FactoryList_Retrieve( factories );
g_pGamepadUI->Initialize( factories.appSystemFactory );
}
else
{
GamepadUI_Log( "Unable to pull IGamepadUI interface.\n" );
}
}
else
{
GamepadUI_Log( "Unable to get gamepadui factory.\n" );
}
}
else
{
GamepadUI_Log( "Unable to load gamepadui module\n" );
}
}
#endif // GAMEPADUI
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1196,9 +1241,13 @@ void CHLClient::Shutdown( void )
UncacheAllMaterials();

IGameSystem::ShutdownAllSystems();

gHUD.Shutdown();
VGui_Shutdown();

#if defined(GAMEPADUI)
if (g_pGamepadUI != nullptr)
g_pGamepadUI->Shutdown();
#endif // GAMEPADUI

gHUD.Shutdown(); VGui_Shutdown();
gTouch.Shutdown();

ParticleMgr()->Term();
Expand Down Expand Up @@ -1243,6 +1292,11 @@ int CHLClient::HudVidInit( void )

GetClientVoiceMgr()->VidInit();

#if defined(GAMEPADUI)
if (g_pGamepadUI != nullptr)
g_pGamepadUI->VidInit();
#endif // GAMEPADUI

return 1;
}

Expand Down Expand Up @@ -1293,6 +1347,11 @@ void CHLClient::HudUpdate( bool bActive )
g_pSixenseInput->SixenseFrame( 0, NULL );
}
#endif

#if defined(GAMEPADUI)
if (g_pGamepadUI != nullptr)
g_pGamepadUI->OnUpdate( frametime );
#endif // GAMEPADUI
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1640,6 +1699,11 @@ void CHLClient::LevelInitPreEntity( char const* pMapName )
CReplayRagdollRecorder::Instance().Init();
}
#endif

#if defined(GAMEPADUI)
if (g_pGamepadUI != nullptr)
g_pGamepadUI->OnLevelInitializePreEntity();
#endif // GAMEPADUI
}


Expand All @@ -1651,6 +1715,11 @@ void CHLClient::LevelInitPostEntity( )
IGameSystem::LevelInitPostEntityAllSystems();
C_PhysPropClientside::RecreateAll();
internalCenterPrint->Clear();

#if defined(GAMEPADUI)
if (g_pGamepadUI != nullptr)
g_pGamepadUI->OnLevelInitializePostEntity();
#endif // GAMEPADUI
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1717,6 +1786,11 @@ void CHLClient::LevelShutdown( void )

StopAllRumbleEffects();

#if defined(GAMEPADUI)
if (g_pGamepadUI != nullptr)
g_pGamepadUI->OnLevelShutdown();
#endif // GAMEPADUI

gHUD.LevelShutdown();

internalCenterPrint->Clear();
Expand Down Expand Up @@ -2655,3 +2729,4 @@ void CHLClient::IN_TouchEvent( int type, int fingerId, int x, int y )

gTouch.ProcessEvent( &ev );
}

2 changes: 1 addition & 1 deletion game/client/client_base.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories ".\;$BASE;$SRCDIR\vgui2\include;$SRCDIR\vgui2\controls;$SRCDIR\game\shared;.\game_controls;$SRCDIR\thirdparty\sixensesdk\include"
$PreprocessorDefinitions "$BASE;NO_STRING_T;CLIENT_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead"
$PreprocessorDefinitions "$BASE;NO_STRING_T;CLIENT_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead;GAMEPADUI"
$PreprocessorDefinitions "$BASE;ENABLE_CHROMEHTMLWINDOW;fopen=dont_use_fopen" [$WIN32]
$PreprocessorDefinitions "$BASE;ENABLE_CHROMEHTMLWINDOW;" [$OSXALL]
$PreprocessorDefinitions "$BASE;ENABLE_CHROMEHTMLWINDOW;USE_WEBM_FOR_REPLAY;" [$LINUXALL]
Expand Down
2 changes: 1 addition & 1 deletion game/client/client_episodic.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories ".\hl2;.\hl2\elements;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\episodic;..\..\public;$BASE"
$PreprocessorDefinitions "$BASE;HL2_CLIENT_DLL;HL2_EPISODIC"
$PreprocessorDefinitions "$BASE;HL2_CLIENT_DLL;HL2_EPISODIC;GAMEPADUI"
}
}

Expand Down
2 changes: 1 addition & 1 deletion game/client/client_hl2.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories ".\hl2;.\hl2\elements;$SRCDIR\game\shared\hl2;$BASE"
$PreprocessorDefinitions "$BASE;HL2_CLIENT_DLL"
$PreprocessorDefinitions "$BASE;HL2_CLIENT_DLL;GAMEPADUI"
}
}

Expand Down
2 changes: 1 addition & 1 deletion game/client/client_portal.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $Configuration
$Compiler
{
$AdditionalIncludeDirectories ".\hl2;.\hl2\elements;.\portal;.\portal\vgui;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\Multiplayer;$SRCDIR\gcsdk\steamextra;$SRCDIR\game\shared\portal;$BASE"
$PreprocessorDefinitions "$BASE;PORTAL;HL2_EPISODIC;HL2_CLIENT_DLL"
$PreprocessorDefinitions "$BASE;PORTAL;HL2_EPISODIC;HL2_CLIENT_DLL;GAMEPADUI"
}
}

Expand Down
2 changes: 1 addition & 1 deletion game/client/touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ void CTouchControls::CreateAtlasTexture()
int atlasSize = 0;

stbrp_rect *rects = (stbrp_rect*)malloc(textureList.Count()*sizeof(stbrp_rect));
memset(rects, 0, sizeof(stbrp_node)*textureList.Count());
memset(rects, 0, sizeof(stbrp_rect)*textureList.Count());

if( touchTextureID )
vgui::surface()->DeleteTextureByID( touchTextureID );
Expand Down
1 change: 1 addition & 0 deletions game/client/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def build(bld):
source += game["sources"] + ['../../public/tier0/memoverride.cpp']
includes += game["includes"]
defines = game["defines"]
defines += ['GAMEPADUI']

defines.remove('PROTECTED_THINGS_ENABLE')

Expand Down
Loading