Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pret/pokecrystal
Browse files Browse the repository at this point in the history
  • Loading branch information
fp555 committed Oct 19, 2024
2 parents 4596ee9 + 961fad9 commit 92648e2
Show file tree
Hide file tree
Showing 42 changed files with 832 additions and 12,539 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- name: Install rgbds
working-directory: rgbds
run: |
sudo apt-get install -yq libpng-dev
sudo make install
cd ..
rm -rf rgbds
Expand Down
49 changes: 42 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,49 @@ gfx/pokemon/girafarig/front.animated.tilemap: gfx/pokemon/girafarig/front.2bpp g
tools/pokemon_animation_graphics --girafarig -t $@ $^


### Misc file-specific graphics rules
### Pokemon and trainer sprite rules

gfx/pokemon/%/back.2bpp: rgbgfx += --columns
gfx/pokemon/%/back.2bpp: gfx/pokemon/%/back.png gfx/pokemon/%/normal.gbcpal
$(RGBGFX) $(rgbgfx) --colors gbc:$(word 2,$^) -o $@ $<
gfx/pokemon/%/front.2bpp: gfx/pokemon/%/front.png gfx/pokemon/%/normal.gbcpal
$(RGBGFX) $(rgbgfx) --colors gbc:$(word 2,$^) -o $@ $<
gfx/pokemon/%/normal.gbcpal: gfx/pokemon/%/front.gbcpal gfx/pokemon/%/back.gbcpal
tools/gbcpal $(tools/gbcpal) $@ $^

gfx/trainers/%.2bpp: rgbgfx += --columns
gfx/trainers/%.2bpp: gfx/trainers/%.png gfx/trainers/%.gbcpal
$(RGBGFX) $(rgbgfx) --colors gbc:$(word 2,$^) -o $@ $<

# Egg does not have a back sprite, so it only uses front.gbcpal
gfx/pokemon/egg/front.2bpp: gfx/pokemon/egg/front.png gfx/pokemon/egg/front.gbcpal
gfx/pokemon/egg/front.2bpp: rgbgfx += --colors gbc:$(word 2,$^)

# Unown letters share one normal.gbcpal
unown_pngs := $(wildcard gfx/pokemon/unown_*/front.png) $(wildcard gfx/pokemon/unown_*/back.png)
$(foreach png, $(unown_pngs),\
$(eval $(png:.png=.2bpp): $(png) gfx/pokemon/unown/normal.gbcpal))
gfx/pokemon/unown_%/back.2bpp: rgbgfx += --colors gbc:$(word 2,$^)
gfx/pokemon/unown_%/front.2bpp: rgbgfx += --colors gbc:$(word 2,$^)
gfx/pokemon/unown/normal.gbcpal: $(subst .png,.gbcpal,$(unown_pngs))
tools/gbcpal $(tools/gbcpal) $@ $^

gfx/pokemon/%/back.2bpp: rgbgfx += --columns --colors embedded
gfx/pokemon/%/front.2bpp: rgbgfx += --colors embedded

gfx/trainers/%.2bpp: rgbgfx += --columns --colors embedded
### Misc file-specific graphics rules

gfx/pokemon/egg/unused_front.2bpp: rgbgfx += --columns

gfx/pokemon/spearow/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/fearow/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/farfetch_d/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/hitmonlee/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/scyther/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/jynx/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/porygon/normal.gbcpal: tools/gbcpal += --reverse
gfx/pokemon/porygon2/normal.gbcpal: tools/gbcpal += --reverse

gfx/trainers/swimmer_m.gbcpal: tools/gbcpal += --reverse

gfx/new_game/shrink1.2bpp: rgbgfx += --columns
gfx/new_game/shrink2.2bpp: rgbgfx += --columns

Expand Down Expand Up @@ -305,15 +339,16 @@ gfx/mobile/stadium2_n64.2bpp: tools/gfx += --trim-whitespace
%.2bpp: %.png
$(RGBGFX) $(rgbgfx) -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -o $@ $@)
tools/gfx $(tools/gfx) -o $@ $@ || $$($(RM) $@ && false))

%.1bpp: %.png
$(RGBGFX) $(rgbgfx) --depth 1 -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) --depth 1 -o $@ $@)
tools/gfx $(tools/gfx) --depth 1 -o $@ $@ || $$($(RM) $@ && false))

%.gbcpal: %.png
$(RGBGFX) --colors embedded -p $@ $<
$(RGBGFX) -p $@ $<
tools/gbcpal $(tools/gbcpal) $@ $@ || $$($(RM) $@ && false)

%.dimensions: %.png
tools/png_dimensions $< $@
2 changes: 1 addition & 1 deletion constants/map_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ ENDM
map_const FUCHSIA_MART, 6, 4 ; 6
map_const SAFARI_ZONE_MAIN_OFFICE, 4, 4 ; 7
map_const FUCHSIA_GYM, 5, 9 ; 8
map_const BILLS_BROTHERS_HOUSE, 4, 4 ; 9
map_const BILLS_OLDER_SISTERS_HOUSE, 4, 4 ; 9
map_const FUCHSIA_POKECENTER_1F, 5, 4 ; 10
map_const FUCHSIA_POKECENTER_2F_BETA, 8, 4 ; 11
map_const SAFARI_ZONE_WARDENS_HOME, 5, 4 ; 12
Expand Down
Loading

0 comments on commit 92648e2

Please sign in to comment.