page created the 9th of april 2007

The version 1.5.1 for windows of torque does not compile due to new control with GCC and some issues. Below a summary of the update to do in the code.

-engine/gui/controls/guiTextEditCtrl.cc : fix the bug with type of variable


-engine/interior/fogCalc.h : replace FogCalc::FogCalc with FogCalc

-engine/interior/interior.h : replace TexMatrix::TexMatrix with TexMatrix


-engine/platformX86UNIX/x86UNIXFont.cc : comment the function GOldFont* createFont() {...}

-engine/platformX86UNIX/x86UNIXStrings.cc : add function dStrcmp

-engine/targets.torque.mk :

remove dgl/gNewFont.cc \

add SOURCE.CONSTRUCTOR with constructor/constructorSimpleMesh.cc

add util/triRayCheck.cpp to SOURCE.UTIL


-Don't forget : in order to avoid issues with windows format

cd ../engine

for i in 'find . -iname "*.c" -o -iname "*.cc" -o -iname "*.h" -o -iname "*.cpp"'; do {

    echo ${i}
    echo wq | ed ${i} > /dev/null 2>&1
    dos2unix -d ${i}
} ; done
	

-And finally change the execution permission on : chmod +x lib/xiph/linux/checklinks.sh

-To compile Torque follow the instructions : http://eviwo.free.fr/torque/compile.html



Below the detailled patch : in blue the update


diff -riEbw torque151-ori/engine/gui/controls/guiTextEditCtrl.cc torque151-updated/engine/gui/controls/guiTextEditCtrl.cc

168c168

< if(mHistoryLast == -1 || dStrcmp(txt, mHistoryBuf[mHistoryLast]))

---

> if(mHistoryLast == -1 || dStrcmp((const UTF16 *)txt,(const UTF16 *)mHistoryBuf[mHistoryLast]))

diff -riEbw torque151-ori/engine/interior/fogCalc.h torque151-updated/engine/interior/fogCalc.h

18c18

< FogCalc::FogCalc( const PlaneF &dPlane, F32 distOffset, const Point3F &zVec, F32 worldZ, F32 worldPz, const SceneState *state )

---

> FogCalc( const PlaneF &dPlane, F32 distOffset, const Point3F &zVec, F32 worldZ, F32 worldPz, const SceneState *state )


diff -riEbw torque151-ori/engine/interior/interior.h torque151-updated/engine/interior/interior.h

444c444

< TexMatrix::TexMatrix() { T = -1; N = -1; B = -1; };

---

> TexMatrix() { T = -1; N = -1; B = -1; };


diff -riEbw torque151-ori/engine/platformX86UNIX/x86UNIXFont.cc torque151-updated/engine/platformX86UNIX/x86UNIXFont.cc

68c68

<

---

> /*


169c169

<

---

> */

diff -riEbw torque151-ori/engine/platformX86UNIX/x86UNIXStrings.cc torque151-updated/engine/platformX86UNIX/x86UNIXStrings.cc

176a187,188

> 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;

> }

diff -riEbw torque151-ori/engine/targets.torque.mk torque151-updated/engine/targets.torque.mk

5a6,8

> SOURCE.CONSTRUCTOR=\

> constructor/constructorSimpleMesh.cc \

>

103d105

< dgl/gNewFont.cc \


378c380,381

< util/triBoxCheck.cpp

---

> util/triBoxCheck.cpp \

> util/triRayCheck.cpp


521c524,525

< $(SOURCE.LIGHTINGSYSTEM)

---

> $(SOURCE.LIGHTINGSYSTEM)\

> $(SOURCE.CONSTRUCTOR)


552c556,557

< $(SOURCE.LIGHTINGSYSTEM)

---

> $(SOURCE.LIGHTINGSYSTEM)\

> $(SOURCE.CONSTRUCTOR)