|
| 1 | +# ***************************************************************************** |
| 2 | +# Graphics assets generation for SyndWarsFX. |
| 3 | +# ***************************************************************************** |
| 4 | +# @file sprites-fontb12-0.am |
| 5 | +# Automake rules neccessary to build `fontb12-0` mission font sprites. |
| 6 | +# Font b7 - norm_corpo dark blue. |
| 7 | +# Detail 1 - 10 px height. |
| 8 | +# @author Tomasz Lis |
| 9 | +# @par Copying and copyrights: |
| 10 | +# This program is free software; you can redistribute it and/or modify |
| 11 | +# it under the terms of the GNU General Public License as published by |
| 12 | +# the Free Software Foundation; either version 2 of the License, or |
| 13 | +# (at your option) any later version. |
| 14 | +# ***************************************************************************** |
| 15 | + |
| 16 | +fontb12_0_files = data/fontb12-0.dat data/fontb12-0.tab |
| 17 | + |
| 18 | +# List of font letters which can be colorized |
| 19 | +fontb12_0_chars = \ |
| 20 | + 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f \ |
| 21 | + 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f \ |
| 22 | + 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f \ |
| 23 | + 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f \ |
| 24 | + 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f \ |
| 25 | + 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007e \ |
| 26 | + 00a1 00aa 00b0 00bf 00c0 00c1 00c4 00c5 00c7 00c8 00c9 00cc 00cd \ |
| 27 | + 00d1 00d2 00d3 00d6 00d9 00da 00dc 00df \ |
| 28 | + 0104 0106 0118 0141 0143 015a 0179 017b 2018 2019 |
| 29 | +# List of non-letters or other sprites to pass without colorization |
| 30 | +fontb12_0_charnames_nomod = \ |
| 31 | + empty char_u0020 |
| 32 | +fontb12_0_sprites_gen = \ |
| 33 | + $(foreach num,$(fontb12_0_chars),font_norm_corpo-5-shd-dkblue/char_u$(num).png) |
| 34 | +fontb12_0_sprites_cp = \ |
| 35 | + $(foreach name,$(fontb12_0_charnames_nomod),$(top_srcdir)/font_norm_corpo-5-white/$(name).png) |
| 36 | + |
| 37 | +data/fontb12-0.tab: data/fontb12-0.dat |
| 38 | + |
| 39 | +data/fontb12-0.dat: font_norm_corpo-5-shd-dkblue/filelist-fontb12-0.txt $(top_srcdir)/data/engine-std.pal $(fontb12_0_sprites_gen) |
| 40 | + |
| 41 | +font_norm_corpo-5-shd-dkblue/filelist-fontb12-0.txt: $(top_srcdir)/font_norm_corpo-5-white/filelist-fontb11-0.txt |
| 42 | + $(MKDIR_P) "$(@D)" |
| 43 | + cp -p -t "$(@D)" $(fontb12_0_sprites_cp) |
| 44 | + cp -p "$<" "$@" |
| 45 | + |
| 46 | +# Use ImageMagick to generate blue sprites from previously made white shaded ones |
| 47 | +# 1. First use `level` to make lack and white sprite, |
| 48 | +# 2. `level` single channels to achieve front and shadow colors |
| 49 | +font_norm_corpo-5-shd-dkblue/%.png: font_norm_corpo-5-shd-white/%.png |
| 50 | + $(MKDIR_P) "$(@D)" |
| 51 | + $(MAGICK_CONVERT) "$<" -colorspace RGB \ |
| 52 | + -channel RGB -level 30%,90% \ |
| 53 | + -channel R +level 78%,17% \ |
| 54 | + -channel G +level 70%,10% \ |
| 55 | + -channel B +level 99%,31% \ |
| 56 | + +channel \ |
| 57 | + -colorspace RGB "png32:$@" |
0 commit comments