// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer test_at=0 integer array AssistTimestamps_nextFree integer AssistTimestamps_firstFree=0 integer AssistTimestamps_maxIndex=0 integer array AssistTimestamps_vals_0 integer array AssistTimestamps_vals_1 integer array AssistTimestamps_vals_2 integer array AssistTimestamps_vals_3 integer array AssistTimestamps_vals_4 integer array AssistTimestamps_vals_5 integer array AssistTimestamps_vals_6 integer array AssistTimestamps_vals_7 integer array AssistTimestamps_vals_8 integer array AssistTimestamps_vals_9 integer array AssistTimestamps_vals_10 integer array AssistTimestamps_vals_11 endglobals native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing set AssistTimestamps_firstFree = 0 set AssistTimestamps_maxIndex = 0 endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function AssistTimestamps_vals_get takes integer index1, integer index2 returns integer local integer returnVal if index2 < 0 or index2 >= 12 then call error("Index out of Bounds") elseif index2 <= 5 then if index2 <= 2 then if index2 <= 1 then if index2 <= 0 then set returnVal = AssistTimestamps_vals_0[index1] else set returnVal = AssistTimestamps_vals_1[index1] endif else set returnVal = AssistTimestamps_vals_2[index1] endif elseif index2 <= 4 then if index2 <= 3 then set returnVal = AssistTimestamps_vals_3[index1] else set returnVal = AssistTimestamps_vals_4[index1] endif else set returnVal = AssistTimestamps_vals_5[index1] endif elseif index2 <= 8 then if index2 <= 7 then if index2 <= 6 then set returnVal = AssistTimestamps_vals_6[index1] else set returnVal = AssistTimestamps_vals_7[index1] endif else set returnVal = AssistTimestamps_vals_8[index1] endif elseif index2 <= 10 then if index2 <= 9 then set returnVal = AssistTimestamps_vals_9[index1] else set returnVal = AssistTimestamps_vals_10[index1] endif else set returnVal = AssistTimestamps_vals_11[index1] endif return returnVal endfunction function AssistTimestamps_vals_set takes integer instanceId, integer arrayIndex, integer value returns nothing if arrayIndex < 0 or arrayIndex >= 12 then call error("Index out of Bounds") elseif arrayIndex <= 5 then if arrayIndex <= 2 then if arrayIndex <= 1 then if arrayIndex <= 0 then set AssistTimestamps_vals_0[instanceId] = value else set AssistTimestamps_vals_1[instanceId] = value endif else set AssistTimestamps_vals_2[instanceId] = value endif elseif arrayIndex <= 4 then if arrayIndex <= 3 then set AssistTimestamps_vals_3[instanceId] = value else set AssistTimestamps_vals_4[instanceId] = value endif else set AssistTimestamps_vals_5[instanceId] = value endif elseif arrayIndex <= 8 then if arrayIndex <= 7 then if arrayIndex <= 6 then set AssistTimestamps_vals_6[instanceId] = value else set AssistTimestamps_vals_7[instanceId] = value endif else set AssistTimestamps_vals_8[instanceId] = value endif elseif arrayIndex <= 10 then if arrayIndex <= 9 then set AssistTimestamps_vals_9[instanceId] = value else set AssistTimestamps_vals_10[instanceId] = value endif else set AssistTimestamps_vals_11[instanceId] = value endif endfunction function alloc_AssistTimestamps takes nothing returns integer local integer this if AssistTimestamps_firstFree == 0 then if AssistTimestamps_maxIndex < 32768 then set AssistTimestamps_maxIndex = AssistTimestamps_maxIndex + 1 set this = AssistTimestamps_maxIndex else call error("Out of memory: Could not create AssistTimestamps.") set this = 0 endif else set AssistTimestamps_firstFree = AssistTimestamps_firstFree - 1 set this = AssistTimestamps_nextFree[AssistTimestamps_firstFree] endif return this endfunction function AssistTimestamps_init takes integer this returns nothing endfunction function construct_AssistTimestamps takes integer this returns nothing call AssistTimestamps_init(this) endfunction function new_AssistTimestamps takes nothing returns integer local integer this = alloc_AssistTimestamps() call construct_AssistTimestamps(this) return this endfunction function init_test takes nothing returns nothing set test_at = new_AssistTimestamps() call AssistTimestamps_vals_set(test_at, 3, 42) if AssistTimestamps_vals_get(test_at, 4) == 0 then call testSuccess() endif endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction