HitFX, Early/Late display with ms #35

Merged
hersi merged 16 commits from domdoc-develop into master 2022-05-27 11:17:12 +02:00
4 changed files with 27 additions and 6 deletions
Showing only changes of commit e86ff7754a - Show all commits

View File

@ -66,7 +66,7 @@ end
function render_crit_base(deltaTime)
HitFX.renderLasers(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors);
CritLine.renderBase(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors);
CritLine.renderBase(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors, gameplay.laserActive);
Console.render(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation);
end

View File

@ -17,6 +17,10 @@ local cursorGlowTopImages = {
gfx.CreateSkinImage("gameplay/crit_line/cursor_glow_top_left.png", 0),
gfx.CreateSkinImage("gameplay/crit_line/cursor_glow_top_right.png", 0),
}
local cursorTailImages = {
gfx.CreateSkinImage("gameplay/crit_line/cursor_tail_l.png", 0),
gfx.CreateSkinImage("gameplay/crit_line/cursor_tail_r.png", 0),
}
local CRITBAR_W = 1080
local CRITBAR_H = 251
@ -24,10 +28,15 @@ local CRITBAR_H = 251
local scale = 1;
local isLandscape = false;
local drawCursors = function (centerX, centerY,cursors)
local drawCursors = function (centerX, centerY,cursors, laserActive)
local cursorW = 598 * 0.165;
local cursorH = 673 * 0.14;
local tailW = cursorW * 9
local tailH = cursorH * 9
for i = 0, 1, 1 do
local luaIndex = i + 1
local cursor = cursors[i];
gfx.Save();
@ -39,6 +48,18 @@ local drawCursors = function (centerX, centerY,cursors)
local cursorX = cursor.pos * (1 / scale) - cursorW / 2;
local cursorY = -cursorH / 2;
if laserActive[luaIndex] then
gfx.ImageRect(
cursor.pos - tailW / 2,
- tailH / 2,
tailW,
tailH,
cursorTailImages[luaIndex],
cursor.alpha,
0
)
end
gfx.ImageRect(
cursorX,
cursorY,
@ -54,7 +75,7 @@ local drawCursors = function (centerX, centerY,cursors)
cursorY,
cursorW,
cursorH,
cursorGlowBottomImages[i+1],
cursorGlowBottomImages[luaIndex],
cursor.alpha,
0
);
@ -74,7 +95,7 @@ local drawCursors = function (centerX, centerY,cursors)
cursorY,
cursorW,
cursorH,
cursorGlowTopImages[i+1],
cursorGlowTopImages[luaIndex],
cursor.alpha,
0
);
@ -83,7 +104,7 @@ local drawCursors = function (centerX, centerY,cursors)
end
end
local renderBase = function (deltaTime, centerX, centerY, rotation, cursors)
local renderBase = function (deltaTime, centerX, centerY, rotation, cursors, laserActive)
scale, isLandscape = Dimensions.setUpTransforms(centerX, centerY, rotation)
gfx.BeginPath()
@ -99,7 +120,7 @@ local renderBase = function (deltaTime, centerX, centerY, rotation, cursors)
gfx.ImageRect(-CRITBAR_W/2, -CRITBAR_H/2, CRITBAR_W, CRITBAR_H, baseImage, 1, 0);
end
drawCursors(centerX, centerY, cursors)
drawCursors(centerX, centerY, cursors, laserActive)
gfx.ResetTransform()
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB