openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

add bindings for libwebp (included in the TM directory) #403

Open XertroV opened 9 months ago

XertroV commented 9 months ago

TM2020 includes libwebp64.dll in its game directory (next to Trackmania.exe)

Since this doesn't bloat the install size of openplanet, and it would be considerable effort to implement support myself via Import::, would it be possible to add some simple bindings for it?

Since it's part of the game distribution, you could verify a hash checksum on it too to avoid loading it if it gets replaced or whatever by someone. IDK if that's even worth worrying about, though.

There is an example program here that converts webp to other things: https://github.com/webmproject/libwebp/blob/main/examples/dwebp.c

The library supports decoding to BMP directly I think, and I guess that it won't be too hard to then pass that to the texture loading functions.