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:
parent
e11d6d4e57
commit
d53e491812
1 changed files with 75 additions and 65 deletions
|
|
@ -1138,9 +1138,12 @@ in
|
||||||
property bool primary: true
|
property bool primary: true
|
||||||
visible: primary
|
visible: primary
|
||||||
|
|
||||||
readonly property int cell: 6
|
// 4px pixels, not the worm's 6: he reads better with more
|
||||||
readonly property int cols: 26
|
// pixels in him, and at 112x48 he takes up a lot less of the
|
||||||
readonly property int rows: 13
|
// 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.
|
// Not themed — he looked how he looked.
|
||||||
readonly property var pal: ({
|
readonly property var pal: ({
|
||||||
|
|
@ -1154,68 +1157,64 @@ in
|
||||||
|
|
||||||
// Trotting: legs out at full stride, tail up.
|
// Trotting: legs out at full stride, tail up.
|
||||||
readonly property var walkA: [
|
readonly property var walkA: [
|
||||||
"....................KKKK..",
|
"....................KKKKK...",
|
||||||
"...................KKKKKK.",
|
"...................KKTKKKK..",
|
||||||
"...................KKTKKK.",
|
"KK.................KKNTTKKN.",
|
||||||
"KK.................KKWTTK.",
|
".KKKKKKKKKKKKKKKKKRKKTTTTTN.",
|
||||||
".KK................KKTTTN.",
|
"..KKKKKKKKKKKKKKKKRKKTTTT...",
|
||||||
"..KKKKKKKKKKKKKKKKRKKTTTN.",
|
"..KKKKKKKKKKKKKKKKRKKTT.....",
|
||||||
"..KKKKKKKKKKKKKKKKRKKTTT..",
|
"...KKKKKKKKKKKKKKTTT........",
|
||||||
"...KKKKKKKKKKKKKKKRKKT....",
|
"....TKKKKKKKKKKKTTT.........",
|
||||||
"...KKKKKKKKKKKKKTTK.......",
|
"....TTKKKKKKKKKTTT..........",
|
||||||
"....TKKKKKKKKKKKTT........",
|
"....TT..........TT..........",
|
||||||
"....TT.........TTT........",
|
"....TT..........TT..........",
|
||||||
"....TT..........TT........",
|
"...TTT.........TTT.........."
|
||||||
"...TTT..........TTT......."
|
|
||||||
]
|
]
|
||||||
// Legs gathered underneath, tail level.
|
// Legs gathered underneath, tail level.
|
||||||
readonly property var walkB: [
|
readonly property var walkB: [
|
||||||
"....................KKKK..",
|
"....................KKKKK...",
|
||||||
"...................KKKKKK.",
|
"...................KKTKKKK..",
|
||||||
"...................KKTKKK.",
|
"...................KKNTTKKN.",
|
||||||
"...................KKWTTK.",
|
"KKKKKKKKKKKKKKKKKKRKKTTTTTN.",
|
||||||
"KKK................KKTTTN.",
|
"..KKKKKKKKKKKKKKKKRKKTTTT...",
|
||||||
"..KKKKKKKKKKKKKKKKRKKTTTN.",
|
"..KKKKKKKKKKKKKKKKRKKTT.....",
|
||||||
"..KKKKKKKKKKKKKKKKRKKTTT..",
|
"...KKKKKKKKKKKKKKTTT........",
|
||||||
"...KKKKKKKKKKKKKKKRKKT....",
|
"....TKKKKKKKKKKKTTT.........",
|
||||||
"...KKKKKKKKKKKKKTTK.......",
|
"....TTKKKKKKKKKTTT..........",
|
||||||
"....TKKKKKKKKKKKTT........",
|
"......TT......TT............",
|
||||||
"......TT......TT..........",
|
"......TT......TT............",
|
||||||
"......TT......TT..........",
|
".....TTT.....TTT............"
|
||||||
".....TTT.....TTT.........."
|
|
||||||
]
|
]
|
||||||
// Standing still: walkA's planted legs, walkB's tail. Flipping
|
// Standing still: walkA's planted legs, walkB's tail. Flipping
|
||||||
// between this and walkA is the wag.
|
// between this and walkA is the wag.
|
||||||
readonly property var wag: [
|
readonly property var wag: [
|
||||||
"....................KKKK..",
|
"....................KKKKK...",
|
||||||
"...................KKKKKK.",
|
"...................KKTKKKK..",
|
||||||
"...................KKTKKK.",
|
"...................KKNTTKKN.",
|
||||||
"...................KKWTTK.",
|
"KKKKKKKKKKKKKKKKKKRKKTTTTTN.",
|
||||||
"KKK................KKTTTN.",
|
"..KKKKKKKKKKKKKKKKRKKTTTT...",
|
||||||
"..KKKKKKKKKKKKKKKKRKKTTTN.",
|
"..KKKKKKKKKKKKKKKKRKKTT.....",
|
||||||
"..KKKKKKKKKKKKKKKKRKKTTT..",
|
"...KKKKKKKKKKKKKKTTT........",
|
||||||
"...KKKKKKKKKKKKKKKRKKT....",
|
"....TKKKKKKKKKKKTTT.........",
|
||||||
"...KKKKKKKKKKKKKTTK.......",
|
"....TTKKKKKKKKKTTT..........",
|
||||||
"....TKKKKKKKKKKKTT........",
|
"....TT..........TT..........",
|
||||||
"....TT.........TTT........",
|
"....TT..........TT..........",
|
||||||
"....TT..........TT........",
|
"...TTT.........TTT.........."
|
||||||
"...TTT..........TTT......."
|
|
||||||
]
|
]
|
||||||
// Head down in the bowl.
|
// Head down in the bowl.
|
||||||
readonly property var eat: [
|
readonly property var eat: [
|
||||||
"..........................",
|
"............................",
|
||||||
"..........................",
|
"............................",
|
||||||
"..........................",
|
"KK..........................",
|
||||||
"KK........................",
|
".KKKKKKKKKKKKKKKKKRKK.......",
|
||||||
".KK.......................",
|
"..KKKKKKKKKKKKKKKKRKKK......",
|
||||||
"..KKKKKKKKKKKKKKKKRK......",
|
"..KKKKKKKKKKKKKKKKRKKKK.....",
|
||||||
"..KKKKKKKKKKKKKKKKRKK.....",
|
"...KKKKKKKKKKKKKKTTKKKKK....",
|
||||||
"...KKKKKKKKKKKKKKKRKKKK...",
|
"....TKKKKKKKKKKKTTKKTKKK....",
|
||||||
"...KKKKKKKKKKKKKTTKKTKKK..",
|
"....TTKKKKKKKKKTTTKKNTTKN...",
|
||||||
"....TKKKKKKKKKKKTTKKWTTK..",
|
"....TT..........TT.KKTTTTN..",
|
||||||
"....TT.........TT..KKTTTN.",
|
"....TT..........TT..KTTN....",
|
||||||
"....TT.........TT...KTTN..",
|
"...TTT.........TTT.........."
|
||||||
"...TTT........TTT........."
|
|
||||||
]
|
]
|
||||||
readonly property var bowlArt: [
|
readonly property var bowlArt: [
|
||||||
"...BBB..",
|
"...BBB..",
|
||||||
|
|
@ -1235,7 +1234,8 @@ in
|
||||||
archie.width - Theme.frameWidth - cols * cell - 12)
|
archie.width - Theme.frameWidth - cols * cell - 12)
|
||||||
// Bowl parked over toward the right, clear of the launcher.
|
// Bowl parked over toward the right, clear of the launcher.
|
||||||
readonly property real bowlX: Math.max(roamL, roamR - 150)
|
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
|
readonly property real bowlStandX: bowlX - 18 * cell
|
||||||
|
|
||||||
property real px: roamL
|
property real px: roamL
|
||||||
|
|
@ -1251,7 +1251,12 @@ in
|
||||||
// Not if he is already standing at it — otherwise he can
|
// Not if he is already standing at it — otherwise he can
|
||||||
// roll "go to the bowl" while stood in it and eat twice
|
// roll "go to the bowl" while stood in it and eat twice
|
||||||
// over without moving.
|
// 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
|
// A short trip from wherever he is, not a random point on
|
||||||
// the whole screen: picking uniformly meant single walks
|
// the whole screen: picking uniformly meant single walks
|
||||||
// most of a minute long across a wide monitor, which reads
|
// most of a minute long across a wide monitor, which reads
|
||||||
|
|
@ -1301,12 +1306,11 @@ in
|
||||||
} else {
|
} else {
|
||||||
let dir = archie.targetX > archie.px ? 1 : -1;
|
let dir = archie.targetX > archie.px ? 1 : -1;
|
||||||
archie.facing = dir;
|
archie.facing = dir;
|
||||||
archie.px += dir * 1.8;
|
archie.px += dir * 1.6;
|
||||||
// Swap legs every 6 ticks: at 1.8px a tick
|
// Swap legs every 5 ticks: at 1.6px a tick
|
||||||
// that is ~11px of ground per half-stride,
|
// that is exactly the 8px his feet move in the
|
||||||
// against the 12px the feet actually move in
|
// art (2 cells), so he does not moonwalk.
|
||||||
// the art, so he does not moonwalk.
|
archie.frame = archie.tick % 10 < 5 ? archie.walkA : archie.walkB;
|
||||||
archie.frame = archie.tick % 12 < 6 ? archie.walkA : archie.walkB;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
archie.frame = archie.mode === "eat" ? archie.eat
|
archie.frame = archie.mode === "eat" ? archie.eat
|
||||||
|
|
@ -1352,7 +1356,10 @@ in
|
||||||
// Snap to the pixel grid, same as the worm, or the art
|
// Snap to the pixel grid, same as the worm, or the art
|
||||||
// shimmers as he walks.
|
// shimmers as he walks.
|
||||||
x: Math.round(archie.px / archie.cell) * archie.cell
|
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.
|
// Mirror him when he heads back the other way.
|
||||||
transform: Scale { origin.x: archie.cols * archie.cell / 2; xScale: archie.facing }
|
transform: Scale { origin.x: archie.cols * archie.cell / 2; xScale: archie.facing }
|
||||||
}
|
}
|
||||||
|
|
@ -1363,7 +1370,10 @@ in
|
||||||
w: 8
|
w: 8
|
||||||
h: 5
|
h: 5
|
||||||
x: Math.round(archie.bowlX / archie.cell) * archie.cell
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue