xoreos / xoreos-tools

Tools to help the development of xoreos
https://xoreos.org/
GNU General Public License v3.0
66 stars 28 forks source link

IMAGES: Fix TPC TXI reading in multi mipmap images #43

Closed Nostritius closed 5 years ago

Nostritius commented 5 years ago

This PR should fix #42 by only loading TXI data if there is more than one mipmap.

DrMcCoy commented 5 years ago

Errm, you're using spaces for indentation here...

Also, the code does the opposite of what you state here? You're only loading TXI data if there's exactly one mipmap?

Also also, what does the mipmap count have to do with the TXI data?

I'm sorry, but I'm completely confused by this PR.

Nostritius commented 5 years ago

Yeah, the spaces are now fixed. Yes I'm loading the TXI Data only if there is one mipmap because animated tpc images have always mipMapCount=1. So if the mipMapCount is not equal 1 it can't be an animated image and for that i don't need to load the TXI data.

DrMcCoy commented 5 years ago

Yeah, the spaces are now fixed.

Nope :P

Untitled

Yes I'm loading the TXI Data only if there is one mipmap because animated tpc images have always mipMapCount=1

I dunno, that sounds like a bit of a hack...

It's especially not something we can apply to xoreos proper, because we need the TXI data for other things than just determining the animation parameters.

I'd be much more happy with a proper fix instead of this workaround.

Nostritius commented 5 years ago

Ok, i will rethink this.

DrMcCoy commented 5 years ago

Thanks! :)