mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
LASTEXPRESS: Cleanup unused arguments from BEGIN_SETUP macro
This commit is contained in:
parent
813c2bb965
commit
2d6f799235
@ -111,14 +111,14 @@ struct SavePoint;
|
||||
// Setup
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define IMPLEMENT_SETUP(class, callback_class, name, index) \
|
||||
#define IMPLEMENT_SETUP(class, name, index) \
|
||||
void class::setup_##name() { \
|
||||
BEGIN_SETUP(callback_class, name, index, EntityData::EntityParametersIIII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersIIII) \
|
||||
debugC(6, kLastExpressDebugLogic, "Entity: " #class "::setup_" #name "()"); \
|
||||
END_SETUP() \
|
||||
}
|
||||
|
||||
#define BEGIN_SETUP(class, name, index, type) \
|
||||
#define BEGIN_SETUP(index, type) \
|
||||
_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); \
|
||||
_data->setCurrentCallback(index); \
|
||||
_data->resetCurrentParameters<type>();
|
||||
@ -145,7 +145,7 @@ void class::setup_##name() { \
|
||||
|
||||
// simple setup with no parameters
|
||||
#define IMPLEMENT_FUNCTION(index, class, name) \
|
||||
IMPLEMENT_SETUP(class, class, name, index) \
|
||||
IMPLEMENT_SETUP(class, name, index) \
|
||||
void class::name(const SavePoint &savepoint) { \
|
||||
EXPOSE_PARAMS(EntityData::EntityParametersIIII) \
|
||||
debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "() - action: %s", ACTION_NAME(savepoint.action));
|
||||
@ -154,12 +154,12 @@ void class::setup_##name() { \
|
||||
|
||||
// nullfunction call
|
||||
#define IMPLEMENT_NULL_FUNCTION(index, class) \
|
||||
IMPLEMENT_SETUP(class, Entity, nullfunction, index)
|
||||
IMPLEMENT_SETUP(class, nullfunction, index)
|
||||
|
||||
// setup with one uint parameter
|
||||
#define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \
|
||||
void class::setup_##name(paramType param1) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersIIII) \
|
||||
EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \
|
||||
params->param1 = (unsigned int)param1; \
|
||||
END_SETUP() \
|
||||
@ -171,7 +171,7 @@ void class::setup_##name() { \
|
||||
// setup with two uint parameters
|
||||
#define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \
|
||||
void class::setup_##name(paramType1 param1, paramType2 param2) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersIIII) \
|
||||
EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \
|
||||
params->param1 = param1; \
|
||||
params->param2 = param2; \
|
||||
@ -184,7 +184,7 @@ void class::setup_##name() { \
|
||||
// setup with three uint parameters
|
||||
#define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \
|
||||
void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersIIII) \
|
||||
EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \
|
||||
params->param1 = param1; \
|
||||
params->param2 = param2; \
|
||||
@ -198,7 +198,7 @@ void class::setup_##name() { \
|
||||
// setup with one char *parameter
|
||||
#define IMPLEMENT_FUNCTION_S(index, class, name) \
|
||||
void class::setup_##name(const char *seq1) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \
|
||||
EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
END_SETUP() \
|
||||
@ -210,7 +210,7 @@ void class::setup_##name() { \
|
||||
// setup with one char *parameter and one uint
|
||||
#define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \
|
||||
void class::setup_##name(const char *seq1, paramType2 param4) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \
|
||||
EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
params->param4 = param4; \
|
||||
@ -223,7 +223,7 @@ void class::setup_##name() { \
|
||||
// setup with one char *parameter and two uints
|
||||
#define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \
|
||||
void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \
|
||||
EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
params->param4 = param4; \
|
||||
@ -237,7 +237,7 @@ void class::setup_##name() { \
|
||||
// setup with one char *parameter and three uints
|
||||
#define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \
|
||||
void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSIII) \
|
||||
EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq, seq, 12); \
|
||||
params->param4 = param4; \
|
||||
@ -251,7 +251,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \
|
||||
void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \
|
||||
EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
params->param4 = param4; \
|
||||
@ -265,7 +265,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_SS(index, class, name) \
|
||||
void class::setup_##name(const char *seq1, const char *seq2) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSSII) \
|
||||
EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
strncpy((char *)¶ms->seq2, seq2, 12); \
|
||||
@ -277,7 +277,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \
|
||||
void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersSSII) \
|
||||
EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
strncpy((char *)¶ms->seq2, seq2, 12); \
|
||||
@ -290,7 +290,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \
|
||||
void class::setup_##name(paramType param1, const char *seq) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersISII) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersISII) \
|
||||
EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); \
|
||||
params->param1 = (unsigned int)param1; \
|
||||
strncpy((char *)¶ms->seq, seq, 12); \
|
||||
@ -302,7 +302,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \
|
||||
void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersISSI) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersISSI) \
|
||||
EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); \
|
||||
params->param1 = param1; \
|
||||
strncpy((char *)¶ms->seq1, seq1, 12); \
|
||||
@ -315,7 +315,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \
|
||||
void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISI) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersIISI) \
|
||||
EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); \
|
||||
params->param1 = param1; \
|
||||
params->param2 = param2; \
|
||||
@ -328,7 +328,7 @@ void class::setup_##name() { \
|
||||
|
||||
#define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \
|
||||
void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \
|
||||
BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISS) \
|
||||
BEGIN_SETUP(index, EntityData::EntityParametersIISS) \
|
||||
EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); \
|
||||
params->param1 = param1; \
|
||||
params->param2 = param2; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user