Skip to content

Commit

Permalink
Idea to remove main_[testing|release].lua
Browse files Browse the repository at this point in the history
Use command line option to specify level
Ex: love src valley
  • Loading branch information
Jordan Hoff committed Sep 4, 2012
1 parent cd7c8d9 commit 2d59ce3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ full_soundtrack.ogg
win32/*
win64/*
redditors.txt
src/main.lua
src/maps/*.lua
9 changes: 7 additions & 2 deletions src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ atl.Loader.useSpriteBatch = true

-- will hold the currently playing sources

function love.load()
function love.load(arg)
local state = arg[2] or 'home'

love.graphics.setDefaultImageFilter('nearest', 'nearest')
local width = love.graphics:getWidth()
local height = love.graphics:getHeight()
Expand All @@ -25,7 +27,10 @@ function love.load()
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0" ..
"123456789.,!?-+/:;%&`'*#=\""), 35)

Gamestate.switch(require('loader'))
local loader = require 'loader'
loader:target(state)

Gamestate.switch(loader)
end

function love.update(dt)
Expand Down
71 changes: 0 additions & 71 deletions src/main_release.lua

This file was deleted.

10 changes: 0 additions & 10 deletions src/main_testing.lua

This file was deleted.

0 comments on commit 2d59ce3

Please sign in to comment.