Rename engine to cubi
This commit is contained in:
+4
-4
@@ -18,7 +18,7 @@ import { decode_level_chunk, type LevelChunk } from "$/common/chunk_streaming.ts
|
||||
import { decode_chunk, encode_chunk } from "$/server/game/saves.ts";
|
||||
import { list_chunks, read_chunk, write_chunks } from "$/server/regions.ts";
|
||||
|
||||
const ENGINE_TEXTURES = ["engine:missing", ...Array.from({ length: 9 }, (_, i) => `engine:break_${i}`)];
|
||||
const ENGINE_TEXTURES = ["cubi:missing", ...Array.from({ length: 9 }, (_, i) => `cubi:break_${i}`)];
|
||||
|
||||
// mods/bworld and one made from the template, packed into a folder of .bmod files
|
||||
async function packed_mods() {
|
||||
@@ -214,14 +214,14 @@ const sizes = (entries: [string, number, number][]) =>
|
||||
new Map(entries.map(([id, width, height]) => [id, { width, height }]));
|
||||
|
||||
Deno.test("the atlas lays out same sized textures by id, with the missing texture among them", () => {
|
||||
const layout = atlas_layout(sizes([["b:two", 16, 16], ["a:one", 16, 16], ["engine:break_0", 16, 16]]));
|
||||
const layout = atlas_layout(sizes([["b:two", 16, 16], ["a:one", 16, 16], ["cubi:break_0", 16, 16]]));
|
||||
assertEquals(layout.size, 64);
|
||||
// each inside a pixel of border
|
||||
assertEquals(layout.regions, {
|
||||
"a:one": { x: 1, y: 1, width: 16, height: 16 },
|
||||
"b:two": { x: 19, y: 1, width: 16, height: 16 },
|
||||
"engine:break_0": { x: 37, y: 1, width: 16, height: 16 },
|
||||
"engine:missing": { x: 1, y: 19, width: 16, height: 16 },
|
||||
"cubi:break_0": { x: 37, y: 1, width: 16, height: 16 },
|
||||
"cubi:missing": { x: 1, y: 19, width: 16, height: 16 },
|
||||
});
|
||||
const many = atlas_layout(sizes(Array.from({ length: 100 }, (_, i) => [`m:t${i}`, 16, 16])));
|
||||
assertEquals(many.size, 256);
|
||||
|
||||
Reference in New Issue
Block a user