mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 21:45:34 +00:00
Merge pull request #2211 from Capostrophic/messages
Small script verifier tweaks
This commit is contained in:
commit
9adb557833
5 changed files with 7 additions and 4 deletions
|
@ -30,11 +30,11 @@ void CSMTools::ScriptCheckStage::report (const std::string& message, const Compi
|
||||||
|
|
||||||
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Script, mId);
|
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Script, mId);
|
||||||
|
|
||||||
stream << "line " << loc.mLine << ", column " << loc.mColumn << ": " << message << " (" << loc.mLiteral << ")";
|
stream << message << " (" << loc.mLiteral << ")" << " @ line " << loc.mLine+1 << ", column " << loc.mColumn;
|
||||||
|
|
||||||
std::ostringstream hintStream;
|
std::ostringstream hintStream;
|
||||||
|
|
||||||
hintStream << "l:" << loc.mLine << " " << loc.mColumn;
|
hintStream << "l:" << loc.mLine+1 << " " << loc.mColumn;
|
||||||
|
|
||||||
mMessages->add (id, stream.str(), hintStream.str(), getSeverity (type));
|
mMessages->add (id, stream.str(), hintStream.str(), getSeverity (type));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue