Permalink
Browse files

Fix typos in new level compiler port (9dcf867)

Apart from error messages, error handling and comments, this fills mazes
with one less of both gold piles and traps.

I made a point to diff the files in this branch against UnNetHack's, so
this should be the last of any typos in that level compiler port.
  • Loading branch information...
1 parent 8a85113 commit 6145272ede3849c4675a33610a0460edf1afdd07 @tung committed Apr 7, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −4 libnitrohack/src/sp_lev.c
  2. +3 −3 libnitrohack/util/lev_comp.y
@@ -360,7 +360,7 @@ static void shuffle_alignments(void)
{
int i;
aligntyp atmp;
- /* shuffle 3 alignments; can't use sp_lev_shuffle() aligntyp's */
+ /* shuffle 3 alignments; can't use sp_lev_shuffle() on aligntyp's */
ralign[0] = init_ralign[0]; ralign[1] = init_ralign[1]; ralign[2] = init_ralign[2];
i = rn2(3); atmp = ralign[2]; ralign[2] = ralign[i]; ralign[i] = atmp;
if (rn2(2)) { atmp = ralign[1]; ralign[1] = ralign[0]; ralign[0] = atmp; }
@@ -2061,11 +2061,11 @@ static void fill_empty_maze(struct level *lev)
maze1xy(lev, &mm, WET|DRY);
makemon(NULL, lev, mm.x, mm.y, NO_MM_FLAGS);
}
- for (x = rnd((int)(15 * mapfact) / 100); x; x--) {
+ for (x = rn2((int)(15 * mapfact) / 100); x; x--) {
maze1xy(lev, &mm, DRY);
mkgold(0L, lev, mm.x, mm.y);
}
- for (x = rnd((int)(15 * mapfact) / 100); x; x--) {
+ for (x = rn2((int)(15 * mapfact) / 100); x; x--) {
int trytrap;
maze1xy(lev, &mm, DRY);
@@ -2222,7 +2222,7 @@ static boolean sp_level_loader(struct level *lev, dlb *fd, sp_lev *lvl)
Fread(tmpstr, 1, n, fd);
tmpstr[n] = '\0';
opdat = tmpstr;
- } else panic("sp_level_loader: rn_mons idx out-of-bounds (%i)", n);
+ } else panic("sp_level_loader: rnd_mons idx out-of-bounds (%i)", n);
break;
case SPO_DRAWBRIDGE:
opdat = malloc(sizeof(drawbridge));
@@ -832,7 +832,7 @@ object_where : coordinate
object *tmpobj = (object *)get_last_opcode_data1(&splev, SPO_OBJECT);
if (!tmpobj) yyerror("No object defined?!");
tmpobj->containment = 1;
- /* random coordinate, will be overriden anyway */
+ /* random coordinate, will be overridden anyway */
tmpobj->x = -MAX_REGISTERS - 1;
tmpobj->y = -MAX_REGISTERS - 1;
}
@@ -1489,7 +1489,7 @@ m_register : M_REGISTER '[' INTEGER ']'
{
if (on_mlist == 0)
yyerror("No random monsters defined!");
- else if ( $3 >= on_mlist )
+ if ( $3 >= on_mlist )
yyerror("Register Index overflow!");
else
$<i>$ = - $3 - 1;
@@ -1557,7 +1557,7 @@ engraving_type : ENGRAVING_TYPE
coord : '(' INTEGER ',' INTEGER ')'
{
if ($2 < 0 || $4 < 0 || $2 >= COLNO || $4 >= ROWNO)
- yyerror("Cooridnates out of map range!");
+ yyerror("Coordinates out of map range!");
current_coord.x = $2;
current_coord.y = $4;
}

0 comments on commit 6145272

Please sign in to comment.