diff -r 91423dbb6f5f -r 8af5a1399842 src/ai/api/ai_accounting.hpp --- a/src/ai/api/ai_accounting.hpp Sat Apr 14 21:01:44 2007 +0000 +++ b/src/ai/api/ai_accounting.hpp Sat Apr 14 21:57:44 2007 +0000 @@ -51,27 +51,4 @@ void ResetCosts(); }; -#ifdef DEFINE_SQUIRREL_CLASS -namespace SQConvert { - /* Allow AIAccounting to be used as Squirrel parameter */ - template <> AIAccounting *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIAccounting *)instance; } - template <> AIAccounting &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIAccounting *)instance; } - template <> const AIAccounting *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIAccounting *)instance; } - template <> const AIAccounting &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIAccounting *)instance; } -}; // namespace SQConvert - -void SQAIAccountingRegister(Squirrel *engine) { - DefSQClass SQAIAccounting("AIAccounting"); - SQAIAccounting.PreRegister(engine); - SQAIAccounting.AddConstructor(engine); - - SQAIAccounting.DefSQStaticMethod(engine, &AIAccounting::GetClassName, "GetClassName", 1, "x"); - - SQAIAccounting.DefSQMethod(engine, &AIAccounting::GetCosts, "GetCosts", 1, "x"); - SQAIAccounting.DefSQMethod(engine, &AIAccounting::ResetCosts, "ResetCosts", 1, "x"); - - SQAIAccounting.PostRegister(engine); -} -#endif /* DEFINE_SQUIRREL_CLASS */ - #endif /* AI_ACCOUNTING_HPP */