forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-fps/blackshades: tweak for gcc-11
Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/787740 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <[email protected]>
- Loading branch information
Sergei Trofimovich
committed
May 2, 2021
1 parent
2f9326b
commit b5b6a3e
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
games-fps/blackshades/files/blackshades-20070723-gcc-11.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
https://bugs.gentoo.org/787740 | ||
--- a/Source/Globals.cpp | ||
+++ b/Source/Globals.cpp | ||
@@ -62,7 +62,7 @@ XYZ n,pa1,pa2,pa3; | ||
float u0, u1, u2; | ||
float v0, v1, v2; | ||
float a, b; | ||
-float max; | ||
+float _max; | ||
int i, j; | ||
bool bInter; | ||
float pointv[3]; | ||
--- a/Source/Quaternions.cpp | ||
+++ b/Source/Quaternions.cpp | ||
@@ -316,7 +316,7 @@ float normaldotproduct(XYZ point1, XYZ point2){ | ||
extern float u0, u1, u2; | ||
extern float v0, v1, v2; | ||
extern float a, b; | ||
-extern float max; | ||
+extern float _max; | ||
extern int i, j; | ||
extern bool bInter; | ||
extern float pointv[3]; | ||
@@ -352,11 +352,11 @@ bool PointInTriangle(Vector *p, Vector normal, float p11, float p12, float p13, | ||
|
||
#define ABS(X) (((X)<0.f)?-(X):(X) ) | ||
#define MAX(A, B) (((A)<(B))?(B):(A)) | ||
- max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); | ||
+ _max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); | ||
#undef MAX | ||
- if (max == ABS(normalv[0])) {i = 1; j = 2;} // y, z | ||
- if (max == ABS(normalv[1])) {i = 0; j = 2;} // x, z | ||
- if (max == ABS(normalv[2])) {i = 0; j = 1;} // x, y | ||
+ if (_max == ABS(normalv[0])) {i = 1; j = 2;} // y, z | ||
+ if (_max == ABS(normalv[1])) {i = 0; j = 2;} // x, z | ||
+ if (_max == ABS(normalv[2])) {i = 0; j = 1;} // x, y | ||
#undef ABS | ||
|
||
u0 = pointv[i] - p1v[i]; | ||
@@ -447,11 +447,11 @@ bool PointInTriangle(XYZ *p, XYZ normal, XYZ *p1, XYZ *p2, XYZ *p3) | ||
|
||
#define ABS(X) (((X)<0.f)?-(X):(X) ) | ||
#define MAX(A, B) (((A)<(B))?(B):(A)) | ||
- max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); | ||
+ _max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); | ||
#undef MAX | ||
- if (max == ABS(normalv[0])) {i = 1; j = 2;} // y, z | ||
- if (max == ABS(normalv[1])) {i = 0; j = 2;} // x, z | ||
- if (max == ABS(normalv[2])) {i = 0; j = 1;} // x, y | ||
+ if (_max == ABS(normalv[0])) {i = 1; j = 2;} // y, z | ||
+ if (_max == ABS(normalv[1])) {i = 0; j = 2;} // x, z | ||
+ if (_max == ABS(normalv[2])) {i = 0; j = 1;} // x, y | ||
#undef ABS | ||
|
||
u0 = pointv[i] - p1v[i]; |