summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/constants.asm1
-rw-r--r--src/constants/tileset_constants.asm88
-rw-r--r--src/engine/bank1c.asm5
-rw-r--r--src/engine/bank20.asm646
-rw-r--r--src/engine/home.asm3
-rw-r--r--src/gfx.asm348
-rw-r--r--src/wram.asm14
7 files changed, 713 insertions, 392 deletions
diff --git a/src/constants.asm b/src/constants.asm
index c63175b..efa44fb 100644
--- a/src/constants.asm
+++ b/src/constants.asm
@@ -18,6 +18,7 @@ INCLUDE "constants/sgb_constants.asm"
INCLUDE "constants/sfx_constants.asm"
INCLUDE "constants/sprite_constants.asm"
INCLUDE "constants/text_constants.asm"
+INCLUDE "constants/tileset_constants.asm"
INCLUDE "constants/animation_constants.asm"
INCLUDE "constants/attack_animation_constants.asm"
INCLUDE "constants/charmaps.asm"
diff --git a/src/constants/tileset_constants.asm b/src/constants/tileset_constants.asm
new file mode 100644
index 0000000..6e3f8f3
--- /dev/null
+++ b/src/constants/tileset_constants.asm
@@ -0,0 +1,88 @@
+ const_def
+ const TILESET_OVERWORLD_MAP ; $00
+ const TILESET_MASON_LABORATORY ; $01
+ const TILESET_ISHIHARA ; $02
+ const TILESET_CLUB_ENTRANCE ; $03
+ const TILESET_CLUB_LOBBY ; $04
+ const TILESET_FIGHTING_CLUB ; $05
+ const TILESET_ROCK_CLUB ; $06
+ const TILESET_WATER_CLUB ; $07
+ const TILESET_LIGHTNING_CLUB ; $08
+ const TILESET_GRASS_CLUB ; $09
+ const TILESET_PSYCHIC_CLUB ; $0a
+ const TILESET_SCIENCE_CLUB ; $0b
+ const TILESET_FIRE_CLUB ; $0c
+ const TILESET_CHALLENGE_HALL ; $0d
+ const TILESET_POKEMON_DOME_ENTRANCE ; $0e
+ const TILESET_POKEMON_DOME ; $0f
+ const TILESET_HALL_OF_HONOR ; $10
+ const TILESET_CARD_POP_1 ; $11
+ const TILESET_MEDAL ; $12
+ const TILESET_CARD_POP_2 ; $13
+ const TILESET_CARD_POP_3 ; $14
+ const TILESET_COLOSSEUM_1 ; $15
+ const TILESET_COLOSSEUM_2 ; $16
+ const TILESET_EVOLUTION_1 ; $17
+ const TILESET_EVOLUTION_2 ; $18
+ const TILESET_MYSTERY_1 ; $19
+ const TILESET_MYSTERY_2 ; $1a
+ const TILESET_LABORATORY_1 ; $1b
+ const TILESET_LABORATORY_2 ; $1c
+ const TILESET_CHARIZARD_INTRO_1 ; $1d
+ const TILESET_CHARIZARD_INTRO_2 ; $1e
+ const TILESET_SCYTHER_INTRO_1 ; $1f
+ const TILESET_SCYTHER_INTRO_2 ; $20
+ const TILESET_AERODACTYL_INTRO_1 ; $21
+ const TILESET_AERODACTYL_INTRO_2 ; $22
+ const TILESET_TITLE_SCREEN_1 ; $23
+ const TILESET_TITLE_SCREEN_2 ; $24
+ const TILESET_SOLID_TILES_1 ; $25
+ const TILESET_TITLE_SCREEN_3 ; $26
+ const TILESET_TITLE_SCREEN_4 ; $27
+ const TILESET_SOLID_TILES_2 ; $28
+ const TILESET_PLAYER ; $29
+ const TILESET_RONALD ; $2a
+ const TILESET_TITLE_SCREEN_5 ; $2b
+ const TILESET_TITLE_SCREEN_6 ; $2c
+ const TILESET_COPYRIGHT ; $2d
+ const TILESET_NINTENDO ; $2e
+ const TILESET_COMPANIES ; $2f
+ const TILESET_SAM ; $30
+ const TILESET_IMAKUNI ; $31
+ const TILESET_NIKKI ; $32
+ const TILESET_RICK ; $33
+ const TILESET_KEN ; $34
+ const TILESET_AMY ; $35
+ const TILESET_ISAAC ; $36
+ const TILESET_MITCH ; $37
+ const TILESET_GENE ; $38
+ const TILESET_MURRAY ; $39
+ const TILESET_COURTNEY ; $3a
+ const TILESET_STEVE ; $3b
+ const TILESET_JACK ; $3c
+ const TILESET_ROD ; $3d
+ const TILESET_JOSEPH ; $3e
+ const TILESET_DAVID ; $3f
+ const TILESET_ERIK ; $40
+ const TILESET_JOHN ; $41
+ const TILESET_ADAM ; $42
+ const TILESET_JONATHAN ; $43
+ const TILESET_JOSHUA ; $44
+ const TILESET_NICHOLAS ; $45
+ const TILESET_BRANDON ; $46
+ const TILESET_MATTHEW ; $47
+ const TILESET_RYAN ; $48
+ const TILESET_ANDREW ; $49
+ const TILESET_CHRIS ; $4a
+ const TILESET_MICHAEL ; $4b
+ const TILESET_DANIEL ; $4c
+ const TILESET_ROBERT ; $4d
+ const TILESET_BRITTANY ; $4e
+ const TILESET_KRISTIN ; $4f
+ const TILESET_HEATHER ; $50
+ const TILESET_SARA ; $51
+ const TILESET_AMANDA ; $52
+ const TILESET_JENNIFER ; $53
+ const TILESET_JESSICA ; $54
+ const TILESET_STEPHANIE ; $55
+ const TILESET_AARON ; $56
diff --git a/src/engine/bank1c.asm b/src/engine/bank1c.asm
index 10bd58d..15a4647 100644
--- a/src/engine/bank1c.asm
+++ b/src/engine/bank1c.asm
@@ -328,4 +328,7 @@ Func_70214: ; 70214 (1c:4214)
ret
Unknown_7024a: ; 7024a (1c:424a)
- INCROM $7024a, $74000
+ INCROM $7024a, $7036a
+
+Func_7036a: ; 7036a (1c:436a)
+ INCROM $7036a, $74000
diff --git a/src/engine/bank20.asm b/src/engine/bank20.asm
index 3c447ac..8039177 100644
--- a/src/engine/bank20.asm
+++ b/src/engine/bank20.asm
@@ -11,7 +11,31 @@ Func_80028: ; 80028 (20:4028)
ret
; 0x8003d
- INCROM $8003d, $80077
+Func_8003d: ; 8003d (20:403d)
+ farcall Func_1c33b
+ farcall Func_7036a
+ ld bc, $0
+ call Func_80077
+ ld a, $80
+ ld [wd4ca], a
+ xor a
+ ld [wd4cb], a
+ call LoadTilesetGfx
+ xor a
+ ld [wd4ca], a
+ ld a, [wd291]
+ ld [wd4cb], a
+ ld a, [wd28f]
+ call Func_803c9
+ ld a, [wd291]
+ ld [wd4cb], a
+ ld a, [wd290]
+ or a
+ jr z, .asm_80076
+ call Func_803c9
+.asm_80076
+ ret
+; 0x80077
Func_80077: ; 80077 (20:4077)
ld a, $1
@@ -350,7 +374,7 @@ Func_8025b: ; 8025b (20:425b)
call LoadGraphicsPointerFromHL
ld a, [hl] ; sprite number of tiles
push af
- ld [wCurSpriteNumTiles], a
+ ld [wTotalNumTiles], a
ld a, TILE_SIZE
ld [wCurSpriteTileSize], a
call LoadGfxDataFromTempPointerToVRAMBank
@@ -365,7 +389,7 @@ LoadGfxDataFromTempPointerToVRAMBank: ; 80274 (20:4274)
jr LoadGfxDataFromTempPointer
Func_80279: ; 80279 (20:4279)
- call Func_802bb
+ call GetTileOffsetPointerAndSwitchVRAM_Tiles0ToTiles2
; loads graphics data pointed by wTempPointer in wTempPointerBank
; to wVRAMPointer
@@ -373,7 +397,7 @@ LoadGfxDataFromTempPointer:
push hl
push bc
push de
- ld a, [wCurSpriteNumTiles]
+ ld a, [wTotalNumTiles]
ld b, a
ld a, [wCurSpriteTileSize]
ld c, a
@@ -405,7 +429,7 @@ GetTileOffsetPointerAndSwitchVRAM: ; 8029f (20:429f)
and $f0
ld [wVRAMPointer], a
pop af
- and $f
+ and $0f
add HIGH(v0Tiles0) ; $80
ld [wVRAMPointer + 1], a
@@ -416,21 +440,190 @@ GetTileOffsetPointerAndSwitchVRAM: ; 8029f (20:429f)
call BankswitchVRAM
ret
-Func_802bb: ; 802bb (20:42bb)
- ld a, [wd4ca]
+; converts wVRAMTileOffset to address in VRAM
+; and stores it in wVRAMPointer
+; switches VRAM according to wd4cb
+; then changes wVRAMPointer such that
+; addresses to Tiles0 is changed to Tiles2
+GetTileOffsetPointerAndSwitchVRAM_Tiles0ToTiles2: ; 802bb (20:42bb)
+ ld a, [wVRAMTileOffset]
push af
- xor $80
- ld [wd4ca], a
+ xor $80 ; toggle top bit
+ ld [wVRAMTileOffset], a
call GetTileOffsetPointerAndSwitchVRAM
ld a, [wVRAMPointer + 1]
add $8
ld [wVRAMPointer + 1], a
pop af
- ld [wd4ca], a
+ ld [wVRAMTileOffset], a
ret
; 0x802d4
- INCROM $802d4, $803b9
+; loads tileset gfx to VRAM corresponding to wCurTileset
+LoadTilesetGfx: ; 802d4 (20:42d4)
+ push hl
+ ld l, $02
+ ld a, [wCurTileset]
+ call GetMapDataPointer
+ call LoadGraphicsPointerFromHL
+ call .LoadTileGfx
+ call BankswitchVRAM0
+ pop hl
+ ret
+; 0x802e8
+
+; loads gfx data from wTempPointerBank:wTempPointer
+.LoadTileGfx ; 802e8 (20:42e8)
+ push hl
+ push bc
+ push de
+ ld hl, wTempPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wTempPointerBank]
+ call GetFarByte ; get number of tiles (low byte)
+ ld [wTotalNumTiles], a
+ inc hl
+ ld a, [wTempPointerBank]
+ call GetFarByte ; get number of tiles (high byte)
+ ld [wTotalNumTiles + 1], a
+ inc hl
+ ld a, l
+ ld [wTempPointer], a
+ ld a, h
+ ld [wTempPointer + 1], a
+
+; used to sequentially copy gfx data in the order
+; v0Tiles1 -> v0Tiles2 -> v1Tiles1 -> v1Tiles2
+
+ lb bc, $0, LOW(v0Tiles2 / TILE_SIZE) ; $00
+ call .CopyGfxData
+ jr z, .done
+ lb bc, $0, LOW(v0Tiles1 / TILE_SIZE) ; $80
+ call .CopyGfxData
+ jr z, .done
+ ; VRAM1 only used in CGB console
+ ld a, [wConsole]
+ cp CONSOLE_CGB
+ jr nz, .done
+ lb bc, $1, LOW(v1Tiles2 / TILE_SIZE) ; $00
+ call .CopyGfxData
+ jr z, .done
+ lb bc, $1, LOW(v1Tiles1 / TILE_SIZE) ; $80
+ call .CopyGfxData
+
+.done
+ pop de
+ pop bc
+ pop hl
+ ret
+; 0x80336
+
+; copies gfx data from wTempPointer to VRAM
+; c must match with wVRAMTileOffset
+; if c = $00, copies it to Tiles2
+; if c = $80, copies it to Tiles1
+; b must match with VRAM bank in wd4cb
+; prepares next call to this routine if data wasn't fully copied
+; so that it copies to the right VRAM section
+.CopyGfxData ; 80336 (20:4336)
+ push hl
+ push bc
+ push de
+ ld a, [wd4cb]
+ cp b
+ jr nz, .skip
+ ld a, [wVRAMTileOffset]
+ ld d, a
+ xor c
+ bit 7, a
+ jr nz, .skip
+
+; (wd4cb == b) and
+; bit 7 in c is same as bit 7 in wVRAMTileOffset
+ ld a, c
+ add $80
+ sub d
+ ld d, a ; total number of tiles
+ ld a, [wTotalNumTiles + 1]
+ or a
+ jr nz, .asm_8035a
+ ; if d > wTotalNumTiles,
+ ; overwrite it with wTotalNumTiles
+ ld a, [wTotalNumTiles]
+ cp d
+ jr nc, .asm_8035a
+ ld d, a
+.asm_8035a
+ ld a, [wTotalNumTiles]
+ sub d
+ ld [wTotalNumTiles], a
+ ld a, [wTotalNumTiles + 1]
+ sbc $00
+ ld [wTotalNumTiles + 1], a
+ call GetTileOffsetPointerAndSwitchVRAM_Tiles0ToTiles2
+
+ ld b, d ; number of tiles
+ ld c, TILE_SIZE
+ ld hl, wVRAMPointer
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, wTempPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push bc
+ push hl
+ ldh a, [hBankVRAM]
+ push af
+ ld a, [wd4cb]
+ and $01
+ call BankswitchVRAM
+ call CopyGfxDataFromTempBank
+ pop af
+ call BankswitchVRAM
+ pop de
+ pop bc
+
+ ; add number of tiles * TILE_SIZE
+ ; to wVRAMPointer and store it in wTempPointer
+ ld l, b
+ ld h, $00
+ add hl, hl ; *2
+ add hl, hl ; *4
+ add hl, hl ; *8
+ add hl, hl ; *16 (TILE_SIZE)
+ add hl, de
+ ld a, l
+ ld [wTempPointer], a
+ ld a, h
+ ld [wTempPointer + 1], a
+
+ ld hl, wVRAMTileOffset
+ ld a, [hl]
+ add $80
+ push af
+ and $80 ; start of next group of tiles
+ ld [hli], a
+ pop af
+ ; if it overflows
+ ; (which means a tile group after Tiles2)
+ ; then set wd4cb for VRAM1
+ ld a, [hl] ; wd4cb
+ adc $00
+ ld [hl], a
+
+.skip
+ ld hl, wTotalNumTiles
+ ld a, [hli]
+ or [hl] ; wTotalNumTiles + 1
+ pop de
+ pop bc
+ pop hl
+ ret
+; 0x803b9
; gets pointer to BG map with ID from wd131
Func_803b9: ; 803b9 (20:43b9)
@@ -439,11 +632,37 @@ Func_803b9: ; 803b9 (20:43b9)
call GetMapDataPointer
call LoadGraphicsPointerFromHL
ld a, [hl]
- ld [wd239], a
+ ld [wCurTileset], a
ret
; 0x803c9
- INCROM $803c9, $803ec
+Func_803c9: ; 803c9 (20:43c9)
+ push hl
+ push bc
+ push de
+ call CopyPaletteDataToBuffer
+ ld hl, wLoadedPalData
+ ld a, [hli]
+ or a
+ jr z, .asm_803dc
+ ld a, [hli]
+ push hl
+ call SetBGP
+ pop hl
+.asm_803dc
+ ld a, [hli]
+ or a
+ jr z, .asm_803e8
+ ld c, a
+ ld a, [wd4cb]
+ ld b, a
+ call LoadPaletteDataFromHL
+.asm_803e8
+ pop de
+ pop bc
+ pop hl
+ ret
+; 0x803ec
; copies from palette data in hl c*8 bytes to palette index b
; in WRAM, starting from wBackgroundPalettesCGB
@@ -707,214 +926,221 @@ SpriteNullAnimationFrame:
; might be closer to "screen specific data" than map data
MapDataPointers: ; 80e5d (20:4e5d)
dw MapDataPointers_80e67
- dw MapDataPointers_8100f
+ dw Tilesets
dw MapDataPointers_8116b
dw SpriteAnimationPointers
dw MapDataPointers_81697
; \1 = pointer
-; \2 = unknown
+; \2 = tileset
macro_80e67: MACRO
dwb \1, BANK(\1) - BANK(MapDataPointers_80e67)
db \2
ENDM
MapDataPointers_80e67: ; 80e67 (20:4e67)
- macro_80e67 Data_8191b, $00 ; 0
- macro_80e67 Data_81a22, $00 ; 1
- macro_80e67 Data_81c13, $01 ; 2
- macro_80e67 Data_81d2e, $01 ; 3
- macro_80e67 Data_81ed1, $01 ; 4
- macro_80e67 Data_81ef5, $01 ; 5
- macro_80e67 Data_81f26, $01 ; 6
- macro_80e67 Data_81feb, $01 ; 7
- macro_80e67 Data_82143, $01 ; 8
- macro_80e67 Data_82150, $01 ; 9
- macro_80e67 Data_82160, $02 ; 10
- macro_80e67 Data_82222, $02 ; 11
- macro_80e67 Data_82336, $03 ; 12
- macro_80e67 Data_82400, $03 ; 13
- macro_80e67 Data_8251d, $03 ; 14
- macro_80e67 Data_825e7, $03 ; 15
- macro_80e67 Data_82704, $03 ; 16
- macro_80e67 Data_827ce, $03 ; 17
- macro_80e67 Data_828eb, $03 ; 18
- macro_80e67 Data_829b5, $03 ; 19
- macro_80e67 Data_82ad2, $03 ; 20
- macro_80e67 Data_82b9c, $03 ; 21
- macro_80e67 Data_82cb9, $03 ; 22
- macro_80e67 Data_82d83, $03 ; 23
- macro_80e67 Data_82ea0, $03 ; 24
- macro_80e67 Data_82f6a, $03 ; 25
- macro_80e67 Data_83087, $03 ; 26
- macro_80e67 Data_83151, $03 ; 27
- macro_80e67 Data_8326e, $03 ; 28
- macro_80e67 Data_83321, $03 ; 29
- macro_80e67 Data_83424, $04 ; 30
- macro_80e67 Data_83545, $04 ; 31
- macro_80e67 Data_836db, $05 ; 32
- macro_80e67 Data_8378c, $05 ; 33
- macro_80e67 Data_8388d, $06 ; 34
- macro_80e67 Data_839d6, $06 ; 35
- macro_80e67 Data_84000, $07 ; 36
- macro_80e67 Data_84188, $07 ; 37
- macro_80e67 Data_843bb, $08 ; 38
- macro_80e67 Data_84533, $08 ; 39
- macro_80e67 Data_8472e, $09 ; 40
- macro_80e67 Data_848d8, $09 ; 41
- macro_80e67 Data_84b73, $0a ; 42
- macro_80e67 Data_84c6f, $0a ; 43
- macro_80e67 Data_84dfe, $0b ; 44
- macro_80e67 Data_84f1d, $0b ; 45
- macro_80e67 Data_850b6, $0c ; 46
- macro_80e67 Data_85191, $0c ; 47
- macro_80e67 Data_85315, $0d ; 48
- macro_80e67 Data_854b3, $0d ; 49
- macro_80e67 Data_8570a, $0e ; 50
- macro_80e67 Data_857ce, $0e ; 51
- macro_80e67 Data_83bf1, $0e ; 52
- macro_80e67 Data_83c03, $0e ; 53
- macro_80e67 Data_858ef, $0f ; 54
- macro_80e67 Data_85a79, $0f ; 55
- macro_80e67 Data_83c1a, $0f ; 56
- macro_80e67 Data_83c26, $0f ; 57
- macro_80e67 Data_85ce2, $10 ; 58
- macro_80e67 Data_85df4, $10 ; 59
- macro_80e67 Data_85f7c, $11 ; 60
- macro_80e67 Data_8607f, $11 ; 61
- macro_80e67 Data_83c36, $12 ; 62
- macro_80e67 Data_8617d, $12 ; 63
- macro_80e67 Data_86193, $12 ; 64
- macro_80e67 Data_861a9, $12 ; 65
- macro_80e67 Data_861bf, $12 ; 66
- macro_80e67 Data_861d5, $12 ; 67
- macro_80e67 Data_861eb, $12 ; 68
- macro_80e67 Data_86201, $12 ; 69
- macro_80e67 Data_86217, $13 ; 70
- macro_80e67 Data_862da, $13 ; 71
- macro_80e67 Data_86364, $13 ; 72
- macro_80e67 Data_86443, $13 ; 73
- macro_80e67 Data_864df, $14 ; 74
- macro_80e67 Data_865b5, $14 ; 75
- macro_80e67 Data_86647, $15 ; 76
- macro_80e67 Data_866b8, $16 ; 77
- macro_80e67 Data_8673e, $17 ; 78
- macro_80e67 Data_867af, $18 ; 79
- macro_80e67 Data_86833, $19 ; 80
- macro_80e67 Data_868a4, $1a ; 81
- macro_80e67 Data_86925, $1b ; 82
- macro_80e67 Data_86996, $1c ; 83
- macro_80e67 Data_86a14, $1d ; 84
- macro_80e67 Data_86a85, $1e ; 85
- macro_80e67 Data_86b28, $1f ; 86
- macro_80e67 Data_86b99, $20 ; 87
- macro_80e67 Data_86c34, $21 ; 88
- macro_80e67 Data_86ca5, $22 ; 89
- macro_80e67 Data_86d37, $23 ; 90
- macro_80e67 Data_86dcc, $24 ; 91
- macro_80e67 Data_86e8a, $25 ; 92
- macro_80e67 Data_86f18, $25 ; 93
- macro_80e67 Data_86fc0, $25 ; 94
- macro_80e67 Data_8704f, $26 ; 95
- macro_80e67 Data_871a5, $27 ; 96
- macro_80e67 Data_87397, $28 ; 97
- macro_80e67 Data_873b7, $29 ; 98
- macro_80e67 Data_873e5, $2a ; 99
- macro_80e67 Data_87413, $2b ; 100
- macro_80e67 Data_87538, $2c ; 101
- macro_80e67 Data_8769f, $2d ; 102
- macro_80e67 Data_876f6, $2d ; 103
- macro_80e67 Data_8777c, $2e ; 104
- macro_80e67 Data_877c4, $2f ; 105
-
-MapDataPointers_8100f: ; 8100f (20:500f)
- db $00, $40, $02, $c1
- db $12, $4c, $02, $97
- db $28, $78, $01, $4d
- db $84, $55, $02, $81
- db $96, $5d, $02, $78
- db $18, $65, $02, $63
- db $4a, $6b, $02, $3c
- db $0c, $6f, $02, $a1
- db $00, $40, $03, $83
- db $1e, $79, $02, $57
- db $32, $48, $03, $3a
- db $d4, $4b, $03, $52
- db $f6, $50, $03, $57
- db $68, $56, $03, $9d
- db $3a, $60, $03, $4e
- db $1c, $65, $03, $cf
- db $0e, $72, $03, $79
- db $00, $40, $04, $bd
- db $a0, $79, $03, $48
- db $d2, $4b, $04, $6d
- db $a4, $52, $04, $5d
- db $76, $58, $04, $60
- db $78, $5e, $04, $56
- db $da, $63, $04, $60
- db $dc, $69, $04, $56
- db $3e, $6f, $04, $60
- db $40, $75, $04, $56
- db $00, $40, $05, $60
- db $02, $46, $05, $56
- db $64, $4b, $05, $60
- db $66, $51, $05, $60
- db $68, $57, $05, $60
- db $6a, $5d, $05, $60
- db $6c, $63, $05, $60
- db $6e, $69, $05, $60
- db $70, $6f, $05, $61
- db $82, $75, $05, $61
- db $fa, $7c, $01, $04
- db $00, $40, $06, $f4
- db $42, $4f, $06, $3b
- db $3c, $7d, $01, $04
- db $7e, $7d, $01, $24
- db $a2, $7a, $04, $24
- db $f4, $62, $06, $dc
- db $b6, $70, $06, $d4
- db $e4, $7c, $04, $24
- db $22, $7e, $03, $18
- db $94, $7b, $05, $31
- db $00, $40, $07, $24
- db $42, $42, $07, $24
- db $84, $44, $07, $24
- db $c6, $46, $07, $24
- db $08, $49, $07, $24
- db $4a, $4b, $07, $24
- db $8c, $4d, $07, $24
- db $ce, $4f, $07, $24
- db $10, $52, $07, $24
- db $52, $54, $07, $24
- db $94, $56, $07, $24
- db $d6, $58, $07, $24
- db $18, $5b, $07, $24
- db $5a, $5d, $07, $24
- db $9c, $5f, $07, $24
- db $de, $61, $07, $24
- db $20, $64, $07, $24
- db $62, $66, $07, $24
- db $a4, $68, $07, $24
- db $e6, $6a, $07, $24
- db $28, $6d, $07, $24
- db $6a, $6f, $07, $24
- db $ac, $71, $07, $24
- db $ee, $73, $07, $24
- db $30, $76, $07, $24
- db $72, $78, $07, $24
- db $b4, $7a, $07, $24
- db $f6, $7c, $07, $24
- db $00, $40, $08, $24
- db $42, $42, $08, $24
- db $84, $44, $08, $24
- db $c6, $46, $08, $24
- db $08, $49, $08, $24
- db $4a, $4b, $08, $24
- db $8c, $4d, $08, $24
- db $ce, $4f, $08, $24
- db $10, $52, $08, $24
- db $52, $54, $08, $24
- db $94, $56, $08, $24
+ macro_80e67 Data_8191b, TILESET_OVERWORLD_MAP ; 0
+ macro_80e67 Data_81a22, TILESET_OVERWORLD_MAP ; 1
+ macro_80e67 Data_81c13, TILESET_MASON_LABORATORY ; 2
+ macro_80e67 Data_81d2e, TILESET_MASON_LABORATORY ; 3
+ macro_80e67 Data_81ed1, TILESET_MASON_LABORATORY ; 4
+ macro_80e67 Data_81ef5, TILESET_MASON_LABORATORY ; 5
+ macro_80e67 Data_81f26, TILESET_MASON_LABORATORY ; 6
+ macro_80e67 Data_81feb, TILESET_MASON_LABORATORY ; 7
+ macro_80e67 Data_82143, TILESET_MASON_LABORATORY ; 8
+ macro_80e67 Data_82150, TILESET_MASON_LABORATORY ; 9
+ macro_80e67 Data_82160, TILESET_ISHIHARA ; 10
+ macro_80e67 Data_82222, TILESET_ISHIHARA ; 11
+ macro_80e67 Data_82336, TILESET_CLUB_ENTRANCE ; 12
+ macro_80e67 Data_82400, TILESET_CLUB_ENTRANCE ; 13
+ macro_80e67 Data_8251d, TILESET_CLUB_ENTRANCE ; 14
+ macro_80e67 Data_825e7, TILESET_CLUB_ENTRANCE ; 15
+ macro_80e67 Data_82704, TILESET_CLUB_ENTRANCE ; 16
+ macro_80e67 Data_827ce, TILESET_CLUB_ENTRANCE ; 17
+ macro_80e67 Data_828eb, TILESET_CLUB_ENTRANCE ; 18
+ macro_80e67 Data_829b5, TILESET_CLUB_ENTRANCE ; 19
+ macro_80e67 Data_82ad2, TILESET_CLUB_ENTRANCE ; 20
+ macro_80e67 Data_82b9c, TILESET_CLUB_ENTRANCE ; 21
+ macro_80e67 Data_82cb9, TILESET_CLUB_ENTRANCE ; 22
+ macro_80e67 Data_82d83, TILESET_CLUB_ENTRANCE ; 23
+ macro_80e67 Data_82ea0, TILESET_CLUB_ENTRANCE ; 24
+ macro_80e67 Data_82f6a, TILESET_CLUB_ENTRANCE ; 25
+ macro_80e67 Data_83087, TILESET_CLUB_ENTRANCE ; 26
+ macro_80e67 Data_83151, TILESET_CLUB_ENTRANCE ; 27
+ macro_80e67 Data_8326e, TILESET_CLUB_ENTRANCE ; 28
+ macro_80e67 Data_83321, TILESET_CLUB_ENTRANCE ; 29
+ macro_80e67 Data_83424, TILESET_CLUB_LOBBY ; 30
+ macro_80e67 Data_83545, TILESET_CLUB_LOBBY ; 31
+ macro_80e67 Data_836db, TILESET_FIGHTING_CLUB ; 32
+ macro_80e67 Data_8378c, TILESET_FIGHTING_CLUB ; 33
+ macro_80e67 Data_8388d, TILESET_ROCK_CLUB ; 34
+ macro_80e67 Data_839d6, TILESET_ROCK_CLUB ; 35
+ macro_80e67 Data_84000, TILESET_WATER_CLUB ; 36
+ macro_80e67 Data_84188, TILESET_WATER_CLUB ; 37
+ macro_80e67 Data_843bb, TILESET_LIGHTNING_CLUB ; 38
+ macro_80e67 Data_84533, TILESET_LIGHTNING_CLUB ; 39
+ macro_80e67 Data_8472e, TILESET_GRASS_CLUB ; 40
+ macro_80e67 Data_848d8, TILESET_GRASS_CLUB ; 41
+ macro_80e67 Data_84b73, TILESET_PSYCHIC_CLUB ; 42
+ macro_80e67 Data_84c6f, TILESET_PSYCHIC_CLUB ; 43
+ macro_80e67 Data_84dfe, TILESET_SCIENCE_CLUB ; 44
+ macro_80e67 Data_84f1d, TILESET_SCIENCE_CLUB ; 45
+ macro_80e67 Data_850b6, TILESET_FIRE_CLUB ; 46
+ macro_80e67 Data_85191, TILESET_FIRE_CLUB ; 47
+ macro_80e67 Data_85315, TILESET_CHALLENGE_HALL ; 48
+ macro_80e67 Data_854b3, TILESET_CHALLENGE_HALL ; 49
+ macro_80e67 Data_8570a, TILESET_POKEMON_DOME_ENTRANCE ; 50
+ macro_80e67 Data_857ce, TILESET_POKEMON_DOME_ENTRANCE ; 51
+ macro_80e67 Data_83bf1, TILESET_POKEMON_DOME_ENTRANCE ; 52
+ macro_80e67 Data_83c03, TILESET_POKEMON_DOME_ENTRANCE ; 53
+ macro_80e67 Data_858ef, TILESET_POKEMON_DOME ; 54
+ macro_80e67 Data_85a79, TILESET_POKEMON_DOME ; 55
+ macro_80e67 Data_83c1a, TILESET_POKEMON_DOME ; 56
+ macro_80e67 Data_83c26, TILESET_POKEMON_DOME ; 57
+ macro_80e67 Data_85ce2, TILESET_HALL_OF_HONOR ; 58
+ macro_80e67 Data_85df4, TILESET_HALL_OF_HONOR ; 59
+ macro_80e67 Data_85f7c, TILESET_CARD_POP_1 ; 60
+ macro_80e67 Data_8607f, TILESET_CARD_POP_1 ; 61
+ macro_80e67 Data_83c36, TILESET_MEDAL ; 62
+ macro_80e67 Data_8617d, TILESET_MEDAL ; 63
+ macro_80e67 Data_86193, TILESET_MEDAL ; 64
+ macro_80e67 Data_861a9, TILESET_MEDAL ; 65
+ macro_80e67 Data_861bf, TILESET_MEDAL ; 66
+ macro_80e67 Data_861d5, TILESET_MEDAL ; 67
+ macro_80e67 Data_861eb, TILESET_MEDAL ; 68
+ macro_80e67 Data_86201, TILESET_MEDAL ; 69
+ macro_80e67 Data_86217, TILESET_CARD_POP_2 ; 70
+ macro_80e67 Data_862da, TILESET_CARD_POP_2 ; 71
+ macro_80e67 Data_86364, TILESET_CARD_POP_2 ; 72
+ macro_80e67 Data_86443, TILESET_CARD_POP_2 ; 73
+ macro_80e67 Data_864df, TILESET_CARD_POP_3 ; 74
+ macro_80e67 Data_865b5, TILESET_CARD_POP_3 ; 75
+ macro_80e67 Data_86647, TILESET_COLOSSEUM_1 ; 76
+ macro_80e67 Data_866b8, TILESET_COLOSSEUM_2 ; 77
+ macro_80e67 Data_8673e, TILESET_EVOLUTION_1 ; 78
+ macro_80e67 Data_867af, TILESET_EVOLUTION_2 ; 79
+ macro_80e67 Data_86833, TILESET_MYSTERY_1 ; 80
+ macro_80e67 Data_868a4, TILESET_MYSTERY_2 ; 81
+ macro_80e67 Data_86925, TILESET_LABORATORY_1 ; 82
+ macro_80e67 Data_86996, TILESET_LABORATORY_2 ; 83
+ macro_80e67 Data_86a14, TILESET_CHARIZARD_INTRO_1 ; 84
+ macro_80e67 Data_86a85, TILESET_CHARIZARD_INTRO_2 ; 85
+ macro_80e67 Data_86b28, TILESET_SCYTHER_INTRO_1 ; 86
+ macro_80e67 Data_86b99, TILESET_SCYTHER_INTRO_2 ; 87
+ macro_80e67 Data_86c34, TILESET_AERODACTYL_INTRO_1 ; 88
+ macro_80e67 Data_86ca5, TILESET_AERODACTYL_INTRO_2 ; 89
+ macro_80e67 Data_86d37, TILESET_TITLE_SCREEN_1 ; 90
+ macro_80e67 Data_86dcc, TILESET_TITLE_SCREEN_2 ; 91
+ macro_80e67 Data_86e8a, TILESET_SOLID_TILES_1 ; 92
+ macro_80e67 Data_86f18, TILESET_SOLID_TILES_1 ; 93
+ macro_80e67 Data_86fc0, TILESET_SOLID_TILES_1 ; 94
+ macro_80e67 Data_8704f, TILESET_TITLE_SCREEN_3 ; 95
+ macro_80e67 Data_871a5, TILESET_TITLE_SCREEN_4 ; 96
+ macro_80e67 Data_87397, TILESET_SOLID_TILES_2 ; 97
+ macro_80e67 Data_873b7, TILESET_PLAYER ; 98
+ macro_80e67 Data_873e5, TILESET_RONALD ; 99
+ macro_80e67 Data_87413, TILESET_TITLE_SCREEN_5 ; 100
+ macro_80e67 Data_87538, TILESET_TITLE_SCREEN_6 ; 101
+ macro_80e67 Data_8769f, TILESET_COPYRIGHT ; 102
+ macro_80e67 Data_876f6, TILESET_COPYRIGHT ; 103
+ macro_80e67 Data_8777c, TILESET_NINTENDO ; 104
+ macro_80e67 Data_877c4, TILESET_COMPANIES ; 105
+
+; \1 = pointer
+; \2 = number of tiles
+tileset: MACRO
+ dwb \1, BANK(\1) - BANK(Tilesets)
+ db \2
+ENDM
+
+Tilesets: ; 8100f (20:500f)
+ tileset OverworldMapTiles, 193 ; TILESET_OVERWORLD_MAP
+ tileset MasonLaboratoryTilesetGfx, 151 ; TILESET_MASON_LABORATORY
+ tileset IshiharaTilesetGfx, 77 ; TILESET_ISHIHARA
+ tileset ClubEntranceTilesetGfx, 129 ; TILESET_CLUB_ENTRANCE
+ tileset ClubLobbyTilesetGfx, 120 ; TILESET_CLUB_LOBBY
+ tileset FightingClubTilesetGfx, 99 ; TILESET_FIGHTING_CLUB
+ tileset RockClubTilesetGfx, 60 ; TILESET_ROCK_CLUB
+ tileset WaterClubTilesetGfx, 161 ; TILESET_WATER_CLUB
+ tileset LightningClubTilesetGfx, 131 ; TILESET_LIGHTNING_CLUB
+ tileset GrassClubTilesetGfx, 87 ; TILESET_GRASS_CLUB
+ tileset PsychicClubTilesetGfx, 58 ; TILESET_PSYCHIC_CLUB
+ tileset ScienceClubTilesetGfx, 82 ; TILESET_SCIENCE_CLUB
+ tileset FireClubTilesetGfx, 87 ; TILESET_FIRE_CLUB
+ tileset ChallengeHallTilesetGfx, 157 ; TILESET_CHALLENGE_HALL
+ tileset PokemonDomeEntranceTilesetGfx, 78 ; TILESET_POKEMON_DOME_ENTRANCE
+ tileset PokemonDomeTilesetGfx, 207 ; TILESET_POKEMON_DOME
+ tileset HallOfHonorTilesetGfx, 121 ; TILESET_HALL_OF_HONOR
+ tileset CardPop1Gfx, 189 ; TILESET_CARD_POP_1
+ tileset MedalGfx, 72 ; TILESET_MEDAL
+ tileset CardPop2Gfx, 109 ; TILESET_CARD_POP_2
+ tileset CardPop3Gfx, 93 ; TILESET_CARD_POP_3
+ tileset Colosseum1Gfx, 96 ; TILESET_COLOSSEUM_1
+ tileset Colosseum2Gfx, 86 ; TILESET_COLOSSEUM_2
+ tileset Evolution1Gfx, 96 ; TILESET_EVOLUTION_1
+ tileset Evolution2Gfx, 86 ; TILESET_EVOLUTION_2
+ tileset Mystery1Gfx, 96 ; TILESET_MYSTERY_1
+ tileset Mystery2Gfx, 86 ; TILESET_MYSTERY_2
+ tileset Laboratory1Gfx, 96 ; TILESET_LABORATORY_1
+ tileset Laboratory2Gfx, 86 ; TILESET_LABORATORY_2
+ tileset CharizardIntro1Gfx, 96 ; TILESET_CHARIZARD_INTRO_1
+ tileset CharizardIntro2Gfx, 96 ; TILESET_CHARIZARD_INTRO_2
+ tileset ScytherIntro1Gfx, 96 ; TILESET_SCYTHER_INTRO_1
+ tileset ScytherIntro2Gfx, 96 ; TILESET_SCYTHER_INTRO_2
+ tileset AerodactylIntro1Gfx, 96 ; TILESET_AERODACTYL_INTRO_1
+ tileset AerodactylIntro2Gfx, 96 ; TILESET_AERODACTYL_INTRO_2
+ tileset Titlescreen1Gfx, 97 ; TILESET_TITLE_SCREEN_1
+ tileset Titlescreen2Gfx, 97 ; TILESET_TITLE_SCREEN_2
+ tileset SolidTiles1, 4 ; TILESET_SOLID_TILES_1
+ tileset Titlescreen3Gfx, 244 ; TILESET_TITLE_SCREEN_3
+ tileset Titlescreen4Gfx, 59 ; TILESET_TITLE_SCREEN_4
+ tileset SolidTiles2, 4 ; TILESET_SOLID_TILES_2
+ tileset PlayerGfx, 36 ; TILESET_PLAYER
+ tileset RonaldGfx, 36 ; TILESET_RONALD
+ tileset Titlescreen5Gfx, 220 ; TILESET_TITLE_SCREEN_5
+ tileset Titlescreen6Gfx, 212 ; TILESET_TITLE_SCREEN_6
+ tileset CopyrightGfx, 36 ; TILESET_COPYRIGHT
+ tileset NintendoGfx, 24 ; TILESET_NINTENDO
+ tileset CompaniesGfx, 49 ; TILESET_COMPANIES
+ tileset SamGfx, 36 ; TILESET_SAM
+ tileset ImakuniGfx, 36 ; TILESET_IMAKUNI
+ tileset NikkiGfx, 36 ; TILESET_NIKKI
+ tileset RickGfx, 36 ; TILESET_RICK
+ tileset KenGfx, 36 ; TILESET_KEN
+ tileset AmyGfx, 36 ; TILESET_AMY
+ tileset IsaacGfx, 36 ; TILESET_ISAAC
+ tileset MitchGfx, 36 ; TILESET_MITCH
+ tileset GeneGfx, 36 ; TILESET_GENE
+ tileset MurrayGfx, 36 ; TILESET_MURRAY
+ tileset CourtneyGfx, 36 ; TILESET_COURTNEY
+ tileset SteveGfx, 36 ; TILESET_STEVE
+ tileset JackGfx, 36 ; TILESET_JACK
+ tileset RodGfx, 36 ; TILESET_ROD
+ tileset JosephGfx, 36 ; TILESET_JOSEPH
+ tileset DavidGfx, 36 ; TILESET_DAVID
+ tileset ErikGfx, 36 ; TILESET_ERIK
+ tileset JohnGfx, 36 ; TILESET_JOHN
+ tileset AdamGfx, 36 ; TILESET_ADAM
+ tileset JonathanGfx, 36 ; TILESET_JONATHAN
+ tileset JoshuaGfx, 36 ; TILESET_JOSHUA
+ tileset NicholasGfx, 36 ; TILESET_NICHOLAS
+ tileset BrandonGfx, 36 ; TILESET_BRANDON
+ tileset MatthewGfx, 36 ; TILESET_MATTHEW
+ tileset RyanGfx, 36 ; TILESET_RYAN
+ tileset AndrewGfx, 36 ; TILESET_ANDREW
+ tileset ChrisGfx, 36 ; TILESET_CHRIS
+ tileset MichaelGfx, 36 ; TILESET_MICHAEL
+ tileset DanielGfx, 36 ; TILESET_DANIEL
+ tileset RobertGfx, 36 ; TILESET_ROBERT
+ tileset BrittanyGfx, 36 ; TILESET_BRITTANY
+ tileset KristinGfx, 36 ; TILESET_KRISTIN
+ tileset HeatherGfx, 36 ; TILESET_HEATHER
+ tileset SaraGfx, 36 ; TILESET_SARA
+ tileset AmandaGfx, 36 ; TILESET_AMANDA
+ tileset JenniferGfx, 36 ; TILESET_JENNIFER
+ tileset JessicaGfx, 36 ; TILESET_JESSICA
+ tileset StephanieGfx, 36 ; TILESET_STEPHANIE
+ tileset AaronGfx, 36 ; TILESET_AARON
; \1 = gfx pointer
; \2 = number of tiles
diff --git a/src/engine/home.asm b/src/engine/home.asm
index 47e48ff..326e327 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -11300,7 +11300,8 @@ FillMemoryWithDE: ; 3c1f (0:3c1f)
pop hl
ret
-Func_3c2d: ; 3c2d (0:3c2d)
+; gets far byte a:hl, outputs value in a
+GetFarByte: ; 3c2d (0:3c2d)
push hl
push af
ldh a, [hBankROM]
diff --git a/src/gfx.asm b/src/gfx.asm
index 9774877..c2db3e9 100644
--- a/src/gfx.asm
+++ b/src/gfx.asm
@@ -568,20 +568,20 @@ Data_877c4:: ; 877c4 (21:77c4)
INCBIN "data/maps/map105.bin"
-IshiharaTilesetGfx: ; 87828 (21:7828)
- dw $4d
+IshiharaTilesetGfx:: ; 87828 (21:7828)
+ dw 77
INCBIN "gfx/tilesets/ishihara.2bpp"
-SolidTiles1: ; 87cfa (21:7cfa)
- dw $4
+SolidTiles1:: ; 87cfa (21:7cfa)
+ dw 4
INCBIN "gfx/solid_tiles.2bpp"
-SolidTiles2: ; 87d3c (21:7d3c)
- dw $4
+SolidTiles2:: ; 87d3c (21:7d3c)
+ dw 4
INCBIN "gfx/solid_tiles.2bpp"
-PlayerGfx: ; 87d7e (21:7d7e)
- dw $24
+PlayerGfx:: ; 87d7e (21:7d7e)
+ dw 36
INCBIN "gfx/duelists/player.2bpp"
Duel55Gfx:: ; 87fc0 (21:7fc0)
@@ -601,36 +601,36 @@ AnimData12:: ; 87ff4 (21:7ff4)
SECTION "Gfx 4", ROMX
-OverworldMapTiles: ; 88000 (22:4000)
- dw $c1
+OverworldMapTiles:: ; 88000 (22:4000)
+ dw 193
INCBIN "gfx/overworld_map.2bpp"
-MasonLaboratoryTilesetGfx: ; 88c12 (22:4c12)
- dw $97
+MasonLaboratoryTilesetGfx:: ; 88c12 (22:4c12)
+ dw 151
INCBIN "gfx/tilesets/masonlaboratory.2bpp"
-ClubEntranceTilesetGfx: ; 89584 (22:5584)
- dw $81
+ClubEntranceTilesetGfx:: ; 89584 (22:5584)
+ dw 129
INCBIN "gfx/tilesets/clubentrance.2bpp"
-ClubLobbyTilesetGfx: ; 89d96 (22:5d96)
- dw $78
+ClubLobbyTilesetGfx:: ; 89d96 (22:5d96)
+ dw 120
INCBIN "gfx/tilesets/clublobby.2bpp"
-FightingClubTilesetGfx: ; 8a518 (22:6518)
- dw $63
+FightingClubTilesetGfx:: ; 8a518 (22:6518)
+ dw 99
INCBIN "gfx/tilesets/fightingclub.2bpp"
-RockClubTilesetGfx: ; 8ab4a (22:6b4a)
- dw $3c
+RockClubTilesetGfx:: ; 8ab4a (22:6b4a)
+ dw 60
INCBIN "gfx/tilesets/rockclub.2bpp"
-WaterClubTilesetGfx: ; 8af0c (22:6f0c)
- dw $a1
+WaterClubTilesetGfx:: ; 8af0c (22:6f0c)
+ dw 161
INCBIN "gfx/tilesets/waterclub.2bpp"
-GrassClubTilesetGfx: ; 8b91e (22:791e)
- dw $57
+GrassClubTilesetGfx:: ; 8b91e (22:791e)
+ dw 87
INCBIN "gfx/tilesets/grassclub.2bpp"
OWPlayerGfx:: ; 8be90 (22:7e90)
@@ -659,40 +659,40 @@ endr
SECTION "Gfx 5", ROMX
-LightningClubTilesetGfx: ; 8c000 (23:4000)
- dw $83
+LightningClubTilesetGfx:: ; 8c000 (23:4000)
+ dw 131
INCBIN "gfx/tilesets/lightningclub.2bpp"
-PsychicClubTilesetGfx: ; 8c832 (23:4832)
- dw $3a
+PsychicClubTilesetGfx:: ; 8c832 (23:4832)
+ dw 58
INCBIN "gfx/tilesets/psychicclub.2bpp"
-ScienceClubTilesetGfx: ; 8cbd4 (23:4bd4)
- dw $52
+ScienceClubTilesetGfx:: ; 8cbd4 (23:4bd4)
+ dw 82
INCBIN "gfx/tilesets/scienceclub.2bpp"
-FireClubTilesetGfx: ; 8d0f6 (23:50f6)
- dw $57
+FireClubTilesetGfx:: ; 8d0f6 (23:50f6)
+ dw 87
INCBIN "gfx/tilesets/fireclub.2bpp"
-ChallengeHallTilesetGfx: ; 8d668 (23:5668)
- dw $9d
+ChallengeHallTilesetGfx:: ; 8d668 (23:5668)
+ dw 157
INCBIN "gfx/tilesets/challengehall.2bpp"
-PokemonDomeEntranceTilesetGfx: ; 8e03a (23:603a)
- dw $4e
+PokemonDomeEntranceTilesetGfx:: ; 8e03a (23:603a)
+ dw 78
INCBIN "gfx/tilesets/pokemondomeentrance.2bpp"
-PokemonDomeTilesetGfx: ; 8e51c (23:651c)
- dw $cf
+PokemonDomeTilesetGfx:: ; 8e51c (23:651c)
+ dw 207
INCBIN "gfx/tilesets/pokemondome.2bpp"
-HallOfHonorTilesetGfx: ; 8f20e (23:720e)
- dw $79
+HallOfHonorTilesetGfx:: ; 8f20e (23:720e)
+ dw 121
INCBIN "gfx/tilesets/hallofhonor.2bpp"
-MedalGfx: ; 8f9a0 (23:79a0)
- dw $48
+MedalGfx:: ; 8f9a0 (23:79a0)
+ dw 72
INCBIN "gfx/medals.2bpp", $0, $c0
INCBIN "gfx/medals.2bpp", $240, $30
INCBIN "gfx/medals.2bpp", $340, $10
@@ -712,8 +712,8 @@ MedalGfx: ; 8f9a0 (23:79a0)
INCBIN "gfx/medals.2bpp", $420, $30
INCBIN "gfx/medals.2bpp", $3f0, $20
-NintendoGfx: ; 8fe22 (23:7e22)
- dw $18
+NintendoGfx:: ; 8fe22 (23:7e22)
+ dw 24
INCBIN "gfx/nintendo.2bpp"
Duel58Gfx:: ; 8ffa4 (23:7fa4)
@@ -733,48 +733,48 @@ AnimData11:: ; 8fff5 (23:7ff5)
SECTION "Gfx 6", ROMX
-CardPop1Gfx: ; 90000 (24:4000)
- dw $bd
+CardPop1Gfx:: ; 90000 (24:4000)
+ dw 189
INCBIN "gfx/cardpop/cardpop1.2bpp"
-CardPop2Gfx: ; 90bd2 (24:4bd2)
- dw $6d
+CardPop2Gfx:: ; 90bd2 (24:4bd2)
+ dw 109
INCBIN "gfx/cardpop/cardpop2.2bpp"
-CardPop3Gfx: ; 912a4 (24:52a4)
- dw $5d
+CardPop3Gfx:: ; 912a4 (24:52a4)
+ dw 93
INCBIN "gfx/cardpop/cardpop3.2bpp"
-Colosseum1Gfx: ; 91876 (24:5876)
- dw $60
+Colosseum1Gfx:: ; 91876 (24:5876)
+ dw 96
INCBIN "gfx/booster_packs/colosseum1.2bpp"
-Colosseum2Gfx: ; 91e78 (24:5e78)
- dw $56
+Colosseum2Gfx:: ; 91e78 (24:5e78)
+ dw 86
INCBIN "gfx/booster_packs/colosseum2.2bpp"
-Evolution1Gfx: ; 923da (24:63da)
- dw $60
+Evolution1Gfx:: ; 923da (24:63da)
+ dw 96
INCBIN "gfx/booster_packs/evolution1.2bpp"
-Evolution2Gfx: ; 929dc (24:69dc)
- dw $56
+Evolution2Gfx:: ; 929dc (24:69dc)
+ dw 86
INCBIN "gfx/booster_packs/evolution2.2bpp"
-Mystery1Gfx: ; 92f3e (24:6f3e)
- dw $60
+Mystery1Gfx:: ; 92f3e (24:6f3e)
+ dw 96
INCBIN "gfx/booster_packs/mystery1.2bpp"
-Mystery2Gfx: ; 93540 (24:7540)
- dw $56
+Mystery2Gfx:: ; 93540 (24:7540)
+ dw 86
INCBIN "gfx/booster_packs/mystery2.2bpp"
-RonaldGfx: ; 93aa2 (24:7aa2)
- dw $24
+RonaldGfx:: ; 93aa2 (24:7aa2)
+ dw 36
INCBIN "gfx/duelists/ronald.2bpp"
-CopyrightGfx: ; 93ce4 (24:7ce4)
- dw $24
+CopyrightGfx:: ; 93ce4 (24:7ce4)
+ dw 36
INCBIN "gfx/copyright.2bpp"
OWClerkGfx:: ; 93f26 (24:7f26)
@@ -795,48 +795,48 @@ endr
SECTION "Gfx 7", ROMX
-Laboratory1Gfx: ; 94000 (25:4000)
- dw $60
+Laboratory1Gfx:: ; 94000 (25:4000)
+ dw 96
INCBIN "gfx/booster_packs/laboratory1.2bpp"
-Laboratory2Gfx: ; 94602 (25:4602)
- dw $56
+Laboratory2Gfx:: ; 94602 (25:4602)
+ dw 86
INCBIN "gfx/booster_packs/laboratory2.2bpp"
-CharizardIntro1Gfx: ; 94b64 (25:4b64)
- dw $60
+CharizardIntro1Gfx:: ; 94b64 (25:4b64)
+ dw 96
INCBIN "gfx/titlescreen/booster_packs/charizardintro1.2bpp"
-CharizardIntro2Gfx: ; 95166 (25:5166)
- dw $60
+CharizardIntro2Gfx:: ; 95166 (25:5166)
+ dw 96
INCBIN "gfx/titlescreen/booster_packs/charizardintro2.2bpp"
-ScytherIntro1Gfx: ; 95768 (25:5768)
- dw $60
+ScytherIntro1Gfx:: ; 95768 (25:5768)
+ dw 96
INCBIN "gfx/titlescreen/booster_packs/scytherintro1.2bpp"
-ScytherIntro2Gfx: ; 95d6a (25:5d6a)
- dw $60
+ScytherIntro2Gfx:: ; 95d6a (25:5d6a)
+ dw 96
INCBIN "gfx/titlescreen/booster_packs/scytherintro2.2bpp"
-AerodactylIntro1Gfx: ; 9636c (25:636c)
- dw $60
+AerodactylIntro1Gfx:: ; 9636c (25:636c)
+ dw 96
INCBIN "gfx/titlescreen/booster_packs/aerodactylintro1.2bpp"
-AerodactylIntro2Gfx: ; 9696e (25:696e)
- dw $60
+AerodactylIntro2Gfx:: ; 9696e (25:696e)
+ dw 96
INCBIN "gfx/titlescreen/booster_packs/aerodactylintro2.2bpp"
-Titlescreen1Gfx: ; 96f70 (25:6f70)
- dw $61
+Titlescreen1Gfx:: ; 96f70 (25:6f70)
+ dw 97
INCBIN "gfx/titlescreen/titlescreen1.2bpp"
-Titlescreen2Gfx: ; 97582 (25:7582)
- dw $61
+Titlescreen2Gfx:: ; 97582 (25:7582)
+ dw 97
INCBIN "gfx/titlescreen/titlescreen2.2bpp"
-CompaniesGfx: ; 97b94 (25:7b94)
- dw $31
+CompaniesGfx:: ; 97b94 (25:7b94)
+ dw 49
INCBIN "gfx/companies.2bpp"
OWRonaldGfx:: ; 97ea6 (25:7ea6)
@@ -855,20 +855,20 @@ endr
SECTION "Gfx 8", ROMX
-Titlescreen3Gfx: ; 98000 (26:4000)
- dw $f4
+Titlescreen3Gfx:: ; 98000 (26:4000)
+ dw 244
INCBIN "gfx/titlescreen/titlescreen3.2bpp"
-Titlescreen4Gfx: ; 98f42 (26:4f42)
- dw $13b
+Titlescreen4Gfx:: ; 98f42 (26:4f42)
+ dw 315
INCBIN "gfx/titlescreen/titlescreen4.2bpp"
-Titlescreen5Gfx: ; 9a2f4 (26:62f4)
- dw $dc
+Titlescreen5Gfx:: ; 9a2f4 (26:62f4)
+ dw 220
INCBIN "gfx/titlescreen/titlescreen5.2bpp"
-Titlescreen6Gfx: ; 9b0b6 (26:70b6)
- dw $d4
+Titlescreen6Gfx:: ; 9b0b6 (26:70b6)
+ dw 212
INCBIN "gfx/titlescreen/titlescreen6.2bpp"
OWDrMasonGfx:: ; 9bdf8 (26:7df8)
@@ -889,116 +889,116 @@ Duel62Gfx:: ; 9bfee (26:7fee)
SECTION "Gfx 9", ROMX
-SamGfx: ; 9c000 (27:4000)
- dw $24
+SamGfx:: ; 9c000 (27:4000)
+ dw 36
INCBIN "gfx/duelists/sam.2bpp"
-ImakuniGfx: ; 9c242 (27:4242)
- dw $24
+ImakuniGfx:: ; 9c242 (27:4242)
+ dw 36
INCBIN "gfx/duelists/imakuni.2bpp"
-NikkiGfx: ; 9c484 (27:4484)
- dw $24
+NikkiGfx:: ; 9c484 (27:4484)
+ dw 36
INCBIN "gfx/duelists/nikki.2bpp"
-RickGfx: ; 9c6c6 (27:46c6)
- dw $24
+RickGfx:: ; 9c6c6 (27:46c6)
+ dw 36
INCBIN "gfx/duelists/rick.2bpp"
-KenGfx: ; 9c908 (27:4908)
- dw $24
+KenGfx:: ; 9c908 (27:4908)
+ dw 36
INCBIN "gfx/duelists/ken.2bpp"
-AmyGfx: ; 9cb4a (27:4b4a)
- dw $24
+AmyGfx:: ; 9cb4a (27:4b4a)
+ dw 36
INCBIN "gfx/duelists/amy.2bpp"
-IsaacGfx: ; 9cd8c (27:4d8c)
- dw $24
+IsaacGfx:: ; 9cd8c (27:4d8c)
+ dw 36
INCBIN "gfx/duelists/isaac.2bpp"
-MitchGfx: ; 9cfce (27:4fce)
- dw $24
+MitchGfx:: ; 9cfce (27:4fce)
+ dw 36
INCBIN "gfx/duelists/mitch.2bpp"
-GeneGfx: ; 9d210 (27:5210)
- dw $24
+GeneGfx:: ; 9d210 (27:5210)
+ dw 36
INCBIN "gfx/duelists/gene.2bpp"
-MurrayGfx: ; 9d452 (27:5452)
- dw $24
+MurrayGfx:: ; 9d452 (27:5452)
+ dw 36
INCBIN "gfx/duelists/murray.2bpp"
-CourtneyGfx: ; 9d694 (27:5694)
- dw $24
+CourtneyGfx:: ; 9d694 (27:5694)
+ dw 36
INCBIN "gfx/duelists/courtney.2bpp"
-SteveGfx: ; 9d8d6 (27:58d6)
- dw $24
+SteveGfx:: ; 9d8d6 (27:58d6)
+ dw 36
INCBIN "gfx/duelists/steve.2bpp"
-JackGfx: ; 9db18 (27:5b18)
- dw $24
+JackGfx:: ; 9db18 (27:5b18)
+ dw 36
INCBIN "gfx/duelists/jack.2bpp"
-RodGfx: ; 9dd5a (27:5d5a)
- dw $24
+RodGfx:: ; 9dd5a (27:5d5a)
+ dw 36
INCBIN "gfx/duelists/rod.2bpp"
-JosephGfx: ; 9df9c (27:5f9c)
- dw $24
+JosephGfx:: ; 9df9c (27:5f9c)
+ dw 36
INCBIN "gfx/duelists/joseph.2bpp"
-DavidGfx: ; 9e1de (27:61de)
- dw $24
+DavidGfx:: ; 9e1de (27:61de)
+ dw 36
INCBIN "gfx/duelists/david.2bpp"
-ErikGfx: ; 9e420 (27:6420)
- dw $24
+ErikGfx:: ; 9e420 (27:6420)
+ dw 36
INCBIN "gfx/duelists/erik.2bpp"
-JohnGfx: ; 9e662 (27:6662)
- dw $24
+JohnGfx:: ; 9e662 (27:6662)
+ dw 36
INCBIN "gfx/duelists/john.2bpp"
-AdamGfx: ; 9e8a4 (27:68a4)
- dw $24
+AdamGfx:: ; 9e8a4 (27:68a4)
+ dw 36
INCBIN "gfx/duelists/adam.2bpp"
-JonathanGfx: ; 9eae6 (27:6ae6)
- dw $24
+JonathanGfx:: ; 9eae6 (27:6ae6)
+ dw 36
INCBIN "gfx/duelists/jonathan.2bpp"
-JoshuaGfx: ; 9ed28 (27:6d28)
- dw $24
+JoshuaGfx:: ; 9ed28 (27:6d28)
+ dw 36
INCBIN "gfx/duelists/joshua.2bpp"
-NicholasGfx: ; 9ef6a (27:6f6a)
- dw $24
+NicholasGfx:: ; 9ef6a (27:6f6a)
+ dw 36
INCBIN "gfx/duelists/nicholas.2bpp"
-BrandonGfx: ; 9f1ac (27:71ac)
- dw $24
+BrandonGfx:: ; 9f1ac (27:71ac)
+ dw 36
INCBIN "gfx/duelists/brandon.2bpp"
-MatthewGfx: ; 9f3ee (27:73ee)
- dw $24
+MatthewGfx:: ; 9f3ee (27:73ee)
+ dw 36
INCBIN "gfx/duelists/matthew.2bpp"
-RyanGfx: ; 9f630 (27:7630)
- dw $24
+RyanGfx:: ; 9f630 (27:7630)
+ dw 36
INCBIN "gfx/duelists/ryan.2bpp"
-AndrewGfx: ; 9f872 (27:7872)
- dw $24
+AndrewGfx:: ; 9f872 (27:7872)
+ dw 36
INCBIN "gfx/duelists/andrew.2bpp"
-ChrisGfx: ; 9fab4 (27:7ab4)
- dw $24
+ChrisGfx:: ; 9fab4 (27:7ab4)
+ dw 36
INCBIN "gfx/duelists/chris.2bpp"
-MichaelGfx: ; 9fcf6 (27:7cf6)
- dw $24
+MichaelGfx:: ; 9fcf6 (27:7cf6)
+ dw 36
INCBIN "gfx/duelists/michael.2bpp"
Duel63Gfx:: ; 9ff38 (27:7f38)
@@ -1015,48 +1015,48 @@ endr
SECTION "Gfx 10", ROMX
-DanielGfx: ; a0000 (28:4000)
- dw $24
+DanielGfx:: ; a0000 (28:4000)
+ dw 36
INCBIN "gfx/duelists/daniel.2bpp"
-RobertGfx: ; a0242 (28:4242)
- dw $24
+RobertGfx:: ; a0242 (28:4242)
+ dw 36
INCBIN "gfx/duelists/robert.2bpp"
-BrittanyGfx: ; a0484 (28:4484)
- dw $24
+BrittanyGfx:: ; a0484 (28:4484)
+ dw 36
INCBIN "gfx/duelists/brittany.2bpp"
-KristinGfx: ; a06c6 (28:46c6)
- dw $24
+KristinGfx:: ; a06c6 (28:46c6)
+ dw 36
INCBIN "gfx/duelists/kristin.2bpp"
-HeatherGfx: ; a0908 (28:4908)
- dw $24
+HeatherGfx:: ; a0908 (28:4908)
+ dw 36
INCBIN "gfx/duelists/heather.2bpp"
-SaraGfx: ; a0b4a (28:4b4a)
- dw $24
+SaraGfx:: ; a0b4a (28:4b4a)
+ dw 36
INCBIN "gfx/duelists/sara.2bpp"
-AmandaGfx: ; a0d8c (28:4d8c)
- dw $24
+AmandaGfx:: ; a0d8c (28:4d8c)
+ dw 36
INCBIN "gfx/duelists/amanda.2bpp"
-JenniferGfx: ; a0fce (28:4fce)
- dw $24
+JenniferGfx:: ; a0fce (28:4fce)
+ dw 36
INCBIN "gfx/duelists/jennifer.2bpp"
-JessicaGfx: ; a1210 (28:5210)
- dw $24
+JessicaGfx:: ; a1210 (28:5210)
+ dw 36
INCBIN "gfx/duelists/jessica.2bpp"
-StephanieGfx: ; a1452 (28:5452)
- dw $24
+StephanieGfx:: ; a1452 (28:5452)
+ dw 36
INCBIN "gfx/duelists/stephanie.2bpp"
-AaronGfx: ; a1694 (28:5694)
- dw $24
+AaronGfx:: ; a1694 (28:5694)
+ dw 36
INCBIN "gfx/duelists/aaron.2bpp"
OWIshiharaGfx:: ; a18d6 (28:58d6)
diff --git a/src/wram.asm b/src/wram.asm
index 849b45c..4b18de1 100644
--- a/src/wram.asm
+++ b/src/wram.asm
@@ -2123,7 +2123,9 @@ wd237:: ; d237
wd238:: ; d238
ds $1
-wd239:: ; d239
+; current tileset to load to VRAM
+; TILESET_* constant
+wCurTileset:: ; d239
ds $1
wd23a:: ; d23a
@@ -2489,11 +2491,9 @@ wTempPointerBank:: ; d4c6
wCurSpriteTileSize:: ; d4c7
ds $1
-; stores number of tiles that current sprite has
-wCurSpriteNumTiles:: ; d4c8
- ds $1
-
- ds $1
+; stores number of tiles that current sprite/tileset has
+wTotalNumTiles:: ; d4c8
+ ds $2
; stores tile offset in VRAM
wVRAMTileOffset:: ; d4ca
@@ -2501,6 +2501,8 @@ wVRAMTileOffset:: ; d4ca
wd4ca:: ; d4ca
ds $1
+; bottom bit stores which VRAM bank to draw certain gfx
+; $0 = VRAM0, $1 = VRAM1
wd4cb:: ; d4cb
ds $1