// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals integer array TFunc_nextFree integer TFunc_firstFree=0 integer TFunc_maxIndex=0 integer array TFunc_typeId endglobals native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function dispatch_TFunc_test_TFunc_run takes integer this, integer t returns nothing if TFunc_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling TFunc.run") else call error("Called TFunc.run on invalid object.") endif endif call testSuccess() endfunction function init_test takes nothing returns nothing local integer this if TFunc_firstFree == 0 then if TFunc_maxIndex < 32768 then set TFunc_maxIndex = TFunc_maxIndex + 1 set this = TFunc_maxIndex set TFunc_typeId[this] = 2 else call error("Out of memory: Could not create TFunc_runFunc_test.") set this = 0 endif else set TFunc_firstFree = TFunc_firstFree - 1 set this = TFunc_nextFree[TFunc_firstFree] set TFunc_typeId[this] = 2 endif call dispatch_TFunc_test_TFunc_run(this, 0) endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction