8000 More deobfuscation by StenAL · Pull Request #107 · PhilippvK/playforia-minigolf · GitHub
[go: up one dir, main page]

Skip to content

More deobfuscation - #107

Merged
PhilippvK merged 16 commits into
PhilippvK:masterfrom
StenAL:deobfuscation
May 22, 2024
Merged

PhilippvK merged 16 commits into
PhilippvK:masterfrom
StenAL:deobfuscation

Conversation

@StenAL
@StenAL StenAL commented May 18, 2024
Copy link
Copy Markdown

There should be no functional changes in this PR, only cosmetic ones. Most renamings were done with IntelliJ's refactoring functionality. See individual commits for more details.

After merging this, I have some changes ready that actually add features and fix some bugs, but I wanted to keep those separate to make them easier to review.

StenAL added 16 commits May 18, 2024 23:04
These arrays are only written to, never read. This looks like a
performance optimization to avoid string allocation at run-time
as these arrays are otherwise unused. These kinds of optimizations
are not needed on modern hardware, they just make the code
structure more complicated.
This revealed that the `anInt997` field was unused and could be removed.
Looks like the server never sends track score multipliers currently.
Nevertheless, this is code is nice to deobfuscate to better understand
surrounding code.
These are some small changes that did not really fit in with other
commits.
This is easier to understand than a double negative. No functional
changes.
This class works in a similar way to SoundManager, it contains a map for
localization strings that are specific to Minigolf as well as a map for
strings that were shared between multiple Playforia games.

As part of this I renamed Class89 -> LocalizationNode which represents
an XML node containing translations for a single entry.
This more accurately reflects what the code does. The return value was
never used so I also changed the method to return void. Since get_upd()
without any parameters was just adding 1 to the internal integer, I
removed the method to simplify the class; now when 1 needs to be added
to the internal int, add(1) can be called.
This also includes removing the iterative modifying of the offsetY (now
renamed to yBaseline) variable for drawing player info, instead it can
be calculated in the loop based on the index variable.
These are drive-by fixes while debugging an issue, no functional
changes.

Highlight: renaming
PacketHandlerFactoryGeneratorClassHelperImplementationDecorator ->
PacketHandlerFactory. Looks like the original implementor was having fun
with design pattern names.
@PhilippvK PhilippvK left a comment
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM, Thanks!
I am looking forward to the remaining changes.

@PhilippvK
PhilippvK merged commit 718b60f into PhilippvK:master May 22, 2024
@StenAL
StenAL deleted the deobfuscation branch May 22, 2024 14:09
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

0