Merge branch 'first'

This commit is contained in:
Ethan 2019-11-06 20:39:09 -05:00
commit 6ef67bf5f5
4536 changed files with 2814 additions and 2767 deletions

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
production/*
.idea/*
.idea/
.idea/workspace.xml

11
.idea/09Scape.iml generated
View file

@ -3,8 +3,6 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/09HDscape-management-server/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/09HDscape-server/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Server/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Management-Server/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Client/src" isTestSource="false" />
@ -44,15 +42,6 @@
<jarDirectory url="file://$MODULE_DIR$/Client/lib" recursive="false" />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/Client/lib/jogamp-all-platforms/jar/atomic/jogl.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>

2
.idea/misc.xml generated
View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8.0_222 (2)" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8.0_222 (3)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/CompiledServer" />
</component>
</project>

135
.idea/workspace.xml generated
View file

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0dbfe935-8085-4dde-9815-06f8b3761458" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/META-INF/09Scape.kotlin_module" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/crandor/Main.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$1.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$2.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$3.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$4.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$5.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$6.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$7.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main$8.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/keldagrim/Main.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/runite/GameLaunch.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/09Scape/org/runite/GameLaunch.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/09Scape/rebel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/09Scape/rebel.xml" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="DefaultGradleProjectSettings">
<option name="isMigrated" value="true" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1SoCmFrlg0BRp0t2EAHW2CVwxLb" />
<component name="PropertiesComponent">
<property name="Downloaded.Files.Path.Enabled" value="false" />
<property name="Repository.Attach.Annotations" value="false" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/Server/data" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Application.GameLaunch">
<configuration name="GameLaunch" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.runite.GameLaunch" />
<module name="09Scape" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.runite.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Management" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.keldagrim.Management" />
<module name="09Scape" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.keldagrim.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Server" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.crandor.Server" />
<module name="09Scape" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Server" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.crandor.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.Management" />
<item itemvalue="Application.Server" />
<item itemvalue="Application.GameLaunch" />
</list>
<recent_temporary>
<list>
<item itemvalue="Application.GameLaunch" />
<item itemvalue="Application.Management" />
<item itemvalue="Application.Server" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="0dbfe935-8085-4dde-9815-06f8b3761458" name="Default Changelist" comment="" />
<created>1572220718424</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1572220718424</updated>
</task>
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
</component>
</project>

1
Client/.gitignore vendored
View file

@ -14,5 +14,4 @@ data/cache/
*.iml
*.eml
*.userlibraries
*.class
data/players/**

View file

@ -0,0 +1,57 @@
package org.runite;
import org.runite.jagex.GameShell;
/**
* Handles the launching of our Game Client.
* @author Keldagrim Development Team
*
*/
/*
NOTICE: THIS IS THE LIVESERVER CLIENT. For development purposes, use GameLaunch.java instead!!!
*/
public class Client {
/**
* The game settings.
*/
public static GameSetting SETTINGS = new GameSetting("2009Scape", "34.68.75.237", 1, "live", false, false);
/**
* The main method.
r @param args the arguments casted on runtime.
r_game
*/
public static void main(String[]args) {
System.out.println("Running liveserver client");
Configurations.LOCAL_SERVER = false;
Configurations.LOCAL_MS = false;
Configurations.MS_IP = Configurations.LOCAL_MS ? "127.0.0.1" : "34.68.75.237"; //Needs to be done because of order it's otherwise set
for (int i = 0; i < args.length; i++) {
String[] cmd = args[i].split("=");
switch (cmd[0]) {
case "ip":
SETTINGS.setIp(cmd[1]);
break;
case "world":
SETTINGS.setWorld(Integer.parseInt(cmd[1]));
break;
}
}
launch(false);
}
/**
* Launches the client in a determined mode.
* @param swiftkit If we're launching swift kit.
*/
public static void launch(boolean swiftkit) {
GameShell.launchDesktop();
}
}

View file

@ -27,8 +27,8 @@ public final class Configurations {
/**
* If the client is local.
*/
public static final boolean LOCAL_MS = true;
public static final boolean LOCAL_SERVER = true;
public static boolean LOCAL_MS = true;
public static boolean LOCAL_SERVER = true;
/**
* Packaging.
@ -63,8 +63,8 @@ public final class Configurations {
/**
* The MS IP.
*/
public static final String MS_IP = (Configurations.LOCAL_MS ? "127.0.0.1" : "frostblades.org");
public static String MS_IP = Configurations.LOCAL_MS ? "127.0.0.1" : "34.68.75.237";
/**
* The operation system name.
*/

View file

@ -12,7 +12,12 @@ public class GameLaunch {
/**
* The game settings.
*/
public static GameSetting SETTINGS = new GameSetting("2009Scape", Configurations.LOCAL_SERVER ? "127.0.0.1" : "frostblades.org", 1, "live", false, false);
/*
NOTICE: IF YOU'RE A DEVELOPER, THE EASIEST WAY TO CONNECT TO THE LIVESERVER IS WITH CLIENT.JAVA. THIS CLASS IS FOR LOCAL SERVER CONNECTING!
*/
public static GameSetting SETTINGS = new GameSetting("2009Scape", Configurations.LOCAL_SERVER ? "127.0.0.1" : "34.68.75.237"/*"34.68.75.237"*/, 1, "live", false, false);
/**
* The main method.

View file

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.runite.Client

View file

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.runite.GameLaunch

View file

@ -35,8 +35,8 @@ final class Class114 {
static final float[] method1705(int var0, int var1) {
try {
float var2 = Class92.method1514() + Class92.method1505();
int var3 = Class92.method1510();
float var2 = Class92.method1514() + Class92.getLightingModelAmbient();
int var3 = Class92.screenColorRgb();
float var7 = 0.58823526F;
MouseListeningClass.aFloatArray1919[3] = 1.0F;
float var4 = (float)(var3 >> 16 & 255) / 255.0F;

View file

@ -161,7 +161,7 @@ final class Class121 {
}
var2 = Class3_Sub15.aClass89_2429.readByte(var0 ^ 29984);
System.out.println(var2);
//System.out.println(var2); //Not sure what this was debugging
if(WorldListEntry.aClass155_2627 != null) {
WorldListEntry.aClass155_2627.method2159(55);
}

View file

@ -1879,9 +1879,9 @@ final class Class140_Sub1_Sub1 extends Model {
if(var3) {
if(!Class106.aBoolean1441) {
var7 = (int)Class92.aFloatArray1312[0];
var8 = (int)Class92.aFloatArray1312[1];
var9 = (int)Class92.aFloatArray1312[2];
var7 = (int)Class92.light0Position[0];
var8 = (int)Class92.light0Position[1];
var9 = (int)Class92.light0Position[2];
var10 = (int)Math.sqrt((double)(var7 * var7 + var8 * var8 + var9 * var9));
var11 = (int)((float)this.aShort3849 * 1.3F);
var12 = this.aShort3819 * var10 >> 8;
@ -3113,22 +3113,22 @@ final class Class140_Sub1_Sub1 extends Model {
int var2;
int var3;
if(Class92.anInt1314 > 0) {
var2 = this.aClass6_3835.aShort95 - (this.aClass6_3835.aShort92 * Class92.anInt1314 >> 8) >> 3;
var3 = this.aClass6_3835.aShort94 - (this.aClass6_3835.aShort91 * Class92.anInt1314 >> 8) >> 3;
if(Class92.lightX > 0) {
var2 = this.aClass6_3835.aShort95 - (this.aClass6_3835.aShort92 * Class92.lightX >> 8) >> 3;
var3 = this.aClass6_3835.aShort94 - (this.aClass6_3835.aShort91 * Class92.lightX >> 8) >> 3;
} else {
var2 = this.aClass6_3835.aShort95 - (this.aClass6_3835.aShort91 * Class92.anInt1314 >> 8) >> 3;
var3 = this.aClass6_3835.aShort94 - (this.aClass6_3835.aShort92 * Class92.anInt1314 >> 8) >> 3;
var2 = this.aClass6_3835.aShort95 - (this.aClass6_3835.aShort91 * Class92.lightX >> 8) >> 3;
var3 = this.aClass6_3835.aShort94 - (this.aClass6_3835.aShort92 * Class92.lightX >> 8) >> 3;
}
int var4;
int var5;
if(Class92.anInt1315 > 0) {
var4 = this.aClass6_3835.aShort97 - (this.aClass6_3835.aShort92 * Class92.anInt1315 >> 8) >> 3;
var5 = this.aClass6_3835.aShort96 - (this.aClass6_3835.aShort91 * Class92.anInt1315 >> 8) >> 3;
if(Class92.lightY > 0) {
var4 = this.aClass6_3835.aShort97 - (this.aClass6_3835.aShort92 * Class92.lightY >> 8) >> 3;
var5 = this.aClass6_3835.aShort96 - (this.aClass6_3835.aShort91 * Class92.lightY >> 8) >> 3;
} else {
var4 = this.aClass6_3835.aShort97 - (this.aClass6_3835.aShort91 * Class92.anInt1315 >> 8) >> 3;
var5 = this.aClass6_3835.aShort96 - (this.aClass6_3835.aShort92 * Class92.anInt1315 >> 8) >> 3;
var4 = this.aClass6_3835.aShort97 - (this.aClass6_3835.aShort91 * Class92.lightY >> 8) >> 3;
var5 = this.aClass6_3835.aShort96 - (this.aClass6_3835.aShort92 * Class92.lightY >> 8) >> 3;
}
int var6 = var3 - var2 + 1;
@ -3156,8 +3156,8 @@ final class Class140_Sub1_Sub1 extends Model {
int var14;
int var15;
while(var9 < this.anInt3823) {
int var10 = (this.anIntArray3822[var9] - (this.anIntArray3845[var9] * Class92.anInt1314 >> 8) >> 3) - var2;
int var11 = (this.anIntArray3848[var9] - (this.anIntArray3845[var9] * Class92.anInt1315 >> 8) >> 3) - var4;
int var10 = (this.anIntArray3822[var9] - (this.anIntArray3845[var9] * Class92.lightX >> 8) >> 3) - var2;
int var11 = (this.anIntArray3848[var9] - (this.anIntArray3845[var9] * Class92.lightY >> 8) >> 3) - var4;
int var12 = this.anIntArray3838[var9];
var13 = this.anIntArray3838[var9 + 1];
var14 = var12;

View file

@ -107,8 +107,8 @@ final class Class141 {
int var10 = var4 << 7;
int var11 = var6 + var7 + var8 + var9 >> 2;
int var12 = var5 << 7;
int var13 = var10 - (var11 * Class92.anInt1314 >> 8) >> 3;
int var14 = var12 - (var11 * Class92.anInt1315 >> 8) >> 3;
int var13 = var10 - (var11 * Class92.lightX >> 8) >> 3;
int var14 = var12 - (var11 * Class92.lightY >> 8) >> 3;
if(var0 != 0 && var0 != 1 && (var2 || var3)) {
method2050(aClass109_Sub1Array1843[var0], aClass109_Sub1_1840, var13 + 1, var14 + 1, var1, var2);
} else {
@ -373,8 +373,8 @@ final class Class141 {
static final void method2047(LDIndexedSprite var0, int var1, int var2, int var3) {
if(var0 != null) {
int var4 = var1 - (var2 * Class92.anInt1314 >> 8) >> 3;
int var5 = var3 - (var2 * Class92.anInt1315 >> 8) >> 3;
int var4 = var1 - (var2 * Class92.lightX >> 8) >> 3;
int var5 = var3 - (var2 * Class92.lightY >> 8) >> 3;
method2042(var0, aClass109_Sub1_1840, var4 + 1, var5 + 1);
}
}
@ -406,8 +406,8 @@ final class Class141 {
if(var0 == null) {
return false;
} else {
int var4 = var1 - (var2 * Class92.anInt1314 >> 8) >> 3;
int var5 = var3 - (var2 * Class92.anInt1315 >> 8) >> 3;
int var4 = var1 - (var2 * Class92.lightX >> 8) >> 3;
int var5 = var3 - (var2 * Class92.lightY >> 8) >> 3;
return method2040(var0, aClass109_Sub1_1840, var4 + 1, var5 + 1);
}
}
@ -449,8 +449,8 @@ final class Class141 {
static final void method2051(LDIndexedSprite var0, int var1, int var2, int var3) {
if(var0 != null) {
int var4 = var1 - (var2 * Class92.anInt1314 >> 8) >> 3;
int var5 = var3 - (var2 * Class92.anInt1315 >> 8) >> 3;
int var4 = var1 - (var2 * Class92.lightX >> 8) >> 3;
int var5 = var3 - (var2 * Class92.lightY >> 8) >> 3;
method2034(var0, aClass109_Sub1_1840, var4 + 1, var5 + 1);
}
}

View file

@ -167,9 +167,9 @@ final class Class158_Sub1 extends Class158 implements ImageProducer, ImageObserv
int var24;
if(HDToolKit.highDetail) {
if(!Class106.aBoolean1441) {
var10 = (int)Class92.aFloatArray1312[0];
var11 = (int)Class92.aFloatArray1312[1];
var37 = (int)Class92.aFloatArray1312[2];
var10 = (int)Class92.light0Position[0];
var11 = (int)Class92.light0Position[1];
var37 = (int)Class92.light0Position[2];
var13 = (int)Math.sqrt((double)(var11 * var11 + (var10 * var10 - -(var37 * var37))));
var14 = 1024 * var13 >> 8;

View file

@ -140,7 +140,7 @@ final class Class3_Sub13_Sub11 extends Class3_Sub13 {
}
Class86.anInt1191 = Class115.aClass86ArrayArray1581[var2][var1].anInt1178;
Class92.method1509((float)Class46.anInt741, (float)Class3_Sub13_Sub22.anInt3274, (float)Class86.anInt1191);
Class92.setLightPosition((float)Class46.anInt741, (float)Class3_Sub13_Sub22.anInt3274, (float)Class86.anInt1191);
} catch (RuntimeException var4) {
throw Class44.method1067(var4, "fm.C(" + var0 + ',' + var1 + ',' + var2 + ')');
}

View file

@ -70,7 +70,7 @@ static RSString aClass94_3282 = aClass94_3286;
} else {
RSByteBuffer buffer = new RSByteBuffer(buf);
int opcode = buffer.getByte((byte)-67);
System.out.println(opcode);
//System.out.println(opcode);
if(1 != opcode) {
return false;
} else {

View file

@ -104,9 +104,9 @@ static RSString aClass94_3397 = aClass94_3400;
static final void method324(int var0, boolean var1) {
try {
Class92.method1506(Class92.anInt1322, (0.7F + (float)var0 * 0.1F) * 1.1523438F, 0.69921875F, 0.69921875F);
Class92.method1509(-50.0F, -60.0F, -50.0F);
Class92.method1508(Class92.anInt1316, 0);
Class92.setLightParams(Class92.defaultScreenColorRgb, (0.7F + (float)var0 * 0.1F) * 1.1523438F, 0.69921875F, 0.69921875F);
Class92.setLightPosition(-50.0F, -60.0F, -50.0F);
Class92.setFogValues(Class92.defaulFogColorRgb, 0);
Class92.method1504();
if(var1) {
aByteArrayArrayArray3390 = (byte[][][])((byte[][][])null);

View file

@ -942,13 +942,13 @@ final class Class3_Sub30_Sub1 extends RSByteBuffer {
Class41.anInt689 = var13 * Class132.anInt1736 + var12 * Class100.anInt1407 >> 8;
}
Class92.method1506(CacheIndex.anInt1950, Class30.aFloat578, Class3_Sub13_Sub36.aFloat3424, Class12.aFloat319);
Class92.method1508(Class3_Sub28_Sub12.anInt3652, Class41.anInt689);
Class92.setLightParams(CacheIndex.anInt1950, Class30.aFloat578, Class3_Sub13_Sub36.aFloat3424, Class12.aFloat319);
Class92.setFogValues(Class3_Sub28_Sub12.anInt3652, Class41.anInt689);
if(var4 != 1) {
aClass94_3807 = (RSString)null;
}
Class92.method1509((float)Class46.anInt741, (float)Class3_Sub13_Sub22.anInt3274, (float)Class86.anInt1191);
Class92.setLightPosition((float)Class46.anInt741, (float)Class3_Sub13_Sub22.anInt3274, (float)Class86.anInt1191);
Class92.method1504();
return Class3_Sub28_Sub12.anInt3652;
} catch (RuntimeException var16) {

View file

@ -152,7 +152,7 @@ final class Class53 {
var5.activity = buffer.getGJString2(98);
var5.address = buffer.getGJString2(79);
GameLaunch.SETTINGS.setWorld(worldId);
System.out.println(GameLaunch.SETTINGS.getWorld());
//System.out.println(GameLaunch.SETTINGS.getWorld());
}
Class3_Sub28_Sub7.updateStamp = buffer.getInt();
Class30.loadedWorldList = true;

View file

@ -460,7 +460,7 @@ final class Class68 {
var3.glTexEnvi(8960, '\u8590', 768);
var3.glBlendFunc(770, 771);
var3.glDepthMask(true);
var3.glFogfv(2918, Class92.aFloatArray1319, 0);
var3.glFogfv(2918, Class92.fogColor, 0);
var3.glEnableClientState('\u8078');
HDToolKit.method1846();
}

View file

@ -236,8 +236,8 @@ final class Class72 {
static final float[] method1297(byte var0) {
try {
float var1 = Class92.method1514() + Class92.method1505();
int var2 = Class92.method1510();
float var1 = Class92.method1514() + Class92.getLightingModelAmbient();
int var2 = Class92.screenColorRgb();
float var3 = (float)(255 & var2 >> 16) / 255.0F;
MouseListeningClass.aFloatArray1919[3] = 1.0F;
if(var0 != -50) {

View file

@ -107,11 +107,11 @@ final class Class86 {
public Class86() {
try {
this.anInt1177 = Class92.anInt1322;
this.anInt1177 = Class92.defaultScreenColorRgb;
this.aFloat1189 = 1.2F;
this.anInt1178 = -50;
this.aFloat1187 = 1.1523438F;
this.anInt1175 = Class92.anInt1316;
this.anInt1175 = Class92.defaulFogColorRgb;
this.anInt1181 = -60;
this.aFloat1190 = 0.69921875F;
this.anInt1184 = 0;
@ -125,7 +125,7 @@ final class Class86 {
try {
int var2 = var1.getByte((byte)-92);
if(~(var2 & 1) == -1) {
this.anInt1177 = Class92.anInt1322;
this.anInt1177 = Class92.defaultScreenColorRgb;
} else {
this.anInt1177 = var1.getInt();
}
@ -159,7 +159,7 @@ final class Class86 {
}
if((32 & var2) == 0) {
this.anInt1175 = Class92.anInt1316;
this.anInt1175 = Class92.defaulFogColorRgb;
} else {
this.anInt1175 = var1.getInt();
}

View file

@ -4,129 +4,136 @@ import javax.media.opengl.GL;
final class Class92 {
static float[] aFloatArray1312 = new float[4];
private static int anInt1313 = -1;
static int anInt1314;
static int anInt1315;
static int anInt1316 = 13156520;
private static float aFloat1317 = -1.0F;
private static float aFloat1318 = -1.0F;
static float[] aFloatArray1319 = new float[4];
private static float aFloat1320;
private static float[] aFloatArray1321 = new float[4];
static int anInt1322 = 16777215;
private static int anInt1323 = -1;
private static int anInt1324 = -1;
static float[] light0Position = new float[4];
private static int screenColorRgb = -1;
static int lightX;
static int lightY;
static int defaulFogColorRgb = 13156520;
private static float light0Diffuse = -1.0F;
private static float light1Diffuse = -1.0F;
static float[] fogColor = new float[4];
private static float lightModelAmbient;
private static float[] light1Position = new float[4];
static int defaultScreenColorRgb = 16777215;
private static int fogOffset = -1;
private static int fogColorRGB = -1;
static final void method1504() {
GL var0 = HDToolKit.gl;
var0.glLightfv(16384, 4611, aFloatArray1312, 0);
var0.glLightfv(16385, 4611, aFloatArray1321, 0);
GL gl = HDToolKit.gl;
gl.glLightfv(16384, 4611, light0Position, 0);
gl.glLightfv(16385, 4611, light1Position, 0);
}
static final float method1505() {
return aFloat1317;
static final float getLightingModelAmbient() {
return light0Diffuse;
}
static final void method1506(int var0, float var1, float var2, float var3) {
if(anInt1313 != var0 || aFloat1320 != var1 || aFloat1317 != var2 || aFloat1318 != var3) {
anInt1313 = var0;
aFloat1320 = var1;
aFloat1317 = var2;
aFloat1318 = var3;
javax.media.opengl.GL var4 = HDToolKit.gl;
float var5 = (float)(var0 >> 16 & 255) / 255.0F;
float var6 = (float)(var0 >> 8 & 255) / 255.0F;
float var7 = (float)(var0 & 255) / 255.0F;
float[] var8 = new float[]{var1 * var5, var1 * var6, var1 * var7, 1.0F};
var4.glLightModelfv(2899, var8, 0);
float[] var9 = new float[]{var2 * var5, var2 * var6, var2 * var7, 1.0F};
var4.glLightfv(16384, 4609, var9, 0);
float[] var10 = new float[]{-var3 * var5, -var3 * var6, -var3 * var7, 1.0F};
var4.glLightfv(16385, 4609, var10, 0);
}
static final void setLightParams(int color, float ambientMod, float l0Diffuse, float l1Diffuse) {
if (screenColorRgb != color || lightModelAmbient != ambientMod || light0Diffuse != l0Diffuse || light1Diffuse != l1Diffuse) {
screenColorRgb = color;
lightModelAmbient = ambientMod;
light0Diffuse = l0Diffuse;
light1Diffuse = l1Diffuse;
final GL gl = HDToolKit.gl;
final float red = (color >> 16 & 0xff) / 255.0F;
final float green = (color >> 8 & 0xff) / 255.0F;
final float blue = (color & 0xff) / 255.0F;
final float[] lightModelAmbientParams = { ambientMod * red, ambientMod * green, ambientMod * blue, 1.0F };
gl.glLightModelfv(2899, lightModelAmbientParams, 0);//LIGHT_MODEL_AMBIENT
final float[] light0Params = { l0Diffuse * red, l0Diffuse * green, l0Diffuse * blue, 1.0F };
gl.glLightfv(16384, 4609, light0Params, 0);//LIGHT0, DIFFUSE
final float[] light1Params = { -l1Diffuse * red, -l1Diffuse * green, -l1Diffuse * blue, 1.0F };
gl.glLightfv(16385, 4609, light1Params, 0);//LIGHT1, DIFFUSE
}
}
public static void method1507() {
aFloatArray1312 = null;
aFloatArray1321 = null;
aFloatArray1319 = null;
light0Position = null;
light1Position = null;
fogColor = null;
}
static final void method1508(int var0, int var1) {
if(anInt1324 != var0 || anInt1323 != var1) {
anInt1324 = var0;
anInt1323 = var1;
javax.media.opengl.GL var2 = HDToolKit.gl;
byte var3 = 50;
short var4 = 3584;
aFloatArray1319[0] = (float)(var0 >> 16 & 255) / 255.0F;
aFloatArray1319[1] = (float)(var0 >> 8 & 255) / 255.0F;
aFloatArray1319[2] = (float)(var0 & 255) / 255.0F;
var2.glFogi(2917, 9729);
var2.glFogf(2914, 0.95F);
var2.glHint(3156, 4353);
int var5 = var4 / 2/* - 512 - var1*/;
if(var5 < var3) {
var5 = var3;
static final void setFogValues(int fogCol, int fogOff) {
if(fogColorRGB != fogCol || fogOffset != fogOff) {
fogColorRGB = fogCol;
fogOffset = fogOff;
final GL gl = HDToolKit.gl;
byte lowestFogStart = 50;
//short baseFogStart = 3584; This is unused because it was originally this but to avoid math jagex simplified it.
fogColor[0] = (fogCol >> 16 & 0xff) / 255.0F;
fogColor[1] = (fogCol >> 8 & 0xff) / 255.0F;
fogColor[2] = (fogCol & 0xff) / 255.0F;
//2917 FOG_MODE
//9729 LINEAR
gl.glFogi(2917, 9729);
//FOG_DENSITY
gl.glFogf(2914, 0.95F);
//3156 = FOG_HINT
//4353 = FASTEST, 4354 = NICEST, 4352 = DONT_CARE
gl.glHint(3156, 4353);
int fogStart = 3072 - fogOff;//baseFogStart - 512 - fogOff
if (fogStart < lowestFogStart) {
fogStart = lowestFogStart;
}
var2.glFogf(2915, (float)var5);
var2.glFogf(2916, (float)(var4 - 256));
var2.glFogfv(2918, aFloatArray1319, 0);
//FOG_START
gl.glFogf(2915, fogStart);
//FOG_END
gl.glFogf(2916, 3328.0F);//baseFogStart - 256
//FOG_COLOR
gl.glFogfv(2918, fogColor, 0);
}
}
static final void method1509(float var0, float var1, float var2) {
if(aFloatArray1312[0] != var0 || aFloatArray1312[1] != var1 || aFloatArray1312[2] != var2) {
aFloatArray1312[0] = var0;
aFloatArray1312[1] = var1;
aFloatArray1312[2] = var2;
aFloatArray1321[0] = -var0;
aFloatArray1321[1] = -var1;
aFloatArray1321[2] = -var2;
anInt1314 = (int)(var0 * 256.0F / var1);
anInt1315 = (int)(var2 * 256.0F / var1);
static final void setLightPosition(float x, float y, float z) {
if(light0Position[0] != x || light0Position[1] != y || light0Position[2] != z) {
light0Position[0] = x;
light0Position[1] = y;
light0Position[2] = z;
light1Position[0] = -x;
light1Position[1] = -y;
light1Position[2] = -z;
lightX = (int)(x * 256.0F / y);
lightY = (int)(z * 256.0F / y);
}
}
static final int method1510() {
return anInt1313;
static final int screenColorRgb() {
return screenColorRgb;
}
static final void method1511() {
javax.media.opengl.GL var0 = HDToolKit.gl;
var0.glColorMaterial(1028, 5634);
var0.glEnable(2903);
float[] var1 = new float[]{0.0F, 0.0F, 0.0F, 1.0F};
var0.glLightfv(16384, 4608, var1, 0);
var0.glEnable(16384);
float[] var2 = new float[]{0.0F, 0.0F, 0.0F, 1.0F};
var0.glLightfv(16385, 4608, var2, 0);
var0.glEnable(16385);
anInt1313 = -1;
anInt1324 = -1;
method1513();
final GL gl = HDToolKit.gl;
gl.glColorMaterial(1028, 5634);//FRONT, AMBIENT_AND_DIFFUSE
gl.glEnable(2903);//COLOR_MATERIAL
final float[] light0Params = { 0.0F, 0.0F, 0.0F, 1.0F };
gl.glLightfv(16384, 4608, light0Params, 0);//LIGHT0, AMBIENT
gl.glEnable(16384);//LIGHT0
final float[] light1Params = { 0.0F, 0.0F, 0.0F, 1.0F };
gl.glLightfv(16385, 4608, light1Params, 0);//LIGHT1, AMBIENT
gl.glEnable(16385);//LIGHT1
screenColorRgb = -1;
fogColorRGB = -1;
initDefaults();
}
static final void method1512(float[] var0) {
if(var0 == null) {
var0 = aFloatArray1319;
var0 = fogColor;
}
javax.media.opengl.GL var1 = HDToolKit.gl;
var1.glFogfv(2918, var0, 0);
GL gl = HDToolKit.gl;
gl.glFogfv(2918, var0, 0);
}
private static final void method1513() {
method1506(anInt1322, 1.1523438F, 0.69921875F, 1.2F);
method1509(-50.0F, -60.0F, -50.0F);
method1508(anInt1316, 0);
private static final void initDefaults() {
setLightParams(defaultScreenColorRgb, 1.1523438F, 0.69921875F, 1.2F);
setLightPosition(-50.0F, -60.0F, -50.0F);
setFogValues(defaulFogColorRgb, 0);
}
static final float method1514() {
return aFloat1320;
return lightModelAmbient;
}
}

View file

@ -390,7 +390,7 @@ public final class Client extends GameShell {
Class3_Sub28_Sub19.anInt3773 = 40000 + ObjectDefinition.worldId;
} else if(Class44.anInt718 == 2) {
RuntimeException_Sub1.worldListHost = "127.0.0.1";
System.out.println("port = " + Class53.anInt867);
System.out.println("Setting worldListHost to 127.0.0.1, port = " + Class53.anInt867);
Class53.anInt867 = ObjectDefinition.worldId + '\uc350';
Class3_Sub28_Sub19.anInt3773 = ObjectDefinition.worldId + '\u9c40';
}
@ -406,8 +406,8 @@ public final class Client extends GameShell {
Class3_Sub25.aShortArray2548 = Class164_Sub1.aShortArray3011;
} else {
Class101.aBoolean1419 = true;
Class92.anInt1322 = 16777215;
Class92.anInt1316 = 0;
Class92.defaultScreenColorRgb = 16777215;
Class92.defaulFogColorRgb = 0;
Class15.aShortArrayArray344 = Class118.aShortArrayArray1619;
Class101.aShortArrayArray1429 = Class75_Sub1.aShortArrayArray2634;
Class3_Sub25.aShortArray2548 = Class2.aShortArray63;

View file

@ -88,7 +88,7 @@ public class ClientLoader extends Applet {
public void launch() {
try {
ClientLoader.world = "" + GameLaunch.SETTINGS.getWorld();
System.out.println(GameLaunch.SETTINGS.getWorld());
//System.out.println(GameLaunch.SETTINGS.getWorld());
this.frame = new JFrame(GameLaunch.SETTINGS.getName());
this.frame.setLayout(new BorderLayout());
this.frame.setBackground(Color.BLACK);

View file

@ -20,7 +20,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
/**
* The game settings.
*/
public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.LOCAL_MS ? "127.0.0.1" : "frostblades.org", 1, "live", false, false);
public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.LOCAL_MS ? "127.0.0.1" : "34.68.75.237"/*"34.68.75.237"*/, 1, "live", false, false);
private boolean aBoolean1 = false;

View file

@ -153,6 +153,7 @@ public class Signlink implements Runnable {
}
public final Class64 method1441(byte var1, String address, int port) {
//System.out.println("var1: " + var1 + ", add: " + address + ":" + port);
return var1 != 8?null:this.method1435(1, 0, address, port, -17);
}

View file

@ -0,0 +1,13 @@
Ubuntu 18.04 LTS:
1. Get SQL: https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04
2. Remove the password: https://stackoverflow.com/questions/44890331/how-do-i-setup-mysql-with-a-blank-empty-password-on-ubuntu-16-04
3. Install Java: sudo apt install default-jre
4. Create global & server database:
* Login: mysql -u root -p
* Create:
* CREATE DATABASE server;
* CREATE DATABASE global;
5. Import global & server databases:
* mysql -u root -p server < server.sql
* mysql -u root -p global < global.sql

View file

@ -7,11 +7,9 @@ data/profile/**
.DS_Store**
.project**
.classpath**
.class**
/bin/
/out/
*.iml
*.eml
*.userlibraries
*.class
data/players/**

View file

@ -1,4 +1,4 @@
@echo off
@title World 1
java -server -Xms512m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.keldagrim.Management server1.properties
java -server -Xms512m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Server server1.properties
pause

View file

@ -1,4 +1,4 @@
@echo off
@title World 2
java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.keldagrim.Management server2.properties
pause
java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Server server2.properties
pause

View file

@ -1,4 +1,4 @@
@echo off
@title World 3
java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.keldagrim.Management server3.properties
pause
java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Server server3.properties
pause

View file

@ -1,3 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.runite.GameLaunch
Manifest-Version: 1.0
Main-Class: org.runite.Client

View file

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.runite.GameLaunch

View file

@ -1,4 +0,0 @@
@echo off
@title World 1
java -server -Xms512m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.keldagrim.tools.Test
pause

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
40bd001563085fc35165329ea1ff5c5ecbdbbeef

Some files were not shown because too many files have changed in this diff Show more