JFrame Links to Vars & Add Some Args (#561)

* Changed JFrame Links to Variables in ClientSettings.java
* -qol/-fixes sets true BILINEAR_MINIMAP_FILTERING, FIX_TRANSPARENCY_OVERFLOW & FULL_512PX_VIEWPORT
* -no-nav/-disable-nav sets false SHOW_NAVBAR
This commit is contained in:
Josh Shippam
2023-01-28 23:27:03 +00:00
committed by GitHub
parent 62b26c5585
commit da8471673f
3 changed files with 70 additions and 56 deletions
@@ -2,69 +2,73 @@ import java.math.BigInteger;
/**
* ClientSettings
*
* @author Andrew (I'm A Boss on Rune-Server and Mr Extremez on Mopar & Runelocus)
*/
public class ClientSettings {
public static String SNOW_MONTH = ".12";
/**
* The Servers Name
*/
public final static String SERVER_NAME = "2006Scape";
/**
* The Servers Website
*/
public final static String SERVER_WEBSITE = "www.2006Scape.org";
/**
* The Servers Ip
* You don't have to change this, the client will automatically connect to the server
* on localhost (Assuming you're running Client and LocalGame respectively)
*/
public static String SERVER_IP = "localhost";
/**
* The Servers World
* This Determines The Port The Server Will Connect On
* World 1 Will Connect On Port 43594
* World 2 Will Connect On Port 43598
*/
public static int SERVER_WORLD = 1;
/**
* The Servers Name
*/
public final static String SERVER_NAME = "2006Scape";
/**
* The Servers Website
*/
public final static String SERVER_WEBSITE = "https://2006Scape.org/";
/**
* The Servers Ip
* You don't have to change this, the client will automatically connect to the server
* on localhost (Assuming you're running Client and LocalGame respectively)
*/
public static String SERVER_IP = "localhost";
/**
* The Servers World
* This Determines The Port The Server Will Connect On
* World 1 Will Connect On Port 43594
* World 2 Will Connect On Port 43598
*/
public static int SERVER_WORLD = 1;
/**
* If false, the server will run the on demand server on every world. If true it will
* only connect to the server on world 1.
*/
public static boolean SINGLE_ONDEMAND = true;
/**
* If false, the client will run the on demand fetcher based on SERVER_WORLD. If true it will
* only connect to the server on world 1/Port 43594.
*/
public static boolean SINGLE_ONDEMAND = true;
/**
* Enables/Disables FileServer CRC Checking For Cache Updates
* FileServer Must Be Running Before Starting The Client If This Is True
*/
public static boolean CHECK_CRC = true;
public static boolean SHOW_NAVBAR = true;
public static final String NAV_MAINMENU_LINK = SERVER_WEBSITE;
public static final String NAV_WORLDMAP_LINK = SERVER_WEBSITE + "img/worldmap.jpg";
public static final String NAV_MANUAL_LINK = SERVER_WEBSITE;
public static final String NAV_RULES_LINK = SERVER_WEBSITE + "kbase/rules.php";
/**
* The Npc Bits for the Server
*/
public final static int NPC_BITS = 12;
/**
* The Servers Uid
*/
public final static int UID = 314268572;
public static final BigInteger RSA_MODULUS = new BigInteger("91553247461173033466542043374346300088148707506479543786501537350363031301992107112953015516557748875487935404852620239974482067336878286174236183516364787082711186740254168914127361643305190640280157664988536979163450791820893999053469529344247707567448479470137716627440246788713008490213212272520901741443");
public static final BigInteger RSA_EXPONENT = new BigInteger("65537");
// smooths out lines and sprites on the minimap
public static boolean BILINEAR_MINIMAP_FILTERING = false;
public static final boolean SHOW_NAVBAR = true;
// fixes overlapping lines drawn on transparent objects by post-incrementing the offset
// note: there's 2 other instances that haven't been updated in Texture.java (misnamed) because rarely used like this
public static boolean FIX_TRANSPARENCY_OVERFLOW = false;
// smooths out lines and sprites on the minimap
public static final boolean BILINEAR_MINIMAP_FILTERING = false;
// render the game to 512px instead of 511px (black line on right side)
public static boolean FULL_512PX_VIEWPORT = false;
// fixes overlapping lines drawn on transparent objects by post-incrementing the offset
// note: there's 2 other instances that haven't been updated in Texture.java (misnamed) because rarely used like this
public static final boolean FIX_TRANSPARENCY_OVERFLOW = false;
/**
* Enables/Disables FileServer CRC Checking For Cache Updates
* FileServer Must Be Running Before Starting The Client If This Is True
*/
public static boolean CHECK_CRC = true;
// render the game to 512px instead of 511px (black line on right side)
public static final boolean FULL_512PX_VIEWPORT = false;
/**
* The Npc Bits for the Server
*/
public final static int NPC_BITS = 12;
/**
* The Servers Uid
*/
public final static int UID = 314268572;
public static final BigInteger RSA_MODULUS = new BigInteger("91553247461173033466542043374346300088148707506479543786501537350363031301992107112953015516557748875487935404852620239974482067336878286174236183516364787082711186740254168914127361643305190640280157664988536979163450791820893999053469529344247707567448479470137716627440246788713008490213212272520901741443");
public static final BigInteger RSA_EXPONENT = new BigInteger("65537");
}
+11 -1
View File
@@ -13,7 +13,7 @@ public final class Main {
public static void main(String[] args) {
try {
// Process server/ip address to connect to
// Process client arguments to connect to
for (int i = 0; i < args.length; i++) {
switch(args[i]) {
case "-dev" :
@@ -26,6 +26,16 @@ public final class Main {
case "-no-cache-crc":
ClientSettings.CHECK_CRC = false;
break;
case "-qol":
case "-fixes":
ClientSettings.BILINEAR_MINIMAP_FILTERING = true;
ClientSettings.FIX_TRANSPARENCY_OVERFLOW = true;
ClientSettings.FULL_512PX_VIEWPORT = true;
break;
case "-no-nav":
case"-disable-nav":
ClientSettings.SHOW_NAVBAR = false;
break;
}
if (args[i].startsWith("-") && (i + 1) < args.length && !args[i + 1].startsWith("-")) {
switch(args[i]) {
+4 -4
View File
@@ -55,7 +55,7 @@ public class RSApplet extends JApplet implements Runnable, MouseListener, MouseW
mainMenu.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(URI.create("https://2006scape.org/"));
Desktop.getDesktop().browse(URI.create(ClientSettings.NAV_MAINMENU_LINK));
} catch (Exception ex) {
ex.printStackTrace();
}
@@ -113,7 +113,7 @@ public class RSApplet extends JApplet implements Runnable, MouseListener, MouseW
worldmap.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(URI.create("https://2006scape.org/img/worldmap.jpg"));
Desktop.getDesktop().browse(URI.create(ClientSettings.NAV_WORLDMAP_LINK));
} catch (Exception ex) {
ex.printStackTrace();
}
@@ -144,7 +144,7 @@ public class RSApplet extends JApplet implements Runnable, MouseListener, MouseW
manual.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(URI.create("https://2006scape.org/"));
Desktop.getDesktop().browse(URI.create(ClientSettings.NAV_MANUAL_LINK));
} catch (Exception ex) {
ex.printStackTrace();
}
@@ -175,7 +175,7 @@ public class RSApplet extends JApplet implements Runnable, MouseListener, MouseW
rules.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(URI.create("https://2006scape.org/kbase/rules.php"));
Desktop.getDesktop().browse(URI.create(ClientSettings.NAV_RULES_LINK));
} catch (Exception ex) {
ex.printStackTrace();
}