(svn r9160) [NoAI] -Add: added AIController for Squirrel; all AIs, C++ or Squirrel, should extend this class
/* $Id$ */
/** @file squirrel.hpp declarations of the class for squirrel loader */
#ifndef SQUIRREL_HPP
#define SQUIRREL_HPP
#include "../core/ai_controller.hpp"
#include "../core/ai_base.hpp"
#include <squirrel.h>
class Squirrel: public AIController {
private:
HSQUIRRELVM vm; ///< The Virtual Machine for squirrel
/**
* Registers all our classes, so it can be used from Squirrel.
*/
void RegisterClasses();
/**
* Constructor for Squirrel AIController. We assign the real 'this' value to
* the instance pointer, so we can easy look up this->
*/
static SQInteger SQConstructor(HSQUIRRELVM vm);
/**
* A wrapper around the AIController class, as that can't be automated.
*/
static SQInteger SQGetTick(HSQUIRRELVM vm);
public:
Squirrel(const char *script_dir);
~Squirrel();
/* virtual */ void GameLoop();
};
#endif /* SQUIRREL_HPP */