From b74ebc666870a52d36e8a80b40bbb5e8d7f0e3db Mon Sep 17 00:00:00 2001 From: Jack Back Date: Wed, 20 Mar 2024 18:06:12 +0100 Subject: [PATCH] build: crazy workflow idea 81 --- .gitea/scripts/ci.sh | 4 ++-- iw5/scripts/mp/_utility.gsh | 24 ++++++++++-------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.gitea/scripts/ci.sh b/.gitea/scripts/ci.sh index 4e30b75..bfcb3f1 100755 --- a/.gitea/scripts/ci.sh +++ b/.gitea/scripts/ci.sh @@ -10,10 +10,10 @@ cd .. cp iw4/scripts/mp/_jump.gsc build/iw4 # replace gsc extension with cpp so GCC is happy -mv iw5/scripts/mp/_jump.gsc iw5/scripts/mp/_jump.cpp +mv iw5/scripts/mp/_jump.c iw5/scripts/mp/_jump.cpp # perform macro expansion -g++ -std=c++20 -D_UTILITY_DEBUG -DIW5 -DCI -E "iw5/scripts/mp/_jump.cpp" -o _jump.in +gcc -D_UTILITY_DEBUG -DIW5 -DCI -E "iw5/scripts/mp/_jump.c" -o _jump.in # remove things gcc added to the file python3 .gitea/scripts/clean.py _jump.in _jump.gsc diff --git a/iw5/scripts/mp/_utility.gsh b/iw5/scripts/mp/_utility.gsh index f3f99fd..bf189c3 100644 --- a/iw5/scripts/mp/_utility.gsh +++ b/iw5/scripts/mp/_utility.gsh @@ -40,25 +40,21 @@ /* Do not use the + to concatenate strings, let the GSC VM do it for you */ /* Other clients will have print available */ #if defined(IW4MP) - #define PRINT_FUNC printConsole + #define PRINT_FUNC_NAME printConsole #else - #define PRINT_FUNC print -#endif - -#if !defined(TOOL) - PRINT_FUNC( format __VA_OPT__(,) __VA_ARGS__ ) + #define PRINT_FUNC_NAME print #endif #ifdef _UTILITY_DEBUG -#define _VERIFY( cond, msg ) \ - assertEx(cond, msg) + #define _VERIFY(cond, msg) \ + assertEx( cond, msg ) -#define DEBUG_PRINT(msg) \ - PRINT_FUNC(msg) + #define DEBUG_PRINT(msg) \ + PRINT_FUNC_NAME( msg ) #else -/* The following are "empty" defines with gsc-tool */ -#define _VERIFY(cond, msg) -#define DEBUG_PRINT(msg) + /* The following are "empty" defines with gsc-tool */ + #define _VERIFY(cond, msg) + #define DEBUG_PRINT(msg) #endif /* Use Cbuf. Should use the + to concatenate strings before using this */ @@ -106,7 +102,7 @@ #endif #if !defined(TOOL) -#define PLAYER_NOTIFY_CMD(ent, str, action) ent notifyOnPlayerCommand( str, action ) + #define PLAYER_NOTIFY_CMD(ent, str, action) ent notifyOnPlayerCommand( str, action ) #endif /* Tweak as necessary. Can be return, continue or break */