mirror of
https://github.com/smogon/sprites.git
synced 2026-08-20 00:34:22 -05:00
trim smogdex minisprites
This commit is contained in:
20
Tupfile.lua
20
Tupfile.lua
@@ -21,6 +21,26 @@ foreach_rule(
|
||||
"build/item-minisprites-padded/%b"
|
||||
)
|
||||
|
||||
foreach_rule(
|
||||
"newsrc/minisprites/pokemon/gen6/*.png",
|
||||
{
|
||||
display="trim g6 minisprite %f",
|
||||
trimimg{},
|
||||
compresspng{config="MINISPRITE"}
|
||||
},
|
||||
"build/gen6-minisprites-trimmed/%b"
|
||||
)
|
||||
|
||||
foreach_rule(
|
||||
"newsrc/minisprites/items/*.png",
|
||||
{
|
||||
display="trim item minisprite %f",
|
||||
trimimg{},
|
||||
compresspng{config="MINISPRITE"}
|
||||
},
|
||||
"build/item-minisprites-trimmed/%b"
|
||||
)
|
||||
|
||||
-- PS spritesheet
|
||||
|
||||
rule(
|
||||
|
||||
@@ -16,6 +16,14 @@ function pad(opts)
|
||||
}
|
||||
end
|
||||
|
||||
function trimimg(opts) -- Can't just be trim because of the string function...
|
||||
return rep{
|
||||
"convert ${input} -trim ${output}",
|
||||
input = opts.input or "%f",
|
||||
output = opts.output or "%o",
|
||||
}
|
||||
end
|
||||
|
||||
local DEFAULT_OPTIPNG = getconfig("DEFAULT_OPTIPNG")
|
||||
local DEFAULT_ADVPNG = getconfig("DEFAULT_ADVPNG")
|
||||
local DEFLOPT_PATH = getconfig("DEFLOPT_PATH")
|
||||
|
||||
@@ -42,11 +42,11 @@ function itemspritecopy(f, {dir, ext}) {
|
||||
copy(f, {dir, ext, name});
|
||||
}
|
||||
|
||||
for (const f of list("newsrc/minisprites/pokemon/gen6")) {
|
||||
for (const f of list("build/gen6-minisprites-trimmed")) {
|
||||
spritecopy(f, {dir: "xyicons"});
|
||||
}
|
||||
|
||||
for (const f of list("newsrc/minisprites/items")) {
|
||||
for (const f of list("build/item-minisprites-trimmed")) {
|
||||
itemspritecopy(f, {dir: "xyitems"});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user