mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
Workaround for gcc 2.95 compiler bug.
svn-id: r32986
This commit is contained in:
parent
03cd937b13
commit
092d9f38c5
@ -34,6 +34,7 @@ namespace Kyra {
|
||||
TIMInterpreter::TIMInterpreter(KyraEngine_v1 *vm, OSystem *system) : _vm(vm), _system(system), _currentTim(0) {
|
||||
#define COMMAND(x) { &TIMInterpreter::x, #x }
|
||||
#define COMMAND_UNIMPL() { 0, 0 }
|
||||
#define cmd_return(n) cmd_return_##n
|
||||
static const CommandEntry commandProcs[] = {
|
||||
// 0x00
|
||||
COMMAND(cmd_initFunc0),
|
||||
@ -66,15 +67,16 @@ TIMInterpreter::TIMInterpreter(KyraEngine_v1 *vm, OSystem *system) : _vm(vm), _s
|
||||
COMMAND_UNIMPL(),
|
||||
COMMAND(cmd_resetAllRuntimes),
|
||||
// 0x18
|
||||
COMMAND(cmd_return<1>),
|
||||
COMMAND(cmd_return(1)),
|
||||
COMMAND(cmd_execOpcode),
|
||||
COMMAND(cmd_initFuncNow),
|
||||
COMMAND(cmd_stopFuncNow),
|
||||
// 0x1C
|
||||
COMMAND(cmd_return<1>),
|
||||
COMMAND(cmd_return<1>),
|
||||
COMMAND(cmd_return<-1>)
|
||||
COMMAND(cmd_return(1)),
|
||||
COMMAND(cmd_return(1)),
|
||||
COMMAND(cmd_return(n1))
|
||||
};
|
||||
#undef cmd_return
|
||||
|
||||
_commands = commandProcs;
|
||||
_commandsSize = ARRAYSIZE(commandProcs);
|
||||
|
@ -102,8 +102,12 @@ private:
|
||||
int cmd_execOpcode(const uint16 *param);
|
||||
int cmd_initFuncNow(const uint16 *param);
|
||||
int cmd_stopFuncNow(const uint16 *param);
|
||||
template<int T>
|
||||
int cmd_return(const uint16 *) { return T; }
|
||||
#define cmd_return(n, v) \
|
||||
int cmd_return_##n(const uint16 *) { return v; }
|
||||
|
||||
cmd_return( 1, 1);
|
||||
cmd_return(n1, -1);
|
||||
#undef cmd_return
|
||||
};
|
||||
|
||||
} // end of namespace Kyra
|
||||
|
Loading…
x
Reference in New Issue
Block a user