forked from starnakin/IronGOLEM
24 lines
555 B
Plaintext
24 lines
555 B
Plaintext
|
get_raw_bit(number)
|
||
|
{
|
||
|
local tab = galloc(16);
|
||
|
if (tab == NULL)
|
||
|
return (NULL);
|
||
|
[tab] = number & 0x8000;
|
||
|
[tab + 1] = number & 0x4000;
|
||
|
[tab + 2] = number & 0x2000;
|
||
|
[tab + 3] = number & 0x1000;
|
||
|
[tab + 4] = number & 0x800;
|
||
|
[tab + 5] = number & 0x400;
|
||
|
[tab + 6] = number & 0x200;
|
||
|
[tab + 7] = number & 0x100;
|
||
|
[tab + 8] = number & 0x80;
|
||
|
[tab + 9] = number & 0x40;
|
||
|
[tab + 10] = number & 0x20;
|
||
|
[tab + 11] = number & 0x10;
|
||
|
[tab + 12] = number & 0x8;
|
||
|
[tab + 13] = number & 0x4;
|
||
|
[tab + 14] = number & 0x2;
|
||
|
[tab + 15] = number & 0x1;
|
||
|
return tab;
|
||
|
}
|