fix(tavern): bigger cat + drop the green rug

- catSprites: scale the cat to ~2.7x its cell (the sprite is ~40% cat, 60%
  transparent padding) so it reads tile-sized instead of tiny.
- tavernMap: remove the centre rug — tile 923 renders green, which looks wrong on
  the wood floor. (Re-add with a verified warm rug tile later.)
This commit is contained in:
jwinterm
2026-07-11 07:11:41 -04:00
parent 6a2010a023
commit e7fe16fcaa
2 changed files with 4 additions and 5 deletions
+3 -3
View File
@@ -28,10 +28,10 @@
var frame = Math.floor((now || 0) / FRAME_MS) % FRAMES;
var sx = frame * FW;
// The cat occupies only ~40% of its 50x50 frame (lots of transparent padding), so scale
// the frame to ~2x the cell and centre it — the visible cat then reads about tile-sized.
var size = cell * 2.0;
// the frame well past the cell and centre it — the visible cat then reads about tile-sized.
var size = cell * 2.7;
var dx = e.x * cell + (cell - size) / 2;
var dy = e.y * cell + (cell - size) / 2 + cell * 0.2; // centred, nudged down onto the tile
var dy = e.y * cell + (cell - size) / 2 + cell * 0.28; // centred, nudged down onto the tile
ctx.save();
ctx.imageSmoothingEnabled = false;
if (e.facing === 'left') {
+1 -2
View File
@@ -46,8 +46,7 @@ function buildDefaultTavern(cols = 28, rows = 15) {
const tables = [[5, 6], [12, 6], [19, 6], [5, 10], [12, 10], [19, 10]];
for (const [tx, ty] of tables) { put(tx, ty, 'T'); put(tx, ty + 1, 'c'); }
// A rug in the centre of the room.
for (let y = 8; y <= 9; y++) for (let x = 11; x <= 15; x++) put(x, y, 'r');
// (No rug for now — the rug tile renders green, which reads wrong on the wood floor.)
// Corner decor — barrels and crates.
put(1, 1, 'B'); put(cols - 2, 1, 'C'); put(1, rows - 2, 'C'); put(cols - 2, rows - 2, 'B');