Graham
f4933a2b59
Add support for translating gl calls on the jaggl.opengl object
...
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>
5 years ago
Graham
0564bc29b0
Add missing ProgramPropertyARB groups
...
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>
5 years ago
Graham
133e2fac77
Set glGetObjectParameterivARB's pname group to ProgramPropertyARB
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
530af7628b
Add EnableCap group to GL_TEXTURE_3D
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
1a2f0bd9e5
Add MaterialFace group to GL_FRONT, GL_BACK and GL_FRONT_AND_BACK
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
aaaa0c0c68
Fix appending fields to javax.media.opengl.GL
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
ae9dccf9dd
Add CheckedInt32 group to most enums
...
This is a hacky way to fix the parameter value constants in calls to
methods like glTexEnvi().
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
7e66c024b4
Propagate groups from <enums> to each individual <enum>
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
9b5d4221b1
Fix GL_COORD_REPLACE group
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Major
5fa9e9a621
Remove spurious toCollection calls
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Major
424a2d7a31
Fix compilation errors
...
Signed-off-by: Major <major@emulate.rs>
5 years ago
Graham
b38da58bd5
Add missing groups to the OpenGL registry
5 years ago
Graham
7db0c971ee
Use OpenGL registry to replace magic numbers with constants
5 years ago
Graham
597aa2018e
Add support for whole program AST transforms
5 years ago
Graham
25a6953644
Fix use of deprecated JavaParser methods
5 years ago
Graham
0a988584b7
Convert some deob-ast methods to extension methods
5 years ago
Graham
5487a74eb8
Remove traversal argument from walk extension method
5 years ago
Graham
8df0907118
Replace IllegalStateException with error() in BitMaskTransformer
5 years ago
Graham
abf803f017
Replace contains() calls with the in operator
...
These are artifacts of the Java port.
5 years ago
Graham
64abe46971
Replace forEach calls with for loops
...
These are artifacts of the Java port.
5 years ago
Graham
4314aededd
Simplify hasSideEffects() calls in AddSubTransformer
5 years ago
Graham
784b14b66b
Improve safety of ForLoopConditionTransformer
...
Desetude noticed that there are some cases where this transformation is
unsafe - for example: `i > i++`. Skipping the transform if _either_ side
of the comparison has a side effect, rather than _both_ sides, makes it
safe.
5 years ago
Graham
ab75a2f0c9
Add IdentityTransformer
5 years ago
Graham
2e1db9f0b1
Don't swap for loop conditions where both sides have a side effect
5 years ago
Desetude
d8c3f4e31c
Flip > and >= in for loop conditions to < and <= respectively
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
d9762d65bc
Fix Kotlin inspections
5 years ago
Graham
575632413a
Add missing private modifier
5 years ago
Graham
7d1dc59d6a
Convert pre-increments to post-increments where possible
5 years ago
Graham
e9a9a8f962
Format with ktlint
5 years ago
Graham
4df5754dac
Include generics in Function cast
...
The Kotlin compiler was happy with the old code, but IDEA wasn't.
Including the generics explicitly in the cast makes both happy.
5 years ago
Graham
77e8b0cdc0
Use top-level Kotlin main() functions
5 years ago
Graham
01ec848d49
Remove blocks in NegativeLiteralTransformer when statement
...
Each case is very simple so I don't think we need to bother with the blocks.
5 years ago
Graham
130a05956e
Convert ExprUtils to Kotlin
5 years ago
Graham
fc00d69539
Convert TypeUtils to Kotlin
5 years ago
Graham
e3baede541
Convert NodeUtils to Kotlin
...
This commit also changes walk() to be an extension function and use reified
generics.
5 years ago
Graham
9f09a81db1
Convert EncloseTransformer to Kotlin
5 years ago
Graham
53160e422d
Convert IfElseTransformer to Kotlin
5 years ago
Graham
9b81c813dd
Convert AstDeobfuscator to Kotlin
5 years ago
Graham
6425a874fd
Convert AddSubTransformer to Kotlin
5 years ago
Graham
e357f07c27
Convert BinaryExprOrderTransformer to Kotlin
5 years ago
Graham
5b032c980f
Convert BitMaskTransformer to Kotlin
5 years ago
Graham
8ac16d722b
Convert ComplementTransformer to Kotlin
5 years ago
Graham
d5cee1b2f5
Make NewInstanceTransformer idempotent
5 years ago
Graham
320a8a7f8a
Convert NewInstanceTransformer to Kotlin
5 years ago
Graham
faec1f1a26
Convert TernaryTransformer to Kotlin
5 years ago
Graham
38a3e752f9
Convert NegativeLiteralTransformer to Kotlin
5 years ago
Graham
ba66c47799
Convert UnencloseTransformer to Kotlin
5 years ago
Graham
fc34f18e92
Convert ValueOfTransformer to Kotlin
5 years ago
Graham
afb52c2e93
Convert Transformer to Kotlin
5 years ago
Graham
bcbf4b6178
Replace newInstance() with getDeclaredConstructor().newInstance()
...
Again, if these are removed from a future JDK we'll need to move this
transform to the bytecode deobfuscator.
5 years ago