video.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. #ifdef GEKKO // Rikku2000: Crash on compile, allready define on WIISDK
  33. VIDEO_Init_GEKKO(
  34. #else
  35. VIDEO_Init(
  36. #endif
  37. WORD wScreenWidth,
  38. WORD wScreenHeight,
  39. BOOL fFullScreen
  40. );
  41. VOID
  42. VIDEO_Shutdown(
  43. VOID
  44. );
  45. VOID
  46. VIDEO_UpdateScreen(
  47. const SDL_Rect *lpRect
  48. );
  49. VOID
  50. VIDEO_SetPalette(
  51. SDL_Color rgPalette[256]
  52. );
  53. VOID
  54. VIDEO_Resize(
  55. INT w,
  56. INT h
  57. );
  58. SDL_Color *
  59. VIDEO_GetPalette(
  60. VOID
  61. );
  62. VOID
  63. VIDEO_ToggleFullscreen(
  64. VOID
  65. );
  66. VOID
  67. VIDEO_SaveScreenshot(
  68. VOID
  69. );
  70. VOID
  71. VIDEO_BackupScreen(
  72. VOID
  73. );
  74. VOID
  75. VIDEO_RestoreScreen(
  76. VOID
  77. );
  78. VOID
  79. VIDEO_ShakeScreen(
  80. WORD wShakeTime,
  81. WORD wShakeLevel
  82. );
  83. VOID
  84. VIDEO_SwitchScreen(
  85. WORD wSpeed
  86. );
  87. VOID
  88. VIDEO_FadeScreen(
  89. WORD wSpeed
  90. );
  91. #if SDL_VERSION_ATLEAST(2,0,0)
  92. //
  93. // For compatibility with SDL2.
  94. //
  95. VOID
  96. SDL_WM_SetCaption(
  97. LPCSTR lpszCaption,
  98. LPVOID lpReserved
  99. );
  100. #endif
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104. #endif