mirror of
https://github.com/Luca1991/NDSFactory.git
synced 2026-02-04 05:36:15 +01:00
Added option to save all file IDs while extracting FAT data
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#ifndef REVISION_H
|
||||
#define REVISION_H
|
||||
|
||||
#define GIT_COMMIT_HASH "e788d95"
|
||||
#define GIT_COMMIT_HASH "fb12309"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,6 @@ private:
|
||||
QString extractPackerHeaderTableData(int index);
|
||||
|
||||
bool extractFatData(const std::string& fatDataSectionPath, const std::string& fatSectionPath,
|
||||
const std::string& fntSectionPath, uint32_t originalFatDataAddr, const std::string& savePath);
|
||||
const std::string& fntSectionPath, uint32_t originalFatDataAddr, const std::string& savePath, bool logFileIDs);
|
||||
bool patchFat(const std::string& loadPath, uint32_t shiftSize, const std::string& savePath);
|
||||
};
|
||||
|
||||
@@ -697,6 +697,17 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fatExtractorSaveFileIDsCbx">
|
||||
<property name="text">
|
||||
<string>Save file IDs to _file_IDs.txt (required for games that access files by their ID)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_41">
|
||||
<property name="leftMargin">
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
|
||||
bool MainWindow::extractFatData(const std::string& fatDataSectionPath, const std::string& fatSectionPath,
|
||||
const std::string& fntSectionPath, uint32_t originalFatDataAddr, const std::string& savePath)
|
||||
const std::string& fntSectionPath, uint32_t originalFatDataAddr, const std::string& savePath, bool logFileIDs)
|
||||
{
|
||||
return ndsFactory.extractFatData(fatDataSectionPath, fatSectionPath, fntSectionPath, originalFatDataAddr, savePath);
|
||||
return ndsFactory.extractFatData(fatDataSectionPath, fatSectionPath, fntSectionPath, originalFatDataAddr, savePath, logFileIDs);
|
||||
}
|
||||
|
||||
bool MainWindow::patchFat(const std::string& loadPath, uint32_t shiftSize, const std::string& savePath)
|
||||
|
||||
@@ -54,10 +54,11 @@ void MainWindow::on_fatExtractorExtractBtn_clicked()
|
||||
|
||||
if (!dirPath.isNull())
|
||||
extractFatData(ui->fatExtractorFatDataPathEdt->text().toStdString(),
|
||||
ui->fatExtractorFatPathEdt->text().toStdString(),
|
||||
ui->fatExtractorFntPathEdt->text().toStdString(),
|
||||
ui->fatExtractorOriginalFatFilesAddrEdt->text().toUInt(nullptr, 16),
|
||||
dirPath.toStdString()) ? QMessageBox::information(this, tr("NDS Factory"), tr("FAT files extraction completed!"))
|
||||
ui->fatExtractorFatPathEdt->text().toStdString(),
|
||||
ui->fatExtractorFntPathEdt->text().toStdString(),
|
||||
ui->fatExtractorOriginalFatFilesAddrEdt->text().toUInt(nullptr, 16),
|
||||
dirPath.toStdString(),
|
||||
ui->fatExtractorSaveFileIDsCbx->isChecked()) ? QMessageBox::information(this, tr("NDS Factory"), tr("FAT files extraction completed!"))
|
||||
: QMessageBox::critical(this, tr("NDS Factory"), tr("Error extracting FAT files!"));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user