Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Hotfix sv_enemies still being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Feb 26, 2021
1 parent acca944 commit fbe797e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog][Keep a Changelog] and this project adh

## [Released]

## [1.5.2] - 2021-02-26

### Fixed

- Hotfixed `sv_enemies` folder still being ignored ([#24](https://github.com/erri120/rpgmpacker/issues/24))

## [1.5.1] - 2021-02-25

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion include/inputPaths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct InputPaths {
path actorsBattlerPath;
//img/enemies/ for front-view
path enemiesFrontViewBattlerPath;
//img/sv_enemies for side-view
//img/sv_enemies/ for side-view
path enemiesSideViewBattlerPath;

//MV only: img/animations/
Expand Down
12 changes: 3 additions & 9 deletions src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,20 +461,16 @@ bool filterUnusedFiles(const ghc::filesystem::path& path, struct InputPaths* inp
auto extension = path.extension().u8string();
auto parent = path.parent_path();

if (parent.filename() == "sv_enemies") {
//sv_enemies will be completely ignored by RPG Maker and only the enemies folder is being used
//you can verify this by opening RPG Maker, going to the Database->Enemies and selecting an image
//the base Actor1_3 is different in sv_enemies/ and enemies/ but only the one from enemies/ turns up
return true;
}

auto name = filename.substr(0, filename.find(extension));

std::set<std::string>::iterator it;

if (parent == inputPaths->bgmPath) {
it = parsedData->bgmNames.find(name);
return it == parsedData->bgmNames.end();
} else if (parent == inputPaths->enemiesFrontViewBattlerPath || parent == inputPaths->enemiesSideViewBattlerPath) {
it = parsedData->enemyBattlerNames.find(name);
return it == parsedData->enemyBattlerNames.end();
}
FIND(inputPaths->bgsPath, parsedData->bgsNames)
FIND(inputPaths->mePath, parsedData->meNames)
Expand All @@ -486,8 +482,6 @@ bool filterUnusedFiles(const ghc::filesystem::path& path, struct InputPaths* inp
FIND(inputPaths->charactersPath, parsedData->characterNames)
FIND(inputPaths->facesPath, parsedData->faceNames)
FIND(inputPaths->actorsBattlerPath, parsedData->actorBattlerNames)
FIND(inputPaths->enemiesFrontViewBattlerPath, parsedData->enemyBattlerNames)
FIND(inputPaths->enemiesSideViewBattlerPath, parsedData->enemyBattlerNames)
FIND(inputPaths->tilesetsPath, parsedData->tilesetNames)
FIND(inputPaths->battlebacks1Path, parsedData->battleback1Names)
FIND(inputPaths->battlebacks2Path, parsedData->battleback2Names)
Expand Down

0 comments on commit fbe797e

Please sign in to comment.