summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_company.hpp.sq
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-08-19 21:14:51 +0000
committerfrosch <frosch@openttd.org>2011-08-19 21:14:51 +0000
commita7d81956776699d87a16ebd161e94992171f1bee (patch)
treebe1a1373502528b6df6fee9b9120d3429050c450 /src/ai/api/ai_company.hpp.sq
parent4b3aa9f26e02d3df23ec5cec5fe4a2d07f6de139 (diff)
downloadopenttd-a7d81956776699d87a16ebd161e94992171f1bee.tar.xz
(svn r22762) -Fix (r22584): Update ai_company.hpp.sq
Diffstat (limited to 'src/ai/api/ai_company.hpp.sq')
-rw-r--r--src/ai/api/ai_company.hpp.sq56
1 files changed, 29 insertions, 27 deletions
diff --git a/src/ai/api/ai_company.hpp.sq b/src/ai/api/ai_company.hpp.sq
index 8673cb842..f2dae40b7 100644
--- a/src/ai/api/ai_company.hpp.sq
+++ b/src/ai/api/ai_company.hpp.sq
@@ -13,6 +13,8 @@
namespace SQConvert {
/* Allow enums to be used as Squirrel parameters */
+ template <> AICompany::Quarter GetParam(ForceType<AICompany::Quarter>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AICompany::Quarter)tmp; }
+ template <> int Return<AICompany::Quarter>(HSQUIRRELVM vm, AICompany::Quarter res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> AICompany::CompanyID GetParam(ForceType<AICompany::CompanyID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AICompany::CompanyID)tmp; }
template <> int Return<AICompany::CompanyID>(HSQUIRRELVM vm, AICompany::CompanyID res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> AICompany::Gender GetParam(ForceType<AICompany::Gender>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AICompany::Gender)tmp; }
@@ -42,33 +44,33 @@ void SQAICompany_Register(Squirrel *engine)
SQAICompany.DefSQConst(engine, AICompany::GENDER_FEMALE, "GENDER_FEMALE");
SQAICompany.DefSQConst(engine, AICompany::GENDER_INVALID, "GENDER_INVALID");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::IsMine, "IsMine", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, "..");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetName, "GetName", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, "..");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentName, "GetPresidentName", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentGender, "SetPresidentGender", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetLoanAmount, "SetLoanAmount", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetLoanAmount, "GetLoanAmount", 1, ".");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, ".");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetLoanInterval, "GetLoanInterval", 1, ".");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetBankBalance, "GetBankBalance", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::BuildCompanyHQ, "BuildCompanyHQ", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetAutoRenewStatus, "SetAutoRenewStatus", 2, ".b");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetAutoRenewMonths, "SetAutoRenewMonths", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetAutoRenewMoney, "SetAutoRenewMoney", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::IsMine, "IsMine", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, "..");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetName, "GetName", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, "..");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentName, "GetPresidentName", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentGender, "SetPresidentGender", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetLoanAmount, "SetLoanAmount", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetLoanAmount, "GetLoanAmount", 1, ".");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, ".");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetLoanInterval, "GetLoanInterval", 1, ".");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetBankBalance, "GetBankBalance", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::BuildCompanyHQ, "BuildCompanyHQ", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetAutoRenewStatus, "SetAutoRenewStatus", 2, ".b");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetAutoRenewMonths, "SetAutoRenewMonths", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetAutoRenewMoney, "SetAutoRenewMoney", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i");
SQAICompany.PostRegister(engine);
}