Skip to content

Commit

Permalink
Fix y shifting bug!
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Mar 29, 2018
1 parent 273b769 commit 9f260d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@ buildLevel = (rooms) ->
if neighbor.object == object
roomObjects[y+dy][x].splice i, 1
break
y += objectHeight[object] - 1
x += 0.5
yActual = y + objectHeight[object] - 1
xActual = x + 0.5
if global
spawn = 'Global'
if object in ['player', 'yield', 'crystal', 'diamond',
'record', 'bird']
console.warn "Warning: #{object} should not be global"
else
spawn = 'Spawn'
spawns.push " #{spawn}(\"#{objectMapping[object]}\", #{x}, #{y}#{arg})"
spawns.push " #{spawn}(\"#{objectMapping[object]}\", #{xActual}, #{yActual}#{arg})"
level.push " ApplyTiles(wip, 0, 0, [["
level.push (row.join '' for row in tiles).join '\n'
level.push "]])"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f260d7

Please # to comment.