diff --git a/src/h1/xsk/decompiler.cpp b/src/h1/xsk/decompiler.cpp index 964e9858..493a483b 100644 --- a/src/h1/xsk/decompiler.cpp +++ b/src/h1/xsk/decompiler.cpp @@ -1789,7 +1789,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1803,22 +1803,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/h2/xsk/decompiler.cpp b/src/h2/xsk/decompiler.cpp index 9ce527d3..661d59c3 100644 --- a/src/h2/xsk/decompiler.cpp +++ b/src/h2/xsk/decompiler.cpp @@ -1789,7 +1789,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1803,22 +1803,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/iw5/xsk/decompiler.cpp b/src/iw5/xsk/decompiler.cpp index 7dc8a3d7..8148e4b2 100644 --- a/src/iw5/xsk/decompiler.cpp +++ b/src/iw5/xsk/decompiler.cpp @@ -1783,7 +1783,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1797,22 +1797,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/iw5/xsk/resolver.cpp b/src/iw5/xsk/resolver.cpp index b33b4e00..43a4e194 100644 --- a/src/iw5/xsk/resolver.cpp +++ b/src/iw5/xsk/resolver.cpp @@ -1722,7 +1722,7 @@ const std::array, 780> method_list { 0x830C, "setgametypestring" }, }}; -const std::array, 6157> token_list +const std::array, 6153> token_list {{ { 0x0000, "" }, { 0x0001, "pl#" }, @@ -1741,9 +1741,9 @@ const std::array, 6157> token_list // { 0x000E, "" }, // { 0x000F, "" }, // { 0x0010, "" }, - { 0x0011, "teamhasremoteuav" }, - { 0x0012, "carriedremoteuav" }, - { 0x0013, "imsbombsquadmodel" }, + { 0x0011, "teamhasremoteuav" }, // guessed IW patch + { 0x0012, "carriedremoteuav" }, // guessed IW patch + { 0x0013, "imsbombsquadmodel" }, // guessed IW patch { 0x0014, "zonescycling" }, // { 0x0015, "" }, // { 0x0016, "" }, @@ -1778,7 +1778,7 @@ const std::array, 6157> token_list // { 0x0033, "" }, // { 0x0034, "" }, // { 0x0035, "" }, - { 0x0036, "_unk_field_id54" }, +// { 0x0036, "" }, { 0x0037, "isbuffequippedonweapon" }, { 0x0038, "ondisconnect" }, // { 0x0039, "" }, @@ -2147,9 +2147,9 @@ const std::array, 6157> token_list { 0x01A4, "painted" }, { 0x01A5, "hidecarryiconongameend" }, { 0x01A6, "emptimeremaining" }, - { 0x01A7, "juggremoveradarongameended" }, + { 0x01A7, "juggremoveradarongameended" }, // guessed IW patch { 0x01A8, "airstrikessfx" }, - { 0x01A9, "airstrikeexplosion" }, + { 0x01A9, "airstrikeexplosion" }, // guessed IW patch { 0x01AA, "keepemptimeremaining" }, { 0x01AB, "nukeemptimeremaining" }, { 0x01AC, "keepnukeemptimeremaining" }, @@ -3071,7 +3071,7 @@ const std::array, 6157> token_list { 0x0540, "codescripts/delete" }, { 0x0541, "codescripts/struct" }, // { 0x0542, "" }, -// { 0x0543, "" }, + { 0x0543, "maps/_breach" }, // { 0x0544, "" }, // { 0x0545, "" }, // { 0x0546, "" }, @@ -7521,7 +7521,7 @@ const std::array, 6157> token_list // { 0x16A2, "" }, // { 0x16A3, "" }, // { 0x16A4, "" }, - { 0x16A5, "_unk_field_id5797" }, +// { 0x16A5, "" }, // { 0x16A6, "" }, // { 0x16A7, "" }, // { 0x16A8, "" }, @@ -12359,9 +12359,9 @@ const std::array, 6157> token_list // { 0x2988, "" }, // { 0x2989, "" }, // { 0x298A, "" }, - { 0x298B, "_unk_field_id10635" }, +// { 0x298B, "" }, // { 0x298C, "" }, - { 0x298D, "_unk_field_id10637" }, +// { 0x298D, "" }, // { 0x298E, "" }, // { 0x298F, "" }, // { 0x2990, "" }, @@ -16081,7 +16081,7 @@ const std::array, 6157> token_list { 0x3812, "arrayinsertion" }, { 0x3813, "getproperty" }, { 0x3814, "statusmenu" }, - { 0x3815, "_statusmenu" }, + { 0x3815, "_statusmenu" }, // typo by IW { 0x3816, "streakshouldchain" }, { 0x3817, "fixakimbostring" }, { 0x3818, "rounddecimalplaces" }, @@ -27551,7 +27551,7 @@ const std::array, 6157> token_list // { 0x64E0, "" }, // { 0x64E1, "" }, // { 0x64E2, "" }, - { 0x64E3, "_unk_field_id25827" }, +// { 0x64E3, "" }, // { 0x64E4, "" }, // { 0x64E5, "" }, // { 0x64E6, "" }, diff --git a/src/iw6/xsk/decompiler.cpp b/src/iw6/xsk/decompiler.cpp index f906f217..91dc0b02 100644 --- a/src/iw6/xsk/decompiler.cpp +++ b/src/iw6/xsk/decompiler.cpp @@ -1783,7 +1783,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1797,22 +1797,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/iw7/xsk/decompiler.cpp b/src/iw7/xsk/decompiler.cpp index ade885ee..02b9fd11 100644 --- a/src/iw7/xsk/decompiler.cpp +++ b/src/iw7/xsk/decompiler.cpp @@ -1783,7 +1783,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1797,22 +1797,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/iw8/xsk/decompiler.cpp b/src/iw8/xsk/decompiler.cpp index 8069389d..b9ab5ec0 100644 --- a/src/iw8/xsk/decompiler.cpp +++ b/src/iw8/xsk/decompiler.cpp @@ -1820,7 +1820,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1834,22 +1834,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/s1/xsk/decompiler.cpp b/src/s1/xsk/decompiler.cpp index 3d7ffa87..642376ad 100644 --- a/src/s1/xsk/decompiler.cpp +++ b/src/s1/xsk/decompiler.cpp @@ -1789,7 +1789,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1803,22 +1803,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/s2/xsk/decompiler.cpp b/src/s2/xsk/decompiler.cpp index a5681fcc..8fa8ce26 100644 --- a/src/s2/xsk/decompiler.cpp +++ b/src/s2/xsk/decompiler.cpp @@ -1796,7 +1796,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1810,22 +1810,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } } diff --git a/src/s4/xsk/decompiler.cpp b/src/s4/xsk/decompiler.cpp index 6d9f21c4..5f080de0 100644 --- a/src/s4/xsk/decompiler.cpp +++ b/src/s4/xsk/decompiler.cpp @@ -1820,7 +1820,7 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) { if (stmt->list.size() == 0) return; - for (std::int32_t i = stmt->list.size() - 1; i >= 0; i--) + for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { if (stmt->list.at(i) == ast::kind::asm_jump_back) { @@ -1834,22 +1834,22 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) else if (i == static_cast(start)) // empty loop { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt { decompile_infinite(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } else if (stmt->list.at(start).as_cond->value == break_loc) // not inf { decompile_loop(stmt, start, i); - i = stmt->list.size(); + i = static_cast(stmt->list.size()); } } }