aboutsummaryrefslogtreecommitdiff
path: root/games/scorched3d/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-03-03 21:43:50 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-03-03 21:43:50 +0000
commit2c426097692fc6918130e880cf768cb499d88b2d (patch)
tree6f736060e0e6e8026fb0e31f3124430882a3430c /games/scorched3d/files
parent03948d564469ec1c83a9a24f2f0323c12fa19467 (diff)
downloadports-2c426097692fc6918130e880cf768cb499d88b2d.tar.gz
ports-2c426097692fc6918130e880cf768cb499d88b2d.zip
Notes
Diffstat (limited to 'games/scorched3d/files')
-rw-r--r--games/scorched3d/files/patch-src-3dsparse-aseFile.tab.cpp15
-rw-r--r--games/scorched3d/files/patch-src-common-Logger.cpp6
-rw-r--r--games/scorched3d/files/patch-src-common-Vector.cpp100
-rw-r--r--games/scorched3d/files/patch-src-server-ServerBrowserInfo.h11
4 files changed, 114 insertions, 18 deletions
diff --git a/games/scorched3d/files/patch-src-3dsparse-aseFile.tab.cpp b/games/scorched3d/files/patch-src-3dsparse-aseFile.tab.cpp
deleted file mode 100644
index f9a2dc93c718..000000000000
--- a/games/scorched3d/files/patch-src-3dsparse-aseFile.tab.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./src/3dsparse/aseFile.tab.cpp.orig Mon Mar 1 18:48:17 2004
-+++ ./src/3dsparse/aseFile.tab.cpp Tue Jan 25 19:34:16 2005
-@@ -327,10 +327,10 @@
- #include <alloca.h>
- #else /* not sparc */
- #if defined (MSDOS) && !defined (__TURBOC__)
--#include <malloc.h>
-+#include <stdlib.h>
- #else /* not MSDOS, or __TURBOC__ */
- #if defined(_AIX)
--#include <malloc.h>
-+#include <stdlib.h>
- #pragma alloca
- #else /* not MSDOS, __TURBOC__, or _AIX */
- #ifdef __hpux
diff --git a/games/scorched3d/files/patch-src-common-Logger.cpp b/games/scorched3d/files/patch-src-common-Logger.cpp
index 3472aee97f1d..533a35c37d95 100644
--- a/games/scorched3d/files/patch-src-common-Logger.cpp
+++ b/games/scorched3d/files/patch-src-common-Logger.cpp
@@ -1,9 +1,9 @@
---- ./src/common/Logger.cpp.orig Tue Jul 13 23:02:56 2004
-+++ ./src/common/Logger.cpp Tue Jan 25 19:34:22 2005
+--- src/common/Logger.cpp.orig Thu Feb 24 09:44:06 2005
++++ src/common/Logger.cpp Thu Feb 24 09:44:25 2005
@@ -21,7 +21,7 @@
#include <common/Defines.h>
#include <common/Logger.h>
- #include <tank/TankContainer.h>
+ #include <GLEXT/GLTexture.h>
-#include <SDL/SDL.h>
+#include <SDL11/SDL.h>
#include <time.h>
diff --git a/games/scorched3d/files/patch-src-common-Vector.cpp b/games/scorched3d/files/patch-src-common-Vector.cpp
new file mode 100644
index 000000000000..af8e3ef68a27
--- /dev/null
+++ b/games/scorched3d/files/patch-src-common-Vector.cpp
@@ -0,0 +1,100 @@
+--- ./src/common/Vector.cpp.orig Wed Jun 2 19:35:42 2004
++++ ./src/common/Vector.cpp Fri Feb 25 09:47:57 2005
+@@ -105,15 +105,22 @@
+
+ Vector Vector::operator/(const float a)
+ {
+- Vector v(V[0]/a, V[1]/a, V[2]/a);
++ const float b = (a==0.0f?0.00001f:a);
++ Vector v(V[0]/b, V[1]/b, V[2]/b);
+ return v;
+ }
+
+ Vector Vector::operator/(const Vector &Vin)
+ {
+- Vector v(V[0]/ ((Vector &) Vin)[0],
+- V[1]/ ((Vector &) Vin)[1],
+- V[2]/ ((Vector &) Vin)[2]);
++ float a = ((Vector &)Vin)[0];
++ float b = ((Vector &)Vin)[1];
++ float c = ((Vector &)Vin)[2];
++
++ const float a2 = (a==0.0f?0.00001f:a);
++ const float b2 = (b==0.0f?0.00001f:b);
++ const float c2 = (c==0.0f?0.00001f:c);
++
++ Vector v(V[0]/ a2, V[1]/ b2, V[2]/ c2);
+ return v;
+ }
+
+@@ -152,10 +159,8 @@
+ {
+ float mag = Magnitude();
+ Vector v;
+- if (mag != 0.0f)
+- {
+- v = (*this) / mag;
+- }
++ if (mag == 0.0f) mag = 0.00001f;
++ v = (*this) / mag;
+ return v;
+ }
+
+@@ -163,10 +168,8 @@
+ {
+ float mag = float(sqrt(V[0]*V[0] + V[1]*V[1]));
+ Vector v;
+- if (mag != 0.0f)
+- {
+- v = (*this) / mag;
+- }
++ if (mag == 0.0f) mag = 0.00001f;
++ v = (*this) / mag;
+ return v;
+ }
+
+@@ -185,10 +188,8 @@
+ void Vector::StoreNormalize()
+ {
+ float mag = Magnitude();
+- if (mag != 0.0f)
+- {
+- (*this) /= mag;
+- }
++ if (mag == 0.0f) mag = 0.00001f;
++ (*this) /= mag;
+ }
+
+ float Vector::dotP(const Vector &Vin)
+@@ -233,16 +234,25 @@
+
+ void Vector::operator/=(const float a)
+ {
+- V[0] /= a;
+- V[1] /= a;
+- V[2] /= a;
++ const float b = (a==0.0f?0.00001f:a);
++ V[0] /= b;
++ V[1] /= b;
++ V[2] /= b;
+ }
+
+ void Vector::operator/=(const Vector &Vin)
+ {
+- V[0] /= ((Vector &)Vin)[0];
+- V[1] /= ((Vector &)Vin)[1];
+- V[2] /= ((Vector &)Vin)[2];
++ float a = ((Vector &)Vin)[0];
++ float b = ((Vector &)Vin)[1];
++ float c = ((Vector &)Vin)[2];
++
++ const float a2 = (a==0.0f?0.00001f:a);
++ const float b2 = (b==0.0f?0.00001f:b);
++ const float c2 = (c==0.0f?0.00001f:c);
++
++ V[0] /= a2;
++ V[1] /= b2;
++ V[2] /= c2;
+ }
+
+ void Vector::operator+=(const float a)
diff --git a/games/scorched3d/files/patch-src-server-ServerBrowserInfo.h b/games/scorched3d/files/patch-src-server-ServerBrowserInfo.h
new file mode 100644
index 000000000000..db2eb7811ac7
--- /dev/null
+++ b/games/scorched3d/files/patch-src-server-ServerBrowserInfo.h
@@ -0,0 +1,11 @@
+--- src/server/ServerBrowserInfo.h.orig Thu Feb 24 10:01:20 2005
++++ src/server/ServerBrowserInfo.h Thu Feb 24 10:01:35 2005
+@@ -21,7 +21,7 @@
+ #if !defined(__INCLUDE_ServerBrowserInfoh_INCLUDE__)
+ #define __INCLUDE_ServerBrowserInfoh_INCLUDE__
+
+-#include <SDL/SDL_net.h>
++#include <SDL11/SDL_net.h>
+
+ class ServerBrowserInfo
+ {