Graham
646af10bb1
Refactor StringUtils and Cp1252Charset
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
392c43562c
Refactor the client's Js5Index class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a18072f542
Refactor hostname/port selection code
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9b63ae48e1
Refactor the sleep method
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0350f7fe02
Refactor most of the GameShell class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9a748035c7
Refactor the BrowserControl class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d2bf5864be
Refactor the client's main method
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d0f29f7b26
Refactor the localisation code
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3f3c27f354
Refactor the Packet class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
960da043d6
Refactor the IsaacRandom class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
57d6ec2e63
Add initial refactor of the client's Buffer class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
95b9d35f1a
Refactor the client's IntHashTable class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2dfb2326c1
Refactor value variable in readShort
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ab26217db4
Refactor unpackclass
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7c862f4079
Refactor the Js5File class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e163483536
Refactor unpackclass's Js5Index class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c03b4af44f
Refactor unpackclass's ArrayUtils class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
327a1f7d4d
Refactor unpackclass's IntHashTable class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7687a08cf7
Refactor unpackclass's LinkedList class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
856a17bf02
Refactor unpackclass's gzip decompressor
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
887ce06302
Refactor unpackclass's Bzip2 decompressor
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
6a0976193d
Change Resources field names to upper case
...
While the Resource class is technically not quite immutable (as it
contains a byte array), it's close enough as the array is only ever
read.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e0ebaa1bcd
Refactor unpackclass's Buffer and BufferPool classes
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
af0167ef3e
Refactor unpackclass's TracingException class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
628bdc2e86
Refactor the TracingException class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
28f889fe6a
Refactor the UnpackerClassLoader class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cd043a7ddc
Refactor the loader class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d23f694a75
Refactor the Resource class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8e592431bc
Refactor remaining local variables and arguments in the GL library
4 years ago
Graham
0ec7024c2c
Refactor the AudioSource interface
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
fe76054d83
Refactor the MonotonicClock class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7ff9343516
Refactor the FileOnDisk class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
6e6297b094
Refactor the CursorManager class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3549b7d6ea
Refactor the FullScreenManager class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
79d8d9f78c
Refactor the SignLink and PrivilegedRequest classes
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
447e667733
Refactor the Pack200Unpacker class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
64da80403e
Refactor the unpack class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a75d20f6fd
Refactor the ByteArray and DirectByteArray classes
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
201f4cbd46
Refactor the Node class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0e9148af01
Add initial deob maps
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2acbfdce48
Add divide support to IdentityTransformer
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
222323eaa0
Add AssignExpr support to IdentityTransformer
...
It can now simplify expressions like `x += 0`.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c98a24bff8
Add left shift support to BitMaskTransformer
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
47325edb72
Fix removal of unused arguments whose local variable slot is re-used
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
1eb423fbf6
Mark sbox as const
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
272b1eb650
Add support for removing an argument whose local variable slot is used
...
This obviously doesn't work if the slot is loaded before something is
stored in it, but it does allow us to remove unused arguments whose slot
is re-used for another purpose.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2b8aa0c70d
Replace some primitive casts with widening/narrowing conversions
...
There are still some more contexts we can do this in - unary/binary
expressions and invocation contexts. I think Fernflower might handle the
former, but it doesn't handle the latter. Unfortunately, JavaParser's
method resolution code is still a bit too buggy to do the latter at the
moment.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
b642bb17c6
Move literals to the RHS of an add/sub expression
...
The BinaryExprTransformer deals with this to an extent. However, it
requires multiple passes to do so. Adding support to AddSubTransformer
allows it to be done in a single pass.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c4df34102a
Run IfElseTransformer until we reach a fixed point
...
It'd be nice if we could make it run a single pass (and there are
probably some improvements to reduce the number of required passes, as
I'm not convinced I'm running the transformations in a particularly
sensible order).
However, I think making it run in a single pass would be quite difficult
as some of the transformations need to propagate through else if chains
or nested if blocks. It's much easier to just run all the
transformations until they settle than fixing each individual
transformation.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0ae1ffb51d
Don't convert integer literals in char arithmetic to char literals
...
On balance, I think in most cases this is harder to read.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago