0 Members and 3 Guests are viewing this topic.
It's not that big of a problem Currently, BLOCK_WDATA is defined as uint16_t, the lowest 8 bits are the BLOCK (the ID),the higher 8 bits could be used for anything.Somewhere in crafti, there's the enum BLOCK_SIDE, which is used as the highest 8 bits of the door's BLOCK_WDATA.To indicate whether it's the top or bottom half of a door, bit 7 is used.For redstone power state, I'd use the top 2 bits (7 and 6) and I'd have to move the door part bit out of the way.Then each door part would have it's part bit set to 0, which is bottom..Edit: So that old doors won't confuse redstone circuits:enum REDSTONE_STATE {NOT_POWERED=0b00,PASSIVELY_POWERED=0b01,NOT_POWERED_2=0b10,ACTIVELY_POWERED=0b11,}; or even better, a bitfield.
can you imagine, redstone computers on your Nspire?
Which 8 free bits?
It's not that big of a problem Currently, BLOCK_WDATA is defined as uint16_t, the lowest 8 bits are the BLOCK (the ID),the higher 8 bits could be used for anything.
Somewhere in crafti, there's the enum BLOCK_SIDE, which is used as the highest 8 bits of the door's BLOCK_WDATA.