home *** CD-ROM | disk | FTP | other *** search
- //////////////////////////////////////////////////////////////////////////////
- //
- // This file is part of the Atari Machine Specific Library,
- // and is Copyright 1992 by Warwick W. Allison.
- //
- // You are free to copy and modify these sources, provided you acknoledge
- // the origin by retaining this notice, and adhere to the conditions
- // described in the file COPYING.
- //
- //////////////////////////////////////////////////////////////////////////////
-
- #ifndef _Resolution_h
- #define _Resolution_h
- //
- // Support for the currently defined (1992) resolutions.
- //
- // To change to a different, simply declare that a change in resolution
- // exists, eg.:
- //
- // ResolutionChange Rez(STLow);
- //
- // This will change the current resolution to ST low resolution.
- // Various modules (esp. Screens) take notice of the current resolution.
- // When the resolution change goes out of scope (ceases to exist), it
- // will revert to the previous resolution.
- //
- // Note that due to the fascist way TOS changes resolution, the current
- // logical screen is cleared when resolution is changed.
- //
- // Various arrays of resolution dependent values are also supplied.
- //
-
- typedef enum {STLow=0, STMedium=1, STHigh=2, TTLow=7, TTMedium=4, TTHigh=5} Resolution;
- #define NUMRES (TTLow+1)
-
- extern short BitPlanes[NUMRES];
- extern short BytesPerBitPlaneLine[NUMRES];
- extern short BytesPerLine[NUMRES];
- extern short ScreenWidth[NUMRES];
- extern short ScreenHeight[NUMRES];
- extern short NumberOfColours[NUMRES];
-
-
- class ResolutionChange
- {
- public:
- Resolution Before,After;
-
- ResolutionChange(); /* No change */
- ResolutionChange(Resolution);
- ~ResolutionChange(); /* Change back */
- };
-
- /* The concept here is that resolutions may be changed in a scopewise
- * manner. Simply by declaring that a ResolutionChange object exists,
- * the resolution will be modified for the scope, but restored at the
- * end on the scope!
- */
-
- #endif
-