# HG changeset patch
# User Wuzzy <almikes@aol.com>
# Date 1480195005 -3600
# Node ID ccab0d396a7fa019fd7c27a08ba4334b6dd9e7ab
# Parent  2780e8a10d4c53765221ea8616dfd4c069239f03
Use SetCinematicMode in Animate lib, which introduces cinematic mode to missions using Animate

diff -r 2780e8a10d4c -r ccab0d396a7f ChangeLog.txt
--- 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
diff -r 2780e8a10d4c -r ccab0d396a7f share/hedgewars/Data/Scripts/Animate.lua
--- 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