video.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* -*- mode: c; tab-width: 4; c-basic-offset: 3; c-file-style: "linux" -*- */
  2. //
  3. // Copyright (c) 2009, Wei Mingzhi <whistler_wmz@users.sf.net>.
  4. // All rights reserved.
  5. //
  6. // This file is part of SDLPAL.
  7. //
  8. // SDLPAL is free software: you can redistribute it and/or modify
  9. // it under the terms of the GNU General Public License as published by
  10. // the Free Software Foundation, either version 3 of the License, or
  11. // (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. //
  21. #ifndef VIDEO_H
  22. #define VIDEO_H
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27. #include "common.h"
  28. extern SDL_Surface *gpScreen;
  29. extern SDL_Surface *gpScreenBak;
  30. extern volatile BOOL g_bRenderPaused;
  31. INT
  32. VIDEO_Startup(
  33. VOID
  34. );
  35. VOID
  36. VIDEO_Shutdown(
  37. VOID
  38. );
  39. VOID
  40. VIDEO_UpdateScreen(
  41. const SDL_Rect *lpRect
  42. );
  43. VOID
  44. VIDEO_SetPalette(
  45. SDL_Color rgPalette[256]
  46. );
  47. VOID
  48. VIDEO_Resize(
  49. INT w,
  50. INT h
  51. );
  52. SDL_Color *
  53. VIDEO_GetPalette(
  54. VOID
  55. );
  56. VOID
  57. VIDEO_ToggleFullscreen(
  58. VOID
  59. );
  60. VOID
  61. VIDEO_SaveScreenshot(
  62. VOID
  63. );
  64. VOID
  65. VIDEO_BackupScreen(
  66. VOID
  67. );
  68. VOID
  69. VIDEO_RestoreScreen(
  70. VOID
  71. );
  72. VOID
  73. VIDEO_ShakeScreen(
  74. WORD wShakeTime,
  75. WORD wShakeLevel
  76. );
  77. VOID
  78. VIDEO_SwitchScreen(
  79. WORD wSpeed
  80. );
  81. VOID
  82. VIDEO_FadeScreen(
  83. WORD wSpeed
  84. );
  85. #if SDL_VERSION_ATLEAST(2,0,0)
  86. //
  87. // For compatibility with SDL2.
  88. //
  89. VOID
  90. SDL_WM_SetCaption(
  91. LPCSTR lpszCaption,
  92. LPVOID lpReserved
  93. );
  94. #endif
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif