// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array Blub_nextFree integer Blub_firstFree=0 integer Blub_maxIndex=0 endglobals function initGlobals takes nothing returns nothing set Blub_firstFree = 0 set Blub_maxIndex = 0 endfunction function bla takes integer t returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function alloc_Blub takes nothing returns integer local integer this if Blub_firstFree == 0 then if Blub_maxIndex < 32768 then set Blub_maxIndex = Blub_maxIndex + 1 set this = Blub_maxIndex else call error("Out of memory: Could not create Blub.") set this = 0 endif else set Blub_firstFree = Blub_firstFree - 1 set this = Blub_nextFree[Blub_firstFree] endif return this endfunction function Blub_init takes integer this returns nothing endfunction function construct_Blub takes integer this returns nothing call Blub_init(this) endfunction function new_Blub takes nothing returns integer local integer this = alloc_Blub() call construct_Blub(this) return this endfunction function init_Test takes nothing returns nothing call bla(new_Blub()) endfunction function main takes nothing returns nothing call initGlobals() call init_Test() endfunction function config takes nothing returns nothing endfunction