This commit is contained in:
NishiOwO
2025-12-05 07:44:35 +09:00
parent 2a268c56f1
commit 134b4b68ce
18 changed files with 128 additions and 17756 deletions

View File

@@ -14,16 +14,13 @@ echo '#endif' >> include/Mw/Resource/Icon.h
echo '' >> include/Mw/Resource/Icon.h
for i in resource/icon/*.png; do
LOWER=`echo $i | rev | cut -d"/" -f1 | rev | cut -d"." -f1`
if [ "$LOWER" = "unsure" ]; then
LOWER=question
fi
OUT=src/icon/$LOWER.c
NAME=`echo -n $LOWER | perl -e 'my $l = <>;$l =~ s/^(.)/uc($1)/e;print($l);'`
NAME=MwIcon$NAME
GEO=`convert $i json:- 2>/dev/null | jq -r '(.[0].image.geometry.width | tostring) + "x" + (.[0].image.geometry.height | tostring)'`
WIDTH=`echo $GEO | cut -dx -f1`
HEIGHT=`echo $GEO | cut -dx -f2`
echo '#include <Mw/Milsko.h>' >> $OUT
echo '#include <Mw/Milsko.h>' > $OUT
echo >> $OUT
echo "MwU32 $NAME[] = {" >> $OUT
echo " ($WIDTH << 16) | $HEIGHT," >> $OUT