forked from mirror/openmw-tes3mp
moved installOpcodes function from scriptmanager to extensions
This commit is contained in:
parent
f3b70e05a9
commit
a9825f92ee
4 changed files with 21 additions and 18 deletions
|
@ -1,6 +1,9 @@
|
||||||
|
|
||||||
#include "extensions.hpp"
|
#include "extensions.hpp"
|
||||||
|
|
||||||
|
#include <components/interpreter/interpreter.hpp>
|
||||||
|
#include <components/interpreter/installopcodes.hpp>
|
||||||
|
|
||||||
#include "soundextensions.hpp"
|
#include "soundextensions.hpp"
|
||||||
#include "cellextensions.hpp"
|
#include "cellextensions.hpp"
|
||||||
#include "miscextensions.hpp"
|
#include "miscextensions.hpp"
|
||||||
|
@ -17,5 +20,15 @@ namespace MWScript
|
||||||
Sound::registerExtensions (extensions);
|
Sound::registerExtensions (extensions);
|
||||||
Sky::registerExtensions (extensions);
|
Sky::registerExtensions (extensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void installOpcodes (Interpreter::Interpreter& interpreter)
|
||||||
|
{
|
||||||
|
Interpreter::installOpcodes (interpreter);
|
||||||
|
Cell::installOpcodes (interpreter);
|
||||||
|
Misc::installOpcodes (interpreter);
|
||||||
|
Gui::installOpcodes (interpreter);
|
||||||
|
Sound::installOpcodes (interpreter);
|
||||||
|
Sky::installOpcodes (interpreter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,16 @@ namespace Compiler
|
||||||
class Extensions;
|
class Extensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Interpreter
|
||||||
|
{
|
||||||
|
class Interpreter;
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWScript
|
namespace MWScript
|
||||||
{
|
{
|
||||||
void registerExtensions (Compiler::Extensions& extensions);
|
void registerExtensions (Compiler::Extensions& extensions);
|
||||||
|
|
||||||
|
void installOpcodes (Interpreter::Interpreter& interpreter);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,14 +12,9 @@
|
||||||
#include <components/compiler/scanner.hpp>
|
#include <components/compiler/scanner.hpp>
|
||||||
#include <components/compiler/context.hpp>
|
#include <components/compiler/context.hpp>
|
||||||
|
|
||||||
#include <components/interpreter/installopcodes.hpp>
|
|
||||||
#include <components/interpreter/interpreter.hpp>
|
#include <components/interpreter/interpreter.hpp>
|
||||||
|
|
||||||
#include "soundextensions.hpp"
|
#include "extensions.hpp"
|
||||||
#include "cellextensions.hpp"
|
|
||||||
#include "miscextensions.hpp"
|
|
||||||
#include "guiextensions.hpp"
|
|
||||||
#include "skyextensions.hpp"
|
|
||||||
|
|
||||||
namespace MWScript
|
namespace MWScript
|
||||||
{
|
{
|
||||||
|
@ -118,15 +113,5 @@ namespace MWScript
|
||||||
iter->second.clear(); // don't execute again.
|
iter->second.clear(); // don't execute again.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptManager::installOpcodes (Interpreter::Interpreter& interpreter)
|
|
||||||
{
|
|
||||||
Interpreter::installOpcodes (interpreter);
|
|
||||||
Cell::installOpcodes (interpreter);
|
|
||||||
Misc::installOpcodes (interpreter);
|
|
||||||
Gui::installOpcodes (interpreter);
|
|
||||||
Sound::installOpcodes (interpreter);
|
|
||||||
Sky::installOpcodes (interpreter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,6 @@ namespace MWScript
|
||||||
Compiler::Context& compilerContext);
|
Compiler::Context& compilerContext);
|
||||||
|
|
||||||
void run (const std::string& name, Interpreter::Context& interpreterContext);
|
void run (const std::string& name, Interpreter::Context& interpreterContext);
|
||||||
|
|
||||||
static void installOpcodes (Interpreter::Interpreter& interpreter);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue