diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-06-02 02:10:58 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-06-02 03:22:56 +0200 |
commit | 7a7945507d92b1ccd9c34e5ebec9698c746003c6 (patch) | |
tree | b160a611c927e58361a55b9c39661080f1ebb4b6 /crawl-ref/source/los.cc | |
parent | 2962df23398e54f81a970c24a4cdc45145a8f456 (diff) | |
download | crawl-ref-7a7945507d92b1ccd9c34e5ebec9698c746003c6.tar.gz crawl-ref-7a7945507d92b1ccd9c34e5ebec9698c746003c6.zip |
Make some functions static/gone.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r-- | crawl-ref/source/los.cc | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index b907dfcab3..eee99ec40f 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -849,23 +849,6 @@ static void _losight_quadrant(los_grid& sh, const los_param& dat, int sx, int sy } } -void losight(los_grid& sh, const los_param& dat) -{ - sh.init(false); - - // Do precomputations if necessary. - raycast(); - - const int quadrant_x[4] = { 1, -1, -1, 1 }; - const int quadrant_y[4] = { 1, 1, -1, -1 }; - for (int q = 0; q < 4; ++q) - _losight_quadrant(sh, dat, quadrant_x[q], quadrant_y[q]); - - // Center is always visible. - const coord_def o = coord_def(0,0); - sh(o) = true; -} - struct los_param_funcs : public los_param { coord_def center; @@ -892,7 +875,21 @@ struct los_param_funcs : public los_param void losight(los_grid& sh, const coord_def& center, const opacity_func& opc, const circle_def& bounds) { - losight(sh, los_param_funcs(center, opc, bounds)); + const los_param& dat = los_param_funcs(center, opc, bounds); + + sh.init(false); + + // Do precomputations if necessary. + raycast(); + + const int quadrant_x[4] = { 1, -1, -1, 1 }; + const int quadrant_y[4] = { 1, 1, -1, -1 }; + for (int q = 0; q < 4; ++q) + _losight_quadrant(sh, dat, quadrant_x[q], quadrant_y[q]); + + // Center is always visible. + const coord_def o = coord_def(0,0); + sh(o) = true; } opacity_type mons_opacity(const monster* mon, los_type how) @@ -958,13 +955,6 @@ void los_terrain_changed(const coord_def& p) _handle_los_change(); } -// Might want to pass new/old cloud type. -void los_cloud_changed(const coord_def& p) -{ - invalidate_los_around(p); - _handle_los_change(); -} - void los_changed() { invalidate_los(); |