diff --git a/src/features/r45-neon-signs.js b/src/features/r45-neon-signs.js new file mode 100644 index 0000000..7cfad40 --- /dev/null +++ b/src/features/r45-neon-signs.js @@ -0,0 +1,19 @@ +// #45: neon signs on the arcade building: an OPEN sign and a pizza slice sign on the rooftop walls. +import { PAL } from "../palette.js"; +const OPEN = ["0110111011101001", "1001101010001101", "1001111011101011", "1001100010001001", "0110100011101001"]; +export default { + id: "neon-signs-45", + order: 26, + layer: "mid", + rooms: ["rooftop", "alley"], + draw(g, w) { + const on = w.reduced || Math.sin(w.t * 1.1 + 1) > -0.95; + const ox = w.room === "alley" ? 150 : 158, oy = w.room === "alley" ? 60 : 120; + g.fillStyle = PAL.ink; g.fillRect(ox - 3, oy - 3, 38, 16); + for (let y = 0; y < 5; y++) for (let x = 0; x < 16; x++) if (OPEN[y][x] === "1") { g.fillStyle = on ? PAL.boss : PAL.winOff; g.fillRect(ox + x * 2, oy + y * 2, 2, 2); } + const px = w.room === "alley" ? 210 : 60, py = w.room === "alley" ? 58 : 108; + g.fillStyle = on ? PAL.pizza : PAL.winOff; + for (let r = 0; r < 8; r++) g.fillRect(px + r, py + r, 12 - r * 2 + r, 1); + g.fillStyle = on ? PAL.boss : PAL.winOff; g.fillRect(px + 4, py + 2, 2, 2); g.fillRect(px + 7, py + 4, 2, 2); + }, +};