mirror of
https://github.com/lexi-lambda/shattered-plans.git
synced 2024-11-22 02:52:23 +03:00
Add a few spots
This commit is contained in:
parent
cacdc533b0
commit
dd7f8c7fe4
@ -13,6 +13,9 @@ import funorb.util.BitMath;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public final class JagexLogoIntroAnimation {
|
||||
private static final int LOGICAL_CANVAS_WIDTH = 640;
|
||||
private static final int LOGICAL_CANVAS_HEIGHT = 480;
|
||||
|
||||
private static final Sprite _rfh = new Sprite(270, 70);
|
||||
private static final Sprite _ini = new Sprite(540, 140);
|
||||
private static sr_[] _vcd;
|
||||
@ -143,6 +146,9 @@ public final class JagexLogoIntroAnimation {
|
||||
}
|
||||
|
||||
public static void draw() {
|
||||
final int xOffset = (Drawing.width - LOGICAL_CANVAS_WIDTH) / 2;
|
||||
final int yOffset = (Drawing.height - LOGICAL_CANVAS_HEIGHT) / 2;
|
||||
|
||||
if (jagexIntroAnimationFrame >= 0) {
|
||||
final int var2 = 185;
|
||||
final int var3 = 205;
|
||||
@ -166,9 +172,9 @@ public final class JagexLogoIntroAnimation {
|
||||
});
|
||||
|
||||
if (jagexIntroAnimationFrame < 150) {
|
||||
_ini.d093(var2, var3);
|
||||
_ini.d093(xOffset + var2, yOffset + var3);
|
||||
} else {
|
||||
_qaq.draw(200, 215, var4);
|
||||
_qaq.draw(xOffset + 200, yOffset + 215, var4);
|
||||
}
|
||||
|
||||
final int var5 = jagexIntroAnimationFrame - 125;
|
||||
@ -176,12 +182,12 @@ public final class JagexLogoIntroAnimation {
|
||||
if (var5 > 0 && var5 < 50) {
|
||||
if (var5 < 20) {
|
||||
var6 = var5 * 256 / 20;
|
||||
_rfh.drawAdd(var2, var3, var6);
|
||||
_rfh.drawAdd(xOffset + var2, yOffset + var3, var6);
|
||||
} else if (var5 >= 30) {
|
||||
var6 = 256 * (50 - var5) / 20;
|
||||
_rfh.drawAdd(var2, var3, var6);
|
||||
_rfh.drawAdd(xOffset + var2, yOffset + var3, var6);
|
||||
} else {
|
||||
_rfh.drawAdd(var2, var3, 256);
|
||||
_rfh.drawAdd(xOffset + var2, yOffset + var3, 256);
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,7 +198,7 @@ public final class JagexLogoIntroAnimation {
|
||||
var6 = i * 256 / 20;
|
||||
}
|
||||
|
||||
_akz.draw(200, 215, var6 * var4 >> 8);
|
||||
_akz.draw(xOffset + 200, yOffset + 215, var6 * var4 >> 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1328,14 +1328,14 @@ public class Sprite {
|
||||
}
|
||||
}
|
||||
|
||||
public void d093(int var1, int var2) {
|
||||
var1 += this.x >> 1;
|
||||
var2 += this.y >> 1;
|
||||
final int var3 = var1 < Drawing.left ? Drawing.left - var1 << 1 : 0;
|
||||
final int var4 = var1 + (this.width >> 1) > Drawing.right ? Drawing.right - var1 << 1 : this.width;
|
||||
final int var5 = var2 < Drawing.top ? Drawing.top - var2 << 1 : 0;
|
||||
final int var6 = var2 + (this.height >> 1) > Drawing.bottom ? Drawing.bottom - var2 << 1 : this.height;
|
||||
a600(this.pixels, var5 * this.width + var3, (var2 + (var5 >> 1)) * Drawing.width + var1 + (var3 >> 1), (this.width << 1) - (var4 - var3) + (this.width & 1), Drawing.width - (var4 - var3 >> 1), this.width, var4 - var3 >> 1, var6 - var5 >> 1);
|
||||
public void d093(int x, int y) {
|
||||
x += this.x >> 1;
|
||||
y += this.y >> 1;
|
||||
final int var3 = x < Drawing.left ? Drawing.left - x << 1 : 0;
|
||||
final int var4 = x + (this.width >> 1) > Drawing.right ? Drawing.right - x << 1 : this.width;
|
||||
final int var5 = y < Drawing.top ? Drawing.top - y << 1 : 0;
|
||||
final int var6 = y + (this.height >> 1) > Drawing.bottom ? Drawing.bottom - y << 1 : this.height;
|
||||
a600(this.pixels, var5 * this.width + var3, (y + (var5 >> 1)) * Drawing.width + x + (var3 >> 1), (this.width << 1) - (var4 - var3) + (this.width & 1), Drawing.width - (var4 - var3 >> 1), this.width, var4 - var3 >> 1, var6 - var5 >> 1);
|
||||
}
|
||||
|
||||
public final void a115(final int var3) {
|
||||
|
@ -1517,7 +1517,10 @@ public abstract class JagexApplet extends JagexBaseApplet {
|
||||
static void drawLoadingScreen(final int percent, final String message, final boolean clear) {
|
||||
try {
|
||||
final Graphics2D g = (Graphics2D) canvas.getGraphics();
|
||||
g.scale(canvas.getWidth() / 640.0, canvas.getHeight() / 480.0);
|
||||
g.scale(
|
||||
canvas.getWidth() / (double) ShatteredPlansClient.SCREEN_WIDTH,
|
||||
canvas.getHeight() / (double) ShatteredPlansClient.SCREEN_HEIGHT
|
||||
);
|
||||
|
||||
if (loadingScreenFont == null) {
|
||||
loadingScreenFont = new java.awt.Font("Helvetica", java.awt.Font.BOLD, 13);
|
||||
@ -1528,6 +1531,11 @@ public abstract class JagexApplet extends JagexBaseApplet {
|
||||
g.fillRect(0, 0, ShatteredPlansClient.SCREEN_WIDTH, ShatteredPlansClient.SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
g.translate(
|
||||
(ShatteredPlansClient.SCREEN_WIDTH - ShatteredPlansClient.ORIGINAL_SCREEN_WIDTH) / 2,
|
||||
(ShatteredPlansClient.SCREEN_HEIGHT - ShatteredPlansClient.ORIGINAL_SCREEN_HEIGHT) / 2
|
||||
);
|
||||
|
||||
try {
|
||||
if (_rma == null) {
|
||||
_rma = canvas.createImage(304, 34);
|
||||
|
Loading…
Reference in New Issue
Block a user