Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/effect.c:
- memcpy( ((unsigned char*)&SET_RAWDATA_FLOAT44_BBA) + 1, &SET_RAWDATA_FLOAT44_A, sizeof( FLOAT ) );
- SET_RAWDATA_FLOAT44_BBA[1] = 0.0f;
+}
+static inline void dbg_print_bits(void * byte, unsigned int count, char *str) +{
- int x, y;
- for (y = 0; y < count; y++)
- {
for (x = 0; x < CHAR_BIT; x++)
{
str[(y * CHAR_BIT) + x] = (*(unsigned char*)byte & (1 << x)) ? '1' : '0';
}
- }
+}
You forgot to increment the "byte" pointer, you're only printing the first byte.
BTW, I'd just get rid of this function and related machinery entirely. The hex prints do the job just fine.