Split keyboard and joystick input config screens

This commit is contained in:
Ishaan Bhardwaj
2021-02-25 14:41:13 -05:00
parent a3a27d2566
commit ca18d090c9
7 changed files with 476 additions and 159 deletions

View File

@@ -254,8 +254,8 @@ function Ruleset:initializePiece(
local spawn_x
if (grid.width ~= 10) then
local percent = spawn_positions[data.shape].x / 10
for i = 0, grid.width - 1 do
if i / grid.width >= percent then
for i = grid.width - 1, 0, -1 do
if i / grid.width <= percent then
spawn_x = i
break
end