johannes-fetz / joengine

Jo Engine is an open source 2D and 3D game engine for the Sega Saturn written in C under MIT license
http://jo-engine.org/
MIT License
205 stars 32 forks source link

Fix rendering of multiline font images #11

Closed deevus closed 5 years ago

deevus commented 5 years ago

Was trying to load a font that is spread over multiple lines so I dug into the code and fixed it!

I simplified the loop to reduce nesting and complexity though I think the number of iterations is the same.

Here is an example that breaks: MOSWHT.TGA.gz

    FONT_MOS_WHT = jo_font_load("FONTS", "MOSWHT.TGA", JO_COLOR_Green, 16, 32, 0,
        " !\"#$%&`()*+,_./\n0123456789:;<=>?\n@ABCDEFGHIJKLMNO\nPQRSTUVWXYZ[\\]^_\n\'abcdefghijklmno\npqrstuvwxyz{|}~¢"
    );
johannes-fetz commented 5 years ago

Thanks Simon !

deevus commented 5 years ago

No prob