summaryrefslogtreecommitdiff
path: root/engine/pokedex/pokedex_3.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/pokedex/pokedex_3.asm')
-rw-r--r--engine/pokedex/pokedex_3.asm162
1 files changed, 162 insertions, 0 deletions
diff --git a/engine/pokedex/pokedex_3.asm b/engine/pokedex/pokedex_3.asm
new file mode 100644
index 000000000..dc52f83d3
--- /dev/null
+++ b/engine/pokedex/pokedex_3.asm
@@ -0,0 +1,162 @@
+LoadSGBPokedexGFX: ; 1ddf1c
+ ld hl, SGBPokedexGFX_LZ
+ ld de, vTiles2 tile $31
+ call Decompress
+ ret
+
+LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26)
+ ld hl, SGBPokedexGFX_LZ
+ ld de, vTiles2 tile $31
+ lb bc, BANK(SGBPokedexGFX_LZ), 58
+ call DecompressRequest2bpp
+ ret
+
+SGBPokedexGFX_LZ: ; 1ddf33
+INCBIN "gfx/pokedex/sgb.2bpp.lz"
+
+LoadQuestionMarkPic: ; 1de0d7
+ ld hl, .QuestionMarkLZ
+ ld de, sScratch
+ call Decompress
+ ret
+
+.QuestionMarkLZ: ; 1de0e1
+INCBIN "gfx/pokemon/questionmark/front.2bpp.lz"
+
+DrawPokedexListWindow: ; 1de171 (77:6171)
+ ld a, $32
+ hlcoord 0, 17
+ ld bc, 12
+ call ByteFill
+ hlcoord 0, 1
+ lb bc, 15, 11
+ call ClearBox
+ ld a, $34
+ hlcoord 0, 0
+ ld bc, 11
+ call ByteFill
+ ld a, $39
+ hlcoord 0, 16
+ ld bc, 11
+ call ByteFill
+ hlcoord 5, 0
+ ld [hl], $3f
+ hlcoord 5, 16
+ ld [hl], $40
+ ld a, [wCurrentDexMode]
+ cp DEXMODE_OLD
+ jr z, .OldMode
+; scroll bar
+ hlcoord 11, 0
+ ld [hl], $50
+ ld a, $51
+ hlcoord 11, 1
+ ld b, SCREEN_HEIGHT - 3
+ call Bank77_FillColumn
+ ld [hl], $52
+ jr .Done
+
+.OldMode:
+; no scroll bar
+ hlcoord 11, 0
+ ld [hl], $66
+ ld a, $67
+ hlcoord 11, 1
+ ld b, SCREEN_HEIGHT - 3
+ call Bank77_FillColumn
+ ld [hl], $68
+.Done:
+ ret
+
+DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1)
+ ld a, $34
+ hlcoord 0, 0
+ ld bc, 11
+ call ByteFill
+ ld a, $39
+ hlcoord 0, 10
+ ld bc, 11
+ call ByteFill
+ hlcoord 5, 0
+ ld [hl], $3f
+ hlcoord 5, 10
+ ld [hl], $40
+ hlcoord 11, 0
+ ld [hl], $66
+ ld a, $67
+ hlcoord 11, 1
+ ld b, SCREEN_HEIGHT / 2
+ call Bank77_FillColumn
+ ld [hl], $68
+ ld a, $34
+ hlcoord 0, 11
+ ld bc, 11
+ call ByteFill
+ ld a, $39
+ hlcoord 0, 17
+ ld bc, 11
+ call ByteFill
+ hlcoord 11, 11
+ ld [hl], $66
+ ld a, $67
+ hlcoord 11, 12
+ ld b, 5
+ call Bank77_FillColumn
+ ld [hl], $68
+ hlcoord 0, 12
+ lb bc, 5, 11
+ call ClearBox
+ ld de, .esults_D
+ hlcoord 0, 12
+ call PlaceString
+ ret
+
+.esults_D ; 1de23c
+; (SEARCH R)
+ db "ESULTS"
+ next ""
+; (### FOUN)
+ next "D!@"
+
+DrawDexEntryScreenRightEdge: ; 1de247
+ ld a, [hBGMapAddress]
+ ld l, a
+ ld a, [hBGMapAddress + 1]
+ ld h, a
+ push hl
+ inc hl
+ ld a, l
+ ld [hBGMapAddress], a
+ ld a, h
+ ld [hBGMapAddress + 1], a
+ hlcoord 19, 0
+ ld [hl], $66
+ hlcoord 19, 1
+ ld a, $67
+ ld b, 15
+ call Bank77_FillColumn
+ ld [hl], $68
+ hlcoord 19, 17
+ ld [hl], $3c
+ xor a
+ ld b, SCREEN_HEIGHT
+ hlcoord 19, 0, AttrMap
+ call Bank77_FillColumn
+ call WaitBGMap2
+ pop hl
+ ld a, l
+ ld [hBGMapAddress], a
+ ld a, h
+ ld [hBGMapAddress + 1], a
+ ret
+
+Bank77_FillColumn: ; 1de27f
+ push de
+ ld de, SCREEN_WIDTH
+.loop
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .loop
+ pop de
+ ret