I implemented your suggestions. The -Os switch did cause me some problems... specifically it made the DrawSelectScreen function very fragile. I had to add some defensive coding to get it working again; but still it seems like even minor change to the function would break it again. It is working now. The -Os switch also resulted in my Sleep function no longer delaying for the specified amount of milliseconds (it was getting optimized out)... this gave the appearance that Jumpman was 100% to 200% faster. I ended adding some asm("NOP") to ensure my delay loop would not get optimized.
I did not implement the inlines that you suggested. I did not realize the BSS section resulted in such unoptimized calls. Thanks for pointing that out.
Thank you for your suggestions to make Jumpman even better.
I also corrected a few minor bugs:
- enemy collision detection was intentionally disabled for testing purposes but was unintentionally included in the release.... whoops
- tightened up the collision detection with bullets and collectables
- corrected the version string to v1.01
Update coming soon