… | … | ||
---|---|---|---|
367 | self->oy = 0; | 367 | self->oy = 0; |
368 | self->row = 0; | 368 | self->row = 0; |
369 | self->rows = 0; | 369 | self->rows = 0; |
370 | } | 370 | } |
371 | 371 | ||
372 | #define CELL_CLEAR(cell) \ | ||
373 | do { \ | ||
374 | (cell)->darkness = 0; \ | ||
375 | (cell)->stat_hp = 0; \ | ||
376 | (cell)->flags = 0; \ | ||
377 | (cell)->player = 0; \ | ||
378 | } while (0) | ||
379 | |||
372 | static void | 380 | static void |
373 | map_blank (DC__Map self, int x0, int y0, int w, int h) | 381 | map_blank (DC__Map self, int x0, int y0, int w, int h) |
374 | { | 382 | { |
375 | int x, y; | 383 | int x, y; |
376 | maprow *row; | 384 | maprow *row; |
… | … | ||
390 | if (x >= row->c1) | 398 | if (x >= row->c1) |
391 | break; | 399 | break; |
392 | 400 | ||
393 | cell = row->col + x - row->c0; | 401 | cell = row->col + x - row->c0; |
394 | 402 | ||
395 | cell->darkness = 0; | 403 | CELL_CLEAR (cell); |
396 | cell->stat_hp = 0; | ||
397 | cell->flags = 0; | ||
398 | cell->player = 0; | ||
399 | } | 404 | } |
400 | } | 405 | } |
401 | } | 406 | } |
402 | 407 | ||
403 | typedef struct { | 408 | typedef struct { |
… | … | ||
1780 | } | 1785 | } |
1781 | } | 1786 | } |
1782 | } | 1787 | } |
1783 | } | 1788 | } |
1784 | else | 1789 | else |
1785 | { | 1790 | CELL_CLEAR (cell); |
1786 | cell->darkness = 0; | ||
1787 | cell->stat_hp = 0; | ||
1788 | cell->flags = 0; | ||
1789 | cell->player = 0; | ||
1790 | } | ||
1791 | } | 1791 | } |
1792 | } | 1792 | } |
1793 | OUTPUT: | 1793 | OUTPUT: |
1794 | RETVAL | 1794 | RETVAL |
1795 | 1795 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |