shithub: pokecrystal

Download patch

ref: 5ddea59ec5637f51637af321bd41c855493f21b5
parent: f091bb8f032b61f035e0b0ef6cace19adc7d7107
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Sun Jan 21 15:10:38 EST 2018

wGBCOnlyDecompressBuffer

--- a/engine/gbc_only.asm
+++ b/engine/gbc_only.asm
@@ -10,7 +10,7 @@
 	call ClearTileMap
 
 	ld hl, GBCOnlyGFX
-	ld de, wDecompressBuffer
+	ld de, wGBCOnlyDecompressBuffer
 	ld a, [rSVBK]
 	push af
 	ld a, 0 ; this has the same effect as selecting bank 1
@@ -19,9 +19,9 @@
 	pop af
 	ld [rSVBK], a
 
-	ld de, wDecompressBuffer
+	ld de, wGBCOnlyDecompressBuffer
 	ld hl, vTiles2
-	lb bc, BANK(GBCOnlyGFX), $54
+	lb bc, BANK(GBCOnlyGFX), 84
 	call Get2bpp
 
 	ld de, Font
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -265,25 +265,25 @@
 Function170cc6: ; 170cc6
 	ld a, [rSVBK]
 	push af
-	ld a, $6
+	ld a, BANK(wDecompressScratch)
 	ld [rSVBK], a
-	ld hl, LZ_170d16
+	ld hl, PichuAnimatedMobileGFX
 	ld de, wDecompressScratch
 	call Decompress
-	ld a, $1
+	ld a, 1
 	ld [rVBK], a
-	ld de, wDecompressBuffer
+	ld de, wDecompressScratch
 	ld hl, vTiles0
-	lb bc, $6, $c1
+	lb bc, BANK(wDecompressScratch), 193
 	call Get2bpp
 	xor a
 	ld [rVBK], a
-	ld hl, LZ_1715a4
-	ld de, wDecompressBuffer
+	ld hl, ElectroBallMobileGFX
+	ld de, wDecompressScratch
 	call Decompress
 	ld de, wBGPals1
 	ld hl, vTiles0
-	lb bc, $6, $53
+	lb bc, BANK(wDecompressScratch), 83
 	call Get2bpp
 	pop af
 	ld [rSVBK], a
@@ -304,10 +304,10 @@
 
 ; 170d16
 
-LZ_170d16:
+PichuAnimatedMobileGFX:
 INCBIN "gfx/mobile/pichu_animated.2bpp.lz"
 
-LZ_1715a4:
+ElectroBallMobileGFX:
 INCBIN "gfx/mobile/electro_ball.2bpp.lz"
 
 GFX_171848:
--- a/wram.asm
+++ b/wram.asm
@@ -1566,7 +1566,7 @@
 
 SECTION "WRAM 1", WRAMX
 
-wDecompressBuffer:: ds 1
+wGBCOnlyDecompressBuffer:: ds 1
 
 DefaultSpawnpoint:: db