Skip to content

Finish remainder of xPtankPool#562

Merged
JoshSanch merged 5 commits intobfbbdecomp:mainfrom
velkog:xPtankPool
May 22, 2025
Merged

Finish remainder of xPtankPool#562
JoshSanch merged 5 commits intobfbbdecomp:mainfrom
velkog:xPtankPool

Conversation

@velkog
Copy link
Contributor

@velkog velkog commented May 21, 2025

This gets all of xPtankPool to match at 100% with the exception of create_ptank() which is having scheduling issues with floats.

Changes included are:

  • Implement: init_groups(), create_ptanks(...), xPTankPoolSceneEnter(), xPTankPoolSceneExit(), ptank_pool::grab_block(...), and ptank_pool::flush()
  • Additionally, adjusted some of the function signatures of already matched functions to match what is listed in the PS2 dwarf
  • Moved the definition of ptank_context which one of the functions excepted to be within the anonymous namespace
  • Removed NUM_GROUPS in favor of already existing enum value: MAX_PGT
  • Updated some hardcoded enum values
  • Formatted the entire files xPtankPool.cpp and xPtankPool.h

image

@velkog
Copy link
Contributor Author

velkog commented May 21, 2025

Apologies, the changes are a little messy because I didn't run the formatter on the last PR

@github-actions
Copy link

🆗 ✅

+1624 bytes
🆗 Bot Rating: A fantastic contribution! ✨🎉

No Regressions 🎉

Progress: 10

📈 main/SB/Core/x/xPtankPool - .text +1604 bytes -> 98.95%
main/SB/Core/x/xPtankPool - .sdata2 +12 bytes -> 100.00%
main/SB/Core/x/xPtankPool - .sbss +8 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::grab_block(ptank_group_type) +576 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::flush() +252 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::init_groups() +228 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::create_ptanks(@unnamed@xPtankPool_cpp@::group_data&, unsigned long) +176 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneEnter() +152 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneExit() +140 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::render_ptank(const @unnamed@xPtankPool_cpp@::ptank_context&) +80 bytes -> 100.00%

@bfbbdecomp bfbbdecomp deleted a comment from github-actions bot May 21, 2025
Copy link
Collaborator

@JoshSanch JoshSanch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work overall! I left a comment for discussion - can consider merging after that's addressed.

@github-actions
Copy link

🆗 ✅

+1624 bytes
🆗 Bot Rating: A fantastic contribution! ✨🎉

No Regressions 🎉

Progress: 10

📈 main/SB/Core/x/xPtankPool - .text +1604 bytes -> 98.95%
main/SB/Core/x/xPtankPool - .sdata2 +12 bytes -> 100.00%
main/SB/Core/x/xPtankPool - .sbss +8 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::grab_block(ptank_group_type) +576 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::flush() +252 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::init_groups() +228 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::create_ptanks(@unnamed@xPtankPool_cpp@::group_data&, unsigned long) +176 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneEnter() +152 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneExit() +140 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::render_ptank(const @unnamed@xPtankPool_cpp@::ptank_context&) +80 bytes -> 100.00%

@github-actions
Copy link

⚠️ 🔥

+1624 bytes
🆗 Bot Rating: A fantastic contribution! ✨🎉

Regressions: 1

⚠️ main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::sort_buckets(@unnamed@xPtankPool_cpp@::group_data&) -110 bytes -> 65.43%

Progress: 10

📈 main/SB/Core/x/xPtankPool - .text +1493 bytes -> 94.78%
main/SB/Core/x/xPtankPool - .sdata2 +12 bytes -> 100.00%
main/SB/Core/x/xPtankPool - .sbss +8 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::grab_block(ptank_group_type) +576 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::flush() +252 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::init_groups() +228 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::create_ptanks(@unnamed@xPtankPool_cpp@::group_data&, unsigned long) +176 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneEnter() +152 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneExit() +140 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::render_ptank(const @unnamed@xPtankPool_cpp@::ptank_context&) +80 bytes -> 100.00%

if (it->dst_blend == front->dst_blend &&
it->src_blend == front->src_blend &&
((it->flags ^ front->flags) & rpPTANKDFLAGPOSITION) == 0)
(!(it->flags ^ front->flags) & rpPTANKDFLAGPOSITION))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this change has introduced a regression. It should read as follows to be logically equivalent:

!((it->flags ^ front->flags) & rpPTANKDFLAGPOSITION)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got overly confident and didn't check the objdiff before pushing haha

@github-actions
Copy link

🆗 ✅

+1624 bytes
🆗 Bot Rating: A fantastic contribution! ✨🎉

No Regressions 🎉

Progress: 10

📈 main/SB/Core/x/xPtankPool - .text +1604 bytes -> 98.95%
main/SB/Core/x/xPtankPool - .sdata2 +12 bytes -> 100.00%
main/SB/Core/x/xPtankPool - .sbss +8 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::grab_block(ptank_group_type) +576 bytes -> 100.00%
main/SB/Core/x/xPtankPool - ptank_pool::flush() +252 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::init_groups() +228 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::create_ptanks(@unnamed@xPtankPool_cpp@::group_data&, unsigned long) +176 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneEnter() +152 bytes -> 100.00%
main/SB/Core/x/xPtankPool - xPTankPoolSceneExit() +140 bytes -> 100.00%
main/SB/Core/x/xPtankPool - @unnamed@xPtankPool_cpp@::render_ptank(const @unnamed@xPtankPool_cpp@::ptank_context&) +80 bytes -> 100.00%

Copy link
Collaborator

@JoshSanch JoshSanch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Nice work

@JoshSanch JoshSanch merged commit 2f9a9c8 into bfbbdecomp:main May 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants