// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals // originframetype ORIGIN_FRAME_GAME_UI=null // integer bj_MAX_PLAYER_SLOTS=0 // rect bj_mapInitialPlayableArea=null string array Colors_hexs integer Colors_decs=0 hashtable ErrorHandling_HT=null framehandle Framehandle_GAME_UI=null real GameTimer_currentTime=0. boolean MagicFunctions_compiletime=false rect MapBounds_playableMapRect=null rect MapBounds_boundRect=null integer ObjectRecycler_objectLists=0 player Player_localPlayer=null hashtable Table_ht=null integer TypeCasting_typecastdata=0 hashtable hashtable_compiletime=null hashtable hashtable_compiletime_32=null integer array Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer array SEntry_nextFree integer SEntry_firstFree=0 integer SEntry_maxIndex=0 integer array Stack_nextFree integer Stack_firstFree=0 integer Stack_maxIndex=0 integer array Stack_typeId integer array SEntry_elem integer array SEntry_prev integer array Stack_dummy integer array Stack_top integer array Stack_size integer wurst_stack_depth=0 string array wurst_stack code ref_function_init_AbilityIds=null code ref_function_init_Real=null code ref_function_init_Integer=null code ref_function_init_Angle=null code ref_function_init_String=null code ref_function_init_Vectors=null code ref_function_init_Destructable=null code ref_function_init_Player=null code ref_function_init_Basics=null code ref_function_init_MagicFunctions=null code ref_function_init_Table=null code ref_function_init_Playercolor=null code ref_function_init_Maths=null code ref_function_bridge_init_Colors=null code ref_function_init_Printing=null code ref_function_init_GameTimer=null code ref_function_init_ErrorHandling=null code ref_function_init_HashList=null code ref_function_init_Matrices=null code ref_function_init_Quaternion=null code ref_function_bridge_init_Framehandle=null code ref_function_init_Group=null code ref_function_init_Lightning=null code ref_function_init_WeatherEffects=null code ref_function_bridge_init_TypeCasting=null code ref_function_bridge_init_EventHelper=null code ref_function_init_MapBounds=null code ref_function_bridge_init_ObjectRecycler=null code ref_function_code__startPeriodic_GameTimer=null endglobals function Loglevel_getTag takes integer this returns string if this == 0 then return "|cffADADADtrace|r" elseif this == 1 then return "|cff2685DCdebug|r" elseif this == 2 then return "|cffFFCC00info|r" elseif this == 3 then return "|cffF47E3Ewarning|r" else return "|cffFB2700error|r" endif endfunction function compileError takes string msg returns nothing endfunction function error takes string msg, string w__wurst_stackPos returns nothing local integer hash local integer stacktraceIndex local integer stacktraceLimit local player showTo set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else set hash = StringHash(msg) if HaveSavedInteger(ErrorHandling_HT, -1, hash) then if LoadInteger(ErrorHandling_HT, -1, hash) + 60 < GameTimer_currentTime then set w__wurst_stackPos = msg set msg = "" set stacktraceIndex = wurst_stack_depth set stacktraceLimit = 0 loop set stacktraceIndex = stacktraceIndex - 1 set stacktraceLimit = stacktraceLimit + 1 exitwhen stacktraceLimit > 20 or stacktraceIndex < 0 set msg = msg + "\n " + wurst_stack[stacktraceIndex] endloop set msg = w__wurst_stackPos + msg set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + msg) endif call SaveInteger(ErrorHandling_HT, -1, hash, R2I(GameTimer_currentTime)) call SaveBoolean(ErrorHandling_HT, -1, hash, false) elseif HaveSavedBoolean(ErrorHandling_HT, -1, hash) then if not LoadBoolean(ErrorHandling_HT, -1, hash) then set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + "|cffFF3A29Excessive repeating errors are being omitted") endif call SaveBoolean(ErrorHandling_HT, -1, hash, true) endif else set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + "|cffFF3A29Excessive repeating errors are being omitted") endif call SaveBoolean(ErrorHandling_HT, -1, hash, true) endif else call SaveInteger(ErrorHandling_HT, -1, hash, R2I(GameTimer_currentTime)) set msg = "Message: " + msg set w__wurst_stackPos = "" set stacktraceIndex = wurst_stack_depth set hash = 0 loop set stacktraceIndex = stacktraceIndex - 1 set hash = hash + 1 exitwhen hash > 20 or stacktraceIndex < 0 set w__wurst_stackPos = w__wurst_stackPos + "\n " + wurst_stack[stacktraceIndex] endloop set msg = msg + w__wurst_stackPos set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + msg) endif endif call I2S(1 / 0) endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function initCompiletimeState_0 takes nothing returns nothing call InitHashtable() call InitHashtable() set hashtable_compiletime_32 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_32, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_32, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_32, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_32, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_32, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_32, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_32, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_32, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_32, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_32, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_32, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_32, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_32, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_32, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_32, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_32, 1, 789744696, 15) call SaveStr(hashtable_compiletime_32, 2, 0, "") endfunction function initializeTable takes string w__wurst_stackPos returns nothing local integer i local integer this local integer parentKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set i = 0 loop exitwhen i > 15 set this = Colors_decs set parentKey = StringHash(Colors_hexs[i]) set wurst_stack[wurst_stack_depth] = "when calling saveInt in Colors, line 299" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveInt", "when calling error in Table, line 43") else call error("Called Table.saveInt on invalid object.", "when calling error in Table, line 43") endif endif call SaveInteger(Table_ht, this, parentKey, i) set wurst_stack_depth = wurst_stack_depth - 1 set i = i + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 endfunction function new_Table takes string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Table in Table, line 6" set wurst_stack_depth = wurst_stack_depth + 1 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this = Table_maxIndex set Table_typeId[this] = 15 else call error("Out of memory: Could not create Table.", "when calling error in Table, line 7") set this = 0 endif else set Table_firstFree = Table_firstFree - 1 set this = Table_nextFree[Table_firstFree] set Table_typeId[this] = 15 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this endfunction function init_Colors takes string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set Colors_hexs[0] = "0" set Colors_hexs[1] = "1" set Colors_hexs[2] = "2" set Colors_hexs[3] = "3" set Colors_hexs[4] = "4" set Colors_hexs[5] = "5" set Colors_hexs[6] = "6" set Colors_hexs[7] = "7" set Colors_hexs[8] = "8" set Colors_hexs[9] = "9" set Colors_hexs[10] = "A" set Colors_hexs[11] = "B" set Colors_hexs[12] = "C" set Colors_hexs[13] = "D" set Colors_hexs[14] = "E" set Colors_hexs[15] = "F" set Colors_decs = new_Table("when calling new_Table in Colors, line 15") call initializeTable("when calling initializeTable in Colors, line 302") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_Colors takes nothing returns boolean set wurst_stack_depth = 0 return init_Colors("via function reference Colors, line 1") endfunction function new_HashMap takes string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_HashMap in HashMap, line 7" set wurst_stack_depth = wurst_stack_depth + 1 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this = Table_maxIndex set Table_typeId[this] = 16 else call error("Out of memory: Could not create HashMap.", "when calling error in HashMap, line 8") set this = 0 endif else set Table_firstFree = Table_firstFree - 1 set this = Table_nextFree[Table_firstFree] set Table_typeId[this] = 16 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this endfunction function bridge_init_EventHelper takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference EventHelper, line 1" set wurst_stack_depth = wurst_stack_depth + 1 call new_HashMap("when calling new_HashMap in EventHelper, line 7") call new_HashMap("when calling new_HashMap in EventHelper, line 8") call new_Table("when calling new_Table in EventHelper, line 9") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function verifyFrameNameLength takes string name, string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if StringLength(name) > 560 then call error("Trying to address frame with exceeding maximum frame name length (" + I2S(560) + ") for: " + name, "when calling error in Framehandle, line 78") set wurst_stack_depth = wurst_stack_depth - 1 return false endif set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function init_Framehandle takes string w__wurst_stackPos returns boolean local framehandle owner set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) set owner = Framehandle_GAME_UI set wurst_stack[wurst_stack_depth] = "when calling createFrame in Framehandle, line 491" set wurst_stack_depth = wurst_stack_depth + 1 call verifyFrameNameLength("SetMousePositionCage", "when calling verifyFrameNameLength in Framehandle, line 144") set owner = BlzCreateFrameByType("FRAME", "SetMousePositionCage", owner, null, 0) set wurst_stack_depth = wurst_stack_depth - 1 call BlzFrameSetSize(owner, 0.0001, 0.0001) set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_Framehandle takes nothing returns boolean set wurst_stack_depth = 0 return init_Framehandle("via function reference Framehandle, line 1") endfunction function new_SEntry takes integer elem, integer prev, string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_SEntry in ObjectRecycler.wurst, line 88" set wurst_stack_depth = wurst_stack_depth + 1 if SEntry_firstFree == 0 then if SEntry_maxIndex < 32768 then set SEntry_maxIndex = SEntry_maxIndex + 1 set this = SEntry_maxIndex else call error("Out of memory: Could not create SEntry.", "when calling error in ObjectRecycler.wurst, line 84") set this = 0 endif else set SEntry_firstFree = SEntry_firstFree - 1 set this = SEntry_nextFree[SEntry_firstFree] endif set wurst_stack_depth = wurst_stack_depth - 1 set SEntry_elem[this] = elem set SEntry_prev[this] = prev set wurst_stack_depth = wurst_stack_depth - 1 return this endfunction function new_Stack takes string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Stack in ObjectRecycler.wurst, line 41" set wurst_stack_depth = wurst_stack_depth + 1 if Stack_firstFree == 0 then if Stack_maxIndex < 32768 then set Stack_maxIndex = Stack_maxIndex + 1 set this = Stack_maxIndex set Stack_typeId[this] = 12 else call error("Out of memory: Could not create Stack.", "when calling error in ObjectRecycler.wurst, line 36") set this = 0 endif else set Stack_firstFree = Stack_firstFree - 1 set this = Stack_nextFree[Stack_firstFree] set Stack_typeId[this] = 12 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling construct_Stack in ObjectRecycler.wurst, line 41" set wurst_stack_depth = wurst_stack_depth + 1 set Stack_size[this] = 0 set Stack_dummy[this] = new_SEntry(0, 0, "when calling new_SEntry in ObjectRecycler.wurst, line 42") set Stack_top[this] = Stack_dummy[this] set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this endfunction function unitFromIndex takes integer index, string w__wurst_stackPos returns unit local integer this local fogstate value local unit Table_Table_loadUnit_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this = TypeCasting_typecastdata set value = ConvertFogState(index) set wurst_stack[wurst_stack_depth] = "when calling saveFogState in TypeCasting, line 53" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveFogState", "when calling error in Table, line 169") else call error("Called Table.saveFogState on invalid object.", "when calling error in Table, line 169") endif endif call SaveFogStateHandle(Table_ht, this, 0, value) set wurst_stack_depth = wurst_stack_depth - 1 set index = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling loadUnit in TypeCasting, line 54" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[index] == 0 then if index == 0 then call error("Nullpointer exception when calling Table.loadUnit", "when calling error in Table, line 76") else call error("Called Table.loadUnit on invalid object.", "when calling error in Table, line 76") endif endif set Table_Table_loadUnit_result = LoadUnitHandle(Table_ht, index, 0) set wurst_stack_depth = wurst_stack_depth - 1 - 1 return Table_Table_loadUnit_result endfunction function getUnit takes player p, integer id, real pos_x, real pos_y, real facing_radians, string w__wurst_stackPos returns unit local unit stackTrace_tempReturn_2 local boolean Table_Table_hasInt_result local integer Stack_Stack_pop_result local integer this local integer value set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set value = ObjectRecycler_objectLists set wurst_stack[wurst_stack_depth] = "when calling hasInt in ObjectRecycler.wurst, line 22" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[value] == 0 then if value == 0 then call error("Nullpointer exception when calling Table.hasInt", "when calling error in Table, line 10") else call error("Called Table.hasInt on invalid object.", "when calling error in Table, line 10") endif endif set Table_Table_hasInt_result = HaveSavedInteger(Table_ht, value, id) set wurst_stack_depth = wurst_stack_depth - 1 if Table_Table_hasInt_result then set value = ObjectRecycler_objectLists set wurst_stack[wurst_stack_depth] = "when calling loadInt in ObjectRecycler.wurst, line 23" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[value] == 0 then if value == 0 then call error("Nullpointer exception when calling Table.loadInt", "when calling error in Table, line 40") else call error("Called Table.loadInt on invalid object.", "when calling error in Table, line 40") endif endif set id = LoadInteger(Table_ht, value, id) set wurst_stack_depth = wurst_stack_depth - 1 set id = id set wurst_stack[wurst_stack_depth] = "when calling pop in ObjectRecycler.wurst, line 24" set wurst_stack_depth = wurst_stack_depth + 1 if Stack_typeId[id] == 0 then if id == 0 then call error("Nullpointer exception when calling Stack.pop", "when calling error in ObjectRecycler.wurst, line 51") else call error("Called Stack.pop on invalid object.", "when calling error in ObjectRecycler.wurst, line 51") endif endif set value = Stack_top[id] set Stack_top[id] = SEntry_prev[Stack_top[id]] set Stack_size[id] = Stack_size[id] - 1 set Stack_Stack_pop_result = SEntry_elem[value] set wurst_stack_depth = wurst_stack_depth - 1 set stackTrace_tempReturn_2 = unitFromIndex(Stack_Stack_pop_result, "when calling unitFromIndex in ObjectRecycler.wurst, line 24") call SetUnitFacing(stackTrace_tempReturn_2, facing_radians * 57.295779513) call ShowUnit(stackTrace_tempReturn_2, true) set wurst_stack_depth = wurst_stack_depth - 1 return stackTrace_tempReturn_2 else set this = ObjectRecycler_objectLists set value = new_Stack("when calling new_Stack in ObjectRecycler.wurst, line 26") set wurst_stack[wurst_stack_depth] = "when calling saveInt in ObjectRecycler.wurst, line 26" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveInt", "when calling error in Table, line 43") else call error("Called Table.saveInt on invalid object.", "when calling error in Table, line 43") endif endif call SaveInteger(Table_ht, this, id, value) set wurst_stack_depth = wurst_stack_depth - 1 set stackTrace_tempReturn_2 = CreateUnit(p, id, pos_x, pos_y, facing_radians * 57.295779513) set wurst_stack_depth = wurst_stack_depth - 1 return stackTrace_tempReturn_2 endif endfunction function unit_recycle takes unit this, string w__wurst_stackPos returns nothing local integer id local boolean Table_Table_hasInt_result local integer this_1 local integer elem set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set id = GetUnitTypeId(this) set this_1 = ObjectRecycler_objectLists set wurst_stack[wurst_stack_depth] = "when calling hasInt in ObjectRecycler.wurst, line 12" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasInt", "when calling error in Table, line 10") else call error("Called Table.hasInt on invalid object.", "when calling error in Table, line 10") endif endif set Table_Table_hasInt_result = HaveSavedInteger(Table_ht, this_1, id) set wurst_stack_depth = wurst_stack_depth - 1 if Table_Table_hasInt_result then set this_1 = ObjectRecycler_objectLists set wurst_stack[wurst_stack_depth] = "when calling loadInt in ObjectRecycler.wurst, line 13" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadInt", "when calling error in Table, line 40") else call error("Called Table.loadInt on invalid object.", "when calling error in Table, line 40") endif endif set id = LoadInteger(Table_ht, this_1, id) set wurst_stack_depth = wurst_stack_depth - 1 set id = id set elem = GetHandleId(this) set wurst_stack[wurst_stack_depth] = "when calling push in ObjectRecycler.wurst, line 14" set wurst_stack_depth = wurst_stack_depth + 1 if Stack_typeId[id] == 0 then if id == 0 then call error("Nullpointer exception when calling Stack.push", "when calling error in ObjectRecycler.wurst, line 46") else call error("Called Stack.push on invalid object.", "when calling error in ObjectRecycler.wurst, line 46") endif endif set wurst_stack[wurst_stack_depth] = "when calling push in ObjectRecycler.wurst, line 46" set wurst_stack_depth = wurst_stack_depth + 1 set Stack_top[id] = new_SEntry(elem, Stack_top[id], "when calling new_SEntry in ObjectRecycler.wurst, line 47") set Stack_size[id] = Stack_size[id] + 1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 call ShowUnit(this, false) call SetUnitPosition(this, 1., 2.) else call error("trying to recycle a unit not created by 'getUnit'!", "when calling error in ObjectRecycler.wurst, line 18") endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function init_ObjectRecycler takes string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set ObjectRecycler_objectLists = new_Table("when calling new_Table in ObjectRecycler.wurst, line 8") call unit_recycle(getUnit(Player(0), 0, 0., 0., 0., "when calling getUnit in ObjectRecycler.wurst, line 30"), "when calling recycle in ObjectRecycler.wurst, line 31") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_ObjectRecycler takes nothing returns boolean set wurst_stack_depth = 0 return init_ObjectRecycler("via function reference ObjectRecycler.wurst, line 1") endfunction function init_TypeCasting takes string w__wurst_stackPos returns boolean local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set TypeCasting_typecastdata = new_Table("when calling new_Table in TypeCasting, line 7") set wurst_stack[wurst_stack_depth] = "when calling initTypecastData in TypeCasting, line 15" set wurst_stack_depth = wurst_stack_depth + 1 set this = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling saveString in TypeCasting, line 12" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveString", "when calling error in Table, line 61") else call error("Called Table.saveString on invalid object.", "when calling error in Table, line 61") endif endif call SaveStr(Table_ht, this, 0, "") set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 return true endfunction function bridge_init_TypeCasting takes nothing returns boolean set wurst_stack_depth = 0 return init_TypeCasting("via function reference TypeCasting, line 1") endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function init_AbilityIds takes nothing returns boolean return true endfunction function init_Angle takes nothing returns boolean return true endfunction function init_Basics takes nothing returns boolean return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_HT = hashtable_compiletime return true endfunction function init_GameTimer takes nothing returns boolean call TimerStart(CreateTimer(), 100000., false, null) call TimerStart(CreateTimer(), 0.030, true, ref_function_code__startPeriodic_GameTimer) return true endfunction function init_Group takes nothing returns boolean call CreateGroup() return true endfunction function init_HashList takes nothing returns boolean return true endfunction function init_Integer takes nothing returns boolean return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function initMapBounds takes nothing returns nothing local rect cond_result local region receiver if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = bj_mapInitialPlayableArea endif set MapBounds_playableMapRect = cond_result set receiver = CreateRegion() call RegionAddRect(receiver, MapBounds_playableMapRect) if MagicFunctions_compiletime then set cond_result = Rect(-1536., -1536., 1536., 1536.) else set cond_result = GetWorldBounds() endif set MapBounds_boundRect = cond_result set receiver = CreateRegion() call RegionAddRect(receiver, MapBounds_boundRect) call GetRectMinX(MapBounds_playableMapRect) call GetRectMinY(MapBounds_playableMapRect) call GetRectMaxX(MapBounds_playableMapRect) call GetRectMaxY(MapBounds_playableMapRect) call GetRectMinX(MapBounds_boundRect) call GetRectMinY(MapBounds_boundRect) call GetRectMaxX(MapBounds_boundRect) call GetRectMaxY(MapBounds_boundRect) endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean return true endfunction function init_Player takes nothing returns boolean local integer i local integer temp set Player_localPlayer = GetLocalPlayer() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set i = i + 1 endloop return true endfunction function init_Playercolor takes nothing returns boolean return true endfunction function init_Printing takes nothing returns boolean return true endfunction function init_Quaternion takes nothing returns boolean return true endfunction function init_Real takes nothing returns boolean return true endfunction function init_String takes nothing returns boolean return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_32 return true endfunction function init_Vectors takes nothing returns boolean call Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function initGlobals takes nothing returns nothing set ref_function_init_AbilityIds = function init_AbilityIds set ref_function_init_Real = function init_Real set ref_function_init_Integer = function init_Integer set ref_function_init_Angle = function init_Angle set ref_function_init_String = function init_String set ref_function_init_Vectors = function init_Vectors set ref_function_init_Destructable = function init_Destructable set ref_function_init_Player = function init_Player set ref_function_init_Basics = function init_Basics set ref_function_init_MagicFunctions = function init_MagicFunctions set ref_function_init_Table = function init_Table set ref_function_init_Playercolor = function init_Playercolor set ref_function_init_Maths = function init_Maths set ref_function_bridge_init_Colors = function bridge_init_Colors set ref_function_init_Printing = function init_Printing set ref_function_init_GameTimer = function init_GameTimer set ref_function_init_ErrorHandling = function init_ErrorHandling set ref_function_init_HashList = function init_HashList set ref_function_init_Matrices = function init_Matrices set ref_function_init_Quaternion = function init_Quaternion set ref_function_bridge_init_Framehandle = function bridge_init_Framehandle set ref_function_init_Group = function init_Group set ref_function_init_Lightning = function init_Lightning set ref_function_init_WeatherEffects = function init_WeatherEffects set ref_function_bridge_init_TypeCasting = function bridge_init_TypeCasting set ref_function_bridge_init_EventHelper = function bridge_init_EventHelper set ref_function_init_MapBounds = function init_MapBounds set ref_function_bridge_init_ObjectRecycler = function bridge_init_ObjectRecycler set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call ExecuteFunc("initCompiletimeState_0") set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityIds.", "when calling error in AbilityIds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Real)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Real.", "when calling error in Real, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Integer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Integer.", "when calling error in Integer, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Angle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Angle.", "when calling error in Angle, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_String)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package String.", "when calling error in String, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Vectors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Vectors.", "when calling error in Vectors, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Destructable)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Destructable.", "when calling error in Destructable, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Player)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Player.", "when calling error in Player, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Basics)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Basics.", "when calling error in Basics, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MagicFunctions)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MagicFunctions.", "when calling error in MagicFunctions, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Table)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Table.", "when calling error in Table, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Playercolor)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Playercolor.", "when calling error in Playercolor, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Maths)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Maths.", "when calling error in Maths, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_Colors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Colors.", "when calling error in Colors, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Printing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Printing.", "when calling error in Printing, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameTimer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameTimer.", "when calling error in GameTimer, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ErrorHandling)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ErrorHandling.", "when calling error in ErrorHandling, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashList.", "when calling error in HashList, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Matrices)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Matrices.", "when calling error in Matrices, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Quaternion)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Quaternion.", "when calling error in Quaternion, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_Framehandle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Framehandle.", "when calling error in Framehandle, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Group)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Group.", "when calling error in Group, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Lightning)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Lightning.", "when calling error in Lightning, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WeatherEffects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WeatherEffects.", "when calling error in WeatherEffects, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_TypeCasting)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TypeCasting.", "when calling error in TypeCasting, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_EventHelper)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EventHelper.", "when calling error in EventHelper, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MapBounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MapBounds.", "when calling error in MapBounds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_ObjectRecycler)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectRecycler.", "when calling error in ObjectRecycler.wurst, line 1") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function config takes nothing returns nothing endfunction