summaryrefslogtreecommitdiff
path: root/src/ai/api/squirrel_export.awk
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-10-04 17:10:57 +0000
committersmatz <smatz@openttd.org>2009-10-04 17:10:57 +0000
commit32cbe57178129d371752e29e857fa454a046f7c3 (patch)
treec1dd06f2f7e052ee5bbbe6e388d6546da67648a3 /src/ai/api/squirrel_export.awk
parent1666f7a1a926eec76a5ae12d54debf4f13bca269 (diff)
downloadopenttd-32cbe57178129d371752e29e857fa454a046f7c3.tar.xz
(svn r17692) -Codechange: minor coding style fixes
Diffstat (limited to 'src/ai/api/squirrel_export.awk')
-rw-r--r--src/ai/api/squirrel_export.awk6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ai/api/squirrel_export.awk b/src/ai/api/squirrel_export.awk
index d33cfe4a4..b9ea9e519 100644
--- a/src/ai/api/squirrel_export.awk
+++ b/src/ai/api/squirrel_export.awk
@@ -13,7 +13,8 @@
#
# Simple insertion sort.
-function array_sort(ARRAY, ELEMENTS, temp, i, j) {
+function array_sort(ARRAY, ELEMENTS, temp, i, j)
+{
for (i = 2; i <= ELEMENTS; i++)
for (j = i; ARRAY[j - 1] > ARRAY[j]; --j) {
temp = ARRAY[j]
@@ -23,7 +24,8 @@ function array_sort(ARRAY, ELEMENTS, temp, i, j) {
return
}
-function dump_class_templates(name) {
+function dump_class_templates(name)
+{
print " template <> " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }"
print " template <> " name " &GetParam(ForceType<" name " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }"
print " template <> const " name " *GetParam(ForceType<const " name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }"