diff options
author | Aric Stewart <aric@codeweavers.com> | 2013-09-16 11:11:44 -0500 |
---|---|---|
committer | Jeremy White <jwhite@codeweavers.com> | 2013-09-18 09:06:03 -0500 |
commit | 295073a95469e1f8633d5f70e6bad8be367b4635 (patch) | |
tree | 158f42c06191e8e8733a02da8db953dd9315157d /spicetype.js | |
parent | 3056d62ae2c305362f1437744d14ab18900efc26 (diff) |
implement and use a new dataview getUint64
Diffstat (limited to 'spicetype.js')
-rw-r--r-- | spicetype.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/spicetype.js b/spicetype.js index 758f37a..951b277 100644 --- a/spicetype.js +++ b/spicetype.js @@ -109,8 +109,7 @@ SpiceImageDescriptor.prototype = { from_dv: function(dv, at, mb) { - this.id = dv.getUint32(at, true); at += 4; - this.id += (dv.getUint32(at, true) << 32); at += 4; + this.id = dv.getUint64(at, true); at += 8; this.type = dv.getUint8(at, true); at ++; this.flags = dv.getUint8(at, true); at ++; this.width = dv.getUint32(at, true); at += 4; @@ -128,9 +127,7 @@ SpicePalette.prototype = from_dv: function(dv, at, mb) { var i; - this.unique = []; - this.unique[0] = dv.getUint32(at, true); at += 4; - this.unique[1] = dv.getUint32(at, true); at += 4; + this.unique = dv.getUint64(at, true); at += 8; this.num_ents = dv.getUint16(at, true); at += 2; this.ents = []; for (i = 0; i < this.num_ents; i++) @@ -156,9 +153,7 @@ SpiceBitmap.prototype = this.stride = dv.getUint32(at, true); at += 4; if (this.flags & SPICE_BITMAP_FLAGS_PAL_FROM_CACHE) { - this.palette_id = []; - this.palette_id[0] = dv.getUint32(at, true); at += 4; - this.palette_id[1] = dv.getUint32(at, true); at += 4; + this.palette_id = dv.getUint64(at, true); at += 8; } else { @@ -425,9 +420,7 @@ SpiceCursorHeader.prototype = { from_dv: function(dv, at, mb) { - this.unique = []; - this.unique[0] = dv.getUint32(at, true); at += 4; - this.unique[1] = dv.getUint32(at, true); at += 4; + this.unique = dv.getUint64(at, true); at += 8; this.type = dv.getUint8(at, true); at ++; this.width = dv.getUint16(at, true); at += 2; this.height = dv.getUint16(at, true); at += 2; |