comparison src/video/xbios/SDL_xbios.h @ 4198:6405314a7c07 SDL-1.2

Define flags for double line and c2p operations. More Milan video work.
author Patrice Mandin <patmandin@gmail.com>
date Sun, 20 Sep 2009 12:08:51 +0000
parents 13de8ea401db
children
comparison
equal deleted inserted replaced
4197:1bf6585720e9 4198:6405314a7c07
28 #include "../SDL_sysvideo.h" 28 #include "../SDL_sysvideo.h"
29 29
30 /* Hidden "this" pointer for the video functions */ 30 /* Hidden "this" pointer for the video functions */
31 #define _THIS SDL_VideoDevice *this 31 #define _THIS SDL_VideoDevice *this
32 32
33 #define XBIOSMODE_DOUBLELINE (1<<0)
34 #define XBIOSMODE_C2P (1<<1)
35
33 typedef struct 36 typedef struct
34 { 37 {
35 Uint16 number; /* Video mode number */ 38 Uint16 number; /* Video mode number */
36 Uint16 width; /* Size */ 39 Uint16 width; /* Size */
37 Uint16 height; 40 Uint16 height;
38 Uint16 depth; /* bits per plane */ 41 Uint16 depth; /* bits per plane */
39 SDL_bool doubleline; /* Double the lines ? */ 42 Uint16 flags;
40 } xbiosmode_t; 43 } xbiosmode_t;
41 44
42 /* Private display data */ 45 /* Private display data */
43 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */ 46 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */
44 47
45 struct SDL_PrivateVideoData { 48 struct SDL_PrivateVideoData {
46 long cookie_vdo; 49 long cookie_vdo;
47 int old_video_mode; /* Old video mode before entering SDL */ 50 long old_video_mode; /* Old video mode before entering SDL */
48 void *old_video_base; /* Old pointer to screen buffer */ 51 void *old_video_base; /* Old pointer to screen buffer */
49 void *old_palette; /* Old palette */ 52 void *old_palette; /* Old palette */
50 Uint32 old_num_colors; /* Nb of colors in saved palette */ 53 Uint32 old_num_colors; /* Nb of colors in saved palette */
51 54
52 void *screens[2]; /* Pointers to aligned screen buffer */ 55 void *screens[2]; /* Pointers to aligned screen buffer */
53 void *screensmem[2]; /* Pointers to screen buffer */ 56 void *screensmem[2]; /* Pointers to screen buffer */
54 void *shadowscreen; /* Shadow screen for c2p conversion */ 57 void *shadowscreen; /* Shadow screen for c2p conversion */
55 int doubleline; /* Double line mode ? */
56 int frame_number; /* Number of frame for double buffer */ 58 int frame_number; /* Number of frame for double buffer */
57 int pitch; /* Destination line width for C2P */ 59 int pitch; /* Destination line width for C2P */
58 int width, height; /* Screen size for centered C2P */
59 60
60 SDL_bool centscreen; /* Centscreen extension present ? */ 61 SDL_bool centscreen; /* Centscreen extension present ? */
61 62
63 xbiosmode_t *current; /* Current set mode */
62 int SDL_nummodes[NUM_MODELISTS]; 64 int SDL_nummodes[NUM_MODELISTS];
63 SDL_Rect **SDL_modelist[NUM_MODELISTS]; 65 SDL_Rect **SDL_modelist[NUM_MODELISTS];
64 xbiosmode_t **SDL_xbiosmode[NUM_MODELISTS]; 66 xbiosmode_t **SDL_xbiosmode[NUM_MODELISTS];
65 }; 67 };
66 68
105 #define XBIOS_oldvbase (this->hidden->old_video_base) 107 #define XBIOS_oldvbase (this->hidden->old_video_base)
106 #define XBIOS_oldvmode (this->hidden->old_video_mode) 108 #define XBIOS_oldvmode (this->hidden->old_video_mode)
107 #define XBIOS_screens (this->hidden->screens) 109 #define XBIOS_screens (this->hidden->screens)
108 #define XBIOS_screensmem (this->hidden->screensmem) 110 #define XBIOS_screensmem (this->hidden->screensmem)
109 #define XBIOS_shadowscreen (this->hidden->shadowscreen) 111 #define XBIOS_shadowscreen (this->hidden->shadowscreen)
110 #define XBIOS_doubleline (this->hidden->doubleline)
111 #define XBIOS_fbnum (this->hidden->frame_number) 112 #define XBIOS_fbnum (this->hidden->frame_number)
112 #define XBIOS_pitch (this->hidden->pitch) 113 #define XBIOS_pitch (this->hidden->pitch)
113 #define XBIOS_width (this->hidden->width)
114 #define XBIOS_height (this->hidden->height)
115 #define XBIOS_centscreen (this->hidden->centscreen) 114 #define XBIOS_centscreen (this->hidden->centscreen)
115 #define XBIOS_current (this->hidden->current)
116 116
117 /*--- Functions prototypes ---*/ 117 /*--- Functions prototypes ---*/
118 118
119 void SDL_XBIOS_AddMode(_THIS, int actually_add, const xbiosmode_t *modeinfo); 119 void SDL_XBIOS_AddMode(_THIS, int actually_add, const xbiosmode_t *modeinfo);
120 120