mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
GetLocked
This commit is contained in:
parent
d418e21371
commit
10329c780d
@ -248,5 +248,7 @@ op 0x20001c3: GetFlee
|
||||
op 0x20001c4: GetFlee, explicit reference
|
||||
op 0x20001c5: GetAlarm
|
||||
op 0x20001c6: GetAlarm, explicit reference
|
||||
op 0x20001c7: GetLocked
|
||||
op 0x20001c8: GetLocked, explicit reference
|
||||
opcodes 0x20001c7-0x3ffffff unused
|
||||
|
||||
|
@ -272,6 +272,19 @@ namespace MWScript
|
||||
};
|
||||
bool OpToggleVanityMode::sActivate = true;
|
||||
|
||||
template <class R>
|
||||
class OpGetLocked : public Interpreter::Opcode0
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void execute (Interpreter::Runtime& runtime)
|
||||
{
|
||||
MWWorld::Ptr ptr = R()(runtime);
|
||||
|
||||
runtime.push (ptr.getCellRef ().mLockLevel > 0);
|
||||
}
|
||||
};
|
||||
|
||||
const int opcodeXBox = 0x200000c;
|
||||
const int opcodeOnActivate = 0x200000d;
|
||||
const int opcodeActivate = 0x2000075;
|
||||
@ -291,6 +304,8 @@ namespace MWScript
|
||||
const int opcodeToggleVanityMode = 0x2000174;
|
||||
const int opcodeGetPcSleep = 0x200019f;
|
||||
const int opcodeWakeUpPc = 0x20001a2;
|
||||
const int opcodeGetLocked = 0x20001c7;
|
||||
const int opcodeGetLockedExplicit = 0x20001c8;
|
||||
|
||||
void registerExtensions (Compiler::Extensions& extensions)
|
||||
{
|
||||
@ -317,6 +332,7 @@ namespace MWScript
|
||||
extensions.registerInstruction ("tvm", "", opcodeToggleVanityMode);
|
||||
extensions.registerFunction ("getpcsleep", 'l', "", opcodeGetPcSleep);
|
||||
extensions.registerInstruction ("wakeuppc", "", opcodeWakeUpPc);
|
||||
extensions.registerFunction ("getlocked", 'l', "", opcodeGetLocked, opcodeGetLockedExplicit);
|
||||
}
|
||||
|
||||
void installOpcodes (Interpreter::Interpreter& interpreter)
|
||||
@ -340,6 +356,8 @@ namespace MWScript
|
||||
interpreter.installSegment5 (opcodeToggleVanityMode, new OpToggleVanityMode);
|
||||
interpreter.installSegment5 (opcodeGetPcSleep, new OpGetPcSleep);
|
||||
interpreter.installSegment5 (opcodeWakeUpPc, new OpWakeUpPc);
|
||||
interpreter.installSegment5 (opcodeGetLocked, new OpGetLocked<ImplicitRef>);
|
||||
interpreter.installSegment5 (opcodeGetLockedExplicit, new OpGetLocked<ExplicitRef>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user