Patch for Linux build issues
by Dreamer · in Torque Game Engine · 04/22/2007 (6:23 am) · 1 replies
Here is a patch in unified diff format for all the Linux build issues that I know of on TGE1.5
diff -Naur old/engine/collision/optimizedPolyList.h new/engine/collision/optimizedPolyList.h
--- old/engine/collision/optimizedPolyList.h 2006-10-24 17:28:46.000000000 -0600
+++ new/engine/collision/optimizedPolyList.h 2007-04-22 07:03:48.000000000 -0600
@@ -34,7 +34,7 @@
U32 triangleLightingStartIndex;
- Poly::Poly() { plane = -1; vertexCount = 0; material = -1; };
+ Poly() { plane = -1; vertexCount = 0; material = -1; };
};
struct FullPoly
diff -Naur old/engine/game/cameraSpline.h new/engine/game/cameraSpline.h
--- old/engine/game/cameraSpline.h 2006-10-24 17:29:32.000000000 -0600
+++ new/engine/game/cameraSpline.h 2007-04-22 07:09:34.000000000 -0600
@@ -37,9 +37,9 @@
Knot *prev;
Knot *next;
- Knot::Knot() {};
- Knot::Knot(const Knot &k);
- Knot::Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE);
+ Knot() {};
+ Knot(const Knot &k);
+ Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE);
};
diff -Naur old/engine/game/fx/particleEngine.cc new/engine/game/fx/particleEngine.cc
--- old/engine/game/fx/particleEngine.cc 2006-10-24 17:29:38.000000000 -0600
+++ new/engine/game/fx/particleEngine.cc 2007-04-22 07:09:35.000000000 -0600
@@ -17,17 +17,6 @@
extern bool gEditingMission;
-//--------------------------------------------------------------------------
-//-------------------------------------- Internal global data
-//
-namespace {
-
-PEngine* sgParticleEngine = NULL;
-MRandomLCG sgRandom(0x1);
-
-} // namespace {}
-
-
//--------------------------------------------------------------------------
//-------------------------------------- Internal classes
@@ -52,6 +41,16 @@
~PEngine();
};
+//--------------------------------------------------------------------------
+//-------------------------------------- Internal global data
+//
+namespace {
+
+PEngine* sgParticleEngine = NULL;
+MRandomLCG sgRandom(0x1);
+
+} // namespace {}
+
const U32 PEngine::csmBlockSize = 512;
#define MaxParticleSize 50.0
diff -Naur old/engine/platformX86UNIX/x86UNIXInputManager.cc new/engine/platformX86UNIX/x86UNIXInputManager.cc
--- old/engine/platformX86UNIX/x86UNIXInputManager.cc 2006-10-24 17:32:56.000000000 -0600
+++ new/engine/platformX86UNIX/x86UNIXInputManager.cc 2007-04-22 07:09:35.000000000 -0600
@@ -61,18 +61,19 @@
SDLKey skey = (SDLKey)SDLkey;
SDLMod mod = KMOD_NONE;
// lower case
- key = X11_KeyToUnicode( skey, mod );
+ //key = X11_KeyToUnicode( skey, mod );
+ key = skey;
AsciiTable[tkey].lower.ascii = key;
// upper case
mod = KMOD_LSHIFT;
- key = X11_KeyToUnicode( skey, mod );
+ //key = X11_KeyToUnicode( skey, mod );
AsciiTable[tkey].upper.ascii = key;
// goofy (i18n) case
mod = KMOD_MODE;
- key = X11_KeyToUnicode( skey, mod );
+ //key = X11_KeyToUnicode( skey, mod );
AsciiTable[tkey].goofy.ascii = key;
-#if 0
+
if (xkeysym == 0)
return;
@@ -120,7 +121,7 @@
// ignore everything but first char
AsciiTable[tkey].upper.ascii = *keybuf;
}
-#endif
+
}
//------------------------------------------------------------------------------
diff -Naur old/engine/platformX86UNIX/x86UNIXStrings.cc new/engine/platformX86UNIX/x86UNIXStrings.cc
--- old/engine/platformX86UNIX/x86UNIXStrings.cc 2006-10-24 17:32:58.000000000 -0600
+++ new/engine/platformX86UNIX/x86UNIXStrings.cc 2007-04-22 07:12:10.000000000 -0600
@@ -174,6 +174,19 @@
{
return strcmp(str1, str2);
}
+
+int dStrcmp( const UTF16 *str1, const UTF16 *str2)
+{
+ int ret;
+ const UTF16 *a, *b;
+ a = str1;
+ b = str2;
+
+ while( *a && *b && (ret = *a - *b) == 0)
+ a++, b++;
+
+ return ret;
+}
S32 dStricmp(const char *str1, const char *str2)
{
Torque Owner Dreamer
Default Studio Name
I will be posting a resource here shortly that will do all of this stuff for you.