- else if (!strcmp(dir, "dc"))
- {
- dirs = eye_to_cell_dir_ratio(dir, indent, diff_y, diff_x, 0,0,right);
- }
- else if (!strcmp(dir, "xs"))
- {
- dirs = eye_to_cell_dir_ratio(dir, !indent, diff_y, -diff_x, 0,1,right);
- }
- else if (!strcmp(dir, "cx"))
- {
- dirs = eye_to_cell_dir_ratio(dir, indent, diff_y, diff_x, 1,0,right);
- }
- else if (!strcmp(dir, "sw"))
- {
- dirs = eye_to_cell_dir_ratio(dir, !indent, -diff_y, -diff_x, 0,0,right);
- }
- else if (!strcmp(dir, "ed"))
- {
- dirs = eye_to_cell_dir_ratio(dir, indent, -diff_y, diff_x, 0,1,right);
- }
- else if (!strcmp(dir, "we"))
- {
- dirs = eye_to_cell_dir_ratio(dir, indent, -diff_y, diff_x, 1,1,right);
- }
- return dirs;
-}
-
-
-
-static uint8_t is_top_left_shaded(uint16_t pos_a, uint16_t pos_b,
- int16_t a_y_on_left)
-{
- uint16_t start_last_row = world.map.size.x * (world.map.size.y - 1);
- uint8_t a_on_left_or_bottom = 0 <= a_y_on_left
- || (pos_a >= start_last_row);
- uint8_t b_on_top_or_right = pos_b < world.map.size.x
- || pos_b % world.map.size.x==world.map.size.x-1;
- return pos_a != pos_b && b_on_top_or_right && a_on_left_or_bottom;