| 1 |
/* Emacs style mode select -*- C -*- |
| 2 |
*----------------------------------------------------------------------------- |
| 3 |
* |
| 4 |
* |
| 5 |
* PrBoom: a Doom port merged with LxDoom and LSDLDoom |
| 6 |
* based on BOOM, a modified and improved DOOM engine |
| 7 |
* Copyright (C) 1999 by |
| 8 |
* id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman |
| 9 |
* Copyright (C) 1999-2000 by |
| 10 |
* Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze |
| 11 |
* Copyright 2005, 2006 by |
| 12 |
* Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko |
| 13 |
* |
| 14 |
* This program is free software; you can redistribute it and/or |
| 15 |
* modify it under the terms of the GNU General Public License |
| 16 |
* as published by the Free Software Foundation; either version 2 |
| 17 |
* of the License, or (at your option) any later version. |
| 18 |
* |
| 19 |
* This program is distributed in the hope that it will be useful, |
| 20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
* GNU General Public License for more details. |
| 23 |
* |
| 24 |
* You should have received a copy of the GNU General Public License |
| 25 |
* along with this program; if not, write to the Free Software |
| 26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 27 |
* 02111-1307, USA. |
| 28 |
* |
| 29 |
* DESCRIPTION: |
| 30 |
* System specific interface stuff. |
| 31 |
* |
| 32 |
*-----------------------------------------------------------------------------*/ |
| 33 |
|
| 34 |
#ifndef __I_VIDEO__ |
| 35 |
#define __I_VIDEO__ |
| 36 |
|
| 37 |
#ifdef HAVE_CONFIG_H |
| 38 |
#include "config.h" |
| 39 |
#endif |
| 40 |
|
| 41 |
#include <SDL_opengl.h> |
| 42 |
|
| 43 |
#include "doomtype.h" |
| 44 |
#include "v_video.h" |
| 45 |
#include "SDL.h" |
| 46 |
|
| 47 |
extern SDL_Window *sdl_window; |
| 48 |
extern SDL_Renderer *sdl_renderer; |
| 49 |
|
| 50 |
extern SDL_Rect renderer_rect; |
| 51 |
extern SDL_Rect window_rect; |
| 52 |
extern SDL_Rect viewport_rect; |
| 53 |
|
| 54 |
extern const char *screen_resolutions_list[]; |
| 55 |
|
| 56 |
extern const char *sdl_video_window_pos; |
| 57 |
|
| 58 |
void I_PreInitGraphics(void); /* CPhipps - do stuff immediately on start */ |
| 59 |
void I_InitScreenResolution(void); /* init resolution */ |
| 60 |
void I_SetWindowCaption(void); /* Set the window caption */ |
| 61 |
void I_SetWindowIcon(void); /* Set the application icon */ |
| 62 |
void I_InitGraphics (void); |
| 63 |
void I_UpdateVideoMode(void); |
| 64 |
void I_ShutdownGraphics(void); |
| 65 |
|
| 66 |
/* Takes full 8 bit values. */ |
| 67 |
void I_SetPalette(int pal); /* CPhipps - pass down palette number */ |
| 68 |
|
| 69 |
void I_QueueFrameCapture(void); |
| 70 |
void I_QueueScreenshot(void); |
| 71 |
void I_HandleCapture(void); |
| 72 |
|
| 73 |
void I_FinishUpdate (void); |
| 74 |
|
| 75 |
int I_ScreenShot (const char *fname); |
| 76 |
// NSM expose lower level screen data grab for vidcap |
| 77 |
unsigned char *I_GrabScreen (void); |
| 78 |
|
| 79 |
/* I_StartTic |
| 80 |
* Called by D_DoomLoop, |
| 81 |
* called before processing each tic in a frame. |
| 82 |
* Quick syncronous operations are performed here. |
| 83 |
* Can call D_PostEvent. |
| 84 |
*/ |
| 85 |
void I_StartTic (void); |
| 86 |
|
| 87 |
/* I_StartFrame |
| 88 |
* Called by D_DoomLoop, |
| 89 |
* called before processing any tics in a frame |
| 90 |
* (just after displaying a frame). |
| 91 |
* Time consuming syncronous operations |
| 92 |
* are performed here (joystick reading). |
| 93 |
* Can call D_PostEvent. |
| 94 |
*/ |
| 95 |
|
| 96 |
void I_StartFrame (void); |
| 97 |
|
| 98 |
extern int desired_fullscreen; //e6y |
| 99 |
extern int exclusive_fullscreen; |
| 100 |
|
| 101 |
void I_UpdateRenderSize(void); // Handle potential |
| 102 |
extern int renderW; // resolution scaling |
| 103 |
extern int renderH; // - DTIED |
| 104 |
|
| 105 |
extern dboolean window_focused; |
| 106 |
dboolean I_WindowFocused(void); |
| 107 |
void UpdateGrab(void); |
| 108 |
|
| 109 |
void I_SetWindowRect(void); |
| 110 |
void I_SetViewportRect(void); |
| 111 |
|
| 112 |
#endif |