Thread: About Normal/Resizeable/Full Screen

Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1 About Normal/Resizeable/Full Screen 
    Doctor p - Sweet Shop

    Join Date
    Apr 2007
    Age
    31
    Posts
    6,835
    Thanks given
    150
    Thanks received
    584
    Rep Power
    2595
    I see many people doing it totally wrong, meaning they think that the graphic type decides what interfaces needs to be set.

    That is so wrong.

    I'm talking about when RuneScape didn't allow LD set to FullScreen.

    If a players log in on a HD client, a packet is send to the server with some info about what screen is used.

    3 things are send, the client height, the client width and the screentype.

    Screentype is 0/1/2

    0: Normal
    1: Resizeable
    2: Full Screen

    So we all know that the resizeable/fullscreen interface is 746. On that interface you need to let show all other interfaces (tabs,chatbox,etc...)

    So what you need to do:

    Somehow you need to let the server know what interface is used (548 or 746) and then edit all the packets that have to do with interfaces so they support it.

    Code:
    public int mainInterface;
    You also need to use the packet that is sent on login (in 508 it's packet 129)

    508 example:

    Code:
    int screenType = packet.readByte();
    int width = packet.readShort();
    int height = packet.readShort();
    switch(screenType) {
        case 0:
            p.getActionSender().mainInterface = 548;
            break;
        case 1:
        case 2:
            p.getActionSender().mainInterface = 746;
            break;
        }
    p.getActionSender().sendWindowPane(p.getActionSender().mainInterface);
    p.getActionSender().sendLoginInterfaces();
    Then you need to change all the packets (frames) that have to do with interfaces

    Example:

    Code:
    public void sendInterface(int id, boolean isInventoryInterface) {
        sendCloseInterface();
        if (mainInterface == 746) {
            sendInterface(0, mainInterface, isInventoryInterface ? 4 : 6, id);
        }
        sendInterface(0, mainInterface, 8, id);
    }

    Reply With Quote  
     

  2. #2  
    sex inFamous's Avatar
    Join Date
    Sep 2008
    Posts
    0
    Thanks given
    6
    Thanks received
    4
    Rep Power
    0
    i didnt kno, thanks
    i'm back...
    Reply With Quote  
     

  3. #3  
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,528
    Thanks given
    573
    Thanks received
    1,410
    Rep Power
    2114
    nice, can u convert to pali?
    Number of page #1 releases with most views & posts: (Updated: 2023)
    RS2 server section: 1
    RS2 client section: 2
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Feb 2009
    Posts
    1,533
    Thanks given
    4
    Thanks received
    34
    Rep Power
    0
    Quote Originally Posted by mige5 View Post
    nice, can u convert to pali?
    Do it yourself, it's not that hard.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    int screenType = packet.readByte();
    int width = packet.readShort();
    int height = packet.readShort();
    p.getActionSender().sendWindowPane(screenType == 0 ? 548 : 746);
    p.getActionSender().sendLoginInterfaces();
    please do it this way dont use a switch for that kind of stuff.

    Reply With Quote  
     

  6. #6  
    Doctor p - Sweet Shop

    Join Date
    Apr 2007
    Age
    31
    Posts
    6,835
    Thanks given
    150
    Thanks received
    584
    Rep Power
    2595
    Quote Originally Posted by Serenity View Post
    please do it this way dont use a switch for that kind of stuff.
    still the mainInterface int needs to be set

    Reply With Quote  
     

  7. #7  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    then create a boolean wich is getting set then check if the boolean is being set at login if so use the same what i did with the var == 0 but instead usinghd ? 548 : 746

    Reply With Quote  
     

  8. #8  
    Annexation
    Guest
    create a fullscreen boolean not a maininterface variable
    Reply With Quote  
     

  9. #9  
    Doctor p - Sweet Shop

    Join Date
    Apr 2007
    Age
    31
    Posts
    6,835
    Thanks given
    150
    Thanks received
    584
    Rep Power
    2595
    Quote Originally Posted by Annexation View Post
    create a fullscreen boolean not a maininterface variable
    this isn't a tut or something, it's just an example and to show it how you need to do it

    Reply With Quote  
     

  10. #10  
    Annexation
    Guest
    Quote Originally Posted by Nathan View Post
    this isn't a tut or something, it's just an example and to show it how you need to do it
    well then
    FYI the packet is not really just sent on login like you said
    in the login block it sends the same data as the packet sends (not as a packet on its own, just part of login block), packet 129 is sent when you either set or change the mode or the game size
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •