Improved naming in PlayerBlinkWhite#2893
Conversation
All names reused from MarEntityPlayerBlinkWhite.
rsin/rcos return FLT (1.0 = 4096) as per the Psy-Q manual.
Name taken from EntityTeleport. This field is used as a multiplier for color values in color-changing effects.
| g_Player.unk6C = 0; | ||
| goto block_231; | ||
| DestroyEntity(self); | ||
| return; |
There was a problem hiding this comment.
Did not look too closely but I think removing these gotos breaks the PSP match?
You might need to bring in your changes to the PSP scratch and play around with it some more
https://decomp.me/scratch/GoMQZ
src/boss/bo4/doors.c
Outdated
| angle = D_us_801805EC[(i + 0) % 16]; | ||
| prim->r0 = | ||
| ((rsin(angle) + FIX(1.0 / 16)) >> 6) * D_us_801D3104 / 256; | ||
| ((rsin(angle) + FLT(1.0)) >> 6) * D_us_801D3104 / 256; |
There was a problem hiding this comment.
Since they don't affect functionality your PlayerBlinkWhite changes, it would be better to split off these FIX to FLT changes into a separate PR.
Since there are so many of them, it drowns out the other changes and makes it more difficult to review.
|
Run Looks like PSP side is also broken - you'll need to find or create the PSP scratches and pull in the changes there to confirm what the exact mismatches are. |
|
Running I got sniped... |
|
Hey @amelenty 👋 the changes you're proposing are not generating a full match with the PSP build. Do you need any help to make this pull request mergeable? |
There's still a lot to improve/document in these functions. I intend to continue working on them in separate MRs to keep the scope manageable.
Improvements
MarEntityPlayerBlinkWhite/RicEntityPlayerBlinkWhitein allBlinkWhitefunctions.FLTmacros to them to hopefully make it clearer thatrsin(angle) + FLT(1.0)is a value from 0 to 2.ET_PlayerBlink.Future plans
#define MODULATE_SIN(angle, intensity, divide) ((rsin(angle) + FLT(1.0)) >> 6) * intensity / divide;, but I'm not sure if it's a good idea at this point.upperParams. I started cross-referencing the params these functions are called with, and it looks like most ifs in this function would be unused. (Maybe in other overlays?)