Page 2 of 2

Posted: 08 Mar 2004 19:38
by Darkvater
TrueSatan wrote:Hi Darkvater.
You can get SDL here http://www.libsdl.org
greets
yea, I was a bit too premature. Some google-ing later, I found it, compiled TTD and it works :D

Now for some changes ^^

Posted: 08 Mar 2004 20:06
by Bjarni
Darkvater wrote:LITTLE or BIG Endian depends on which OS you are using. I think linux is little endian too, but solaris sparc is big endian.

I wrote
#if !defined(i386)
# define TTD_BIG_ENDIAN
#endif

rigth after
#if defined(i386)
# define TTD_LITTLE_ENDIAN
#endif

I now have an executeable file compiled om MacOSX

However I get this error when I run it:
Error: Unable to read english.lng
ttd.c:74: failed assertion `0'
Abort

english.lng is present. Any ideas?

Posted: 08 Mar 2004 20:53
by Saskia
Darkvater wrote:LITTLE or BIG Endian depends on which OS you are using. I think linux is little endian too, but solaris sparc is big endian.
Endianness is the bit counting order in a byte or other dataword. It depends on the CPU. If you have a PC (Intel* CPU), you always have little endian, if you own a Mac or Sparc or something that's using a Motorola* CPU, you have big endian. *) Or every other CPU based on these

Replace all _LITTLE_ENDIAN with __LITTLE_ENDIAN :wink:

Posted: 09 Mar 2004 12:21
by Dakkus
Also remember, that the sdl has to be an sdl-devel package. Many packages you can find are just runtime packages and can't be used for compiling stuff.
So, one thing to do in problems like these is to find a file like "sdl-x.x.x-dev.rpm" instead of just "sdl-x.x.x.rpm". Solves most problems quite well.

Posted: 09 Mar 2004 15:49
by Darkvater
Saskia wrote:
Darkvater wrote:LITTLE or BIG Endian depends on which OS you are using. I think linux is little endian too, but solaris sparc is big endian.
Endianness is the bit counting order in a byte or other dataword. It depends on the CPU. If you have a PC (Intel* CPU), you always have little endian, if you own a Mac or Sparc or something that's using a Motorola* CPU, you have big endian. *) Or every other CPU based on these

Replace all _LITTLE_ENDIAN with __LITTLE_ENDIAN :wink:
Yes that's right. Just usually at school win/linux is all 386 and solaris runs on an RISC proc, so I just took the OS. My mistake :)

english.lng should be in the same directory as your ttd.exe file, or in your C/C++ you should set the working directory to the folder where your graphic files and english.lng file is.

Posted: 09 Mar 2004 17:46
by Bjarni
I got it to accept English.lng :)
but a new problem apeared :cry:

When I try to run, I get this
Loading sound effects...
Loading sprite set 0.
Loading drivers...

and after that, I get lot's of this
2004-03-09 18:30:54.966 ttd[1001] *** _NSAutoreleaseNoPool(): Object 0x1138d40 of class NSException autoreleased with no pool in place - just leaking

and in the end, it writes
2004-03-09 18:30:54.968 ttd[1001] *** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow
Trace/BPT trap

setting video driver to null fixes this problem, but it is no fun

Anybody knows how to fix this?

Posted: 09 Mar 2004 20:35
by Darkvater
Bjarni wrote:I got it to accept English.lng :)
but a new problem apeared :cry:

When I try to run, I get this
Loading sound effects...
Loading sprite set 0.
Loading drivers...

and after that, I get lot's of this
2004-03-09 18:30:54.966 ttd[1001] *** _NSAutoreleaseNoPool(): Object 0x1138d40 of class NSException autoreleased with no pool in place - just leaking

and in the end, it writes
2004-03-09 18:30:54.968 ttd[1001] *** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow
Trace/BPT trap

setting video driver to null fixes this problem, but it is no fun

Anybody knows how to fix this?
Have you installed SDL as per this:
http://www.tt-forums.net/viewtopic.php?t=6616
following their tutorial to set it up?