mirror of https://github.com/OpenMW/openmw.git
added script manager (doesn't do anything yet); local scriptes for active cells are passed on to the script manager
parent
a06b84ac86
commit
2064c43d89
@ -0,0 +1,19 @@
|
||||
|
||||
#include "scriptmanager.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace MWScript
|
||||
{
|
||||
ScriptManager::ScriptManager (const ESMS::ESMStore& store, bool verbose)
|
||||
: mStore (store), mVerbose (verbose)
|
||||
{}
|
||||
|
||||
void ScriptManager::run (const std::string& name/*, Compiler::Context& compilerContext,
|
||||
Interpreter::Context& interpreterContext, Locals& locals*/)
|
||||
{
|
||||
std::cout << "script request: " << name << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
#ifndef GAME_SCRIPT_SCRIPTMANAGER_H
|
||||
#define GAME_SCRIPT_SCRIPTMANAGER_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <components/interpreter/types.hpp>
|
||||
|
||||
namespace ESMS
|
||||
{
|
||||
struct ESMStore;
|
||||
}
|
||||
|
||||
namespace Compiler
|
||||
{
|
||||
class Context;
|
||||
}
|
||||
|
||||
namespace Interpreter
|
||||
{
|
||||
class Context;
|
||||
}
|
||||
|
||||
namespace MWScript
|
||||
{
|
||||
struct Locals;
|
||||
|
||||
class ScriptManager
|
||||
{
|
||||
const ESMS::ESMStore& mStore;
|
||||
bool mVerbose;
|
||||
|
||||
std::map<std::string, std::vector<Interpreter::Type_Code> > mScripts;
|
||||
|
||||
public:
|
||||
|
||||
ScriptManager (const ESMS::ESMStore& store, bool verbose);
|
||||
|
||||
void run (const std::string& name/*, Compiler::Context& compilerContext,
|
||||
Interpreter::Context& interpreterContext, Locals& locals*/);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue