Hi All,
I've been trying to figure out how to load pngs to the engine, rather than relying on my artist to translate the PNG files into BMP files, or doing the translation through GIMP myself. The trouble is that I'm running into a severe lack of clear documentation on what is in the PNG24 file format.
While researching this, I saw that nothings has created a public domain library called stb_image, which I am planning to learn from. I managed to get it working just fine, but then I ran into trouble being able to save the data coming from the library into memory for future use. I'm missing some pretty basic knowledge on how to pack the 8bit channels of colors into a 32bit stream of pixels, and store them into the memory arena. It looks like on day 56, which is where I am at, we have removed all examples of PushArrays, so I'm having trouble seeing what I should be seeing when that gets returned.
So I've come to an impasse, and I cannot figure out what the next step on my quest for PNG file support would be. I can see why we chose to do BMPs if this is the amount of trouble that I'm running into. Can any kind person help me figure out what the file structure is for PNG24, and what basic steps I should take to replicate loading in the BMPs? Thanks in advance!