(svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library)

This commit is contained in:
truebrain
2011-12-19 20:56:59 +00:00
parent 83f2785f54
commit 963802e9a7
14 changed files with 214 additions and 27 deletions

View File

@@ -46,4 +46,29 @@ private:
const char *api_version; ///< API version used by this Game.
};
/** All static information from an Game library like name, version, etc. */
class GameLibrary : public ScriptInfo {
public:
GameLibrary() : ScriptInfo(), category(NULL) {};
~GameLibrary();
/**
* Register the functions of this class.
*/
static void RegisterAPI(Squirrel *engine);
/**
* Create an GSLibrary, using this GSInfo as start-template.
*/
static SQInteger Constructor(HSQUIRRELVM vm);
/**
* Get the category this library is in.
*/
const char *GetCategory() const { return this->category; }
private:
const char *category; ///< The category this library is in.
};
#endif /* GAME_INFO_HPP */