home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / gchsrc31 / atarilib / resoluti.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-27  |  1.2 KB  |  41 lines

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  This file is part of the Atari Machine Specific Library,
  4. //  and is Copyright 1992 by Warwick W. Allison.
  5. //
  6. //  You are free to copy and modify these sources, provided you acknoledge
  7. //  the origin by retaining this notice, and adhere to the conditions
  8. //  described in the file COPYING.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11.  
  12. #include "resolution.h"
  13. #include <osbind.h>
  14.  
  15.                     /* STL STM STH ??? TTM ???  TTH TTL */
  16. short ScreenWidth[NUMRES]        = {320,640,640,640,640,640,1280,320};
  17. short ScreenHeight[NUMRES]        = {200,200,400,400,480,480, 960,480};
  18. short NumberOfColours[NUMRES]    = { 16,  4,  2,  2, 16, 16,   2,256};
  19. short BitPlanes[NUMRES]        = {  4,  2,  1,  1,  4,  4,   1,  8};
  20. short BytesPerBitPlaneLine[NUMRES]    = { 40, 80, 80, 80, 80, 80, 160, 40};
  21. short BytesPerLine[NUMRES]        = {160,160, 80, 80,320,320, 160,320};
  22.  
  23.  
  24. ResolutionChange::ResolutionChange()
  25. {
  26.     Before=Getrez();
  27.     After=Before;
  28. }
  29.  
  30. ResolutionChange::ResolutionChange(Resolution res)
  31. {
  32.     Before=Getrez();
  33.     Setscreen(-1,-1,res);
  34.     After=res;
  35. }
  36.  
  37. ResolutionChange::~ResolutionChange()
  38. {
  39.     Setscreen(-1,-1,Before);
  40. }
  41.