mirror of
https://github.com/smogon/sprites.git
synced 2026-07-12 22:21:34 -05:00
Add smogdex social builds
This commit is contained in:
parent
141750f376
commit
6da52b8764
|
|
@ -3,7 +3,9 @@ The Smogon/Pokemon-Showdown sprite repository
|
|||
|
||||
# Installation
|
||||
|
||||
You will need to install the Tup build system. Instructions for Windows/Mac/Linux can be found [here](http://gittup.org/tup/).
|
||||
- Tup build system. Instructions for Windows/Mac/Linux can be found [here](http://gittup.org/tup/).
|
||||
- GraphicsMagick
|
||||
- AdvPng
|
||||
|
||||
# Building
|
||||
|
||||
|
|
|
|||
25
Tupfile.lua
25
Tupfile.lua
|
|
@ -24,7 +24,26 @@ for file in iglob{"src/models/back-shiny/*", "src/models/back-shiny-cosmetic/*"}
|
|||
tup.rule(file, "ln -s ../../../%f %o", "build/ps/ani-back-shiny/" .. output)
|
||||
end
|
||||
|
||||
|
||||
function fbsprite(input, output)
|
||||
tup.foreach_rule(
|
||||
input,
|
||||
"^ fbsprite %f^ tools/fbsprite.sh %f %o",
|
||||
output
|
||||
)
|
||||
end
|
||||
|
||||
function twittersprite(input, output)
|
||||
tup.foreach_rule(
|
||||
input,
|
||||
"^ twittersprite %f^ tools/twittersprite.sh %f %o",
|
||||
output
|
||||
)
|
||||
end
|
||||
|
||||
for file in iglob{"src/models/front/*"} do
|
||||
local output = toSmogonAlias(decodeFS(tup.base(file))) .. "." .. tup.ext(file)
|
||||
tup.rule(file, "ln -s ../../../%f %o", "build/smogon/xy/" .. output)
|
||||
end
|
||||
local base = toSmogonAlias(decodeFS(tup.base(file)))
|
||||
tup.foreach_rule(file, "ln -s ../../../%f %o", "build/smogon/xy/" .. base .. ".%e")
|
||||
fbsprite(file, "build/smogon/fbsprites/xy/" .. base .. ".png")
|
||||
twittersprite(file, "build/smogon/twittersprites/xy/" .. base .. ".png")
|
||||
end
|
||||
|
|
|
|||
8
tools/fbsprite.sh
Executable file
8
tools/fbsprite.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Smogdex Facebook social images
|
||||
|
||||
set -e
|
||||
|
||||
gm convert $1'[0]' -trim -resize 150x150 -background white -gravity center -extent 198x198 -bordercolor black -border 1 $2
|
||||
advpng -z $2
|
||||
8
tools/twittersprite.sh
Executable file
8
tools/twittersprite.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Smogdex Twitter social images
|
||||
|
||||
set -e
|
||||
|
||||
gm convert $1'[0]' -trim -resize 115x115 -background white -gravity center -extent 120x120 $2
|
||||
advpng -z $2
|
||||
Loading…
Reference in New Issue
Block a user