diff --git a/assets-cg/fonts/touhou.png b/assets-cg/fonts/touhou.png new file mode 100644 index 0000000..b906406 Binary files /dev/null and b/assets-cg/fonts/touhou.png differ diff --git a/assets-cg/icon-cg-sel.png b/assets-cg/icon-cg-sel.png index 7137b50..d8f3628 100644 Binary files a/assets-cg/icon-cg-sel.png and b/assets-cg/icon-cg-sel.png differ diff --git a/assets-cg/icon-cg-uns.png b/assets-cg/icon-cg-uns.png index 3c99f62..0acd077 100644 Binary files a/assets-cg/icon-cg-uns.png and b/assets-cg/icon-cg-uns.png differ diff --git a/assets-cg/img/bullets/bullet1.png b/assets-cg/img/bullets/bullet1.png deleted file mode 100644 index c19c5e0..0000000 Binary files a/assets-cg/img/bullets/bullet1.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet1_1.png b/assets-cg/img/bullets/bullet1_1.png new file mode 100644 index 0000000..949bbf2 Binary files /dev/null and b/assets-cg/img/bullets/bullet1_1.png differ diff --git a/assets-cg/img/bullets/bullet1_2.png b/assets-cg/img/bullets/bullet1_2.png new file mode 100644 index 0000000..b579569 Binary files /dev/null and b/assets-cg/img/bullets/bullet1_2.png differ diff --git a/assets-cg/img/bullets/bullet1_3.png b/assets-cg/img/bullets/bullet1_3.png new file mode 100644 index 0000000..0ac1e63 Binary files /dev/null and b/assets-cg/img/bullets/bullet1_3.png differ diff --git a/assets-cg/img/bullets/bullet1_4.png b/assets-cg/img/bullets/bullet1_4.png new file mode 100644 index 0000000..87417ec Binary files /dev/null and b/assets-cg/img/bullets/bullet1_4.png differ diff --git a/assets-cg/img/bullets/bullet1_5.png b/assets-cg/img/bullets/bullet1_5.png new file mode 100644 index 0000000..d968501 Binary files /dev/null and b/assets-cg/img/bullets/bullet1_5.png differ diff --git a/assets-cg/img/bullets/bullet1_6.png b/assets-cg/img/bullets/bullet1_6.png new file mode 100644 index 0000000..c4572f4 Binary files /dev/null and b/assets-cg/img/bullets/bullet1_6.png differ diff --git a/assets-cg/img/bullets/bullet1_7.png b/assets-cg/img/bullets/bullet1_7.png new file mode 100644 index 0000000..d86c20e Binary files /dev/null and b/assets-cg/img/bullets/bullet1_7.png differ diff --git a/assets-cg/img/bullets/bullet1_8.png b/assets-cg/img/bullets/bullet1_8.png new file mode 100644 index 0000000..3578ef8 Binary files /dev/null and b/assets-cg/img/bullets/bullet1_8.png differ diff --git a/assets-cg/img/bullets/bullet2.png b/assets-cg/img/bullets/bullet2.png deleted file mode 100644 index 4e2ec47..0000000 Binary files a/assets-cg/img/bullets/bullet2.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet2_1.png b/assets-cg/img/bullets/bullet2_1.png new file mode 100644 index 0000000..dceb27f Binary files /dev/null and b/assets-cg/img/bullets/bullet2_1.png differ diff --git a/assets-cg/img/bullets/bullet2_2.png b/assets-cg/img/bullets/bullet2_2.png new file mode 100644 index 0000000..f86ff3f Binary files /dev/null and b/assets-cg/img/bullets/bullet2_2.png differ diff --git a/assets-cg/img/bullets/bullet2_3.png b/assets-cg/img/bullets/bullet2_3.png new file mode 100644 index 0000000..ef3e4e7 Binary files /dev/null and b/assets-cg/img/bullets/bullet2_3.png differ diff --git a/assets-cg/img/bullets/bullet2_4.png b/assets-cg/img/bullets/bullet2_4.png new file mode 100644 index 0000000..21ded95 Binary files /dev/null and b/assets-cg/img/bullets/bullet2_4.png differ diff --git a/assets-cg/img/bullets/bullet2_5.png b/assets-cg/img/bullets/bullet2_5.png new file mode 100644 index 0000000..f367781 Binary files /dev/null and b/assets-cg/img/bullets/bullet2_5.png differ diff --git a/assets-cg/img/bullets/bullet2_6.png b/assets-cg/img/bullets/bullet2_6.png new file mode 100644 index 0000000..e2e759f Binary files /dev/null and b/assets-cg/img/bullets/bullet2_6.png differ diff --git a/assets-cg/img/bullets/bullet2_7.png b/assets-cg/img/bullets/bullet2_7.png new file mode 100644 index 0000000..08ad018 Binary files /dev/null and b/assets-cg/img/bullets/bullet2_7.png differ diff --git a/assets-cg/img/bullets/bullet2_8.png b/assets-cg/img/bullets/bullet2_8.png new file mode 100644 index 0000000..4e2d2a6 Binary files /dev/null and b/assets-cg/img/bullets/bullet2_8.png differ diff --git a/assets-cg/img/bullets/bullet3.png b/assets-cg/img/bullets/bullet3.png deleted file mode 100644 index b5edfdf..0000000 Binary files a/assets-cg/img/bullets/bullet3.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet3_1.png b/assets-cg/img/bullets/bullet3_1.png new file mode 100644 index 0000000..8097930 Binary files /dev/null and b/assets-cg/img/bullets/bullet3_1.png differ diff --git a/assets-cg/img/bullets/bullet3_2.png b/assets-cg/img/bullets/bullet3_2.png new file mode 100644 index 0000000..b0d7d23 Binary files /dev/null and b/assets-cg/img/bullets/bullet3_2.png differ diff --git a/assets-cg/img/bullets/bullet3_3.png b/assets-cg/img/bullets/bullet3_3.png new file mode 100644 index 0000000..d406a07 Binary files /dev/null and b/assets-cg/img/bullets/bullet3_3.png differ diff --git a/assets-cg/img/bullets/bullet3_4.png b/assets-cg/img/bullets/bullet3_4.png new file mode 100644 index 0000000..bf217d5 Binary files /dev/null and b/assets-cg/img/bullets/bullet3_4.png differ diff --git a/assets-cg/img/bullets/bullet3_5.png b/assets-cg/img/bullets/bullet3_5.png new file mode 100644 index 0000000..883589d Binary files /dev/null and b/assets-cg/img/bullets/bullet3_5.png differ diff --git a/assets-cg/img/bullets/bullet3_6.png b/assets-cg/img/bullets/bullet3_6.png new file mode 100644 index 0000000..9fc055f Binary files /dev/null and b/assets-cg/img/bullets/bullet3_6.png differ diff --git a/assets-cg/img/bullets/bullet3_7.png b/assets-cg/img/bullets/bullet3_7.png new file mode 100644 index 0000000..2711e7b Binary files /dev/null and b/assets-cg/img/bullets/bullet3_7.png differ diff --git a/assets-cg/img/bullets/bullet3_8.png b/assets-cg/img/bullets/bullet3_8.png new file mode 100644 index 0000000..1edeaf8 Binary files /dev/null and b/assets-cg/img/bullets/bullet3_8.png differ diff --git a/assets-cg/img/bullets/bullet4.png b/assets-cg/img/bullets/bullet4.png deleted file mode 100644 index a1abd7a..0000000 Binary files a/assets-cg/img/bullets/bullet4.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet4_1.png b/assets-cg/img/bullets/bullet4_1.png new file mode 100644 index 0000000..4777a81 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_1.png differ diff --git a/assets-cg/img/bullets/bullet4_2.png b/assets-cg/img/bullets/bullet4_2.png new file mode 100644 index 0000000..1375d91 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_2.png differ diff --git a/assets-cg/img/bullets/bullet4_3.png b/assets-cg/img/bullets/bullet4_3.png new file mode 100644 index 0000000..dbe1302 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_3.png differ diff --git a/assets-cg/img/bullets/bullet4_4.png b/assets-cg/img/bullets/bullet4_4.png new file mode 100644 index 0000000..d81d141 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_4.png differ diff --git a/assets-cg/img/bullets/bullet4_5.png b/assets-cg/img/bullets/bullet4_5.png new file mode 100644 index 0000000..ca17e9e Binary files /dev/null and b/assets-cg/img/bullets/bullet4_5.png differ diff --git a/assets-cg/img/bullets/bullet4_6.png b/assets-cg/img/bullets/bullet4_6.png new file mode 100644 index 0000000..bd4d335 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_6.png differ diff --git a/assets-cg/img/bullets/bullet4_7.png b/assets-cg/img/bullets/bullet4_7.png new file mode 100644 index 0000000..0dd0f36 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_7.png differ diff --git a/assets-cg/img/bullets/bullet4_8.png b/assets-cg/img/bullets/bullet4_8.png new file mode 100644 index 0000000..feea167 Binary files /dev/null and b/assets-cg/img/bullets/bullet4_8.png differ diff --git a/assets-cg/img/bullets/bullet5.png b/assets-cg/img/bullets/bullet5.png deleted file mode 100644 index 92eb540..0000000 Binary files a/assets-cg/img/bullets/bullet5.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet5_1.png b/assets-cg/img/bullets/bullet5_1.png new file mode 100644 index 0000000..22d56be Binary files /dev/null and b/assets-cg/img/bullets/bullet5_1.png differ diff --git a/assets-cg/img/bullets/bullet5_2.png b/assets-cg/img/bullets/bullet5_2.png new file mode 100644 index 0000000..2b93a14 Binary files /dev/null and b/assets-cg/img/bullets/bullet5_2.png differ diff --git a/assets-cg/img/bullets/bullet5_3.png b/assets-cg/img/bullets/bullet5_3.png new file mode 100644 index 0000000..b38a16a Binary files /dev/null and b/assets-cg/img/bullets/bullet5_3.png differ diff --git a/assets-cg/img/bullets/bullet5_4.png b/assets-cg/img/bullets/bullet5_4.png new file mode 100644 index 0000000..0e69c54 Binary files /dev/null and b/assets-cg/img/bullets/bullet5_4.png differ diff --git a/assets-cg/img/bullets/bullet5_5.png b/assets-cg/img/bullets/bullet5_5.png new file mode 100644 index 0000000..ce0db73 Binary files /dev/null and b/assets-cg/img/bullets/bullet5_5.png differ diff --git a/assets-cg/img/bullets/bullet5_6.png b/assets-cg/img/bullets/bullet5_6.png new file mode 100644 index 0000000..3c872eb Binary files /dev/null and b/assets-cg/img/bullets/bullet5_6.png differ diff --git a/assets-cg/img/bullets/bullet5_7.png b/assets-cg/img/bullets/bullet5_7.png new file mode 100644 index 0000000..b61f5d4 Binary files /dev/null and b/assets-cg/img/bullets/bullet5_7.png differ diff --git a/assets-cg/img/bullets/bullet5_8.png b/assets-cg/img/bullets/bullet5_8.png new file mode 100644 index 0000000..d49dece Binary files /dev/null and b/assets-cg/img/bullets/bullet5_8.png differ diff --git a/assets-cg/img/bullets/bullet6.png b/assets-cg/img/bullets/bullet6.png deleted file mode 100644 index 2d3a4e0..0000000 Binary files a/assets-cg/img/bullets/bullet6.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet6_1.png b/assets-cg/img/bullets/bullet6_1.png new file mode 100644 index 0000000..0c129c0 Binary files /dev/null and b/assets-cg/img/bullets/bullet6_1.png differ diff --git a/assets-cg/img/bullets/bullet6_2.png b/assets-cg/img/bullets/bullet6_2.png new file mode 100644 index 0000000..499ad0b Binary files /dev/null and b/assets-cg/img/bullets/bullet6_2.png differ diff --git a/assets-cg/img/bullets/bullet6_3.png b/assets-cg/img/bullets/bullet6_3.png new file mode 100644 index 0000000..02dd4da Binary files /dev/null and b/assets-cg/img/bullets/bullet6_3.png differ diff --git a/assets-cg/img/bullets/bullet6_4.png b/assets-cg/img/bullets/bullet6_4.png new file mode 100644 index 0000000..9b6b27d Binary files /dev/null and b/assets-cg/img/bullets/bullet6_4.png differ diff --git a/assets-cg/img/bullets/bullet6_5.png b/assets-cg/img/bullets/bullet6_5.png new file mode 100644 index 0000000..fcfe9d8 Binary files /dev/null and b/assets-cg/img/bullets/bullet6_5.png differ diff --git a/assets-cg/img/bullets/bullet6_6.png b/assets-cg/img/bullets/bullet6_6.png new file mode 100644 index 0000000..e4c8635 Binary files /dev/null and b/assets-cg/img/bullets/bullet6_6.png differ diff --git a/assets-cg/img/bullets/bullet6_7.png b/assets-cg/img/bullets/bullet6_7.png new file mode 100644 index 0000000..cf63863 Binary files /dev/null and b/assets-cg/img/bullets/bullet6_7.png differ diff --git a/assets-cg/img/bullets/bullet6_8.png b/assets-cg/img/bullets/bullet6_8.png new file mode 100644 index 0000000..2554b99 Binary files /dev/null and b/assets-cg/img/bullets/bullet6_8.png differ diff --git a/assets-cg/img/bullets/bullet7.png b/assets-cg/img/bullets/bullet7.png deleted file mode 100644 index 01ea131..0000000 Binary files a/assets-cg/img/bullets/bullet7.png and /dev/null differ diff --git a/assets-cg/img/bullets/bullet8.png b/assets-cg/img/bullets/bullet8.png deleted file mode 100644 index d25485a..0000000 Binary files a/assets-cg/img/bullets/bullet8.png and /dev/null differ diff --git a/assets-cg/img/bullets/ray1_1.png b/assets-cg/img/bullets/ray1_1.png new file mode 100644 index 0000000..5113501 Binary files /dev/null and b/assets-cg/img/bullets/ray1_1.png differ diff --git a/assets-cg/img/bullets/ray1_2.png b/assets-cg/img/bullets/ray1_2.png new file mode 100644 index 0000000..e7bb907 Binary files /dev/null and b/assets-cg/img/bullets/ray1_2.png differ diff --git a/assets-cg/img/bullets/ray1_3.png b/assets-cg/img/bullets/ray1_3.png new file mode 100644 index 0000000..a1f1c0a Binary files /dev/null and b/assets-cg/img/bullets/ray1_3.png differ diff --git a/assets-cg/img/bullets/ray1_4.png b/assets-cg/img/bullets/ray1_4.png new file mode 100644 index 0000000..7421ce2 Binary files /dev/null and b/assets-cg/img/bullets/ray1_4.png differ diff --git a/assets-cg/img/bullets/ray1_5.png b/assets-cg/img/bullets/ray1_5.png new file mode 100644 index 0000000..4ee09de Binary files /dev/null and b/assets-cg/img/bullets/ray1_5.png differ diff --git a/assets-cg/img/bullets/ray1_6.png b/assets-cg/img/bullets/ray1_6.png new file mode 100644 index 0000000..9c9f9d2 Binary files /dev/null and b/assets-cg/img/bullets/ray1_6.png differ diff --git a/assets-cg/img/bullets/ray1_7.png b/assets-cg/img/bullets/ray1_7.png new file mode 100644 index 0000000..a9aa640 Binary files /dev/null and b/assets-cg/img/bullets/ray1_7.png differ diff --git a/assets-cg/img/bullets/ray1_8.png b/assets-cg/img/bullets/ray1_8.png new file mode 100644 index 0000000..ebc4436 Binary files /dev/null and b/assets-cg/img/bullets/ray1_8.png differ diff --git a/assets-cg/img/powerups/bpower.png b/assets-cg/img/powerups/bpower.png index ddd7b0c..e920dad 100644 Binary files a/assets-cg/img/powerups/bpower.png and b/assets-cg/img/powerups/bpower.png differ diff --git a/assets-cg/img/powerups/spoints.png b/assets-cg/img/powerups/spoints.png new file mode 100644 index 0000000..3c9ddd3 Binary files /dev/null and b/assets-cg/img/powerups/spoints.png differ diff --git a/assets-cg/img/powerups/spower.png b/assets-cg/img/powerups/spower.png index 5e68f6b..616ad59 100644 Binary files a/assets-cg/img/powerups/spower.png and b/assets-cg/img/powerups/spower.png differ diff --git a/assets-cg/img/witches/witch1.png b/assets-cg/img/witches/witch1.png deleted file mode 100644 index e160c67..0000000 Binary files a/assets-cg/img/witches/witch1.png and /dev/null differ diff --git a/assets-cg/img/witches/witch1_back.png b/assets-cg/img/witches/witch1_back.png new file mode 100644 index 0000000..e85cd33 Binary files /dev/null and b/assets-cg/img/witches/witch1_back.png differ diff --git a/assets-cg/img/witches/witch1_front.png b/assets-cg/img/witches/witch1_front.png new file mode 100644 index 0000000..3c202b1 Binary files /dev/null and b/assets-cg/img/witches/witch1_front.png differ diff --git a/assets-cg/img/witches/witch2.png b/assets-cg/img/witches/witch2.png deleted file mode 100644 index 7c27869..0000000 Binary files a/assets-cg/img/witches/witch2.png and /dev/null differ diff --git a/assets-cg/img/witches/witch2_back.png b/assets-cg/img/witches/witch2_back.png new file mode 100644 index 0000000..5e1b913 Binary files /dev/null and b/assets-cg/img/witches/witch2_back.png differ diff --git a/assets-cg/img/witches/witch2_front.png b/assets-cg/img/witches/witch2_front.png new file mode 100644 index 0000000..5a0f989 Binary files /dev/null and b/assets-cg/img/witches/witch2_front.png differ diff --git a/assets-cg/img/witches/witch3.png b/assets-cg/img/witches/witch3.png deleted file mode 100644 index a772c53..0000000 Binary files a/assets-cg/img/witches/witch3.png and /dev/null differ diff --git a/assets-cg/img/witches/witch3_back.png b/assets-cg/img/witches/witch3_back.png new file mode 100644 index 0000000..66c4da4 Binary files /dev/null and b/assets-cg/img/witches/witch3_back.png differ diff --git a/assets-cg/img/witches/witch3_front.png b/assets-cg/img/witches/witch3_front.png new file mode 100644 index 0000000..05c5e37 Binary files /dev/null and b/assets-cg/img/witches/witch3_front.png differ diff --git a/assets-cg/img/witches/witch4.png b/assets-cg/img/witches/witch4.png deleted file mode 100644 index 6086bd9..0000000 Binary files a/assets-cg/img/witches/witch4.png and /dev/null differ diff --git a/assets-cg/img/witches/witch4_back.png b/assets-cg/img/witches/witch4_back.png new file mode 100644 index 0000000..de47136 Binary files /dev/null and b/assets-cg/img/witches/witch4_back.png differ diff --git a/assets-cg/img/witches/witch4_front.png b/assets-cg/img/witches/witch4_front.png new file mode 100644 index 0000000..6361a00 Binary files /dev/null and b/assets-cg/img/witches/witch4_front.png differ diff --git a/assets-cg/img/witches/witch5.png b/assets-cg/img/witches/witch5.png deleted file mode 100644 index 35d63f9..0000000 Binary files a/assets-cg/img/witches/witch5.png and /dev/null differ diff --git a/assets-cg/img/witches/witch5_back.png b/assets-cg/img/witches/witch5_back.png new file mode 100644 index 0000000..0adce84 Binary files /dev/null and b/assets-cg/img/witches/witch5_back.png differ diff --git a/assets-cg/img/witches/witch5_front.png b/assets-cg/img/witches/witch5_front.png new file mode 100644 index 0000000..6a6f3cf Binary files /dev/null and b/assets-cg/img/witches/witch5_front.png differ diff --git a/assets-cg/img/witches/witch6.png b/assets-cg/img/witches/witch6.png deleted file mode 100644 index 0ef2b12..0000000 Binary files a/assets-cg/img/witches/witch6.png and /dev/null differ diff --git a/assets-cg/img/witches/witch6_back.png b/assets-cg/img/witches/witch6_back.png new file mode 100644 index 0000000..6f999f2 Binary files /dev/null and b/assets-cg/img/witches/witch6_back.png differ diff --git a/assets-cg/img/witches/witch6_front.png b/assets-cg/img/witches/witch6_front.png new file mode 100644 index 0000000..9cf2525 Binary files /dev/null and b/assets-cg/img/witches/witch6_front.png differ diff --git a/assets-cg/img/witches/witch7.png b/assets-cg/img/witches/witch7.png deleted file mode 100644 index fcda46e..0000000 Binary files a/assets-cg/img/witches/witch7.png and /dev/null differ diff --git a/assets-cg/img/witches/witch7_back.png b/assets-cg/img/witches/witch7_back.png new file mode 100644 index 0000000..6676b98 Binary files /dev/null and b/assets-cg/img/witches/witch7_back.png differ diff --git a/assets-cg/img/witches/witch7_front.png b/assets-cg/img/witches/witch7_front.png new file mode 100644 index 0000000..0728bd8 Binary files /dev/null and b/assets-cg/img/witches/witch7_front.png differ diff --git a/assets-cg/img/witches/witch8.png b/assets-cg/img/witches/witch8.png deleted file mode 100644 index 88333b9..0000000 Binary files a/assets-cg/img/witches/witch8.png and /dev/null differ diff --git a/assets-cg/img/witches/witch8_back.png b/assets-cg/img/witches/witch8_back.png new file mode 100644 index 0000000..d038645 Binary files /dev/null and b/assets-cg/img/witches/witch8_back.png differ diff --git a/assets-cg/img/witches/witch8_front.png b/assets-cg/img/witches/witch8_front.png new file mode 100644 index 0000000..9f93ace Binary files /dev/null and b/assets-cg/img/witches/witch8_front.png differ diff --git a/assets.py b/assets.py new file mode 100644 index 0000000..e4f52d8 --- /dev/null +++ b/assets.py @@ -0,0 +1,52 @@ +# Tool used to generate assets like bullets + +from sys import argv +from os import listdir, remove +from os.path import isfile, join +from PIL import Image +import numpy as np +import colorsys + +############################################################################### +# Snippet from https://stackoverflow.com/questions/7274221/changing-image-hue-with-python-pil +def shift_hue(arr, hout): + rgb_to_hsv = np.vectorize(colorsys.rgb_to_hsv) + hsv_to_rgb = np.vectorize(colorsys.hsv_to_rgb) + r, g, b, a = np.rollaxis(arr, axis=-1) + h, s, v = rgb_to_hsv(r, g, b) + h = hout + r, g, b = hsv_to_rgb(h, s, v) + arr = np.dstack((r, g, b, a)) + return arr + +def colorize(image, hue): + """ + Colorize PIL image `original` with the given + `hue` (hue within 0-360); returns another PIL image. + """ + img = image.convert('RGBA') + arr = np.array(np.asarray(img).astype('float')) + new_img = Image.fromarray(shift_hue(arr, hue/360.).astype('uint8'), 'RGBA') + + return new_img +############################################################################### + +# Make images +if "make" in argv: + dir = "./assets-cg/img/bullets/" + sprites = [join(dir, f) for f in listdir(dir) if isfile(join(dir, f))] + colors = 8 + + for f in sprites: + img = Image.open(f) + for i in range(colors): + img2 = colorize(img, 360 * i / colors) + img2.save(f[:-4] + f'_{i+1}.png', 'PNG') + +# Clean images +if "clean" in argv: + dir = "./assets-cg/img/bullets/" + sprites = [join(dir, f) for f in listdir(dir) if f[-8:] == "-tmp.png"] + for s in sprites: + print(s) + remove(s)