updated
This commit is contained in:
@@ -273,7 +273,7 @@ local function drawStand()
|
||||
for i = 0, steps do
|
||||
local frac = i / math.max(1, steps)
|
||||
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
|
||||
-- Right leg
|
||||
local rx1 = CX + math.floor(RX * 0.3)
|
||||
@@ -281,11 +281,11 @@ local function drawStand()
|
||||
for i = 0, steps do
|
||||
local frac = i / math.max(1, steps)
|
||||
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
|
||||
-- Horizontal crossbar
|
||||
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
|
||||
|
||||
-- Fixed pointer triangle at the top of the wheel (screen top, pointing down)
|
||||
|
||||
@@ -86,8 +86,8 @@ local BOWL_SLOPE = math.pi / 9 -- 20 degrees
|
||||
-- Pocket well is deeper — steeper slope
|
||||
local POCKET_SLOPE = math.pi / 5 -- 36 degrees
|
||||
-- Restitution on bowl surface normal bounce
|
||||
local RESTITUTION_WALL = 0.55
|
||||
local RESTITUTION_POCKET = 0.38
|
||||
local RESTITUTION_WALL = 0.82
|
||||
local RESTITUTION_POCKET = 0.68
|
||||
-- Rolling friction: velocity multiplier per second on the bowl surface
|
||||
local FRICTION_ROLL = 0.988 -- per frame on track
|
||||
local FRICTION_POCKET = 0.970 -- per frame in pocket
|
||||
@@ -252,7 +252,9 @@ local function bgAt(bx, by)
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
local function drawBall(bx, by)
|
||||
|
||||
Reference in New Issue
Block a user