diff --git a/README.md b/README.md index 37461796..de35e106 100755 --- a/README.md +++ b/README.md @@ -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. diff --git a/tools/dkr_extractor.cpp b/tools/dkr_extractor.cpp index 4879470b..d9ea1618 100755 --- a/tools/dkr_extractor.cpp +++ b/tools/dkr_extractor.cpp @@ -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; diff --git a/tools/dkr_extractor_classes/extract_textures.cpp b/tools/dkr_extractor_classes/extract_textures.cpp index 1d53df89..9b63ba6c 100644 --- a/tools/dkr_extractor_classes/extract_textures.cpp +++ b/tools/dkr_extractor_classes/extract_textures.cpp @@ -35,10 +35,10 @@ ExtractTextures::ExtractTextures(std::vector data, ROM& rom, std::strin int textureSize = get_texture_size(width, height, textureFormat); std::vector texHeader(texData.begin() + dataOffset, texData.begin() + dataOffset + TEX_HEADER_SIZE); - std::vector texData(texData.begin() + dataOffset + TEX_HEADER_SIZE, texData.begin() + dataOffset + textureSize); + std::vector 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];