|
Odamex
Setting the Standard in Multiplayer Doom
|
00001 // Emacs style mode select -*- C++ -*- 00002 //----------------------------------------------------------------------------- 00003 // 00004 // $Id: i_video.h 1999 2010-11-20 01:17:17Z hypereye $ 00005 // 00006 // Copyright (C) 1993-1996 by id Software, Inc. 00007 // Copyright (C) 2006-2010 by The Odamex Team. 00008 // 00009 // This program is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU General Public License 00011 // as published by the Free Software Foundation; either version 2 00012 // of the License, or (at your option) any later version. 00013 // 00014 // This program is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // DESCRIPTION: 00020 // System specific interface stuff. 00021 // [Odamex] Fitted to work with SDL 00022 // 00023 //----------------------------------------------------------------------------- 00024 00025 00026 #ifndef __I_VIDEO_H__ 00027 #define __I_VIDEO_H__ 00028 00029 #include "doomtype.h" 00030 #include "v_video.h" 00031 00032 // [RH] True if the display is not in a window 00033 extern BOOL Fullscreen; 00034 00035 00036 // [RH] Set the display mode 00037 void I_SetMode (int &width, int &height, int &bits); 00038 00039 // Takes full 8 bit values. 00040 void I_SetPalette (DWORD *palette); 00041 00042 /* 00043 12/3/06: Old Timey Palette method, used for red screen only as of 00044 this writing. It accepts a byte instead of a DWORD. It 00045 is restricted only to the red screen because of that. 00046 */ 00047 void I_SetOldPalette (byte *doompalette); 00048 00049 void I_BeginUpdate (void); // [RH] Locks screen[0] 00050 void I_FinishUpdate (void); 00051 void I_FinishUpdateNoBlit (void); 00052 00053 // Wait for vertical retrace or pause a bit. 00054 void I_WaitVBL(int count); 00055 00056 void I_ReadScreen (byte *scr); 00057 00058 void I_BeginRead (void); 00059 void I_EndRead (void); 00060 00061 void I_SetWindowCaption(void); 00062 void I_SetWindowIcon(void); 00063 00064 bool I_CheckResolution (int width, int height, int bpp); 00065 void I_ClosestResolution (int *width, int *height, int bits); 00066 bool I_SetResolution (int width, int height, int bpp); 00067 00068 bool I_CheckVideoDriver (const char *name); 00069 00070 bool I_SetOverscan (float scale); 00071 00072 void I_StartModeIterator (int bits); 00073 bool I_NextMode (int *width, int *height); 00074 00075 DCanvas *I_AllocateScreen (int width, int height, int bits, bool primary = false); 00076 void I_FreeScreen (DCanvas *canvas); 00077 00078 void I_LockScreen (DCanvas *canvas); 00079 void I_UnlockScreen (DCanvas *canvas); 00080 void I_Blit (DCanvas *src, int srcx, int srcy, int srcwidth, int srcheight, 00081 DCanvas *dest, int destx, int desty, int destwidth, int destheight); 00082 00083 enum EDisplayType 00084 { 00085 DISPLAY_WindowOnly, 00086 DISPLAY_FullscreenOnly, 00087 DISPLAY_Both 00088 }; 00089 00090 EDisplayType I_DisplayType (); 00091 00092 00093 #endif // __I_VIDEO_H__