I've now updated nSDL to 0.3.2. I've done some major housekeeping, the code should be a lot cleaner and everything should be nicely organized (the current video code for instance (here
) is nearly twice as small as 0.2.0's 400-liner (here
)). I've purged all crap from everywhere, no more mouse support because it wasn't perfect when using SDL_PollEvent() and I couldn't bother to debug it (and I think Lua's better for that kind of stuff), no more diagonal arrow key support I added in the previous version. Removing those two simplified the event fetching code to a simple little loop, which means it's faster and I'm much more content with it. It's such a rewarding feeling to clean shit up.
Anyway I also added SDL_gfx and updated fdlibm no one's heard about (it's a working, fast, Sun's full implementation of math.h functions; newlib's math functions don't work): https://github.com/Hoffa/nSDL/wiki/Additional-libraries
I haven't really tested SDL_gfx THAT MUCH, but it should run alright. SDL_gfx allows you to rotate and stretch images, draw anti-aliased lines, circles, triangles and all of your deepest fantasies. If I remember correctly it should do some heavy surface conversions on the fly so it might be pretty damn slow on a calculator, but I haven't tested so what do I know.
So here are the changes:
- Removed mouse, diagonal arrow key support
- Using SDL_GetVideoInfo() should now always give accurate information
- Faster event loop
- A LOT of cleaning up
- Apart from nSDL itself, added SDL_gfx and updated fdlibm
I think I'm finally ready to leave my baby for quite a long time.
Is there any way of easily finding where you made changes to the SDL source? I would like to look a little to see what it takes to port it to a new platform
Sure. Check out the source code here: https://github.com/Hoffa/nSDL
If you don't see "Initial commit." next to the file, it means I've changed something. Click on the message the view the changes of that commit. You can browse different commits here also: https://github.com/Hoffa/nSDL/commits/master
Most of the interesting stuff is in the src/ folder obviously.