parent
b586a217a3
commit
98ab8bfb62
|
@ -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
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue