mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
minor cleanup
svn-id: r6059
This commit is contained in:
parent
2e66c05f47
commit
3ce3a5be5b
@ -287,28 +287,6 @@ void Scumm::executeScript()
|
||||
CHECK_HEAP;
|
||||
}
|
||||
|
||||
void Scumm_v5::executeOpcode(int i)
|
||||
{
|
||||
OpcodeProcV5 op = _opcodesV5[i].proc;
|
||||
(this->*op) ();
|
||||
}
|
||||
|
||||
const char *Scumm_v5::getOpcodeDesc(int i)
|
||||
{
|
||||
return _opcodesV5[i].desc;
|
||||
}
|
||||
|
||||
void Scumm_v6::executeOpcode(int i)
|
||||
{
|
||||
OpcodeProcV6 op = _opcodesV6[i].proc;
|
||||
(this->*op) ();
|
||||
}
|
||||
|
||||
const char *Scumm_v6::getOpcodeDesc(int i)
|
||||
{
|
||||
return _opcodesV6[i].desc;
|
||||
}
|
||||
|
||||
byte Scumm::fetchScriptByte()
|
||||
{
|
||||
if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) {
|
||||
|
@ -162,7 +162,7 @@ void Scumm_v5::setupOpcodes()
|
||||
OPCODE(o5_getClosestObjActor),
|
||||
OPCODE(o5_dummy),
|
||||
/* 68 */
|
||||
OPCODE(o5_getScriptRunning),
|
||||
OPCODE(o5_isScriptRunning),
|
||||
OPCODE(o5_setOwnerOf),
|
||||
OPCODE(o5_startScript),
|
||||
OPCODE(o5_debug),
|
||||
@ -322,7 +322,7 @@ void Scumm_v5::setupOpcodes()
|
||||
OPCODE(o5_getClosestObjActor),
|
||||
OPCODE(o5_dummy),
|
||||
/* E8 */
|
||||
OPCODE(o5_getScriptRunning),
|
||||
OPCODE(o5_isScriptRunning),
|
||||
OPCODE(o5_setOwnerOf),
|
||||
OPCODE(o5_startScript),
|
||||
OPCODE(o5_debug),
|
||||
@ -356,6 +356,17 @@ void Scumm_v5::setupOpcodes()
|
||||
_opcodesV5 = opcodes;
|
||||
}
|
||||
|
||||
void Scumm_v5::executeOpcode(int i)
|
||||
{
|
||||
OpcodeProcV5 op = _opcodesV5[i].proc;
|
||||
(this->*op) ();
|
||||
}
|
||||
|
||||
const char *Scumm_v5::getOpcodeDesc(int i)
|
||||
{
|
||||
return _opcodesV5[i].desc;
|
||||
}
|
||||
|
||||
void Scumm_v5::o5_actorFollowCamera()
|
||||
{
|
||||
actorFollowCamera(getVarOrDirectByte(0x80));
|
||||
@ -1137,7 +1148,7 @@ void Scumm_v5::o5_getRandomNr()
|
||||
setResult(_rnd.getRandomNumber(getVarOrDirectByte(0x80)));
|
||||
}
|
||||
|
||||
void Scumm_v5::o5_getScriptRunning()
|
||||
void Scumm_v5::o5_isScriptRunning()
|
||||
{
|
||||
getResultPos();
|
||||
setResult(isScriptRunning(getVarOrDirectByte(0x80)));
|
||||
|
@ -57,7 +57,7 @@ void Scumm_v6::setupOpcodes()
|
||||
OPCODE(o6_wordArrayIndexedRead),
|
||||
/* 0C */
|
||||
OPCODE(o6_dup),
|
||||
OPCODE(o6_zero),
|
||||
OPCODE(o6_not),
|
||||
OPCODE(o6_eq),
|
||||
OPCODE(o6_neq),
|
||||
/* 10 */
|
||||
@ -214,7 +214,7 @@ void Scumm_v6::setupOpcodes()
|
||||
OPCODE(o6_getRandomNumberRange),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_getActorMoving),
|
||||
OPCODE(o6_getScriptRunning),
|
||||
OPCODE(o6_isScriptRunning),
|
||||
/* 8C */
|
||||
OPCODE(o6_getActorRoom),
|
||||
OPCODE(o6_getObjectX),
|
||||
@ -364,6 +364,18 @@ void Scumm_v6::setupOpcodes()
|
||||
|
||||
_opcodesV6 = opcodes;
|
||||
}
|
||||
|
||||
void Scumm_v6::executeOpcode(int i)
|
||||
{
|
||||
OpcodeProcV6 op = _opcodesV6[i].proc;
|
||||
(this->*op) ();
|
||||
}
|
||||
|
||||
const char *Scumm_v6::getOpcodeDesc(int i)
|
||||
{
|
||||
return _opcodesV6[i].desc;
|
||||
}
|
||||
|
||||
void Scumm_v6::o6_setBlastObjectWindow()
|
||||
{ // Set BOMP processing window
|
||||
int a, b, c, d;
|
||||
@ -508,7 +520,7 @@ void Scumm_v6::o6_dup()
|
||||
push(a);
|
||||
}
|
||||
|
||||
void Scumm_v6::o6_zero()
|
||||
void Scumm_v6::o6_not()
|
||||
{
|
||||
push(pop() == 0);
|
||||
}
|
||||
@ -1228,7 +1240,7 @@ void Scumm_v6::o6_getActorMoving()
|
||||
push(derefActorSafe(pop(), "o6_getActorMoving")->moving);
|
||||
}
|
||||
|
||||
void Scumm_v6::o6_getScriptRunning()
|
||||
void Scumm_v6::o6_isScriptRunning()
|
||||
{
|
||||
push(isScriptRunning(pop()));
|
||||
}
|
||||
|
@ -34,8 +34,6 @@ class NewGui;
|
||||
class Dialog;
|
||||
class ConsoleDialog;
|
||||
class Scumm;
|
||||
class Scumm_v5;
|
||||
class Scumm_v6;
|
||||
class IMuse;
|
||||
class IMuseDigital;
|
||||
class Actor;
|
||||
@ -45,19 +43,6 @@ class ScummDebugger;
|
||||
class Serializer;
|
||||
struct FindObjectInRoom;
|
||||
|
||||
typedef void (Scumm_v5::*OpcodeProcV5)();
|
||||
typedef void (Scumm_v6::*OpcodeProcV6)();
|
||||
|
||||
struct OpcodeEntryV5 {
|
||||
OpcodeProcV5 proc;
|
||||
const char *desc;
|
||||
};
|
||||
|
||||
struct OpcodeEntryV6 {
|
||||
OpcodeProcV6 proc;
|
||||
const char *desc;
|
||||
};
|
||||
|
||||
// Use g_scumm from error() ONLY
|
||||
extern Scumm *g_scumm;
|
||||
|
||||
@ -1081,6 +1066,12 @@ public:
|
||||
class Scumm_v5 : public Scumm
|
||||
{
|
||||
protected:
|
||||
typedef void (Scumm_v5::*OpcodeProcV5)();
|
||||
struct OpcodeEntryV5 {
|
||||
OpcodeProcV5 proc;
|
||||
const char *desc;
|
||||
};
|
||||
|
||||
const OpcodeEntryV5 *_opcodesV5;
|
||||
|
||||
public:
|
||||
@ -1141,7 +1132,7 @@ protected:
|
||||
void o5_getObjectOwner();
|
||||
void o5_getObjectState();
|
||||
void o5_getRandomNr();
|
||||
void o5_getScriptRunning();
|
||||
void o5_isScriptRunning();
|
||||
void o5_getVerbEntrypoint();
|
||||
void o5_ifClassOfIs();
|
||||
void o5_increment();
|
||||
@ -1236,6 +1227,12 @@ public:
|
||||
class Scumm_v6 : public Scumm
|
||||
{
|
||||
protected:
|
||||
typedef void (Scumm_v6::*OpcodeProcV6)();
|
||||
struct OpcodeEntryV6 {
|
||||
OpcodeProcV6 proc;
|
||||
const char *desc;
|
||||
};
|
||||
|
||||
const OpcodeEntryV6 *_opcodesV6;
|
||||
|
||||
public:
|
||||
@ -1264,7 +1261,7 @@ protected:
|
||||
void o6_byteArrayIndexedRead();
|
||||
void o6_wordArrayIndexedRead();
|
||||
void o6_dup();
|
||||
void o6_zero();
|
||||
void o6_not();
|
||||
void o6_eq();
|
||||
void o6_neq();
|
||||
void o6_gt();
|
||||
@ -1334,7 +1331,7 @@ protected:
|
||||
void o6_getRandomNumber();
|
||||
void o6_getRandomNumberRange();
|
||||
void o6_getActorMoving();
|
||||
void o6_getScriptRunning();
|
||||
void o6_isScriptRunning();
|
||||
void o6_getActorRoom();
|
||||
void o6_getObjectX();
|
||||
void o6_getObjectY();
|
||||
|
Loading…
Reference in New Issue
Block a user