From 031709fc8f63bd6fa2399361bbce96667b767e36 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 9 Aug 2007 21:24:56 +0000 Subject: Moved creation of testing NPC from C++ to Lua. --- src/scripting/script.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/scripting/script.hpp') diff --git a/src/scripting/script.hpp b/src/scripting/script.hpp index 5862e50..8ab89c2 100644 --- a/src/scripting/script.hpp +++ b/src/scripting/script.hpp @@ -26,6 +26,7 @@ #include +class MapComposite; class Thing; /** @@ -47,6 +48,8 @@ class Script */ static Script *create(std::string const &engine, std::string const &file); + Script(): mMap(NULL) {} + virtual ~Script() {} /** @@ -79,6 +82,21 @@ class Script * @return the value returned by the script. */ virtual int execute() = 0; + + /** + * Sets associated map. + */ + void setMap(MapComposite *m) + { mMap = m; } + + /** + * Gets associated map. + */ + MapComposite *getMap() const + { return mMap; } + + private: + MapComposite *mMap; }; #endif -- cgit