|
|
1.1.1.2 ! root 1: /* ! 2: Copyright (C) 1997-2001 Id Software, Inc. ! 3: ! 4: This program is free software; you can redistribute it and/or ! 5: modify it under the terms of the GNU General Public License ! 6: as published by the Free Software Foundation; either version 2 ! 7: of the License, or (at your option) any later version. ! 8: ! 9: This program is distributed in the hope that it will be useful, ! 10: but WITHOUT ANY WARRANTY; without even the implied warranty of ! 11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! 12: ! 13: See the GNU General Public License for more details. ! 14: ! 15: You should have received a copy of the GNU General Public License ! 16: along with this program; if not, write to the Free Software ! 17: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! 18: ! 19: */ 1.1 root 20: #ifndef __RW_WIN_H__ 21: #define __RW_WIN_H__ 22: 23: #include <windows.h> 24: #include <ddraw.h> 25: 26: typedef struct 27: { 28: HINSTANCE hInstance; 29: void *wndproc; 30: HDC hDC; // global DC we're using 31: HWND hWnd; // HWND of parent window 32: 33: HDC hdcDIBSection; // DC compatible with DIB section 34: HBITMAP hDIBSection; // DIB section 35: unsigned char *pDIBBase; // DIB base pointer, NOT used directly for rendering! 36: 37: HPALETTE hPal; // palette we're using 38: HPALETTE hpalOld; // original system palette 39: COLORREF oldsyscolors[20]; // original system colors 40: 41: HINSTANCE hinstDDRAW; // library instance for DDRAW.DLL 42: LPDIRECTDRAW lpDirectDraw; // pointer to DirectDraw object 43: 44: LPDIRECTDRAWSURFACE lpddsFrontBuffer; // video card display memory front buffer 45: LPDIRECTDRAWSURFACE lpddsBackBuffer; // system memory backbuffer 46: LPDIRECTDRAWSURFACE lpddsOffScreenBuffer; // system memory backbuffer 47: LPDIRECTDRAWPALETTE lpddpPalette; // DirectDraw palette 48: 49: qboolean palettized; // true if desktop is paletted 50: qboolean modex; 51: 52: qboolean initializing; 53: } swwstate_t; 54: 55: extern swwstate_t sww_state; 56: 57: /* 58: ** DIB code 59: */ 60: qboolean DIB_Init( unsigned char **ppbuffer, int *ppitch ); 61: void DIB_Shutdown( void ); 62: void DIB_SetPalette( const unsigned char *palette ); 63: 64: qboolean DDRAW_Init( unsigned char **ppbuffer, int *ppitch ); 65: void DDRAW_Shutdown( void ); 66: void DDRAW_SetPalette( const unsigned char *palette ); 67: 68: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.