-- update any in-progress debug animations
-- return whether any work remains
refresh_debug_animations = function()
	local a = Debug_animations_in_progress
	for i=#a,1,-1 do
		if coroutine.status(a[i].co) == 'dead' then
			table.remove(a, i)
		elseif Current_time > a[i].next_run then
			local status, err = coroutine.resume(a[i].co)
			if status == false then error(err) end
			a[i].next_run = Current_time + Debug_animation_period
		end
	end
	return #a > 0
end
