>> bitwise.BitXor(bit_flag , &b11111111) > > Er Bitwise.OnesComplement(bit_flag) -- which one you should use > depends on how many bits you're prentending the number has. > OnesComplement flips all 32 bits; Mike's version above flips just the > lower 8.
Hmm, OK, but I'm not pretending. :) Here's a sample line I'm trying to duplicate. // reset object's culled flag RESET_BIT(obj->state, OBJECT4DV1_STATE_CULLED); //#define RESET_BIT(word,bit_flag) ((word)=((word) & (~bit_flag))) My objects state is an integer. And OBJECT4DV1_STATE_CULLED value is &h0004. obj.state = Bitwise.BitAnd(obj.state,Bitwise.OnesComplement(OBJECT4DV1_STATE_ACTIVE)) Does that look correct? -- Thomas C. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
