]> Pileus Git - ~andy/spades/commitdiff
Add rules for card images
authorAndy Spencer <andy753421@gmail.com>
Mon, 15 Apr 2013 05:55:20 +0000 (05:55 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 20 Apr 2013 21:11:38 +0000 (21:11 +0000)
For now, the cards are left in branches so we can change them easily
without cluttering up the history.

.gitignore
makefile

index 756a5024d92c10474d10b4be0cc4275ac47611e5..a9c24c6288b2ca33440feac770a4f9de2aba7455 100644 (file)
@@ -6,3 +6,7 @@
 bin/
 gen/
 obj/
+
+# Leave out cards for now
+res/drawable/card_*.png
+opt/drawable/card_*.svg
index 877113032df4f55f2944dae48e9bf7b24bff10fc..e0a1d30d862e552b2c8b5b0a0b1b52925365132a 100644 (file)
--- a/makefile
+++ b/makefile
@@ -28,7 +28,6 @@ logcat:
 
 run: bin/install.stamp
        adb shell am start -W -a android.intent.action.MAIN -n $(PACKAGE)/.Main
-       
 
 install bin/install.stamp: $(OUTPUT)
        adb install -r $+
@@ -38,6 +37,24 @@ uninstall:
        adb uninstall $(PACKAGE)
        rm bin/install.stamp
 
+png-cards:
+       git checkout cards-png -- 'res/drawable/card_*.png'
+       git reset    HEAD      -- 'res/drawable/card_*.png'
+
+svg-cards:
+       git checkout cards-svg -- 'opt/drawable/card_*.svg'
+       git reset    HEAD      -- 'opt/drawable/card_*.svg'
+
+convert:
+       for svg in opt/drawable/*.svg; do        \
+               png=$${svg/svg/png};             \
+               png=$${png/opt/res};             \
+               rsvg-convert -w 2048 -h 2048     \
+                       $$svg -o $$png;          \
+               convert -trim -resize '256x256!' \
+                       $$png $$png;             \
+       done
+
 # Rules
 %.apk: %.dex %.res | bin
        @echo "APK    $@.in"