1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 12:09:41 +00:00

Add explicit variant of Journal

This commit is contained in:
Capostrophic 2019-03-05 20:47:05 +03:00
parent cb29dc7b85
commit 59f7df187d
4 changed files with 5 additions and 2 deletions

View file

@ -285,6 +285,7 @@ namespace MWScript
void installOpcodes (Interpreter::Interpreter& interpreter) void installOpcodes (Interpreter::Interpreter& interpreter)
{ {
interpreter.installSegment5 (Compiler::Dialogue::opcodeJournal, new OpJournal<ImplicitRef>); interpreter.installSegment5 (Compiler::Dialogue::opcodeJournal, new OpJournal<ImplicitRef>);
interpreter.installSegment5 (Compiler::Dialogue::opcodeJournalExplicit, new OpJournal<ExplicitRef>);
interpreter.installSegment5 (Compiler::Dialogue::opcodeSetJournalIndex, new OpSetJournalIndex); interpreter.installSegment5 (Compiler::Dialogue::opcodeSetJournalIndex, new OpSetJournalIndex);
interpreter.installSegment5 (Compiler::Dialogue::opcodeGetJournalIndex, new OpGetJournalIndex); interpreter.installSegment5 (Compiler::Dialogue::opcodeGetJournalIndex, new OpGetJournalIndex);
interpreter.installSegment5 (Compiler::Dialogue::opcodeAddTopic, new OpAddTopic); interpreter.installSegment5 (Compiler::Dialogue::opcodeAddTopic, new OpAddTopic);

View file

@ -458,5 +458,6 @@ op 0x2000307: ToggleBorders, tb
op 0x2000308: ToggleNavMesh op 0x2000308: ToggleNavMesh
op 0x2000309: ToggleActorsPaths op 0x2000309: ToggleActorsPaths
op 0x200030a: SetNavMeshNumber op 0x200030a: SetNavMeshNumber
op 0x200030b: Journal, explicit
opcodes 0x200030b-0x3ffffff unused opcodes 0x200030c-0x3ffffff unused

View file

@ -175,7 +175,7 @@ namespace Compiler
{ {
void registerExtensions (Extensions& extensions) void registerExtensions (Extensions& extensions)
{ {
extensions.registerInstruction ("journal", "cl", opcodeJournal); extensions.registerInstruction ("journal", "cl", opcodeJournal, opcodeJournalExplicit);
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);

View file

@ -150,6 +150,7 @@ namespace Compiler
namespace Dialogue namespace Dialogue
{ {
const int opcodeJournal = 0x2000133; const int opcodeJournal = 0x2000133;
const int opcodeJournalExplicit = 0x200030b;
const int opcodeSetJournalIndex = 0x2000134; const int opcodeSetJournalIndex = 0x2000134;
const int opcodeGetJournalIndex = 0x2000135; const int opcodeGetJournalIndex = 0x2000135;
const int opcodeAddTopic = 0x200013a; const int opcodeAddTopic = 0x200013a;