23 std::vector<uint32_t> tileIDs;
26 std::stringstream ss(arg_vec[2].data());
27 for (std::string tileID; std::getline(ss, tileID,
',');) {
33 }
else if (tileID.find(
'-') != std::string::npos) {
35 std::stringstream rangeSS(tileID);
38 std::getline(rangeSS, start,
'-');
39 std::getline(rangeSS, end);
40 uint32_t startID = std::stoi(start,
nullptr, 16);
41 uint32_t endID = std::stoi(end,
nullptr, 16);
42 for (uint32_t i = startID; i <= endID; ++i) {
47 uint32_t tileID_int = std::stoi(tileID,
nullptr, 16);
48 tileIDs.push_back(tileID_int);
52 for (
const auto& tile16_id_int : tileIDs) {
58 if (source_tile16_data != dest_tile16_data) {
60 std::cout <<
"Difference detected in tile16 ID " << tile16_id_int
61 <<
". Do you want to transfer it to dest rom? (y/n): ";
63 std::cin >> userChoice;
66 if (userChoice ==
'y' || userChoice ==
'Y') {
68 dest_rom.
WriteTile16(tile16_id_int, source_tile16_data));
69 std::cout <<
"Transferred tile16 ID " << tile16_id_int
70 <<
" to dest rom." << std::endl;
72 std::cout <<
"Skipped transferring tile16 ID " << tile16_id_int <<
"."
81 std::cout <<
"Successfully transferred tile16" << std::endl;
83 return absl::OkStatus();