stryd_one Posted March 27, 2007 Report Posted March 27, 2007 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 4x8X-Axis[4] = {10001001,01110000,10000010,00001100}or...10001001011100001000001000001100Now 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
audiocommander Posted March 27, 2007 Report Posted March 27, 2007 Hi stryd,I'd use the MIOS_HLP_GetBitORMask().Not sure though if there is a better solution and I guess you already know that function. :-\Cheers,Michael
stryd_one Posted March 27, 2007 Author Report Posted March 27, 2007 Yeh I thought that might be the go... I guess I was hoping that C had some magic pill for me hehehehThanks for the advice mate!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now