ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/video.h
(Generate patch)

Comparing BasiliskII/src/include/video.h (file contents):
Revision 1.11 by cebix, 2001-07-01T21:09:30Z vs.
Revision 1.12 by cebix, 2001-07-03T19:20:47Z

# Line 55 | Line 55 | enum video_depth {
55          VDEPTH_32BIT  // "Millions"
56   };
57  
58 < inline uint16 DepthToAppleMode(video_depth depth)
59 < {
60 <        return depth + 0x80;
61 < }
58 > // For compatibility reasons with older (pre-Display Manager) versions of
59 > // MacOS, the Apple modes must start at 0x80 and be contiguous. Therefore
60 > // we construct an array to map the depth codes to the corresponding Apple
61 > // mode. This array is initialized by video_init_depth_list() which must
62 > // be called by the platform-dependant VideoInit() routine after filling
63 > // the VideoModes array.
64 > extern uint16 apple_mode_for_depth[6];
65  
66 < inline video_depth AppleModeToDepth(uint16 mode)
66 > inline uint16 DepthToAppleMode(video_depth depth)
67   {
68 <        return video_depth(mode - 0x80);
68 >        return apple_mode_for_depth[depth];
69   }
70  
71   inline bool IsDirectMode(video_depth depth)
# Line 70 | Line 73 | inline bool IsDirectMode(video_depth dep
73          return depth == VDEPTH_16BIT || depth == VDEPTH_32BIT;
74   }
75  
73 inline bool IsDirectMode(uint16 mode)
74 {
75        return IsDirectMode(AppleModeToDepth(mode));
76 }
77
76   // Return the depth code that corresponds to the specified bits-per-pixel value
77   inline video_depth DepthModeForPixelDepth(int depth)
78   {
# Line 177 | Line 175 | extern void video_switch_to_mode(const v
175   // or gamma table (in direct modes)
176   extern void video_set_palette(uint8 *pal, int num);
177  
178 + // Check whether a mode with the specified depth exists
179 + extern bool video_has_depth(video_depth depth);
180 +
181 + // Get bytes-per-row value for specified resolution/depth
182 + extern uint32 video_bytes_per_row(video_depth depth, uint32 id);
183 +
184 + // Initialize apple_mode_for_depth[] array from VideoModes list
185 + extern void video_init_depth_list(void);
186 +
187   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines