home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / RAYCAST.ZIP / SCREEN.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-10  |  668 b   |  42 lines

  1. #include "os.h"
  2. #ifdef OS_DOS
  3.  
  4. #include <i86.h>
  5. #include "screen.h"
  6.  
  7. struct SREGS sregs;
  8. union REGS regs;
  9. unsigned char * screen=(unsigned char *)0xa0000;
  10.  
  11. void setgmode(short int mode)
  12. {
  13.  
  14. regs.w.ax=mode;
  15. regs.h.ah=0;      
  16. int386(0x10,®s,®s);
  17. }
  18.  
  19. void setpalette(unsigned char * palptr)
  20. {
  21. regs.w.bx=0;
  22. regs.w.cx=0x100;
  23. regs.h.ah=0x10;
  24. regs.h.al=0x12;
  25. regs.x.edx=(long)palptr;
  26. segread(&sregs);
  27. int386x(0x10,®s,®s,&sregs);
  28. }
  29.  
  30. void getpalette(unsigned char * palptr)
  31. {
  32. regs.w.bx=0;
  33. regs.w.cx=0x100;
  34. regs.h.ah=0x10;
  35. regs.h.al=0x17;
  36. regs.x.edx=(long)palptr;
  37. segread(&sregs);
  38. int386x(0x10,®s,®s,&sregs);
  39. }
  40.  
  41. #endif
  42.