mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 08:15:37 +00:00
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)
|
||||
{
|
||||
arg0 = 4;
|
||||
MWScript::InterpreterContext& context
|
||||
= static_cast<MWScript::InterpreterContext&> (runtime.getContext());
|
||||
MWDialogue::DialogueManager* dialogue = context.getEnvironment().mDialogueManager;
|
||||
|
@ -129,7 +128,7 @@ namespace MWScript
|
|||
extensions.registerInstruction ("setjournalindex", "cl", opcodeSetJournalIndex);
|
||||
extensions.registerFunction ("getjournalindex", 'l', "c", opcodeGetJournalIndex);
|
||||
extensions.registerInstruction ("addtopic", "S" , opcodeAddTopic);
|
||||
extensions.registerInstruction ("choice", "/SlSl", opcodeChoice);
|
||||
extensions.registerInstruction ("choice", "/SlSlSlSlSlSlSlSlSlSlSlSlSlSlSlSl", opcodeChoice);
|
||||
}
|
||||
|
||||
void installOpcodes (Interpreter::Interpreter& interpreter)
|
||||
|
@ -137,7 +136,7 @@ namespace MWScript
|
|||
interpreter.installSegment5 (opcodeJournal, new OpJournal);
|
||||
interpreter.installSegment5 (opcodeSetJournalIndex, new OpSetJournalIndex);
|
||||
interpreter.installSegment5 (opcodeGetJournalIndex, new OpGetJournalIndex);
|
||||
interpreter.installSegment5 (opcodeAddTopic, new OpAddTopic);
|
||||
interpreter.installSegment5 (opcodeAddTopic, new OpAddTopic);
|
||||
interpreter.installSegment3 (opcodeChoice,new OpChoice);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -639,7 +639,7 @@ namespace Compiler
|
|||
std::vector<Interpreter::Type_Code>& code, bool invert)
|
||||
{
|
||||
bool optional = false;
|
||||
bool optionalCount = 0;
|
||||
int optionalCount = 0;
|
||||
|
||||
ExprParser parser (getErrorHandler(), getContext(), mLocals, mLiterals, true);
|
||||
StringParser stringParser (getErrorHandler(), getContext(), mLiterals);
|
||||
|
|
Loading…
Reference in a new issue