|
I know this is old, and I'm not sure if I'm right here, but...
Doesn't putBits' functionality remove the need for all that bitshifting and ORing?Code:bldr.putBits(26, tile.getX() << 14 | tile.getY() << 3 | tile.getZ() << 24 | tile.getRotation() << 1);
Optimisation isn't the only reason for this:
Code:bldr.putBits(26, tile.getX() << 14 | tile.getY() << 3 | tile.getZ() << 24 | tile.getRotation() << 1);Code:bldr.putBits(2, tile.getZ()); bldr.putBits(10, tile.getX()); bldr.putBits(11, tile.getY()); bldr.putBits(2, tile.getRotation()); bldr.putBits(1, 0);
Last edited by Major; 06-17-2015 at 08:28 AM.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |