signed x,y in CreateWindow, value instead of array in ListProps

This commit is contained in:
Andrey Sidorov 2012-06-09 13:52:14 +10:00
parent 3aa441358e
commit 771330201b

View file

@ -129,8 +129,7 @@ module.exports = {
values = {} values = {}
var packetLength = 8 + (values ? Object.keys(values).length : 0); var packetLength = 8 + (values ? Object.keys(values).length : 0);
// TODO: should be CCSLLssSSSSLL - x,y are signed var format = 'CCSLLssSSSSLL';
var format = 'CCSLLSSSSSSLL';
// create bitmask // create bitmask
var bitmask = 0; var bitmask = 0;
@ -324,13 +323,11 @@ module.exports = {
}, },
function(buf) { function(buf) {
console.log(buf);
var n = buf.unpack('S')[0]; var n = buf.unpack('S')[0];
console.log(n);
var i; var i;
var atoms = []; var atoms = [];
for(i=0; i < n; ++i) { for(i=0; i < n; ++i) {
atoms.push(buf.unpack('L', 24+4*i)); atoms.push(buf.unpack('L', 24+4*i)[0]);
//console.log([n, i, atoms]); //console.log([n, i, atoms]);
} }
return atoms; return atoms;