Venomalia / DolphinTextureExtraction-tool

Dumps GC and Wii textures, compatible with the Dolphin texture hash.
MIT License
29 stars 5 forks source link

GTX: Fill out more fields, fix formats, pass filters #28

Closed Neui closed 1 year ago

Neui commented 1 year ago

Looked at the loading code again and filled in the blanks.

I wanted to make the Offsets an array, but it appears I need to do something like fixed which also requires unsafe struct, but I am not sure if this is also "correct" usage for something like that. (I am new to C#.)

Venomalia commented 1 year ago

Offsets an array

Do you mean the mip data? If they are stored behind each other, just leave it to the texture class. if not, you can add the mip data to the RawImages list individually. you can use unsafe code but this might be a bit difficult. with fixed you can fix the address of a variable, the GC would change it otherwise.

Neui commented 1 year ago

Do you mean the mip data?

Yeah, I wanted to do Offsets[8]. However, it also isn't important (the game doesn't touch these offsets anyway except the first one since that is passed to GX/the GPU).

If they are stored behind each other, just leave it to the texture class.

Yes, they are stored like that because to my knowledge this is how the GPU accepts mipmaps, so I didn't changed that.