Skip to content

Commit

Permalink
Fix comment diagrams
Browse files Browse the repository at this point in the history
It somehow took me until now to realize that y coordinates are counted
from the "top" of the screen not the bottom.
  • Loading branch information
ifreund committed Jul 9, 2019
1 parent 1e24418 commit 5289562
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions src/shadowcasting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,125 +523,125 @@ void cast_zlight(
{
// Down lateral

// .
// ..
// @..
// ..
// .
cast_horizontal_zlight_segment < 0, 1, 1, 0, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ...
// ..
// @
// ..
// ...
cast_horizontal_zlight_segment < 1, 0, 0, 1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @..
// ..
// .
// ..
// @..
cast_horizontal_zlight_segment < 0, -1, 1, 0, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ...
// ..
// @
// ..
// ...
cast_horizontal_zlight_segment < -1, 0, 0, 1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// .
// ..
// ..@
// ..
// .
cast_horizontal_zlight_segment < 0, 1, -1, 0, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @
// ..
// ...
// ..
// @
cast_horizontal_zlight_segment < 1, 0, 0, -1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ..@
// ..
// .
// ..
// ..@
cast_horizontal_zlight_segment < 0, -1, -1, 0, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @
// ..
// ...
// ..
// @
cast_horizontal_zlight_segment < -1, 0, 0, -1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );

// Up lateral

// .
// ..
// @..
// ..
// .
cast_horizontal_zlight_segment < 0, 1, 1, 0, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ...
// ..
// @
// ..
// ...
cast_horizontal_zlight_segment < 1, 0, 0, 1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @..
// ..
// .
// ..
// @..
cast_horizontal_zlight_segment < 0, -1, 1, 0, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ...
// ..
// @
// ..
// ...
cast_horizontal_zlight_segment < -1, 0, 0, 1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// .
// ..
// ..@
// ..
// .
cast_horizontal_zlight_segment < 0, 1, -1, 0, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @
// ..
// ...
// ..
// @
cast_horizontal_zlight_segment < 1, 0, 0, -1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ..@
// ..
// .
// ..
// ..@
cast_horizontal_zlight_segment < 0, -1, -1, 0, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @
// ..
// ...
// ..
// @
cast_horizontal_zlight_segment < -1, 0, 0, -1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );

// Straight up

// ..
// @.
// ..
cast_vertical_zlight_segment < 1, 1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @.
// ..
// @.
cast_vertical_zlight_segment < 1, -1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ..
// .@
// ..
cast_vertical_zlight_segment < -1, 1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// .@
// ..
// .@
cast_vertical_zlight_segment < -1, -1, 1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );

// Straight down

// ..
// @.
// ..
cast_vertical_zlight_segment < 1, 1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// @.
// ..
// @.
cast_vertical_zlight_segment < 1, -1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// ..
// .@
// ..
cast_vertical_zlight_segment < -1, 1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
// .@
// ..
// .@
cast_vertical_zlight_segment < -1, -1, -1, T, calc, is_transparent, accumulate > (
output_caches, input_arrays, floor_caches, origin, offset_distance, numerator );
}
Expand Down

0 comments on commit 5289562

Please sign in to comment.