Refactor object listing code

This also adds the commands after the last primitive data but before the next frame as a unique object; this is mainly just the XFB copy.  It's nice to have these visible, though disabling the object does nothing since only primitive data is disabled and there is no primitive data in this case.
This commit is contained in:
Pokechu22
2021-04-21 18:06:33 -07:00
parent 1914087998
commit d5cfac71d0
6 changed files with 163 additions and 113 deletions

View File

@ -58,15 +58,19 @@ private:
struct SearchResult
{
constexpr SearchResult(u32 frame, u32 object, u32 cmd)
: m_frame(frame), m_object(object), m_cmd(cmd)
constexpr SearchResult(u32 frame, u32 object_idx, u32 cmd)
: m_frame(frame), m_object_idx(object_idx), m_cmd(cmd)
{
}
const u32 m_frame;
const u32 m_object;
// Index in tree view. Does not correspond with object numbers or part numbers.
const u32 m_object_idx;
const u32 m_cmd;
};
// Offsets from the start of the first part in an object for each command within the currently
// selected object.
std::vector<int> m_object_data_offsets;
std::vector<SearchResult> m_search_results;
};