(svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING

This commit is contained in:
yexo
2009-07-31 19:50:01 +00:00
parent 0bb3d7030f
commit c2ed884012
6 changed files with 48 additions and 7 deletions

View File

@@ -131,6 +131,13 @@ void Squirrel::AddConst(const char *var_name, int value)
sq_newslot(this->vm, -3, SQTrue);
}
void Squirrel::AddConst(const char *var_name, bool value)
{
sq_pushstring(this->vm, OTTD2FS(var_name), -1);
sq_pushbool(this->vm, value);
sq_newslot(this->vm, -3, SQTrue);
}
void Squirrel::AddClassBegin(const char *class_name)
{
sq_pushroottable(this->vm);

View File

@@ -77,6 +77,12 @@ public:
*/
void AddConst(const char *var_name, int value);
/**
* Adds a const to the stack. Depending on the current state this means
* either a const to a class or to the global space.
*/
void AddConst(const char *var_name, bool value);
/**
* Adds a class to the global scope. Make sure to call AddClassEnd when you
* are done adding methods.