mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Add openttd support
This commit is contained in:
parent
b8d41ef318
commit
0fe80d14e7
5 changed files with 165 additions and 2 deletions
|
|
@ -110,6 +110,16 @@ Reader.prototype = {
|
|||
this.i += 4;
|
||||
return r;
|
||||
},
|
||||
part: function(bytes) {
|
||||
var r;
|
||||
if(this.remaining() >= bytes) {
|
||||
r = this.buffer.slice(this.i,this.i+bytes);
|
||||
} else {
|
||||
r = new Buffer();
|
||||
}
|
||||
this.i += bytes;
|
||||
return r;
|
||||
},
|
||||
remaining: function() {
|
||||
return this.buffer.length-this.i;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue