Merge pull request #126 from DavidSM64/doc

Fixed segfault issue with dkr_extractor
This commit is contained in:
David Benepe
2021-06-28 18:01:20 -05:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -21,7 +21,7 @@ Currently, only the US 1.0 version of the game is supported. US 1.1, EU 1.0, EU
## Setup / Building
1. Install the dependencies
2. Place the ROM file within the `baseroms` directory.
**a.** Any DKR ROM should work as long as it is US 1.0.
**a.** Any DKR ROM should work as long as it is US 1.0, and it ends with one of these extensions: `.z64`, `.v64`, `.n64`, or `.rom`.
**b.** The name of the ROM file does not matter. It will be detected automatically from an md5 checksum.
**c.** If you use a byte-swapped or little-endian ROM, then it will automatically be converted to a big-endian (.z64) ROM file.
3. Run `make` in the main directory.

View File

@@ -17,7 +17,7 @@ namespace fs = std::experimental::filesystem;
const std::string CONFIG_EXTENSION = ".config.json";
const std::string ROM_EXTENSIONS[3] = { ".z64", ".v64", ".n64" };
const std::string ROM_EXTENSIONS[] = { ".z64", ".v64", ".n64", ".rom" };
std::string outDirectory;
std::string currentCategory;
@@ -101,9 +101,9 @@ int main(int argc, char* argv[]) {
for (const auto & entry : fs::directory_iterator(baseromsDirectory)){
std::string filename = entry.path().string();
//if(ends_with_rom_extension(filename)) {
if(ends_with_rom_extension(filename)) {
roms.push_back(ROM(filename));
//}
}
}
bool completedAnExtraction = false;

View File

@@ -35,10 +35,10 @@ ExtractTextures::ExtractTextures(std::vector<uint8_t> data, ROM& rom, std::strin
int textureSize = get_texture_size(width, height, textureFormat);
std::vector<uint8_t> texHeader(texData.begin() + dataOffset, texData.begin() + dataOffset + TEX_HEADER_SIZE);
std::vector<uint8_t> texData(texData.begin() + dataOffset + TEX_HEADER_SIZE, texData.begin() + dataOffset + textureSize);
std::vector<uint8_t> texData2(texData.begin() + dataOffset + TEX_HEADER_SIZE, texData.begin() + dataOffset + textureSize);
process_texture(texHeader, texData);
combinedTexturesData.insert(combinedTexturesData.end(), texData.begin(), texData.end());
process_texture(texHeader, texData2);
combinedTexturesData.insert(combinedTexturesData.end(), texData2.begin(), texData2.end());
dataOffset += textureSize;
totalHeight += texHeader[1];