forked from teamnwah/openmw-tes3coop
fixed handling of optional instruction/function arguments; removed choice workaround
This commit is contained in:
parent
f87bd65ae1
commit
187b8e58d6
2 changed files with 3 additions and 4 deletions
|
@ -95,7 +95,6 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0)
|
virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0)
|
||||||
{
|
{
|
||||||
arg0 = 4;
|
|
||||||
MWScript::InterpreterContext& context
|
MWScript::InterpreterContext& context
|
||||||
= static_cast<MWScript::InterpreterContext&> (runtime.getContext());
|
= static_cast<MWScript::InterpreterContext&> (runtime.getContext());
|
||||||
MWDialogue::DialogueManager* dialogue = context.getEnvironment().mDialogueManager;
|
MWDialogue::DialogueManager* dialogue = context.getEnvironment().mDialogueManager;
|
||||||
|
@ -129,7 +128,7 @@ namespace MWScript
|
||||||
extensions.registerInstruction ("setjournalindex", "cl", opcodeSetJournalIndex);
|
extensions.registerInstruction ("setjournalindex", "cl", opcodeSetJournalIndex);
|
||||||
extensions.registerFunction ("getjournalindex", 'l', "c", opcodeGetJournalIndex);
|
extensions.registerFunction ("getjournalindex", 'l', "c", opcodeGetJournalIndex);
|
||||||
extensions.registerInstruction ("addtopic", "S" , opcodeAddTopic);
|
extensions.registerInstruction ("addtopic", "S" , opcodeAddTopic);
|
||||||
extensions.registerInstruction ("choice", "/SlSl", opcodeChoice);
|
extensions.registerInstruction ("choice", "/SlSlSlSlSlSlSlSlSlSlSlSlSlSlSlSl", opcodeChoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void installOpcodes (Interpreter::Interpreter& interpreter)
|
void installOpcodes (Interpreter::Interpreter& interpreter)
|
||||||
|
@ -137,7 +136,7 @@ namespace MWScript
|
||||||
interpreter.installSegment5 (opcodeJournal, new OpJournal);
|
interpreter.installSegment5 (opcodeJournal, new OpJournal);
|
||||||
interpreter.installSegment5 (opcodeSetJournalIndex, new OpSetJournalIndex);
|
interpreter.installSegment5 (opcodeSetJournalIndex, new OpSetJournalIndex);
|
||||||
interpreter.installSegment5 (opcodeGetJournalIndex, new OpGetJournalIndex);
|
interpreter.installSegment5 (opcodeGetJournalIndex, new OpGetJournalIndex);
|
||||||
interpreter.installSegment5 (opcodeAddTopic, new OpAddTopic);
|
interpreter.installSegment5 (opcodeAddTopic, new OpAddTopic);
|
||||||
interpreter.installSegment3 (opcodeChoice,new OpChoice);
|
interpreter.installSegment3 (opcodeChoice,new OpChoice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -639,7 +639,7 @@ namespace Compiler
|
||||||
std::vector<Interpreter::Type_Code>& code, bool invert)
|
std::vector<Interpreter::Type_Code>& code, bool invert)
|
||||||
{
|
{
|
||||||
bool optional = false;
|
bool optional = false;
|
||||||
bool optionalCount = 0;
|
int optionalCount = 0;
|
||||||
|
|
||||||
ExprParser parser (getErrorHandler(), getContext(), mLocals, mLiterals, true);
|
ExprParser parser (getErrorHandler(), getContext(), mLocals, mLiterals, true);
|
||||||
StringParser stringParser (getErrorHandler(), getContext(), mLiterals);
|
StringParser stringParser (getErrorHandler(), getContext(), mLiterals);
|
||||||
|
|
Loading…
Reference in a new issue