mirror of
https://github.com/smogon/sprites.git
synced 2026-08-25 11:17:41 -05:00
Build for caps
This commit is contained in:
13
Tupfile.lua
13
Tupfile.lua
@@ -55,6 +55,19 @@ foreach_rule(
|
||||
"build/gen9-modelslike/%B.gif"
|
||||
)
|
||||
|
||||
-- Gen 5 CAPs...
|
||||
|
||||
foreach_rule(
|
||||
"src/sprites/gen5/*.png",
|
||||
{
|
||||
-- TODO, add customizable compression for gif
|
||||
-- ... or investigate using webp instead of both png/gif here
|
||||
"magick convert %f %o",
|
||||
"gifsicle -O3 -b %o"
|
||||
},
|
||||
"build/gen5-gif/%B.gif"
|
||||
)
|
||||
|
||||
-- PS spritesheet
|
||||
|
||||
rule(
|
||||
|
||||
@@ -66,7 +66,10 @@ function newspritecopy(f, {dir, ext}) {
|
||||
}
|
||||
}
|
||||
|
||||
let seenModels = new Set;
|
||||
|
||||
for (const f of list("src/models")) {
|
||||
seenModels.add(f.name);
|
||||
spritecopy(f, {dir: "xy"});
|
||||
}
|
||||
|
||||
@@ -74,6 +77,16 @@ for (const f of list("build/gen9-modelslike")) {
|
||||
spritecopy(f, {dir: "xy"});
|
||||
}
|
||||
|
||||
// Non-model CAPs
|
||||
for (const f of list("src/sprites/gen5")) {
|
||||
if (f.ext !== 'gif' || seenModels.has(f.name)) continue;
|
||||
spritecopy(f, {dir: "xy"});
|
||||
}
|
||||
|
||||
for (const f of list("build/gen5-gif")) {
|
||||
spritecopy(f, {dir: "xy"});
|
||||
}
|
||||
|
||||
for (const f of list("build/gen6-minisprites-trimmed")) {
|
||||
spritecopy(f, {dir: "xyicons"});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user