mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
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:
parent
37021b1464
commit
1ad0f7b149
1
.vscode/c_cpp_properties.json
vendored
1
.vscode/c_cpp_properties.json
vendored
@ -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"
|
||||||
],
|
],
|
||||||
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -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": [
|
||||||
|
2
Doxyfile
2
Doxyfile
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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 }
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user