-- stolen from an easings library

local function outBounce(t, b, c, d)
  t = t / d
  if t < 1 / 2.75 then
    return c * (7.5625 * t * t) + b
  elseif t < 2 / 2.75 then
    t = t - (1.5 / 2.75)
    return c * (7.5625 * t * t + 0.75) + b
  elseif t < 2.5 / 2.75 then
    t = t - (2.25 / 2.75)
    return c * (7.5625 * t * t + 0.9375) + b
  else
    t = t - (2.625 / 2.75)
    return c * (7.5625 * t * t + 0.984375) + b
  end
end

local function linear(t, b, c, d)
  return c * t / d + b
end

function main()
  local t = 0
  while current_sprite.size < 200 do
    current_sprite.size = math.floor(outBounce(t, 10, 200, 100) + 0.5)
    dink.wait(1)
    if current_sprite.size > 150 then
    current_sprite:say("`" .. math.random(6) .. "Wake up Dink, it's the future!")
    end
    t = t + 0.1
  end
  -- make her move around or something
  while true do
    current_sprite.x = player.x + math.floor(math.deg(math.sin(t)) + 0.5)
    current_sprite.y = player.y + math.floor(math.deg(math.cos(t)) + 0.5) * -1
    t = t + 0.2
    dink.wait(5)
  end
end
