Jump to content

Recommended Posts

Posted

If this is possible, I'd love to know how, it'd be a real lifesaver. I hope one of you clever midiboxers might be able to help!

I have an array of 8x16 1-bit flags stored as ints. For the purpose of clarity, I'll scale down my example to 4x8

X-Axis[4] = {10001001,01110000,10000010,00001100}

or...

10001001

01110000

10000010

00001100

Now it's easy to get the bits from the X axis and it allows me to iterate through the row quickly by reading the byte, bitshifting, then testing the carry bit, to test the bits one by one. Cool.

Is there an easy and fairly quick way to get a column out of the Y axis? Preferably without it doing stupid amounts of pointer math! ;) Maybe for performance's sake it would be best to keep two sets of the data?

I get a very strong feeling that I'm missing something  ;D

Posted

Yeh I thought that might be the go... I guess I was hoping that C had some magic pill for me heheheh

Thanks for the advice mate!

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...