New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert QuantizeFacing to WAngle. #18067
Conversation
Updated to also include |
deeeeb1
to
cf72140
Compare
Rebased and fixed comment. |
Fixed. |
Rebased and fixed comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me and didn't spot any regressions vs. bleed on RA shellmap, so LGTM.
Just pointing this out: Either the table fron Chronoshift isn't fully accurate (note how the 'east' facings aren't symmetric to 'west' facings in terms of mapping), or our movement code messes things up, maybe a bit of both. For example, on the RA shellmap, when the harvester moves to its initial harvest point, its harvest anim facing and regular sprite body facing are misaligned again. This isn't a regression vs. bleed though (only from taking the Chronoshift table), and we're probably better off waiting for the C&C Remaster source code to become available before tackling this, rather than trying to fix this on our own through guesswork or trial-and-error. |
I may have introduced a bug when converting the facing tables... |
This PR follows up #18058 with another small step towards converting facings to WAngle. The facing quantization code is particularly fiddly, so this PR focuses just on getting that right.
In addition to converting to WAngle, this also fixes a long-standing bug that nobody had noticed - we were accounting for the non-linear mapping when calculating the sprite frame, but not when converting this back to a facing. This caused a small misalignment in muzzle angle at diagonal facings:
Before:
After: