// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366
globals
integer array CallbackPeriodic_nextFree
integer CallbackPeriodic_firstFree=0
integer CallbackPeriodic_maxIndex=0
integer array CallbackPeriodic_typeId
integer array CallbackPeriodic_update_fn
string dispatch_PeriodicDialogUpdateFn_Hello_PeriodicDialogUpdateFn_call_return_name=null
code ref_function_CallbackPeriodic_staticCallback=null
endglobals
native blub takes code c returns nothing
function dispatch_PeriodicDialogUpdateFn_Hello_PeriodicDialogUpdateFn_call takes integer this, integer cb returns string
	set dispatch_PeriodicDialogUpdateFn_Hello_PeriodicDialogUpdateFn_call_return_name = null
	return dispatch_PeriodicDialogUpdateFn_Hello_PeriodicDialogUpdateFn_call_return_name
endfunction

function CallbackPeriodic_staticCallback takes nothing returns nothing
	local integer cb = 0
	if CallbackPeriodic_update_fn[cb] != 0 then
		call dispatch_PeriodicDialogUpdateFn_Hello_PeriodicDialogUpdateFn_call(CallbackPeriodic_update_fn[cb], cb)
	endif
endfunction

function initGlobals takes nothing returns nothing
	set CallbackPeriodic_firstFree = 0
	set CallbackPeriodic_maxIndex = 0
	set ref_function_CallbackPeriodic_staticCallback = function CallbackPeriodic_staticCallback
endfunction

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

function alloc_CallbackPeriodic_doPeriodically_Hello takes nothing returns integer
	local integer this
	if CallbackPeriodic_firstFree == 0 then
		if CallbackPeriodic_maxIndex < 32768 then
			set CallbackPeriodic_maxIndex = CallbackPeriodic_maxIndex + 1
			set this = CallbackPeriodic_maxIndex
			set CallbackPeriodic_typeId[this] = 2
		else
			call error("Out of memory: Could not create CallbackPeriodic_doPeriodically_Hello.")
			set this = 0
		endif
	else
		set CallbackPeriodic_firstFree = CallbackPeriodic_firstFree - 1
		set this = CallbackPeriodic_nextFree[CallbackPeriodic_firstFree]
		set CallbackPeriodic_typeId[this] = 2
	endif
	return this
endfunction

function CallbackPeriodic_init takes integer this returns nothing
	set CallbackPeriodic_update_fn[this] = 0
endfunction

function construct_CallbackPeriodic takes integer this returns nothing
	call CallbackPeriodic_init(this)
endfunction

function CallbackPeriodic_start takes integer this, real time returns nothing
	call blub(ref_function_CallbackPeriodic_staticCallback)
endfunction

function dispatch_CallbackPeriodic_Hello_CallbackPeriodic_start takes integer this, real time returns nothing
	if CallbackPeriodic_typeId[this] == 0 then
		if this == 0 then
			call error("Nullpointer exception when calling CallbackPeriodic.start")
		else
			call error("Called CallbackPeriodic.start on invalid object.")
		endif
	endif
	call CallbackPeriodic_start(this, time)
endfunction

function doPeriodically takes real time, integer cb returns integer
	call dispatch_CallbackPeriodic_Hello_CallbackPeriodic_start(cb, time)
	return cb
endfunction

function init_Hello takes nothing returns nothing
	local integer clVar = alloc_CallbackPeriodic_doPeriodically_Hello()
	call construct_CallbackPeriodic(clVar)
	call doPeriodically(1.0, clVar)
endfunction

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

function config takes nothing returns nothing
endfunction