Skip to content

Commit

Permalink
New tilesets!
Browse files Browse the repository at this point in the history
  • Loading branch information
Trey Tomes committed Dec 19, 2023
1 parent d7f6d94 commit 6605067
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 14 deletions.
Binary file added assets/OEM437_12_ex.pdn
Binary file not shown.
Binary file added assets/OEM437_16_ex.pdn
Binary file not shown.
Binary file added assets/OEM437_16_ex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/OEM437_24_ex.pdn
Binary file not shown.
Binary file added assets/OEM437_24_ex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/micro-font-12.pdn
Binary file not shown.
7 changes: 2 additions & 5 deletions src/MapDisplay.ms
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ MapDisplay = {}
MapDisplay.initTiles = function(displayNumber)
dsp = new TileDisplay // Create a detached TileDisplay.
// display(displayNumber).mode = displayMode.tile
dsp.tileSet = file.loadImage("assets/OEM437_8.png")
dsp.tileSetTileSize = 8
dsp.tileSet = file.loadImage("assets/OEM437_16_ex.png")
dsp.tileSetTileSize = 16
dsp.cellSize = 16
dsp.extent = [constants.TILE_DISPLAY_WIDTH, constants.TILE_DISPLAY_HEIGHT]
return dsp
Expand Down Expand Up @@ -66,9 +66,6 @@ MapDisplay.setCell = function(x, y, tile, color="#FFFFFF", backColor = "#0000000
if tile isa string then
tile = code(tile)
end if
if tile > 255 then
tile = code("?")
end if

if color isa Color then
color = color.str()
Expand Down
2 changes: 1 addition & 1 deletion src/factories/entities.ms
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

makePlayer = function()
// t = tile.make(char(57872), Color.white, Color.black, true, false) // TODO
t = tile.make(char(2), Color.white, Color.black, true, false)
t = tile.make(255+16-3, Color.white, Color.black, true, false)
e = (new entity.Entity).init(t, races.human, classes.fighter)

e.name = "player" //e.race.name
Expand Down
8 changes: 0 additions & 8 deletions src/tile.ms
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ Tile.draw = function(dsp, x, y)
if fg isa Color then fg = fg.str
bg = self.backgroundColor
if bg isa Color then bg = bg.str

// tileDisplay.setCellColor x, y, fg
// tileDisplay.setCellBackColor x, y, bg
// tileDisplay.setCell x, y, self.char
dsp.setCell x, y, self.char, fg, bg
end function

Expand All @@ -41,10 +37,6 @@ Tile.drawDim = function(dsp, x, y)
if fg isa Color then fg = fg.darker.str else fg = "#444444"
bg = self.backgroundColor
if bg isa Color then bg = bg.darker.str else bg = color.black

// tileDisplay.setCellColor x, y, fg
// tileDisplay.setCellBackColor x, y, bg
// tileDisplay.setCell x, y, self.char
dsp.setCell x, y, self.char, fg, bg
end function

Expand Down

0 comments on commit 6605067

Please sign in to comment.