Re: [7/8] d3dx9/tests: Add tests for compressed pixel formats support in D3DXLoadSurface functions.
Am Mittwoch, 9. Mai 2012, 23:32:10 schrieb Józef Kucia:
+#define check_pixel_3bpp(lockrect, x, y, color) \ +ok(((BYTE*)(lockrect).pBits)[3 * (x) + (y) * (lockrect).Pitch + 0] == ... Inline functions are generally prefered over macros where possible. I think it is possible to pass a different line number to ok() to make the messages more useful when they are called from a helper function, but I don't know how off the top of my head. If you have to use a macro, please use capital letters.
On Thu, May 10, 2012 at 11:16 AM, Stefan Dösinger <stefandoesinger(a)gmx.at> wrote:
Am Mittwoch, 9. Mai 2012, 23:32:10 schrieb Józef Kucia:
+#define check_pixel_3bpp(lockrect, x, y, color) \ +ok(((BYTE*)(lockrect).pBits)[3 * (x) + (y) * (lockrect).Pitch + 0] == ... Inline functions are generally prefered over macros where possible. I think it is possible to pass a different line number to ok() to make the messages more useful when they are called from a helper function, but I don't know how off the top of my head. If you have to use a macro, please use capital letters.
I used this macro to be consistent with check_pixel_1bpp, check_pixel_2bpp and check_pixel_4bpp macros.
participants (2)
-
Józef Kucia -
Stefan Dösinger