src/video/riscos/SDL_riscosvideo.c
branchSDL-1.2
changeset 12914 87d60cae0273
parent 12913 d07b4feae69c
equal deleted inserted replaced
12913:d07b4feae69c 12914:87d60cae0273
    58 static int RISCOS_AllocHWSurface(_THIS, SDL_Surface *surface);
    58 static int RISCOS_AllocHWSurface(_THIS, SDL_Surface *surface);
    59 static int RISCOS_LockHWSurface(_THIS, SDL_Surface *surface);
    59 static int RISCOS_LockHWSurface(_THIS, SDL_Surface *surface);
    60 static void RISCOS_UnlockHWSurface(_THIS, SDL_Surface *surface);
    60 static void RISCOS_UnlockHWSurface(_THIS, SDL_Surface *surface);
    61 static void RISCOS_FreeHWSurface(_THIS, SDL_Surface *surface);
    61 static void RISCOS_FreeHWSurface(_THIS, SDL_Surface *surface);
    62 
    62 
       
    63 #define MODE_350(type, xdpi, ydpi) \
       
    64 	(1 | (xdpi << 1) | (ydpi << 13) | (type << 27))
       
    65 #define MODE_521(type, xeig, yeig, flags) \
       
    66 	(0x78000001 | (xeig << 4) | (yeig << 6) | (flags & 0xFF00) | (type << 20))
       
    67 
    63 /* Table of known pixel formats */
    68 /* Table of known pixel formats */
    64 const RISCOS_SDL_PixelFormat *RISCOS_SDL_PixelFormats = (const RISCOS_SDL_PixelFormat[]) {
    69 const RISCOS_SDL_PixelFormat *RISCOS_SDL_PixelFormats = (const RISCOS_SDL_PixelFormat[]) {
    65 /* 8bpp palettized */
    70 /* 8bpp palettized */
    66 { { 255,   0x0080, 3,         28 }, 8, 0, 0, 0 },
    71 { { 255,   0x0080, 3,                      28 }, 8, 0, 0, 0 },
    67 /* 12bpp true colour */
    72 /* 12bpp true colour */
    68 { { 4095,  0x0000, 4, 0x79004051 }, 12, 0x0f,     0x0f<<4, 0x0f<<8  },
    73 { { 4095,  0x0000, 4, MODE_521(16,1,1,0)      }, 12, 0x0f,     0x0f<<4, 0x0f<<8  },
    69 { { 4095,  0x4000, 4, 0x79004051 }, 12, 0x0f<<8,  0x0f<<4, 0x0f     },
    74 { { 4095,  0x4000, 4, MODE_521(16,1,1,0x4000) }, 12, 0x0f<<8,  0x0f<<4, 0x0f     },
    70 /* 15bpp true colour */
    75 /* 15bpp true colour */
    71 { { 65535, 0x0000, 4, 0x28168003 }, 15, 0x1f,     0x1f<<5, 0x1f<<10 },
    76 { { 65535, 0x0000, 4, MODE_350(5,90,90)       }, 15, 0x1f,     0x1f<<5, 0x1f<<10 },
    72 { { 65535, 0x4000, 4, 0x78504051 }, 15, 0x1f<<10, 0x1f<<5, 0x1f     },
    77 { { 65535, 0x4000, 4, MODE_521(5,1,1,0x4000)  }, 15, 0x1f<<10, 0x1f<<5, 0x1f     },
    73 /* 16bpp true colour */
    78 /* 16bpp true colour */
    74 { { 65535, 0x0080, 4, 0x50168003 }, 16, 0x1f,     0x3f<<5, 0x1f<<11 },
    79 { { 65535, 0x0080, 4, MODE_350(10,90,90)      }, 16, 0x1f,     0x3f<<5, 0x1f<<11 },
    75 { { 65535, 0x4080, 4, 0x78A04051 }, 16, 0x1f<<11, 0x3f<<5, 0x1f     },
    80 { { 65535, 0x4080, 4, MODE_521(10,1,1,0x4000) }, 16, 0x1f<<11, 0x3f<<5, 0x1f     },
    76 /* 32bpp true colour */
    81 /* 32bpp true colour */
    77 { { -1,    0x0000, 5, 0x30168003 }, 32, 0xff,     0xff<<8, 0xff<<16 },
    82 { { -1,    0x0000, 5, MODE_350(6,90,90)       }, 32, 0xff,     0xff<<8, 0xff<<16 },
    78 { { -1,    0x4000, 5, 0x78604051 }, 32, 0xff<<16, 0xff<<8, 0xff     },
    83 { { -1,    0x4000, 5, MODE_521(6,1,1,0x4000)  }, 32, 0xff<<16, 0xff<<8, 0xff     },
    79 /* Terminator */
    84 /* Terminator */
    80 { },
    85 { },
    81 };
    86 };
    82 
    87 
    83 const RISCOS_SDL_PixelFormat *RISCOS_CurrentPixelFormat()
    88 const RISCOS_SDL_PixelFormat *RISCOS_CurrentPixelFormat()