summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_company.hpp.sq
blob: 8673cb8423bbeae622ed2809cebb953064524cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* $Id$ */

/*
 * This file is part of OpenTTD.
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 */

/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */

#include "ai_company.hpp"

namespace SQConvert {
	/* Allow enums to be used as Squirrel parameters */
	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; }
	template <> int Return<AICompany::Gender>(HSQUIRRELVM vm, AICompany::Gender res) { sq_pushinteger(vm, (int32)res); return 1; }

	/* Allow AICompany to be used as Squirrel parameter */
	template <> AICompany *GetParam(ForceType<AICompany *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AICompany *)instance; }
	template <> AICompany &GetParam(ForceType<AICompany &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AICompany *)instance; }
	template <> const AICompany *GetParam(ForceType<const AICompany *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AICompany *)instance; }
	template <> const AICompany &GetParam(ForceType<const AICompany &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AICompany *)instance; }
	template <> int Return<AICompany *>(HSQUIRRELVM vm, AICompany *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICompany", res, NULL, DefSQDestructorCallback<AICompany>); return 1; }
} // namespace SQConvert

void SQAICompany_Register(Squirrel *engine)
{
	DefSQClass <AICompany> SQAICompany("AICompany");
	SQAICompany.PreRegister(engine);
	SQAICompany.AddConstructor<void (AICompany::*)(), 1>(engine, "x");

	SQAICompany.DefSQConst(engine, AICompany::CURRENT_QUARTER,  "CURRENT_QUARTER");
	SQAICompany.DefSQConst(engine, AICompany::EARLIEST_QUARTER, "EARLIEST_QUARTER");
	SQAICompany.DefSQConst(engine, AICompany::COMPANY_FIRST,    "COMPANY_FIRST");
	SQAICompany.DefSQConst(engine, AICompany::COMPANY_LAST,     "COMPANY_LAST");
	SQAICompany.DefSQConst(engine, AICompany::COMPANY_SELF,     "COMPANY_SELF");
	SQAICompany.DefSQConst(engine, AICompany::COMPANY_INVALID,  "COMPANY_INVALID");
	SQAICompany.DefSQConst(engine, AICompany::GENDER_MALE,      "GENDER_MALE");
	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.PostRegister(engine);
}