diff src/video/gem/SDL_gemvideo.h @ 736:028e03e273c8

Use new C2P routine + corrections for iconification window
author Patrice Mandin <patmandin@gmail.com>
date Wed, 12 Nov 2003 18:49:29 +0000
parents 0ce5a68278fd
children b8d311d90021
line wrap: on
line diff
--- a/src/video/gem/SDL_gemvideo.h	Wed Nov 12 18:46:48 2003 +0000
+++ b/src/video/gem/SDL_gemvideo.h	Wed Nov 12 18:49:29 2003 +0000
@@ -39,37 +39,49 @@
 
 /* Private display data */
 
+#define B2S_C2P_1TO2		(1<<0)	/* C2P convert buffer 1 to buffer 2 */
+#define B2S_C2P_1TOS		(1<<1)	/* C2P convert buffer 1 to screen */
+#define B2S_VROCPYFM_1TOS	(1<<2)	/* vro_cpyfm() buffer 1 to screen */
+#define B2S_VROCPYFM_2TOS	(1<<3)	/* vro_cpyfm() buffer 2 to screen */
+
 #define SDL_NUMMODES	1		/* Fullscreen */
 
 struct SDL_PrivateVideoData {
+	Uint16	buf2scr_ops;		/* Operations to get buffer to screen */
+    void *buffer1;				/* Our shadow buffers */
+	void *buffer2;
+
 	/* VDI infos */
 	short vdi_handle;			/* VDI handle */
 	short full_w, full_h;		/* Fullscreen size */
-    int bpp;					/* Colour depth */
-	int pixelsize;				/* Bytes per pixel */
-	Uint16 old_numcolors;		/* Number of colors in saved palette */
-	Uint16 old_palette[256][3];	/* Saved current palette */
+    short bpp;					/* Colour depth */
+	short pixelsize;			/* Bytes per pixel */
+	short old_numcolors;		/* Number of colors in saved palette */
 	Uint16 pitch;				/* Line length */
-	int format;					/* Screen format */
+	Uint16 format;				/* Screen format */
 	void *screen;				/* Screen address */
 	Uint32 red, green, blue, alpha;	/* Screen components */
 	Uint32 screensize;
+	short	blit_coords[8];		/* Coordinates for bitblt */
 	MFDB	src_mfdb, dst_mfdb;	/* VDI MFDB for bitblt */
-	short	blit_coords[8];		/* Coordinates for bitblt */
+	Uint16 old_palette[256][3];	/* Saved current palette */
+
 	/* GEM infos */
 	short desk_x, desk_y;		/* Desktop properties */
 	short desk_w, desk_h;
 	short win_handle;			/* Our window handle */
-    void *buffer;				/* Our shadow buffer */
 	int window_type;			/* Window type */
 	const char *title_name;		/* Window title */
 	const char *icon_name;		/* Icon title */
 	short version;				/* AES version */
 	short wfeatures;			/* AES window features */
+	SDL_bool refresh_name;		/* Change window title ? */
 	SDL_bool window_fulled;		/* Window maximized ? */
 	SDL_bool mouse_relative;	/* Report relative mouse movement */
 	SDL_bool locked;			/* AES locked for fullscreen ? */
+	short message[8];			/* To self-send an AES message */
 	SDL_Rect *SDL_modelist[SDL_NUMMODES+1];	/* Mode list */
+	SDL_Surface *icon;			/* The icon */
 };
 
 /* Hidden structure -> variables names */
@@ -97,15 +109,66 @@
 #define GEM_desk_w			(this->hidden->desk_w)
 #define GEM_desk_h			(this->hidden->desk_h)
 #define GEM_handle			(this->hidden->win_handle)
-#define GEM_buffer			(this->hidden->buffer)
 #define GEM_win_type		(this->hidden->window_type)
 #define GEM_title_name		(this->hidden->title_name)
 #define GEM_icon_name		(this->hidden->icon_name)
+#define GEM_refresh_name	(this->hidden->refresh_name)
 #define GEM_version			(this->hidden->version)
 #define GEM_wfeatures		(this->hidden->wfeatures)
 #define GEM_win_fulled		(this->hidden->window_fulled)
 #define GEM_mouse_relative	(this->hidden->mouse_relative)
 #define GEM_locked			(this->hidden->locked)
+#define GEM_message			(this->hidden->message)
 #define SDL_modelist		(this->hidden->SDL_modelist)
+#define GEM_icon			(this->hidden->icon)
+
+#define GEM_buffer1			(this->hidden->buffer1)
+#define GEM_buffer2			(this->hidden->buffer2)
+#define GEM_bufops			(this->hidden->buf2scr_ops)
+
+#define VDI_FBMASK(amask, rmask, gmask, bmask) \
+	VDI_alphamask = (amask); \
+	VDI_redmask = (rmask); \
+	VDI_greenmask = (gmask); \
+	VDI_bluemask = (bmask);
+
+/*
+	Possible buffer to screen operations:
+
+	TC: 8 (chunky),15,16,24,32 bpp
+	8I: 8 bpp planes
+	FB: screen framebuffer address available
+	FS: fullscreen
+
+	TC, FB, FS:
+		- draw to screen
+	8I, FB, FS:
+		- draw to buffer 1
+		- C2P from buffer 1 to screen
+
+	TC, !FB, FS:
+		- draw to buffer 1
+		- vro_cpyfm() from buffer 1 to screen
+	8I, !FB, FS:
+		- draw to buffer 1
+		- C2P from buffer 1 to buffer 2
+		- vro_cpyfm() from buffer 2 to screen
+
+	TC, FB, !FS:
+		- draw to buffer 1
+		- vro_cpyfm() from buffer 1 to screen
+	8I, FB, !FS:
+		- draw to buffer 1
+		- C2P from buffer 1 to buffer 2
+		- vro_cpyfm() from buffer 2 to screen
+
+	TC, !FB, !FS:
+		- draw to buffer 1
+		- vro_cpyfm() from buffer 1 to screen
+	8I, !FB, !FS:
+		- draw to buffer 1
+		- C2P from buffer 1 to buffer 2
+		- vro_cpyfm() from buffer 2 to screen
+*/
 
 #endif /* _SDL_gemvideo_h */