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.1 by cebix, 1999-10-03T14:16:26Z vs.
Revision 1.7 by cebix, 2001-06-27T20:05:31Z

# Line 1 | Line 1
1   /*
2   *  video.h - Video/graphics emulation
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2001 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 21 | Line 21
21   #ifndef VIDEO_H
22   #define VIDEO_H
23  
24 < // Description for one (possibly virtual) monitor
25 < enum {
26 <        VMODE_1BIT,
27 <        VMODE_2BIT,
28 <        VMODE_4BIT,
29 <        VMODE_8BIT,
30 <        VMODE_16BIT,
31 <        VMODE_32BIT
24 > #include <vector>
25 >
26 > // Color depth codes
27 > enum video_depth {
28 >        VDEPTH_1BIT,  // 2 colors
29 >        VDEPTH_2BIT,  // 4 colors
30 >        VDEPTH_4BIT,  // 16 colors
31 >        VDEPTH_8BIT,  // 256 colors
32 >        VDEPTH_16BIT, // "Thousands"
33 >        VDEPTH_32BIT  // "Millions"
34   };
35  
36 < #define IsDirectMode(x) ((x) == VMODE_16BIT || (x) == VMODE_32BIT)
36 > inline bool IsDirectMode(video_depth depth)
37 > {
38 >        return depth == VDEPTH_16BIT || depth == VDEPTH_32BIT;
39 > }
40 >
41 > inline uint16 DepthToAppleMode(video_depth depth)
42 > {
43 >        return depth + 0x80;
44 > }
45 >
46 > inline video_depth AppleModeToDepth(uint16 mode)
47 > {
48 >        return video_depth(mode - 0x80);
49 > }
50  
51 < struct video_desc {
52 <        uint32 mac_frame_base;  // Mac frame buffer address
38 <        uint32 bytes_per_row;   // Bytes per row
51 > // Description of one video mode
52 > struct video_mode {
53          uint32 x;                               // X size of screen (pixels)
54          uint32 y;                               // Y size of screen (pixels)
55 <        int mode;                               // Video mode
55 >        uint32 resolution_id;   // Resolution ID (should be >= 0x80 and uniquely identify the sets of modes with the same X/Y size)
56 >        uint32 bytes_per_row;   // Bytes per row of frame buffer
57 >        video_depth depth;              // Color depth (see definitions above)
58 > };
59 >
60 > inline bool IsDirectMode(const video_mode &mode)
61 > {
62 >        return IsDirectMode(mode.depth);
63 > }
64 >
65 > // List of all supported video modes
66 > extern vector<video_mode> VideoModes;
67 >
68 > // Description for one (possibly virtual) monitor
69 > struct monitor_desc {
70 >        uint32 mac_frame_base;  // Mac frame buffer address
71 >        video_mode mode;                // Currently selected video mode description
72   };
73  
74 < extern struct video_desc VideoMonitor;  // Description of the main monitor, set by VideoInit()
74 > extern monitor_desc VideoMonitor;       // Description of the main monitor, set by VideoInit()
75  
76 < extern int16 VideoOpen(uint32 pb, uint32 dce);
77 < extern int16 VideoControl(uint32 pb, uint32 dce);
78 < extern int16 VideoStatus(uint32 pb, uint32 dce);
76 > extern int16 VideoDriverOpen(uint32 pb, uint32 dce);
77 > extern int16 VideoDriverControl(uint32 pb, uint32 dce);
78 > extern int16 VideoDriverStatus(uint32 pb, uint32 dce);
79  
80   // System specific and internal functions/data
81   extern bool VideoInit(bool classic);
# Line 54 | Line 84 | extern void VideoExit(void);
84   extern void VideoQuitFullScreen(void);
85  
86   extern void VideoInterrupt(void);
87 + extern void VideoRefresh(void);
88  
89 + extern void video_switch_to_mode(const video_mode &mode);
90   extern void video_set_palette(uint8 *pal);
91  
92   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines