diff --git a/src/h1/xsk/decompiler.cpp b/src/h1/xsk/decompiler.cpp index 617535b2..edd74305 100644 --- a/src/h1/xsk/decompiler.cpp +++ b/src/h1/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); diff --git a/src/h2/xsk/decompiler.cpp b/src/h2/xsk/decompiler.cpp index ee684d05..1e8f4188 100644 --- a/src/h2/xsk/decompiler.cpp +++ b/src/h2/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); diff --git a/src/iw5/xsk/decompiler.cpp b/src/iw5/xsk/decompiler.cpp index b2b0ba1b..134d475d 100644 --- a/src/iw5/xsk/decompiler.cpp +++ b/src/iw5/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); diff --git a/src/iw6/xsk/decompiler.cpp b/src/iw6/xsk/decompiler.cpp index a17e2f3a..875054d6 100644 --- a/src/iw6/xsk/decompiler.cpp +++ b/src/iw6/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); diff --git a/src/iw7/xsk/decompiler.cpp b/src/iw7/xsk/decompiler.cpp index 3f5f6959..283227a2 100644 --- a/src/iw7/xsk/decompiler.cpp +++ b/src/iw7/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); diff --git a/src/s1/xsk/decompiler.cpp b/src/s1/xsk/decompiler.cpp index eb8eb844..906a8839 100644 --- a/src/s1/xsk/decompiler.cpp +++ b/src/s1/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); diff --git a/src/s2/xsk/decompiler.cpp b/src/s2/xsk/decompiler.cpp index 89298b73..4226e89f 100644 --- a/src/s2/xsk/decompiler.cpp +++ b/src/s2/xsk/decompiler.cpp @@ -658,6 +658,28 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarChildThreadCall: + { + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto obj = gsc::expr_ptr(std::make_unique()); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFarMethodThreadCall: { auto obj = gsc::expr_ptr(std::move(stack_.top())); @@ -682,6 +704,30 @@ void decompiler::decompile_statements(const gsc::function_ptr& func) stack_.push(std::move(expr)); } break; + case opcode::OP_ScriptFarMethodChildThreadCall: + { + auto obj = gsc::expr_ptr(std::move(stack_.top())); + stack_.pop(); + loc = obj.as_node->loc; + auto args = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[2]); + auto file = std::make_unique(loc, utils::string::backslash(inst->data[1])); + + auto argnum = std::stoul(inst->data[0]); + + for (size_t i = argnum; i > 0; i--) + { + auto var = std::move(stack_.top()); + stack_.pop(); + loc = var->loc; + args->list.push_back(std::move(var)); + } + + auto func = gsc::expr_call_type_ptr(std::make_unique(loc, std::move(file), std::move(name), std::move(args))); + auto expr = std::make_unique(loc, false, true, std::move(obj) ,std::move(func)); + stack_.push(std::move(expr)); + } + break; case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc);