2018-06-24 07:09:41 -07:00
|
|
|
LoadSGBPokedexGFX:
|
2017-12-15 17:10:54 -08:00
|
|
|
ld hl, SGBPokedexGFX_LZ
|
2017-12-28 04:32:33 -08:00
|
|
|
ld de, vTiles2 tile $31
|
2017-12-15 17:10:54 -08:00
|
|
|
call Decompress
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
LoadSGBPokedexGFX2:
|
2017-12-15 17:10:54 -08:00
|
|
|
ld hl, SGBPokedexGFX_LZ
|
2017-12-28 04:32:33 -08:00
|
|
|
ld de, vTiles2 tile $31
|
2018-01-14 16:43:35 -08:00
|
|
|
lb bc, BANK(SGBPokedexGFX_LZ), 58
|
2017-12-15 17:10:54 -08:00
|
|
|
call DecompressRequest2bpp
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
SGBPokedexGFX_LZ:
|
2017-12-15 17:10:54 -08:00
|
|
|
INCBIN "gfx/pokedex/sgb.2bpp.lz"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
LoadQuestionMarkPic:
|
2017-12-15 17:10:54 -08:00
|
|
|
ld hl, .QuestionMarkLZ
|
|
|
|
ld de, sScratch
|
|
|
|
call Decompress
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.QuestionMarkLZ:
|
2018-02-07 11:43:58 -08:00
|
|
|
INCBIN "gfx/pokedex/question_mark.2bpp.lz"
|
2017-12-15 17:10:54 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DrawPokedexListWindow:
|
2017-12-15 17:10:54 -08:00
|
|
|
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
|
2018-09-09 12:09:51 -07:00
|
|
|
ld a, [wCurDexMode]
|
2017-12-15 17:10:54 -08:00
|
|
|
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
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DrawPokedexSearchResultsWindow:
|
2017-12-15 17:10:54 -08:00
|
|
|
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
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.esults_D
|
2017-12-15 17:10:54 -08:00
|
|
|
; (SEARCH R)
|
|
|
|
db "ESULTS"
|
|
|
|
next ""
|
|
|
|
; (### FOUN)
|
|
|
|
next "D!@"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DrawDexEntryScreenRightEdge:
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hBGMapAddress]
|
2017-12-15 17:10:54 -08:00
|
|
|
ld l, a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hBGMapAddress + 1]
|
2017-12-15 17:10:54 -08:00
|
|
|
ld h, a
|
|
|
|
push hl
|
|
|
|
inc hl
|
|
|
|
ld a, l
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapAddress], a
|
2017-12-15 17:10:54 -08:00
|
|
|
ld a, h
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapAddress + 1], a
|
2017-12-15 17:10:54 -08:00
|
|
|
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
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 19, 0, wAttrmap
|
2017-12-15 17:10:54 -08:00
|
|
|
call Bank77_FillColumn
|
|
|
|
call WaitBGMap2
|
|
|
|
pop hl
|
|
|
|
ld a, l
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapAddress], a
|
2017-12-15 17:10:54 -08:00
|
|
|
ld a, h
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapAddress + 1], a
|
2017-12-15 17:10:54 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Bank77_FillColumn:
|
2017-12-15 17:10:54 -08:00
|
|
|
push de
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
.loop
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
pop de
|
|
|
|
ret
|