|
|
1.1 root 1: #ifndef __RW_WIN_H__
2: #define __RW_WIN_H__
3:
4: #include <windows.h>
5: #include <ddraw.h>
6:
7: typedef struct
8: {
9: HINSTANCE hInstance;
10: void *wndproc;
11: HDC hDC; // global DC we're using
12: HWND hWnd; // HWND of parent window
13:
14: HDC hdcDIBSection; // DC compatible with DIB section
15: HBITMAP hDIBSection; // DIB section
16: unsigned char *pDIBBase; // DIB base pointer, NOT used directly for rendering!
17:
18: HPALETTE hPal; // palette we're using
19: HPALETTE hpalOld; // original system palette
20: COLORREF oldsyscolors[20]; // original system colors
21:
22: HINSTANCE hinstDDRAW; // library instance for DDRAW.DLL
23: LPDIRECTDRAW lpDirectDraw; // pointer to DirectDraw object
24:
25: LPDIRECTDRAWSURFACE lpddsFrontBuffer; // video card display memory front buffer
26: LPDIRECTDRAWSURFACE lpddsBackBuffer; // system memory backbuffer
27: LPDIRECTDRAWSURFACE lpddsOffScreenBuffer; // system memory backbuffer
28: LPDIRECTDRAWPALETTE lpddpPalette; // DirectDraw palette
29:
30: qboolean palettized; // true if desktop is paletted
31: qboolean modex;
32:
33: qboolean initializing;
34: } swwstate_t;
35:
36: extern swwstate_t sww_state;
37:
38: /*
39: ** DIB code
40: */
41: qboolean DIB_Init( unsigned char **ppbuffer, int *ppitch );
42: void DIB_Shutdown( void );
43: void DIB_SetPalette( const unsigned char *palette );
44:
45: qboolean DDRAW_Init( unsigned char **ppbuffer, int *ppitch );
46: void DDRAW_Shutdown( void );
47: void DDRAW_SetPalette( const unsigned char *palette );
48:
49: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.