home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1991 / 01 / tricks / screen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-05  |  2.9 KB  |  58 lines

  1. /*--------------------------------------------------------*
  2.  *  SCREEN.H                                              *
  3.  *  C-1990 Manfred Birnkott                               *
  4.  *--------------------------------------------------------*/
  5. /*--------------------------------------------------------*
  6.  *  Bildschirm-Attribut zusammensetzen                    *
  7.  *--------------------------------------------------------*/
  8. #define ATTR(fc,bc)              ((int)(fc)|((int)(bc)<<4))
  9. /*--------------------------------------------------------*
  10.  *  Zeichen-Modi setzen                                   *
  11.  *--------------------------------------------------------*/
  12. #define crosslinemode(mode)      CROSSLINEMODE=mode
  13. #define windowmode(mode)         WINDOWMODE=mode
  14. #define shadowmode(mode)         SHADOWMODE=mode
  15. /*--------------------------------------------------------*
  16.  *  Zeichen-Attribute setzen                              *
  17.  *--------------------------------------------------------*/
  18. #define textlineattr(attr)       TEXTLINEATTR=attr
  19. #define shadowattr(attr)         SHADOWATTR=attr
  20. /*--------------------------------------------------------*
  21.  *  Linienstile setzen                                    *
  22.  *--------------------------------------------------------*/
  23. #define framelinestyle(style)    FRAMELINESTYLE=style
  24. #define textlinestyle(style)     TEXTLINESTYLE=style
  25. /*--------------------------------------------------------*
  26.  *  vertikale/horizontale Linie zeichnen (Textmodus)      *
  27.  *--------------------------------------------------------*/
  28. #define drawvline(x,y1,y2)       drawline(x,y1,x,y2)
  29. #define drawhline(y,x1,x2)       drawline(x1,y,x2,y)
  30. /*--------------------------------------------------------*
  31.  *  Prototypen                                            *
  32.  *--------------------------------------------------------*/
  33. void drawline    (int x1, int y1, int x2, int y2);
  34. void drawpolygon (int anz, signed char *coord);
  35. void drawframe   (int x1, int y1, int x2, int y2);
  36. void windowframe (void);
  37. /*--------------------------------------------------------*
  38.  *  Konstanten                                            *
  39.  *--------------------------------------------------------*/
  40. #define LINESTYLE_1  "─│"
  41. #define LINESTYLE_2  "═║"
  42. #define LINESTYLE_3  "═│"
  43. #define LINESTYLE_4  "─║"
  44. #define FRAMESTYLE_1  "┌─┐│┘─└│"
  45. #define FRAMESTYLE_2  "╔═╗║╝═╚║"
  46. #define FRAMESTYLE_3  "╒═╕│╛═╘│"
  47. #define FRAMESTYLE_4  "╓─╖║╜─╙║"
  48. /*--------------------------------------------------------*
  49.  *  Steuer-Größen                                         *
  50.  *--------------------------------------------------------*/
  51. int  CROSSLINEMODE=1;
  52. int  WINDOWMODE=0;
  53. int  SHADOWMODE=0;
  54. int  TEXTLINEATTR=0x71;  /* ATTR(BLUE,LIGHTGRAY)  */
  55. int  SHADOWATTR=0x07;    /* ATTR(LIGHTGRAY,BLACK) */
  56. unsigned char *FRAMELINESTYLE=FRAMESTYLE_1;
  57. unsigned char *TEXTLINESTYLE=LINESTYLE_1;
  58.