bs.readString will do that automatically for you in a non-unicode stream. Otherwise, if you don't have the string length or an offset table, checking for null characters 1 at a time is the right thing to do.finale00 wrote:Also, null-terminated strings.
I used to just read one char at a time, check if it's null, and then just add them to a string, but maybe there's a better way?
And is there a function that I can call that will parse a standard DDS file? Like maybe just take the one that's already used to load a DDS, but give me a texture object instead. Whatever I write to get a dds texture object probably isn't going to be as great lol
When you're creating NoeTexture objects, Noesis accepts DXT1/3/5 and some other image formats natively. So you can feed DXT-compressed data directly to it. As for loading DDS files entirely without even having to parse their headers, the best way to do that is through a function that won't be coming til the next version. (as chrrox has also requested it) It'll be called loadTexByHandler, and will allow you to load any image type that Noesis supports directly into a NoeTexture object. Hopefully I'll get around to working on the next release this week sometime, the todo list for it is getting pretty massive.