From 98ab8bfb629e7eb1b98af4f43ef48131cfcf259a Mon Sep 17 00:00:00 2001 From: Hersi Date: Thu, 3 Mar 2022 04:01:54 +0100 Subject: [PATCH] Removed log spam renamed function to be more appropriate --- scripts/common/dimensions.lua | 4 ++-- scripts/titlescreen/splash.lua | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/common/dimensions.lua b/scripts/common/dimensions.lua index bdcfbdd..da07846 100644 --- a/scripts/common/dimensions.lua +++ b/scripts/common/dimensions.lua @@ -21,7 +21,7 @@ local dimtable = { dimtable.screen.width, dimtable.screen.height = game.GetResolution() -local function transformToDesignSpace() +local function transformToScreenSpace() gfx.Translate((dimtable.screen.width - dimtable.view.width) / 2, 0); gfx.Scale(dimtable.view.width / dimtable.design.width, dimtable.view.height / dimtable.design.height); gfx.Scissor(0, 0, dimtable.design.width, dimtable.design.height); @@ -43,6 +43,6 @@ end -- return by reference trickery: local t = dimtable -t.transformToDesignSpace = transformToDesignSpace +t.transformToScreenSpace = transformToScreenSpace t.updateResolution = updateResolution return t \ No newline at end of file diff --git a/scripts/titlescreen/splash.lua b/scripts/titlescreen/splash.lua index ef801f0..2657c24 100644 --- a/scripts/titlescreen/splash.lua +++ b/scripts/titlescreen/splash.lua @@ -25,10 +25,8 @@ local splash1SfxPlayed = false local function calcFade(splashDuration) local t = splashDuration - splashTimer if t < fadeDuration then - game.Log("fade in: ", game.LOGGER_ERROR) fadeAlpha = Easing.linear(t, 0, 255, fadeDuration) -- fade in elseif splashTimer < fadeDuration then - game.Log("fade out: ", game.LOGGER_ERROR) fadeAlpha = Easing.linear(splashTimer, 0, 255, fadeDuration) -- fade out else --fadeAlpha = 255 @@ -116,7 +114,7 @@ function render(deltaTime) BGPattern.render() gfx.BeginPath() - Dim.transformToDesignSpace() + Dim.transformToScreenSpace() gfx.Rect(0, 0, Dim.design.width, Dim.design.height) gfx.FillColor(0, 0, 0) gfx.Fill()