mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Implemented handler for the Load instruction. Removed Script::dummy().
svn-id: r42102
This commit is contained in:
parent
b96b434446
commit
fdf9eb84d6
@ -45,7 +45,7 @@ void Script::setupCommandList() {
|
||||
{ 2, 1, "Let", 2, { 3, 4 }, NULL },
|
||||
{ 3, 1, "if", 2, { 4, 3 }, NULL },
|
||||
{ 4, 1, "Start", 2, { 3, 2 }, NULL },
|
||||
{ 5, 1, "Load", 2, { 3, 2 }, &Script::dummy },
|
||||
{ 5, 1, "Load", 2, { 3, 2 }, &Script::load },
|
||||
{ 5, 2, "StartPlay", 2, { 3, 2 }, NULL },
|
||||
{ 5, 3, "JustTalk", 0, { 0 }, NULL },
|
||||
{ 5, 4, "JustStay", 0, { 0 }, NULL },
|
||||
@ -146,14 +146,15 @@ enum mathExpressionObject {
|
||||
kMathVariable
|
||||
};
|
||||
|
||||
void Script::dummy(Common::Queue<int> ¶ms) {
|
||||
void Script::load(Common::Queue<int> ¶ms) {
|
||||
int objID = params.pop() - 1;
|
||||
int animID = params.pop() - 1;
|
||||
|
||||
debug(1, "- %d", params.pop());
|
||||
debug(1, "- %d", params.pop());
|
||||
GameObject *obj = _vm->_game->getObject(objID);
|
||||
|
||||
obj->_seqTab[animID - obj->_idxSeq] = _vm->_game->loadAnimation(animID);
|
||||
}
|
||||
|
||||
// FIXME: The evaluator is now complete but I still need to implement callbacks
|
||||
|
||||
/**
|
||||
* @brief Evaluates mathematical expressions
|
||||
* @param reader Stream reader set to the beginning of the expression
|
||||
|
@ -83,14 +83,13 @@ private:
|
||||
/** List of all GPL commands. Initialised in the constructor. */
|
||||
const GPL2Command *_commandList;
|
||||
|
||||
void dummy(Common::Queue<int> ¶ms);
|
||||
void load(Common::Queue<int> ¶ms);
|
||||
|
||||
void setupCommandList();
|
||||
const GPL2Command *findCommand(byte num, byte subnum);
|
||||
int handleMathExpression(Common::MemoryReadStream &reader);
|
||||
|
||||
DraciEngine *_vm;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user