

-- TODO: Move this to another file.
maxControlNum = 0;
function addControl(name)
   
   local ret = maxControlNum;
   setControlName(maxControlNum, name);
   maxControlNum = maxControlNum + 1;
   return ret;

end


-- TODO: Move these to another file.
gameScreenWidth = 1024;
gameScreenHeight = 768;


include("autogen_spritedefs.lua");
include("spritefuncs.lua");
include("actor.lua");
include("player.lua");
include("light.lua");
include("projectile.lua");
include("explosion.lua");
include("camera.lua");
include("npc.lua");
include("pathnode.lua");

include("ui.lua");

loadTiles("test.xml");
loadEntities("test.xml");


camera = Camera:create();
player = Player:create();
camera:setLinkTarget(player:getName());





function worldUpdate()

   updateLetterBox();

end

