1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-05 04:28:57 +00:00

Fix endline in loadmap, uodate map

This commit is contained in:
David Schmenk 2014-12-28 11:53:16 -08:00
parent ac6faf4e96
commit bccbb24601
3 changed files with 25 additions and 23 deletions

View File

@ -1,22 +1,22 @@
..........................[-].................................
.........................*...*................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
..............................................................
##...$&$&.###......#######[-]####............................T
#.....#######. .&##..*...*..#.##########......*...*.......
.....###..... .###.........#.#.......###...##.....##....#
#........ .####.........#...#####.##&...##.T...##....#
##. ..###.........#.#.#.....####....*...*.......
#### ....######+#####.#.#.##########.........<<<<<
######### ..........#.#&#.#.#.#..........#####....>>>>>>
##########......T.........#.#..#..#.#.########....##...<<<<<<<
.......##############*....#.#####.#.#.#...#.&####..:...>>>>>>>
........############.....T#.......#.#...#T...#.##*.:....<<<<<<
.........................##########.##########.##..#...>>>>>>$
........................##.....................##..#..<<<<<<..
.........................#+#########.########.###*.#.>>>>>....
...........................#..................##...#.<<<<....#
........................####.###################*..#.>>>>...##
...................................................#.<<<....##
...................................................#.>>>...O.#
...................................................#........&#
...........................................................###
..............................................................
..............................................................
..............................................................
@ -59,4 +59,4 @@
..............................................................
..............................................................
..*...*.......................................................
..#[=]#.......................................................
..#[=]#.......................................................

View File

@ -115,6 +115,7 @@ const maprows = 64
const mapcols = 64
const mapsize = maprows*mapcols
const WALL_TILE = '#'
const FLOOR_TILE = '.'
const TORCH_TILE = '*'
const PIT_TILE = ' '
@ -186,7 +187,7 @@ word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
//
export def loadmap
byte mapref, row
byte mapref, row, l
//
// Init the view map
@ -206,7 +207,8 @@ export def loadmap
if mapref
newline(mapref, $7F, $0D)
for row = 1 to maprows - 2
read(mapref, map + (row << 6) + 1, mapcols)
l = read(mapref, map + (row << 6) + 1, mapcols)
^(map + (row << 6) + l) = WALL_TILE
next
close(mapref)
fin

View File

@ -49,7 +49,7 @@ const FALSE = 0
const TRUE = not FALSE
const maxlight = 10
const maxview = 20
const maxview = 19
word xdir = 0, 1, 1, 1, 0, -1, -1, -1
word ydir = -1, -1, 0, 1, 1, 1, 0, -1