rework endswitch disassemble
This commit is contained in:
parent
32d4ec28d7
commit
06a30ddd99
@ -365,15 +365,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -365,15 +365,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -364,15 +364,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -364,15 +364,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -364,15 +364,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -365,15 +365,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -366,15 +366,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x40000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -417,15 +417,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
|||||||
{
|
{
|
||||||
const auto value = script_->read<std::uint32_t>();
|
const auto value = script_->read<std::uint32_t>();
|
||||||
|
|
||||||
if (value < 0x40000 && value > 0)
|
if (value < 0x80000)
|
||||||
{
|
{
|
||||||
inst->data.push_back("case");
|
const auto data = stack_->read_c_string();
|
||||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
|
||||||
}
|
if (data.data()[0] != 0x01)
|
||||||
else if (value == 0)
|
{
|
||||||
{
|
inst->data.push_back("case");
|
||||||
inst->data.push_back("default");
|
inst->data.push_back(utils::string::quote(data, false));
|
||||||
stack_->read_c_string();
|
}
|
||||||
|
else
|
||||||
|
inst->data.push_back("default");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user