I've been working on the beginning stages of porting Project: Starfighter to the Pandora, which involves changing the controls to suit the Pandora (easy task) and reducing the resolution of the game from 800x600 to 800x480 (the Pandora's native resolution), which is proving to be a difficult task due to this game being a huge fan of exact pixel positioning based on the assumption that the screen is 800x600. Along the way, I'm running into a lot of segfaults and have successfully dealt with 3, one related to the controls and two related to the screen resizing.
The latest segfault, however, is one that I just can't figure out. It occurs when the "intermission" screen (the screen where you can visit the shop, change planets, view info, etc) is entered.
Here is my modified source so far:
To compile and run, simply do:
Note: There is a permissions problem as I have been doing my code editing on a FAT file system. You'll need to set the permissions to allow pack.py and unpack.py to be executed as programs.
To get to the intermission screen, you simply have to start a new game and beat the fight you're thrown into, which isn't that hard.
Note that the controls are different from the original. Arrows are still to move, but everything else has been changed:
Special (missiles): Page Down
Pause/skip: left Alt
Select menu items: End
Quit to menu: Esc (while paused)
(There's other controls, but they're unimportant here.)
The code related to the intermission screen is mostly in intermission.cpp.
Note that although this is working towards a port for the Pandora, I am currently testing on a normal desktop computer (running Ubuntu).
So, can anyone else see anything they think might be causing the segfault?
One interesting little tidbit: it doesn't always segfault. Sometime it shows some sort of error message (which I haven't saved, sorry), and one time it actually didn't segfault until much later (i.e. I was able to see the intermission screen for a minute or so).
If anyone finds anything, please let me know! I would very much like to get this great game onto the Pandora.