comparison src/video/xbios/SDL_xbios.h @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents d910939febfa
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
37 */ 37 */
38 #define SDL_NUMMODES 16 38 #define SDL_NUMMODES 16
39 39
40 typedef struct 40 typedef struct
41 { 41 {
42 Uint16 number; /* Video mode number */ 42 Uint16 number; /* Video mode number */
43 Uint16 width; /* Size */ 43 Uint16 width; /* Size */
44 Uint16 height; 44 Uint16 height;
45 Uint16 depth; /* bits per plane */ 45 Uint16 depth; /* bits per plane */
46 SDL_bool doubleline; /* Double the lines ? */ 46 SDL_bool doubleline; /* Double the lines ? */
47 } xbiosmode_t; 47 } xbiosmode_t;
48 48
49 /* Private display data */ 49 /* Private display data */
50 #define NUM_MODELISTS 2 /* 8 and 16 bits-per-pixel */ 50 #define NUM_MODELISTS 2 /* 8 and 16 bits-per-pixel */
51 51
52 struct SDL_PrivateVideoData { 52 struct SDL_PrivateVideoData
53 long cookie_vdo; 53 {
54 int old_video_mode; /* Old video mode before entering SDL */ 54 long cookie_vdo;
55 void *old_video_base; /* Old pointer to screen buffer */ 55 int old_video_mode; /* Old video mode before entering SDL */
56 void *old_palette; /* Old palette */ 56 void *old_video_base; /* Old pointer to screen buffer */
57 Uint32 old_num_colors; /* Nb of colors in saved palette */ 57 void *old_palette; /* Old palette */
58 int num_modes; /* Number of xbios video modes */ 58 Uint32 old_num_colors; /* Nb of colors in saved palette */
59 xbiosmode_t *mode_list; /* List of xbios video modes */ 59 int num_modes; /* Number of xbios video modes */
60 xbiosmode_t *mode_list; /* List of xbios video modes */
60 61
61 void *screens[2]; /* Pointers to aligned screen buffer */ 62 void *screens[2]; /* Pointers to aligned screen buffer */
62 void *screensmem[2]; /* Pointers to screen buffer */ 63 void *screensmem[2]; /* Pointers to screen buffer */
63 void *shadowscreen; /* Shadow screen for c2p conversion */ 64 void *shadowscreen; /* Shadow screen for c2p conversion */
64 int doubleline; /* Double line mode ? */ 65 int doubleline; /* Double line mode ? */
65 int frame_number; /* Number of frame for double buffer */ 66 int frame_number; /* Number of frame for double buffer */
66 int pitch; /* Destination line width for C2P */ 67 int pitch; /* Destination line width for C2P */
67 int width, height; /* Screen size for centered C2P */ 68 int width, height; /* Screen size for centered C2P */
68 69
69 SDL_bool centscreen; /* Centscreen extension present ? */ 70 SDL_bool centscreen; /* Centscreen extension present ? */
70 71
71 SDL_Rect *SDL_modelist[NUM_MODELISTS][SDL_NUMMODES+1]; 72 SDL_Rect *SDL_modelist[NUM_MODELISTS][SDL_NUMMODES + 1];
72 xbiosmode_t *videomodes[NUM_MODELISTS][SDL_NUMMODES+1]; 73 xbiosmode_t *videomodes[NUM_MODELISTS][SDL_NUMMODES + 1];
73 }; 74 };
74 75
75 /* _VDO cookie values */ 76 /* _VDO cookie values */
76 enum { 77 enum
77 VDO_ST=0, 78 {
78 VDO_STE, 79 VDO_ST = 0,
79 VDO_TT, 80 VDO_STE,
80 VDO_F30 81 VDO_TT,
82 VDO_F30
81 }; 83 };
82 84
83 /* Monitor types */ 85 /* Monitor types */
84 enum { 86 enum
85 MONITOR_MONO=0, 87 {
86 MONITOR_TV, 88 MONITOR_MONO = 0,
87 MONITOR_VGA, 89 MONITOR_TV,
88 MONITOR_RGB 90 MONITOR_VGA,
91 MONITOR_RGB
89 }; 92 };
90 93
91 /* EgetShift masks */ 94 /* EgetShift masks */
92 #define ES_BANK 0x000f 95 #define ES_BANK 0x000f
93 #define ES_MODE 0x0700 96 #define ES_MODE 0x0700
123 #define XBIOS_height (this->hidden->height) 126 #define XBIOS_height (this->hidden->height)
124 #define XBIOS_centscreen (this->hidden->centscreen) 127 #define XBIOS_centscreen (this->hidden->centscreen)
125 128
126 /*--- Functions prototypes ---*/ 129 /*--- Functions prototypes ---*/
127 130
128 void SDL_XBIOS_AddMode(_THIS, Uint16 modecode, Uint16 width, Uint16 height, 131 void SDL_XBIOS_AddMode (_THIS, Uint16 modecode, Uint16 width, Uint16 height,
129 Uint16 depth, SDL_bool flags); 132 Uint16 depth, SDL_bool flags);
130 133
131 #endif /* _SDL_xbios_h */ 134 #endif /* _SDL_xbios_h */
135 /* vi: set ts=4 sw=4 expandtab: */