Skip to content

Commit

Permalink
Moved rasterizer code to jagex package
Browse files Browse the repository at this point in the history
  • Loading branch information
dosier committed Jul 2, 2024
1 parent b363932 commit b941a3e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package stan.qodat.scene.runescape;
package jagex;

import java.awt.*;
import java.awt.geom.Arc2D;
Expand Down Expand Up @@ -321,7 +321,7 @@ public static void drawHorizontalLine(int xPosition, int yPosition, int width, i
for (int i = 0; i < width; i++)
Rasterizer2D_pixels[pixelIndex + i] = rgbColour;
}

public static void drawHorizontalLine(int x, int y, int width, int color, int alpha) {
if (y < Rasterizer2D_yClipStart || y >= Rasterizer2D_yClipEnd)
return;
Expand All @@ -344,7 +344,7 @@ public static void drawHorizontalLine(int x, int y, int width, int color, int al
Rasterizer2D_pixels[pixelIndex++] = transparentColour;
}
}

public static void fillRectangle(int xPos, int yPos, int w, int h, int color) {
if (xPos < Rasterizer2D_xClipStart) {
w -= Rasterizer2D_xClipStart - xPos;
Expand All @@ -367,7 +367,7 @@ public static void fillRectangle(int xPos, int yPos, int w, int h, int color) {
l1 += k1;
}
}

public static void fillRectangle(int x, int y, int w, int h, int color, int alpha) {
if (x < Rasterizer2D_xClipStart) {
w -= Rasterizer2D_xClipStart - x;
Expand Down Expand Up @@ -547,7 +547,7 @@ public static void drawFilledCircle(int x, int y, int radius, int color, int alp
}
}
}

public static void fillGradientRectangle(int x, int y, int w, int h, int startColour, int endColour) {
int k1 = 0;
int l1 = 0x10000 / h;
Expand Down Expand Up @@ -801,4 +801,4 @@ public static void drawBlackBox(int xPos, int yPos) {
drawBox(xPos, yPos + 69, 175, 1, 0x2E2B23);
drawTransparentBox(xPos, yPos, 174, 68, 0, 220);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package stan.qodat.scene.runescape;
package jagex;

public final class Rasterizer3D extends Rasterizer2D {

Expand Down Expand Up @@ -1676,4 +1676,4 @@ private static void drawFlatScanline(int[] dest, int offset, int rgb, int x1, in
}
}

}
}
4 changes: 0 additions & 4 deletions src/main/kotlin/stan/qodat/scene/runescape/MapExporter.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package stan.qodat.scene.runescape

import jagex.Rasterizer3D
import qodat.cache.models.VertexNormal
import qodat.cache.definition.ModelDefinition
import kotlin.math.absoluteValue
Expand Down

0 comments on commit b941a3e

Please sign in to comment.