1 |
/* |
2 |
* video.h - Video/graphics emulation |
3 |
* |
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 |
8 |
* the Free Software Foundation; either version 2 of the License, or |
9 |
* (at your option) any later version. |
10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
*/ |
20 |
|
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 |
32 |
}; |
33 |
|
34 |
#define IsDirectMode(x) ((x) == VMODE_16BIT || (x) == VMODE_32BIT) |
35 |
|
36 |
struct video_desc { |
37 |
uint32 mac_frame_base; // Mac frame buffer address |
38 |
uint32 bytes_per_row; // Bytes per row |
39 |
uint32 x; // X size of screen (pixels) |
40 |
uint32 y; // Y size of screen (pixels) |
41 |
int mode; // Video mode |
42 |
}; |
43 |
|
44 |
extern struct video_desc VideoMonitor; // Description of the main monitor, set by VideoInit() |
45 |
|
46 |
extern int16 VideoDriverOpen(uint32 pb, uint32 dce); |
47 |
extern int16 VideoDriverControl(uint32 pb, uint32 dce); |
48 |
extern int16 VideoDriverStatus(uint32 pb, uint32 dce); |
49 |
|
50 |
// System specific and internal functions/data |
51 |
extern bool VideoInit(bool classic); |
52 |
extern void VideoExit(void); |
53 |
|
54 |
extern void VideoQuitFullScreen(void); |
55 |
|
56 |
extern void VideoInterrupt(void); |
57 |
extern void VideoRefresh(void); |
58 |
|
59 |
extern void video_set_palette(uint8 *pal); |
60 |
|
61 |
#endif |