Skip to content

Commit

Permalink
Minor HUD cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trey Tomes committed Dec 26, 2023
1 parent 419e7df commit 32a8c39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/factories/entities.ms
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ makeSimpleVillager = function(map, pnt)
"You don't say?",
]
result = ui.showMessage(message, options, e.name)
Service.messages.report("You said: '{0}'".fill([ options[result] ]))
Service.messages.report("You said: ""{0}""".fill([ options[result] ]))
return true
end function
Expand Down
4 changes: 2 additions & 2 deletions src/map.ms
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Map.findHiddenSpawnPoint = function()
end function
Map.clear = function(dsp)
for y in range(0, SCREEN_MAX_Y)
for y in range(0, SCREEN_MAX_Y - 1)
for x in range(0, SCREEN_MAX_X)
dsp.setCell x, y, "#", color.black, color.gray
end for
Expand Down Expand Up @@ -159,7 +159,7 @@ end function
Map.draw_v1 = function(display, player, renderOffset)
halfHeight = constants.TILE_DISPLAY_HEIGHT / 2 - 1
halfWidth = constants.TILE_DISPLAY_WIDTH / 2 - 1
for y in range(player.position.y - halfHeight, player.position.y + halfHeight + 1)
for y in range(player.position.y - halfHeight, player.position.y + halfHeight + 1 - 1) // The -1 at the end here accounts for a HUD rendering problem.
for x in range(player.position.x - halfWidth, player.position.x + halfWidth + 1)
self.drawTile display, x, y, renderOffset
end for
Expand Down

0 comments on commit 32a8c39

Please sign in to comment.