i_video.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. #ifndef __I_VIDEO__
  34. #define __I_VIDEO__
  35. #ifdef HAVE_CONFIG_H
  36. #include "config.h"
  37. #endif
  38. #ifdef GL_DOOM
  39. #include <SDL_opengl.h>
  40. #endif
  41. #include "doomtype.h"
  42. #include "v_video.h"
  43. #include "SDL.h"
  44. #ifdef __GNUG__
  45. #pragma interface
  46. #endif
  47. extern int render_vsync;
  48. extern int render_screen_multiply;
  49. extern int screen_multiply;
  50. extern SDL_Window *sdl_window;
  51. extern SDL_Renderer *sdl_renderer;
  52. extern const char *screen_resolutions_list[];
  53. extern const char *screen_resolution;
  54. extern const char *sdl_video_window_pos;
  55. void I_PreInitGraphics(void); /* CPhipps - do stuff immediately on start */
  56. void I_InitScreenResolution(void); /* init resolution */
  57. void I_SetWindowCaption(void); /* Set the window caption */
  58. void I_SetWindowIcon(void); /* Set the application icon */
  59. void I_InitGraphics (void);
  60. void I_UpdateVideoMode(void);
  61. void I_ShutdownGraphics(void);
  62. /* Takes full 8 bit values. */
  63. void I_SetPalette(int pal); /* CPhipps - pass down palette number */
  64. void I_UpdateNoBlit (void);
  65. void I_FinishUpdate (void);
  66. int I_ScreenShot (const char *fname);
  67. // NSM expose lower level screen data grab for vidcap
  68. unsigned char *I_GrabScreen (void);
  69. /* I_StartTic
  70. * Called by D_DoomLoop,
  71. * called before processing each tic in a frame.
  72. * Quick syncronous operations are performed here.
  73. * Can call D_PostEvent.
  74. */
  75. void I_StartTic (void);
  76. /* I_StartFrame
  77. * Called by D_DoomLoop,
  78. * called before processing any tics in a frame
  79. * (just after displaying a frame).
  80. * Time consuming syncronous operations
  81. * are performed here (joystick reading).
  82. * Can call D_PostEvent.
  83. */
  84. void I_StartFrame (void);
  85. extern int use_fullscreen; /* proff 21/05/2000 */
  86. extern int desired_fullscreen; //e6y
  87. // Set the process affinity mask so that all threads
  88. extern int process_affinity_mask;
  89. // Priority class for the prboom-plus process
  90. extern int process_priority;
  91. extern dboolean window_focused;
  92. void UpdateGrab(void);
  93. #endif