Skip to content

Commit

Permalink
Implement GroupImpl::RemoveAll (#1244)
Browse files Browse the repository at this point in the history
* Implement GroupImpl::RemoveAll (81.30%)

* Minor improvement

* Add 2 to total function count

---------

Co-authored-by: Christian Semmler <[email protected]>
  • Loading branch information
madebr and foxtacles authored Dec 20, 2024
1 parent 6f3f8c2 commit b338a66
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
run: |
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
reccmp-reccmp -S LEGO1PROGRESS.SVG -T 4352 --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
reccmp-reccmp -S LEGO1PROGRESS.SVG -T 4354 --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
- name: Compare Accuracy With Current Master
shell: bash
Expand Down
20 changes: 18 additions & 2 deletions LEGO1/tgl/d3drm/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,26 @@ Result GroupImpl::Remove(const Group* pGroup)
return ResultVal(m_data->DeleteVisual(pGroupImpl->m_data));
}

// STUB: LEGO1 0x100a34b0
// FUNCTION: LEGO1 0x100a34b0
Result GroupImpl::RemoveAll()
{
return Error;
IDirect3DRMVisualArray* visuals;
IDirect3DRMFrame2* frame = m_data;
Result result = (Result) SUCCEEDED(frame->GetVisuals(&visuals));

if (result == Success) {
for (int i = 0; i < (int) visuals->GetSize(); i++) {
IDirect3DRMVisual* visual;

result = (Result) SUCCEEDED(visuals->GetElement(i, &visual));
frame->DeleteVisual(visual);
visual->Release();
}

visuals->Release();
}

return result;
}

// STUB: LEGO1 0x100a3540
Expand Down

0 comments on commit b338a66

Please sign in to comment.