More mucking about with Xcode. I ran into a problem where it insisted that “_SDL_main” was an undefined symbol. After scouting the net for a while and not finding anything particularly enlightening about the problem, I created a new SDL project and tried to compile it - no problems. Gradually copied sections of Woopsi from the old project into the new one, compiling every time - no problems. Rebuilt the main.cpp file piece by piece - no problems.
So what was causing the problem? No idea.
The colours are now correctly shifted from 16-bit to 32-bit, and the cursor keys are wired up. Aside from the bizarre and unpredictable behaviour of Xcode, the only real problem I ran into was with the glyphs. Turns out that I should really indicate in my code that I want unsigned chars, as not every platform implements them in the same way. The Mac defaults to signed chars, which meant that the glyphs (being above the 127 max value of a signed char in the font character array) didn’t get drawn. Fixing it was just a question of toggling a checkbox in the project’s properties. Even I can manage that one.
Here’s Woopsi, compiled for the Mac. Requires SDL. I think I’ve compiled it for PPC and Intel architectures.
Here’s a screengrab:
Coding with SDL has been completely painless (aside from the missing symbol thing). I used it very briefly to write a quick version of Pong for the GP32, but haven’t used it aside from that. I can see why so many open source projects use it - cross platform and easy to use.