Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    422550

GTL Part 5.1 : RLE TGA 42 v 1 Phantom

Sign in to follow this  

149 views

ahahahaa I've finally got it working and can now decode RLE'd TGA files (well, 24 and 32bit anyways, I'll have to add some code to deal with 16bit ones at some point).

After much kicking and rewriting of the code it finally works, its pretty much based on what the Irrlicht image code does, instead of reading everything into a big buffer I just read it directly from the file on disk instead (well, from the stream, which could be practically anywhere, but disk right now) and after sorting out a case 'omfg, i'm dumb and cant do maths any more' its working [smile]

It also gave me a chance to rewrite the code which passes the data from the internal buffer to the final buffer, it was treating things as lines when it dawned on me i have a flat block of memory so I can just work out the address to read from and only deal with the case where reading a full buffer load will over-run the end of the data buffer [smile]

Thanks to evolutional for pointing me at the Irrlicht code [smile]

So, that just leaves DDS todo then its a case of stabilise the interface, clean up the code and take care of corner cases.
Sign in to follow this  


2 Comments


Recommended Comments

yeah, the JPG error has gone, it got fixed when I recoded the extractor so that it worked the same as the PNG one, so that now works perfectly afaik.

Corner cases are things like RLE'd BMPs and checking that it works on non-power-of-two sizes (I've been mostly testing with a 256*256 image) and anything else which comes up in testing.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now