Fix 'badly punctuated parameter list in define' issues (#777)

* remove defines of old SCRIPT macro

* get rid of uses of unnamed ...
This commit is contained in:
Alex Bates 2022-09-16 19:27:35 +01:00 committed by GitHub
parent 37021b1464
commit 1ad0f7b149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 19 deletions

View File

@ -20,7 +20,6 @@
"F3DEX_GBI_2", "F3DEX_GBI_2",
"_LANGUAGE_C", "_LANGUAGE_C",
"_MIPS_SZLONG=32", "_MIPS_SZLONG=32",
"SCRIPT(...)={}",
"VERSION=us", "VERSION=us",
"VERSION_US" "VERSION_US"
], ],

View File

@ -9,7 +9,6 @@
"-Iver/current/build/include", "-Iver/current/build/include",
"-Isrc", "-Isrc",
"-D_LANGUAGE_C", "-D_LANGUAGE_C",
"-DSCRIPT(...)={}",
"-Wall" "-Wall"
], ],
"clang-tidy.blacklist": [ "clang-tidy.blacklist": [

View File

@ -103,7 +103,7 @@ GENERATE_LATEX = NO
ENABLE_PREPROCESSING = YES ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES EXPAND_ONLY_PREDEF = YES
PREDEFINED = DOXYGEN NON_MATCHING SCRIPT(...)={} __attribute__((x))= PREDEFINED = DOXYGEN NON_MATCHING __attribute__((x))=
EXPAND_AS_DEFINED = INCLUDE_ASM UNK_TYPE UNK_PTR UNK_RET UNK_FUN_ARG UNK_FUN_PTR UNK_ARGS M EXPAND_AS_DEFINED = INCLUDE_ASM UNK_TYPE UNK_PTR UNK_RET UNK_FUN_ARG UNK_FUN_PTR UNK_ARGS M
SKIP_FUNCTION_MACROS = YES SKIP_FUNCTION_MACROS = YES

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
COMPILER_OPTS="-std=gnu89 -Iinclude -Isrc -D_LANGUAGE_C -DSCRIPT(...)={}" COMPILER_OPTS="-std=gnu89 -Iinclude -Isrc -D_LANGUAGE_C"
shopt -s globstar shopt -s globstar

View File

@ -146,9 +146,4 @@
#define VAR_PROJECTILE_HITBOX_STATE varTable[0] #define VAR_PROJECTILE_HITBOX_STATE varTable[0]
#define AI_PROJECTILE_AMMO_COUNT varTable[3] #define AI_PROJECTILE_AMMO_COUNT varTable[3]
#ifdef PERMUTER
#undef SCRIPT
#define SCRIPT(...) {}
#endif
#endif #endif

View File

@ -5,8 +5,8 @@
#include "enums.h" #include "enums.h"
#include "script_api/map.h" #include "script_api/map.h"
#define GET_MACRO(_1,_2,_3,NAME,...) NAME #define GET_MACRO(_1,_2,_3,NAME,ARGS...) NAME
#define NPC_GROUP(...) GET_MACRO(__VA_ARGS__, NPC_GROUP_3, NPC_GROUP_2, NPC_GROUP_1)(__VA_ARGS__) #define NPC_GROUP(ARGS...) GET_MACRO(ARGS, NPC_GROUP_3, NPC_GROUP_2, NPC_GROUP_1)(ARGS)
// battle and stage are optional in overloaded NPC_GROUP macros // battle and stage are optional in overloaded NPC_GROUP macros
#define NPC_GROUP_1(npcs) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, 0, 0 } #define NPC_GROUP_1(npcs) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, 0, 0 }

View File

@ -3,20 +3,20 @@
#include "script_api/macros.h" #include "script_api/macros.h"
#define SpeakToPlayer(...) \ #define SpeakToPlayer(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_SpeakToPlayer, ##__VA_ARGS__), _EVT_CMD(EVT_OP_CALL, evt_SpeakToPlayer, ##ARGS),
ApiStatus evt_SpeakToPlayer(Evt* script, s32 isInitialCall); ApiStatus evt_SpeakToPlayer(Evt* script, s32 isInitialCall);
#define EndSpeech(...) \ #define EndSpeech(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_EndSpeech, ##__VA_ARGS__), _EVT_CMD(EVT_OP_CALL, evt_EndSpeech, ##ARGS),
ApiStatus evt_EndSpeech(Evt* script, s32 isInitialCall); ApiStatus evt_EndSpeech(Evt* script, s32 isInitialCall);
#define ContinueSpeech(...) \ #define ContinueSpeech(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_ContinueSpeech, ##__VA_ARGS__), _EVT_CMD(EVT_OP_CALL, evt_ContinueSpeech, ##ARGS),
ApiStatus evt_ContinueSpeech(Evt* script, s32 isInitialCall); ApiStatus evt_ContinueSpeech(Evt* script, s32 isInitialCall);
#define SpeakToNpc(...) \ #define SpeakToNpc(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_SpeakToNpc, ##__VA_ARGS__), _EVT_CMD(EVT_OP_CALL, evt_SpeakToNpc, ##ARGS),
ApiStatus evt_SpeakToNpc(Evt* script, s32 isInitialCall); ApiStatus evt_SpeakToNpc(Evt* script, s32 isInitialCall);
#endif #endif