|
|
@ -565,6 +565,30 @@ namespace MWScript
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <class R>
|
|
|
|
|
|
|
|
class OpGetStandingPc : public Interpreter::Opcode0
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void execute (Interpreter::Runtime& runtime)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MWWorld::Ptr ptr = R()(runtime);
|
|
|
|
|
|
|
|
runtime.push (MWBase::Environment::get().getWorld()->getPlayerStandingOn(ptr));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <class R>
|
|
|
|
|
|
|
|
class OpGetStandingActor : public Interpreter::Opcode0
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void execute (Interpreter::Runtime& runtime)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MWWorld::Ptr ptr = R()(runtime);
|
|
|
|
|
|
|
|
runtime.push (MWBase::Environment::get().getWorld()->getActorStandingOn(ptr));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const int opcodeXBox = 0x200000c;
|
|
|
|
const int opcodeXBox = 0x200000c;
|
|
|
|
const int opcodeOnActivate = 0x200000d;
|
|
|
|
const int opcodeOnActivate = 0x200000d;
|
|
|
|
const int opcodeActivate = 0x2000075;
|
|
|
|
const int opcodeActivate = 0x2000075;
|
|
|
@ -608,6 +632,10 @@ namespace MWScript
|
|
|
|
const int opcodeGetSquareRoot = 0x20001e7;
|
|
|
|
const int opcodeGetSquareRoot = 0x20001e7;
|
|
|
|
const int opcodeFall = 0x200020a;
|
|
|
|
const int opcodeFall = 0x200020a;
|
|
|
|
const int opcodeFallExplicit = 0x200020b;
|
|
|
|
const int opcodeFallExplicit = 0x200020b;
|
|
|
|
|
|
|
|
const int opcodeGetStandingPc = 0x200020c;
|
|
|
|
|
|
|
|
const int opcodeGetStandingPcExplicit = 0x200020d;
|
|
|
|
|
|
|
|
const int opcodeGetStandingActor = 0x200020e;
|
|
|
|
|
|
|
|
const int opcodeGetStandingActorExplicit = 0x200020f;
|
|
|
|
|
|
|
|
|
|
|
|
const int opcodePlayBink = 0x20001f7;
|
|
|
|
const int opcodePlayBink = 0x20001f7;
|
|
|
|
|
|
|
|
|
|
|
@ -650,6 +678,8 @@ namespace MWScript
|
|
|
|
extensions.registerInstruction ("setdelete", "l", opcodeSetDelete, opcodeSetDeleteExplicit);
|
|
|
|
extensions.registerInstruction ("setdelete", "l", opcodeSetDelete, opcodeSetDeleteExplicit);
|
|
|
|
extensions.registerFunction ("getsquareroot", 'f', "f", opcodeGetSquareRoot);
|
|
|
|
extensions.registerFunction ("getsquareroot", 'f', "f", opcodeGetSquareRoot);
|
|
|
|
extensions.registerInstruction ("fall", "", opcodeFall, opcodeFallExplicit);
|
|
|
|
extensions.registerInstruction ("fall", "", opcodeFall, opcodeFallExplicit);
|
|
|
|
|
|
|
|
extensions.registerFunction ("getstandingpc", 'l', "", opcodeGetStandingPc, opcodeGetStandingPcExplicit);
|
|
|
|
|
|
|
|
extensions.registerFunction ("getstandingactor", 'l', "", opcodeGetStandingActor, opcodeGetStandingActorExplicit);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void installOpcodes (Interpreter::Interpreter& interpreter)
|
|
|
|
void installOpcodes (Interpreter::Interpreter& interpreter)
|
|
|
@ -698,7 +728,10 @@ namespace MWScript
|
|
|
|
interpreter.installSegment5 (opcodeGetSquareRoot, new OpGetSquareRoot);
|
|
|
|
interpreter.installSegment5 (opcodeGetSquareRoot, new OpGetSquareRoot);
|
|
|
|
interpreter.installSegment5 (opcodeFall, new OpFall<ImplicitRef>);
|
|
|
|
interpreter.installSegment5 (opcodeFall, new OpFall<ImplicitRef>);
|
|
|
|
interpreter.installSegment5 (opcodeFallExplicit, new OpFall<ExplicitRef>);
|
|
|
|
interpreter.installSegment5 (opcodeFallExplicit, new OpFall<ExplicitRef>);
|
|
|
|
|
|
|
|
interpreter.installSegment5 (opcodeGetStandingPc, new OpGetStandingPc<ImplicitRef>);
|
|
|
|
|
|
|
|
interpreter.installSegment5 (opcodeGetStandingPcExplicit, new OpGetStandingPc<ExplicitRef>);
|
|
|
|
|
|
|
|
interpreter.installSegment5 (opcodeGetStandingActor, new OpGetStandingActor<ImplicitRef>);
|
|
|
|
|
|
|
|
interpreter.installSegment5 (opcodeGetStandingActorExplicit, new OpGetStandingActor<ExplicitRef>);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|