factor/basis/game-input/dinput/keys-array/keys-array.factor

18 lines
387 B
Factor
Raw Normal View History

USING: sequences sequences.private math
accessors alien.data ;
IN: game-input.dinput.keys-array
2008-07-27 01:35:40 -04:00
TUPLE: keys-array
{ underlying sequence read-only }
{ length integer read-only } ;
2008-07-27 01:35:40 -04:00
C: <keys-array> keys-array
: >key ( byte -- ? )
HEX: 80 bitand c-bool> ;
M: keys-array length length>> ;
2008-07-27 01:35:40 -04:00
M: keys-array nth-unsafe underlying>> nth-unsafe >key ;
INSTANCE: keys-array sequence