aboutsummaryrefslogtreecommitdiff
path: root/games/gzdoom-legacy/compilefix.1.8.09.diff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-09 17:20:15 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:40 +0700
commit538fc0eeb2c0a81d01ca433c94736dc8f1a04087 (patch)
tree56087cb933502eeac05597ea19f6755b0a54faad /games/gzdoom-legacy/compilefix.1.8.09.diff
parentf32fbf57374c73daa33900f17f97fdfee2120c36 (diff)
games/gzdoom-legacy: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/gzdoom-legacy/compilefix.1.8.09.diff')
-rw-r--r--games/gzdoom-legacy/compilefix.1.8.09.diff143
1 files changed, 143 insertions, 0 deletions
diff --git a/games/gzdoom-legacy/compilefix.1.8.09.diff b/games/gzdoom-legacy/compilefix.1.8.09.diff
new file mode 100644
index 000000000000..ac9d89d3633b
--- /dev/null
+++ b/games/gzdoom-legacy/compilefix.1.8.09.diff
@@ -0,0 +1,143 @@
+diff -Naur gzdoom-g1.8.09/game-music-emu/CMakeLists.txt gzdoom-g1.8.09.patched/game-music-emu/CMakeLists.txt
+--- gzdoom-g1.8.09/game-music-emu/CMakeLists.txt 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/game-music-emu/CMakeLists.txt 2021-10-09 16:57:46.630159506 -0400
+@@ -84,7 +84,7 @@
+ if (__LIBGME_TEST_VISIBILITY)
+ # get the gcc version
+ exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
+- string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
++ string (REGEX MATCH "[1-9][0-9]*\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+
+ # gcc <4.1 had poor support for symbol visibility
+ if ((${_gcc_version} VERSION_GREATER "4.1") OR (${_gcc_version} VERSION_EQUAL "4.1"))
+diff -Naur gzdoom-g1.8.09/src/b_func.cpp gzdoom-g1.8.09.patched/src/b_func.cpp
+--- gzdoom-g1.8.09/src/b_func.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/b_func.cpp 2021-10-09 16:57:46.631159506 -0400
+@@ -123,7 +123,7 @@
+ if (vangle == 0)
+ return false; //Looker seems to be blind.
+
+- return (angle_t)abs (R_PointToAngle2 (player->mo->x, player->mo->y, to->x, to->y) - player->mo->angle) <= vangle/2;
++ return (angle_t)fabs (R_PointToAngle2 (player->mo->x, player->mo->y, to->x, to->y) - player->mo->angle) <= vangle/2;
+ }
+
+ //-------------------------------------
+@@ -210,7 +210,7 @@
+ {
+ angle = an;
+ //have to be somewhat precise. to avoid suicide.
+- if (abs (angle - player->mo->angle) < 12*ANGLE_1)
++ if (fabs (angle - player->mo->angle) < 12*ANGLE_1)
+ {
+ t_rocket = 9;
+ no_fire = false;
+@@ -252,7 +252,7 @@
+ angle -= m;
+ }
+
+- if (abs (angle - player->mo->angle) < 4*ANGLE_1)
++ if (fabs (angle - player->mo->angle) < 4*ANGLE_1)
+ {
+ increase = !increase;
+ }
+diff -Naur gzdoom-g1.8.09/src/g_hexen/a_dragon.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_dragon.cpp
+--- gzdoom-g1.8.09/src/g_hexen/a_dragon.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/g_hexen/a_dragon.cpp 2021-10-09 17:06:47.628110327 -0400
+@@ -79,7 +79,7 @@
+ { // attack the destination mobj if it's attackable
+ AActor *oldTarget;
+
+- if (abs(actor->angle-R_PointToAngle2(actor->x, actor->y,
++ if (fabs(actor->angle-R_PointToAngle2(actor->x, actor->y,
+ target->x, target->y)) < ANGLE_45/2)
+ {
+ oldTarget = actor->target;
+@@ -121,9 +121,9 @@
+ }
+ angleToSpot = R_PointToAngle2(actor->x, actor->y,
+ mo->x, mo->y);
+- if ((angle_t)abs(angleToSpot-angleToTarget) < bestAngle)
++ if ((angle_t)fabs(angleToSpot-angleToTarget) < bestAngle)
+ {
+- bestAngle = abs(angleToSpot-angleToTarget);
++ bestAngle = fabs(angleToSpot-angleToTarget);
+ bestActor = mo;
+ }
+ }
+@@ -198,14 +198,14 @@
+ }
+ angle = R_PointToAngle2(self->x, self->y, self->target->x,
+ self->target->y);
+- if (abs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
++ if (fabs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
+ {
+ int damage = pr_dragonflight.HitDice (8);
+ int newdam = P_DamageMobj (self->target, self, self, damage, NAME_Melee);
+ P_TraceBleed (newdam > 0 ? newdam : damage, self->target, self);
+ S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
+ }
+- else if (abs(self->angle-angle) <= ANGLE_1*20)
++ else if (fabs(self->angle-angle) <= ANGLE_1*20)
+ {
+ self->SetState (self->MissileState);
+ S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
+diff -Naur gzdoom-g1.8.09/src/g_hexen/a_heresiarch.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_heresiarch.cpp
+--- gzdoom-g1.8.09/src/g_hexen/a_heresiarch.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/g_hexen/a_heresiarch.cpp 2021-10-09 17:06:55.063109651 -0400
+@@ -314,7 +314,7 @@
+ case SORC_STOPPING: // Balls stopping
+ if ((parent->StopBall == RUNTIME_TYPE(actor)) &&
+ (parent->args[1] > SORCBALL_SPEED_ROTATIONS) &&
+- (abs(angle - (parent->angle>>ANGLETOFINESHIFT)) < (30<<5)))
++ (fabs(angle - (parent->angle>>ANGLETOFINESHIFT)) < (30<<5)))
+ {
+ // Can stop now
+ actor->target->args[3] = SORC_FIRESPELL;
+diff -Naur gzdoom-g1.8.09/src/g_hexen/a_hexenspecialdecs.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_hexenspecialdecs.cpp
+--- gzdoom-g1.8.09/src/g_hexen/a_hexenspecialdecs.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/g_hexen/a_hexenspecialdecs.cpp 2021-10-09 17:07:05.703108684 -0400
+@@ -109,7 +109,7 @@
+ if (playeringame[i])
+ {
+ AActor *pmo = players[i].mo;
+- if (P_CheckSight (self, pmo) && (abs (R_PointToAngle2 (pmo->x,
++ if (P_CheckSight (self, pmo) && (fabs (R_PointToAngle2 (pmo->x,
+ pmo->y, self->x, self->y) - pmo->angle) <= ANGLE_45))
+ { // Previous state (pottery bit waiting state)
+ self->SetState (self->state - 1);
+diff -Naur gzdoom-g1.8.09/src/p_enemy.cpp gzdoom-g1.8.09.patched/src/p_enemy.cpp
+--- gzdoom-g1.8.09/src/p_enemy.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/p_enemy.cpp 2021-10-09 16:57:46.631159506 -0400
+@@ -2738,7 +2738,7 @@
+
+ // 0 means no limit. Also, if we turn in a single step anyways, no need to go through the algorithms.
+ // It also means that there is no need to check for going past the other.
+- if (max_turn && (max_turn < (angle_t)abs(self->angle - other_angle)))
++ if (max_turn && (max_turn < (angle_t)fabs(self->angle - other_angle)))
+ {
+ if (self->angle > other_angle)
+ {
+diff -Naur gzdoom-g1.8.09/src/p_mobj.cpp gzdoom-g1.8.09.patched/src/p_mobj.cpp
+--- gzdoom-g1.8.09/src/p_mobj.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/p_mobj.cpp 2021-10-09 16:59:08.847152032 -0400
+@@ -2932,7 +2932,7 @@
+ if (thing->flags4&MF4_SHIELDREFLECT)
+ {
+ // Shield reflection (from the Centaur
+- if (abs (angle - thing->angle)>>24 > 45)
++ if ((int)(fabs (angle - thing->angle))>>24 > 45)
+ return true; // Let missile explode
+
+ if (thing->IsKindOf (RUNTIME_CLASS(AHolySpirit))) // shouldn't this be handled by another flag???
+diff -Naur gzdoom-g1.8.09/src/p_setup.cpp gzdoom-g1.8.09.patched/src/p_setup.cpp
+--- gzdoom-g1.8.09/src/p_setup.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/p_setup.cpp 2021-10-09 17:02:30.783133675 -0400
+@@ -1311,7 +1311,7 @@
+
+ ptp_angle = R_PointToAngle2 (li->v1->x, li->v1->y, li->v2->x, li->v2->y);
+ dis = 0;
+- delta_angle = (abs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES;
++ delta_angle = ((int)fabs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES;
+
+ if (delta_angle != 0)
+ {