Created
December 3, 2012 20:14
-
-
Save benvanstaveren/4197666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the 0x67 message def | |
$srv_msg->[0x67] = def_msg(0x67, 'Set Slot', [ | |
pair(window_id => MC_byte), | |
pair(slot => MC_short), | |
slotupdate('slot_data'), | |
]); | |
# MC_byte and MC_short reader implementations | |
sub read_byte { return unpack('c', shift->read(1)) } | |
sub read_short { return unpack('s>', shift->read(2)) } | |
# unpack documentation says for 'c' and 's': | |
# c A signed char (8-bit) value. | |
# s A signed short (16-bit) value. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment