Fix birdy appearance/disappearance animation
authorunc0rr
Sun, 11 Nov 2018 00:14:13 +0100
changeset 14197 3e551b0535fb
parent 14196 ab5e710d353d
child 14198 73c5ba3aac45
Fix birdy appearance/disappearance animation
hedgewars/uGearsHandlersMess.pas
project_files/hwc/rtl/pmath.c
project_files/hwc/rtl/pmath.h
--- a/hedgewars/uGearsHandlersMess.pas	Sat Nov 10 21:15:42 2018 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Nov 11 00:14:13 2018 +0100
@@ -4632,7 +4632,6 @@
         Gear^.Hedgehog := nil;
         Gear^.Timer := 0;
         Gear^.State := Gear^.State or gstAnimation or gstTmpFlag;
-        Gear^.Timer := 0;
         Gear^.doStep := @doStepBirdyDisappear;
         CurAmmoGear := nil;
         isCursorVisible := false;
--- a/project_files/hwc/rtl/pmath.c	Sat Nov 10 21:15:42 2018 +0100
+++ b/project_files/hwc/rtl/pmath.c	Sun Nov 11 00:14:13 2018 +0100
@@ -2,15 +2,6 @@
 #include <stdlib.h>
 #include <math.h>
 
-/*
- * power raises base to the power power.
- * This is equivalent to exp(power*ln(base)). Therefore base should be non-negative.
- */
-float fpcrtl_power(float base, float exponent)
-{
-    return exp(exponent * log(base));
-}
-
 /* Currently the games only uses sign of an integer */
 int fpcrtl_signi(int x)
 {
--- a/project_files/hwc/rtl/pmath.h	Sat Nov 10 21:15:42 2018 +0100
+++ b/project_files/hwc/rtl/pmath.h	Sun Nov 11 00:14:13 2018 +0100
@@ -7,7 +7,7 @@
 #define     fpcrtl_min(a, b)                ((a) < (b) ? (a) : (b))
 #define     fpcrtl_max(a, b)                ((a) > (b) ? (a) : (b))
 
-float       fpcrtl_power(float base, float exponent);
+#define     fpcrtl_power(a, b)              pow(a, b)
 
 /* Currently the games only uses sign of an integer */
 int         fpcrtl_signi(int x);