mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-09-25 17:36:56 +00:00
refactor: resorted all EBP and BDF references
This commit is contained in:
parent
fd6e589184
commit
91e522e247
7 changed files with 29 additions and 27 deletions
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2016-2024 Marc Robledo
|
||||
* Copyright (c) 2016-2025 Marc Robledo
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -113,12 +113,12 @@ const RomPatcher = (function () {
|
|||
patch = RUP.fromFile(patchFile);
|
||||
} else if (header.startsWith(PPF.MAGIC)) {
|
||||
patch = PPF.fromFile(patchFile);
|
||||
} else if (header.startsWith(BDF.MAGIC)) {
|
||||
patch = BDF.fromFile(patchFile);
|
||||
} else if (header.startsWith(PMSR.MAGIC)) {
|
||||
patch = PMSR.fromFile(patchFile);
|
||||
} else if (header.startsWith(VCDIFF.MAGIC)) {
|
||||
patch = VCDIFF.fromFile(patchFile);
|
||||
} else if (header.startsWith(BDF.MAGIC)) {
|
||||
patch = BDF.fromFile(patchFile);
|
||||
}
|
||||
|
||||
if (patch)
|
||||
|
@ -255,7 +255,6 @@ const RomPatcher = (function () {
|
|||
} else if (format === 'aps') {
|
||||
patch = APS.buildFromRoms(originalFile, modifiedFile);
|
||||
} else if (format === 'rup') {
|
||||
if(metadata)
|
||||
patch = RUP.buildFromRoms(originalFile, modifiedFile, metadata && metadata.Description? metadata.Description : null);
|
||||
} else if (format === 'ebp') {
|
||||
patch = IPS.buildFromRoms(originalFile, modifiedFile, metadata);
|
||||
|
@ -407,7 +406,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|||
BPS = require('./modules/RomPatcher.format.bps');
|
||||
RUP = require('./modules/RomPatcher.format.rup');
|
||||
PPF = require('./modules/RomPatcher.format.ppf');
|
||||
BDF = require('./modules/RomPatcher.format.bdf');
|
||||
PMSR = require('./modules/RomPatcher.format.pmsr');
|
||||
VCDIFF = require('./modules/RomPatcher.format.vcdiff');
|
||||
BDF = require('./modules/RomPatcher.format.bdf');
|
||||
}
|
|
@ -48,9 +48,9 @@ const RomPatcherWeb = (function () {
|
|||
'modules/RomPatcher.format.bps.js',
|
||||
'modules/RomPatcher.format.rup.js',
|
||||
'modules/RomPatcher.format.ppf.js',
|
||||
'modules/RomPatcher.format.bdf.js',
|
||||
'modules/RomPatcher.format.pmsr.js',
|
||||
'modules/RomPatcher.format.vcdiff.js',
|
||||
'modules/RomPatcher.format.bdf.js',
|
||||
'modules/zip.js/zip.min.js',
|
||||
'RomPatcher.js'
|
||||
];
|
||||
|
@ -1176,7 +1176,7 @@ const ZIPManager = (function (romPatcherWeb) {
|
|||
|
||||
const ZIP_MAGIC = '\x50\x4b\x03\x04';
|
||||
|
||||
const FILTER_PATCHES = /\.(ips|ups|bps|aps|rup|ppf|mod|ebp|xdelta|vcdiff|bdf|bspatch)$/i;
|
||||
const FILTER_PATCHES = /\.(ips|ups|bps|aps|rup|ppf|ebp|bdf|bspatch|mod|xdelta|vcdiff)$/i;
|
||||
//const FILTER_ROMS=/(?<!\.(txt|diz|rtf|docx?|xlsx?|html?|pdf|jpe?g|gif|png|bmp|webp|zip|rar|7z))$/i; //negative lookbehind is not compatible with Safari https://stackoverflow.com/a/51568859
|
||||
const FILTER_NON_ROMS = /(\.(txt|diz|rtf|docx?|xlsx?|html?|pdf|jpe?g|gif|png|bmp|webp|zip|rar|7z))$/i;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Rom Patcher JS v20240302 - Marc Robledo 2016-2024 - http://www.marcrobledo.com/license */
|
||||
/* Rom Patcher JS v20250922 - Marc Robledo 2016-2025 - http://www.marcrobledo.com/license */
|
||||
|
||||
self.importScripts(
|
||||
'./RomPatcher.js',
|
||||
|
@ -11,9 +11,9 @@ self.importScripts(
|
|||
'./modules/RomPatcher.format.bps.js',
|
||||
'./modules/RomPatcher.format.rup.js',
|
||||
'./modules/RomPatcher.format.ppf.js',
|
||||
'./modules/RomPatcher.format.bdf.js',
|
||||
'./modules/RomPatcher.format.pmsr.js',
|
||||
'./modules/RomPatcher.format.vcdiff.js',
|
||||
'./modules/RomPatcher.format.bdf.js'
|
||||
'./modules/RomPatcher.format.vcdiff.js'
|
||||
);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue