Closed DanielGibson closed 8 years ago
ok, to clarify: I only fixed and tested the second encounter, but I will add a commit to at least build the first encounter very soon.
ok, first encounter compiles now, but untested.
There's still lots of warnings because of invalid offsetof(); in TSE the fix (workaround?) was to use _offsetof()
instead, is that still desirable?
I just gave a try. This works fine for me, I'm able to build on FreeBSD 64 bit without any local hacks to Types.h and to play through the first 2 levels of TSE without glitches. TFE starts and the first level seems playable, too.
first encounter seems to work, just finished the first level in 64bit without any problems
Ok, one issue in TFE: music is missing, as it uses mp3, not ogg as TSE With 32bit builds, it works when using libamp11lib.so from @rcgordon's original linux binaries :-)
Is the libamp-source available somewhere? Else mp3 playback should possibly be rewritten using libmpg123 or something.
Amp11 was written by a croteam developer (AlenL) and is open source, if I recall. I'll track it down, but that doesn't have to hold up this PR...was that the only issue remaining here?
(MP3 playback arguably demands a royalty to the patent holder, which is probably why it was removed here.)
I think it was the only issue (but only Yamagi and me tested), and the mp3 stuff should be a different topic.
Anyway, I found amplib: https://web.archive.org/web/20060203121222/http://marvin.cc.fer.hr/~elf/amp11lib/ and luckily archive.org even has the source zip! (I think the MP3 patents expired in september 2015 or something?)
I created a github repo with the am11lib source: https://github.com/DanielGibson/amp11lib
Haven't even tried to build yet, but there it is :)
I just rebased this to master and tested on OSX.
On OSX things are a bit broken for me (rendering problems), but that also happens with 32bit binaries so I guess it's not related to my changes (I only tested second encounter there).
Unless you want the _offsetof()
vs offsetof()
thing in TFE resolved here, I think this can be merged :-)
As the PLATFORM_64BIT detection with UINTPTR_MAX caused trouble, I changed it to check for known 64bit architectures.
I fixed the known remaining 64-bit issues (except for the time_t stuff in
Player.es
which probably isn't critical before 2038).