Ignore:
Timestamp:
Nov 12, 2003, 10:18:50 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • libee/ee.h: + Added ee_color_names[] containing our 16 color names.
  • libee/ee.c: + Extended our color set to the full 16 instead of 10. + Precalculate ncurses attributes.
  • libee/graphics.c: + Clip color value in ee_set_color(). + Clip characters in ee_putchar(). + Partially clip characters in ee_putstr(), overflows aren't checked yet.
  • libee/ee_internals.h: + New file to share extern variables within libee.
  • test/demo.c: + Added a simple demo_color() to output all colors. + Replaced four ee_draw_line() with ee_draw_thin_box(). + Replaced x1, y1, x2 etc. with xa, ya, xb etc. because <math.h> already

defines y1.

+ Randomized colours from 0 to 15 instead of 1 to 10.

  • src/Makefiles.am: + Added -lm to the ttyvaders linking flags because of the intro.
  • README BUGS TODO: + Updated.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/libee/ee.h

    r154 r160  
    3232 * Colors
    3333 */
    34 #define EE_BLACK 1
    35 #define EE_GREEN 2
    36 #define EE_YELLOW 3
    37 #define EE_WHITE 4
    38 #define EE_RED 5
    39 #define EE_GRAY 6
    40 #define EE_LIGHTGRAY 7
    41 #define EE_BLUE 8
    42 #define EE_CYAN 9
    43 #define EE_MAGENTA 10
     34enum ee_colors
     35{
     36    EE_BLACK = 0,
     37    EE_BLUE = 1,
     38    EE_GREEN = 2,
     39    EE_CYAN = 3,
     40    EE_RED = 4,
     41    EE_MAGENTA = 5,
     42    EE_BROWN = 6,
     43    EE_LIGHTGRAY = 7,
     44    EE_DARKGRAY = 8,
     45    EE_LIGHTBLUE = 9,
     46    EE_LIGHTGREEN = 10,
     47    EE_LIGHTCYAN = 11,
     48    EE_LIGHTRED = 12,
     49    EE_LIGHTMAGENTA = 13,
     50    EE_YELLOW = 14,
     51    EE_WHITE = 15
     52};
     53
     54extern char *ee_color_names[16];
    4455
    4556/*
Note: See TracChangeset for help on using the changeset viewer.