Merge pull request #7200 from Abextm/skybox-y

Add Skybox plugin
This commit is contained in:
Adam
2019-01-07 13:48:49 -05:00
committed by GitHub
11 changed files with 1736 additions and 1 deletions

View File

@@ -169,6 +169,9 @@ public abstract class RSClientMixin implements RSClient
@Inject
private static boolean oldIsResized;
@Inject
static int skyboxColor;
@Inject
@Override
public Callbacks getCallbacks()
@@ -1381,4 +1384,18 @@ public abstract class RSClientMixin implements RSClient
return array;
}
@Inject
@Override
public void setSkyboxColor(int newSkyboxColor)
{
skyboxColor = newSkyboxColor;
}
@Inject
@Override
public int getSkyboxColor()
{
return skyboxColor;
}
}

View File

@@ -65,6 +65,9 @@ public abstract class RSSceneMixin implements RSScene
@Inject
private static int[] tmpX = new int[6];
@Shadow("skyboxColor")
static int skyboxColor;
@Inject
private static int[] tmpY = new int[6];
@@ -80,6 +83,22 @@ public abstract class RSSceneMixin implements RSScene
drawCallbacks.drawScene(cameraX, cameraY, cameraZ, cameraPitch, cameraYaw, plane);
}
final boolean isGpu = client.isGpu();
if (!isGpu)
{
if (skyboxColor != 0)
{
client.RasterizerFillRectangle(
client.getViewportXOffset(),
client.getViewportYOffset(),
client.getViewportWidth(),
client.getViewportHeight(),
skyboxColor
);
}
}
final int maxX = getMaxX();
final int maxY = getMaxY();
final int maxZ = getMaxZ();
@@ -87,7 +106,6 @@ public abstract class RSSceneMixin implements RSScene
final int minLevel = getMinLevel();
final RSTile[][][] tiles = getTiles();
final boolean isGpu = client.isGpu();
final int distance = isGpu ? rl$drawDistance : DEFAULT_DISTANCE;
if (cameraX < 0)