home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / powervww / pvdc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-05  |  61.3 KB  |  1,300 lines

  1. //  ____________________________________________________
  2. // |                                                    |
  3. // |  Project:     POWER VIEW INTERFACE                 |
  4. // |  File:        PVDC.CPP                             |
  5. // |  Compiler:    WPP386 (10.6)                        |
  6. // |                                                    |
  7. // |  Subject:     Device Context implementation        |
  8. // |                                                    |
  9. // |  Author:      Emil Dotchevski                      |
  10. // |____________________________________________________|
  11. //
  12. // E-mail: zajo@geocities.com
  13. // URL:    http://www.geocities.com/SiliconValley/Bay/3577
  14.  
  15. #define uses_stdarg
  16. #define uses_stdio
  17. #define uses_malloc
  18. #define uses_string
  19. #define uses_basics
  20. #define uses_conio
  21. #define uses_dc
  22. #define uses_drv
  23. #ifdef HGR
  24. #define uses_hgr
  25. #endif
  26.  
  27. #define DECLARE_PVDC
  28. #include "PVuses.h"
  29. #undef DECLARE_PVDC
  30.  
  31. #define MAX_FORMATTED_LINE_LENGTH 512
  32.  
  33. #ifdef HGR
  34. #ifdef CYR
  35. char graph_chars16[256][16] = {
  36.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  37.   { 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0 },
  38.   { 0x00,0x00,0xF8,0xFC,0xFC,0xFC,0x0C,0x1C,0x3C,0x7C,0xFC,0xFC,0xFC,0xF8,0x00,0x00 },
  39.   { 0x00,0x00,0xF8,0xFC,0xFC,0xFC,0x7C,0x3C,0x1C,0x0C,0xFC,0xFC,0xFC,0xF8,0x00,0x00 },
  40.   { 0x00,0x00,0xF8,0xFC,0x7C,0x3C,0x1C,0xFC,0xFC,0x1C,0x3C,0x7C,0xFC,0xF8,0x00,0x00 },
  41.   { 0x00,0x00,0xF8,0xFC,0x3C,0x0C,0x2C,0x2C,0x2C,0x2C,0xEC,0x0C,0xFC,0xF8,0x00,0x00 },
  42.   { 0x00,0x00,0xF8,0xFC,0xFC,0xFC,0xFC,0x1C,0x1C,0xFC,0xFC,0xFC,0xFC,0xF8,0x00,0x00 },
  43.   { 0x00,0x00,0xF8,0xFC,0xFC,0xBC,0x9C,0x0C,0x0C,0x9C,0xBC,0xFC,0xFC,0xF8,0x00,0x00 },
  44.   { 0x00,0x00,0xF8,0xFC,0x7C,0x7C,0x7C,0x7C,0x7C,0x1C,0x3C,0x7C,0xFC,0xF8,0x00,0x00 },
  45.   { 0x00,0x00,0xF8,0xFC,0x7C,0x3C,0x1C,0x7C,0x7C,0x7C,0x7C,0x7C,0xFC,0xF8,0x00,0x00 },
  46.   { 0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04 },
  47.   { 0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA },
  48.   { 0x00,0x00,0xE0,0x10,0x08,0x04,0x04,0x04,0x04,0x04,0x08,0x10,0xE0,0x00,0x00,0x00 },
  49.   { 0x00,0x00,0xE0,0x10,0x08,0xC4,0xE4,0xE4,0xE4,0xC4,0x08,0x10,0xE0,0x00,0x00,0x00 },
  50.   { 0x00,0x00,0xFC,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xFC,0x00,0x00,0x00 },
  51.   { 0x00,0x00,0xFC,0x04,0x34,0x64,0x64,0xC4,0xC4,0x84,0x84,0x04,0xFC,0x00,0x00,0x00 },
  52.   { 0x00,0x00,0x00,0x00,0xC0,0xF0,0xFC,0xFF,0xFC,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00 },
  53.   { 0x00,0x00,0x00,0x00,0x03,0x0F,0x3F,0xFF,0x3F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00 },
  54.   { 0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xFC,0x00,0xFC,0x00,0xFC,0x00,0x00,0x00,0x00 },
  55.   { 0x00,0x7C,0xD6,0xAA,0xD6,0xAA,0xD6,0x7C,0x00,0x7C,0xD6,0xAA,0xD6,0xAA,0xD6,0x7C },
  56.   { 0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  57.   { 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0 },
  58.   { 0xFF,0xFC,0xF8,0xF0,0xF0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xF0,0xF0,0xF8,0xFC,0xFF },
  59.   { 0x00,0xC0,0xE0,0xF0,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0xF0,0xE0,0xC0,0x00 },
  60.   { 0x00,0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00 },
  61.   { 0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,0x00 },
  62.   { 0x00,0x00,0x00,0x00,0x04,0x06,0xFF,0xFF,0x06,0x04,0x00,0x00,0x00,0x00,0x00,0x00 },
  63.   { 0x00,0x00,0x00,0x00,0x20,0x60,0xFF,0xFF,0x60,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
  64.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  65.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  66.   { 0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00 },
  67.   { 0x00,0x00,0x00,0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00 },
  68.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  69.   { 0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00 },
  70.   { 0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  71.   { 0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00 },
  72.   { 0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00 },
  73.   { 0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,0x00 },
  74.   { 0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  75.   { 0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  76.   { 0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00 },
  77.   { 0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,0x00 },
  78.   { 0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00 },
  79.   { 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00 },
  80.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00 },
  81.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  82.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00 },
  83.   { 0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x00 },
  84.   { 0x00,0x00,0x3C,0x66,0xC3,0xC3,0xDB,0xDB,0xC3,0xC3,0x66,0x3C,0x00,0x00,0x00,0x00 },
  85.   { 0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00 },
  86.   { 0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,0x00 },
  87.   { 0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  88.   { 0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00 },
  89.   { 0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  90.   { 0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  91.   { 0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00 },
  92.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  93.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00 },
  94.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00 },
  95.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00 },
  96.   { 0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00 },
  97.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  98.   { 0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00 },
  99.   { 0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00 },
  100.   { 0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,0x00 },
  101.   { 0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  102.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  103.   { 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00 },
  104.   { 0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00 },
  105.   { 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00 },
  106.   { 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  107.   { 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,0x00 },
  108.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  109.   { 0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  110.   { 0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00 },
  111.   { 0x00,0x00,0xE6,0x66,0x66,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  112.   { 0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00 },
  113.   { 0x00,0x00,0xC3,0xE7,0xFF,0xFF,0xDB,0xC3,0xC3,0xC3,0xC3,0xC3,0x00,0x00,0x00,0x00 },
  114.   { 0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  115.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  116.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  117.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,0x00 },
  118.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  119.   { 0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  120.   { 0x00,0x00,0xFF,0xDB,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  121.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  122.   { 0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0x66,0x3C,0x18,0x00,0x00,0x00,0x00 },
  123.   { 0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x66,0x00,0x00,0x00,0x00 },
  124.   { 0x00,0x00,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x3C,0x66,0xC3,0xC3,0x00,0x00,0x00,0x00 },
  125.   { 0x00,0x00,0xC3,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  126.   { 0x00,0x00,0xFF,0xC3,0x86,0x0C,0x18,0x30,0x60,0xC1,0xC3,0xFF,0x00,0x00,0x00,0x00 },
  127.   { 0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,0x00 },
  128.   { 0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,0x00 },
  129.   { 0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,0x00 },
  130.   { 0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  131.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00 },
  132.   { 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  133.   { 0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  134.   { 0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00 },
  135.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  136.   { 0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  137.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  138.   { 0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  139.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,0x00 },
  140.   { 0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  141.   { 0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  142.   { 0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00 },
  143.   { 0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00 },
  144.   { 0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  145.   { 0x00,0x00,0x00,0x00,0x00,0xEC,0xFE,0xD6,0xD6,0xD6,0xD6,0xD6,0x00,0x00,0x00,0x00 },
  146.   { 0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00 },
  147.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  148.   { 0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00 },
  149.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00 },
  150.   { 0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x66,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  151.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  152.   { 0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00 },
  153.   { 0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  154.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00 },
  155.   { 0x00,0x00,0x00,0x00,0x00,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x00,0x00,0x00,0x00 },
  156.   { 0x00,0x00,0x00,0x00,0x00,0xC3,0x66,0x3C,0x18,0x3C,0x66,0xC3,0x00,0x00,0x00,0x00 },
  157.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00 },
  158.   { 0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00 },
  159.   { 0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00 },
  160.   { 0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00 },
  161.   { 0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00 },
  162.   { 0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  163.   { 0x00,0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0x00,0x00,0x00,0x00,0x00 },
  164.   { 0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  165.   { 0x00,0x00,0xFC,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  166.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  167.   { 0x00,0x00,0xFE,0x66,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  168.   { 0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xFE,0xC6,0x00,0x00,0x00 },
  169.   { 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00 },
  170.   { 0x00,0x00,0xD6,0xD6,0xD6,0xD6,0x7C,0x7C,0xD6,0xD6,0xD6,0xD6,0x00,0x00,0x00,0x00 },
  171.   { 0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  172.   { 0x00,0x00,0xC6,0xC6,0xCE,0xDE,0xFE,0xF6,0xE6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  173.   { 0x38,0x00,0xC6,0xC6,0xCE,0xDE,0xFE,0xF6,0xE6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  174.   { 0x00,0x00,0xE6,0x66,0x66,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  175.   { 0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xC6,0x00,0x00,0x00 },
  176.   { 0x00,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  177.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  178.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  179.   { 0x00,0x00,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  180.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  181.   { 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00 },
  182.   { 0x00,0x00,0xFF,0xDB,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  183.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x7C,0x00,0x00,0x00,0x00 },
  184.   { 0x00,0x10,0x7C,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0x7C,0x10,0x00,0x00,0x00 },
  185.   { 0x00,0x00,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x3C,0x66,0xC3,0xC3,0x00,0x00,0x00,0x00 },
  186.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7F,0x03,0x00,0x00,0x00 },
  187.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00 },
  188.   { 0x00,0x00,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xFE,0x00,0x00,0x00,0x00 },
  189.   { 0x00,0x00,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xFF,0x03,0x00,0x00,0x00 },
  190.   { 0x00,0x00,0xE0,0x60,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  191.   { 0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xF3,0xCB,0xCB,0xCB,0xCB,0xF3,0x00,0x00,0x00,0x00 },
  192.   { 0x00,0x00,0x60,0x60,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00 },
  193.   { 0x00,0x00,0x78,0xCC,0x86,0x06,0x3E,0x06,0x06,0x86,0xCC,0x78,0x00,0x00,0x00,0x00 },
  194.   { 0x00,0x00,0xCE,0xDB,0xDB,0xDB,0xFB,0xFB,0xDB,0xDB,0xDB,0xCE,0x00,0x00,0x00,0x00 },
  195.   { 0x00,0x00,0x7E,0xCC,0xCC,0xCC,0x7C,0x6C,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0x00,0x00 },
  196.   { 0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  197.   { 0x00,0x00,0x00,0x06,0x3C,0x60,0x6E,0x76,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  198.   { 0x00,0x00,0x00,0x00,0x00,0xF8,0x6C,0x6C,0x7C,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  199.   { 0x00,0x00,0x00,0x00,0x00,0xFE,0x66,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  200.   { 0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0xFE,0xC6,0x00,0x00,0x00 },
  201.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  202.   { 0x00,0x00,0x00,0x00,0x00,0xD6,0xD6,0xD6,0x7C,0xD6,0xD6,0xD6,0x00,0x00,0x00,0x00 },
  203.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x06,0x3C,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  204.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xCE,0xDE,0xFE,0xF6,0xE6,0xC6,0x00,0x00,0x00,0x00 },
  205.   { 0x00,0x00,0x00,0x38,0x00,0xC6,0xCE,0xDE,0xFE,0xF6,0xE6,0xC6,0x00,0x00,0x00,0x00 },
  206.   { 0x00,0x00,0x00,0x00,0x00,0xE6,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00 },
  207.   { 0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0xC6,0x00,0x00,0x00,0x00 },
  208.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  209.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  210.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  211.   { 0x00,0x00,0x00,0x00,0x00,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  212.   { 0x00,0x00,0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0xF0,0x00,0x00,0x00,0x00 },
  213.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  214.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0x5A,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00 },
  215.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x7C,0x00,0x00,0x00,0x00 },
  216.   { 0x00,0x00,0x00,0x00,0x10,0x7C,0xD6,0xD6,0xD6,0xD6,0xD6,0x7C,0x10,0x00,0x00,0x00 },
  217.   { 0x00,0x00,0x00,0x00,0x00,0xC3,0x66,0x3C,0x18,0x3C,0x66,0xC3,0x00,0x00,0x00,0x00 },
  218.   { 0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x7E,0x06,0x00,0x00,0x00 },
  219.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x00,0x00,0x00,0x00 },
  220.   { 0x00,0x00,0x00,0x00,0x00,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xFE,0x00,0x00,0x00,0x00 },
  221.   { 0x00,0x00,0x00,0x00,0x00,0xD6,0xD6,0xD6,0xD6,0xD6,0xD6,0xFF,0x03,0x00,0x00,0x00 },
  222.   { 0x00,0x00,0x00,0x00,0x00,0xE0,0x60,0x7C,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  223.   { 0x00,0x00,0x00,0x00,0x00,0xC2,0xC2,0xF2,0xCA,0xCA,0xCA,0xF2,0x00,0x00,0x00,0x00 },
  224.   { 0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00 },
  225.   { 0x00,0x00,0x00,0x00,0x00,0x78,0xCC,0x06,0x3E,0x06,0xCC,0x78,0x00,0x00,0x00,0x00 },
  226.   { 0x00,0x00,0x00,0x00,0x00,0xCC,0xD6,0xD6,0xF6,0xD6,0xD6,0xCC,0x00,0x00,0x00,0x00 },
  227.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0xCC,0xCC,0x7C,0x6C,0xCC,0xCE,0x00,0x00,0x00,0x00 },
  228.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  229.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC0,0xCF,0xC7,0xC3,0xC1,0xC0,0xC0,0xC0,0xE0,0xFF,0xFF },
  230.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC0,0xC1,0xC3,0xC7,0xCF,0xC0,0xC0,0xC0,0xE0,0xFF,0xFF },
  231.   { 0xFF,0xFF,0xE0,0xC0,0xC1,0xC3,0xC7,0xC0,0xC0,0xC7,0xC3,0xC1,0xC0,0xE0,0xFF,0xFF },
  232.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  233.   { 0xFF,0xFF,0xE0,0xC0,0xCF,0xCF,0xCF,0xCF,0xCF,0xCF,0xC2,0xC3,0xC0,0xE0,0xFF,0xFF },
  234.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC0,0xC0,0xC7,0xC7,0xC0,0xC0,0xC0,0xC0,0xE0,0xFF,0xFF },
  235.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC2,0xC6,0xCF,0xCF,0xC6,0xC2,0xC0,0xC0,0xE0,0xFF,0xFF },
  236.   { 0xFF,0xFF,0xE0,0xC0,0xC1,0xC1,0xC1,0xC1,0xC1,0xC7,0xC3,0xC1,0xC0,0xE0,0xFF,0xFF },
  237.   { 0xFF,0xFF,0xE0,0xC0,0xC1,0xC3,0xC7,0xC1,0xC1,0xC1,0xC1,0xC1,0xC0,0xE0,0xFF,0xFF },
  238.   { 0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF },
  239.   { 0xFF,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x00,0xFF },
  240.   { 0x00,0x00,0x07,0x08,0x10,0x20,0x20,0x20,0x20,0x20,0x10,0x08,0x07,0x00,0x00,0x00 },
  241.   { 0x00,0x00,0x07,0x08,0x10,0x23,0x27,0x27,0x27,0x23,0x10,0x08,0x07,0x00,0x00,0x00 },
  242.   { 0x00,0x00,0x3F,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3F,0x00,0x00,0x00 },
  243.   { 0x00,0x00,0x3F,0x20,0x20,0x20,0x20,0x2C,0x26,0x23,0x21,0x20,0x3F,0x00,0x00,0x00 },
  244.   { 0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00 },
  245.   { 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  246.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF },
  247.   { 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF },
  248.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0 },
  249.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03 },
  250.   { 0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0 },
  251.   { 0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03 },
  252.   { 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFF },
  253.   { 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xFF },
  254.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  255.   { 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03 },
  256.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF },
  257.   { 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0 },
  258.   { 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F },
  259.   { 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  260.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0xD8,0xD8,0xD8,0xDC,0x76,0x00,0x00,0x00,0x00 },
  261.   { 0x00,0x00,0x78,0xCC,0xCC,0xCC,0xD8,0xCC,0xC6,0xC6,0xC6,0xCC,0x00,0x00,0x00,0x00 },
  262.   { 0x00,0x00,0xFE,0xC6,0xC6,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00 },
  263.   { 0x00,0x00,0x00,0x00,0xFE,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00 },
  264.   { 0x00,0x00,0x00,0xFE,0xC6,0x60,0x30,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00 },
  265.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0xD8,0xD8,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00 },
  266.   { 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xC0,0x00,0x00,0x00 },
  267.   { 0x00,0x00,0x00,0x00,0x76,0xDC,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00 },
  268.   { 0x00,0x00,0x00,0x7E,0x18,0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00 },
  269.   { 0x00,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00 },
  270.   { 0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x6C,0x6C,0x6C,0xEE,0x00,0x00,0x00,0x00 },
  271.   { 0x00,0x00,0x1E,0x30,0x18,0x0C,0x3E,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00 },
  272.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0xDB,0xDB,0xDB,0x7E,0x00,0x00,0x00,0x00,0x00,0x00 },
  273.   { 0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00,0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00 },
  274.   { 0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  275.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00,0x00 },
  276.   { 0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00 },
  277.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0xFF,0x00,0x00,0x00,0x00 },
  278.   { 0x00,0x00,0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00,0x7E,0x00,0x00,0x00,0x00 },
  279.   { 0x00,0x00,0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00,0x7E,0x00,0x00,0x00,0x00 },
  280.   { 0x00,0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  281.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00 },
  282.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7E,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00 },
  283.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00 },
  284.   { 0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  285.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  286.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00 },
  287.   { 0x00,0x01,0x03,0x02,0x06,0x04,0x0C,0x88,0xD8,0x50,0x70,0x20,0x00,0x00,0x00,0x00 },
  288.   { 0x00,0xD8,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  289.   { 0x00,0x70,0xD8,0x30,0x60,0xC8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  290.   { 0x00,0x00,0x00,0x00,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x00,0x00,0x00,0x00,0x00 },
  291.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
  292. };
  293. #else //CYR
  294. char graph_chars16[256][16] = {
  295.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  296.   { 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0 },
  297.   { 0x00,0x00,0xF8,0xFC,0xFC,0xFC,0x0C,0x1C,0x3C,0x7C,0xFC,0xFC,0xFC,0xF8,0x00,0x00 },
  298.   { 0x00,0x00,0xF8,0xFC,0xFC,0xFC,0x7C,0x3C,0x1C,0x0C,0xFC,0xFC,0xFC,0xF8,0x00,0x00 },
  299.   { 0x00,0x00,0xF8,0xFC,0x7C,0x3C,0x1C,0xFC,0xFC,0x1C,0x3C,0x7C,0xFC,0xF8,0x00,0x00 },
  300.   { 0x00,0x00,0xF8,0xFC,0x3C,0x0C,0x2C,0x2C,0x2C,0x2C,0xEC,0x0C,0xFC,0xF8,0x00,0x00 },
  301.   { 0x00,0x00,0xF8,0xFC,0xFC,0xFC,0xFC,0x1C,0x1C,0xFC,0xFC,0xFC,0xFC,0xF8,0x00,0x00 },
  302.   { 0x00,0x00,0xF8,0xFC,0xFC,0xBC,0x9C,0x0C,0x0C,0x9C,0xBC,0xFC,0xFC,0xF8,0x00,0x00 },
  303.   { 0x00,0x00,0xF8,0xFC,0x7C,0x7C,0x7C,0x7C,0x7C,0x1C,0x3C,0x7C,0xFC,0xF8,0x00,0x00 },
  304.   { 0x00,0x00,0xF8,0xFC,0x7C,0x3C,0x1C,0x7C,0x7C,0x7C,0x7C,0x7C,0xFC,0xF8,0x00,0x00 },
  305.   { 0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04,0xFC,0x04 },
  306.   { 0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA },
  307.   { 0x00,0x00,0xE0,0x10,0x08,0x04,0x04,0x04,0x04,0x04,0x08,0x10,0xE0,0x00,0x00,0x00 },
  308.   { 0x00,0x00,0xE0,0x10,0x08,0xC4,0xE4,0xE4,0xE4,0xC4,0x08,0x10,0xE0,0x00,0x00,0x00 },
  309.   { 0x00,0x00,0xFC,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xFC,0x00,0x00,0x00 },
  310.   { 0x00,0x00,0xFC,0x04,0x34,0x64,0x64,0xC4,0xC4,0x84,0x84,0x04,0xFC,0x00,0x00,0x00 },
  311.   { 0x00,0x00,0x00,0x00,0xC0,0xF0,0xFC,0xFF,0xFC,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00 },
  312.   { 0x00,0x00,0x00,0x00,0x03,0x0F,0x3F,0xFF,0x3F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00 },
  313.   { 0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xFC,0x00,0xFC,0x00,0xFC,0x00,0x00,0x00,0x00 },
  314.   { 0x00,0x7C,0xD6,0xAA,0xD6,0xAA,0xD6,0x7C,0x00,0x7C,0xD6,0xAA,0xD6,0xAA,0xD6,0x7C },
  315.   { 0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  316.   { 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0 },
  317.   { 0xFF,0xFC,0xF8,0xF0,0xF0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xF0,0xF0,0xF8,0xFC,0xFF },
  318.   { 0x00,0xC0,0xE0,0xF0,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0xF0,0xE0,0xC0,0x00 },
  319.   { 0x00,0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00 },
  320.   { 0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,0x00 },
  321.   { 0x00,0x00,0x00,0x00,0x04,0x06,0xFF,0xFF,0x06,0x04,0x00,0x00,0x00,0x00,0x00,0x00 },
  322.   { 0x00,0x00,0x00,0x00,0x20,0x60,0xFF,0xFF,0x60,0x20,0x00,0x00,0x00,0x00,0x00,0x00 },
  323.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  324.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  325.   { 0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00 },
  326.   { 0x00,0x00,0x00,0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00 },
  327.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  328.   { 0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00 },
  329.   { 0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  330.   { 0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00 },
  331.   { 0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00 },
  332.   { 0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,0x00 },
  333.   { 0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  334.   { 0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  335.   { 0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00 },
  336.   { 0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,0x00 },
  337.   { 0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00 },
  338.   { 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00 },
  339.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00 },
  340.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  341.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00 },
  342.   { 0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x00 },
  343.   { 0x00,0x00,0x3C,0x66,0xC3,0xC3,0xDB,0xDB,0xC3,0xC3,0x66,0x3C,0x00,0x00,0x00,0x00 },
  344.   { 0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00 },
  345.   { 0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,0x00 },
  346.   { 0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  347.   { 0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00 },
  348.   { 0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  349.   { 0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  350.   { 0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00 },
  351.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  352.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00 },
  353.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00 },
  354.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00 },
  355.   { 0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00 },
  356.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  357.   { 0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00 },
  358.   { 0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00 },
  359.   { 0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,0x00 },
  360.   { 0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  361.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00 },
  362.   { 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00 },
  363.   { 0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00 },
  364.   { 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00 },
  365.   { 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  366.   { 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,0x00 },
  367.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  368.   { 0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  369.   { 0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00 },
  370.   { 0x00,0x00,0xE6,0x66,0x66,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  371.   { 0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00 },
  372.   { 0x00,0x00,0xC3,0xE7,0xFF,0xFF,0xDB,0xC3,0xC3,0xC3,0xC3,0xC3,0x00,0x00,0x00,0x00 },
  373.   { 0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  374.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  375.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  376.   { 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,0x00 },
  377.   { 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  378.   { 0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  379.   { 0x00,0x00,0xFF,0xDB,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  380.   { 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  381.   { 0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0x66,0x3C,0x18,0x00,0x00,0x00,0x00 },
  382.   { 0x00,0x00,0xC3,0xC3,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x66,0x00,0x00,0x00,0x00 },
  383.   { 0x00,0x00,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x3C,0x66,0xC3,0xC3,0x00,0x00,0x00,0x00 },
  384.   { 0x00,0x00,0xC3,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  385.   { 0x00,0x00,0xFF,0xC3,0x86,0x0C,0x18,0x30,0x60,0xC1,0xC3,0xFF,0x00,0x00,0x00,0x00 },
  386.   { 0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,0x00 },
  387.   { 0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,0x00 },
  388.   { 0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,0x00 },
  389.   { 0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  390.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00 },
  391.   { 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  392.   { 0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  393.   { 0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00 },
  394.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  395.   { 0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  396.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  397.   { 0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  398.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,0x00 },
  399.   { 0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00 },
  400.   { 0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  401.   { 0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00 },
  402.   { 0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00 },
  403.   { 0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  404.   { 0x00,0x00,0x00,0x00,0x00,0xEC,0xFE,0xD6,0xD6,0xD6,0xD6,0xD6,0x00,0x00,0x00,0x00 },
  405.   { 0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00 },
  406.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  407.   { 0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00 },
  408.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00 },
  409.   { 0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x66,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00 },
  410.   { 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  411.   { 0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00 },
  412.   { 0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  413.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00 },
  414.   { 0x00,0x00,0x00,0x00,0x00,0xC3,0xC3,0xC3,0xDB,0xDB,0xFF,0x66,0x00,0x00,0x00,0x00 },
  415.   { 0x00,0x00,0x00,0x00,0x00,0xC3,0x66,0x3C,0x18,0x3C,0x66,0xC3,0x00,0x00,0x00,0x00 },
  416.   { 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00 },
  417.   { 0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00 },
  418.   { 0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00 },
  419.   { 0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00 },
  420.   { 0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00 },
  421.   { 0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  422.   { 0x00,0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0x00,0x00,0x00,0x00,0x00 },
  423.   { 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x0C,0x06,0x7C,0x00,0x00 },
  424.   { 0x00,0x00,0xCC,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  425.   { 0x00,0x0C,0x18,0x30,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  426.   { 0x00,0x10,0x38,0x6C,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  427.   { 0x00,0x00,0xCC,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  428.   { 0x00,0x60,0x30,0x18,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  429.   { 0x00,0x38,0x6C,0x38,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  430.   { 0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x0C,0x06,0x3C,0x00,0x00,0x00 },
  431.   { 0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  432.   { 0x00,0x00,0xC6,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  433.   { 0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  434.   { 0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  435.   { 0x00,0x18,0x3C,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  436.   { 0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  437.   { 0x00,0xC6,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  438.   { 0x38,0x6C,0x38,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  439.   { 0x18,0x30,0x60,0x00,0xFE,0x66,0x60,0x7C,0x60,0x60,0x66,0xFE,0x00,0x00,0x00,0x00 },
  440.   { 0x00,0x00,0x00,0x00,0x00,0x6E,0x3B,0x1B,0x7E,0xD8,0xDC,0x77,0x00,0x00,0x00,0x00 },
  441.   { 0x00,0x00,0x3E,0x6C,0xCC,0xCC,0xFE,0xCC,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0x00,0x00 },
  442.   { 0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  443.   { 0x00,0x00,0xC6,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  444.   { 0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  445.   { 0x00,0x30,0x78,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  446.   { 0x00,0x60,0x30,0x18,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  447.   { 0x00,0x00,0xC6,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00 },
  448.   { 0x00,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  449.   { 0x00,0xC6,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  450.   { 0x00,0x18,0x18,0x7E,0xC3,0xC0,0xC0,0xC0,0xC3,0x7E,0x18,0x18,0x00,0x00,0x00,0x00 },
  451.   { 0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xE6,0xFC,0x00,0x00,0x00,0x00 },
  452.   { 0x00,0x00,0xC3,0x66,0x3C,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x00,0x00,0x00,0x00 },
  453.   { 0x00,0xFC,0x66,0x66,0x7C,0x62,0x66,0x6F,0x66,0x66,0x66,0xF3,0x00,0x00,0x00,0x00 },
  454.   { 0x00,0x0E,0x1B,0x18,0x18,0x18,0x7E,0x18,0x18,0x18,0x18,0x18,0xD8,0x70,0x00,0x00 },
  455.   { 0x00,0x18,0x30,0x60,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  456.   { 0x00,0x0C,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00 },
  457.   { 0x00,0x18,0x30,0x60,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  458.   { 0x00,0x18,0x30,0x60,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00 },
  459.   { 0x00,0x00,0x76,0xDC,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00 },
  460.   { 0x76,0xDC,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00 },
  461.   { 0x00,0x3C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  462.   { 0x00,0x38,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  463.   { 0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xC0,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00 },
  464.   { 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00 },
  465.   { 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00 },
  466.   { 0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x60,0xCE,0x9B,0x06,0x0C,0x1F,0x00,0x00 },
  467.   { 0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x66,0xCE,0x96,0x3E,0x06,0x06,0x00,0x00 },
  468.   { 0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3C,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00 },
  469.   { 0x00,0x00,0x00,0x00,0x00,0x36,0x6C,0xD8,0x6C,0x36,0x00,0x00,0x00,0x00,0x00,0x00 },
  470.   { 0x00,0x00,0x00,0x00,0x00,0xD8,0x6C,0x36,0x6C,0xD8,0x00,0x00,0x00,0x00,0x00,0x00 },
  471.   { 0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44 },
  472.   { 0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA },
  473.   { 0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77 },
  474.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  475.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  476.   { 0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  477.   { 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36 },
  478.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36 },
  479.   { 0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  480.   { 0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36 },
  481.   { 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36 },
  482.   { 0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36 },
  483.   { 0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  484.   { 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  485.   { 0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  486.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  487.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  488.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC0,0xCF,0xC7,0xC3,0xC1,0xC0,0xC0,0xC0,0xE0,0xFF,0xFF },
  489.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC0,0xC1,0xC3,0xC7,0xCF,0xC0,0xC0,0xC0,0xE0,0xFF,0xFF },
  490.   { 0xFF,0xFF,0xE0,0xC0,0xC1,0xC3,0xC7,0xC0,0xC0,0xC7,0xC3,0xC1,0xC0,0xE0,0xFF,0xFF },
  491.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  492.   { 0xFF,0xFF,0xE0,0xC0,0xCF,0xCF,0xCF,0xCF,0xCF,0xCF,0xC2,0xC3,0xC0,0xE0,0xFF,0xFF },
  493.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC0,0xC0,0xC7,0xC7,0xC0,0xC0,0xC0,0xC0,0xE0,0xFF,0xFF },
  494.   { 0xFF,0xFF,0xE0,0xC0,0xC0,0xC2,0xC6,0xCF,0xCF,0xC6,0xC2,0xC0,0xC0,0xE0,0xFF,0xFF },
  495.   { 0xFF,0xFF,0xE0,0xC0,0xC1,0xC1,0xC1,0xC1,0xC1,0xC7,0xC3,0xC1,0xC0,0xE0,0xFF,0xFF },
  496.   { 0xFF,0xFF,0xE0,0xC0,0xC1,0xC3,0xC7,0xC1,0xC1,0xC1,0xC1,0xC1,0xC0,0xE0,0xFF,0xFF },
  497.   { 0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF,0xC0,0xDF },
  498.   { 0xFF,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x00,0xFF },
  499.   { 0x00,0x00,0x07,0x08,0x10,0x20,0x20,0x20,0x20,0x20,0x10,0x08,0x07,0x00,0x00,0x00 },
  500.   { 0x00,0x00,0x07,0x08,0x10,0x23,0x27,0x27,0x27,0x23,0x10,0x08,0x07,0x00,0x00,0x00 },
  501.   { 0x00,0x00,0x3F,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3F,0x00,0x00,0x00 },
  502.   { 0x00,0x00,0x3F,0x20,0x20,0x20,0x20,0x2C,0x26,0x23,0x21,0x20,0x3F,0x00,0x00,0x00 },
  503.   { 0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00 },
  504.   { 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  505.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF },
  506.   { 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF },
  507.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0 },
  508.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03 },
  509.   { 0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0 },
  510.   { 0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03 },
  511.   { 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFF },
  512.   { 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xFF },
  513.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  514.   { 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03 },
  515.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF },
  516.   { 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0 },
  517.   { 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F },
  518.   { 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  519.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0xD8,0xD8,0xD8,0xDC,0x76,0x00,0x00,0x00,0x00 },
  520.   { 0x00,0x00,0x78,0xCC,0xCC,0xCC,0xD8,0xCC,0xC6,0xC6,0xC6,0xCC,0x00,0x00,0x00,0x00 },
  521.   { 0x00,0x00,0xFE,0xC6,0xC6,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00 },
  522.   { 0x00,0x00,0x00,0x00,0xFE,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00 },
  523.   { 0x00,0x00,0x00,0xFE,0xC6,0x60,0x30,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00 },
  524.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0xD8,0xD8,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00 },
  525.   { 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xC0,0x00,0x00,0x00 },
  526.   { 0x00,0x00,0x00,0x00,0x76,0xDC,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00 },
  527.   { 0x00,0x00,0x00,0x7E,0x18,0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00 },
  528.   { 0x00,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00 },
  529.   { 0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x6C,0x6C,0x6C,0xEE,0x00,0x00,0x00,0x00 },
  530.   { 0x00,0x00,0x1E,0x30,0x18,0x0C,0x3E,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00 },
  531.   { 0x00,0x00,0x00,0x00,0x00,0x7E,0xDB,0xDB,0xDB,0x7E,0x00,0x00,0x00,0x00,0x00,0x00 },
  532.   { 0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00,0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00 },
  533.   { 0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  534.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x00,0x00 },
  535.   { 0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00 },
  536.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0xFF,0x00,0x00,0x00,0x00 },
  537.   { 0x00,0x00,0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00,0x7E,0x00,0x00,0x00,0x00 },
  538.   { 0x00,0x00,0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00,0x7E,0x00,0x00,0x00,0x00 },
  539.   { 0x00,0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 },
  540.   { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00 },
  541.   { 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7E,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00 },
  542.   { 0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00 },
  543.   { 0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  544.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  545.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00 },
  546.   { 0x00,0x01,0x03,0x02,0x06,0x04,0x0C,0x88,0xD8,0x50,0x70,0x20,0x00,0x00,0x00,0x00 },
  547.   { 0x00,0xD8,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  548.   { 0x00,0x70,0xD8,0x30,0x60,0xC8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
  549.   { 0x00,0x00,0x00,0x00,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x00,0x00,0x00,0x00,0x00 },
  550.   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
  551. };
  552. #endif //CYR
  553. #endif //HGR
  554.  
  555. static Tscreen_mode_proc old_mode_proc;
  556. #ifdef HGR
  557. static int blink_handle         = -1;
  558. static boolean blink_state        = 0;
  559. static int hgr_cursor_x         = 0;
  560. static int hgr_cursor_y         = 0;
  561. static Tcursor *hgr_cursor        = &no_cursor;
  562. #endif
  563.  
  564.  
  565. //DC
  566.  
  567. Tdc::Tdc( void ):
  568.   xl( 0 ),
  569.   yl( 0 ),
  570.   len( 0 ),
  571.   address( NULL ),
  572.   region_x( 0 ),
  573.   region_y( 0 ),
  574.   region_xl( 0 ),
  575.   region_yl( 0 ),
  576.   region_x1( region_x ),
  577.   region_y1( region_y ),
  578.   region_x2( 0 ),
  579.   region_y2( 0 ),
  580.   base_x( 0 ),
  581.   base_y( 0 ),
  582.   cursor_x( 0 ),
  583.   cursor_y( 0 ),
  584.   cursor_ofs( 0 )
  585. {
  586. }
  587.  
  588. Tdc::Tdc( uint _xl, uint _yl ):
  589.   region_x1( region_x ),
  590.   region_y1( region_y )
  591. {
  592.   xl = _xl; yl = _yl;
  593.   len = ( _xl * _yl ) << 1;
  594.   address = ( (word *) MALLOC( len ) );
  595.   region_x = region_y = 0;
  596.   region_xl = _xl;
  597.   region_yl = _yl;
  598.   region_x2 = _xl - 1;
  599.   region_y2 = _yl - 1;
  600.   base_x = base_y = cursor_x = cursor_y = cursor_ofs = 0;
  601. }
  602.  
  603. Tdc::~Tdc( void )
  604. {
  605.   if( address != NULL ) FREE( address );
  606. }
  607.  
  608. void Tdc::set_region( int _x, int _y, uint _xl, uint _yl )
  609. {
  610.   region_x = _x;
  611.   region_y = _y;
  612.   region_xl = _xl;
  613.   region_yl = _yl;
  614.   region_x2 = _x + _xl - 1;
  615.   region_y2 = _y + _yl - 1;
  616. }
  617.  
  618. void Tdc::set_region_xy( int x1, int y1, int x2, int y2 )
  619. {
  620.   region_x1 = x1;
  621.   region_y1 = y1;
  622.   region_x2 = x2;
  623.   region_y2 = y2;
  624.   region_xl = x2 - x1 + 1;
  625.   region_yl = y2 - y1 + 1;
  626. }
  627.  
  628. void Tdc::invalidate( int _x, int _y, uint _xl, uint _yl )
  629. {
  630.   invalidate_xy( _x, _y, (int) ( _x + _xl - 1 ), (int) ( _y + _yl - 1 ) );
  631. }
  632.  
  633. void Tdc::invalidate_xy( int x1, int y1, int x2, int y2 )
  634. {
  635.   if( x1 < x ) x1 = x;
  636.   if( y1 < y ) y1 = y;
  637.   if( x2 >= x+xl ) x2 = x+xl-1;
  638.   if( y2 >= y+yl ) y2 = y+yl-1;
  639.   if( x1 < region_x1 ) region_x1 = x1;
  640.   if( x2 > region_x2 ) region_x2 = x2;
  641.   if( y1 < region_y1 ) region_y1 = y1;
  642.   if( y2 > region_y2 ) region_y2 = y2;
  643.   region_xl = region_x2 - region_x1 + 1;
  644.   region_yl = region_y2 - region_y1 + 1;
  645. }
  646.  
  647. void Tdc::validate( void )
  648. {
  649.   set_region_xy( 1000, 1000, -1000, -1000 );
  650. }
  651.  
  652. void Tdc::goto_xy( int _x, int _y )
  653. {
  654.   cursor_x = base_x + _x;
  655.   cursor_y = base_y + _y;
  656.   cursor_ofs = ( cursor_y * xl + cursor_x ) << 1;
  657. }
  658.  
  659. void Tdc::goto_ofs( uint cur_ofs )
  660. {
  661.   cursor_ofs = cur_ofs;
  662.   cursor_x = cur_ofs % xl;
  663.   cursor_y = cur_ofs / xl;
  664. }
  665.  
  666. int Tdc::where_x( void )
  667. {
  668.   return cursor_x - base_x;
  669. }
  670.  
  671. int Tdc::where_y( void )
  672. {
  673.   return cursor_y - base_y;
  674. }
  675.  
  676. void Tdc::set_base( int _x, int _y )
  677. {
  678.   base_x = _x;
  679.   base_y = _y;
  680.   goto_xy( 0, 0 );
  681. }
  682.  
  683. void Tdc::home( void )
  684. {
  685.   fill_dc(' ');
  686. }
  687.  
  688. void Tdc::fill_dc( char c )
  689. {
  690.   static char t[] = "|r. |l.";
  691.  
  692.   set_base( 0, 0 );
  693.   t[2] = (char) xl; t[3] = c; t[6] = (char) yl;
  694.   txt( t );
  695.   set_base( 0, 0 );
  696. }
  697.  
  698. void Tdc::print( word *p, int l )
  699. {
  700.   int n;
  701.  
  702.   if( !l ) return;
  703.   if( ( ( cursor_y < 0 ) || ( cursor_y < region_y ) ) ||
  704.         ( cursor_y >= yl ) || ( cursor_y > region_y2 ) )  goto done;
  705.   n = -cursor_x;
  706.   if( region_x > 0 ) n += region_x;
  707.   if( n > 0 )
  708.   {
  709.     if( n >= l ) goto done;
  710.     p += n;
  711.     l -= n;
  712.     cursor_x += n;
  713.     cursor_ofs += ( n << 1 );
  714.   }
  715.   n =  xl-1;
  716.   if( region_x2 <= n ) n = region_x2;
  717.   if( ( n -= ( cursor_x + l - 1 ) ) < 0 )
  718.   {
  719.     if( n <= -l )  goto done;
  720.     l += n;
  721.   }
  722.   memcpy( (char *) address + cursor_ofs, p, l << 1 );
  723. done:
  724.   cursor_x += l;
  725.   cursor_ofs += ( l << 1 );
  726. }
  727.  
  728. void Tdc::direct_txt( char *t )
  729. {
  730.   word k;
  731.   word *p;
  732.   uint l;
  733.   word buffer[MAX_FORMATTED_LINE_LENGTH];
  734.  
  735.   hi( k ) = text_attr;
  736.   p = buffer; l = 0;
  737.   while( ( lo(k) = *t++ ) != 0 )
  738.   {
  739.     *p++ = k;
  740.     l++;
  741.   }
  742.   print( buffer, l );
  743. }
  744.  
  745. void Tdc::txt( char *t )
  746. {
  747.   char c;
  748.   word k;
  749.   word *p;
  750.   uint l;
  751.   word buffer[MAX_FORMATTED_LINE_LENGTH];
  752.  
  753.   hi( k ) = text_attr;
  754.   p = buffer; l = 0;
  755.   loop:
  756.     while( ( ( lo(k) = *t++ ) != 0 ) && ( lo(k) != '|' ) )
  757.       *(p++) = k, l++;
  758.     if( lo( k ) == 0 ) goto done;
  759.     c = *t++;
  760.     if( c == '|' )
  761.     {
  762.       *(p++) = k, l++;
  763.       goto loop;
  764.     }
  765.     if( c == 'r' )
  766.     {
  767.       uint cnt = *(t++) + 1;
  768.       lo(k) = *(t++);
  769.       while( --cnt )
  770.         l++, *p++ = k;
  771.       goto loop;
  772.     }
  773.     if( c == 'l' )
  774.     {
  775.       uint cnt = *(t++) + 1;
  776.       while( --cnt )
  777.       {
  778.         print( buffer, l );
  779.         cursor_ofs += ( xl - ( cursor_x - base_x ) ) << 1;
  780.         cursor_x = base_x;
  781.         cursor_y++;
  782.       }
  783.       p = buffer; l = 0;
  784.       goto loop;
  785.     }
  786.     if( c == 'n' )
  787.     {
  788.       print( buffer, l );
  789.       cursor_ofs += ( xl - ( cursor_x - base_x ) ) << 1;
  790.       cursor_x = base_x;
  791.       cursor_y++;
  792.       p = buffer; l = 0;
  793.       goto loop;
  794.     }
  795.     if( c == '~' )
  796.     {
  797.       if( !shortcut_attr ) goto loop;
  798.       lo( *p ) = *t++;
  799.       hi( *p ) = (char) ( ( hi( k ) & 0xF0 ) | shortcut_attr );
  800.       p++;
  801.       l++;
  802.       goto loop;
  803.     }
  804.     if( c == 'i' )
  805.     {
  806.       hi(k) = rolb( hi(k), 4 );
  807.       goto loop;
  808.     }
  809.     if( c == 't' )
  810.     {
  811.       hi( k ) = text_attr;
  812.       goto loop;
  813.     }
  814.     if( c == 'b' )
  815.     {
  816.       hi( k ) = bold_attr;
  817.       goto loop;
  818.     }
  819.     if( c == 's' )
  820.     {
  821.       hi( k ) = selected_attr;
  822.       goto loop;
  823.     }
  824.     if( c == 'd' )
  825.     {
  826.       hi( k ) = disabled_attr;
  827.       goto loop;
  828.     }
  829.     if( ( ( c -= '0' ) >= 0 ) && ( c <= 9 ) )
  830.     {
  831.       hi( k ) = attr[c];
  832.       goto loop;
  833.     }
  834.   goto loop;
  835. done:
  836.   print( buffer, l );
  837. }
  838.  
  839. void Tdc::direct_txtf( char *t, ... )
  840. {
  841.   char buffer[MAX_FORMATTED_LINE_LENGTH];
  842.   va_list argptr;
  843.  
  844.   va_start( argptr, t );
  845.   vsprintf( buffer, t, argptr );
  846.   va_end( argptr );
  847.   direct_txt( buffer );
  848. }
  849.  
  850. void Tdc::txtf( char *t, ... )
  851. {
  852.   char buffer[MAX_FORMATTED_LINE_LENGTH];
  853.   va_list argptr;
  854.  
  855.   va_start( argptr, t );
  856.   vsprintf( buffer, t, argptr );
  857.   va_end( argptr );
  858.   txt( buffer );
  859. }
  860.  
  861. void Tdc::draw( void )
  862. {
  863.   uint co, i;
  864.   word *p;
  865.   int cx;
  866.  
  867.   p = address;
  868.   current_dc->set_base( x - current_dc->x, y - current_dc->y );
  869.   cx = current_dc->cursor_x;
  870.   for( i = 0; i < yl; i++ )
  871.   {
  872.     co = current_dc->cursor_ofs;
  873.     current_dc->print( p, xl );
  874.     current_dc->cursor_y++;
  875.     current_dc->cursor_x = cx;
  876.     current_dc->cursor_ofs = co + ( current_dc->xl << 1 );
  877.     p += xl;
  878.   }
  879. }
  880.  
  881. //SCREEN DC
  882.  
  883. Tscreen_dc::Tscreen_dc( void ): Tdc()
  884. {
  885.   len = ( scr_columns * scr_rows ) << 1;
  886.   x = 0;
  887.   y = 0;
  888.   xl = scr_columns;
  889.   yl = scr_rows;
  890.   base_x = 0;
  891.   base_y = 0;
  892.   region_x = 0;
  893.   region_y = 0;
  894.   region_xl = scr_columns;
  895.   region_yl = scr_rows;
  896.   region_x2 = scr_columns - 1;
  897.   region_y2 = scr_rows - 1;
  898.   cursor_x = 0;
  899.   cursor_y = 0;
  900.   cursor_ofs = 0;
  901.   address = scr_address;
  902. }
  903.  
  904. Tscreen_dc::~Tscreen_dc( void )
  905. {
  906.   address = NULL;
  907. }
  908.  
  909. #ifdef HGR
  910. extern void out_char( char attr, char *chr, char *scr );
  911. #pragma aux out_char =                  \
  912.     "         mov bh,bl               " \
  913.     "         shr bh,4                " \
  914.     "         and bl,0Fh              " \
  915.     "         mov edx,3CEh            " \
  916.     "         mov ah,bl               " \
  917.     "         and ah,bh               " \
  918.     "         xor al,al               " \
  919.     "         out dx,ax               " \
  920.     "         mov ecx,ebx             " \
  921.     "         not ecx                 " \
  922.     "         and cl,ch               " \
  923.     "         or  ah,cl               " \
  924.     "         inc al                  " \
  925.     "         out dx,ax               " \
  926.     "         mov dl,0C4h             " \
  927.     "         inc al                  " \
  928.     "         out dx,al               " \
  929.     "         inc edx                 " \
  930.     "         or  bl,cl               " \
  931.     "         or  bh,cl               " \
  932.     "         mov ecx,16              " \
  933.     "         mov ah,bl               " \
  934.     "loc1:    mov bl,[esi]            " \
  935.     "         inc esi                 " \
  936.     "         mov al,ah               " \
  937.     "         out dx,al               " \
  938.     "         mov [edi],bl            " \
  939.     "         mov al,bh               " \
  940.     "         not bl                  " \
  941.     "         out dx,al               " \
  942.     "         mov [edi],bl            " \
  943.     "         add edi,80              " \
  944.     "         dec ecx                 " \
  945.     "         jz  loc2                " \
  946.     "         jmp loc1                " \
  947.     "loc2:                            " \
  948.   parm [bl] [esi] [edi]                 \
  949.   modify [eax ebx ecx edx esi edi];
  950. #endif
  951.  
  952. void Tscreen_dc::print( word *p, int l )
  953. {
  954.   int n;
  955.  
  956.   if( !l ) return;
  957.  
  958.   if( ( ( cursor_y < 0 ) || ( cursor_y < region_y ) ) ||
  959.         ( cursor_y >= yl ) || ( cursor_y > region_y2 ) )  goto done;
  960.   n = -cursor_x;
  961.   if( region_x > 0 ) n += region_x;
  962.   if( n > 0 )
  963.   {
  964.     if( n >= l ) goto done;
  965.     p += n;
  966.     l -= n;
  967.     cursor_x += n;
  968.     cursor_ofs += ( n << 1 );
  969.   }
  970.   n =  xl-1;
  971.   if( region_x2 <= n ) n = region_x2;
  972.   if( ( n -= ( cursor_x + l - 1 ) ) < 0 )
  973.   {
  974.     if( n <= -l )  goto done;
  975.     l += n;
  976.   }
  977.  
  978. #ifdef HGR
  979.  
  980.   {
  981. #ifndef NOMOUSE
  982.     boolean hide=0;
  983.     if( MOUSE_Y>=cursor_y-1 && MOUSE_Y<=cursor_y+1 &&
  984.         MOUSE_X>=cursor_x-1 && MOUSE_X<=cursor_x+l ) hide++,hide_mouse();
  985. #endif
  986.     if( hgr_cursor_y==cursor_y && hgr_cursor_x>=cursor_x && hgr_cursor_x<cursor_x+l )
  987.       blink_state = 0;
  988.     char *s = (char *)p;
  989.     char *d = (char *)scr_address + cursor_y*80*16 + cursor_x;
  990.     _cli();
  991.     outpw( 0x3CE, 0xFF08 );
  992.     for( l++; --l; )
  993.     {
  994.       char c, a;
  995.       if( !(c=*s++,a=*s++) )
  996.       {
  997.         l--;
  998.         for( char *start=s; !(c=*s++,a=*s++) && l; l-- );
  999.         hgrs[*(start-2)]->draw( d, (s-start)/2 );
  1000.         d += (s-start)/2;
  1001.         if( !l ) break;
  1002.       }
  1003.       out_char( a, graph_chars16[c], d++ );
  1004.     }
  1005.     _sti();
  1006. #ifndef NOMOUSE
  1007.     if( hide ) show_mouse();
  1008. #endif
  1009.   }
  1010.  
  1011. #else //HGR
  1012.  
  1013. #ifdef NOMOUSE
  1014.   memcpy( (char *) address + cursor_ofs, p, l*2 );
  1015. #else
  1016.   _cli();
  1017.   if( (cursor_y==MOUSE_Y || cursor_y==MOUSE_Y+1) &&
  1018.     MOUSE_X>=cursor_x-1 && MOUSE_X<cursor_x+l )
  1019.   {
  1020.     hide_mouse();
  1021.     memcpy( (char *) address + cursor_ofs, p, l*2 );
  1022.     show_mouse();
  1023.   }
  1024.   else
  1025.     memcpy( (char *) address + cursor_ofs, p, l*2 );
  1026.   _sti();
  1027. #endif //NOMOUSE
  1028.  
  1029. #endif //HGR
  1030.  
  1031. done:
  1032.   cursor_x += l;
  1033.   cursor_ofs += l*2;
  1034. }
  1035.  
  1036.  
  1037. #ifdef HGR
  1038.  
  1039. extern void xor_cursor( char beg_line, char end_line, char *scr );
  1040. #pragma aux xor_cursor =              \
  1041. "               sub     cl,ch           " \
  1042. "               inc     cl              " \
  1043. "               mov     ah,1            " \
  1044. "               shl     ah,cl           " \
  1045. "               dec     ah              " \
  1046. "               mov     cl,ch           " \
  1047. "               shl     ah,cl           " \
  1048. "               mov     edx,03CEh       " \
  1049. "               mov     al,8            " \
  1050. "               out     dx,ax           " \
  1051. "               mov     eax,1803h       " \
  1052. "               out     dx,ax           " \
  1053. "               mov     edx,03C4h       " \
  1054. "               mov     eax,0F02h       " \
  1055. "               out     dx,ax           " \
  1056. "               mov     ah,0xFF         " \
  1057. "               mov     cl,16           " \
  1058. "loc1:          mov     al,[edi]        " \
  1059. "               mov     [edi],ah        " \
  1060. "               add     edi,80          " \
  1061. "               dec     cl              " \
  1062. "               jnz     loc1            " \
  1063. "               mov     edx,03CEh       " \
  1064. "               mov     eax,0003h       " \
  1065. "               out     dx,ax           " \
  1066. "               mov     eax,0FF08h      " \
  1067. "               out     dx,ax           " \
  1068.   parm [ch] [cl] [edi]                    \
  1069.   modify [eax ecx edx edi];
  1070.  
  1071. static void blink_cursor( void )
  1072. {
  1073. //  boolean hide=0;
  1074. //  if( hgr_cursor_y>=MOUSE_Y-1 && hgr_cursor_y<=MOUSE_Y+1 &&
  1075. //      hgr_cursor_x>=MOUSE_X-1 && hgr_cursor_x<=MOUSE_X+1 ) hide++, hide_mouse();
  1076.   xor_cursor( hgr_cursor->beg_line, hgr_cursor->end_line,
  1077.               (char *)scr_address+hgr_cursor_y*80*16+hgr_cursor_x );
  1078. //  if( hide ) show_mouse();
  1079.   blink_state ^= 1;
  1080.   call_request( blink_handle, blink_cursor, 2 );
  1081. }
  1082.  
  1083. void Tscreen_dc::update_cursor( void )
  1084. {
  1085.   if( hgr_cursor_x==cursor_x && hgr_cursor_y==cursor_y && hgr_cursor==current_cursor ) return;
  1086.   _cli();
  1087.   if( blink_state ) blink_cursor();
  1088.   hgr_cursor=current_cursor;
  1089.   if( cursor_x>=0 && cursor_y>=0 && cursor_x<xl && cursor_y<yl )
  1090.   {
  1091.     hgr_cursor_x=cursor_x, hgr_cursor_y=cursor_y;
  1092.     blink_cursor();
  1093.   }
  1094.   _sti();
  1095. }
  1096.  
  1097. #else
  1098.  
  1099. void Tscreen_dc::update_cursor( void )
  1100. {
  1101.   union REGS r;
  1102.   r.w.dx = cursor_x;
  1103.   r.w.cx = cursor_y;
  1104.   if( cursor_x<0 || cursor_y<0 || cursor_x>=xl || cursor_y>=yl )
  1105.   {
  1106.     r.w.dx = 0;
  1107.     r.w.cx = yl+1;
  1108.   }
  1109.   r.h.dh = r.h.cl;
  1110.   r.h.ah = 2;
  1111.   r.h.bh = * ( (char *) BIOS_DTA( 0x0062 ) );
  1112.   INTR( 0x10, &r, &r );
  1113. }
  1114.  
  1115. #endif
  1116.  
  1117. //NON-OBJECT PROCS
  1118.  
  1119. void set_dc( Tdc *dc )
  1120.  
  1121. {
  1122.   current_dc = dc;
  1123.   draw_on_screen = ( current_dc == (Tdc *) screen_dc );
  1124. }
  1125.  
  1126. uint smart_len( char *str )
  1127. {
  1128.   uint l, ln;
  1129.   char c;
  1130.  
  1131.   ln = l = 0;
  1132.   loop:
  1133.     while( ( ( c = *str++ ) != 0 ) && ( ( c != '|' ) || ( ( c = *str++ ) == '|' ) ) )
  1134.       l++, ln++;
  1135.     if( !c ) return l;
  1136.     if( c == 'r' )
  1137.     {
  1138.       c = *str++;
  1139.       l += c, ln += c;
  1140.       str++;
  1141.       goto loop;
  1142.     }
  1143.     if( c == 'l' )
  1144.     {
  1145.       uint cnt = *str++;
  1146.       while( --cnt )
  1147.         l += ln;
  1148.       ln = 0;
  1149.       goto loop;
  1150.     }
  1151.     if( c == 'n' ) ln = 0;
  1152.     goto loop;
  1153. }
  1154.  
  1155. /* string can not contain |r, |l or || specifiers */
  1156. uint smart_index( char *str, uint i )
  1157. {
  1158.   uint j, l;
  1159.   char c;
  1160.  
  1161.   j = l = 0;
  1162.   loop:
  1163.     while( ( ( c = *str++ ) != 0 ) && ( c != '|' ) && ( l < i ) )
  1164.       j++, l++;
  1165.     if( !c ) return j;
  1166.     str--;
  1167.     while( *str == '|' )
  1168.       j += 2, str += 2;
  1169.     if( l == i ) return j;
  1170.     goto loop;
  1171. }
  1172.  
  1173. boolean rect_colision( int _x, int _y, uint _xl, uint _yl,
  1174.   int &a, int &b, uint &al, uint &bl )
  1175. {
  1176.   int tal, tbl;
  1177.   boolean result;
  1178.  
  1179.   tal = a + al - 1; tbl = b + bl - 1;
  1180.   result = rect_colision_xy( _x, _y, (int) ( _x + _xl - 1 ), (int) ( _y + _yl - 1 ), a, b, tal, tbl );
  1181.   al = tal - a + 1; bl = tbl - b + 1;
  1182.   return result;
  1183. }
  1184.  
  1185. boolean rect_colision_xy( int x1, int y1, int x2, int y2,
  1186.   int &a1, int &b1, int &a2, int &b2 )
  1187. {
  1188.   if( ( a1 > x2 ) || ( a2 < x1 ) || ( b1 > y2 ) || ( b2 < y1 ) ||
  1189.       ( a1 > a2 ) || ( b1 > b2 ) || ( x1 > x2 ) || ( y1 > y2 ) ) return 0;
  1190.   a1 = max( a1, x1 ); b1 = max( b1, y1 );
  1191.   a2 = min( a2, x2 ); b2 = min( b2, y2 );
  1192.   return 1;
  1193. }
  1194.  
  1195. void set_region( int _x, int _y, uint _xl, uint _yl )
  1196. {
  1197.   current_dc->set_region( _x, _y, _xl, _yl );
  1198. }
  1199.  
  1200. void set_region_xy( int x1, int y1, int x2, int y2 )
  1201. {
  1202.   current_dc->set_region_xy( x1, y1, x2, y2 );
  1203. }
  1204.  
  1205. void goto_xy( int _x, int _y )
  1206. {
  1207.   current_dc->goto_xy( _x, _y );
  1208. }
  1209.  
  1210. void goto_ofs( uint cur_ofs )
  1211. {
  1212.   current_dc->goto_ofs( cur_ofs );
  1213. }
  1214.  
  1215. int where_x( void )
  1216. {
  1217.   return current_dc->where_x();
  1218. }
  1219.  
  1220. int where_y( void )
  1221. {
  1222.   return current_dc->where_y();
  1223. }
  1224.  
  1225. void set_base( int _x, int _y )
  1226. {
  1227.   current_dc->set_base( _x, _y );
  1228. }
  1229.  
  1230. void home( void )
  1231. {
  1232.   current_dc->home();
  1233. }
  1234.  
  1235. void fill_dc( char c )
  1236. {
  1237.   current_dc->fill_dc( c );
  1238. }
  1239.  
  1240. void print( word *p, int l )
  1241. {
  1242.   current_dc->print( p, l );
  1243. }
  1244.  
  1245. void direct_txt( char *t )
  1246. {
  1247.   current_dc->direct_txt( t );
  1248. }
  1249.  
  1250. void txt( char *t )
  1251. {
  1252.   current_dc->txt( t );
  1253. }
  1254.  
  1255. void direct_txtf( char *t, ... )
  1256. {
  1257.   char buffer[MAX_FORMATTED_LINE_LENGTH];
  1258.   va_list argptr;
  1259.  
  1260.   va_start( argptr, t );
  1261.   vsprintf( buffer, t, argptr );
  1262.   va_end( argptr );
  1263.   current_dc->txt( buffer );
  1264. }
  1265.  
  1266. void txtf( char *t, ... )
  1267. {
  1268.   char buffer[MAX_FORMATTED_LINE_LENGTH];
  1269.   va_list argptr;
  1270.  
  1271.   va_start( argptr, t );
  1272.   vsprintf( buffer, t, argptr );
  1273.   va_end( argptr );
  1274.   current_dc->txt( buffer );
  1275. }
  1276.  
  1277. static void mode_proc( char mode, char char_size )
  1278. {
  1279.   old_mode_proc( mode, char_size );
  1280. #ifndef HGR
  1281.   set_blink( 0 );
  1282. #endif
  1283.   screen_dc->address = scr_address;
  1284.   screen_dc->len = ( scr_columns * scr_rows ) << 1;
  1285.   screen_dc->xl = scr_columns;
  1286.   screen_dc->yl = scr_rows;
  1287. }
  1288.  
  1289. void __init_dc( void )
  1290. {
  1291. #ifdef HGR
  1292.   blink_handle = alloc_timer();
  1293. #else
  1294.   set_blink( 0 );
  1295. #endif
  1296.   old_mode_proc = hook_mode_proc( mode_proc );
  1297.   screen_dc = NEW( Tscreen_dc );
  1298.   current_dc = (Tdc *) screen_dc;
  1299. }
  1300.