On Wed May 29 23:53:27 2024 +0000, Connor McAdams wrote:
The reason for the int/uint mix is because some of the functions calling this are pulling those values from a `RECT` structure which contains signed ints. I wrote this under the assumption that negative values in e.g the source rectangle argument `D3DXLoadSurfaceFromMemory` were expected to work, but after writing tests it seems like that's more of an unintended thing that only works on 32-bit. I've switched them all to uints in the most recent revision. Initially I did pack these into a box structure, but that started to feel a bit messy to me, in particular because there were 3 different types of structures in use (`RECT` for d3d9 surfaces, `D3DBOX` for d3d9 volumes, and then `D3D10_BOX`/`D3D11_BOX` for d3d10/d3d11. Rather than add a call to pack a structure before each `d3dx_pixels_init` call, I figured it'd make more sense to just have the values as arguments instead. I can change that if you'd like. :)
No, this is certainly fine. I was kind of hoping that packing here would eventually avoid packing afterwards (i.e. it would have been just a matter of moving some pack calls around) but, indeed, it doesn't seem to be the case.