Mercurial > hg > early-roguelike
comparison xrogue/outside.c @ 304:e52a8a7ad4c5
Fix many compiler warnings.
There should only be two changes in behavior:
arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly
applied to characters who are not monks instead of monks who are not
empty-handed.
urogue/fight.c: fixed an interaction with the "debug" macro that could
cause the wrong message to be displayed.
| author | John "Elwin" Edwards |
|---|---|
| date | Wed, 14 Apr 2021 18:55:33 -0400 |
| parents | f54901b9c39b |
| children |
comparison
equal
deleted
inserted
replaced
| 303:e06ebc407615 | 304:e52a8a7ad4c5 |
|---|---|
| 66 /* Start with some random terrain */ | 66 /* Start with some random terrain */ |
| 67 if (basex == 0) { | 67 if (basex == 0) { |
| 68 ch = rnd_terrain(); | 68 ch = rnd_terrain(); |
| 69 addch(ch); | 69 addch(ch); |
| 70 } | 70 } |
| 71 else ch = mvinch(basey, basex); | 71 else ch = mvinch(basey, basex) & A_CHARTEXT; |
| 72 | 72 |
| 73 curx += deltax; | 73 curx += deltax; |
| 74 | 74 |
| 75 /* Fill in the rest of the line */ | 75 /* Fill in the rest of the line */ |
| 76 while (curx > 0 && curx < cols-1) { | 76 while (curx > 0 && curx < cols-1) { |
| 93 | 93 |
| 94 /* Get the surrounding terrain */ | 94 /* Get the surrounding terrain */ |
| 95 left_pos = curx - deltax; | 95 left_pos = curx - deltax; |
| 96 top_pos = cury - deltay; | 96 top_pos = cury - deltay; |
| 97 | 97 |
| 98 left = mvinch(cury, left_pos); | 98 left = mvinch(cury, left_pos) & A_CHARTEXT; |
| 99 top_left = mvinch(top_pos, left_pos); | 99 top_left = mvinch(top_pos, left_pos) & A_CHARTEXT; |
| 100 top = mvinch(top_pos, curx); | 100 top = mvinch(top_pos, curx) & A_CHARTEXT; |
| 101 top_right = mvinch(top_pos, curx + deltax); | 101 top_right = mvinch(top_pos, curx + deltax) & A_CHARTEXT; |
| 102 | 102 |
| 103 /* Put the piece of terrain on the map */ | 103 /* Put the piece of terrain on the map */ |
| 104 mvaddch(cury, curx, get_terrain(left, top_left, top, top_right)); | 104 mvaddch(cury, curx, get_terrain(left, top_left, top, top_right)); |
| 105 | 105 |
| 106 /* Get the next x coordinate */ | 106 /* Get the next x coordinate */ |
