Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit c17b83b

Browse files
authored
Merge branch 'Sectonidse:master' into master
2 parents 2eadfb3 + dfef4e9 commit c17b83b

File tree

6 files changed

+34
-27
lines changed

6 files changed

+34
-27
lines changed

.github/workflows/compile.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,30 @@ permissions:
2424
contents: read
2525

2626
jobs:
27-
build:
27+
Shaders:
2828
runs-on: windows-latest
29-
3029
steps:
3130
- uses: actions/checkout@v4
3231

33-
- name: Add MSBuild to PATH
34-
uses: microsoft/[email protected]
35-
3632
# ENABLE THIS ON FIRST TIME SETUP
3733
#- name: Install Strawberry Perl for Shaders compilation
3834
# run: choco install strawberryperl
3935

4036
- name: Install Shader Dependencies
4137
run: cpan String::CRC32
4238

43-
4439
- name: Compile Shaders
4540
working-directory: ${{env.GITHUB_WORKSPACE}}
46-
run: ./materialsystem/swarmshaders/buildshaders.bat game_shader_generic_swarm deferred_shaders
41+
run: ./materialsystem/swarmshaders/buildshaders.bat deferred_shaders
42+
43+
44+
Game:
45+
runs-on: windows-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Add MSBuild to PATH
50+
uses: microsoft/[email protected]
4751

4852
- name: Build
4953
working-directory: ${{env.GITHUB_WORKSPACE}}

devtools/bin/valve_perl_helpers.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ sub LoadShaderListFile
362362
my $inputbase = shift;
363363

364364
my @srcfiles;
365-
&MakeSureFileExists( "$inputbase.txt", 1, 0 );
365+
366+
# Why was it checking if directory is a file?
367+
# &MakeSureFileExists( "$inputbase.txt", 1, 0 );
366368

367369
open SHADERLISTFILE, "<$inputbase.txt" || die;
368370
my $line;

materialsystem/swarmshaders/buildshaders.bat

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
@echo off
2+
echo ----------[ DEFUN buildshaders ]----------
23

34
set TTEXE=time /t
4-
5-
echo.
6-
echo -----<| buildshaders |>-----
75
%TTEXE% -cur-Q
86
set tt_start=%ERRORLEVEL%
97
set tt_chkpt=%tt_start%
108

119

12-
REM ****************
1310
REM usage: buildshaders <shaderProjectName>
14-
REM ****************
11+
12+
echo Program started at %TTEXE%
1513

1614
setlocal
1715
set arg_filename=%1
1816
set shadercompilecommand=shadercompile.exe
1917
set targetdir=shaders
20-
set SrcDirBase=../..
18+
set SrcDirBase=.
2119
set shaderDir=shaders
2220
set SDKArgs=
2321
set SHADERINCPATH=vshtmp9/... fxctmp9/... include/...
@@ -82,21 +80,20 @@ REM ****************
8280
REM ERRORS
8381
REM ****************
8482
:InvalidGameDirectory
85-
echo -
86-
echo Error: "%~3" is not a valid game directory.
87-
echo (The -game directory must have a gameinfo.txt file)
88-
echo -
83+
echo "-----X[ ERROR ]X-----"
84+
echo"%~3" is not a valid game directory.
85+
echo └ (The -game directory must have a gameinfo.txt file)
8986
goto end
9087

9188
:NoSourceDirSpecified
92-
echo ERROR: If you specify -game on the command line, you must specify -source.
89+
echo "-----X[ ERROR ]X-----"
90+
echo "└ If you specify -game on the command line, you must specify -source."
9391
goto usage
9492
goto end
9593

9694
:NoShaderCompile
97-
echo -
98-
echo - ERROR: shadercompile.exe doesn't exist in %SDKBINDIR%
99-
echo -
95+
echo "-----X[ ERROR ]X-----"
96+
echo "└ shadercompile.exe doesn't exist in %SDKBINDIR%"
10097
goto end
10198

10299
REM ****************
@@ -123,7 +120,7 @@ if exist vcslist.txt del /f /q vcslist.txt
123120
REM ****************
124121
REM Generate a makefile for the shader project
125122
REM ****************
126-
perl %SrcDirBase%/devtools/bin/updateshaders.pl -source .
123+
perl %SrcDirBase%/devtools/bin/updateshaders.pl -source %inputbase%
127124

128125

129126
REM ****************
@@ -132,7 +129,8 @@ REM ****************
132129
rem cmake -G "NMake Makefiles" /S /C /F ./makefile.%inputbase%
133130
echo Building inc files, asm vcs files, and VMPI worklist for %inputbase%...
134131
REM https://cmake.org/cmake/help/v3.30/generator/NMake%20Makefiles.html very helpful of you cmake
135-
cmake -G "NMake Makefiles" /S ./makefile.%inputbase%
132+
cmake -G "NMake Makefiles" ./materialsystem/swarmshaders/
133+
nmake
136134

137135
REM ****************
138136
REM Copy the inc files to their target

public/tier0/platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ struct CPUInformation
11181118

11191119
tchar* m_szProcessorID; // Processor vendor Identification.
11201120

1121-
CPUInformation(): m_Size(0){}
1121+
// CPUInformation(): m_Size(0){}
11221122
};
11231123

11241124
PLATFORM_INTERFACE const CPUInformation& GetCPUInformation();

public/tier1/UtlSortVector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void CUtlSortVector<T, LessFunc>::QuickSort( LessFunc& less, int nLower, int nUp
177177
ctx.m_pLessContext = m_pLessContext;
178178
ctx.m_pLessFunc = &less;
179179

180-
qsort_s( Base(), Count(), sizeof(T), (QSortCompareFunc_t)&CUtlSortVector<T, LessFunc>::CompareHelper, &ctx );
180+
qsort_s( this->Base(), this->Count(), sizeof(T), (QSortCompareFunc_t)&CUtlSortVector<T, LessFunc>::CompareHelper, &ctx );
181181
}
182182
#else
183183
typedef int (__cdecl *QSortCompareFunc_t)( const void *, const void *);

public/tier1/convar.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
1+
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
22
//
33
// Purpose:
44
//
@@ -16,6 +16,9 @@
1616
#pragma once
1717
#endif
1818

19+
// This is for fixing "error LNK2019: unresolved external symbol _sscanf referenced in ConVar::InternalSetColorFromString"
20+
#pragma comment (lib, "legacy_stdio_definitions.lib")
21+
1922
#include "tier0/dbg.h"
2023
#include "tier1/iconvar.h"
2124
#include "tier1/utlvector.h"

0 commit comments

Comments
 (0)