src/ai/squirrel/engine.hpp
branchnoai
changeset 9398 a9479d5aa957
parent 9396 a05857491d2d
child 9399 84a3d84c19b2
equal deleted inserted replaced
9397:d8f8db9c1a2e 9398:a9479d5aa957
    78 	/**
    78 	/**
    79 	 * Get the real-instance pointer.
    79 	 * Get the real-instance pointer.
    80 	 * @note This will only work just after a function-call from within Squirrel
    80 	 * @note This will only work just after a function-call from within Squirrel
    81 	 *  to your C++ function.
    81 	 *  to your C++ function.
    82 	 */
    82 	 */
    83 	static bool GetInstance(HSQUIRRELVM vm, SQUserPointer *ptr) { if (SQ_FAILED(sq_getinstanceup(vm, 1, ptr, 0))) return false; return true; }
    83 	static bool GetInstance(HSQUIRRELVM vm, SQUserPointer *ptr) { return SQ_SUCCEEDED(sq_getinstanceup(vm, 1, ptr, 0); }
    84 
    84 
    85 	HSQUIRRELVM GetVM() {
    85 	HSQUIRRELVM GetVM() {
    86 #warning Please stop using this function ASAP
    86 #warning Please stop using this function ASAP
    87 		return this->vm;
    87 		return this->vm;
    88 	}
    88 	}