vga.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* VGAlib version 1.1 - (c) 1992 Tommy Frandsen */
  2. /* */
  3. /* This library is free software; you can redistribute it and/or */
  4. /* modify it without any restrictions. This library is distributed */
  5. /* in the hope that it will be useful, but without any warranty; */
  6. /* without even the implied warranty of merchantability or fitness */
  7. /* for a particular purpose. */
  8. #ifndef VGA_H
  9. #define VGA_H
  10. #define TEXT 0
  11. #define G320x200x16 1
  12. #define G640x200x16 2
  13. #define G640x350x16 3
  14. #define G640x480x16 4
  15. #define G320x200x256 5
  16. #define G320x240x256 6
  17. #define G320x400x256 7
  18. #define G360x480x256 8
  19. #define G640x480x2 9
  20. #define G640x480x256 10
  21. #define G800x600x256 11
  22. #define G1024x768x256 12
  23. extern int vga_setmode(int mode);
  24. extern int vga_hasmode(int mode);
  25. extern int vga_setflipchar(int c);
  26. extern int vga_clear();
  27. extern int vga_flip();
  28. extern int vga_getxdim();
  29. extern int vga_getydim();
  30. extern int vga_getcolors();
  31. extern int vga_setpalette(int index, int red, int green, int blue);
  32. extern int vga_getpalette(int index, int *red, int *green, int *blue);
  33. extern int vga_setpalvec(int start, int num, int *pal);
  34. extern int vga_getpalvec(int start, int num, int *pal);
  35. extern int vga_screenoff();
  36. extern int vga_screenon();
  37. extern int vga_setcolor(int color);
  38. extern int vga_drawpixel(int x, int y);
  39. extern int vga_drawline(int x1, int y1, int x2, int y2);
  40. extern int vga_drawscanline(int line, unsigned char* colors);
  41. extern int vga_drawscansegment(unsigned char* colors, int x, int y, int length);
  42. extern int vga_getch();
  43. extern int vga_dumpregs();
  44. #endif /* VGA_H */