consoled.inc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. Type
  2. CGAConsole = Class(TPTCBaseConsole)
  3. Private
  4. { internal console management routines }
  5. Procedure internal_pre_open_setup(Const _title : String);
  6. Procedure internal_open_fullscreen_start;
  7. Procedure internal_open_fullscreen(_width, _height : Integer; Const _format : TPTCFormat);
  8. Procedure internal_open_fullscreen_finish(_pages : Integer);
  9. Procedure internal_post_open_setup;
  10. Procedure internal_reset;
  11. Procedure internal_close;
  12. { console debug checks }
  13. Procedure check_open;
  14. Procedure check_unlocked;
  15. { data }
  16. m_modes : Array[0..255] Of TPTCMode;
  17. m_title : Array[0..1023] Of Char;
  18. m_information : Array[0..1023] Of Char;
  19. { flags }
  20. m_open : Boolean;
  21. m_locked : Boolean;
  22. { option data }
  23. m_default_width : Integer;
  24. m_default_height : Integer;
  25. m_default_pages : Integer;
  26. m_default_format : TPTCFormat;
  27. { objects }
  28. m_copy : TPTCCopy;
  29. { Dos objects }
  30. m_keyboard : TDosKeyboard;
  31. m_primary : TPTCSurface;
  32. { m_160x100buffer : TPTCSurface;}
  33. Protected
  34. Procedure internal_ReadKey(k : TPTCKey); Override;
  35. Function internal_PeekKey(k : TPTCKey) : Boolean; Override;
  36. Public
  37. Constructor Create;
  38. Destructor Destroy; Override;
  39. Procedure configure(Const _file : String); Override;
  40. Function option(Const _option : String) : Boolean; Override;
  41. Function modes : PPTCMode; Override;
  42. Procedure open(Const _title : String; _pages : Integer); Overload; Override;
  43. Procedure open(Const _title : String; Const _format : TPTCFormat;
  44. _pages : Integer); Overload; Override;
  45. Procedure open(Const _title : String; _width, _height : Integer;
  46. Const _format : TPTCFormat; _pages : Integer); Overload; Override;
  47. Procedure open(Const _title : String; Const _mode : TPTCMode;
  48. _pages : Integer); Overload; Override;
  49. Procedure close; Override;
  50. Procedure flush; Override;
  51. Procedure finish; Override;
  52. Procedure update; Override;
  53. Procedure update(Const _area : TPTCArea); Override;
  54. Procedure copy(Var surface : TPTCBaseSurface); Override;
  55. Procedure copy(Var surface : TPTCBaseSurface;
  56. Const source, destination : TPTCArea); Override;
  57. Function lock : Pointer; Override;
  58. Procedure unlock; Override;
  59. Procedure load(Const pixels : Pointer;
  60. _width, _height, _pitch : Integer;
  61. Const _format : TPTCFormat;
  62. Const _palette : TPTCPalette); Override;
  63. Procedure load(Const pixels : Pointer;
  64. _width, _height, _pitch : Integer;
  65. Const _format : TPTCFormat;
  66. Const _palette : TPTCPalette;
  67. Const source, destination : TPTCArea); Override;
  68. Procedure save(pixels : Pointer;
  69. _width, _height, _pitch : Integer;
  70. Const _format : TPTCFormat;
  71. Const _palette : TPTCPalette); Override;
  72. Procedure save(pixels : Pointer;
  73. _width, _height, _pitch : Integer;
  74. Const _format : TPTCFormat;
  75. Const _palette : TPTCPalette;
  76. Const source, destination : TPTCArea); Override;
  77. Procedure clear; Override;
  78. Procedure clear(Const color : TPTCColor); Override;
  79. Procedure clear(Const color : TPTCColor;
  80. Const _area : TPTCArea); Override;
  81. Procedure palette(Const _palette : TPTCPalette); Override;
  82. Function palette : TPTCPalette; Override;
  83. Procedure clip(Const _area : TPTCArea); Override;
  84. Function width : Integer; Override;
  85. Function height : Integer; Override;
  86. Function pitch : Integer; Override;
  87. Function pages : Integer; Override;
  88. Function area : TPTCArea; Override;
  89. Function clip : TPTCArea; Override;
  90. Function format : TPTCFormat; Override;
  91. Function name : String; Override;
  92. Function title : String; Override;
  93. Function information : String; Override;
  94. End;