--load peachy
peachy = require("libs/peachy")

--load player
player = require("modules/player")

--load hump camera
Camera = require("libs/hump/camera")
camera = Camera(player.x, player.y)

--load content_loader
local content_loader = require("modules/content_loader")
spritesheets = content_loader.spritesheets
sound_effects = content_loader.sound_effects

--load globals
local globals = require("modules/globals")
local game = globals.game

--load draw_callback
draw_mod = require("modules/draw_callback")
local draw_callback = draw_mod.draw
local drawerinit = draw_mod.drawerinit

--load update_callback
update_mod = require("modules/update_callback")
local update_callback = update_mod.update
local updateinit = update_mod.updateinit

drawerinit(spritesheets, player, game, camera)
updateinit(game, camera)
player:init(sound_effects, spritesheets, game)

--play music for level
game:getcurlevel().music:play()

function love.draw()
    draw_callback()
end 

function love.update(dt)
   update_callback(dt) 
end