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

lufia2ac: code cleanup #1971

Merged
merged 6 commits into from
Jul 22, 2023
Merged

lufia2ac: code cleanup #1971

merged 6 commits into from
Jul 22, 2023

Conversation

el-u
Copy link
Collaborator

@el-u el-u commented Jul 12, 2023

What is this fixing or adding?

Various code improvements for the Lufia 2 Ancient Cave world. Most of the separate commits should be self-explanatory (such as making use of #1649 and #1923).

The one that could probably do with some further explanation is the change to the basepatch:
At some point, the code needs to calculate how many individual bits are set in a certain byte. The fastest way to determine this involves having precalculated the result for all the 256 possible register values and using that as a lookup table. Therefore, I originally inserted such a table into the ROM. As it turns out, however, this exact 256 byte table is already present somewhere in the unpatched ROM, so we can just use that instead.

How was this tested?

Running a few games with Iris treasure hunt goals (which use the code that was changed in the basepatch) and various enemizer options turned on (which use most of the random).

@ThePhar ThePhar added the is: refactor/cleanup Improvements to code/output readability or organizization. label Jul 12, 2023
Copy link
Collaborator

@alwaysintreble alwaysintreble left a comment

Choose a reason for hiding this comment

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

The ASM and bsdiff is magic as far as I'm concerned but world changes are good.

@ThePhar ThePhar merged commit 86a55c7 into ArchipelagoMW:main Jul 22, 2023
12 checks passed
@el-u el-u deleted the lufia2ac-main branch July 22, 2023 09:33
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
kl3cks7r pushed a commit to kl3cks7r/Archipelago that referenced this pull request Dec 15, 2023
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants