tool paths configurable by environment (LLAMAMOD_CD, LAMA_WINEPREFIX, LAMA_MOD, APPTEST_ROOT, APPTEST_ISO; tools/lamapaths.py), music tracks without a file on the cd marked in the editor and the tutorial uses kronk, levelbuild.py accepts the english texture names

This commit is contained in:
MineTec committed 2026-11-07 16:34:17 +01:00
1 parent a0d961357e
commit 6d449257a7
21 files changed
+153 -44

No files matched your search

@@ -57,7 +57,9 @@ public final class ViewerDemo {
o.put(a, args[++i]);
}
}
Path cd = Path.of(o.getOrDefault("--cd", System.getProperty("user.home") + "/.wine-lama/iso-dk/Setup/Eng/Cd"));
String envCd = System.getenv("LLAMAMOD_CD");
Path cd = Path.of(o.getOrDefault(
"--cd", envCd != null ? envCd : System.getProperty("user.home") + "/.wine-lama/iso-dk/Setup/Eng/Cd"));
byte[] wad;
if (args[0].equals("testworld")) {
byte[] base = Files.readAllBytes(cd.resolve(LevelBuilder.BASE_WAD));
@@ -191,8 +191,14 @@ public final class EnvMath {
"ENDGAME"
};
/** Ids whose {@code .ASF} file the (German) CD does not have: GAMEOVER, TALLY, PUZZLE2, PLATFORM. */
private static final List<Integer> NO_FILE = List.of(10, 11, 36, 37);
public static String musicLabel(int id) {
return id >= 0 && id < MUSIC.length ? id + " – " + MUSIC[id] : id + " – (unknown)";
if (id < 0 || id >= MUSIC.length) {
return id + " – (unknown)";
}
return id + " – " + MUSIC[id] + (NO_FILE.contains(id) ? " (no file on the CD)" : "");
}
// ------------------------------------------------------------ lights
@@ -50,6 +50,13 @@ class EnvironmentToolsTest {
assertArrayEquals(new double[] {6, 9}, EnvMath.fog(z, 1), 1e-9);
}
@Test
void musicLabelsMarkTracksWithoutFile() {
assertEquals("22 – KRONK", EnvMath.musicLabel(22));
assertEquals("36 – PUZZLE2 (no file on the CD)", EnvMath.musicLabel(36));
assertEquals("99 – (unknown)", EnvMath.musicLabel(99));
}
@Test
void facingRoundTrip() {
for (double d : new double[] {0, 22.5, 90, 180, 270, 337.5}) {
@@ -121,7 +121,10 @@ public final class StratsGameLevel {
.replace(" collisionOn<0x20000>()\n collRadius(0.6)\n", "");
public static void main(String[] a) throws Exception {
Bases cd = Bases.fromCd(Path.of(System.getProperty("user.home") + "/.wine-lama/iso-dk/Setup/Eng/Cd"));
String env = System.getenv("LLAMAMOD_CD");
Bases cd = Bases.fromCd(Path.of(System.getProperty(
"llamamod.cd",
env != null ? env : System.getProperty("user.home") + "/.wine-lama/iso-dk/Setup/Eng/Cd")));
StratEdits.init();
if (a.length > 1 && a[1].equals("v2")) {
v2(cd, Path.of(a[0]));