mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 03:30:01 -04:00
[graphics] First part of shrub extraction (#1258)
* decompile 90% of shrubbery * some more progress * some more * big function decompiled * went through `draw-prototype-inline-array-shrub` and made more notes * shrub: start implementing extract_shrub * read through current notes and add the info to current decomp * decomp: allow skipping inline-asm from output * add code to BspHeader to get GOAL types for shrubs * add doc * wip * fix bad merge Co-authored-by: Tyler Wilding <xtvaser@gmail.com> Co-authored-by: Tyler Wilding <xTVaser@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,16 @@ typedef OpenGOALAsm::InstructionModifiers MOD;
|
||||
|
||||
const std::map<InstructionKind, OpenGOALAsm::Function> MIPS_ASM_TO_OPEN_GOAL_FUNCS = {
|
||||
// ----- EE -------
|
||||
// Instructions that are nopped
|
||||
// {InstructionKind::MTC0,
|
||||
// {".nop", {MOD::SKIP_IT}}}, // they only use this for performance counters / Count /
|
||||
// Debug
|
||||
// {InstructionKind::MTPC, {".nop", {MOD::SKIP_IT}}},
|
||||
// {InstructionKind::MFPC, {".nop", {MOD::SKIP_IT}}},
|
||||
// {InstructionKind::SYNCP, {".nop", {MOD::SKIP_IT}}},
|
||||
// {InstructionKind::SYNCL, {".nop", {MOD::SKIP_IT}}},
|
||||
|
||||
// Shifts and such
|
||||
{InstructionKind::PSLLW, {".pw.sll", {}}},
|
||||
{InstructionKind::PSRAW, {".pw.sra", {}}},
|
||||
{InstructionKind::PSUBW, {".psubw", {}}},
|
||||
@@ -156,6 +166,10 @@ OpenGOALAsm::OpenGOALAsm(Instruction _instr) : m_instr(_instr) {
|
||||
if (func.funcTemplate.rfind("TODO", 0) == 0) {
|
||||
todo = true;
|
||||
}
|
||||
if (std::find(func.modifiers.begin(), func.modifiers.end(), InstructionModifiers::SKIP_IT) !=
|
||||
func.modifiers.end()) {
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,6 +184,10 @@ OpenGOALAsm::OpenGOALAsm(Instruction _instr,
|
||||
if (func.funcTemplate.rfind("TODO", 0) == 0) {
|
||||
todo = true;
|
||||
}
|
||||
if (std::find(func.modifiers.begin(), func.modifiers.end(), InstructionModifiers::SKIP_IT) !=
|
||||
func.modifiers.end()) {
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user