quickshell: redraw Archie smaller, with proper tan markings and a dachshund head

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-08-04 13:02:02 +01:00
parent e11d6d4e57
commit d53e491812

View file

@ -1138,9 +1138,12 @@ in
property bool primary: true
visible: primary
readonly property int cell: 6
readonly property int cols: 26
readonly property int rows: 13
// 4px pixels, not the worm's 6: he reads better with more
// pixels in him, and at 112x48 he takes up a lot less of the
// screen than the chunkier first pass did.
readonly property int cell: 4
readonly property int cols: 28
readonly property int rows: 12
// Not themed he looked how he looked.
readonly property var pal: ({
@ -1154,68 +1157,64 @@ in
// Trotting: legs out at full stride, tail up.
readonly property var walkA: [
"....................KKKK..",
"...................KKKKKK.",
"...................KKTKKK.",
"KK.................KKWTTK.",
".KK................KKTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTT..",
"...KKKKKKKKKKKKKKKRKKT....",
"...KKKKKKKKKKKKKTTK.......",
"....TKKKKKKKKKKKTT........",
"....TT.........TTT........",
"....TT..........TT........",
"...TTT..........TTT......."
"....................KKKKK...",
"...................KKTKKKK..",
"KK.................KKNTTKKN.",
".KKKKKKKKKKKKKKKKKRKKTTTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTTT...",
"..KKKKKKKKKKKKKKKKRKKTT.....",
"...KKKKKKKKKKKKKKTTT........",
"....TKKKKKKKKKKKTTT.........",
"....TTKKKKKKKKKTTT..........",
"....TT..........TT..........",
"....TT..........TT..........",
"...TTT.........TTT.........."
]
// Legs gathered underneath, tail level.
readonly property var walkB: [
"....................KKKK..",
"...................KKKKKK.",
"...................KKTKKK.",
"...................KKWTTK.",
"KKK................KKTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTT..",
"...KKKKKKKKKKKKKKKRKKT....",
"...KKKKKKKKKKKKKTTK.......",
"....TKKKKKKKKKKKTT........",
"......TT......TT..........",
"......TT......TT..........",
".....TTT.....TTT.........."
"....................KKKKK...",
"...................KKTKKKK..",
"...................KKNTTKKN.",
"KKKKKKKKKKKKKKKKKKRKKTTTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTTT...",
"..KKKKKKKKKKKKKKKKRKKTT.....",
"...KKKKKKKKKKKKKKTTT........",
"....TKKKKKKKKKKKTTT.........",
"....TTKKKKKKKKKTTT..........",
"......TT......TT............",
"......TT......TT............",
".....TTT.....TTT............"
]
// Standing still: walkA's planted legs, walkB's tail. Flipping
// between this and walkA is the wag.
readonly property var wag: [
"....................KKKK..",
"...................KKKKKK.",
"...................KKTKKK.",
"...................KKWTTK.",
"KKK................KKTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTT..",
"...KKKKKKKKKKKKKKKRKKT....",
"...KKKKKKKKKKKKKTTK.......",
"....TKKKKKKKKKKKTT........",
"....TT.........TTT........",
"....TT..........TT........",
"...TTT..........TTT......."
"....................KKKKK...",
"...................KKTKKKK..",
"...................KKNTTKKN.",
"KKKKKKKKKKKKKKKKKKRKKTTTTTN.",
"..KKKKKKKKKKKKKKKKRKKTTTT...",
"..KKKKKKKKKKKKKKKKRKKTT.....",
"...KKKKKKKKKKKKKKTTT........",
"....TKKKKKKKKKKKTTT.........",
"....TTKKKKKKKKKTTT..........",
"....TT..........TT..........",
"....TT..........TT..........",
"...TTT.........TTT.........."
]
// Head down in the bowl.
readonly property var eat: [
"..........................",
"..........................",
"..........................",
"KK........................",
".KK.......................",
"..KKKKKKKKKKKKKKKKRK......",
"..KKKKKKKKKKKKKKKKRKK.....",
"...KKKKKKKKKKKKKKKRKKKK...",
"...KKKKKKKKKKKKKTTKKTKKK..",
"....TKKKKKKKKKKKTTKKWTTK..",
"....TT.........TT..KKTTTN.",
"....TT.........TT...KTTN..",
"...TTT........TTT........."
"............................",
"............................",
"KK..........................",
".KKKKKKKKKKKKKKKKKRKK.......",
"..KKKKKKKKKKKKKKKKRKKK......",
"..KKKKKKKKKKKKKKKKRKKKK.....",
"...KKKKKKKKKKKKKKTTKKKKK....",
"....TKKKKKKKKKKKTTKKTKKK....",
"....TTKKKKKKKKKTTTKKNTTKN...",
"....TT..........TT.KKTTTTN..",
"....TT..........TT..KTTN....",
"...TTT.........TTT.........."
]
readonly property var bowlArt: [
"...BBB..",
@ -1235,7 +1234,8 @@ in
archie.width - Theme.frameWidth - cols * cell - 12)
// Bowl parked over toward the right, clear of the launcher.
readonly property real bowlX: Math.max(roamL, roamR - 150)
// Stand so his muzzle lands in it rather than his shoulder.
// Stand so his muzzle lands in it rather than his shoulder:
// head-down, his nose is about 22 cells along from his tail.
readonly property real bowlStandX: bowlX - 18 * cell
property real px: roamL
@ -1251,7 +1251,12 @@ in
// Not if he is already standing at it otherwise he can
// roll "go to the bowl" while stood in it and eat twice
// over without moving.
toBowl = Math.random() < 0.3 && Math.abs(px - bowlStandX) > 80;
// Near enough to be worth it, but not already stood in it
// otherwise he either marches half a minute across the
// screen for a snack, or rolls "go to the bowl" while his
// head is in it and eats twice over without moving.
let dBowl = Math.abs(px - bowlStandX);
toBowl = Math.random() < 0.3 && dBowl > 80 && dBowl < 900;
// A short trip from wherever he is, not a random point on
// the whole screen: picking uniformly meant single walks
// most of a minute long across a wide monitor, which reads
@ -1301,12 +1306,11 @@ in
} else {
let dir = archie.targetX > archie.px ? 1 : -1;
archie.facing = dir;
archie.px += dir * 1.8;
// Swap legs every 6 ticks: at 1.8px a tick
// that is ~11px of ground per half-stride,
// against the 12px the feet actually move in
// the art, so he does not moonwalk.
archie.frame = archie.tick % 12 < 6 ? archie.walkA : archie.walkB;
archie.px += dir * 1.6;
// Swap legs every 5 ticks: at 1.6px a tick
// that is exactly the 8px his feet move in the
// art (2 cells), so he does not moonwalk.
archie.frame = archie.tick % 10 < 5 ? archie.walkA : archie.walkB;
}
} else {
archie.frame = archie.mode === "eat" ? archie.eat
@ -1352,7 +1356,10 @@ in
// Snap to the pixel grid, same as the worm, or the art
// shimmers as he walks.
x: Math.round(archie.px / archie.cell) * archie.cell
y: Math.round((archie.floorY - height) / archie.cell) * archie.cell
// Exact, not grid-snapped: he never moves vertically, so
// there is nothing to shimmer, and rounding sank his paws
// a couple of pixels through the floor.
y: archie.floorY - height
// Mirror him when he heads back the other way.
transform: Scale { origin.x: archie.cols * archie.cell / 2; xScale: archie.facing }
}
@ -1363,7 +1370,10 @@ in
w: 8
h: 5
x: Math.round(archie.bowlX / archie.cell) * archie.cell
y: Math.round((archie.floorY - height) / archie.cell) * archie.cell
// Exact, not grid-snapped: he never moves vertically, so
// there is nothing to shimmer, and rounding sank his paws
// a couple of pixels through the floor.
y: archie.floorY - height
}
}
'';