consoled.inc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. Type
  2. TextFX2Console = 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. { DosKeyboard *m_keyboard;}
  33. m_160x100buffer : TPTCSurface;
  34. Protected
  35. Procedure internal_ReadKey(k : TPTCKey); Override;
  36. Function internal_PeekKey(k : TPTCKey) : Boolean; Override;
  37. Public
  38. Constructor Create;
  39. Destructor Destroy; Override;
  40. Procedure configure(Const _file : String); Override;
  41. Function option(Const _option : String) : Boolean; Override;
  42. Function modes : PPTCMode; Override;
  43. Procedure open(Const _title : String; _pages : Integer); Overload; Override;
  44. Procedure open(Const _title : String; Const _format : TPTCFormat;
  45. _pages : Integer); Overload; Override;
  46. Procedure open(Const _title : String; _width, _height : Integer;
  47. Const _format : TPTCFormat; _pages : Integer); Overload; Override;
  48. Procedure open(Const _title : String; Const _mode : TPTCMode;
  49. _pages : Integer); Overload; Override;
  50. Procedure close; Override;
  51. Procedure flush; Override;
  52. Procedure finish; Override;
  53. Procedure update; Override;
  54. Procedure update(Const _area : TPTCArea); Override;
  55. Procedure copy(Var surface : TPTCBaseSurface); Override;
  56. Procedure copy(Var surface : TPTCBaseSurface;
  57. Const source, destination : TPTCArea); Override;
  58. Function lock : Pointer; Override;
  59. Procedure unlock; Override;
  60. Procedure load(Const pixels : Pointer;
  61. _width, _height, _pitch : Integer;
  62. Const _format : TPTCFormat;
  63. Const _palette : TPTCPalette); Override;
  64. Procedure load(Const pixels : Pointer;
  65. _width, _height, _pitch : Integer;
  66. Const _format : TPTCFormat;
  67. Const _palette : TPTCPalette;
  68. Const source, destination : TPTCArea); Override;
  69. Procedure save(pixels : Pointer;
  70. _width, _height, _pitch : Integer;
  71. Const _format : TPTCFormat;
  72. Const _palette : TPTCPalette); Override;
  73. Procedure save(pixels : Pointer;
  74. _width, _height, _pitch : Integer;
  75. Const _format : TPTCFormat;
  76. Const _palette : TPTCPalette;
  77. Const source, destination : TPTCArea); Override;
  78. Procedure clear; Override;
  79. Procedure clear(Const color : TPTCColor); Override;
  80. Procedure clear(Const color : TPTCColor;
  81. Const _area : TPTCArea); Override;
  82. Procedure palette(Const _palette : TPTCPalette); Override;
  83. Function palette : TPTCPalette; Override;
  84. Procedure clip(Const _area : TPTCArea); Override;
  85. Function width : Integer; Override;
  86. Function height : Integer; Override;
  87. Function pitch : Integer; Override;
  88. Function pages : Integer; Override;
  89. Function area : TPTCArea; Override;
  90. Function clip : TPTCArea; Override;
  91. Function format : TPTCFormat; Override;
  92. Function name : String; Override;
  93. Function title : String; Override;
  94. Function information : String; Override;
  95. End;