mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-07-27 16:48:31 +00:00
- feat (web): dynamic JS modules loading
- feat (web): added onloadpatch event - fix (cli): fixed path for JS files
This commit is contained in:
parent
bc82f6d748
commit
de2f0e5c7d
9 changed files with 315 additions and 210 deletions
|
@ -184,14 +184,19 @@ VCDIFF.fromFile=function(file){
|
|||
|
||||
function VCDIFF_Parser(binFile, offset)
|
||||
{
|
||||
BinFile.call(this, 0);
|
||||
this.fileSize=binFile.fileSize;
|
||||
this._u8array=binFile._u8array;
|
||||
this._dataView=binFile._dataView;
|
||||
this.offset=offset || 0;
|
||||
}
|
||||
|
||||
VCDIFF_Parser.prototype=Object.create(BinFile.prototype);
|
||||
/* reimplement readU8, readU32 and skip from BinFile */
|
||||
/* in web implementation, there are no guarantees BinFile will be dynamically loaded before this one */
|
||||
/* so we cannot rely on cloning BinFile.prototype */
|
||||
this.readU8 = binFile.readU8;
|
||||
this.readU32 = binFile.readU32;
|
||||
this.skip = binFile.skip;
|
||||
this.isEOF = binFile.isEOF;
|
||||
this.seek = binFile.seek;
|
||||
}
|
||||
VCDIFF_Parser.prototype.read7BitEncodedInt=function(){
|
||||
var num=0, bits = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue