comparison src/video/nanox/SDL_nxvideo.h @ 30:57bf11a5efd7

Added initial support for Nano-X (thanks Hsieh-Fu!)
author Sam Lantinga <slouken@lokigames.com>
date Fri, 11 May 2001 01:13:35 +0000
parents
children e8157fcb3114
comparison
equal deleted inserted replaced
29:a8360daed17d 30:57bf11a5efd7
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga
4 Copyright (C) 2001 Hsieh-Fu Tsai
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library 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 GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the Free
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 Sam Lantinga
21 slouken@devolution.com
22
23 Hsieh-Fu Tsai
24 clare@setabox.com
25 */
26
27 #ifndef _SDL_nxvideo_h
28 #define _SDL_nxvideo_h
29
30 #include <microwin/nano-X.h>
31
32 #include "SDL_sysvideo.h"
33
34 #ifdef ENABLE_NANOX_DEBUG
35 #define Dprintf printf
36 #else
37 #define Dprintf(ignore...)
38 #endif
39
40 // Hidden "this" pointer for the video functions
41 #define _THIS SDL_VideoDevice * this
42
43 // Private display data
44 typedef struct NX_SDL_VISUAL {
45 int bpp ;
46 Uint32 red_mask ;
47 Uint32 green_mask ;
48 Uint32 blue_mask ;
49 } nx_sdl_visual_t ;
50
51 struct SDL_PrivateVideoData {
52 GR_WINDOW_ID SDL_Window ;
53 GR_WINDOW_ID FSwindow ;
54 // Flag: true if we have been passed a window
55 char * SDL_windowid ;
56 GR_GC_ID GC ;
57 unsigned char * Image ;
58 unsigned char * Image_buff ;
59 nx_sdl_visual_t SDL_Visual ;
60 // The current list of available video modes
61 SDL_Rect ** modelist ;
62 int currently_fullscreen ;
63 // for fullscreen
64 int OffsetX, OffsetY ;
65 // for GammaRamp
66 Uint16 * GammaRamp_R, * GammaRamp_G, * GammaRamp_B ;
67 // for GrArea, r_mask, g_mask, b_mask
68 int pixel_type ;
69 } ;
70
71 #define SDL_Window (this -> hidden -> SDL_Window)
72 #define FSwindow (this -> hidden -> FSwindow)
73 #define SDL_windowid (this -> hidden -> SDL_windowid)
74 #define SDL_GC (this -> hidden -> GC)
75 #define SDL_Image (this -> hidden -> Image)
76 #define Image_buff (this -> hidden -> Image_buff)
77 #define SDL_Visual (this -> hidden -> SDL_Visual)
78 #define SDL_modelist (this -> hidden -> modelist)
79 #define currently_fullscreen (this -> hidden -> currently_fullscreen)
80 #define OffsetX (this -> hidden -> OffsetX)
81 #define OffsetY (this -> hidden -> OffsetY)
82 #define GammaRamp_R (this -> hidden -> GammaRamp_R)
83 #define GammaRamp_G (this -> hidden -> GammaRamp_G)
84 #define GammaRamp_B (this -> hidden -> GammaRamp_B)
85 #define pixel_type (this -> hidden -> pixel_type)
86
87 #define CI_SIZE 256 // color index size
88
89 #endif // _SDL_nxvideo_h