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:
parent
eb40a592b5
commit
a56fa9d4e8
13 changed files with 251 additions and 314 deletions
7
ips.js
7
ips.js
|
@ -1,4 +1,4 @@
|
|||
/* IPS module for RomPatcher.js v20180427 - Marc Robledo 2016-2018 - http://www.marcrobledo.com/license */
|
||||
/* IPS module for RomPatcher.js v20180428 - Marc Robledo 2016-2018 - http://www.marcrobledo.com/license */
|
||||
/* File format specification: http://www.smwiki.net/wiki/IPS_file_format */
|
||||
|
||||
var MAX_IPS_SIZE=16777216;
|
||||
|
@ -33,7 +33,7 @@ IPS.prototype.toString=function(){
|
|||
s+='\nTruncate at: 0x'+this.truncate.toString(16);
|
||||
return s
|
||||
}
|
||||
IPS.prototype.export=function(){
|
||||
IPS.prototype.export=function(fileName){
|
||||
var binFileSize=0;
|
||||
binFileSize+=5; //PATCH string
|
||||
for(var i=0; i<this.records.length; i++){
|
||||
|
@ -48,7 +48,7 @@ IPS.prototype.export=function(){
|
|||
|
||||
tempFile=new MarcBinFile(binFileSize);
|
||||
tempFile.littleEndian=false;
|
||||
tempFile.fileName='patch.ips';
|
||||
tempFile.fileName=fileName+'.ips';
|
||||
tempFile.writeString(0, 'PATCH', 5);
|
||||
var seek=5;
|
||||
for(var i=0; i<this.records.length; i++){
|
||||
|
@ -75,6 +75,7 @@ IPS.prototype.export=function(){
|
|||
|
||||
return tempFile
|
||||
}
|
||||
IPS.prototype.validateInput=function(romFile){return '?'}
|
||||
IPS.prototype.apply=function(romFile){
|
||||
var newFileSize=romFile.fileSize;
|
||||
for(var i=0; i<this.records.length; i++){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue