Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions port/src/btitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ std::pair<std::string, std::string> ItemPaths(int item_no) {
const int offset = item_no - first_weapons[chara];
model_path = "dun/item/main_wep/";
model_path += prefixes[chara];
/* The original's "%2d" never pads here: offsets below ten already took the leading zero. */
if (offset < 10) {
model_path += '0';
} else if (offset < 100) {
model_path += ' ';
}
model_path += std::to_string(offset);
} else {
Expand Down
3 changes: 1 addition & 2 deletions port/src/menu_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ std::pair<std::string, std::string> WeaponNames(int chara, int weapon_index) {
return {};
}
std::string number = std::to_string(weapon_index);
/* The original's "%2d" never pads here: indices below ten already took the leading zero. */
if (weapon_index < 10) {
number.insert(0, "0");
} else if (weapon_index < 100) {
number.insert(0, " ");
}
const std::string base = std::string(prefixes[chara]) + number;
return {base + ".chr", base + ".cfg"};
Expand Down