Ignore:
Timestamp:
Nov 27, 2009, 12:02:05 PM (13 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Don't draw cube's borders if borders_size==0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/wm.c

    r4049 r4050  
    356356                      int p2x, int p2y,
    357357                      int p3x, int p3y,
    358                       int p4x, int p4y, caca_canvas_t * tex, int color)
     358                      int p4x, int p4y, caca_canvas_t * tex,
     359                      int color, int borders)
    359360{
    360361    if (get_direction(p1x, p1y, p2x, p2y, p3x, p3y) >= 0)
     
    393394#endif
    394395        caca_set_color_ansi(cv, color, CACA_BLACK);
    395         caca_draw_thin_line(cv, p1x, p1y, p2x, p2y);
    396         caca_draw_thin_line(cv, p2x, p2y, p3x, p3y);
    397         caca_draw_thin_line(cv, p3x, p3y, p4x, p4y);
    398         caca_draw_thin_line(cv, p4x, p4y, p1x, p1y);
     396        if (borders)
     397        {
     398            caca_draw_thin_line(cv, p1x, p1y, p2x, p2y);
     399            caca_draw_thin_line(cv, p2x, p2y, p3x, p3y);
     400            caca_draw_thin_line(cv, p3x, p3y, p4x, p4y);
     401            caca_draw_thin_line(cv, p4x, p4y, p1x, p1y);
     402        }
    399403    }
    400404}
     
    487491                      cube_projected[2][0], cube_projected[2][1],
    488492                      cube_projected[3][0], cube_projected[3][1],
    489                       first, CACA_LIGHTGREEN);
     493                      first, CACA_LIGHTGREEN, screen_list->border_size);
    490494
    491495
     
    497501                          cube_projected[6][0], cube_projected[6][1],
    498502                          cube_projected[7][0], cube_projected[7][1],
    499                           second, CACA_RED);
     503                          second, CACA_RED, screen_list->border_size);
    500504            }
    501505            else
     
    506510                          cube_projected[10][0], cube_projected[10][1],
    507511                          cube_projected[11][0], cube_projected[11][1],
    508                           second, CACA_RED);
     512                          second, CACA_RED, screen_list->border_size);
    509513            }
    510514
Note: See TracChangeset for help on using the changeset viewer.