2015-11-19 23:07:20 +00:00
|
|
|
ReadPartyMonMail: ; b9229
|
|
|
|
ld a, [CurPartyMon]
|
|
|
|
ld hl, sPartyMail
|
|
|
|
ld bc, MAIL_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
ld d, h
|
|
|
|
ld e, l
|
|
|
|
ReadAnyMail: ; b9237
|
|
|
|
push de
|
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearSprites
|
|
|
|
call ClearTileMap
|
|
|
|
call DisableLCD
|
|
|
|
call LoadFontsExtra
|
|
|
|
pop de
|
|
|
|
push de
|
|
|
|
ld a, BANK(sPartyMail)
|
|
|
|
call GetSRAMBank
|
2015-11-22 17:01:58 +00:00
|
|
|
callba IsMailEuropean
|
2015-11-19 23:07:20 +00:00
|
|
|
call CloseSRAM
|
|
|
|
ld a, c
|
2015-11-22 17:01:58 +00:00
|
|
|
ld de, StandardEnglishFont
|
2015-11-19 23:07:20 +00:00
|
|
|
or a
|
2015-11-22 18:50:19 +00:00
|
|
|
jr z, .got_font
|
2015-11-22 17:01:58 +00:00
|
|
|
ld de, FrenchGermanFont
|
2015-11-19 23:07:20 +00:00
|
|
|
sub $3
|
2015-11-22 18:50:19 +00:00
|
|
|
jr c, .got_font
|
2015-11-22 17:01:58 +00:00
|
|
|
ld de, SpanishItalianFont
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
.got_font
|
2015-11-19 23:07:20 +00:00
|
|
|
ld hl, VTiles1
|
2015-11-22 17:01:58 +00:00
|
|
|
lb bc, BANK(StandardEnglishFont), $80
|
2015-11-19 23:07:20 +00:00
|
|
|
call Get1bpp
|
|
|
|
pop de
|
2016-05-14 02:46:32 +00:00
|
|
|
call .LoadGFX
|
2015-11-19 23:07:20 +00:00
|
|
|
call EnableLCD
|
|
|
|
call WaitBGMap
|
2015-11-22 18:50:19 +00:00
|
|
|
ld a, [Buffer3]
|
2015-11-19 23:07:20 +00:00
|
|
|
ld e, a
|
2016-05-11 13:49:03 +00:00
|
|
|
callba LoadMailPalettes
|
2015-11-19 23:07:20 +00:00
|
|
|
call SetPalettes
|
|
|
|
xor a
|
|
|
|
ld [hJoyPressed], a
|
2015-11-23 05:21:21 +00:00
|
|
|
call .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
call ClearBGPalettes
|
|
|
|
call DisableLCD
|
|
|
|
call LoadStandardFont
|
|
|
|
jp EnableLCD
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
call GetJoypad
|
|
|
|
ld a, [hJoyPressed]
|
|
|
|
and A_BUTTON | B_BUTTON | START
|
2015-11-22 18:50:19 +00:00
|
|
|
jr z, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
and START
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .pressed_start
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
.pressed_start
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
push af
|
2015-11-23 05:21:21 +00:00
|
|
|
callab PrintMail ; printer
|
2015-11-19 23:07:20 +00:00
|
|
|
pop af
|
|
|
|
ld [wJumptableIndex], a
|
2015-11-22 18:50:19 +00:00
|
|
|
jr .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
; b92b8
|
|
|
|
|
2016-05-14 02:46:32 +00:00
|
|
|
.LoadGFX: ; b92b8
|
2015-11-19 23:07:20 +00:00
|
|
|
ld h, d
|
|
|
|
ld l, e
|
|
|
|
push hl
|
|
|
|
ld a, $0
|
|
|
|
call GetSRAMBank
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, sPartyMon1MailAuthorID - sPartyMon1Mail
|
2015-11-19 23:07:20 +00:00
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld [Buffer1], a
|
|
|
|
ld a, [hli]
|
|
|
|
ld [Buffer2], a
|
|
|
|
ld a, [hli]
|
|
|
|
ld [CurPartySpecies], a
|
|
|
|
ld b, [hl]
|
|
|
|
call CloseSRAM
|
|
|
|
ld hl, MailGFXPointers
|
|
|
|
ld c, 0
|
2016-05-14 02:46:32 +00:00
|
|
|
.loop2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
cp b
|
2015-11-22 18:50:19 +00:00
|
|
|
jr z, .got_pointer
|
|
|
|
cp -1
|
|
|
|
jr z, .invalid
|
2015-11-19 23:07:20 +00:00
|
|
|
inc c
|
|
|
|
inc hl
|
2016-05-04 15:46:23 +00:00
|
|
|
inc hl
|
2016-05-14 02:46:32 +00:00
|
|
|
jr .loop2
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
.invalid
|
2015-11-19 23:07:20 +00:00
|
|
|
ld hl, MailGFXPointers
|
|
|
|
inc hl
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
.got_pointer
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, c
|
2015-11-22 18:50:19 +00:00
|
|
|
ld [Buffer3], a
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld de, .done
|
|
|
|
pop bc
|
|
|
|
push de
|
2017-06-09 21:01:10 +00:00
|
|
|
jp hl
|
2015-11-19 23:07:20 +00:00
|
|
|
.done
|
|
|
|
ret
|
|
|
|
; b92f8
|
|
|
|
|
|
|
|
MailGFXPointers: ; b92f8
|
|
|
|
dbw FLOWER_MAIL, LoadFlowerMailGFX
|
|
|
|
dbw SURF_MAIL, LoadSurfMailGFX
|
|
|
|
dbw LITEBLUEMAIL, LoadLiteBlueMailGFX
|
|
|
|
dbw PORTRAITMAIL, LoadPortraitMailGFX
|
|
|
|
dbw LOVELY_MAIL, LoadLovelyMailGFX
|
|
|
|
dbw EON_MAIL, LoadEonMailGFX
|
|
|
|
dbw MORPH_MAIL, LoadMorphMailGFX
|
|
|
|
dbw BLUESKY_MAIL, LoadBlueSkyMailGFX
|
|
|
|
dbw MUSIC_MAIL, LoadMusicMailGFX
|
|
|
|
dbw MIRAGE_MAIL, LoadMirageMailGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
db -1
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9317
|
|
|
|
|
|
|
|
LoadSurfMailGFX: ; b9317
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, SurfMailBorderGFX
|
|
|
|
ld c, 8 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailLaprasGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, SurfMailWaveGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
jr FinishLoadingSurfLiteBlueMailGFX
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
LoadLiteBlueMailGFX: ; b9335
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, LiteBlueMailBorderGFX
|
|
|
|
ld c, 8 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailDratiniGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, PortraitMailUnderlineGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
FinishLoadingSurfLiteBlueMailGFX: ; b9351
|
|
|
|
ld de, SurfLiteBlueMailSmallShapesGFX
|
|
|
|
ld c, 2 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld c, 2 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, SurfLiteBlueMailLargeShapesGFX
|
|
|
|
ld c, 8 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld c, 8 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
call DrawMailBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $3f
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $39
|
|
|
|
hlcoord 15, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $44
|
|
|
|
hlcoord 2, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 15, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $4c
|
|
|
|
hlcoord 3, 12
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 15, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $50
|
|
|
|
hlcoord 6, 3
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $40
|
|
|
|
hlcoord 13, 2
|
|
|
|
ld [hli], a
|
|
|
|
hlcoord 6, 14
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $41
|
|
|
|
hlcoord 4, 5
|
|
|
|
ld [hli], a
|
|
|
|
hlcoord 17, 5
|
|
|
|
ld [hli], a
|
|
|
|
hlcoord 13, 12
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $42
|
|
|
|
hlcoord 9, 2
|
|
|
|
ld [hli], a
|
|
|
|
hlcoord 14, 5
|
|
|
|
ld [hli], a
|
|
|
|
hlcoord 3, 10
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $43
|
|
|
|
hlcoord 6, 11
|
|
|
|
ld [hli], a
|
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b93d2
|
|
|
|
|
|
|
|
LoadEonMailGFX: ; b93d2
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, EonMailBorder1GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, EonMailBorder2GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, EonMailBorder2GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, EonMailBorder1GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, SurfMailBorderGFX + 6 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailEeveeGFX
|
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color3
|
2015-11-19 23:07:20 +00:00
|
|
|
ld hl, VTiles2 tile $3d
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, MailLargeCircleGFX
|
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, EonMailBorder2GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $31
|
|
|
|
hlcoord 0, 0
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place18TileAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 1, 17
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place18TileAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $33
|
|
|
|
hlcoord 0, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place16TileAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 19, 0
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place16TileAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $35
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 15, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
call LovelyEonMail_PlaceIcons
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b944b
|
|
|
|
|
|
|
|
LoadLovelyMailGFX: ; b944b
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, LovelyMailBorderGFX
|
|
|
|
ld c, 5 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailPoliwagGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, LovelyMailUnderlineGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, LovelyMailLargeHeartGFX
|
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, LovelyMailSmallHeartGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
|
|
|
call DrawMailBorder2
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $3c
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $36
|
|
|
|
hlcoord 15, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
call LovelyEonMail_PlaceIcons
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9491
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LovelyEonMail_PlaceIcons: ; b9491
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $3d
|
|
|
|
hlcoord 2, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 16, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 9, 4
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 6, 12
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 12, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $41
|
|
|
|
hlcoord 5, 4
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 6, 2
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 12, 4
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 14, 2
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 3, 13
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 9, 11
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 16, 12
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
; b94d6
|
|
|
|
|
|
|
|
LoadMorphMailGFX: ; b94d6
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, 5 * 8
|
|
|
|
call MailGFX_GenerateMonochromeTilesColor2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, MorphMailBorderCornerGFX + 3 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, MorphMailBorderCornerGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, MorphMailBorderGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, EonMailBorder1GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, MorphMailDividerGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailDittoGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color3
|
|
|
|
call DrawMailBorder2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $31
|
|
|
|
hlcoord 1, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 17, 15
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 1, 3
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 3, 1
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 16, 16
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 18, 14
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $36
|
|
|
|
hlcoord 1, 4
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 2, 3
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 3, 2
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 4, 1
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
hlcoord 15, 16
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 16, 15
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 17, 14
|
|
|
|
ld [hl], a
|
|
|
|
hlcoord 18, 13
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
hlcoord 2, 15
|
|
|
|
ld b, $e
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawRowLoop
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 2, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 5
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 6, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw13TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 1, 16
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw13TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 3, 13
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9582
|
|
|
|
|
|
|
|
LoadBlueSkyMailGFX: ; b9582
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, EonMailBorder1GFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $ff
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, 1 tiles
|
2015-11-19 23:07:20 +00:00
|
|
|
call ByteFill
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, BlueSkyMailGrassGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color3
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailDragoniteGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 23 * 8
|
|
|
|
call LoadMailGFX_Color3
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailCloudGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color1
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, FlowerMailBorderGFX + 6 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailCloudGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, MailCloudGFX + 2 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 2 * 8
|
|
|
|
call LoadMailGFX_Color1
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, MailCloudGFX + 5 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $31
|
|
|
|
hlcoord 0, 0
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawFullWidthBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 0, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawLeftRightBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 19, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawLeftRightBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 0, 17
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawFullWidthBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 0, 16
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawFullWidthBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 2, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place6TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 3, 3
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place6TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 4, 4
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place6TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
dec hl
|
|
|
|
ld [hl], $7f
|
|
|
|
dec a
|
|
|
|
hlcoord 15, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
add $4
|
|
|
|
hlcoord 15, 16
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
push af
|
|
|
|
hlcoord 12, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
pop af
|
|
|
|
hlcoord 15, 4
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 2, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 10, 3
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9636
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Place6TileRow: ; b9636
|
2015-11-19 23:07:20 +00:00
|
|
|
ld b, $6
|
2015-11-22 18:50:19 +00:00
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
dec b
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b963e
|
|
|
|
|
|
|
|
LoadFlowerMailGFX: ; b963e
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, FlowerMailBorderGFX
|
|
|
|
ld c, 8 * 8
|
|
|
|
call LoadMailGFX_Color1
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailOddishGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color3
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, FlowerMailBorderGFX + 6 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, FlowerMailFlowerGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
call DrawMailBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 15
|
2015-11-22 18:50:19 +00:00
|
|
|
ld a, $3d ; underline
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
ld a, $39 ; oddish
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 16, 13
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 13
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $3e
|
|
|
|
hlcoord 2, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 5, 3
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 10, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 16, 3
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 5, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 16, 10
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $42
|
|
|
|
hlcoord 3, 4
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 12, 3
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 14, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 10
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 14, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw2x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b96ca
|
|
|
|
|
|
|
|
LoadPortraitMailGFX: ; b96ca
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, PortraitMailBorderGFX
|
|
|
|
ld c, 5 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, PortraitMailUnderlineGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld hl, VTiles2 tile $3d
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, PortraitMailLargePokeballGFX
|
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, PortraitMailSmallPokeballGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
call DrawMailBorder2
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 8, 15
|
|
|
|
ld a, $36
|
|
|
|
ld b, $a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawRowLoop
|
|
|
|
call LovelyEonMail_PlaceIcons
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [UnownLetter], a
|
|
|
|
hlcoord 1, 10
|
|
|
|
call PrepMonFrontpic
|
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9710
|
|
|
|
|
|
|
|
LoadMusicMailGFX: ; b9710
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, MusicMailBorderGFX
|
|
|
|
ld c, 4 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, MorphMailBorderGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 2 * 8
|
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailNatuGFX
|
|
|
|
ld c, 6 * 8
|
|
|
|
call LoadMailGFX_Color3
|
2015-11-19 23:07:20 +00:00
|
|
|
xor a
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, 1 tiles
|
2015-11-19 23:07:20 +00:00
|
|
|
call ByteFill
|
2015-11-22 18:50:19 +00:00
|
|
|
ld de, MusicMailLargeNoteGFX
|
|
|
|
ld c, 3 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, MusicMailSmallNoteGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $31
|
|
|
|
hlcoord 0, 0
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place18TileAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 1, 17
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place18TileAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $33
|
|
|
|
hlcoord 0, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place16TileAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 19, 0
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place16TileAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $35
|
|
|
|
hlcoord 2, 15
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place14TileAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $37
|
|
|
|
hlcoord 15, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
call LovelyEonMail_PlaceIcons
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9776
|
|
|
|
|
|
|
|
LoadMirageMailGFX: ; b9776
|
|
|
|
push bc
|
|
|
|
ld hl, VTiles2 tile $31
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, 5 * 8
|
|
|
|
call MailGFX_GenerateMonochromeTilesColor2
|
|
|
|
ld de, BlueSkyMailGrassGFX
|
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, MailMewGFX
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 18 * 8
|
|
|
|
call LoadMailGFX_Color2
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, LiteBlueMailBorderGFX + 1 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
2017-06-18 04:13:03 +00:00
|
|
|
ld de, LiteBlueMailBorderGFX + 6 * 8
|
2015-11-22 18:50:19 +00:00
|
|
|
ld c, 1 * 8
|
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
|
|
|
call DrawMailBorder2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $36
|
|
|
|
hlcoord 1, 16
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawTopBottomBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 15, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw3x2Graphic
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 15, 16
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $3f
|
|
|
|
hlcoord 1, 1
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place18TileAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $41
|
|
|
|
hlcoord 0, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place14TileAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $43
|
|
|
|
hlcoord 19, 2
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Place14TileAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $45
|
|
|
|
hlcoord 0, 1
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
hlcoord 19, 1
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
hlcoord 0, 16
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
hlcoord 19, 16
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
hlcoord 2, 5
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
hlcoord 2, 11
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_Draw16TileRow
|
2015-11-19 23:07:20 +00:00
|
|
|
pop hl
|
2015-11-22 18:50:19 +00:00
|
|
|
jp MailGFX_PlaceMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
; b97f8
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MailGFX_GenerateMonochromeTilesColor2: ; b97f8
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $ff
|
|
|
|
ld [hli], a
|
|
|
|
dec bc
|
|
|
|
ld a, b
|
|
|
|
or c
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b9803
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MailGFX_PlaceMessage: ; b9803
|
|
|
|
ld bc, MAIL_STRUCT_LENGTH
|
2015-12-19 01:07:09 +00:00
|
|
|
ld de, wTempMail
|
|
|
|
ld a, BANK(sPartyMail)
|
2015-11-19 23:07:20 +00:00
|
|
|
call GetSRAMBank
|
|
|
|
call CopyBytes
|
|
|
|
call CloseSRAM
|
2015-12-19 01:07:09 +00:00
|
|
|
ld hl, wTempMailAuthor
|
|
|
|
ld de, wMonOrItemNameBuffer
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, NAME_LENGTH - 1
|
2015-11-19 23:07:20 +00:00
|
|
|
call CopyBytes
|
2015-11-22 18:50:19 +00:00
|
|
|
ld a, "@"
|
2015-12-19 01:07:09 +00:00
|
|
|
ld [wTempMailAuthor], a
|
|
|
|
ld [wMonOrItemNameBuffer + NAME_LENGTH - 1], a
|
|
|
|
ld de, wTempMailMessage
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 2, 7
|
|
|
|
call PlaceString
|
2015-12-19 01:07:09 +00:00
|
|
|
ld de, wMonOrItemNameBuffer
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [de]
|
|
|
|
and a
|
|
|
|
ret z
|
2015-11-22 18:50:19 +00:00
|
|
|
ld a, [Buffer3]
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 8, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
cp $3 ; PORTRAITMAIL
|
|
|
|
jr z, .place_author
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 6, 14
|
2015-11-22 18:50:19 +00:00
|
|
|
cp $6 ; MORPH_MAIL
|
|
|
|
jr z, .place_author
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 5, 14
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
.place_author
|
2015-11-19 23:07:20 +00:00
|
|
|
jp PlaceString
|
|
|
|
; b984e
|
|
|
|
|
|
|
|
Functionb984e: ; b984e
|
2016-05-14 02:46:32 +00:00
|
|
|
; XXX
|
2015-11-22 18:50:19 +00:00
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [hl]
|
|
|
|
xor $ff
|
|
|
|
ld [hli], a
|
|
|
|
dec bc
|
|
|
|
ld a, b
|
|
|
|
or c
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b9858
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
DrawMailBorder: ; b9858
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld a, $31
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawTopBottomBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawLeftRightBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $36
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawTopBottomBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 19, 1
|
|
|
|
ld a, $35
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawLeftRightBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, $38
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
; b987b
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
DrawMailBorder2: ; b987b
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld a, $31
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawTopBottomBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], $31
|
|
|
|
inc hl
|
|
|
|
inc a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawLeftRightBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], $31
|
|
|
|
inc hl
|
|
|
|
inc a
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawTopBottomBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
hlcoord 19, 1
|
|
|
|
ld a, $35
|
2015-11-22 18:50:19 +00:00
|
|
|
call Mail_DrawLeftRightBorder
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], $31
|
|
|
|
ret
|
|
|
|
; b989e
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Place14TileAlternatingRow: ; b989e
|
2015-11-19 23:07:20 +00:00
|
|
|
push af
|
2015-11-22 18:50:19 +00:00
|
|
|
ld b, 14 / 2
|
|
|
|
jr Mail_PlaceAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Place16TileAlternatingRow: ; b98a3
|
2015-11-19 23:07:20 +00:00
|
|
|
push af
|
2015-11-22 18:50:19 +00:00
|
|
|
ld b, 16 / 2
|
|
|
|
jr Mail_PlaceAlternatingRow
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Place18TileAlternatingRow: ; b98a8
|
2015-11-19 23:07:20 +00:00
|
|
|
push af
|
2015-11-22 18:50:19 +00:00
|
|
|
ld b, 18 / 2
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_PlaceAlternatingRow: ; b98ab
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
dec a
|
|
|
|
dec b
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
; b98b5
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Place14TileAlternatingColumn: ; b98b5
|
2015-11-19 23:07:20 +00:00
|
|
|
push af
|
2015-11-22 18:50:19 +00:00
|
|
|
ld b, 14 / 2
|
|
|
|
jr Mail_PlaceAlternatingColumn
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Place16TileAlternatingColumn: ; b98ba
|
2015-11-19 23:07:20 +00:00
|
|
|
push af
|
2015-11-22 18:50:19 +00:00
|
|
|
ld b, 16 / 2
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_PlaceAlternatingColumn: ; b98bd
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], a
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
add hl, de
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec a
|
|
|
|
dec b
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
; b98cc
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Draw7TileRow: ; b98cc
|
2015-11-19 23:07:20 +00:00
|
|
|
ld b, $7
|
2015-11-22 18:50:19 +00:00
|
|
|
jr Mail_DrawRowLoop
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Draw13TileRow: ; b98d0
|
2015-11-19 23:07:20 +00:00
|
|
|
ld b, $d
|
2015-11-22 18:50:19 +00:00
|
|
|
jr Mail_DrawRowLoop
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Draw16TileRow: ; b98d4
|
2015-11-19 23:07:20 +00:00
|
|
|
ld b, $10
|
2015-11-22 18:50:19 +00:00
|
|
|
jr Mail_DrawRowLoop
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_DrawTopBottomBorder: ; b98d8
|
|
|
|
ld b, SCREEN_WIDTH - 2
|
|
|
|
jr Mail_DrawRowLoop
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_DrawFullWidthBorder: ; b98dc
|
|
|
|
ld b, SCREEN_WIDTH
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_DrawRowLoop: ; b98de
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
dec b
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b98e3
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_DrawLeftRightBorder: ; b98e3
|
|
|
|
ld b, SCREEN_HEIGHT - 2
|
2015-11-19 23:07:20 +00:00
|
|
|
ld de, SCREEN_WIDTH
|
2015-11-22 18:50:19 +00:00
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b98ee
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Draw2x2Graphic: ; b98ee
|
2015-11-19 23:07:20 +00:00
|
|
|
push af
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, SCREEN_WIDTH - 1
|
2015-11-19 23:07:20 +00:00
|
|
|
add hl, bc
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
; b98fc
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
Mail_Draw3x2Graphic: ; b98fc
|
2015-11-19 23:07:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2015-11-22 18:50:19 +00:00
|
|
|
ld bc, SCREEN_WIDTH - 2
|
2015-11-19 23:07:20 +00:00
|
|
|
add hl, bc
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
; b990c
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LoadMailGFX_Color1: ; b990c
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b9915
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LoadMailGFX_Color2: ; b9915
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b991e
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LoadMailGFX_Color3: ; b991e
|
|
|
|
.loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
2016-05-04 15:46:23 +00:00
|
|
|
ld [hli], a
|
2015-11-19 23:07:20 +00:00
|
|
|
dec c
|
2015-11-22 18:50:19 +00:00
|
|
|
jr nz, .loop
|
2015-11-19 23:07:20 +00:00
|
|
|
ret
|
|
|
|
; b9926
|
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MorphMailDividerGFX: ; b9926
|
|
|
|
INCBIN "gfx/mail/0b9926.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
BlueSkyMailGrassGFX: ; b992e
|
|
|
|
INCBIN "gfx/mail/0b992e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
PortraitMailSmallPokeballGFX: ; b9936
|
|
|
|
INCBIN "gfx/mail/0b9936.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2017-06-18 04:13:03 +00:00
|
|
|
MorphMailBorderGFX: ; b993e
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b993e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MusicMailSmallNoteGFX: ; b9946
|
|
|
|
INCBIN "gfx/mail/0b9946.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
SurfMailWaveGFX: ; b994e
|
|
|
|
INCBIN "gfx/mail/0b994e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
PortraitMailUnderlineGFX: ; b995e
|
|
|
|
INCBIN "gfx/mail/0b995e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LovelyMailUnderlineGFX: ; b9966
|
|
|
|
INCBIN "gfx/mail/0b9966.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LovelyMailSmallHeartGFX: ; b996e
|
|
|
|
INCBIN "gfx/mail/0b996e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
SurfLiteBlueMailSmallShapesGFX: ; b9976
|
|
|
|
INCBIN "gfx/mail/0b9976.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
EonMailBorder1GFX: ; b997e
|
|
|
|
INCBIN "gfx/mail/0b997e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
EonMailBorder2GFX: ; b998e
|
|
|
|
INCBIN "gfx/mail/0b998e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MailNatuGFX: ; b9996
|
|
|
|
INCBIN "gfx/mail/0b9996.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailDratiniGFX: ; b99c6
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b99c6.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailPoliwagGFX: ; b99f6
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b99f6.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailLaprasGFX: ; b9a26
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9a26.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MailEeveeGFX: ; b9a56
|
|
|
|
INCBIN "gfx/mail/0b9a56.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailDittoGFX: ; b9a86
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9a86.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailMewGFX: ; b9ab6
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9ab6.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailDragoniteGFX: ; b9b46
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9b46.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailSentretGFX: ; b9bce
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9bce.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MailUnusedGrassGFX: ; b9bee
|
|
|
|
INCBIN "gfx/mail/0b9bee.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
PortraitMailLargePokeballGFX: ; b9bfe
|
|
|
|
INCBIN "gfx/mail/0b9bfe.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailOddishGFX: ; b9c1e
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9c1e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
SurfLiteBlueMailLargeShapesGFX: ; b9c3e
|
|
|
|
INCBIN "gfx/mail/0b9c3e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LovelyMailLargeHeartGFX: ; b9c5e
|
|
|
|
INCBIN "gfx/mail/0b9c5e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2017-06-18 04:13:03 +00:00
|
|
|
MorphMailBorderCornerGFX: ; b9c7e
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9c7e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MailLargeCircleGFX: ; b9c9e
|
|
|
|
INCBIN "gfx/mail/0b9c9e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2017-06-18 04:13:03 +00:00
|
|
|
FlowerMailFlowerGFX: ; b9cbe
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9cbe.1bpp"
|
|
|
|
INCBIN "gfx/mail/0b9cde.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MusicMailLargeNoteGFX: ; b9cfe
|
|
|
|
INCBIN "gfx/mail/0b9cfe.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
MailCloudGFX: ; b9d16
|
2015-11-22 18:50:19 +00:00
|
|
|
INCBIN "gfx/mail/0b9d16.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
SurfMailBorderGFX: ; b9d46
|
|
|
|
INCBIN "gfx/mail/0b9d46.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
FlowerMailBorderGFX: ; b9d86
|
|
|
|
INCBIN "gfx/mail/0b9d86.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LiteBlueMailBorderGFX: ; b9dc6
|
|
|
|
INCBIN "gfx/mail/0b9dc6.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
MusicMailBorderGFX: ; b9e06
|
|
|
|
INCBIN "gfx/mail/0b9e06.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
LovelyMailBorderGFX: ; b9e26
|
|
|
|
INCBIN "gfx/mail/0b9e26.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
2015-11-22 18:50:19 +00:00
|
|
|
PortraitMailBorderGFX: ; b9e4e
|
|
|
|
INCBIN "gfx/mail/0b9e4e.1bpp"
|
2015-11-19 23:07:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
ItemIsMail: ; b9e76
|
|
|
|
ld a, d
|
|
|
|
ld hl, .items
|
|
|
|
ld de, 1
|
|
|
|
jp IsInArray
|
|
|
|
; b9e80
|
|
|
|
|
|
|
|
.items
|
|
|
|
db FLOWER_MAIL
|
|
|
|
db SURF_MAIL
|
|
|
|
db LITEBLUEMAIL
|
|
|
|
db PORTRAITMAIL
|
|
|
|
db LOVELY_MAIL
|
|
|
|
db EON_MAIL
|
|
|
|
db MORPH_MAIL
|
|
|
|
db BLUESKY_MAIL
|
|
|
|
db MUSIC_MAIL
|
|
|
|
db MIRAGE_MAIL
|
2015-11-22 18:50:19 +00:00
|
|
|
db -1
|
2015-11-19 23:07:20 +00:00
|
|
|
; b9e8b
|