Fix String Dimnsion Functions *DO NOT MERGE*
The string dimension functions were using unsigned integers internally
whilst calculating the dimensions, what they should have been doing was
using a float and then returning the ceiled result. They now work
perfectly and I tested thoroughly with keyboard_string and various fonts.
I also reformatted this file it was kind of fucked up from the last time I
edited it, it is all good now.
Cleanup command line and get it functioning for Windows, it now actually
builds a test game.
cleanup
Improvements to CLI
Backup
Wtf
Cleanup, basic outline working.
Fixes Direct3D issues, the depth buffer was turned on by default which it
wasn't in OGL, this was causing display reset issues.
Whoops, forgot GL3
GM actually uses an inverse depth buffer for ortho projections, Studio
operates the same, for now I just inverted znear and zfar.
Revert that, I haven't tested yet, but it is important to note that
perspective proejctions in GM also behave oddly with depth function.
Fixes window_set_cursor by making it realize immediately, it now behaves
as GM8.1 and Studio do.
Fixes device resetting partially, surfaces will not be usable after a
reset because I free them from memory now and cleanup dangling pointers. I
also had a dangling pointer to the backbuffer which was causing display
reset to fail. The only thing to do now is make default pool textures
store a copy of themselves in system RAM when a reset occurs and make them
restore themselves during OnResetDevice()
Further fixes display reset, surfaces are recreated now, but just blanked.
Display reset fully fixed; surfaces now backup their texture data and
reload it after reset.
Implements screen_save for Direct3D9, I also forgot to switch the other
graphics systems to BGRA since we should be using that just about
everywhere internally. For some reason however it appears BMP saving is
broke in both systems.
Partially implements screen_save_part for Direct3D9
Implements surface_save for Direct3D 9
Josh says these should use get_space_width() like the draw text functions
Optimize for automatic storage duration