shithub: pokecrystal

Download patch

ref: f31da089bbd46f56d488b5657f08f8595490e51e
parent: 599e6e8d16571235f2054aa38f39e66181da3796
parent: 0be6e6c910ea4ab7909d878aa12c4c7989d5ca13
author: PikalaxALT <PikalaxALT@gmail.com>
date: Tue Mar 1 17:31:28 EST 2016

Merge branch 'master' of https://github.com/pret/pokecrystal

git/query: bad hash adbc204d741bec7a68c1e6cd67751f226d0347cb
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -7,8 +7,7 @@
 Python 2.7 is required.
 
 ```bash
-sudo apt-get install make gcc bison git python python-pip
-pip install pypng
+sudo apt-get install make gcc bison git python
 
 git clone https://github.com/bentley/rgbds
 cd rgbds
@@ -32,7 +31,6 @@
 
 ```bash
 xcode-select --install
-sudo easy_install pypng
 
 git clone https://github.com/bentley/rgbds
 cd rgbds
@@ -54,7 +52,7 @@
 
 To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings.
 
-In the installer, select the following packages: `make` `git` `python` `python-setuptools` `gcc-core` `libsasl2-3` `ca-certificates`
+In the installer, select the following packages: `make` `git` `python` `gettext`
 
 Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/).
 Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
@@ -62,8 +60,6 @@
 In the **Cygwin terminal**:
 
 ```bash
-lynx -source bootstrap.pypa.io/get-pip.py | python
-pip install pypng
 
 git clone --recursive https://github.com/pret/pokecrystal
 cd pokecrystal
@@ -74,3 +70,7 @@
 ```bash
 make
 ```
+
+## notes
+
+- If `gettext` no longer exists, grab `libsasl2-3` `ca-certificates`.
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
 PYTHON := python
 MD5 := md5sum -c --quiet
 
-.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .lz .pal .bin .blk .tilemap
-.PHONY: all clean crystal crystal11 pngs
+.SUFFIXES:
+.SUFFIXES: .2bpp
+.PHONY: all clean crystal crystal11
 .SECONDEXPANSION:
 
 poketools := extras/pokemontools
@@ -10,22 +11,6 @@
 includes  := $(PYTHON) $(poketools)/scan_includes.py
 
 
-crystal11_obj := \
-wram11.o \
-crystal11.o \
-lib/mobile/main.o \
-home.o \
-audio.o \
-maps_crystal.o \
-engine/events_crystal.o \
-engine/credits_crystal.o \
-data/egg_moves_crystal.o \
-data/evos_attacks_crystal.o \
-data/pokedex/entries_crystal.o \
-misc/crystal_misc.o \
-text/common_text.o \
-gfx/pics.o
-
 crystal_obj := \
 wram.o \
 main.o \
@@ -32,39 +17,39 @@
 lib/mobile/main.o \
 home.o \
 audio.o \
-maps_crystal.o \
-engine/events_crystal.o \
-engine/credits_crystal.o \
-data/egg_moves_crystal.o \
-data/evos_attacks_crystal.o \
-data/pokedex/entries_crystal.o \
+maps.o \
+engine/events.o \
+engine/credits.o \
+data/egg_moves.o \
+data/evos_attacks.o \
+data/pokedex/entries.o \
 misc/crystal_misc.o \
 text/common_text.o \
 gfx/pics.o
 
-all_obj := $(crystal_obj) crystal11.o wram11.o
+crystal11_obj := $(crystal_obj:.o=11.o)
 
-# object dependencies
-$(foreach obj, $(all_obj), \
-	$(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \
-)
 
-
 roms := pokecrystal.gbc
 
 all: $(roms)
 crystal: pokecrystal.gbc
-
 crystal11: pokecrystal11.gbc
 
 clean:
-	rm -f $(roms) $(all_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
+	rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
 
 compare: pokecrystal.gbc pokecrystal11.gbc
 	@$(MD5) roms.md5
 
 %.asm: ;
-$(all_obj): $$*.asm $$($$*_dep)
+
+%11.o: dep = $(shell $(includes) $(@D)/$*.asm)
+%11.o: %.asm $$(dep)
+	rgbasm -D CRYSTAL11 -o $@ $<
+
+%.o: dep = $(shell $(includes) $(@D)/$*.asm)
+%.o: %.asm $$(dep)
 	rgbasm -o $@ $<
 
 pokecrystal11.gbc: $(crystal11_obj)
@@ -76,12 +61,7 @@
 	rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
 
 
-pngs:
-	find . -iname "*.lz"      -exec $(gfx) unlz {} +
-	find . -iname "*.[12]bpp" -exec $(gfx) png  {} +
-	find . -iname "*.[12]bpp" -exec touch {} \;
-	find . -iname "*.lz"      -exec touch {} \;
-
+%.png: ;
 %.2bpp: %.png ; $(gfx) 2bpp $<
 %.1bpp: %.png ; $(gfx) 1bpp $<
 %.lz:   %     ; $(gfx) lz $<
--- a/crystal11.asm
+++ /dev/null
@@ -1,4 +1,0 @@
-CRYSTAL11 = 1
-CORRUPT_TILES = 1
-
-INCLUDE "main.asm"
--- a/data/egg_moves_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "data/egg_moves.asm"
--- a/data/evos_attacks_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "data/evos_attacks.asm"
--- a/engine/credits_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "engine/credits.asm"
--- a/engine/events_crystal.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "engine/events.asm"
--- a/event/poke_seer.asm
+++ b/event/poke_seer.asm
@@ -169,7 +169,7 @@
 	jr z, .unknown
 	cp 1 ; hatched from an egg
 	jr nz, .print
-	ld a, 5 ; egg hatch level
+	ld a, EGG_LEVEL ; egg hatch level
 
 .print
 	ld [wSeerCaughtLevel], a
--