// 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 local integer t_1 local integer i 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 set t_1 = t set i = t_1 if i == 0 then endif call testSuccess() endfunction function init_test takes nothing returns nothing local integer clVar local integer this local integer func local boolean b local integer cond_result local integer temp 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 set clVar = this set func = clVar set temp = func set b = false if b then set cond_result = 1 else set cond_result = 0 endif call dispatch_TFunc_test_TFunc_run(temp, cond_result) endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction