Skip to content
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

SCUMM: HE: share condition mask logic #4228

merged 1 commit into from Sep 18, 2022


Copy link

@BLooperZ BLooperZ commented Aug 22, 2022

Small refactor to SCUMM HE user conditions and talk conditions,
extract the shared bitmask logic to shared function, for this logic to be easier to follow.

generally there is a bitmask of uint32
the first 16 bits are talk conditions (according to the mask, it seems only 13 are used)
and the other 16 bits are user conditions

talk conditions are mutually exclusive, when a talk condition is set, the rest are cleared, except for the first bit.
user conditions can be set without clearing other bits.

Copy link

AndywinXp commented Aug 25, 2022

Nice one, I checked that it matches the original code and I find it to be a little bit more readable than before.

@orgads orgads requested a review from bluegr Sep 3, 2022
Copy link

bluegr commented Sep 18, 2022

Clean and straightforward implementation, which makes the code easier to read. Thanks for your work! Merging

@bluegr bluegr merged commit 1f3a3be into scummvm:master Sep 18, 2022
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
3 participants