use of net.runelite.asm.ClassGroup in project runelite by runelite.
the class Injector method main.
public static void main(String[] args) throws IOException, InjectionException {
if (args.length < 3) {
System.exit(-1);
}
ClassGroup deobfuscated = JarUtil.loadJar(new File(args[0]));
ClassGroup vanilla = JarUtil.loadJar(new File(args[1]));
Injector u = new Injector(deobfuscated, vanilla);
u.inject();
InjectorValidator iv = new InjectorValidator(vanilla);
iv.validate();
u.save(new File(args[2]));
}
use of net.runelite.asm.ClassGroup in project runelite by runelite.
the class DrawAfterWidgetsTest method testInjectDrawWidgetsRev160.
@Test
public void testInjectDrawWidgetsRev160() throws Exception {
// Rev 160 does not have the drawWidgets call inlined
ClassFile deobClient = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Client_deob160.class"));
ClassFile deobRasterizer = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Rasterizer2D_deob160.class"));
ClassGroup deob = new ClassGroup();
deob.addClass(deobClient);
deob.addClass(deobRasterizer);
ClassFile obClient = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Client_ob160.class"));
ClassFile obRasterizer = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Rasterizer2D_ob160.class"));
ClassGroup vanilla = new ClassGroup();
vanilla.addClass(obClient);
vanilla.addClass(obRasterizer);
Inject inject = new Inject(deob, vanilla);
new DrawAfterWidgets(inject).inject();
}
use of net.runelite.asm.ClassGroup in project runelite by runelite.
the class DrawAfterWidgetsTest method testInjectDrawWidgetsRev153.
@Test
public void testInjectDrawWidgetsRev153() throws Exception {
// Rev 153 has the drawWidgets call inlined
ClassFile deobClient = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Client_deob153.class"));
ClassFile deobRasterizer = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Rasterizer2D_deob153.class"));
ClassGroup deob = new ClassGroup();
deob.addClass(deobClient);
deob.addClass(deobRasterizer);
ClassFile obClient = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Client_ob153.class"));
ClassFile obRasterizer = ClassUtil.loadClass(getClass().getResourceAsStream("/drawafterwidgets/Rasterizer2D_ob153.class"));
ClassGroup vanilla = new ClassGroup();
vanilla.addClass(obClient);
vanilla.addClass(obRasterizer);
Inject inject = new Inject(deob, vanilla);
new DrawAfterWidgets(inject).inject();
}
use of net.runelite.asm.ClassGroup in project runelite by runelite.
the class InstanceOf method lookup.
@Override
public void lookup() {
ClassGroup group = this.getInstructions().getCode().getMethod().getClassFile().getGroup();
myClass = group.findClass(type.getInternalName());
}
use of net.runelite.asm.ClassGroup in project runelite by runelite.
the class InvokeInterface method lookupMethods.
private List<net.runelite.asm.Method> lookupMethods() {
ClassGroup group = this.getInstructions().getCode().getMethod().getClassFile().getGroup();
ClassFile otherClass = group.findClass(method.getClazz().getName());
if (otherClass == null) {
// not our class
return null;
}
net.runelite.asm.Method m = otherClass.findMethod(method.getName(), method.getType());
if (m == null) {
return null;
}
return VirtualMethods.getVirtualMethods(m);
}
Aggregations