This commit is contained in:
2026-05-05 20:05:46 -04:00
parent 4f34b6f6fd
commit d8e3330e5e
2 changed files with 8 additions and 6 deletions

View File

@@ -273,7 +273,7 @@ local function drawStand()
for i = 0, steps do for i = 0, steps do
local frac = i / math.max(1, steps) local frac = i / math.max(1, steps)
local cx_l = lx1 + math.floor((lx2 - lx1) * frac) local cx_l = lx1 + math.floor((lx2 - lx1) * frac)
px_rect(cx_l - legW//2, baseY + i, legW, 1, COL_STAND) px_rect(cx_l - math.floor(legW/2), baseY + i, legW, 1, COL_STAND)
end end
-- Right leg -- Right leg
local rx1 = CX + math.floor(RX * 0.3) local rx1 = CX + math.floor(RX * 0.3)
@@ -281,11 +281,11 @@ local function drawStand()
for i = 0, steps do for i = 0, steps do
local frac = i / math.max(1, steps) local frac = i / math.max(1, steps)
local cx_r = rx1 + math.floor((rx2 - rx1) * frac) local cx_r = rx1 + math.floor((rx2 - rx1) * frac)
px_rect(cx_r - legW//2, baseY + i, legW, 1, COL_STAND) px_rect(cx_r - math.floor(legW/2), baseY + i, legW, 1, COL_STAND)
end end
-- Horizontal crossbar -- Horizontal crossbar
local barY = baseY + math.floor(steps * 0.55) local barY = baseY + math.floor(steps * 0.55)
px_rect(lx2 - legW//2, barY, rx2 - lx2 + legW, 6, COL_STAND_DRK) px_rect(lx2 - math.floor(legW/2), barY, rx2 - lx2 + legW, 6, COL_STAND_DRK)
end end
-- Fixed pointer triangle at the top of the wheel (screen top, pointing down) -- Fixed pointer triangle at the top of the wheel (screen top, pointing down)

View File

@@ -86,8 +86,8 @@ local BOWL_SLOPE = math.pi / 9 -- 20 degrees
-- Pocket well is deeper — steeper slope -- Pocket well is deeper — steeper slope
local POCKET_SLOPE = math.pi / 5 -- 36 degrees local POCKET_SLOPE = math.pi / 5 -- 36 degrees
-- Restitution on bowl surface normal bounce -- Restitution on bowl surface normal bounce
local RESTITUTION_WALL = 0.55 local RESTITUTION_WALL = 0.82
local RESTITUTION_POCKET = 0.38 local RESTITUTION_POCKET = 0.68
-- Rolling friction: velocity multiplier per second on the bowl surface -- Rolling friction: velocity multiplier per second on the bowl surface
local FRICTION_ROLL = 0.988 -- per frame on track local FRICTION_ROLL = 0.988 -- per frame on track
local FRICTION_POCKET = 0.970 -- per frame in pocket local FRICTION_POCKET = 0.970 -- per frame in pocket
@@ -252,7 +252,9 @@ local function bgAt(bx, by)
end end
local function eraseBall() local function eraseBall()
px_circle(ballX, ballY, BALL_RADIUS + 2, bgAt(ballX, ballY)) -- Shadow is drawn at +2,+2 with full BALL_RADIUS, so the total footprint
-- extends BALL_RADIUS+2 from centre in x/y. Add 3px margin to be safe.
px_circle(ballX, ballY, BALL_RADIUS + 5, bgAt(ballX, ballY))
end end
local function drawBall(bx, by) local function drawBall(bx, by)