ref: 7a09fc9f750aec50dd568226083b279004ffe155
parent: eb3102200f66e3aa1688e4e52429fcac4b0272fa
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Sun Jan 14 14:43:35 EST 2018
GFX tile sizes in decimal
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -1077,7 +1077,7 @@
call CopyMinimizePic
ld hl, vTiles2 tile $00
ld de, sScratch
- lb bc, BANK(GetMinimizePic), $31
+ lb bc, BANK(GetMinimizePic), 7 * 7
ret
.player
@@ -1085,7 +1085,7 @@
call CopyMinimizePic
ld hl, vTiles2 tile $31
ld de, sScratch
- lb bc, BANK(GetMinimizePic), $24
+ lb bc, BANK(GetMinimizePic), 6 * 6
ret
CopyMinimizePic: ; cc719 (33:4719)
--- a/engine/credits.asm
+++ b/engine/credits.asm
@@ -34,17 +34,17 @@
ld de, CreditsBorderGFX
ld hl, vTiles2 tile $20
- lb bc, BANK(CreditsBorderGFX), $09
+ lb bc, BANK(CreditsBorderGFX), 9
call Request2bpp
ld de, CopyrightGFX
ld hl, vTiles2 tile $60
- lb bc, BANK(CopyrightGFX), $1d
+ lb bc, BANK(CopyrightGFX), 29
call Request2bpp
ld de, TheEndGFX
ld hl, vTiles2 tile $40
- lb bc, BANK(TheEndGFX), $10
+ lb bc, BANK(TheEndGFX), 16
call Request2bpp
ld a, $ff
--- a/engine/crystal_intro.asm
+++ b/engine/crystal_intro.asm
@@ -52,7 +52,7 @@
.GetGFLogoGFX: ; e45e8
ld de, GameFreakLogo
ld hl, vTiles2
- lb bc, BANK(GameFreakLogo), $1c
+ lb bc, BANK(GameFreakLogo), 28
call Get1bpp
ld a, [rSVBK]
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -1061,9 +1061,9 @@
call WaitBGMap2
xor a
ld [hBGMapMode], a
- ld de, DebugColorTestGFX + $10
+ ld de, DebugColorTestGFX + 1 tiles
ld hl, vTiles2 tile $6a
- lb bc, BANK(DebugColorTestGFX), $16
+ lb bc, BANK(DebugColorTestGFX), 22
call Request2bpp
ld de, DebugColorTestGFX
ld hl, vTiles1
--- a/engine/events/celebi.asm
+++ b/engine/events/celebi.asm
@@ -1,3 +1,5 @@
+SPECIALCELEBIEVENT_CELEBI EQU $84
+
Special_CelebiShrineEvent: ; 4989a
call DelayFrame
ld a, [VramState]
@@ -10,7 +12,7 @@
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $84
+ ld [hl], SPECIALCELEBIEVENT_CELEBI
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_CELEBI
@@ -76,8 +78,8 @@
lb bc, BANK(SpecialCelebiLeafGFX), 4
call Request2bpp
ld de, SpecialCelebiGFX
- ld hl, vTiles0 tile $84
- lb bc, BANK(SpecialCelebiGFX), $10
+ ld hl, vTiles0 tile SPECIALCELEBIEVENT_CELEBI
+ lb bc, BANK(SpecialCelebiGFX), 4 * 4
call Request2bpp
xor a
ld [wJumptableIndex], a
@@ -306,22 +308,22 @@
.Frame1:
- ld a, $84
+ ld a, SPECIALCELEBIEVENT_CELEBI
jr .load_tile
.Frame2:
- ld a, $88
+ ld a, SPECIALCELEBIEVENT_CELEBI + 4
jr .load_tile
.Frame3:
- ld a, $8c
+ ld a, SPECIALCELEBIEVENT_CELEBI + 8
jr .load_tile
.Frame4:
- ld a, $90
+ ld a, SPECIALCELEBIEVENT_CELEBI + 12
.load_tile
ld hl, SPRITEANIMSTRUCT_TILE_ID
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -1376,7 +1376,7 @@
call LoadFontsExtra
ld de, CopyrightGFX
ld hl, vTiles2 tile $60
- lb bc, BANK(CopyrightGFX), $1d
+ lb bc, BANK(CopyrightGFX), 29
call Request2bpp
hlcoord 2, 7
ld de, CopyrightString
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -182,7 +182,7 @@
.Box: ; 117f5 (4:57f5)
ld de, PokeBallSpriteGFX
ld hl, vTiles0 tile $00
- lb bc, BANK(PokeBallSpriteGFX), $4
+ lb bc, BANK(PokeBallSpriteGFX), 4
call Request2bpp
xor a
ld hl, wSpriteAnimDict
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -829,7 +829,7 @@
.decompress
ld hl, PokedexLZ
ld de, vTiles2 tile $31
- lb bc, BANK(PokedexLZ), $3a
+ lb bc, BANK(PokedexLZ), 58
call DecompressRequest2bpp
.done
--- a/engine/pokedex_3.asm
+++ b/engine/pokedex_3.asm
@@ -7,7 +7,7 @@
LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26)
ld hl, SGBPokedexGFX_LZ
ld de, vTiles2 tile $31
- lb bc, BANK(SGBPokedexGFX_LZ), $3a
+ lb bc, BANK(SGBPokedexGFX_LZ), 58
call DecompressRequest2bpp
ret
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -116,7 +116,7 @@
ld a, BANK(TownMapGFX)
call FarDecompress
ld hl, PokegearGFX
- ld de, vTiles2 + $30 tiles
+ ld de, vTiles2 tile $30
ld a, BANK(PokegearGFX)
call FarDecompress
ld hl, PokegearSpritesGFX
@@ -2944,7 +2944,7 @@
LoadTownMapGFX: ; 91ff2
ld hl, TownMapGFX
ld de, vTiles2
- lb bc, BANK(TownMapGFX), $30
+ lb bc, BANK(TownMapGFX), 48
call DecompressRequest2bpp
ret
--- a/engine/trade_animation.asm
+++ b/engine/trade_animation.asm
@@ -1512,15 +1512,15 @@
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0 tile $62
- lb bc, BANK(TradeBallGFX), $6
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $68
- lb bc, BANK(TradePoofGFX), $c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
ld de, TradeCableGFX
ld hl, vTiles0 tile $74
- lb bc, BANK(TradeCableGFX), $4
+ lb bc, BANK(TradeCableGFX), 4
call Request2bpp
xor a
ld hl, wSpriteAnimDict
@@ -1536,7 +1536,7 @@
callfar LoadMenuMonIcon
ld de, TradeBubbleGFX
ld hl, vTiles0 tile $72
- lb bc, BANK(TradeBubbleGFX), $4
+ lb bc, BANK(TradeBubbleGFX), 4
call Request2bpp
xor a
ld hl, wSpriteAnimDict
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -147,11 +147,11 @@
call WaitBGMap
ld de, LeaderGFX
ld hl, vTiles2 tile $29
- lb bc, BANK(LeaderGFX), $56
+ lb bc, BANK(LeaderGFX), 86
call Request2bpp
ld de, BadgeGFX
ld hl, vTiles0 tile $00
- lb bc, BANK(BadgeGFX), $2c
+ lb bc, BANK(BadgeGFX), 44
call Request2bpp
call TrainerCard_Page2_3_InitObjectsAndStrings
call TrainerCard_IncrementJumptable
@@ -196,11 +196,11 @@
call WaitBGMap
ld de, LeaderGFX2
ld hl, vTiles2 tile $29
- lb bc, BANK(LeaderGFX2), $56
+ lb bc, BANK(LeaderGFX2), 86
call Request2bpp
ld de, BadgeGFX2
ld hl, vTiles0 tile $00
- lb bc, BANK(BadgeGFX2), $2c
+ lb bc, BANK(BadgeGFX2), 44
call Request2bpp
call TrainerCard_Page2_3_InitObjectsAndStrings
call TrainerCard_IncrementJumptable
--- a/gfx/font.asm
+++ b/gfx/font.asm
@@ -231,7 +231,7 @@
LoadStatsScreenPageTilesGFX: ; fb571
ld de, StatsScreenPageTilesGFX
ld hl, vTiles2 tile $31
- lb bc, BANK(StatsScreenPageTilesGFX), $11
+ lb bc, BANK(StatsScreenPageTilesGFX), 17
call Get2bpp_2
ret
; fb57e
--- a/mobile/mobile_42.asm
+++ b/mobile/mobile_42.asm
@@ -181,12 +181,12 @@
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
xor a
@@ -616,11 +616,11 @@
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
ld a, [wPlayerTrademonDVs]
ld [TempMonDVs], a
@@ -690,11 +690,11 @@
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
xor a
ld [hSCX], a
@@ -759,11 +759,11 @@
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
xor a
ld [hSCX], a
--- a/mobile/mobile_45_sprite_engine.asm
+++ b/mobile/mobile_45_sprite_engine.asm
@@ -1,7 +1,7 @@
Function115d99: ; 115d99
ld de, GFX_11601a
ld hl, vTiles0 tile $60
- lb bc, BANK(GFX_11601a), $14
+ lb bc, BANK(GFX_11601a), 20
call Get2bpp
xor a
ld [wc305], a
--- a/mobile/mobile_5b.asm
+++ b/mobile/mobile_5b.asm
@@ -172,7 +172,7 @@
call DisableLCD
ld hl, vTiles2
ld de, .Tiles
- lb bc, BANK(.Tiles), $68
+ lb bc, BANK(.Tiles), 104
call Get2bpp
call .LoadPals
call .LoadTileMap
@@ -710,7 +710,7 @@
Function16cc18: ; 16cc18
ld hl, vTiles1
ld de, GFX_16cca3
- lb bc, BANK(GFX_16cca3), $2e
+ lb bc, BANK(GFX_16cca3), 46
call Get2bpp
ret
; 16cc25
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -296,7 +296,7 @@
ld [rVBK], a
ld de, GFX_171848
ld hl, vTiles1 tile $41
- lb bc, BANK(GFX_171848), $18
+ lb bc, BANK(GFX_171848), 24
call Get2bpp
xor a
ld [rVBK], a