video3.pp 618 B

123456789101112131415161718192021222324252627282930
  1. { test for the 256-color support }
  2. program video3;
  3. uses
  4. video, keyboard;
  5. var
  6. k: TKeyEvent;
  7. X, Y: Integer;
  8. begin
  9. InitKeyboard;
  10. InitEnhancedVideo;
  11. repeat
  12. for X := 0 to ScreenWidth - 1 do
  13. for Y := 0 to ScreenHeight - 1 do
  14. with EnhancedVideoBuf[Y * ScreenWidth + X] do
  15. begin
  16. ForegroundColor := Byte(X + Y);
  17. BackgroundColor := ForegroundColor xor 255;
  18. ExtendedGraphemeCluster := 'A';
  19. end;
  20. UpdateScreen(False);
  21. k := GetKeyEvent;
  22. k := TranslateKeyEvent(k);
  23. until GetKeyEventChar(k) = 'q';
  24. DoneEnhancedVideo;
  25. DoneKeyboard;
  26. end.