home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / source / xvirtscr.cpp < prev    next >
C/C++ Source or Header  |  1997-03-30  |  1KB  |  58 lines

  1. #include "xvirtscr.h"
  2.  
  3.  
  4. /*DOC
  5. CLASS    XVirtualScreen
  6. FUNCTION XVirtualScreen
  7. GROUP    x-games/constrcutors/destructors
  8. REMARKS  Creates a virtual screen. The only color format that is being supported is FOURCC_LUT8.    
  9. */
  10. XVirtualScreen::XVirtualScreen( USHORT usWidth, USHORT usHeight ) : XObject()
  11. {
  12.         this->usWidth        = usWidth;
  13.         this->usHeight       = usHeight;
  14.  
  15.         // allocate memory
  16.         if( NULL == (pbBuffer = (BYTE*)new BYTE[usWidth * usHeight]) )
  17.                 throw XException( "XVirtualScreen: out of memory",
  18.                                   XGameException::XGERR_OUT_OF_MEMORY );
  19. } // XVirtualScreen::XVirtualScreen
  20.  
  21.  
  22. /*DOC
  23. CLASS    XVirtualScreen
  24. FUNCTION ~XVirtualScreen
  25. GROUP    x-games/constrcutors/destructors
  26. REMARKS  Destructor of the virtual screen class.
  27. */
  28. XVirtualScreen::~XVirtualScreen()
  29. {
  30.         delete pbBuffer;
  31. } // XVirtualScreen::~XVirtualScreen
  32.  
  33.  
  34. /*DOC
  35. CLASS    XVirtualScreen
  36. FUNCTION GetWidth
  37. GROUP    x-games
  38. REMARKS  Returns the width of the virtual screen.
  39. RETURNS  USHORT usWidth
  40. */
  41.  
  42. /*DOC
  43. CLASS    XVirtualScreen
  44. FUNCTION GetHeight
  45. GROUP    x-games
  46. REMARKS  Returns the height of the virtual screen.
  47. RETURNS  USHORT usHeight
  48. */
  49.  
  50. /*DOC
  51. CLASS    XVirtualScreen
  52. FUNCTION GetBuffer
  53. GROUP    x-games
  54. REMARKS  Returns the pointer to the buffer of the virtual screen.
  55. RETURNS  BYTE* pbBuffer
  56. */
  57.  
  58.