-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathspritans.mk
49 lines (36 loc) · 1.12 KB
/
spritans.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# =============
# = PORTRAITS =
# =============
PORTRAIT_LIST := Spritans/PortraitList.txt
PORTRAIT_INSTALLER := Spritans/Portraits.event
# Make the portrait installer
$(PORTRAIT_INSTALLER): $(PORTRAIT_LIST) $(shell $(PORTRAIT_PROCESS) $(PORTRAIT_LIST) --list-files)
$(NOTIFY_PROCESS)
@$(PORTRAIT_PROCESS) $< --output $@
# Convert a png to portrait components
%_mug.dmp %_palette.dmp %_frames.dmp %_minimug.dmp: %.png
$(NOTIFY_PROCESS)
@$(PORTRAITFORMATTER) $<
# ==========================
# = GRAPHICS & COMPRESSION =
# ==========================
# PNG to 4bpp rule
%.4bpp: %.png
$(NOTIFY_PROCESS)
@$(PNG2DMP) $< -o $@
# PNG to gbapal rule
%.gbapal: %.png
$(NOTIFY_PROCESS)
@$(PNG2DMP) $< -po $@ --palette-only
# Anything to lz rule
%.lz: %
$(NOTIFY_PROCESS)
@$(COMPRESS) $< $@
ifeq ($(MAKECMDGOALS),clean)
# Portraits and generated files
PORTRAITS := $(wildcard Spritans/Portraits/*.png)
PORTRAIT_GENERATED := \
$(PORTRAITS:.png=_mug.dmp) $(PORTRAITS:.png=_palette.dmp) \
$(PORTRAITS:.png=_frames.dmp) $(PORTRAITS:.png=_minimug.dmp)
CLEAN_FILES += $(PORTRAIT_INSTALLER) $(PORTRAIT_GENERATED)
endif