@@ -62,31 +62,26 @@ public static void method19(boolean arg0, int arg1) {
62
62
63
63
}
64
64
65
- public static void method20 (int arg0 , int arg1 , int arg2 , int arg3 , int arg4 , int arg5 , int arg6 , GameInterface [] arg7 , int arg8 , int arg9 ) {
66
-
67
- if (arg6 != 1 )
68
- providesignlink (null );
69
- for (int i = 0 ; i < arg7 .length ; i ++) {
70
- GameInterface gameInterface = arg7 [i ];
71
- if (gameInterface != null && (gameInterface .type == GameInterfaceType .LAYER || gameInterface .hasListeners ) && gameInterface != null && arg5 == gameInterface .parentId && (!gameInterface .isHidden || PacketBuffer .hiddenButtonTest )) {
72
-
73
-
74
- int i_1_ = arg4 + gameInterface .currentX ;
75
- int i_2_ = arg0 + gameInterface .currentY ;
65
+ public static void runClientScriptsForInterface (int minY , int arg1 , int scrollWidth , int arg3 , int minX , int parentId , GameInterface [] interfaceCollection , int arg8 , int scrollHeight ) {
66
+ for (int i = 0 ; i < interfaceCollection .length ; i ++) {
67
+ GameInterface gameInterface = interfaceCollection [i ];
68
+ if (gameInterface != null && (gameInterface .type == GameInterfaceType .LAYER || gameInterface .hasListeners ) && parentId == gameInterface .parentId && (!gameInterface .isHidden || PacketBuffer .hiddenButtonTest )) {
69
+ int absoluteX = minX + gameInterface .currentX ;
70
+ int absoluteY = minY + gameInterface .currentY ;
76
71
if (!gameInterface .lockScroll )
77
- i_2_ -= arg9 ;
78
- int i_3_ = i_2_ + gameInterface .originalHeight ;
79
- int i_4_ = arg0 >= i_2_ ? arg0 : i_2_ ;
72
+ absoluteY -= scrollHeight ;
73
+ int bottomLeftY = absoluteY + gameInterface .originalHeight ;
74
+ int i_4_ = Math . max ( minY , absoluteY ) ;
80
75
if (!gameInterface .lockScroll )
81
- i_1_ -= arg2 ;
82
- int i_5_ = i_1_ + gameInterface .originalWidth ;
83
- int i_6_ = arg4 < i_1_ ? i_1_ : arg4 ;
84
- int i_7_ = arg1 > i_3_ ? i_3_ : arg1 ;
85
- int i_8_ = i_5_ < arg8 ? i_5_ : arg8 ;
76
+ absoluteX -= scrollWidth ;
77
+ int topRightX = absoluteX + gameInterface .originalWidth ;
78
+ int i_6_ = Math . max ( minX , absoluteX ) ;
79
+ int i_7_ = Math . min ( arg1 , bottomLeftY ) ;
80
+ int i_8_ = Math . min ( topRightX , arg8 ) ;
86
81
if (gameInterface .type == GameInterfaceType .LAYER ) {
87
- method20 (i_4_ , i_7_ , gameInterface .scrollWidth , arg3 , i_6_ , i , 1 , arg7 , i_8_ , gameInterface .scrollPosition );
82
+ runClientScriptsForInterface (i_4_ , i_7_ , gameInterface .scrollWidth , arg3 , i_6_ , i , interfaceCollection , i_8_ , gameInterface .scrollPosition );
88
83
if (gameInterface .children != null )
89
- method20 (i_4_ , i_7_ , gameInterface .scrollWidth , arg3 , i_6_ , gameInterface .id , 1 , gameInterface .children , i_8_ , gameInterface .scrollPosition );
84
+ runClientScriptsForInterface (i_4_ , i_7_ , gameInterface .scrollWidth , arg3 , i_6_ , gameInterface .id , gameInterface .children , i_8_ , gameInterface .scrollPosition );
90
85
}
91
86
if (gameInterface .hasListeners ) {
92
87
boolean bool ;
@@ -110,28 +105,28 @@ public static void method20(int arg0, int arg1, int arg2, int arg3, int arg4, in
110
105
if (!gameInterface .aBoolean2730 && bool_10_ && (0x1 & arg3 ) != 0 ) {
111
106
gameInterface .aBoolean2730 = true ;
112
107
if (gameInterface .anObjectArray2681 != null )
113
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2681 , 0 , RSString .clickY + -i_2_ , gameInterface , Class57 .clickX - i_1_ );
108
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2681 , 0 , RSString .clickY + -absoluteY , gameInterface , Class57 .clickX - absoluteX );
114
109
}
115
110
if (gameInterface .aBoolean2730 && bool_9_ && (arg3 & 0x4 ) != 0 && gameInterface .anObjectArray2747 != null )
116
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2747 , 0 , -i_2_ + Landscape .mouseY , gameInterface , -i_1_ + Class13 .mouseX );
111
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2747 , 0 , -absoluteY + Landscape .mouseY , gameInterface , -absoluteX + Class13 .mouseX );
117
112
if (gameInterface .aBoolean2730 && !bool_9_ && (0x2 & arg3 ) != 0 ) {
118
113
gameInterface .aBoolean2730 = false ;
119
114
if (gameInterface .anObjectArray2707 != null )
120
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2707 , 0 , Landscape .mouseY - i_2_ , gameInterface , Class13 .mouseX - i_1_ );
115
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2707 , 0 , Landscape .mouseY - absoluteY , gameInterface , Class13 .mouseX - absoluteX );
121
116
}
122
117
if (bool_9_ && (arg3 & 0x8 ) != 0 && gameInterface .anObjectArray2644 != null )
123
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2644 , 0 , -i_2_ + Landscape .mouseY , gameInterface , -i_1_ + Class13 .mouseX );
118
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2644 , 0 , -absoluteY + Landscape .mouseY , gameInterface , -absoluteX + Class13 .mouseX );
124
119
if (!gameInterface .aBoolean2682 && bool && (0x10 & arg3 ) != 0 ) {
125
120
gameInterface .aBoolean2682 = true ;
126
121
if (gameInterface .anObjectArray2658 != null )
127
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2658 , 0 , Landscape .mouseY - i_2_ , gameInterface , Class13 .mouseX - i_1_ );
122
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2658 , 0 , Landscape .mouseY - absoluteY , gameInterface , Class13 .mouseX - absoluteX );
128
123
}
129
124
if (gameInterface .aBoolean2682 && bool && (0x40 & arg3 ) != 0 && gameInterface .anObjectArray2680 != null )
130
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2680 , 0 , -i_2_ + Landscape .mouseY , gameInterface , -i_1_ + Class13 .mouseX );
125
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2680 , 0 , -absoluteY + Landscape .mouseY , gameInterface , -absoluteX + Class13 .mouseX );
131
126
if (gameInterface .aBoolean2682 && !bool && (arg3 & 0x20 ) != 0 ) {
132
127
gameInterface .aBoolean2682 = false ;
133
128
if (gameInterface .anObjectArray2672 != null )
134
- ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2672 , 0 , -i_2_ + Landscape .mouseY , gameInterface , -i_1_ + Class13 .mouseX );
129
+ ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2672 , 0 , -absoluteY + Landscape .mouseY , gameInterface , -absoluteX + Class13 .mouseX );
135
130
}
136
131
if (gameInterface .anObjectArray2712 != null && (arg3 & 0x80 ) != 0 )
137
132
ClientScriptRunner .runClientScripts (gameInterface .anObjectArray2712 , 0 , 0 , gameInterface , 0 );
@@ -143,8 +138,8 @@ public static void method20(int arg0, int arg1, int arg2, int arg3, int arg4, in
143
138
144
139
}
145
140
146
- public static void providesignlink (Signlink arg0 ) {
147
- Actor .aClass31_3152 = Main .signlink = arg0 ;
141
+ public static void providesignlink (Signlink signlink ) {
142
+ Actor .signlink = Main .signlink = signlink ;
148
143
}
149
144
150
145
public static int method27 (int arg0 , int arg1 ) {
@@ -316,7 +311,7 @@ public void destroy() {
316
311
if (MovedStatics .anApplet_Sub1_179 == this && !PacketBuffer .aBoolean2255 ) {
317
312
MovedStatics .aLong219 = System .currentTimeMillis ();
318
313
Class43 .sleep (5000L );
319
- Actor .aClass31_3152 = null ;
314
+ Actor .signlink = null ;
320
315
method17 ();
321
316
}
322
317
}
@@ -346,7 +341,7 @@ public void displayClientFrame(int clientVersion, int width, int height, int fil
346
341
MovedStatics .anApplet_Sub1_179 = this ;
347
342
if (Main .signlink == null ) {
348
343
try {
349
- Actor .aClass31_3152 = Main .signlink = new Signlink (false , this , InetAddress .getByName (getCodeBase ().getHost ()), fileStoreId , null , 0 );
344
+ Actor .signlink = Main .signlink = new Signlink (false , this , InetAddress .getByName (getCodeBase ().getHost ()), fileStoreId , null , 0 );
350
345
} catch (IOException e ) {
351
346
e .printStackTrace ();
352
347
}
@@ -430,7 +425,7 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
430
425
Insets insets = Class35 .aFrame1732 .getInsets ();
431
426
Class35 .aFrame1732 .setSize (insets .right + width + insets .left , insets .bottom + insets .top + height );
432
427
// Class35.aFrame1732.setLocationRelativeTo(null);
433
- Actor .aClass31_3152 = Main .signlink = new Signlink (true , null , inetAddress , fileStoreId , cacheFolder , cacheIndexes );
428
+ Actor .signlink = Main .signlink = new Signlink (true , null , inetAddress , fileStoreId , cacheFolder , cacheIndexes );
434
429
Main .signlink .createCanvasNode (1 , this );
435
430
} catch (Exception exception ) {
436
431
MovedStatics .printException (null , exception );
0 commit comments