Skip to content

Commit

Permalink
ci: Publish mapview artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Pazaz committed May 3, 2024
1 parent d27fef8 commit b96a42b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
loader-client:
name: Build Loader and Client
name: Build Projects
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,9 +23,16 @@ jobs:
- name: Run Gradle build
run: gradle build -x :deob-annotations:build

- name: Upload a Build Artifact
- name: Upload Loader-Client Artifact
uses: actions/upload-artifact@v3
with:
name: loader-client
path: |
loader/build/libs/*
- name: Upload Mapview Artifact
uses: actions/upload-artifact@v3
with:
name: mapview
path: |
mapview/build/libs/*
32 changes: 16 additions & 16 deletions mapview/src/main/java/mapview.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public final class mapview extends GameShell {
private byte[][] locMapscenes;

private boolean[][] objTiles;

private boolean[][] npcTiles;

@OriginalMember(owner = "mapview!mapview", name = "X", descriptor = "Lmapview!j;")
Expand Down Expand Up @@ -133,22 +134,22 @@ public final class mapview extends GameShell {
private int labelCount;

@OriginalMember(owner = "mapview!mapview", name = "F", descriptor = "I")
private int colorInactiveBorderTL = 0x887755;
private final int colorInactiveBorderTL = 0x887755;

@OriginalMember(owner = "mapview!mapview", name = "G", descriptor = "I")
private int colorInactive = 0x776644;
private final int colorInactive = 0x776644;

@OriginalMember(owner = "mapview!mapview", name = "H", descriptor = "I")
private int colorInactiveBorderBR = 0x665533;
private final int colorInactiveBorderBR = 0x665533;

@OriginalMember(owner = "mapview!mapview", name = "I", descriptor = "I")
private int colorActiveBorderTL = 0xaa0000;
private final int colorActiveBorderTL = 0xaa0000;

@OriginalMember(owner = "mapview!mapview", name = "J", descriptor = "I")
private int colorActive = 0x990000;
private final int colorActive = 0x990000;

@OriginalMember(owner = "mapview!mapview", name = "K", descriptor = "I")
private int colorActiveBorderBR = 0x880000;
private final int colorActiveBorderBR = 0x880000;

@OriginalMember(owner = "mapview!mapview", name = "L", descriptor = "Z")
private boolean redraw = true;
Expand Down Expand Up @@ -222,7 +223,7 @@ public final class mapview extends GameShell {
private boolean showOverview = false;

@OriginalMember(owner = "mapview!mapview", name = "Jb", descriptor = "I")
private int maxLabelCount = 1000;
private final int maxLabelCount = 1000;

@OriginalMember(owner = "mapview!mapview", name = "Kb", descriptor = "[Ljava/lang/String;")
private String[] labelText = new String[this.maxLabelCount];
Expand Down Expand Up @@ -641,20 +642,19 @@ protected void unload() {
@Override
protected void update() {
if (super.actionKey[1] == 1) {
this.offsetX = (int) ((double) this.offsetX - 16.0D / this.zoom);
this.offsetX = (int) ((double) this.offsetX - (16.0D / this.zoom));
this.redraw = true;
}
if (super.actionKey[2] == 1) {
this.offsetX = (int) ((double) this.offsetX + 16.0D / this.zoom);
this.offsetX = (int) ((double) this.offsetX + (16.0D / this.zoom));
this.redraw = true;
}

if (super.actionKey[3] == 1) {
this.offsetZ = (int) ((double) this.offsetZ - 16.0D / this.zoom);
this.offsetZ = (int) ((double) this.offsetZ - (16.0D / this.zoom));
this.redraw = true;
}
if (super.actionKey[4] == 1) {
this.offsetZ = (int) ((double) this.offsetZ + 16.0D / this.zoom);
this.offsetZ = (int) ((double) this.offsetZ + (16.0D / this.zoom));
this.redraw = true;
}

Expand Down Expand Up @@ -846,10 +846,10 @@ protected void update() {
if (top < 48) {
this.offsetZ = (int) (503.0D / this.zoom) + 48;
}
if (right > (this.sizeX - 48)) {
this.offsetX = this.sizeX - 48 - (int) (635.0D / this.zoom);
if (right > this.sizeX - 48) {
this.offsetX = (this.sizeX - 48) - (int) (635.0D / this.zoom);
}
if (bottom > (this.sizeZ - 48)) {
if (bottom > this.sizeZ - 48) {
this.offsetZ = (this.sizeZ - 48) - (int) (503.0D / this.zoom);
}
}
Expand Down Expand Up @@ -1070,7 +1070,7 @@ private void drawMap(@OriginalArg(0) int left, @OriginalArg(1) int top, @Origina
wall -= 4;
}
if (wall == 27 || wall == 28) {
// bugfix: draw diagonal active locs (doors)
// bugfix: drawing diagonal doors
rgb = 0xcc0000;
wall -= 2;
}
Expand Down
4 changes: 2 additions & 2 deletions mapview/src/main/java/sig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public class sig {
public static final int len = 317398;
public static final int len = 324757;

public static final int[] sha = { -80, -121, -25, -125, -3, 0, -18, -115, -90, -65, 86, 8, -9, 97, -7, -44, -77, 63, -20, 28 };
public static final int[] sha = { -84, -71, 57, -4, 22, -94, -89, 99, -64, -76, 60, -108, 66, -91, 74, -108, 44, 38, -127, 44 };
}

0 comments on commit b96a42b

Please sign in to comment.