(svn r15091) -Add [NoAI] [API CHANGE]: introduce GetCategory() as a requirement for every library.nut, to indicate in which category it belongs. Currently the directory indicates the category, but this doesn't allow planned future additions

This commit is contained in:
truebrain
2009-01-15 15:56:10 +00:00
parent e84138af22
commit ae5c8a8b35
8 changed files with 30 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ public:
/**
* Process the creation of a FileInfo object.
*/
static SQInteger Constructor(HSQUIRRELVM vm, AIFileInfo *info);
static SQInteger Constructor(HSQUIRRELVM vm, AIFileInfo *info, bool library);
private:
class Squirrel *engine;
@@ -155,12 +155,22 @@ private:
class AILibrary : public AIFileInfo {
public:
AILibrary() : AIFileInfo(), category(NULL) {};
/**
* Create an AI, using this AIInfo as start-template.
*/
static SQInteger Constructor(HSQUIRRELVM vm);
static SQInteger Import(HSQUIRRELVM vm);
/**
* Get the category this library is in.
*/
const char *GetCategory();
private:
const char *category;
};
#endif /* AI_INFO */