summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
-rw-r--r--crystal11.asm4
-rw-r--r--data/battle_tower.asm5
-rw-r--r--engine/pokedex.asm12
-rw-r--r--gfx/unknown/1733af_corrupt.tilemap15
-rw-r--r--main.asm16
-rw-r--r--misc/mobile_45.asm8
-rw-r--r--misc/stadium2_1.bin (renamed from misc/stadium2.bin)bin544 -> 544 bytes
-rw-r--r--misc/stadium2_2.binbin0 -> 544 bytes
-rw-r--r--wram.asm9
-rw-r--r--wram11.asm3
11 files changed, 82 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index d65dfb866..5fb3c97d1 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,21 @@ gfx := $(PYTHON) $(poketools)/gfx.py
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 \
+gfx/pics.o
+
crystal_obj := \
wram.o \
main.o \
@@ -25,7 +40,7 @@ data/pokedex/entries_crystal.o \
misc/crystal_misc.o \
gfx/pics.o
-all_obj := $(crystal_obj)
+all_obj := $(crystal_obj) crystal11.o wram11.o
# object dependencies
$(foreach obj, $(all_obj), \
@@ -53,6 +68,11 @@ $(all_obj): $$*.asm $$($$*_dep)
@$(gfx) lz $(lzq); $(eval lzq :=)
rgbasm -o $@ $<
+pokecrystal11.gbc: $(crystal11_obj)
+ rgblink -n $*.sym -m $*.map -o $@ $^
+ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
+ cmp crystal11.gbc $@
+
pokecrystal.gbc: $(crystal_obj)
rgblink -n $*.sym -m $*.map -o $@ $^
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
diff --git a/crystal11.asm b/crystal11.asm
new file mode 100644
index 000000000..c4c7712e8
--- /dev/null
+++ b/crystal11.asm
@@ -0,0 +1,4 @@
+CRYSTAL11 = 1
+CORRUPT_TILES = 1
+
+INCLUDE "main.asm"
diff --git a/data/battle_tower.asm b/data/battle_tower.asm
index efbc2f64f..778051b83 100644
--- a/data/battle_tower.asm
+++ b/data/battle_tower.asm
@@ -19,8 +19,13 @@ Function1f8000: ; 1f8000
ld a, [hRandomAdd]
add b
ld b, a
+IF DEF(CRYSTAL11)
+ and $7f
+ cp $46
+ELSE
and $1f
cp $15
+ENDC
jr nc, .asm_1f8022
ld b, a
ld a, $1
diff --git a/engine/pokedex.asm b/engine/pokedex.asm
index 004836f62..dcbc1832e 100644
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -66,7 +66,11 @@ InitPokedex: ; 40063
call Function414b7
ld hl, wc6d0
+IF DEF(CRYSTAL11)
+ ld bc, $0116
+ELSE
ld bc, $0115
+ENDC
xor a
call ByteFill
@@ -314,7 +318,7 @@ Function401ae: ; 401ae (10:41ae)
Function40217: ; 40217 (10:4217)
call LowVolume
xor a
- ld [wcf65], a
+ ld [wPokedexStatus], a
xor a
ld [hBGMapMode], a ; $ff00+$d4
call ClearSprites
@@ -373,9 +377,9 @@ Function40258: ; 40258 (10:4258)
; 40292 (10:4292)
Function40292: ; 40292
- ld a, [wcf65]
+ ld a, [wPokedexStatus]
xor $1
- ld [wcf65], a
+ ld [wPokedexStatus], a
call Function40bb1
ld [wc2d6], a
callba Function4424d
@@ -386,7 +390,7 @@ Function40292: ; 40292
Function402aa: ; 402aa (10:42aa)
call Function41401
xor a
- ld [wcf65], a
+ ld [wPokedexStatus], a
xor a
ld [hBGMapMode], a ; $ff00+$d4
call Function407fd
diff --git a/gfx/unknown/1733af_corrupt.tilemap b/gfx/unknown/1733af_corrupt.tilemap
new file mode 100644
index 000000000..c323afa09
--- /dev/null
+++ b/gfx/unknown/1733af_corrupt.tilemap
@@ -0,0 +1,15 @@
+
+121 ,-,./0
+
+<=<7879:;$ GHG!"#ABCDEF$%$0
+
+121 ,-,./0
+;<=<7879:;F$%$ GHG!"#ABCDEF$,./0
+
+ ,-,.79:;
+
+ 7879CDEF$%$!"#ABCD ,-,./0&'()*+121 ,7879:;345643<=<7#ABCDEF>?@@?>GHG!"#A1 ,-,./0
+
+121<7879:;<=<G!"#ABCDEF$%$ GHG!121 ,-,./0
+
+1<=<7879:;< GHG!"#ABCDEF$%$ G \ No newline at end of file
diff --git a/main.asm b/main.asm
index cf4b7fbc0..43834a825 100644
--- a/main.asm
+++ b/main.asm
@@ -38165,7 +38165,7 @@ Function4424d: ; 4424d
push af
call FarString
pop bc
- ld a, [wcf65]
+ ld a, [wPokedexStatus]
or a
ret z
push bc
@@ -89618,21 +89618,21 @@ Functionfb877: ; fb877
call ClearTileMap
call Function1ad2
call ClearSprites
- ld a, [wcf65]
+ ld a, [wPokedexStatus]
push af
ld a, [hSCX]
add $5
ld [hSCX], a
xor a
- ld [wcf65], a
+ ld [wPokedexStatus], a
callba Function41a7f
call Functiona80
ld a, $1
- ld [wcf65], a
+ ld [wPokedexStatus], a
callba Function4424d
call Functiona80
pop af
- ld [wcf65], a
+ ld [wPokedexStatus], a
call MaxVolume
call Function4b6
ld a, [hSCX]
@@ -96474,5 +96474,9 @@ SECTION "bank7F", ROMX, BANK[$7F]
SECTION "stadium2", ROMX[$8000-$220], BANK[$7F]
-INCBIN "misc/stadium2.bin"
+IF DEF(CRYSTAL11)
+INCBIN "misc/stadium2_2.bin"
+ELSE
+INCBIN "misc/stadium2_1.bin"
+ENDC
diff --git a/misc/mobile_45.asm b/misc/mobile_45.asm
index ed301ae6b..8cecaf721 100644
--- a/misc/mobile_45.asm
+++ b/misc/mobile_45.asm
@@ -16333,7 +16333,11 @@ Function11c000:: ; 11c000
push af
ld a, $3
ld [rSVBK], a
+IF DEF(CRYSTAL11)
+ ld hl, wd10a
+ELSE
ld hl, wd105
+ENDC
ld a, [hl]
dec a
ld e, a
@@ -24067,7 +24071,11 @@ GFX_172f1f:
INCBIN "gfx/unknown/172f1f.2bpp"
Tilemap_1733af:
+IF DEF(CORRUPT_TILES)
+INCBIN "gfx/unknown/1733af_corrupt.tilemap"
+ELSE
INCBIN "gfx/unknown/1733af.tilemap"
+ENDC
Attrmap_173517:
INCBIN "gfx/unknown/173517.attrmap"
diff --git a/misc/stadium2.bin b/misc/stadium2_1.bin
index 155e8bab8..155e8bab8 100644
--- a/misc/stadium2.bin
+++ b/misc/stadium2_1.bin
Binary files differ
diff --git a/misc/stadium2_2.bin b/misc/stadium2_2.bin
new file mode 100644
index 000000000..2273d94f3
--- /dev/null
+++ b/misc/stadium2_2.bin
Binary files differ
diff --git a/wram.asm b/wram.asm
index 609702da3..41ce02cd4 100644
--- a/wram.asm
+++ b/wram.asm
@@ -872,7 +872,11 @@ wc7e0:: ds 1
wc7e1:: ds 1
wc7e2:: ds 1
wc7e3:: ds 1
-wc7e4:: ds 4
+wc7e4:: ds 1
+IF DEF(CRYSTAL11)
+wPokedexStatus::
+ENDC
+ ds 3
wc7e8:: ds 24
@@ -1165,6 +1169,9 @@ CurSpecies:: ; cf60
wcf61:: ds 2
wcf63:: ds 1
wcf64:: ds 1
+IF !DEF(CRYSTAL11)
+wPokedexStatus::
+ENDC
wcf65:: ds 1
wcf66:: ds 1
diff --git a/wram11.asm b/wram11.asm
new file mode 100644
index 000000000..4d3303fd0
--- /dev/null
+++ b/wram11.asm
@@ -0,0 +1,3 @@
+CRYSTAL11 = 1
+
+INCLUDE "wram.asm"