home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / WINCPP.ZIP / DIRVIDEO.CPP next >
C/C++ Source or Header  |  1994-01-22  |  491b  |  30 lines

  1. #include "window.h"
  2.  
  3. void Window::VPut(int row, int col, uchar attr, uchar c)
  4. {
  5.     Video[row*ScreenCols+col] = (short)(attr<<8|c);
  6. }
  7.  
  8.  
  9. void Window::VPut(int row, int col, short word)
  10. {
  11.     Video[row*ScreenCols+col] = word;
  12. }
  13.  
  14.  
  15. void Window::VGet(int row, int col, uchar &attr, uchar &c)
  16. {
  17.     short word;
  18.  
  19.     word = Video[row*ScreenCols+col];
  20.  
  21.     attr = (uchar)(word>>8u);
  22.     c = (word & 0xff);
  23. }
  24.  
  25.  
  26. short Window::VGet(int row, int col)
  27. {
  28.     return (Video[row*ScreenCols+col]);
  29. }
  30.