// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array List_nextFree integer List_firstFree=0 integer List_maxIndex=0 integer array List_typeId endglobals function initGlobals takes nothing returns nothing set List_firstFree = 0 set List_maxIndex = 0 endfunction function List_get takes integer this returns integer return 0 endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function dispatch_List_Test_List_get takes integer this returns integer local integer Test_List_get_result if List_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling List.get") else call error("Called List.get on invalid object.") endif endif set Test_List_get_result = List_get(this) return Test_List_get_result endfunction function effectFromIndex takes integer index returns effect return null endfunction function alloc_List takes nothing returns integer local integer this if List_firstFree == 0 then if List_maxIndex < 32768 then set List_maxIndex = List_maxIndex + 1 set this = List_maxIndex set List_typeId[this] = 1 else call error("Out of memory: Could not create List.") set this = 0 endif else set List_firstFree = List_firstFree - 1 set this = List_nextFree[List_firstFree] set List_typeId[this] = 1 endif return this endfunction function List_init takes integer this returns nothing endfunction function construct_List takes integer this returns nothing call List_init(this) endfunction function new_List takes nothing returns integer local integer this = alloc_List() call construct_List(this) return this endfunction function init_Test takes nothing returns nothing local integer fxs = new_List() call effectFromIndex(dispatch_List_Test_List_get(fxs)) endfunction function main takes nothing returns nothing call initGlobals() call init_Test() endfunction function config takes nothing returns nothing endfunction