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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...