Use SetCinematicMode in Animate lib, which introduces cinematic mode to missions using Animate
authorWuzzy <almikes@aol.com>
Sat, 26 Nov 2016 22:16:45 +0100
changeset 12089 ccab0d396a7f
parent 12088 2780e8a10d4c
child 12090 e9a4afec9a3a
Use SetCinematicMode in Animate lib, which introduces cinematic mode to missions using Animate
ChangeLog.txt
share/hedgewars/Data/Scripts/Animate.lua
--- a/ChangeLog.txt	Sat Nov 26 20:27:41 2016 +0100
+++ b/ChangeLog.txt	Sat Nov 26 22:16:45 2016 +0100
@@ -157,6 +157,7 @@
  + A few campaign missions now save your personal best successes (e.g. fastest finish in Hard Flying) which get shown after you finish them agin
  + A Space Adventure shows 2 flowers over fully completed planets (with side missions)
  + Rewrote some help texts in basic rope training
+ + Graphical effect (black bars) while in cut scenes
  * Portal Mind Challenge was cleaned up and reworked (especially less awful wording)
  * Fixed Target Practice missions getting stuck when a target dropped into water
  * Fixed mistakes and bad wording of strings in several missions, scripts and campaigns
--- a/share/hedgewars/Data/Scripts/Animate.lua	Sat Nov 26 20:27:41 2016 +0100
+++ b/share/hedgewars/Data/Scripts/Animate.lua	Sat Nov 26 22:16:45 2016 +0100
@@ -288,6 +288,7 @@
 function Animate(steps)
   if skipping == true then
     animPos = 1
+    SetCinematicMode(false)
     SetInputMask(0xFFFFFFFF)
     SkipAnimation(steps)
     return true
@@ -299,6 +300,7 @@
 
   if steps[animPos] == nil then
       animPos = 1
+      SetCinematicMode(false)
       SetInputMask(0xFFFFFFFF)
       return true
   end
@@ -309,6 +311,7 @@
   end
 
   SetInputMask(bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLeft+gmLJump+gmRight+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon))
+  SetCinematicMode(true)
   retVal = steps[animPos].func(unpack(steps[animPos].args))
   if (retVal ~= false) then
     animPos = animPos + 1