Added DontSaveObject script instruction

We are ignoring it for now and unless users protest we will probably keep it that way.
actorid
Marc Zinnschlag 13 years ago
parent 6ec2a2091c
commit ff84fbbfa7

@ -146,4 +146,5 @@ op 0x200014f: ForceGreeting
op 0x2000150: ForceGreeting, explicit reference
op 0x2000151: ToggleFullHelp
op 0x2000152: Goodbye
op 0x2000153: DontSaveObject (left unimplemented)
opcodes 0x2000154-0x3ffffff unused

@ -194,6 +194,17 @@ namespace MWScript
}
};
class OpDontSaveObject : public Interpreter::Opcode0
{
public:
virtual void execute (Interpreter::Runtime& runtime)
{
// We are ignoring the DontSaveObject statement for now. Probably not worth
/// bothering with. The incompatibility we are creating should be marginal at most.
}
};
const int opcodeXBox = 0x200000c;
const int opcodeOnActivate = 0x200000d;
const int opcodeActivate = 0x2000075;
@ -208,6 +219,7 @@ namespace MWScript
const int opcodeFadeTo = 0x200013e;
const int opcodeToggleWater = 0x2000144;
const int opcodeTogglePathgrid = 0x2000146;
const int opcodeDontSaveObject = 0x2000153;
void registerExtensions (Compiler::Extensions& extensions)
{
@ -229,6 +241,7 @@ namespace MWScript
extensions.registerInstruction ("twa", "", opcodeToggleWater);
extensions.registerInstruction ("togglepathgrid", "", opcodeTogglePathgrid);
extensions.registerInstruction ("tpg", "", opcodeTogglePathgrid);
extensions.registerInstruction ("dontsaveobject", "", opcodeDontSaveObject);
}
void installOpcodes (Interpreter::Interpreter& interpreter)
@ -247,6 +260,7 @@ namespace MWScript
interpreter.installSegment5 (opcodeFadeTo, new OpFadeTo);
interpreter.installSegment5 (opcodeTogglePathgrid, new OpTogglePathgrid);
interpreter.installSegment5 (opcodeToggleWater, new OpToggleWater);
interpreter.installSegment5 (opcodeDontSaveObject, new OpDontSaveObject);
}
}
}

Loading…
Cancel
Save