mirror of
https://github.com/open-goal/jak-project
synced 2026-09-06 03:08:29 -04:00
[decomp] collide-hash, collide-frag, collide-probe (#1998)
The only interesting one is `collide-hash`, which is untested. The other two are very likely unused. I skipped the annoying code in `collide-probe` because it's not used and the same as jak 1.
This commit is contained in:
@@ -757,6 +757,18 @@ Mips2C_Line handle_vmadda(const Instruction& i0, const std::string& instr_str) {
|
||||
instr_str};
|
||||
}
|
||||
|
||||
Mips2C_Line handle_vmsuba(const Instruction& i0, const std::string& instr_str) {
|
||||
return {fmt::format("c->vmsuba(DEST::{}, {}, {});", dest_to_char(i0.cop2_dest),
|
||||
reg_to_name(i0.get_src(0)), reg_to_name(i0.get_src(1))),
|
||||
instr_str};
|
||||
}
|
||||
|
||||
Mips2C_Line handle_vmula(const Instruction& i0, const std::string& instr_str) {
|
||||
return {fmt::format("c->vmula(DEST::{}, {}, {});", dest_to_char(i0.cop2_dest),
|
||||
reg_to_name(i0.get_src(0)), reg_to_name(i0.get_src(1))),
|
||||
instr_str};
|
||||
}
|
||||
|
||||
Mips2C_Line handle_vadda_bc(const Instruction& i0, const std::string& instr_str) {
|
||||
return {fmt::format("c->vadda_bc(DEST::{}, BC::{}, {}, {});", dest_to_char(i0.cop2_dest),
|
||||
i0.cop2_bc_to_char(), reg_to_name(i0.get_src(0)), reg_to_name(i0.get_src(1))),
|
||||
@@ -988,6 +1000,8 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output,
|
||||
return handle_generic_op3_bc_mask(i0, instr_str, "vmul_bc");
|
||||
case InstructionKind::VMADD:
|
||||
return handle_generic_op3_mask(i0, instr_str, "vmadd");
|
||||
case InstructionKind::VMSUB:
|
||||
return handle_generic_op3_mask(i0, instr_str, "vmsub");
|
||||
case InstructionKind::VMUL:
|
||||
return handle_generic_op3_mask(i0, instr_str, "vmul");
|
||||
case InstructionKind::VADD:
|
||||
@@ -1072,6 +1086,7 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output,
|
||||
case InstructionKind::SLTU:
|
||||
case InstructionKind::DSRAV:
|
||||
case InstructionKind::DSLLV:
|
||||
case InstructionKind::SLLV:
|
||||
case InstructionKind::PAND:
|
||||
case InstructionKind::PCEQB:
|
||||
case InstructionKind::PPACW:
|
||||
@@ -1112,6 +1127,10 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output,
|
||||
return handle_vmsuba_bc(i0, instr_str);
|
||||
case InstructionKind::VMADDA:
|
||||
return handle_vmadda(i0, instr_str);
|
||||
case InstructionKind::VMSUBA:
|
||||
return handle_vmsuba(i0, instr_str);
|
||||
case InstructionKind::VMULA:
|
||||
return handle_vmula(i0, instr_str);
|
||||
case InstructionKind::VMADD_BC:
|
||||
return handle_generic_op3_bc_mask(i0, instr_str, "vmadd_bc");
|
||||
case InstructionKind::VMSUB_BC:
|
||||
|
||||
Reference in New Issue
Block a user