moved installOpcodes function from scriptmanager to extensions

pull/7/head
Marc Zinnschlag 15 years ago
parent f3b70e05a9
commit a9825f92ee

@ -1,6 +1,9 @@
#include "extensions.hpp"
#include <components/interpreter/interpreter.hpp>
#include <components/interpreter/installopcodes.hpp>
#include "soundextensions.hpp"
#include "cellextensions.hpp"
#include "miscextensions.hpp"
@ -17,5 +20,15 @@ namespace MWScript
Sound::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;
}
namespace Interpreter
{
class Interpreter;
}
namespace MWScript
{
void registerExtensions (Compiler::Extensions& extensions);
void installOpcodes (Interpreter::Interpreter& interpreter);
}
#endif

@ -12,14 +12,9 @@
#include <components/compiler/scanner.hpp>
#include <components/compiler/context.hpp>
#include <components/interpreter/installopcodes.hpp>
#include <components/interpreter/interpreter.hpp>
#include "soundextensions.hpp"
#include "cellextensions.hpp"
#include "miscextensions.hpp"
#include "guiextensions.hpp"
#include "skyextensions.hpp"
#include "extensions.hpp"
namespace MWScript
{
@ -118,15 +113,5 @@ namespace MWScript
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);
void run (const std::string& name, Interpreter::Context& interpreterContext);
static void installOpcodes (Interpreter::Interpreter& interpreter);
};
};

Loading…
Cancel
Save