cutscene.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. // cutscene.h
  19. // Project: Nostril (aka Postal)
  20. //
  21. // History:
  22. // 04/18/97 MJR Started.
  23. //
  24. // 04/22/97 MJR Testing and tuning.
  25. //
  26. // 04/26/97 JRD Added CSwirlMe
  27. //
  28. // 06/08/97 MJR Changed interface in order to properly clean everything
  29. // up without memory leaks.
  30. //
  31. // 06/11/97 JMI Changed so CutSceneStart() does not require a prefs file
  32. // and section name but instead opens and creates them using
  33. // a single realm number that is now passed in.
  34. //
  35. // MJR Added support for sepearate network sections in realms
  36. // prefs file.
  37. //
  38. // 07/14/97 BRH Added challenge mode parameter to CutSceneStart so that
  39. // the proper text can be displayed for the Gauntlet.
  40. //
  41. // 08/27/97 JRD Adding a compact stand along Martini effect for us with the
  42. // end of the game called MartiniDo
  43. //
  44. // 08/27/97 JRD Made MartiniDo WAY to easy for Bill to use, by putting up
  45. // with him justpassing the whole screen buffer, me doing a
  46. // general lock on it, creating a temporary bmp, and copying
  47. // it in. Happy Bill?
  48. //
  49. // 08/28/97 JRD Refined martini effect and added fade out option.
  50. //
  51. ////////////////////////////////////////////////////////////////////////////////
  52. #ifndef CUTSCENE_H
  53. #define CUTSCENE_H
  54. #include "RSPiX.h"
  55. #include "WishPiX/Prefs/prefs.h"
  56. #include "SampleMaster.h"
  57. ////////////////////////////////////////////////////////////////////////////////
  58. ////////////////////////////////////////////////////////////////////////////////
  59. //
  60. // MartiniDo - this is a greatly simplified version of the cutscene Martini
  61. //
  62. // It allows the user a few parameters and then does the effect for a set
  63. // amount of time, regardless of user input. There are no text overlays.
  64. // The program will blacken the screen when done. (g_pimScreenBuf)
  65. //
  66. ////////////////////////////////////////////////////////////////////////////////
  67. short MartiniDo( RImage* pimBackground, // actually, this is the ONLY graphic
  68. short sStartX, // logical start position of image
  69. short sStartY, // NOTE: it will be clipped so won't actually hit this point!
  70. RMultiAlpha* pAlpha, // only need 50% - see cut scenes
  71. long lMilliLen, // how long to do the effect
  72. short sRadius = 24, // Your tuning pleasure
  73. long lSpinTime = 3600, // in milliseconds
  74. long lSwayTime = 4000, // in milliseconds
  75. RRect* prCenter = NULL,// if not NULL, use this portion of the image only!
  76. long lFadeTime = 0, // fade to black, in milliseconds. (INCL in total time!)
  77. SampleMaster::SoundInstance siFade=0// to make sound fade out
  78. );
  79. ////////////////////////////////////////////////////////////////////////////////
  80. //
  81. // Start cutscene.
  82. //
  83. // If 'simple' mode is true, a simple background is displayed with the name
  84. // of the realm file printed on it.
  85. //
  86. // Otherwise, the variables in the specified section of the specified prefs file
  87. // determine what text is printed on top of the background.
  88. //
  89. // If a special effect is desired, CutSceneConfig() must be called, followed
  90. // by repeated calls to CutSceneUpdate().
  91. //
  92. // CutSceneEnd() must be called when the cutscene is no longer needed.
  93. //
  94. ////////////////////////////////////////////////////////////////////////////////
  95. extern void CutSceneStart(
  96. bool bSimple, // In: Set to 'true' for simple mode
  97. const RString* pstrSection, // In: Section to use for this realm
  98. const RString* pstrEntry, // In: Entry to use for this realm
  99. short sBorderX,
  100. short sBorderY);
  101. ////////////////////////////////////////////////////////////////////////////
  102. //
  103. // Configure cutscene effect
  104. //
  105. ////////////////////////////////////////////////////////////////////////////
  106. extern short CutSceneConfig(
  107. long lTimeSpin,
  108. short sMinX,short sMaxX,long lTimeX,
  109. short sMinY,short sMaxY,long lTimeY,
  110. double dMinA,double dMaxA,long lTimeA,
  111. short sX,short sY,short sW,short sH);
  112. ////////////////////////////////////////////////////////////////////////////
  113. //
  114. // Update cutscene effect
  115. //
  116. ////////////////////////////////////////////////////////////////////////////
  117. extern void CutSceneUpdate(void);
  118. ////////////////////////////////////////////////////////////////////////////////
  119. //
  120. // Clean up after the cutscene. It is safe to call this multiple times.
  121. //
  122. ////////////////////////////////////////////////////////////////////////////////
  123. extern void CutSceneEnd(void);
  124. #endif //CUTSCENE_H
  125. ////////////////////////////////////////////////////////////////////////////////
  126. // EOF
  127. ////////////////////////////////////////////////////////////////////////////////