|
|
1.1 root 1: /*
2: Hatari - hostscreen.h
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
6: */
7:
8: #ifndef HATARI_HOSTSCREEN_H
9: #define HATARI_HOSTSCREEN_H
10:
11: #include <SDL.h>
12:
13: #include "araglue.h"
14:
15: /**
16: * This macro handles the endianity for 24 bit per item data
17: **/
18: #if SDL_BYTEORDER == SDL_BIG_ENDIAN
19:
20: #define putBpp24Pixel( address, color ) \
21: { \
22: ((Uint8*)(address))[0] = ((color) >> 16) & 0xff; \
23: ((Uint8*)(address))[1] = ((color) >> 8) & 0xff; \
24: ((Uint8*)(address))[2] = (color) & 0xff; \
25: }
26:
27: #define getBpp24Pixel( address ) \
28: ( ((uint32)(address)[0] << 16) | ((uint32)(address)[1] << 8) | (uint32)(address)[2] )
29:
30: #else
31:
32: #define putBpp24Pixel( address, color ) \
33: { \
34: ((Uint8*)(address))[0] = (color) & 0xff; \
35: ((Uint8*)(address))[1] = ((color) >> 8) & 0xff; \
36: ((Uint8*)(address))[2] = ((color) >> 16) & 0xff; \
37: }
38:
39: #define getBpp24Pixel( address ) \
40: ( ((uint32)(address)[2] << 16) | ((uint32)(address)[1] << 8) | (uint32)(address)[0] )
41:
42: #endif
43:
44:
45: extern void HostScreen_Init(void);
46: extern void HostScreen_UnInit(void);
47: extern void HostScreen_toggleFullScreen(void);
48: extern BOOL HostScreen_renderBegin(void);
49: extern void HostScreen_renderEnd(void);
50: extern void HostScreen_update1(BOOL forced);
51: extern void HostScreen_update0(void);
52: extern uint32 HostScreen_getBpp(void); /* Bytes per pixel */
53: extern uint32 HostScreen_getBitsPerPixel(void);
54: extern uint32 HostScreen_getPitch(void);
55: extern uint32 HostScreen_getWidth(void);
56: extern uint32 HostScreen_getHeight(void);
57: extern uint8 * HostScreen_getVideoramAddress(void);
58: extern void HostScreen_setPaletteColor( uint8 idx, uint32 red, uint32 green, uint32 blue );
59: extern uint32 HostScreen_getPaletteColor( uint8 idx );
60: extern void HostScreen_updatePalette( uint16 colorCount );
61: extern uint32 HostScreen_getColor( uint32 red, uint32 green, uint32 blue );
62: extern void HostScreen_setWindowSize(uint32 width, uint32 height, uint32 bpp);
63: extern void HostScreen_bitplaneToChunky(uint16 *atariBitplaneData, uint16 bpp, uint8 colorValues[16]);
64:
65: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.