alpha
Login
or
Join now
sickday.tngl.sh
/
hla-client
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A RuneTek3 client (377) that is deobfuscated, converted to Kotlin, and includes QoL improvements.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
some more small refactoring to scene
author
Henning Berge
date
6 years ago
(Feb 20, 2020, 11:50 PM +0100)
commit
faac07ff
faac07ff3c17d15b52d7c984898f35e5c6d9a934
parent
1a9005f3
1a9005f36e09d3a558f2940dd83eb8d0538ebead
+37
-34
2 changed files
Expand all
Collapse all
Unified
Split
src
main
java
com
jagex
runescape
Game.java
scene
Scene.java
+2
-2
src/main/java/com/jagex/runescape/Game.java
Reviewed
···
8722
8722
int drawPoint = 24628 + (103 - viewportY) * 512 * 4;
8723
8723
for (int viewportX = 1; viewportX < 103; viewportX++) {
8724
8724
if ((currentSceneTileFlags[plane][viewportX][viewportY] & 0x18) == 0)
8725
8725
-
currentScene.renderMinimapDot(pixels, drawPoint, 512, plane, viewportX, viewportY);
8725
8725
+
currentScene.renderMinimapTile(pixels, drawPoint, 512, plane, viewportX, viewportY);
8726
8726
if (plane < 3 && (currentSceneTileFlags[plane + 1][viewportX][viewportY] & 8) != 0)
8727
8727
-
currentScene.renderMinimapDot(pixels, drawPoint, 512, plane + 1, viewportX, viewportY);
8727
8727
+
currentScene.renderMinimapTile(pixels, drawPoint, 512, plane + 1, viewportX, viewportY);
8728
8728
drawPoint += 4;
8729
8729
}
8730
8730
+35
-32
src/main/java/com/jagex/runescape/scene/Scene.java
Reviewed
···
862
862
863
863
}
864
864
865
865
-
public void renderMinimapDot(int[] ai, int i, int j, int z, int x, int y) {
865
865
+
public void renderMinimapTile(int[] pixels, int pixelPointer, int j, int z, int x, int y) {
866
866
SceneTile sceneTile = groundArray.getTile(z, x, y);
867
867
if (sceneTile == null) {
868
868
return;
869
869
}
870
870
GenericTile genericTile = sceneTile.plainTile;
871
871
if (genericTile != null) {
872
872
-
int j1 = genericTile.rgbColor;
873
873
-
if (j1 == 0) {
872
872
+
int tileRGB = genericTile.rgbColor;
873
873
+
if (tileRGB == 0) {
874
874
return;
875
875
+
}
876
876
+
if((tileRGB & 0xFF0000) >> 16 >= 160){
877
877
+
System.out.println("FOUND RED!!!");
875
878
}
876
879
for (int k1 = 0; k1 < 4; k1++) {
877
877
-
ai[i] = j1;
878
878
-
ai[i + 1] = j1;
879
879
-
ai[i + 2] = j1;
880
880
-
ai[i + 3] = j1;
881
881
-
i += j;
880
880
+
pixels[pixelPointer] = tileRGB;
881
881
+
pixels[pixelPointer + 1] = tileRGB;
882
882
+
pixels[pixelPointer + 2] = tileRGB;
883
883
+
pixels[pixelPointer + 3] = tileRGB;
884
884
+
pixelPointer += j;
882
885
}
883
886
884
887
return;
···
887
890
if (complexTile == null) {
888
891
return;
889
892
}
890
890
-
int l1 = complexTile.shape;
891
891
-
int i2 = complexTile.rotation;
892
892
-
int j2 = complexTile.underlayRGB;
893
893
-
int k2 = complexTile.overlayRGB;
894
894
-
int[] ai1 = tileShapePoints[l1];
895
895
-
int[] ai2 = tileShapeIndices[i2];
896
896
-
int l2 = 0;
897
897
-
if (j2 != 0) {
898
898
-
for (int i3 = 0; i3 < 4; i3++) {
899
899
-
ai[i] = ai1[ai2[l2++]] != 0 ? k2 : j2;
900
900
-
ai[i + 1] = ai1[ai2[l2++]] != 0 ? k2 : j2;
901
901
-
ai[i + 2] = ai1[ai2[l2++]] != 0 ? k2 : j2;
902
902
-
ai[i + 3] = ai1[ai2[l2++]] != 0 ? k2 : j2;
903
903
-
i += j;
893
893
+
int shapeA = complexTile.shape;
894
894
+
int shapeB = complexTile.rotation;
895
895
+
int underlayRGB = complexTile.underlayRGB;
896
896
+
int overlayRGB = complexTile.overlayRGB;
897
897
+
int[] shapePoints = tileShapePoints[shapeA];
898
898
+
int[] shapeIndices = tileShapeIndices[shapeB];
899
899
+
int shapePtr = 0;
900
900
+
if (underlayRGB != 0) {
901
901
+
for (int linePtr = 0; linePtr < 4; linePtr++) {
902
902
+
pixels[pixelPointer] = shapePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB : underlayRGB;
903
903
+
pixels[pixelPointer + 1] = shapePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB : underlayRGB;
904
904
+
pixels[pixelPointer + 2] = shapePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB : underlayRGB;
905
905
+
pixels[pixelPointer + 3] = shapePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB : underlayRGB;
906
906
+
pixelPointer += j;
904
907
}
905
908
906
909
return;
907
910
}
908
908
-
for (int j3 = 0; j3 < 4; j3++) {
909
909
-
if (ai1[ai2[l2++]] != 0) {
910
910
-
ai[i] = k2;
911
911
+
for (int linePtr = 0; linePtr < 4; linePtr++) {
912
912
+
if (shapePoints[shapeIndices[shapePtr++]] != 0) {
913
913
+
pixels[pixelPointer] = overlayRGB;
911
914
}
912
912
-
if (ai1[ai2[l2++]] != 0) {
913
913
-
ai[i + 1] = k2;
915
915
+
if (shapePoints[shapeIndices[shapePtr++]] != 0) {
916
916
+
pixels[pixelPointer + 1] = overlayRGB;
914
917
}
915
915
-
if (ai1[ai2[l2++]] != 0) {
916
916
-
ai[i + 2] = k2;
918
918
+
if (shapePoints[shapeIndices[shapePtr++]] != 0) {
919
919
+
pixels[pixelPointer + 2] = overlayRGB;
917
920
}
918
918
-
if (ai1[ai2[l2++]] != 0) {
919
919
-
ai[i + 3] = k2;
921
921
+
if (shapePoints[shapeIndices[shapePtr++]] != 0) {
922
922
+
pixels[pixelPointer + 3] = overlayRGB;
920
923
}
921
921
-
i += j;
924
924
+
pixelPointer += j;
922
925
}
923
926
924
927
}