diff --git a/src/audio/music/anniessong.ogg b/src/audio/music/anniessong.ogg deleted file mode 100644 index 7256e3d0d..000000000 Binary files a/src/audio/music/anniessong.ogg and /dev/null differ diff --git a/src/audio/music/atleastunderground.ogg b/src/audio/music/atleastunderground.ogg deleted file mode 100644 index da7736e01..000000000 Binary files a/src/audio/music/atleastunderground.ogg and /dev/null differ diff --git a/src/audio/music/bowser.ogg b/src/audio/music/bowser.ogg deleted file mode 100644 index 107e6874c..000000000 Binary files a/src/audio/music/bowser.ogg and /dev/null differ diff --git a/src/audio/music/contract.ogg b/src/audio/music/contract.ogg deleted file mode 100644 index 95f7f6ea6..000000000 Binary files a/src/audio/music/contract.ogg and /dev/null differ diff --git a/src/audio/music/corneliusbattle.ogg b/src/audio/music/corneliusbattle.ogg deleted file mode 100644 index cfe4be8fc..000000000 Binary files a/src/audio/music/corneliusbattle.ogg and /dev/null differ diff --git a/src/audio/music/dancingqueenfull.ogg b/src/audio/music/dancingqueenfull.ogg deleted file mode 100644 index 8cc84ef5c..000000000 Binary files a/src/audio/music/dancingqueenfull.ogg and /dev/null differ diff --git a/src/audio/music/daylight.ogg b/src/audio/music/daylight.ogg deleted file mode 100644 index 2c47c4342..000000000 Binary files a/src/audio/music/daylight.ogg and /dev/null differ diff --git a/src/audio/music/finallybefine.ogg b/src/audio/music/finallybefine.ogg deleted file mode 100644 index 02b55fa94..000000000 Binary files a/src/audio/music/finallybefine.ogg and /dev/null differ diff --git a/src/audio/music/finallyboss.ogg b/src/audio/music/finallyboss.ogg deleted file mode 100644 index 268cfa94d..000000000 Binary files a/src/audio/music/finallyboss.ogg and /dev/null differ diff --git a/src/audio/music/forfeiting.ogg b/src/audio/music/forfeiting.ogg deleted file mode 100644 index 8c8f54cee..000000000 Binary files a/src/audio/music/forfeiting.ogg and /dev/null differ diff --git a/src/audio/music/gilbertstrikesback.ogg b/src/audio/music/gilbertstrikesback.ogg deleted file mode 100644 index 941f567a6..000000000 Binary files a/src/audio/music/gilbertstrikesback.ogg and /dev/null differ diff --git a/src/audio/music/gravity.ogg b/src/audio/music/gravity.ogg deleted file mode 100644 index 9b899d78e..000000000 Binary files a/src/audio/music/gravity.ogg and /dev/null differ diff --git a/src/audio/music/kissfromjesus.ogg b/src/audio/music/kissfromjesus.ogg deleted file mode 100644 index e52936edc..000000000 Binary files a/src/audio/music/kissfromjesus.ogg and /dev/null differ diff --git a/src/audio/music/leastitwashere.ogg b/src/audio/music/leastitwashere.ogg deleted file mode 100644 index 522b7d3fa..000000000 Binary files a/src/audio/music/leastitwashere.ogg and /dev/null differ diff --git a/src/audio/music/lindberghlean.ogg b/src/audio/music/lindberghlean.ogg deleted file mode 100644 index b9f2a9444..000000000 Binary files a/src/audio/music/lindberghlean.ogg and /dev/null differ diff --git a/src/audio/music/medley.ogg b/src/audio/music/medley.ogg deleted file mode 100644 index ea007c1f8..000000000 Binary files a/src/audio/music/medley.ogg and /dev/null differ diff --git a/src/audio/music/merryhappy.ogg b/src/audio/music/merryhappy.ogg deleted file mode 100644 index 33d91f9f0..000000000 Binary files a/src/audio/music/merryhappy.ogg and /dev/null differ diff --git a/src/audio/music/modernwarfare.ogg b/src/audio/music/modernwarfare.ogg deleted file mode 100644 index f64a2bbaa..000000000 Binary files a/src/audio/music/modernwarfare.ogg and /dev/null differ diff --git a/src/audio/music/nightmare.ogg b/src/audio/music/nightmare.ogg deleted file mode 100644 index 7e723a044..000000000 Binary files a/src/audio/music/nightmare.ogg and /dev/null differ diff --git a/src/audio/music/ominous.ogg b/src/audio/music/ominous.ogg deleted file mode 100644 index 638d6895b..000000000 Binary files a/src/audio/music/ominous.ogg and /dev/null differ diff --git a/src/audio/music/ridbritta.ogg b/src/audio/music/ridbritta.ogg deleted file mode 100644 index 1babbb2bf..000000000 Binary files a/src/audio/music/ridbritta.ogg and /dev/null differ diff --git a/src/audio/music/roxanne.ogg b/src/audio/music/roxanne.ogg deleted file mode 100644 index 10e693636..000000000 Binary files a/src/audio/music/roxanne.ogg and /dev/null differ diff --git a/src/audio/music/runningthroughrain.ogg b/src/audio/music/runningthroughrain.ogg deleted file mode 100644 index 5b630e189..000000000 Binary files a/src/audio/music/runningthroughrain.ogg and /dev/null differ diff --git a/src/audio/music/studyroom.ogg b/src/audio/music/studyroom.ogg deleted file mode 100644 index 6013910e7..000000000 Binary files a/src/audio/music/studyroom.ogg and /dev/null differ diff --git a/src/audio/music/takethethrone.ogg b/src/audio/music/takethethrone.ogg deleted file mode 100644 index 1d324a042..000000000 Binary files a/src/audio/music/takethethrone.ogg and /dev/null differ diff --git a/src/audio/music/understandxmas.ogg b/src/audio/music/understandxmas.ogg deleted file mode 100644 index 3f67c1a3f..000000000 Binary files a/src/audio/music/understandxmas.ogg and /dev/null differ diff --git a/src/audio/music/wayitgoes.ogg b/src/audio/music/wayitgoes.ogg deleted file mode 100644 index 31198cc0a..000000000 Binary files a/src/audio/music/wayitgoes.ogg and /dev/null differ diff --git a/src/audio/music/whereibelong.ogg b/src/audio/music/whereibelong.ogg deleted file mode 100644 index 05029d204..000000000 Binary files a/src/audio/music/whereibelong.ogg and /dev/null differ diff --git a/src/audio/music/wingerspeech.ogg b/src/audio/music/wingerspeech.ogg deleted file mode 100644 index 487f31803..000000000 Binary files a/src/audio/music/wingerspeech.ogg and /dev/null differ diff --git a/src/audio/music/xmasrap.ogg b/src/audio/music/xmasrap.ogg deleted file mode 100644 index 9a6acb2ac..000000000 Binary files a/src/audio/music/xmasrap.ogg and /dev/null differ diff --git a/src/audio/music/you-just-lost.ogg b/src/audio/music/you-just-lost.ogg deleted file mode 100644 index 81475e7c9..000000000 Binary files a/src/audio/music/you-just-lost.ogg and /dev/null differ diff --git a/src/blackjackgame.lua b/src/blackjackgame.lua index fdc110b61..a3779dee3 100644 --- a/src/blackjackgame.lua +++ b/src/blackjackgame.lua @@ -203,7 +203,7 @@ function state:gameMenu() -- set the game menu after card additions/changes actualBets = self.currentBet end - if actualBets < self.player.money then + if actualBets < self.player.money/2 then self.options[ 3 ].active = true -- double else self.options[ 3 ].active = false -- double @@ -481,7 +481,7 @@ function state:split() self.playerHand[newHandNum].has_ace = true -- no hits on splitting aces self:dealCard('player') - self.activeHand = self.activevHand + 1 + self.activeHand = self.activeHand + 1 self:dealCard('player') self.card_complete_callback = function() self.card_complete_callback = nil @@ -567,16 +567,14 @@ function state:stand() end end end - end - - -- player must have at least 1 coin to continue playing - if self.player.money < 1 then - self:gameOver() - end - - -- decrease current bet if player has less money than previous bet - if self.player.money < self.currentBet then - self.currentBet = self.player.money + -- player must have at least 1 coin to continue playing + if self.player.money < 1 then + self:gameOver() + end + -- decrease current bet if player has less money than previous bet + if self.player.money < self.currentBet then + self.currentBet = self.player.money + end end self:dealMenu() diff --git a/src/character.lua b/src/character.lua index 2be66a87f..2e612c629 100644 --- a/src/character.lua +++ b/src/character.lua @@ -21,16 +21,6 @@ function Character:reset() self.direction = 'right' end --- FIXME: Needed for the taco meat item --- If a character doesn't have this costume, no effect takes place -function Character:setCostume(costume) - if costume == self.costume then - return - end - - -- Stuff for magic -end - function Character:sheet() return self:getSheet(self.costume) end diff --git a/src/cheat.lua b/src/cheat.lua index 4dfe1f863..d05611773 100644 --- a/src/cheat.lua +++ b/src/cheat.lua @@ -1,6 +1,7 @@ local overworld = require('overworld') local Player = require('player') local ItemClass = require('items/item') +local app = require 'app' local Cheat = {} @@ -37,6 +38,10 @@ local function setCheat(cheatName, turnOn) local activations = { give_money = function() player.money = player.money + 500 end, max_health = function() player.health = player.max_health end, + give_gcc_key = function() + local gamesave = app.gamesaves:active() + gamesave:set('cuttriggers.throne', true) + end, unlock_levels = function() player.visitedLevels = {} for _,mapInfo in pairs(overworld.zones) do @@ -72,7 +77,8 @@ local function setCheat(cheatName, turnOn) end end end - elseif activations[cheatName] then + end + if activations[cheatName] then activations[cheatName]() end end diff --git a/src/images/menu/banner.png b/src/images/menu/banner.png deleted file mode 100644 index 8c43bc00d..000000000 Binary files a/src/images/menu/banner.png and /dev/null differ diff --git a/src/images/menu/walk2.png b/src/images/menu/walk2.png deleted file mode 100644 index 3ff925575..000000000 Binary files a/src/images/menu/walk2.png and /dev/null differ diff --git a/src/images/menu/walk3.png b/src/images/menu/walk3.png deleted file mode 100644 index ba733b460..000000000 Binary files a/src/images/menu/walk3.png and /dev/null differ diff --git a/src/images/menu/walkTroy.png b/src/images/menu/walkTroy.png deleted file mode 100644 index 0921953f0..000000000 Binary files a/src/images/menu/walkTroy.png and /dev/null differ diff --git a/src/inventory.lua b/src/inventory.lua index 2e87e354d..37dfb0976 100644 --- a/src/inventory.lua +++ b/src/inventory.lua @@ -517,6 +517,14 @@ function Inventory:removeItem( slotIndex, pageName ) self.pages[pageName][slotIndex] = nil end +--- +-- Removes all inventory items +-- @return nil +function Inventory:removeAllItems() + for page in pairs(self.pages) do + self.pages[page] = {} + end +end --- -- Removes a certain amount of items from the player -- @parameter amount amount to remove diff --git a/src/items/consumables/tacomeat.lua b/src/items/consumables/tacomeat.lua index 2764896b2..5480da127 100644 --- a/src/items/consumables/tacomeat.lua +++ b/src/items/consumables/tacomeat.lua @@ -14,7 +14,7 @@ return{ player.punchDamage = punchDamage player.jumpDamage = jumpDamage player.slideDamage = slideDamage - player.character:setCostume(costume) + player.character.costume = costume end) for i=1,2 do Timer.add(2*i-1, function () -- Damage over time diff --git a/src/level.lua b/src/level.lua index 2a034b5c7..cf9ff6c99 100644 --- a/src/level.lua +++ b/src/level.lua @@ -399,6 +399,11 @@ function Level:update(dt) self.player.character:reset() local gamesave = app.gamesaves:active() local point = gamesave:get('savepoint', {level='studyroom', name='bookshelf'}) + if app.config.hardcore then + point = {level = 'studyroom', name = 'bookshelf'} + self.player.money = 0 + self.player.inventory:removeAllItems() + end Gamestate.switch(point.level, point.name) end) end diff --git a/src/main.lua b/src/main.lua index 58b68cf97..a4b85de65 100644 --- a/src/main.lua +++ b/src/main.lua @@ -161,7 +161,7 @@ function love.load(arg) table.insert( cheats, string.sub( args["cheat"], from ) ) else if args["cheat"] == "all" then - cheats = {'jump_high','super_speed','god','slide_attack','give_money','max_health','give_gcc_key','give_weapons','give_materials','give_potions','give_scrolls','give_misc','unlock_levels'} + cheats = {'jump_high','super_speed','god','slide_attack','give_money','max_health','give_gcc_key','give_weapons', 'give_materials','give_potions','give_scrolls','give_taco_meat','unlock_levels','give_master_key'} else cheats = {args["cheat"]} end diff --git a/src/nodes/enemy.lua b/src/nodes/enemy.lua index 6626b4dd5..2b3c4d09f 100644 --- a/src/nodes/enemy.lua +++ b/src/nodes/enemy.lua @@ -184,6 +184,7 @@ function Enemy:hurt( damage, special_damage, knockback ) self.flash = true self.flashing = Timer.addPeriodic(.12, function() self.flash = not self.flash end) end + if self.reviveTimer then Timer.cancel( self.reviveTimer ) end self.reviveTimer = Timer.add( self.revivedelay, function() self.state = 'default' self:cancel_flash() diff --git a/src/npcs/hilda.lua b/src/npcs/hilda.lua index cbd555db3..2acf30f6e 100644 --- a/src/npcs/hilda.lua +++ b/src/npcs/hilda.lua @@ -113,10 +113,19 @@ return { ['madam, i am on a quest']={ "I can help with that", "I have information on many topics...", + }, + ['i will wear your skin']={ + "My skin is my own.", + }, + ['stand aside']={ + "I'm sorry to see you go.", }, ['throne of hawkthorne']={ "The throne is in Castle Hawkthorne, north of here.", "You unlock the castle with the white crystal of discipline, which you must free from the black caverns.", + }, + ['for your hand']={ + "I cannot marry someone whom I do not truly love and trust.", }, ['frog extinction']={ "You know what? My prank is going to cause a sea of laughter,", @@ -448,7 +457,7 @@ return { end, ['stay']=function(npc, player) npc.walking = false - npc.stare = true + npc.stare = false end, ['go home']=function(npc, player) npc.walking = true diff --git a/src/npcs/sophieb.lua b/src/npcs/sophieb.lua index 6a796bef3..63683508a 100644 --- a/src/npcs/sophieb.lua +++ b/src/npcs/sophieb.lua @@ -37,66 +37,36 @@ return { talk_items = { { ['text']='i am done with you'}, { ['text']='Can you play me...', ['option']={ - { ['text']='You Just Lost A Game' }, { ['text']='Where I Belong' }, { ['text']='What Christmas Is For' }, { ['text']='Viva Tacotown!' }, { ['text']='Village Forest' }, { ['text']='Valley of Laziness' }, - { ['text']='To Understand Christmas' }, - { ['text']='The Way It Goes' }, - { ['text']='Take The Throne' }, - { ['text']='Study Room F' }, { ['text']='Starting The Game' }, { ['text']='Somewhere Out There' }, { ['text']='Seabluff' }, - { ['text']='Running Through Rain' }, - { ['text']='Roxanne' }, { ['text']='Pocketful of Hawthornes' }, { ['text']='Overworld' }, - { ['text']='Ol Fashion Nightmare' }, { ['text']='New Abedtown' }, - { ['text']='Modern Warfare' }, - { ['text']='Merry Happy!' }, { ['text']='M.A.S.H. Theme' }, { ['text']='Mamma Mia' }, { ['text']='Love So Alike' }, - { ['text']='Lindbergh Lean' }, { ['text']='Lets Play Poker' }, { ['text']='Lazy Sandpits' }, - { ['text']='Kiss From A Remix' }, { ['text']='Kiss From A Rose' }, - { ['text']='Is He Being Ominous?' }, { ['text']='Hall O Hippies' }, { ['text']='Greendale Rave' }, { ['text']='Greendale Hallways' }, - { ['text']='Greendale Exterior' }, - { ['text']='Gravity' }, - { ['text']='Gilbert Strikes Back' }, - { ['text']='Getting Rid of Bowser' }, - { ['text']='Getting Rid of Britta' }, - { ['text']='Forfeiting' }, + { ['text']='Greendale Exterior' }, { ['text']='Forest' }, - { ['text']='Finally Be Fine' }, { ['text']='Farewell Abed' }, { ['text']='Enter Cornelius' }, - { ['text']='Die Racism!' }, - { ['text']='Daylight' }, { ['text']='Daybreak' }, - { ['text']='Dancing Queen' }, - { ['text']='Community Medley' }, { ['text']='Comfy At A Cauldron' }, - { ['text']='Christmas Infiltration' }, { ['text']='Castle Interior' }, { ['text']='Castle Exterior' }, { ['text']='Blacksmiths House' }, { ['text']='Black Caverns' }, - { ['text']='A Winger Speech' }, - { ['text']='At Least Its Underground' }, - { ['text']='At Least Its Finally Boss' }, - { ['text']='At Least It Was Here' }, - { ['text']='A Simple Question' }, - { ['text']='Annies Song' }, { ['text']='Alas Poor Britta-Bot' }, { ['text']='A Girl Milking A Cow' }, { ['text']='Abeds Christmas Medley' }, @@ -123,9 +93,6 @@ return { ["Abeds Castle"]=function(npc, player) playSong(npc, player.currentLevel, 19.7, "abeds-castle") end, - ["A Simple Question"]=function(npc, player) - playSong(npc, player.currentLevel, 22.3, "contract") - end, ["Abeds Christmas Medley"]=function(npc, player) playSong(npc, player.currentLevel, 322, "winter") end, @@ -147,15 +114,9 @@ return { ["Castle Interior"]=function(npc, player) playSong(npc, player.currentLevel, 50.3, "castle") end, - ["Die Racism!"]=function(npc, player) - playSong(npc, player.currentLevel, 89.8, "corneliusbattle") - end, ["Enter Cornelius"]=function(npc, player) playSong(npc, player.currentLevel, 47.5, "cornelius-appears") end, - ["Forfeiting"]=function(npc, player) - playSong(npc, player.currentLevel, 31, "forfeiting") - end, ["Forest"]=function(npc, player) playSong(npc, player.currentLevel, 22.2, "forest") end, @@ -165,84 +126,27 @@ return { ["Village Forest"]=function(npc, player) playSong(npc, player.currentLevel, 33.2, "forest-2") end, - ["Modern Warfare"]=function(npc, player) - playSong(npc, player.currentLevel, 240.5, "modernwarfare") - end, - ["A Winger Speech"]=function(npc, player) - playSong(npc, player.currentLevel, 73.2, "wingerspeech") - end, ["What Christmas Is For"]=function(npc, player) playSong(npc, player.currentLevel, 58.7, "winter2") end, - ["The Way It Goes"]=function(npc, player) - playSong(npc, player.currentLevel, 228, "wayitgoes") + ["Mamma Mia"]=function(npc, player) + playSong(npc, player.currentLevel, 204, "mamma-mia") + end, + ["M.A.S.H. Theme"]=function(npc, player) + playSong(npc, player.currentLevel, 88, "mash-theme") end, ["New Abedtown"]=function(npc, player) playSong(npc, player.currentLevel, 59.1, "abeds-town") end, - ["At Least It Was Here"]=function(npc, player) - playSong(npc, player.currentLevel, 151.3, "leastitwashere") - end, - ["At Least Its Finally Boss"]=function(npc, player) - playSong(npc, player.currentLevel, 274.5, "finallyboss") - end, - ["At Least Its Underground"]=function(npc, player) - playSong(npc, player.currentLevel, 23.4, "atleastunderground") - end, - ["Merry Happy!"]=function(npc, player) - playSong(npc, player.currentLevel, 109.7, "merryhappy") - end, - ["To Understand Christmas"]=function(npc, player) - playSong(npc, player.currentLevel, 74.4, "understandxmas") - end, - ["Take The Throne"]=function(npc, player) - playSong(npc, player.currentLevel, 8.35, "takethethrone") - end, - ["Running Through Rain"]=function(npc, player) - playSong(npc, player.currentLevel, 96.1, "runningthroughrain") - end, - ["Roxanne"]=function(npc, player) - playSong(npc, player.currentLevel, 197, "roxanne") - end, - ["Lindbergh Lean"]=function(npc, player) - playSong(npc, player.currentLevel, 147.1, "lindberghlean") - end, ["Lets Play Poker"]=function(npc, player) playSong(npc, player.currentLevel, 36.5, "tavern") end, - ["Daylight"]=function(npc, player) - playSong(npc, player.currentLevel, 74, "daylight") - end, - ["Ol Fashion Nightmare"]=function(npc, player) - playSong(npc, player.currentLevel, 199, "nightmare") - end, ["Overworld"]=function(npc, player) playSong(npc, player.currentLevel, 20, "overworld") end, - ["Christmas Infiltration"]=function(npc, player) - playSong(npc, player.currentLevel, 56, "xmasrap") - end, ["Love So Alike"]=function(npc, player) playSong(npc, player.currentLevel, 90, "lovesoalike") end, - ["Annies Song"]=function(npc, player) - playSong(npc, player.currentLevel, 101, "anniessong") - end, - ["Finally Be Fine"]=function(npc, player) - playSong(npc, player.currentLevel, 53, "finallybefine") - end, - ["Getting Rid of Britta"]=function(npc, player) - playSong(npc, player.currentLevel, 131.5, "ridbritta") - end, - ["Getting Rid of Bowser"]=function(npc, player) - playSong(npc, player.currentLevel, 76, "bowser") - end, - ["Gravity"]=function(npc, player) - playSong(npc, player.currentLevel, 117.3, "gravity") - end, - ["M.A.S.H. Theme"]=function(npc, player) - playSong(npc, player.currentLevel, 88, "mash-theme") - end, ["Greendale Exterior"]=function(npc, player) playSong(npc, player.currentLevel, 40.7, "greendale") end, @@ -252,36 +156,12 @@ return { ["Greendale Rave"]=function(npc, player) playSong(npc, player.currentLevel, 114, "rave") end, - ["Gilbert Strikes Back"]=function(npc, player) - playSong(npc, player.currentLevel, 18.7, "gilbertstrikesback") - end, ["Lazy Sandpits"]=function(npc, player) playSong(npc, player.currentLevel, 136, "sandpits") end, - ["Mamma Mia"]=function(npc, player) - playSong(npc, player.currentLevel, 204, "mamma-mia") - end, ["Kiss From A Rose"]=function(npc, player) playSong(npc, player.currentLevel, 86, "credits") end, - ["Kiss From A Remix"]=function(npc, player) - playSong(npc, player.currentLevel, 101, "kissfromjesus") - end, - ["Is He Being Ominous?"]=function(npc, player) - playSong(npc, player.currentLevel, 60.7, "ominous") - end, - ["Pocketful of Hawthornes"]=function(npc, player) - playSong(npc, player.currentLevel, 70, "pocketful") - end, - ["Dancing Queen"]=function(npc, player) - playSong(npc, player.currentLevel, 237, "dancingqueenfull") - end, - ["Somewhere Out There"]=function(npc, player) - playSong(npc, player.currentLevel, 132, "somewhereoutthere") - end, - ["Study Room F"]=function(npc, player) - playSong(npc, player.currentLevel, 53.5, "studyroom") - end, ["Seabluff"]=function(npc, player) playSong(npc, player.currentLevel, 30.65, "seabluff") end, @@ -294,12 +174,6 @@ return { ["Alas Poor Britta-Bot"]=function(npc, player) playSong(npc, player.currentLevel, 20, "britta-bot") end, - ["Community Medley"]=function(npc, player) - playSong(npc, player.currentLevel, 246.1, "medley") - end, - ["You Just Lost A Game"]=function(npc, player) - playSong(npc, player.currentLevel, 7, "you-just-lost") - end, ["Viva Tacotown!"]=function(npc, player) playSong(npc, player.currentLevel, 32.6, "tacotown") end, @@ -309,5 +183,11 @@ return { ["Where I Belong"]=function(npc, player) playSong(npc, player.currentLevel, 90, "ending") end, + ["Pocketful of Hawthornes"]=function(npc, player) + playSong(npc, player.currentLevel, 70, "pocketful") + end, + ["Somewhere Out There"]=function(npc, player) + playSong(npc, player.currentLevel, 133, "somewhereoutthere") + end, }, } \ No newline at end of file diff --git a/src/options.lua b/src/options.lua index 76fb9b57f..f6e42d8e7 100644 --- a/src/options.lua +++ b/src/options.lua @@ -7,9 +7,49 @@ local camera = require 'camera' local sound = require 'vendor/TEsound' local fonts = require 'fonts' local state = Gamestate.new() +local Player = require 'player' local window = require 'window' local controls = require('inputcontroller').get() local VerticalParticles = require "verticalparticles" +local Menu = require 'menu' + +local menu = Menu.new() + +function state:onSelectCallback() + return function(option) + local options = { + ['FULLSCREEN'] = 'updateFullscreen', + ['SHOW FPS'] = 'updateFpsSetting', + ['SEND PLAY DATA'] = 'updateSendDataSetting', + ['HARDCORE MODE'] = 'updateHardcore', + ['SFX VOLUME'] = true, + ['MUSIC VOLUME'] = true, + } + local menus = { + ['SAVE GAME'] = 'save_game', + ['GAME'] = 'game_menu', + ['RESET SETTINGS & EXIT'] = 'reset_settings', + ['RESET SETTINGS/SAVES'] = 'reset_menu', + ['CANCEL RESET'] = 'game_menu', + ['AUDIO'] = 'audio_menu', + ['VIDEO'] = 'video_menu', + ['BACK TO OPTIONS'] = 'options_menu', + ['BACK TO MENU'] = 'main_menu', + } + if menus[option] then + self[menus[option]](self) + elseif options[option] then + if self.option_map[option].bool ~= nil then + self.option_map[option].bool = not self.option_map[option].bool + self[options[option]](self) + end + else + error("Error: Complete the options menu onSelect function! Missing key: " .. option) + end + end +end + +menu:onSelect(state:onSelectCallback()) local db = store('options-2') @@ -19,7 +59,32 @@ local OPTIONS = { { name = 'SFX VOLUME', range = { 0, 10, 10 } }, { name = 'SHOW FPS', bool = false }, { name = 'SEND PLAY DATA', bool = false }, - { name = 'RESET SETTINGS AND EXIT', action = 'reset_settings'}, + { name = 'HARDCORE MODE', bool = false }, +} + +local MENU = { + {name = 'GAME', page = { + {name = 'SAVE GAME'}, + {name = 'HARDCORE MODE'}, + {name = 'SEND PLAY DATA'}, + {name = 'RESET SETTINGS/SAVES', page = { + {name = 'CANCEL RESET'}, + {name = 'RESET SETTINGS & EXIT'}, + }}, + {name = 'BACK TO OPTIONS'}, + }}, + {name = 'AUDIO', page = { + {name = 'MUSIC VOLUME'}, + {name = 'SFX VOLUME'}, + {name = 'BACK TO OPTIONS'}, + + }}, + {name = 'VIDEO', page = { + {name = 'FULLSCREEN'}, + {name = 'SHOW FPS'}, + {name = 'BACK TO OPTIONS'}, + }}, + {name = 'BACK TO MENU'}, } function state:init() @@ -27,13 +92,17 @@ function state:init() self.background = love.graphics.newImage("images/menu/pause.png") self.arrow = love.graphics.newImage("images/menu/medium_arrow.png") + self.bigarrow = love.graphics.newImage("images/menu/arrow.png") self.checkbox_checked = love.graphics.newImage("images/menu/checkbox_checked.png") self.checkbox_unchecked = love.graphics.newImage("images/menu/checkbox_unchecked.png") self.range = love.graphics.newImage("images/menu/range.png") self.range_arrow = love.graphics.newImage("images/menu/small_arrow_up.png") + self.option_map = {} self.options = utils.deepcopy(OPTIONS) + self.pages = utils.deepcopy(MENU) + self:options_menu() -- Load default options first for i, user in pairs(db:get('options', {})) do @@ -50,28 +119,90 @@ function state:init() end end - self.selection = 0 - self:updateFullscreen() self:updateSettings() self:updateFpsSetting() self:updateSendDataSetting() + self:updateHardcore() +end + +function state.switchMenu(menu) + local newMenu = {} + for i,page in pairs(menu) do + for k,v in pairs(page) do + if k == 'name' then + table.insert(newMenu, v) + end + end + end + return newMenu +end + +function state:options_menu() + menu.options = self.switchMenu(self.pages) + self.page = 'optionspage' + menu.selection = 0 +end + +function state:game_menu() + menu.options = self.switchMenu(self.pages[1].page) + self.page = 'gamepage' + menu.selection = 0 +end + +function state:audio_menu() + menu.options = self.switchMenu(self.pages[2].page) + self.page = 'audiopage' + menu.selection = 0 +end + +function state:video_menu() + menu.options = self.switchMenu(self.pages[3].page) + self.page = 'videopage' + menu.selection = 0 +end + +function state:reset_menu() + menu.options = self.switchMenu(self.pages[1].page[4].page) + self.page = 'resetpage' + menu.selection = 0 +end + +function state:main_menu() + self:options_menu() + Gamestate.switch('pause') +end + +function state:save_game() + local gamesave = app.gamesaves:active() + local player = Player.factory() + gamesave:set('savepoint', {level=self.target.name}) + player:saveData(gamesave) + gamesave:flush() +end + +function state:updateHardcore() + app.config.hardcore = self.option_map['HARDCORE MODE'].bool end function state:update(dt) VerticalParticles.update(dt) end -function state:enter(previous) +function state:enter(previous, target) fonts.set( 'big' ) sound.playMusic( "daybreak" ) camera:setPosition(0, 0) self.previous = previous + self.target = target end function state:leave() - fonts.reset() + self:updateSettings() + db:set('options', self.options) + db:flush() + fonts.reset() end function state:updateFullscreen() @@ -102,7 +233,7 @@ function state:updateSettings() sound.volume('sfx', self.option_map['SFX VOLUME'].range[3] / 10) end -function reset_settings() +function state.reset_settings() --set the quit callback function to wipe out all save data function love.quit() for i,file in pairs(love.filesystem.getDirectoryItems('')) do @@ -118,58 +249,33 @@ function state:keypressed( button ) -- Flag to track if the options need to be updated -- Used to minimize the number of db:flush() calls to reduce UI stuttering local updateOptions = false - local option = self.options[self.selection + 1] + + menu:keypressed(button) if button == 'START' then - Gamestate.switch(self.previous) + self:main_menu() return - elseif button == 'ATTACK' or button == 'JUMP' then - if option.bool ~= nil then - option.bool = not option.bool - if option.name == 'FULLSCREEN' then - sound.playSfx( 'confirm' ) - self:updateFullscreen() - updateOptions = true - elseif option.name == 'SHOW FPS' then - sound.playSfx( 'confirm' ) - self:updateFpsSetting() - updateOptions = true - elseif option.name == 'SEND PLAY DATA' then - sound.playSfx( 'confirm' ) - self:updateSendDataSetting() - updateOptions = true - end - elseif option.action then - _G[option.action]() - end - elseif button == 'LEFT' then - if option.range ~= nil then - if option.range[3] > option.range[1] then - sound.playSfx( 'confirm' ) - option.range[3] = option.range[3] - 1 - updateOptions = true - end - end - elseif button == 'RIGHT' then - if option.range ~= nil then - if option.range[3] < option.range[2] then - sound.playSfx( 'confirm' ) - option.range[3] = option.range[3] + 1 - updateOptions = true - end - end - elseif button == 'UP' then - sound.playSfx('click') - self.selection = (self.selection - 1) % #self.options - while self.options[self.selection + 1].name == nil do - self.selection = (self.selection - 1) % #self.options - end - elseif button == 'DOWN' then - sound.playSfx('click') - self.selection = (self.selection + 1) % #self.options - while self.options[self.selection + 1].name == nil do - self.selection = (self.selection + 1) % #self.options - end + end + + if self.page == 'audiopage' then + local opt = self.options[menu.selection + 2] + if button == 'LEFT' then + if opt.range ~= nil then + if opt.range[3] > opt.range[1] then + sound.playSfx( 'confirm' ) + opt.range[3] = opt.range[3] - 1 + updateOptions = true + end + end + elseif button == 'RIGHT' then + if opt.range ~= nil then + if opt.range[3] < opt.range[2] then + sound.playSfx( 'confirm' ) + opt.range[3] = opt.range[3] + 1 + updateOptions = true + end + end + end end -- Only flush the options db when necessary @@ -195,26 +301,35 @@ function state:draw() camera:getHeight() / 2 - self.background:getHeight() / 2) love.graphics.setColor( 0, 0, 0, 255 ) + + local xoffset = self.page == 'optionspage' and 20 or 0 - for n, opt in pairs(self.options) do + for n, opt in pairs(menu.options) do if tonumber( n ) ~= nil then - if opt.name then love.graphics.print( app.i18n(opt.name), 150, y) end - - if opt.bool ~= nil then - if opt.bool then - love.graphics.draw( self.checkbox_checked, 366, y ) - else - love.graphics.draw( self.checkbox_unchecked, 366, y ) - end - elseif opt.range ~= nil then - love.graphics.draw( self.range, 336, y + 2 ) - love.graphics.draw( self.range_arrow, 338 + ( ( ( self.range:getWidth() - 1 ) / ( opt.range[2] - opt.range[1] ) ) * ( opt.range[3] - 1 ) ), y + 9 ) + love.graphics.print( opt, 150 + xoffset, y) + if self.option_map[opt] then + local option = self.option_map[opt] + if option.bool ~= nil then + if option.bool then + love.graphics.draw( self.checkbox_checked, 366, y ) + else + love.graphics.draw( self.checkbox_unchecked, 366, y ) + end + elseif option.range ~= nil then + love.graphics.draw( self.range, 336, y + 2 ) + love.graphics.draw( self.range_arrow, 338 + ( ( ( self.range:getWidth() - 1 ) / ( option.range[2] - option.range[1] ) ) * ( option.range[3] - 1 ) ), y + 9 ) + end end y = y + 26 end end - love.graphics.draw( self.arrow, 138, 124 + ( 26 * ( self.selection - 1 ) ) ) + if self.page ~= 'optionspage' then + love.graphics.draw( self.arrow, 138, 124 + ( 26 * ( menu.selection - 1 ) ) ) + else + love.graphics.setColor(255,255,255,255) + love.graphics.draw( self.bigarrow, 138, 116 + ( 26 * ( menu.selection - 1) ) ) + end love.graphics.setColor( 255, 255, 255, 255 ) end diff --git a/src/pause.lua b/src/pause.lua index c0e3a877d..4e1717a6c 100644 --- a/src/pause.lua +++ b/src/pause.lua @@ -75,7 +75,7 @@ function state:keypressed( button ) if self.option == 0 then Gamestate.switch('instructions') elseif self.option == 1 then - Gamestate.switch('options') + Gamestate.switch('options', self.previous) elseif self.option == 2 then Gamestate.switch('overworld') elseif self.option == 3 then diff --git a/src/start.lua b/src/start.lua index de6d82b0e..d28906a7a 100644 --- a/src/start.lua +++ b/src/start.lua @@ -21,7 +21,6 @@ function state:init() { name = 'SLOT 1', slot = 1 }, { name = 'SLOT 2', slot = 2 }, { name = 'SLOT 3', slot = 3 }, - { name = 'RESET + EXIT', action = 'reset_saves' } } for i,o in pairs( self.options ) do if o.name then @@ -96,21 +95,6 @@ function state.get_slot_level(slotNumber) return "" end --- Removes save data and exits --- TODO this shouldn't be necessary --- If we're going to do this, we really should prompt the user -function state:reset_saves() - --set the quit callback function to wipe out all save data - function love.quit() - for i,file in pairs(love.filesystem.getDirectoryItems('')) do - if file:find('gamesaves.*%.json$') then - love.filesystem.remove(file) - end - end - end - love.event.push( "quit" ) -end - function state:keypressed( button ) local option = self.options[ self.selection + 1 ] diff --git a/src/test/test_inventory.lua b/src/test/test_inventory.lua index 5873d3689..1698d7a87 100644 --- a/src/test/test_inventory.lua +++ b/src/test/test_inventory.lua @@ -12,3 +12,12 @@ function test_add_scroll_to_inventory_and_select() inv:selectCurrentScrollSlot() assert_equal(15 ,inv.selectedWeaponIndex) end + + +-- it should remove all items +function test_remove_all_items() + inv:addItem(scroll) + assert_equal(1, #inv.pages.scrolls) + inv:removeAllItems() + assert_equal(0, #inv.pages.scrolls) +end \ No newline at end of file diff --git a/src/vendor/timer.lua b/src/vendor/timer.lua index 9c82980d5..7cb8ff6e5 100644 --- a/src/vendor/timer.lua +++ b/src/vendor/timer.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2010-2012 Matthias Richter +Copyright (c) 2010-2013 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,7 +19,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ATTACK OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]]-- @@ -27,78 +27,164 @@ THE SOFTWARE. local Timer = {} Timer.__index = Timer +local function _nothing_() end + local function new() - return setmetatable({functions = {}}, Timer) + return setmetatable({functions = {}, tween = Timer.tween}, Timer) end function Timer:update(dt) - local to_remove = {} - for func, delay in pairs(self.functions) do - delay = delay - dt - if delay <= 0 then - to_remove[#to_remove+1] = func - end - self.functions[func] = delay - end - for _,func in ipairs(to_remove) do - self.functions[func] = nil - func(func) - end + local to_remove = {} + for handle, delay in pairs(self.functions) do + delay = delay - dt + if delay <= 0 then + to_remove[#to_remove+1] = handle + end + self.functions[handle] = delay + handle.func(dt, delay) + end + for _,handle in ipairs(to_remove) do + self.functions[handle] = nil + handle.after(handle.after) + end +end + +function Timer:do_for(delay, func, after) + local handle = {func = func, after = after or _nothing_} + self.functions[handle] = delay + return handle end function Timer:add(delay, func) - assert(not self.functions[func], "Function already scheduled to run.") - self.functions[func] = delay - return func + return self:do_for(delay, _nothing_, func) end function Timer:addPeriodic(delay, func, count) - local count = count or math.huge -- exploit below: math.huge - 1 = math.huge - - return self:add(delay, function(f) - if func(func) == false then return end - count = count - 1 - if count > 0 then - self:add(delay, f) - end - end) + local count, handle = count or math.huge -- exploit below: math.huge - 1 = math.huge + + handle = self:add(delay, function(f) + if func(func) == false then return end + count = count - 1 + if count > 0 then + self.functions[handle] = delay + end + end) + return handle end -function Timer:cancel(func) - self.functions[func] = nil +function Timer:cancel(handle) + self.functions[handle] = nil end function Timer:clear() - self.functions = {} + self.functions = {} end -local function Interpolator(length, func) - local t = 0 - return function(dt, ...) - t = t + dt - return t <= length and func((t-dt)/length, ...) or nil - end -end - -local function Oscillator(length, func) - local t = 0 - return function(dt, ...) - t = (t + dt) % length - return func(t/length, ...) - end -end +Timer.tween = setmetatable({ + -- helper functions + out = function(f) -- 'rotates' a function + return function(s, ...) return 1 - f(1-s, ...) end + end, + chain = function(f1, f2) -- concatenates two functions + return function(s, ...) return (s < .5 and f1(2*s, ...) or 1 + f2(2*s-1, ...)) * .5 end + end, + + -- useful tweening functions + linear = function(s) return s end, + quad = function(s) return s*s end, + cubic = function(s) return s*s*s end, + quart = function(s) return s*s*s*s end, + quint = function(s) return s*s*s*s*s end, + sine = function(s) return 1-math.cos(s*math.pi/2) end, + expo = function(s) return 2^(10*(s-1)) end, + circ = function(s) return 1 - math.sqrt(1-s*s) end, + + back = function(s,bounciness) + bounciness = bounciness or 1.70158 + return s*s*((bounciness+1)*s - bounciness) + end, + + bounce = function(s) -- magic numbers ahead + local a,b = 7.5625, 1/2.75 + return math.min(a*s^2, a*(s-1.5*b)^2 + .75, a*(s-2.25*b)^2 + .9375, a*(s-2.625*b)^2 + .984375) + end, + + elastic = function(s, amp, period) + amp, period = amp and math.max(1, amp) or 1, period or .3 + return (-amp * math.sin(2*math.pi/period * (s-1) - math.asin(1/amp))) * 2^(10*(s-1)) + end, +}, { + +-- register new tween +__call = function(tween, self, len, subject, target, method, after, ...) + -- recursively collects fields that are defined in both subject and target into a flat list + local function tween_collect_payload(subject, target, out) + for k,v in pairs(target) do + local ref = subject[k] + assert(type(v) == type(ref), 'Type mismatch in field "'..k..'".') + if type(v) == 'table' then + tween_collect_payload(ref, v, out) + else + local ok, delta = pcall(function() return (v-ref)*1 end) + assert(ok, 'Field "'..k..'" does not support arithmetic operations') + out[#out+1] = {subject, k, delta} + end + end + return out + end + + method = tween[method or 'linear'] -- see __index + local payload, t, args = tween_collect_payload(subject, target, {}), 0, {...} + + local last_s = 0 + return self:do_for(len, function(dt) + t = t + dt + local s = method(math.min(1, t/len), unpack(args)) + local ds = s - last_s + last_s = s + for _, info in ipairs(payload) do + local ref, key, delta = unpack(info) + ref[key] = ref[key] + delta * ds + end + end, after) +end, + +-- fetches function and generated compositions for method `key` +__index = function(tweens, key) + if type(key) == 'function' then return key end + + assert(type(key) == 'string', 'Method must be function or string.') + if rawget(tweens, key) then return rawget(tweens, key) end + + local function construct(pattern, f) + local method = rawget(tweens, key:match(pattern)) + if method then return f(method) end + return nil + end + + local out, chain = rawget(tweens,'out'), rawget(tweens,'chain') + return construct('^in%-([^-]+)$', function(...) return ... end) + or construct('^out%-([^-]+)$', out) + or construct('^in%-out%-([^-]+)$', function(f) return chain(f, out(f)) end) + or construct('^out%-in%-([^-]+)$', function(f) return chain(out(f), f) end) + or error('Unknown interpolation method: ' .. key) +end}) -- default timer local default = new() -- the module return setmetatable({ - new = new, - update = function(...) return default:update(...) end, - add = function(...) return default:add(...) end, - addPeriodic = function(...) return default:addPeriodic(...) end, - cancel = function(...) return default:cancel(...) end, - clear = function(...) return default:clear(...) end, - Interpolator = Interpolator, - Oscillator = Oscillator + new = new, + update = function(...) return default:update(...) end, + do_for = function(...) return default:do_for(...) end, + add = function(...) return default:add(...) end, + addPeriodic = function(...) return default:addPeriodic(...) end, + cancel = function(...) return default:cancel(...) end, + clear = function(...) return default:clear(...) end, + tween = setmetatable({}, { + __index = Timer.tween, + __newindex = function(_,k,v) Timer.tween[k] = v end, + __call = function(t,...) return default:tween(...) end, + }) }, {__call = new}) diff --git a/src/welcome.lua b/src/welcome.lua index 0063d3b70..610cdfc15 100644 --- a/src/welcome.lua +++ b/src/welcome.lua @@ -1,12 +1,10 @@ local anim8 = require 'vendor/anim8' local app = require 'app' -local camera = require 'camera' local controls = require('inputcontroller').get() local fonts = require 'fonts' local Gamestate = require 'vendor/gamestate' local menu = require 'menu' local sound = require 'vendor/TEsound' -local tween = require 'vendor/tween' local window = require 'window' local state = Gamestate.new() @@ -24,11 +22,6 @@ function state:init() end end) - self:refresh() - self.camera_x = {y=camera.x} - self.camera_final = 1586 - self.runTime = 20 - tween(self.runTime, self.camera_x, {y=self.camera_final}) end function state:enter(previous) @@ -43,25 +36,17 @@ function state:enter(previous) self.line_count = 1 self.line_timer = 0 - self:refresh() self.previous = previous end function state:keypressed( button ) - if self.camera_x.y >= self.camera_final then - self.menu:keypressed(button) - end + self.menu:keypressed(button) end function state:update(dt) - self.walk2animate:update(dt) - self.walk3animate:update(dt) - self.walkTroyanimate:update(dt) - - camera.x = self.camera_x.y self.line_timer = self.line_timer + dt - if self.line_timer > 0.05 and camera.x >= self.camera_final then + if self.line_timer > 0.05 then self.line_timer = 0 self.line_short = self.line_short..self.line.sub(self.line, self.line_count, self.line_count) self.line_count = self.line_count + 1 @@ -71,80 +56,41 @@ end function state:draw() --background colour - love.graphics.setColor( 89, 156, 225, 255 ) - love.graphics.rectangle( 'fill', camera.x, 0, love.graphics:getWidth(), love.graphics:getHeight() ) love.graphics.setColor( 0, 0, 0, 255 ) - love.graphics.rectangle( 'fill', self.camera_final, 0, love.graphics:getWidth(), love.graphics:getHeight()) + love.graphics.rectangle( 'fill', 0, 0, love.graphics:getWidth(), love.graphics:getHeight() ) love.graphics.setColor( 255, 255, 255, 255 ) - - -- animations & banner - self.walk2animate:draw(self.walk2, 528, 180) - self.walk3animate:draw(self.walk3, 528, 180) - love.graphics.draw(self.banner, 529, 137) - self.walkTroyanimate:draw(self.walkTroy, 916, 119) - - - if self.camera_x.y >= self.camera_final then - -- green terminal - fonts.set('courier') - love.graphics.setColor( 48, 254, 31, 225 ) - love.graphics.print(self.line_short, 50 + camera.x, 50, 0, 0.5, 0.5 ) - - -- control instructions - love.graphics.setColor(255, 255, 255) - fonts.set( 'big' ) - love.graphics.printf(self.text, camera.x, window.height - 32, window.width, 'center', 0.5, 0.5) - - -- menu - local x = window.width / 2 - self.splash:getWidth()/2 + camera.x - local y = 2*window.height / 3 - self.splash:getHeight()/2 - love.graphics.draw(self.splash, x, y) - love.graphics.draw(self.arrow, x + 12, y + 23 + 12 * (self.menu:selected() - 1)) - for n,option in ipairs(self.menu.options) do - love.graphics.print(app.i18n(option), x + 23, y + 12 * n - 2, 0, 0.5, 0.5) - end - end -end - -function state:refresh() - local runTime = 30 - - self.walk2 = love.graphics.newImage('images/menu/walk2.png') - self.walk3 = love.graphics.newImage('images/menu/walk3.png') - self.walkTroy = love.graphics.newImage('images/menu/walkTroy.png') - self.banner = love.graphics.newImage('images/menu/banner.png') - - local g1 = anim8.newGrid(1056, 52, self.walk2:getWidth(), self.walk2:getHeight()) - local g2 = anim8.newGrid(1056, 52, self.walk3:getWidth(), self.walk3:getHeight()) - local g3 = anim8.newGrid(49, 113, self.walkTroy:getWidth(), self.walkTroy:getHeight()) - state.walk2animate = anim8.newAnimation('loop', g1('1, 1-2'), 0.2) - state.walk3animate = anim8.newAnimation('loop', g2('1, 1-3'), 0.16) - state.walkTroyanimate = anim8.newAnimation('loop', g3('1-3, 1'), 0.2) +-- green terminal + fonts.set('courier') + love.graphics.setColor( 48, 254, 31, 225 ) + love.graphics.print(self.line_short, 50, 50, 0, 0.5, 0.5 ) + + -- control instructions + love.graphics.setColor(255, 255, 255) + fonts.set( 'big' ) + love.graphics.printf(self.text, 0, window.height - 32, window.width, 'center', 0.5, 0.5) + + -- menu + local x = window.width / 2 - self.splash:getWidth()/2 + local y = 2*window.height / 3 - self.splash:getHeight()/2 + love.graphics.draw(self.splash, x, y) + love.graphics.draw(self.arrow, x + 12, y + 23 + 12 * (self.menu:selected() - 1)) + for n,option in ipairs(self.menu.options) do + love.graphics.print(app.i18n(option), x + 23, y + 12 * n - 2, 0, 0.5, 0.5) + end end - -function state:leave() - camera.x = 0 +function state:leave() self.line = nil self.line_short = nil self.line_count = nil self.line_timer = nil - - self.walk2 = nil - self.walk3 = nil - self.walkTroy = nil - self.banner = nil - + self.splash = nil self.arrow = nil self.text = nil - - state.walk2animate = nil - state.walk3animate = nil - state.walkTroyanimate = nil - + fonts.reset() end