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

GUI redesign among other fixes

This commit is contained in:
Marc Robledo 2018-04-28 15:57:54 +02:00
parent eb40a592b5
commit a56fa9d4e8
13 changed files with 251 additions and 314 deletions

5
bps.js
View file

@ -1,4 +1,4 @@
/* BPS module for RomPatcher.js v20171112 - Marc Robledo 2016-2017 - http://www.marcrobledo.com/license */
/* BPS module for RomPatcher.js v20180428 - Marc Robledo 2016-2018 - http://www.marcrobledo.com/license */
/* File format specification: https://www.romhacking.net/documents/746/ */
var BPS_MAGIC='BPS1';
@ -28,8 +28,9 @@ BPS.prototype.toString=function(){
/*BPS.prototype.export=function(){
}*/
BPS.prototype.validateSource=function(romFile){return this.sourceChecksum===crc32(romFile,false)}
BPS.prototype.apply=function(romFile){
if(this.sourceChecksum!==crc32(romFile,false)){
if(!this.validateSource(romFile)){
MarcDialogs.alert('Error: invalid source ROM checksum');
return false;
}