OpenXcom Forum

Contributions => Builds & Ports => Topic started by: macifom on October 09, 2020, 04:27:54 am

Title: OpenXcom 1.0 for PowerPC on Mac OS X 10.5 Leopard
Post by: macifom on October 09, 2020, 04:27:54 am
Greetings fellow X-Com enthusiasts,

  First of all I'd like to thank SupSuper and all of the other contributors to OpenXcom for making one of the greatest PC games of all time accessible to players young and old on new platforms. I recently, for solace and distraction, shifted much of my computer usage back to an ancient Power Mac G4. One of the complaints most commonly leveled against that generation of Macs was the dearth of games and no omission could be more painful than your favorite and mine, X-Com UFO: Defense. I regularly play OpenXcom on my Linux box and was surprised when I couldn't find a PowerPC Mac build anywhere. Over the weekend, I decided to personally address this oversight. The result, after struggling mightily with issues arising from the obsolescence of the platform, is this 10.5 PowerPC-exclusive build of v1.0.
  There are, sadly, a few issues I've yet to work out:
 
  Some observations from my time hacking on this:
 
Anywho, I had a lot of fun with this and am enjoying yet another playthrough of X-Com! Although I highly doubt anyone else will find it useful, please comment if you end up trying out my build. Remember that you'll need to drop the usual data files into the Resources/data folder of the app bundle itself.
Title: Re: OpenXcom 1.0 for PowerPC on Mac OS X 10.5 Leopard
Post by: Yankes on October 09, 2020, 10:49:43 pm
Code: [Select]
Recent OpenXcom master is sprinkled with C++11 which is great but not compatible with GCC 4.2Where exactly? AFAIK OXC still use C++03, only place what I know that use new standards is branch OXCE that require partial C++17

And for version, 1.0 is baaad, lot of work and fixes goes to recent version (support for TFTD) and if you really can't compile new version then at least go back to version before offending code was added.
Title: Re: OpenXcom 1.0 for PowerPC on Mac OS X 10.5 Leopard
Post by: macifom on October 09, 2020, 11:25:18 pm
/src/Engine/FileMap.cpp, /src/Interface/Text.cpp and possibly others (checking) use std::map<Key,T,Compare,Allocator>::at which is a C++11 STL feature according to the docs which I unfortunately can't link to. There's some use of C++03 features such as the 'override' specifier that are easy to deal with. If anyone here really wants it, I could look into rewriting or reverting FileMapp.cpp. I wasn't aware that v1.0 was 'bad' apart from the lack of TFTD support. Figured a tag with that name would get a decent amount of testing... but yeah, looking at the FLI/FLC player code and such I'm not surprised to learn its a wee bit buggy.
Title: Re: OpenXcom 1.0 for PowerPC on Mac OS X 10.5 Leopard
Post by: Yankes on October 09, 2020, 11:49:32 pm
https://github.com/OpenXcom/OpenXcom/blame/master/src/Engine/FileMap.cpp#L52

Funny this was added 6y ago... and its from C++11:

https://en.cppreference.com/w/cpp/container/map/at

Overall even if it not C++11 this should be changed, this code two times access map for same value, and in first case throw away correct result.