This commit:
* Renames isMethodImmutable to isMethodRenamable and flips the value of
the boolean it outputs accordingly.
* Updates all uses of isMethodRenamable to account for this.
* Makes the internal implementation more similar to isClassRenamable.
Signed-off-by: Graham <gpe@openrs2.dev>
This picks up a glGetString(GL_EXTENSIONS) constant.
Don't translate gl calls within the jaggl.opengl class itself. This
causes failures as there are native methods with 0 and 1 suffixes. These
methods don't exist in the OpenGL registry, causing the transformer to
throw an exception.
Signed-off-by: Graham <gpe@openrs2.dev>
This fixes a GL_OBJECT_COMPILE_STATUS_ARB constant, but I'm doing
everything else in the same set of enums for consistency.
Signed-off-by: Graham <gpe@openrs2.dev>
GETSTATIC, PUTSTATIC and INVOKESTATIC (strangely) use the same field and
method resolution algorithms as their non-static equivalents.
While this doesn't cause problems for 550, as the *STATIC instructions
seem to always refer to the class containing the static definition,
Major reports that OSRS clients sometimes change the owner to a
subclass. This broke the old transformer.
This commit fixes it by applying the old to new owner mapping to an
entire disjoint set at a time.
Signed-off-by: Graham <gpe@openrs2.dev>
This allows us to avoid needing to worry about manipulating stack frames
in individual transformers, which adds lots of complexity. It's much
easier to just make ASM generate them for us.
Signed-off-by: Graham <gpe@openrs2.dev>
I'm intending to use this in a patched version of Fernflower to track
the original index of each local variable's STORE instruction, allowing
us to retain local variable names even if the deobfuscator is run
multiple times.
This is necessary for a future commit that will track the original
indexes of AbstractInsnNodes throughout the deobfuscator, with the aim
of using this information to track local variables in the decompiled
code.
I suspect this will also improve performance, as we don't need to
re-allocate all of the tree objects.
I've been considering this for a long time, and have decided to switch to it at
the last minute before opening the repository up publicly. My reasons include:
* It's a much simpler license. GPL's complexity adds some risk - for example, it
might be incompatible with future open-source licenses (like the well-known
GPLv2/Apache v2 incompatibility problem). The "or any later version" clause
requires placing some trust in the Free Software Foundation.
* The simplicity makes it easier for people to understand and comply with the
license.
* Dishonest users who disobey the GPL would have an advantage over honest users
who refuse to do so. The ISC license provides a much more even playing field.
* OpenRS2 will primarily be server software accessible over a network. As such,
the GPL can do little to prevent use of the code in a proprietary system, as
the code is never distributed. (While the AGPL would fix this, I have already
discounted it. Enforcement would be too difficult and dishonest users would
have an unfair advantage.)
* It's much easier to switch to a stricter license in future versions, if it
turns out that is desirable (as the ISC license allows users to sublicense
the code). However, switching from the GPL to the ISC license requires all
copyright holders to grant permission.
* Other open-source projects in the community, such as Apollo, use the ISC
license and will be able to make use of OpenRS2 code if they so desire.
I've removed the FAQ entry about the reasons for using the GPL license, as I
think the ISC license is less controversial and therefore does not require an
entry.
I've discussed this with Desetude, and he's okay with his commit being
relicensed.