|
|
1.1 root 1: /*
1.1.1.5 root 2: Hatari - screen.h
3:
4: This file is distributed under the GNU Public License, version 2 or at your
5: option any later version. Read the file gpl.txt for details.
1.1 root 6: */
7:
1.1.1.5 root 8: #ifndef HATARI_SCREEN_H
9: #define HATARI_SCREEN_H
1.1.1.3 root 10:
11: #include <SDL_video.h> /* for SDL_Surface */
12:
1.1 root 13:
14: /* Frame buffer, used to store details in screen conversion */
1.1.1.5 root 15: typedef struct
16: {
1.1.1.9 ! root 17: Uint16 HBLPalettes[(NUM_VISIBLE_LINES+1)*16]; /* 1x16 colour palette per screen line, +1 line as may write after line 200 */
! 18: Uint32 HBLPaletteMasks[NUM_VISIBLE_LINES+1]; /* Bit mask of palette colours changes, top bit set is resolution change */
! 19: Uint8 *pSTScreen; /* Copy of screen built up during frame (copy each line on HBL to simulate monitor raster) */
! 20: Uint8 *pSTScreenCopy; /* Previous frames copy of above */
! 21: int OverscanModeCopy; /* Previous screen overscan mode */
! 22: BOOL bFullUpdate; /* Set TRUE to cause full update on next draw */
1.1 root 23: } FRAMEBUFFER;
1.1.1.5 root 24:
1.1.1.6 root 25: /* Number of frame buffers (1 or 2) - should be 2 for supporting screen flipping */
26: #define NUM_FRAMEBUFFERS 2
1.1 root 27:
28:
29: /* ST Resolution defines */
1.1.1.5 root 30: enum
31: {
1.1 root 32: ST_LOW_RES,
33: ST_MEDIUM_RES,
34: ST_HIGH_RES,
35: ST_LOWMEDIUM_MIX_RES
36: };
37:
38: /* Update Palette defines */
1.1.1.5 root 39: enum
40: {
1.1 root 41: UPDATE_PALETTE_NONE,
42: UPDATE_PALETTE_UPDATE,
43: UPDATE_PALETTE_FULLUPDATE
44: };
45:
46: /* Palette mask values for 'HBLPaletteMask[]' */
47: #define PALETTEMASK_RESOLUTION 0x00040000
1.1.1.2 root 48: #define PALETTEMASK_PALETTE 0x0000ffff
49: #define PALETTEMASK_UPDATERES 0x20000000
50: #define PALETTEMASK_UPDATEPAL 0x40000000
1.1 root 51: #define PALETTEMASK_UPDATEFULL 0x80000000
52: #define PALETTEMASK_UPDATEMASK (PALETTEMASK_UPDATEFULL|PALETTEMASK_UPDATEPAL|PALETTEMASK_UPDATERES)
53:
54: /* Overscan values */
1.1.1.5 root 55: enum
56: {
1.1.1.2 root 57: OVERSCANMODE_NONE, /* 0x00 */
58: OVERSCANMODE_TOP, /* 0x01 */
59: OVERSCANMODE_BOTTOM /* 0x02 (Top+Bottom) 0x03 */
1.1 root 60: };
61:
1.1.1.2 root 62: /* Available fullscreen modes */
63: #define NUM_DISPLAYMODEOPTIONS 6
1.1.1.5 root 64: enum
65: {
1.1.1.7 root 66: DISPLAYMODE_LOWCOL_LOWRES, /* low color, low resolution (fastest) */
67: DISPLAYMODE_LOWCOL_HIGHRES, /* low color, zoomed resolution */
68: DISPLAYMODE_LOWCOL_DUMMY, /* unused */
69: DISPLAYMODE_HICOL_LOWRES, /* high color, low resolution */
70: DISPLAYMODE_HICOL_HIGHRES, /* high color, zoomed resolution (slowest) */
71: DISPLAYMODE_HICOL_DUMMY /* unused */
1.1.1.2 root 72: };
73:
74:
1.1.1.9 ! root 75: extern BOOL bGrabMouse;
1.1 root 76: extern BOOL bInFullScreen;
77: extern int STRes,PrevSTRes;
1.1.1.9 ! root 78: extern int STScreenStartHorizLine;
! 79: extern int STScreenLeftSkipBytes;
! 80: extern FRAMEBUFFER *pFrameBuffer;
! 81: extern Uint8 *pSTScreen;
1.1.1.3 root 82: extern SDL_Surface *sdlscrn;
1.1.1.9 ! root 83: extern Uint32 STRGBPalette[16];
! 84: extern Uint32 ST2RGB[4096];
1.1 root 85:
86: extern void Screen_Init(void);
87: extern void Screen_UnInit(void);
88: extern void Screen_Reset(void);
89: extern void Screen_SetFullUpdate(void);
90: extern void Screen_EnterFullScreen(void);
91: extern void Screen_ReturnFromFullScreen(void);
1.1.1.6 root 92: extern void Screen_DidResolutionChange(void);
1.1 root 93: extern void Screen_Draw(void);
1.1.1.3 root 94:
1.1.1.5 root 95: #endif /* ifndef HATARI_SCREEN_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.