consoled.inc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Type
  2. VGAConsole = 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(ModeType : Integer);
  8. Procedure internal_open_fullscreen_finish(_pages : Integer);
  9. Procedure internal_post_open_setup;
  10. Procedure internal_reset;
  11. Procedure internal_close;
  12. Procedure internal_clear_mode_list;
  13. Procedure internal_SetPalette(data : Pint32);
  14. Procedure vga_load(data : Pointer);
  15. { console debug checks }
  16. Procedure check_open;
  17. Procedure check_unlocked;
  18. { data }
  19. m_modes : Array[0..31{255}] Of TPTCMode;
  20. { m_modes : PPTCMode;}
  21. { m_modes_last : Integer;
  22. m_modes_n : PInteger;}
  23. m_title : Array[0..1023] Of Char;
  24. m_information : Array[0..1023] Of Char;
  25. m_CurrentMode : Integer;
  26. { m_VESACurrentMode : Integer;}
  27. m_faketype : Integer;
  28. m_width, m_height, m_pitch, m_pages : Integer;
  29. m_primary : Pointer;
  30. { flags }
  31. m_open : Boolean;
  32. m_locked : Boolean;
  33. { option data }
  34. m_default_width : Integer;
  35. m_default_height : Integer;
  36. m_default_pages : Integer;
  37. m_default_format : TPTCFormat;
  38. { objects }
  39. m_copy : TPTCCopy;
  40. m_area : TPTCArea;
  41. m_clip : TPTCArea;
  42. m_format : TPTCFormat;
  43. m_clear : TPTCClear;
  44. m_palette : TPTCPalette;
  45. { Dos objects }
  46. m_keyboard : TDosKeyboard;
  47. { m_primary : TPTCSurface;}
  48. { DosKeyboard *m_keyboard;}
  49. { m_160x100buffer : TPTCSurface;}
  50. Protected
  51. Procedure internal_ReadKey(k : TPTCKey); Override;
  52. Function internal_PeekKey(k : TPTCKey) : Boolean; Override;
  53. Public
  54. Constructor Create;
  55. Destructor Destroy; Override;
  56. Procedure configure(Const _file : String); Override;
  57. Function option(Const _option : String) : Boolean; Override;
  58. Function modes : PPTCMode; Override;
  59. Procedure open(Const _title : String; _pages : Integer); Overload; Override;
  60. Procedure open(Const _title : String; Const _format : TPTCFormat;
  61. _pages : Integer); Overload; Override;
  62. Procedure open(Const _title : String; _width, _height : Integer;
  63. Const _format : TPTCFormat; _pages : Integer); Overload; Override;
  64. Procedure open(Const _title : String; Const _mode : TPTCMode;
  65. _pages : Integer); Overload; Override;
  66. Procedure close; Override;
  67. Procedure flush; Override;
  68. Procedure finish; Override;
  69. Procedure update; Override;
  70. Procedure update(Const _area : TPTCArea); Override;
  71. Procedure copy(Var surface : TPTCBaseSurface); Override;
  72. Procedure copy(Var surface : TPTCBaseSurface;
  73. Const source, destination : TPTCArea); Override;
  74. Function lock : Pointer; Override;
  75. Procedure unlock; Override;
  76. Procedure load(Const pixels : Pointer;
  77. _width, _height, _pitch : Integer;
  78. Const _format : TPTCFormat;
  79. Const _palette : TPTCPalette); Override;
  80. Procedure load(Const pixels : Pointer;
  81. _width, _height, _pitch : Integer;
  82. Const _format : TPTCFormat;
  83. Const _palette : TPTCPalette;
  84. Const source, destination : TPTCArea); Override;
  85. Procedure save(pixels : Pointer;
  86. _width, _height, _pitch : Integer;
  87. Const _format : TPTCFormat;
  88. Const _palette : TPTCPalette); Override;
  89. Procedure save(pixels : Pointer;
  90. _width, _height, _pitch : Integer;
  91. Const _format : TPTCFormat;
  92. Const _palette : TPTCPalette;
  93. Const source, destination : TPTCArea); Override;
  94. Procedure clear; Override;
  95. Procedure clear(Const color : TPTCColor); Override;
  96. Procedure clear(Const color : TPTCColor;
  97. Const _area : TPTCArea); Override;
  98. Procedure palette(Const _palette : TPTCPalette); Override;
  99. Function palette : TPTCPalette; Override;
  100. Procedure clip(Const _area : TPTCArea); Override;
  101. Function width : Integer; Override;
  102. Function height : Integer; Override;
  103. Function pitch : Integer; Override;
  104. Function pages : Integer; Override;
  105. Function area : TPTCArea; Override;
  106. Function clip : TPTCArea; Override;
  107. Function format : TPTCFormat; Override;
  108. Function name : String; Override;
  109. Function title : String; Override;
  110. Function information : String; Override;
  111. End;