From 1529202e26a02461708784d8830475261893a537 Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 19 Jun 2022 12:18:09 +0300 Subject: RLGL line width functions. --- examples/platformer/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/platformer') diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua index bef5786..d1160e1 100644 --- a/examples/platformer/main.lua +++ b/examples/platformer/main.lua @@ -84,6 +84,7 @@ function init() local monitorPos = Vec2:new( RL_GetMonitorPosition( monitor ) ) local monitorSize = Vec2:new( RL_GetMonitorSize( monitor ) ) + RL_SetConfigFlags( FLAG_VSYNC_HINT ) RL_SetWindowTitle( "Platformer" ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowSize( winSize ) @@ -121,6 +122,7 @@ local function tileCollision( entity ) if isTileWall( Vec2:new( tileRect[3], y ) ) then -- Use new_x to push out of tile. local new_x = tileRect[3] * TILE_SIZE - ( entity.colRect[1] + entity.colRect[3] ) + entity.vel.x = new_x - tinyGap break @@ -128,7 +130,7 @@ local function tileCollision( entity ) elseif entity.vel.x < 0 then if isTileWall( Vec2:new( tileRect[1], y ) ) then local new_x = ( tileRect[1] * TILE_SIZE + TILE_SIZE ) - entity.colRect[1] - entity.vel.x = new_x + tinyGap, 0 + entity.vel.x = new_x + tinyGap break end -- cgit v1.2.3