Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/surface.c:
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x07,0xe0,0x07,0x00,0x00,0x00,0x00,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0xf8,0x00,0x00,0x00,0x00,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+};
+struct surface_readback +{
- IDirect3DSurface9 *surface;
- D3DLOCKED_RECT locked_rect;
+};
+static DWORD get_readback_color(struct surface_readback *rb, unsigned int x, unsigned int y) +{
- return rb->locked_rect.pBits
? ((DWORD *)rb->locked_rect.pBits)[y * rb->locked_rect.Pitch / sizeof(DWORD) + x] : 0xdeadbeef;
Nitpicking, these could be `uint32_t` as well.