summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2018-02-27 19:25:36 +0100
committerxCrystal <rgr.crystal@gmail.com>2018-02-27 19:25:36 +0100
commita4c180c73331a90196fc51c49cf9fd8e8788db49 (patch)
tree567c649a0b79fd2cd64f40712ec3448a9f9c21b8 /src
parent196b4ae0bf6e18856a74d34ada4f24458b9e9d57 (diff)
Further split duel graphics
Diffstat (limited to 'src')
-rw-r--r--src/constants/gfx_constants.asm1
-rw-r--r--src/engine/home.asm47
-rw-r--r--src/gfx.asm14
-rw-r--r--src/gfx/duel/cgb_symbols.t7.pngbin0 -> 2960 bytes
-rw-r--r--src/gfx/duel/dmg_sgb_symbols.t7.pngbin0 -> 3107 bytes
-rw-r--r--src/gfx/duel/duel_graphics.t5.pngbin6711 -> 0 bytes
-rw-r--r--src/gfx/duel/other.t7.pngbin0 -> 1588 bytes
7 files changed, 35 insertions, 27 deletions
diff --git a/src/constants/gfx_constants.asm b/src/constants/gfx_constants.asm
index 2f5ca4a..386e158 100644
--- a/src/constants/gfx_constants.asm
+++ b/src/constants/gfx_constants.asm
@@ -11,6 +11,7 @@ CGB_PAL_SIZE EQU 8 ; bytes
; tile size
TILE_SIZE EQU 16 ; bytes
+tiles EQUS "* TILE_SIZE"
; wFlushPaletteFlags constants
FLUSH_ONE EQU %10000000
diff --git a/src/engine/home.asm b/src/engine/home.asm
index 427864c..953e35a 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -5572,69 +5572,68 @@ FillRectangle: ; 1f5f (0:1f5f)
; loads the symbols that are displayed near the names of a list of cards in the hand or discard pile
LoadDuelCardSymbolTiles: ; 20b0 (0:20b0)
- ld hl, DuelGraphics - $4000
+ ld hl, DuelDmgSgbSymbolGraphics - $4000
ld a, [wConsole]
cp CONSOLE_CGB
jr nz, .copy
- ld hl, DuelGraphics + $810 - $4000
+ ld hl, DuelCgbSymbolGraphics - $4000
.copy
- ld de, v0Tiles1 + $500
+ ld de, v0Tiles1 + $50 tiles
ld b, $30
jr CopyFontsOrDuelGraphicsTiles
-; similar to LoadDuelCardSymbolTiles, but instead of loading the
-; basic Pokemon card symbol, it loads the face down stage 0 card
+; loads the symbols for Stage 1 Pkmn card, Stage 2 Pkmn card, and Trainer card
LoadDuelCardSymbolTiles2: ; 20c4 (0:20c4)
- ld hl, DuelGraphics + $40 - $4000
+ ld hl, DuelDmgSgbSymbolGraphics + $4 tiles - $4000
ld a, [wConsole]
cp CONSOLE_CGB
jr nz, .copy
- ld hl, DuelGraphics + $850 - $4000
+ ld hl, DuelCgbSymbolGraphics + $4 tiles - $4000
.copy
- ld de, v0Tiles1 + $540
+ ld de, v0Tiles1 + $54 tiles
ld b, $c
jr CopyFontsOrDuelGraphicsTiles
; load the face down stage0 / stage1 / stage2 card images shown in the ckeck Pokemon screens
LoadDuelFaceDownCardTiles: ; 20d8 (0:20d8)
ld b, $10
- jr LoadDuelCheckPokemonScreenTiles.asm_20de
+ jr LoadDuelCheckPokemonScreenTiles.got_num_tiles
; same as LoadDuelFaceDownCardTiles, plus also load the ACT / BP text tiles
LoadDuelCheckPokemonScreenTiles: ; 20dc (0:20dc)
ld b, $24
-.asm_20de
- ld hl, DuelGraphics + $300 - $4000
+.got_num_tiles
+ ld hl, DuelDmgSgbSymbolGraphics + $30 tiles - $4000
ld a, [wConsole]
cp CONSOLE_CGB
jr nz, .copy
- ld hl, DuelGraphics + $b10 - $4000
+ ld hl, DuelCgbSymbolGraphics + $30 tiles - $4000
.copy
- ld de, v0Tiles1 + $500
+ ld de, v0Tiles1 + $50 tiles
jr CopyFontsOrDuelGraphicsTiles
; load the tiles for the "Placing the prizes..." screen
LoadPlacingThePrizesScreenTiles: ; 20f0 (0:20f0)
; load the Pokeball field tiles
- ld hl, DuelGraphics + $1020 - $4000
- ld de, v0Tiles1 + $200
+ ld hl, DuelOtherGraphics
+ ld de, v0Tiles1 + $20 tiles
ld b, $d
call CopyFontsOrDuelGraphicsTiles
; load the Deck image and the Discard Pile image
- ld hl, DuelGraphics + $540 - $4000
+ ld hl, DuelDmgSgbSymbolGraphics + $54 tiles - $4000
ld a, [wConsole]
cp CONSOLE_CGB
jr nz, .copy
- ld hl, DuelGraphics + $d50 - $4000
+ ld hl, DuelCgbSymbolGraphics + $54 tiles - $4000
.copy
- ld de, v0Tiles1 + $500
+ ld de, v0Tiles1 + $50 tiles
ld b, $30
jr CopyFontsOrDuelGraphicsTiles
; load the tiles for the [O] and [X] symbols used to display the results of a coin toss
LoadDuelCoinTossResultTiles: ; 210f (0:210f)
- ld hl, DuelGraphics + $10f0 - $4000
- ld de, v0Tiles2 + $300
+ ld hl, DuelOtherGraphics + $d tiles
+ ld de, v0Tiles2 + $30 tiles
ld b, $8
jr CopyFontsOrDuelGraphicsTiles
@@ -5663,7 +5662,7 @@ Func_212f: ; 212f (0:212f)
ld de, $a400
ld b, $30
call CopyFontsOrDuelGraphicsTiles
- ld hl, DuelGraphics + $1170 - $4000
+ ld hl, DuelOtherGraphics + $150
ld de, $a700
ld b, $08
call CopyFontsOrDuelGraphicsTiles
@@ -5675,12 +5674,12 @@ Func_212f: ; 212f (0:212f)
add hl, hl
add hl, hl
add hl, hl
- ld de, DuelGraphics - $4000
+ ld de, DuelDmgSgbSymbolGraphics - $4000
add hl, de
ld de, $a780
ld b, $04
call CopyFontsOrDuelGraphicsTiles
- ld hl, DuelGraphics - $4000
+ ld hl, DuelDmgSgbSymbolGraphics - $4000
ld de, $b100
ld b, $30
jr CopyFontsOrDuelGraphicsTiles
@@ -5688,7 +5687,7 @@ Func_212f: ; 212f (0:212f)
DrawDuelBoxMessage: ; 2167 (0:2167)
ld l, a
- ld h, (40 * TILE_SIZE) / 4 ; boxes are 10x4 tiles
+ ld h, (40 tiles) / 4 ; boxes are 10x4 tiles
call HtimesL
add hl, hl
add hl, hl
diff --git a/src/gfx.asm b/src/gfx.asm
index 719d64b..c6308b4 100644
--- a/src/gfx.asm
+++ b/src/gfx.asm
@@ -8,18 +8,26 @@ INCBIN "gfx/fonts.t3.1bpp"
VWF:: ; 76668 (1d:6668)
INCBIN "gfx/vwf.1bpp"
+DuelGraphics::
+
DuelHUDGraphics:: ; 76968 (1d:6968)
INCBIN "gfx/duel/hud.2bpp"
DuelCardTypeGraphics:: ; 76ce8 (1d:6ce8)
INCBIN "gfx/duel/card_types.2bpp"
-DuelGraphics:: ; 76fe8 (1d:6fe8)
-INCBIN "gfx/duel/duel_graphics.t5.2bpp", $0, $1018
+DuelDmgSgbSymbolGraphics:: ; 76fe8 (1d:6fe8)
+INCBIN "gfx/duel/dmg_sgb_symbols.t7.2bpp"
+
+DuelCgbSymbolGraphics:: ; 777f8 (1d:77f8)
+INCBIN "gfx/duel/cgb_symbols.t7.2bpp", $0, $808
SECTION "Gfx 2", ROMX
-INCBIN "gfx/duel/duel_graphics.t5.2bpp", $1018, $318
+INCBIN "gfx/duel/cgb_symbols.t7.2bpp", $808, $8
+
+DuelOtherGraphics:: ; 78008 (1e:4008)
+INCBIN "gfx/duel/other.t7.2bpp"
DuelBoxMessages:: ; 78318 (1e:4318)
INCBIN "gfx/duel/box_messages.2bpp"
diff --git a/src/gfx/duel/cgb_symbols.t7.png b/src/gfx/duel/cgb_symbols.t7.png
new file mode 100644
index 0000000..578867f
--- /dev/null
+++ b/src/gfx/duel/cgb_symbols.t7.png
Binary files differ
diff --git a/src/gfx/duel/dmg_sgb_symbols.t7.png b/src/gfx/duel/dmg_sgb_symbols.t7.png
new file mode 100644
index 0000000..10715db
--- /dev/null
+++ b/src/gfx/duel/dmg_sgb_symbols.t7.png
Binary files differ
diff --git a/src/gfx/duel/duel_graphics.t5.png b/src/gfx/duel/duel_graphics.t5.png
deleted file mode 100644
index 6b6b8e3..0000000
--- a/src/gfx/duel/duel_graphics.t5.png
+++ /dev/null
Binary files differ
diff --git a/src/gfx/duel/other.t7.png b/src/gfx/duel/other.t7.png
new file mode 100644
index 0000000..796ecf7
--- /dev/null
+++ b/src/gfx/duel/other.t7.png
Binary files differ