diff --git a/charts/darnell/script.lua b/charts/darnell/script.lua index 64140bb..e818dae 100644 --- a/charts/darnell/script.lua +++ b/charts/darnell/script.lua @@ -6,27 +6,37 @@ local started = false function module.onCreate() if gameMode == "storymode" then - print("evil") + -- print("evil") video:play() sharedVars.canStart = false sharedVars.shouldCountdown = false + sharedVars.cutscene = true end end function module.onUpdate() if not video:isPlaying() and not started then - print("evil") + -- print("evil") sharedVars.canStart = true sharedVars.shouldCountdown = true started = true + sharedVars.cutscene = false end end function module.drawAboveCanvas() if not started then - print("evil") + -- print("evil") love.graphics.draw(video, 0, 0, 0, 1280 / video:getWidth(), 720 / video:getHeight()) end end +function module.onClose() + if video then + video:pause() + video:release() + video = nil + end +end + return module \ No newline at end of file diff --git a/stages/streets.lua b/stages/streets.lua index a240a68..5f7cea5 100644 --- a/stages/streets.lua +++ b/stages/streets.lua @@ -34,9 +34,6 @@ function module.onCreate() -- rain.layer = 0 -- rain:PlayAnimation("Rain", 15, true) -- no. - - - end return module \ No newline at end of file diff --git a/states/freeplaystate.lua b/states/freeplaystate.lua index c831b8c..6d89c15 100644 --- a/states/freeplaystate.lua +++ b/states/freeplaystate.lua @@ -48,7 +48,7 @@ return function() local curSong = songs[1] - local evilCurIndex = 1 + local evilCurIndex = -500 local curDiffList = songs[1].difficulties local curDiff = songs[1].difficulties[1] @@ -416,7 +416,10 @@ return function() function state.load() setup() - love.window.setMode(1280, 720, { fullscreen = false, resizable = false, centered = true, borderless = false }) + + if love.graphics.getWidth() ~= 1280 then + love.window.setMode(1280, 720, { fullscreen = false, resizable = false, centered = true, borderless = false }) + end end function state.wheelmoved(x, y) diff --git a/states/menustate.lua b/states/menustate.lua index 155676f..90b42f6 100644 --- a/states/menustate.lua +++ b/states/menustate.lua @@ -61,7 +61,7 @@ return function() credits = "creditsstate", login = "loginstate" } - local evilCurrentOption = 1 + local evilCurrentOption = -10 local optionSprites = {} local moving = false diff --git a/states/playstate.lua b/states/playstate.lua index 4964443..0315821 100644 --- a/states/playstate.lua +++ b/states/playstate.lua @@ -512,10 +512,15 @@ local function state(songName, songDifficulty, show) end render.updateSprites(dt) end + + if sharedVars.cutscene then + render.updateSprites(dt) + end + return end - render.updateSprites(dt) + -- playing isn't supposed to work like "paused", it's there to keep the game from working during loading if counting and sharedVars.shouldCountdown then @@ -545,10 +550,16 @@ local function state(songName, songDifficulty, show) end elseif not sharedVars.shouldCountdown then counting = false + + if sharedVars.cutscene then + render.updateSprites(dt) + end end if paused then goto continue end -- if paused then skip this cycle + render.updateSprites(dt) + local currentTime = socket.gettime() elapsed = (currentTime - startTime) * 1000 - pauseTime - cdLength @@ -960,19 +971,19 @@ local function state(songName, songDifficulty, show) -- GF first so she is below other chars if metadata.playData.characters.girlfriend then characters.gf = Character(metadata.playData.characters.girlfriend) - characters.gf:PlayAnimation("danceLeft") characters.gf.sprite.layer = 0 if not characters.gf.hasStagePosition then characters.gf.stagePosition = Vector2(stage.girlfriend[1], stage.girlfriend[2]) end + characters.gf:PlayAnimation(characters.gf.animInfo.idle and "idle" or "danceLeft") end characters.bf = Character(metadata.playData.characters.player) - characters.bf:PlayAnimation("idle") characters.bf.sprite.layer = 1 if not characters.bf.hasStagePosition then characters.bf.stagePosition = Vector2(stage.boyfriend[1], stage.boyfriend[2]) end + characters.bf:PlayAnimation(characters.bf.animInfo.idle and "idle" or "danceLeft") shader:send("pr", characters.bf.colors[1] / 255) shader:send("pg", characters.bf.colors[2] / 255) shader:send("pb", characters.bf.colors[3] / 255) @@ -991,12 +1002,12 @@ local function state(songName, songDifficulty, show) if metadata.playData.characters.opponent and metadata.playData.characters.opponent ~= "none" then -- you can have no player2 but always player1 characters.dad = Character(metadata.playData.characters.opponent) - characters.dad:PlayAnimation(characters.dad.animInfo.idle and "idle" or "danceLeft") characters.dad.sprite.layer = 1 if not characters.dad.hasStagePosition then characters.dad.stagePosition = Vector2(stage.opponent[1], stage.opponent[2]) print(stage.opponent[1], stage.opponent[2]) end + characters.dad:PlayAnimation(characters.dad.animInfo.idle and "idle" or "danceLeft") local image = love.graphics.newImage(string.format("images/icons/icon-%s.png", characters.dad.icon)) icons.dad = { @@ -1140,7 +1151,9 @@ local function state(songName, songDifficulty, show) local screenSize = sharedVars.screenSize or Vector2(1280, 720) - love.window.setMode(screenSize.x, screenSize.y, { fullscreen = false, resizable = false }) + if love.graphics.getWidth() ~= screenSize.x then + love.window.setMode(screenSize.x, screenSize.y, { fullscreen = false, resizable = false }) + end render.offset = Vector2(960, 540) end diff --git a/states/resultsstate.lua b/states/resultsstate.lua index 26f3c57..74caf67 100644 --- a/states/resultsstate.lua +++ b/states/resultsstate.lua @@ -82,7 +82,9 @@ return function(score, accuracy, ratings, combo) end function state.load() - love.window.setMode(1280, 720) + if love.graphics.getWidth() ~= 1280 then + love.window.setMode(1280, 720, { fullscreen = false, resizable = false, centered = true, borderless = false }) + end local rank = "LOSS" local animation = "LOSS animation"