video.h 2.0 KB

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