/ console and crit line scaling

This commit is contained in:
FajsiEx 2021-10-28 17:27:26 +02:00
parent fcc2f5958f
commit 6d9f26fdec
2 changed files with 15 additions and 2 deletions

View File

@ -6,22 +6,29 @@ local CONSOLE_H = 712;
-- Similar to crit line transforms, since the console needs to follow the lane rotation -- Similar to crit line transforms, since the console needs to follow the lane rotation
local setUpTransforms = function (x,y,rotation) local setUpTransforms = function (x,y,rotation)
local resx, resy = game.GetResolution()
local desw = 1080
local desh = 1920
local scale = resx / desw
gfx.Translate(x, y) gfx.Translate(x, y)
gfx.Rotate(rotation) gfx.Rotate(rotation)
gfx.Scale(scale,scale)
end end
local render = function (deltaTime, critLineCenterX, critLineCenterY, critLineRotation) local render = function (deltaTime, critLineCenterX, critLineCenterY, critLineRotation)
setUpTransforms( setUpTransforms(
critLineCenterX, critLineCenterX,
critLineCenterY+350, critLineCenterY,
critLineRotation critLineRotation
) )
gfx.BeginPath(); gfx.BeginPath();
gfx.ImageRect( gfx.ImageRect(
-CONSOLE_W/2, -CONSOLE_W/2,
-CONSOLE_H/2, -CONSOLE_H/2+350,
CONSOLE_W, CONSOLE_W,
CONSOLE_H, CONSOLE_H,
consoleBaseImage, consoleBaseImage,

View File

@ -6,8 +6,14 @@ local CRITBAR_W = 1496
local CRITBAR_H = 348 local CRITBAR_H = 348
local setUpTransforms = function (x,y,rotation) local setUpTransforms = function (x,y,rotation)
local resx, resy = game.GetResolution()
local desw = 1080
local desh = 1920
local scale = resx / desw
gfx.Translate(x, y) gfx.Translate(x, y)
gfx.Rotate(rotation) gfx.Rotate(rotation)
gfx.Scale(scale,scale)
end end
local renderBase = function (deltaTime, centerX, centerY, rotation) local renderBase = function (deltaTime, centerX, centerY, rotation)