shithub: pokered

Download patch

ref: 884ef9c1a869431e4ffd2468e2eb639b164d3b9b
parent: 6f7337bbb1a65e95ad59d3a738c47faf1e96027a
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Thu Jul 16 18:23:03 EDT 2020

Factor out animation tilemaps

--- /dev/null
+++ b/data/tilemaps.asm
@@ -1,0 +1,72 @@
+tile_ids: MACRO
+	dw \1
+	dn \3, \2
+ENDM
+
+TileIDListPointerTable:
+	; tilemap pointer, width, height
+	tile_ids Unknown_79b24,      7,  7
+	tile_ids Unknown_79b55,      7,  5
+	tile_ids Unknown_79b78,      7,  3
+	tile_ids GengarIntroTiles1,  7,  7
+	tile_ids GengarIntroTiles2,  7,  7
+	tile_ids GengarIntroTiles3,  7,  7
+	tile_ids Unknown_79c20,      6,  8
+	tile_ids Unknown_79c50,     12,  3
+
+DownscaledMonTiles_5x5:
+	db $31,$38,$46,$54,$5B
+	db $32,$39,$47,$55,$5C
+	db $34,$3B,$49,$57,$5E
+	db $36,$3D,$4B,$59,$60
+	db $37,$3E,$4C,$5A,$61
+
+DownscaledMonTiles_3x3:
+	db $31,$46,$5B
+	db $34,$49,$5E
+	db $37,$4C,$61
+
+Unknown_79b24:
+	db $00,$07,$0E,$15,$1C,$23,$2A
+	db $01,$08,$0F,$16,$1D,$24,$2B
+	db $02,$09,$10,$17,$1E,$25,$2C
+	db $03,$0A,$11,$18,$1F,$26,$2D
+	db $04,$0B,$12,$19,$20,$27,$2E
+	db $05,$0C,$13,$1A,$21,$28,$2F
+	db $06,$0D,$14,$1B,$22,$29,$30
+
+Unknown_79b55:
+	db $00,$07,$0E,$15,$1C,$23,$2A
+	db $01,$08,$0F,$16,$1D,$24,$2B
+	db $03,$0A,$11,$18,$1F,$26,$2D
+	db $04,$0B,$12,$19,$20,$27,$2E
+	db $05,$0C,$13,$1A,$21,$28,$2F
+
+Unknown_79b78:
+	db $00,$07,$0E,$15,$1C,$23,$2A
+	db $02,$09,$10,$17,$1E,$25,$2C
+	db $04,$0B,$12,$19,$20,$27,$2E
+
+GengarIntroTiles1:
+	INCBIN "gfx/intro_credits/gengar_1.tilemap"
+
+GengarIntroTiles2:
+	INCBIN "gfx/intro_credits/gengar_2.tilemap"
+
+GengarIntroTiles3:
+	INCBIN "gfx/intro_credits/gengar_3.tilemap"
+
+Unknown_79c20:
+	db $31,$32,$32,$32,$32,$33
+	db $34,$35,$36,$36,$37,$38
+	db $34,$39,$3A,$3A,$3B,$38
+	db $3C,$3D,$3E,$3E,$3F,$40
+	db $41,$42,$43,$43,$44,$45
+	db $46,$47,$43,$48,$49,$4A
+	db $41,$43,$4B,$4C,$4D,$4E
+	db $4F,$50,$50,$50,$51,$52
+
+Unknown_79c50:
+	db $43,$55,$56,$53,$53,$53,$53,$53,$53,$53,$53,$53
+	db $43,$57,$58,$54,$54,$54,$54,$54,$54,$54,$54,$54
+	db $43,$59,$5A,$43,$43,$43,$43,$43,$43,$43,$43,$43
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -2265,98 +2265,7 @@
 	pop hl
 	ret
 
-TileIDListPointerTable:
-	dw Unknown_79b24
-	dn 7, 7
-	dw Unknown_79b55
-	dn 5, 7
-	dw Unknown_79b78
-	dn 3, 7
-	dw GengarIntroTiles1
-	dn 7, 7
-	dw GengarIntroTiles2
-	dn 7, 7
-	dw GengarIntroTiles3
-	dn 7, 7
-	dw Unknown_79c20
-	dn 8, 6
-	dw Unknown_79c50
-	dn 3, 12
-
-DownscaledMonTiles_5x5:
-	db $31,$38,$46,$54,$5B
-	db $32,$39,$47,$55,$5C
-	db $34,$3B,$49,$57,$5E
-	db $36,$3D,$4B,$59,$60
-	db $37,$3E,$4C,$5A,$61
-
-DownscaledMonTiles_3x3:
-	db $31,$46,$5B
-	db $34,$49,$5E
-	db $37,$4C,$61
-
-Unknown_79b24:
-	db $00,$07,$0E,$15,$1C,$23,$2A
-	db $01,$08,$0F,$16,$1D,$24,$2B
-	db $02,$09,$10,$17,$1E,$25,$2C
-	db $03,$0A,$11,$18,$1F,$26,$2D
-	db $04,$0B,$12,$19,$20,$27,$2E
-	db $05,$0C,$13,$1A,$21,$28,$2F
-	db $06,$0D,$14,$1B,$22,$29,$30
-
-Unknown_79b55:
-	db $00,$07,$0E,$15,$1C,$23,$2A
-	db $01,$08,$0F,$16,$1D,$24,$2B
-	db $03,$0A,$11,$18,$1F,$26,$2D
-	db $04,$0B,$12,$19,$20,$27,$2E
-	db $05,$0C,$13,$1A,$21,$28,$2F
-
-Unknown_79b78:
-	db $00,$07,$0E,$15,$1C,$23,$2A
-	db $02,$09,$10,$17,$1E,$25,$2C
-	db $04,$0B,$12,$19,$20,$27,$2E
-
-GengarIntroTiles1:
-	db $00,$00,$00,$00,$00,$00,$00
-	db $00,$00,$00,$00,$00,$19,$00
-	db $02,$06,$0B,$10,$14,$1A,$00
-	db $00,$07,$0C,$11,$15,$1B,$00
-	db $03,$08,$0D,$12,$16,$1C,$00
-	db $04,$09,$0E,$13,$17,$1D,$1F
-	db $05,$0A,$0F,$01,$18,$1E,$20
-
-GengarIntroTiles2:
-	db $00,$00,$00,$30,$00,$37,$00
-	db $00,$00,$2B,$31,$34,$38,$3D
-	db $21,$26,$2C,$01,$35,$39,$3E
-	db $22,$27,$2D,$32,$36,$01,$00
-	db $23,$28,$2E,$33,$01,$3A,$00
-	db $24,$29,$2F,$01,$01,$3B,$00
-	db $25,$2A,$01,$01,$01,$3C,$00
-
-GengarIntroTiles3:
-	db $00,$00,$00,$00,$00,$00,$00
-	db $00,$00,$47,$4D,$00,$00,$00
-	db $00,$00,$48,$4E,$52,$56,$5B
-	db $3F,$43,$49,$4F,$53,$57,$5C
-	db $40,$44,$4A,$50,$54,$58,$00
-	db $41,$45,$4B,$51,$4C,$59,$5D
-	db $42,$46,$4C,$4C,$55,$5A,$5E
-
-Unknown_79c20:
-	db $31,$32,$32,$32,$32,$33
-	db $34,$35,$36,$36,$37,$38
-	db $34,$39,$3A,$3A,$3B,$38
-	db $3C,$3D,$3E,$3E,$3F,$40
-	db $41,$42,$43,$43,$44,$45
-	db $46,$47,$43,$48,$49,$4A
-	db $41,$43,$4B,$4C,$4D,$4E
-	db $4F,$50,$50,$50,$51,$52
-
-Unknown_79c50:
-	db $43,$55,$56,$53,$53,$53,$53,$53,$53,$53,$53,$53
-	db $43,$57,$58,$54,$54,$54,$54,$54,$54,$54,$54,$54
-	db $43,$59,$5A,$43,$43,$43,$43,$43,$43,$43,$43,$43
+INCLUDE "data/tilemaps.asm"
 
 AnimationLeavesFalling:
 ; Makes leaves float down from the top of the screen. This is used
binary files /dev/null b/gfx/intro_credits/gengar_1.tilemap differ
binary files /dev/null b/gfx/intro_credits/gengar_2.tilemap differ
binary files /dev/null b/gfx/intro_credits/gengar_3.tilemap differ