LuaJIT compatibility.

This commit is contained in:
jussi
2023-07-02 17:44:24 +03:00
parent 0e77452a1b
commit 8ad7254292
23 changed files with 966 additions and 53 deletions

View File

@@ -126,7 +126,7 @@ function RL.draw()
RL.DrawCircle( ball.pos, ball.radius, RL.WHITE )
-- Draw score.
RL.DrawText( 0, playerLeft.score, { 50, 10 }, 40, 2, RL.WHITE )
local rightTextSize = Vec2:new( RL.MeasureText( 0, playerRight.score, 40, 2 ) )
RL.DrawText( 0, playerRight.score, { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, RL.WHITE )
RL.DrawText( 0, tostring( playerLeft.score ), { 50, 10 }, 40, 2, RL.WHITE )
local rightTextSize = Vec2:new( RL.MeasureText( 0, tostring( playerRight.score ), 40, 2 ) )
RL.DrawText( 0, tostring( playerRight.score ), { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, RL.WHITE )
end