Adblock breaks this site

A loader - Two problems

Discussion in 'Programming General' started by Coron, Sep 1, 2011.

  1. Coron

    Coron Forum Addict
    Banned

    Joined:
    Aug 9, 2009
    Posts:
    287
    Referrals:
    0
    Sythe Gold:
    0
    A loader - Two problems

    I'm currently playing around with loading RS and reflection. So far it's going well, I can reflect information like camera pitch and yaw. But I have two problems that I need help with.

    runescape.jar contains all the files I need, loader.jar does not. How can I reflect information like the camera pitch from loader.jar?

    Also, how can I paint on the client?

    Thanks, I hope I made my problems clear :p
     
  2. Jimmy

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25
    A loader - Two problems

    You have to obtain the classloader instance responsible for loading the classes in runescape.jar. Calling the getClassLoader of the canvas class should accomplish this.

    Ex:
    Code:
    applet.getComponent(0).getClass().getClassLoader()
    As for painting on the canvas, you can do this by overriding the getGraphics() method of the parent class to the applet's canvas (either xboot java.awt.Canvas with your own overridden method or use a bytecode editing library to change the superclass of the canvas subclass in the client to your own custom class that paints onto the canvas's graphics).
     
  3. itsboom

    itsboom Forum Addict

    Joined:
    May 7, 2010
    Posts:
    290
    Referrals:
    0
    Sythe Gold:
    0
    A loader - Two problems

    does runescape.jar instantiate loader.jar?
     
  4. Jimmy

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25
    A loader - Two problems

    It's the other way around. Just decompile the loader and see what it does (it won't decompile perfectly, but you should get some idea what it does).
     
  5. Coron

    Coron Forum Addict
    Banned

    Joined:
    Aug 9, 2009
    Posts:
    287
    Referrals:
    0
    Sythe Gold:
    0
    A loader - Two problems

    Thanks Jimmy!
     
< help with embedding a .jar to winows.forum | C++ Exercises + Problem >


 
 
Adblock breaks this site