From bfa25bf2b6a7f4494f666e4e52251a1024fc6837 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 28 Dec 2014 17:50:39 -0800 Subject: [PATCH] Rogue intro/ending updates. New map. --- src/CATACOMB.TXT | 62 ----------------------------------- src/samplesrc/CATACOMB#040000 | 1 + src/samplesrc/rogue.map.pla | 4 +-- src/samplesrc/rogue.pla | 23 ++++++++++--- src/toolsrc/lex.c | 3 +- 5 files changed, 22 insertions(+), 71 deletions(-) delete mode 100644 src/CATACOMB.TXT create mode 100644 src/samplesrc/CATACOMB#040000 diff --git a/src/CATACOMB.TXT b/src/CATACOMB.TXT deleted file mode 100644 index 78ae1d5..0000000 --- a/src/CATACOMB.TXT +++ /dev/null @@ -1,62 +0,0 @@ -##...$&$&.###......#######[-]####............................T -#.....#######. .&##..*...*..#.##########......*...*....... -.....###..... .###.........#.#.......###...##.....##....# -#........ .####.........#...#####.##&...##.T...##....# -##. ..###.........#.#.#.....####....*...*....... -#### ....######+#####.#.#.##########.........<<<<< -######### ..........#.#&#.#.#.#..........#####....>>>>>> -##########......T.........#.#..#..#.#.########....##...<<<<<<< -.......##############*....#.#####.#.#.#...#.&####..:...>>>>>>> -........############.....T#.......#.#...#T...#.##*.:....<<<<<< -.........................##########.##########.##..#...>>>>>>$ -........................##.....................##..#..<<<<<<.. -.........................#+#########.########.###*.#.>>>>>.... -...........................#..................##...#.<<<<....# -........................####.###################*..#.>>>>...## -...................................................#.<<<....## -...................................................#.>>>...O.# -...................................................#........&# -...........................................................### -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -.............................................................. -..*...*....................................................... -..#[=]#....................................................... diff --git a/src/samplesrc/CATACOMB#040000 b/src/samplesrc/CATACOMB#040000 new file mode 100644 index 0000000..13007fd --- /dev/null +++ b/src/samplesrc/CATACOMB#040000 @@ -0,0 +1 @@ +##....&$&#####.......##..#[-]#..#...........................T. #.....#######. .&##..*...*..#.##########......*...*......& .....###..... .###.........#.#.......###...##.....##....# #........ .####.........#...#####.##&...##.T...##....# ##. ..###.........#.#.#.....####....*...*......& #### ....######+#####.#.#.##########.........<<<<< ######### ........###.#&#.#.#.#..........#####....>>>>>> ###....&##......T........##.#..#..#.#.########....##...<<<<<<< &#.## ##############*....#.#####.#.#.#...#.&####..:...>>>>>>> ...... ############.....T#.......#.#...#T...#.##*.:....<<<<<< ###.........#####........##########.########:#.##..#...>>>>>>$ ##.....................*##.....................##..#..<<<<<<.. ..&###*..##..............#+##################.###*.#.>>>>>.... ..#####..##......#&........#..................##...#.<<<<....# ..&##O...#.....####....*####.###################*..#.>>>>...## ...............T##*....##.....................#....#.<<<....## #...........&..........#########.*.*.########.#O...#.>>>...O.# ####..................##.........#.#.....###..#.##.#........&# ..$.########........###..#########.####+####.##.##.#.......### #####......##########.&.##....O$&#.#..&.##*..#.....##....##... ......*###............###..#######.#.T..##..##.....##########+ .####....##############...*#...&O#.#...*&#O.#...##.....O##&... .&..####.....................#####.#..T..##.#...##............ ###T#&.#######################.....##.....#.#...*...##....*##. ..####.........................###..##....#.#.......##*....##. &....###########+###############.....###.&#.#..&##......##.... .#.O.#...#...&.......#&###.......###...##.#.#.T....*##....*... ...#...#...#...#...#.....####.####Z###..#.#.#.......##........ .#...#.&O#.*.#...#...#*.#Z#.#+#.......*.#.#.#&.........T....&. ..,#...#...#...#...#......#.............#O#+####...&......#### .#.&.#...#...#...#....&..##...#.........#+#.########.....####& ...#..Z#...#&..#..*...####.O..:.&.......#.:.#......O.......... .#...#...#...#.......##..#....:.........*.:.*Z................ &.......*.......######...##&..#::::::#....:.................## ####........#####.........###.............:.&.#::::::::::::::# ...##########...............#......O......:............&...... ............................#.............#......Z............ ............................##.............................##. .............................########%######################## ...open space............###########..:....................... ........................##............:..Z.................... ....fill it in!!.......##..############....................... .......................#..##.................................. ......................##...:.................................. ......................#....:........open space................ ......................#.####.................................. ......................#.#............fill it in!.............. ......................#.#..................................... #######################+#..................................... ###...&##...#...###.#...##.................................... &#.Z....#....Z...#.......#.................................... ........*........*.......#.................................... ......................*###.................................... . ...............#.................................... . ............#.................................... ......... ...........##.................................... .......... .......Z..&#.................................... .R.......... ..&.......#.................................... ........R.... ........*##.................................... ..*...*.....<<<<........##.................................... .&#[=]#&....$>>>>.......&#.................................... \ No newline at end of file diff --git a/src/samplesrc/rogue.map.pla b/src/samplesrc/rogue.map.pla index a9e407e..47aace8 100644 --- a/src/samplesrc/rogue.map.pla +++ b/src/samplesrc/rogue.map.pla @@ -299,11 +299,11 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist) // xmap = xorg - xcentr if xmap < 0 - l = mapcols - 1 + l = mapcols xscr = -xmap xmap = 0 else - l = mapcols - xmap - 1 + l = mapcols - xmap xscr = 0 fin if xscr + l > scrnwidth diff --git a/src/samplesrc/rogue.pla b/src/samplesrc/rogue.pla index 6a188c5..fe9db46 100755 --- a/src/samplesrc/rogue.pla +++ b/src/samplesrc/rogue.pla @@ -1,5 +1,5 @@ import STDLIB - predef syscall, call, memset, getc, putc, puts, putln + predef syscall, call, memset, getc, gets, putc, puts, putln predef memset, memcpy predef heapmark, heapallocalign, heapalloc, heaprelease, heapavail byte MACHID @@ -84,7 +84,7 @@ struc t_player word oil byte gold byte key - byte[32] name[32] + byte[16] name end byte player = 0 // xpos @@ -98,7 +98,7 @@ byte = 100 // energy word = 500 // oil byte = 0 // gold byte = 0 // key -byte[32] = "Player" +byte[16] = "Player" predef moveplayer @@ -132,10 +132,13 @@ byte keystr = "Key" // Messages // +word instr +byte namestr = "\nGreetings Warrior,\n what is your name" +byte prepstr = "\nPrepare" byte quitstr = "Are you sure you want to quit?" byte youmadeitstr = "You made it out alive with $" byte youdiedstr = "You perished inside the catacombs :-(" - +byte againstr = "\n\nPlay again by typing: +rogue\n" // // Utility functions // @@ -284,6 +287,9 @@ def findentities setmaptile(xmap, ymap, FLOOR_TILE) wend next + if not (ymap & 7) + putc('.') + fin next end @@ -575,6 +581,13 @@ end // loadmap +puts(@namestr) +instr = gets($BA) +if ^instr > 15 + ^instr = 15 +fin +memcpy(@player.name, instr, ^instr + 1) +puts(@prepstr) findentities lighttorches repeat @@ -595,6 +608,6 @@ if player.health > 0 else puts(@youdiedstr) fin -putc($0D) +puts(@againstr) done diff --git a/src/toolsrc/lex.c b/src/toolsrc/lex.c index fe2e8b4..ff6c8fb 100755 --- a/src/toolsrc/lex.c +++ b/src/toolsrc/lex.c @@ -236,8 +236,7 @@ t_token scan(void) for (scanshift = scanpos + 1; *scanshift; scanshift++) scanshift[0] = scanshift[1]; } -// else - scanpos++; + scanpos++; } if (!*scanpos++) {