// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1367
globals
integer array SimpleFunc_nextFree
integer SimpleFunc_firstFree=0
integer SimpleFunc_maxIndex=0
endglobals
function initGlobals takes nothing returns nothing
	set SimpleFunc_firstFree = 0
	set SimpleFunc_maxIndex = 0
endfunction

function error takes string msg returns nothing
	call BJDebugMsg(msg + "\n" + "")
endfunction

function alloc_SimpleFunc_test takes nothing returns integer
	local integer this
	if SimpleFunc_firstFree == 0 then
		if SimpleFunc_maxIndex < 32768 then
			set SimpleFunc_maxIndex = SimpleFunc_maxIndex + 1
			set this = SimpleFunc_maxIndex
		else
			call error("Out of memory: Could not create SimpleFunc_test.")
			set this = 0
		endif
	else
		set SimpleFunc_firstFree = SimpleFunc_firstFree - 1
		set this = SimpleFunc_nextFree[SimpleFunc_firstFree]
	endif
	return this
endfunction

function init_test takes nothing returns nothing
	call alloc_SimpleFunc_test()
endfunction

function main takes nothing returns nothing
	call initGlobals()
	call init_test()
endfunction

function config takes nothing returns nothing
endfunction