[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:
water111
2022-03-28 18:14:25 -04:00
committed by GitHub
parent 4ea8c01e02
commit b2ed9313bd
30 changed files with 2179 additions and 384 deletions
+13 -7
View File
@@ -8,9 +8,11 @@
namespace decompiler {
/*!
* Get the index of the first draw node in an array. Works for node or tfrag.
*/
/// <summary>
/// Get the index of the first draw node in an array. Works for node or tfrag.
/// </summary>
/// <param name="array"></param>
/// <returns></returns>
u16 get_first_idx(const level_tools::DrawableInlineArray* array) {
auto as_tie_instances = dynamic_cast<const level_tools::DrawableInlineArrayInstanceTie*>(array);
auto as_nodes = dynamic_cast<const level_tools::DrawableInlineArrayNode*>(array);
@@ -23,10 +25,14 @@ u16 get_first_idx(const level_tools::DrawableInlineArray* array) {
}
}
/*!
* Verify node indices follow the patterns we expect. Takes start as the expected first,
* writes the end.
*/
/// <summary>
/// Verify node indices follow the patterns we expect. Takes start as the expected first, writes the
/// end.
/// </summary>
/// <param name="array"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
bool verify_node_indices_from_array(const level_tools::DrawableInlineArray* array,
u16 start,
u16* end) {