Darshan wrote:I had a quick look at the sources, the codebase needs some refactoring to decrease the coupling with allegro.
Allegro attempts to provide a layer on top of the OS to make writing a game (or emulator) that works on multiple OSes easy and, as such, it doesn't restrict its API to graphics but includes other things, like filename handling, that could vary between one OS and another. It is not that filename handling is hard, just OS-specific, though interestingly one can usually do Unix/Linux and Windows by using Unix conventions.
So the API for these non-graphics functions has changed from Allegro 4 to Allegro 5 and you're absolutely right that adds effort to any porting. I don't think that is the dominating factor, though, and I have managed to get a version of B-Em to compile and run with Allegro 5 with the filename issues resolved. To be fair I am starting from the sf/linux-pkg branch and not master as that already reduces dependency on Allegro's filename handling as a side effect of implementing a search for certain files rather than simply assuming they are in the same folder as the executable. That makes it easier to package B-Em into an installable package on Linux which has been requested in the past.
I will be happy to share what I have done when I am back in front of the PC which will probably be later today.
The biggest difference between Allegro 4 and 5 is that Allegro 5 is event driven and I was going to tackle making the keyboard work with events next but I have been hampered because it is currently using too much CPU on other things at the moment for reliable delivery of the keyboard events.
I am very happy for other for other people to contribute any way they feel like.