15
15
import org .runejs .client .media .Rasterizer3D ;
16
16
import org .runejs .client .media .VertexNormal ;
17
17
import org .runejs .client .media .renderable .Model ;
18
- import org .runejs .client .media .renderable .Renderable ;
19
18
import org .runejs .client .media .renderable .actor .*;
20
19
import org .runejs .client .message .handler .MessageHandlerRegistry ;
21
20
import org .runejs .client .message .handler .rs435 .RS435HandlerRegistry ;
42
41
import org .runejs .client .cache .media .gameInterface .InterfaceModelType ;
43
42
import org .runejs .Configuration ;
44
43
import org .runejs .client .util .SignlinkNode ;
44
+ import org .runejs .client .util .Timer ;
45
45
46
46
import java .awt .*;
47
47
import java .io .IOException ;
@@ -102,6 +102,8 @@ public class Game {
102
102
public static long aLong1841 ;
103
103
public static int clientVersion ;
104
104
public static int playerRights = 0 ;
105
+ public static Timer gameTimer ;
106
+ public static int idleLogout = 0 ;
105
107
/**
106
108
* Backup port if the first one fails?
107
109
*/
@@ -265,7 +267,7 @@ public static boolean drawInterface(int areaId, int minX, int minY, int maxX, in
265
267
else {
266
268
if (GameInterface .activeInterfaceType != 0 && GameInterface .selectedInventorySlot == i_7_ && gameInterface .id == GameInterface .modifiedWidgetId ) {
267
269
i_14_ = MouseHandler .mouseY + -MovedStatics .anInt2798 ;
268
- i_12_ = MouseHandler .mouseX + -Renderable .anInt2869 ;
270
+ i_12_ = MouseHandler .mouseX + -MovedStatics .anInt2869 ;
269
271
if (i_12_ < 5 && i_12_ > -5 )
270
272
i_12_ = 0 ;
271
273
if (i_14_ < 5 && i_14_ > -5 )
@@ -632,7 +634,7 @@ public static void setConfigToDefaults() {
632
634
IncomingPackets .cyclesSinceLastPacket = 0 ;
633
635
Player .headIconDrawType = 0 ;
634
636
OutgoingPackets .buffer .currentPosition = 0 ;
635
- SceneCluster . idleLogout = 0 ;
637
+ idleLogout = 0 ;
636
638
IncomingPackets .thirdLastOpcode = -1 ;
637
639
IncomingPackets .incomingPacketBuffer .currentPosition = 0 ;
638
640
MovedStatics .menuActionRow = 0 ;
@@ -940,7 +942,7 @@ public static void drawGameScreen() {
940
942
GameInterface .redrawTabArea = true ;
941
943
}
942
944
if (GameInterface .tabAreaInterfaceId != -1 ) {
943
- boolean bool = Renderable .handleSequences (GameInterface .tabAreaInterfaceId );
945
+ boolean bool = GameInterface .handleSequences (GameInterface .tabAreaInterfaceId );
944
946
if (bool ) {
945
947
GameInterface .redrawTabArea = true ;
946
948
}
@@ -956,13 +958,13 @@ public static void drawGameScreen() {
956
958
MovedStatics .drawTabArea ();
957
959
958
960
if (GameInterface .chatboxInterfaceId != -1 ) {
959
- boolean bool = Renderable .handleSequences (GameInterface .chatboxInterfaceId );
961
+ boolean bool = GameInterface .handleSequences (GameInterface .chatboxInterfaceId );
960
962
if (bool ) {
961
963
ChatBox .redrawChatbox = true ;
962
964
}
963
965
}
964
966
if (ChatBox .dialogueId != -1 ) {
965
- boolean bool = Renderable .handleSequences (ChatBox .dialogueId );
967
+ boolean bool = GameInterface .handleSequences (ChatBox .dialogueId );
966
968
if (bool ) {
967
969
ChatBox .redrawChatbox = true ;
968
970
}
@@ -1013,15 +1015,15 @@ public static void drawGameScreen() {
1013
1015
1014
1016
1015
1017
if (GameInterface .tabAreaInterfaceId != -1 ) {
1016
- Renderable .handleSequences (GameInterface .tabAreaInterfaceId );
1018
+ GameInterface .handleSequences (GameInterface .tabAreaInterfaceId );
1017
1019
}
1018
1020
1019
1021
if (GameInterface .chatboxInterfaceId != -1 ) {
1020
- Renderable .handleSequences (GameInterface .chatboxInterfaceId );
1022
+ GameInterface .handleSequences (GameInterface .chatboxInterfaceId );
1021
1023
}
1022
1024
1023
1025
if (ChatBox .dialogueId != -1 ) {
1024
- Renderable .handleSequences (ChatBox .dialogueId );
1026
+ GameInterface .handleSequences (ChatBox .dialogueId );
1025
1027
}
1026
1028
method353 ();
1027
1029
ChatBox .renderChatbox ();
@@ -1113,9 +1115,9 @@ public static void displayMessageForResponseCode(int responseCode) {
1113
1115
}
1114
1116
1115
1117
public static void method164 () {
1116
- Renderable .handleSequences (GameInterface .fullscreenInterfaceId );
1118
+ GameInterface .handleSequences (GameInterface .fullscreenInterfaceId );
1117
1119
if (GameInterface .fullscreenSiblingInterfaceId != -1 )
1118
- Renderable .handleSequences (GameInterface .fullscreenSiblingInterfaceId );
1120
+ GameInterface .handleSequences (GameInterface .fullscreenSiblingInterfaceId );
1119
1121
MovedStatics .anInt199 = 0 ;
1120
1122
MovedStatics .aProducingGraphicsBuffer_2213 .prepareRasterizer ();
1121
1123
Player .viewportOffsets = Rasterizer3D .setLineOffsets (Player .viewportOffsets );
@@ -1241,8 +1243,8 @@ public static void moveTowardsTarget() {
1241
1243
public static void updateGame () {
1242
1244
if (MovedStatics .systemUpdateTime > 1 )
1243
1245
MovedStatics .systemUpdateTime --;
1244
- if (SceneCluster . idleLogout > 0 )
1245
- SceneCluster . idleLogout --;
1246
+ if (idleLogout > 0 )
1247
+ idleLogout --;
1246
1248
if (aBoolean871 ) {
1247
1249
aBoolean871 = false ;
1248
1250
dropClient ();
@@ -1402,7 +1404,7 @@ else if(x > 764)
1402
1404
MovedStatics .anInt199 ++;
1403
1405
if (GameInterface .activeInterfaceType != 0 ) {
1404
1406
GameInterface .lastItemDragTime ++;
1405
- if (MouseHandler .mouseX > Renderable .anInt2869 + 5 || Renderable .anInt2869 + -5 > MouseHandler .mouseX || MovedStatics .anInt2798 + 5 < MouseHandler .mouseY || MovedStatics .anInt2798 - 5 > MouseHandler .mouseY )
1407
+ if (MouseHandler .mouseX > MovedStatics .anInt2869 + 5 || MovedStatics .anInt2869 + -5 > MouseHandler .mouseX || MovedStatics .anInt2798 + 5 < MouseHandler .mouseY || MovedStatics .anInt2798 - 5 > MouseHandler .mouseY )
1406
1408
MovedStatics .lastItemDragged = true ;
1407
1409
if (MouseHandler .currentMouseButtonPressed == 0 ) {
1408
1410
if (GameInterface .activeInterfaceType == 3 )
@@ -1542,7 +1544,7 @@ else if(ChatBox.dialogueId != -1)
1542
1544
int i_20_ = MouseHandler .resetFramesSinceMouseInput ();
1543
1545
int i_21_ = KeyFocusListener .resetFramesSinceKeyboardInput ();
1544
1546
if (i_20_ > 4500 && i_21_ > 4500 ) {
1545
- SceneCluster . idleLogout = 250 ;
1547
+ idleLogout = 250 ;
1546
1548
MouseHandler .setFramesSinceMouseInput (4000 );
1547
1549
OutgoingPackets .buffer .putPacket (216 );
1548
1550
}
@@ -1635,16 +1637,16 @@ public static void handleLoginScreenActions() {
1635
1637
}
1636
1638
if (IncomingPackets .incomingPacketBuffer .currentPosition == 8 ) {
1637
1639
IncomingPackets .incomingPacketBuffer .currentPosition = 0 ;
1638
- Renderable .aLong2858 = IncomingPackets .incomingPacketBuffer .getLongBE ();
1640
+ MovedStatics .aLong2858 = IncomingPackets .incomingPacketBuffer .getLongBE ();
1639
1641
loginStatus = 5 ;
1640
1642
}
1641
1643
}
1642
1644
if (loginStatus == 5 ) {
1643
1645
int [] seeds = new int [4 ];
1644
1646
seeds [0 ] = (int ) (Math .random () * 9.9999999E7 );
1645
1647
seeds [1 ] = (int ) (Math .random () * 9.9999999E7 );
1646
- seeds [2 ] = (int ) (Renderable .aLong2858 >> 32 );
1647
- seeds [3 ] = (int ) Renderable .aLong2858 ;
1648
+ seeds [2 ] = (int ) (MovedStatics .aLong2858 >> 32 );
1649
+ seeds [3 ] = (int ) MovedStatics .aLong2858 ;
1648
1650
OutgoingPackets .buffer .currentPosition = 0 ;
1649
1651
OutgoingPackets .buffer .putByte (10 );
1650
1652
OutgoingPackets .buffer .putIntBE (seeds [0 ]);
@@ -1951,7 +1953,7 @@ public static void method249() {
1951
1953
}
1952
1954
1953
1955
public static void dropClient () {
1954
- if (SceneCluster . idleLogout > 0 ) {
1956
+ if (idleLogout > 0 ) {
1955
1957
// Instant logout
1956
1958
logout ();
1957
1959
} else {
@@ -1968,7 +1970,7 @@ public static void setLowMemory() {
1968
1970
}
1969
1971
1970
1972
public static void method992 () {
1971
- SceneCluster . gameTimer .start ();
1973
+ gameTimer .start ();
1972
1974
for (int i = 0 ; i < 32 ; i ++)
1973
1975
GameShell .tickSamples [i ] = 0L ;
1974
1976
for (int i = 0 ; i < 32 ; i ++)
0 commit comments