1
0
Fork 0
mirror of https://github.com/marcrobledo/RomPatcher.js.git synced 2025-06-27 16:25:54 +00:00

show expected ROM source if patch can validate source, for issue #69

This commit is contained in:
Marc Robledo 2024-07-21 11:12:39 +02:00
parent 0992132c57
commit c1293bb3ed
8 changed files with 91 additions and 9 deletions

View file

@ -1,4 +1,4 @@
/* RUP module for Rom Patcher JS v20180930 - Marc Robledo 2018 - http://www.marcrobledo.com/license */
/* RUP module for Rom Patcher JS v20240721 - Marc Robledo 2018-2024 - http://www.marcrobledo.com/license */
/* File format specification: http://www.romhacking.net/documents/288/ */
const RUP_MAGIC='NINJA2';
@ -54,6 +54,16 @@ RUP.prototype.validateSource=function(romFile,headerSize){
}
return false;
}
RUP.prototype.getValidationInfo=function(){
var ret=[];
for(var i=0; i<this.files.length; i++){
ret.push({
'type':'MD5',
'value':this.files[i].sourceMD5
});
}
return ret;
}
RUP.prototype.apply=function(romFile, validate){
var validFile;
if(validate){