2018-06-24 14:09:41 +00:00
|
|
|
ReadPartyMonMail:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartyMon]
|
2017-12-27 01:02:00 +00:00
|
|
|
ld hl, sPartyMail
|
|
|
|
ld bc, MAIL_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
ld d, h
|
|
|
|
ld e, l
|
2018-06-24 14:09:41 +00:00
|
|
|
ReadAnyMail:
|
2017-12-27 01:02:00 +00:00
|
|
|
push de
|
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearSprites
|
2020-02-13 17:30:13 +00:00
|
|
|
call ClearTilemap
|
2017-12-27 01:02:00 +00:00
|
|
|
call DisableLCD
|
|
|
|
call LoadFontsExtra
|
|
|
|
pop de
|
|
|
|
push de
|
|
|
|
ld a, BANK(sPartyMail)
|
|
|
|
call GetSRAMBank
|
|
|
|
farcall IsMailEuropean
|
|
|
|
call CloseSRAM
|
|
|
|
ld a, c
|
|
|
|
ld de, StandardEnglishFont
|
|
|
|
or a
|
|
|
|
jr z, .got_font
|
|
|
|
ld de, FrenchGermanFont
|
|
|
|
sub $3
|
|
|
|
jr c, .got_font
|
|
|
|
ld de, SpanishItalianFont
|
|
|
|
|
|
|
|
.got_font
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles1
|
2017-12-27 01:02:00 +00:00
|
|
|
lb bc, BANK(StandardEnglishFont), $80
|
|
|
|
call Get1bpp
|
|
|
|
pop de
|
|
|
|
call .LoadGFX
|
|
|
|
call EnableLCD
|
|
|
|
call WaitBGMap
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBuffer3]
|
2017-12-27 01:02:00 +00:00
|
|
|
ld e, a
|
|
|
|
farcall LoadMailPalettes
|
|
|
|
call SetPalettes
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hJoyPressed], a
|
2017-12-27 01:02:00 +00:00
|
|
|
call .loop
|
|
|
|
call ClearBGPalettes
|
|
|
|
call DisableLCD
|
|
|
|
call LoadStandardFont
|
|
|
|
jp EnableLCD
|
|
|
|
|
|
|
|
.loop
|
|
|
|
call GetJoypad
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hJoyPressed]
|
2017-12-27 01:02:00 +00:00
|
|
|
and A_BUTTON | B_BUTTON | START
|
|
|
|
jr z, .loop
|
|
|
|
and START
|
|
|
|
jr nz, .pressed_start
|
|
|
|
ret
|
|
|
|
|
|
|
|
.pressed_start
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
push af
|
2018-07-23 04:13:43 +00:00
|
|
|
callfar PrintMailAndExit ; printer
|
2017-12-27 01:02:00 +00:00
|
|
|
pop af
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
jr .loop
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.LoadGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld h, d
|
|
|
|
ld l, e
|
|
|
|
push hl
|
2018-01-08 22:13:37 +00:00
|
|
|
ld a, BANK(sPartyMail)
|
2017-12-27 01:02:00 +00:00
|
|
|
call GetSRAMBank
|
|
|
|
ld de, sPartyMon1MailAuthorID - sPartyMon1Mail
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer1], a
|
2017-12-27 01:02:00 +00:00
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer2], a
|
2017-12-27 01:02:00 +00:00
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wCurPartySpecies], a
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, [hl]
|
|
|
|
call CloseSRAM
|
|
|
|
ld hl, MailGFXPointers
|
|
|
|
ld c, 0
|
|
|
|
.loop2
|
|
|
|
ld a, [hli]
|
|
|
|
cp b
|
|
|
|
jr z, .got_pointer
|
|
|
|
cp -1
|
|
|
|
jr z, .invalid
|
|
|
|
inc c
|
|
|
|
inc hl
|
|
|
|
inc hl
|
|
|
|
jr .loop2
|
|
|
|
|
|
|
|
.invalid
|
|
|
|
ld hl, MailGFXPointers
|
|
|
|
inc hl
|
|
|
|
|
|
|
|
.got_pointer
|
|
|
|
ld a, c
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wBuffer3], a
|
2017-12-27 01:02:00 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld de, .done
|
|
|
|
pop bc
|
|
|
|
push de
|
|
|
|
jp hl
|
|
|
|
.done
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
MailGFXPointers:
|
2017-12-27 01:02:00 +00:00
|
|
|
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
|
|
|
|
db -1
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadSurfMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, SurfMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 8 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailLaprasGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, SurfMailWaveGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
jr FinishLoadingSurfLiteBlueMailGFX
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadLiteBlueMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, LiteBlueMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 8 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailDratiniGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, PortraitMailUnderlineGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
FinishLoadingSurfLiteBlueMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, SurfLiteBlueMailSmallShapesGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 2 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 2 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, SurfLiteBlueMailLargeShapesGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 8 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 8 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
call DrawMailBorder
|
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $3f
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
ld a, $39
|
|
|
|
hlcoord 15, 14
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
ld a, $44
|
|
|
|
hlcoord 2, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 15, 11
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
ld a, $4c
|
|
|
|
hlcoord 3, 12
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 15, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
ld a, $50
|
|
|
|
hlcoord 6, 3
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
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
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadEonMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, EonMailBorder1GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, EonMailBorder2GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, EonMailBorder2GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, EonMailBorder1GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, SurfMailBorderGFX + 6 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailEeveeGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $3d
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, MailLargeCircleGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, EonMailBorder2GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
ld a, $31
|
|
|
|
hlcoord 0, 0
|
|
|
|
call Mail_Place18TileAlternatingRow
|
|
|
|
hlcoord 1, 17
|
|
|
|
call Mail_Place18TileAlternatingRow
|
|
|
|
ld a, $33
|
|
|
|
hlcoord 0, 1
|
|
|
|
call Mail_Place16TileAlternatingColumn
|
|
|
|
hlcoord 19, 0
|
|
|
|
call Mail_Place16TileAlternatingColumn
|
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $35
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
inc a
|
|
|
|
hlcoord 15, 14
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
call LovelyEonMail_PlaceIcons
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadLovelyMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, LovelyMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 5 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailPoliwagGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, LovelyMailUnderlineGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, LovelyMailLargeHeartGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, LovelyMailSmallHeartGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
|
|
|
call DrawMailBorder2
|
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $3c
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
ld a, $36
|
|
|
|
hlcoord 15, 14
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
call LovelyEonMail_PlaceIcons
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LovelyEonMail_PlaceIcons:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld a, $3d
|
|
|
|
hlcoord 2, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 16, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 9, 4
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 2, 11
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 6, 12
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 12, 11
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadMorphMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2020-03-01 22:00:57 +00:00
|
|
|
ld bc, 5 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call MailGFX_GenerateMonochromeTilesColor2
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, MorphMailBorderCornerGFX + 3 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MorphMailBorderCornerGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MorphMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, EonMailBorder1GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, MorphMailDividerGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailDittoGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
call DrawMailBorder2
|
|
|
|
ld a, $31
|
|
|
|
hlcoord 1, 1
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 17, 15
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
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
|
|
|
|
call Mail_DrawRowLoop
|
|
|
|
inc a
|
|
|
|
hlcoord 2, 11
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
hlcoord 2, 5
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
inc a
|
|
|
|
hlcoord 6, 1
|
|
|
|
call Mail_Draw13TileRow
|
|
|
|
hlcoord 1, 16
|
|
|
|
call Mail_Draw13TileRow
|
|
|
|
inc a
|
|
|
|
hlcoord 3, 13
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadBlueSkyMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, EonMailBorder1GFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld a, $ff
|
|
|
|
ld bc, 1 tiles
|
|
|
|
call ByteFill
|
|
|
|
ld de, BlueSkyMailGrassGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, MailDragoniteGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 23 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
ld de, MailCloudGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, FlowerMailBorderGFX + 6 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, MailCloudGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, MailCloudGFX + 2 * LEN_1BPP_TILE
|
|
|
|
ld c, 2 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, MailCloudGFX + 5 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
|
|
|
ld a, $31
|
|
|
|
hlcoord 0, 0
|
|
|
|
call Mail_DrawFullWidthBorder
|
|
|
|
hlcoord 0, 1
|
|
|
|
call Mail_DrawLeftRightBorder
|
|
|
|
hlcoord 19, 1
|
|
|
|
call Mail_DrawLeftRightBorder
|
|
|
|
inc a
|
|
|
|
hlcoord 0, 17
|
|
|
|
call Mail_DrawFullWidthBorder
|
|
|
|
inc a
|
|
|
|
hlcoord 0, 16
|
|
|
|
call Mail_DrawFullWidthBorder
|
|
|
|
inc a
|
|
|
|
hlcoord 2, 2
|
|
|
|
call Mail_Place6TileRow
|
|
|
|
hlcoord 3, 3
|
|
|
|
call Mail_Place6TileRow
|
|
|
|
hlcoord 4, 4
|
|
|
|
call Mail_Place6TileRow
|
|
|
|
dec hl
|
|
|
|
ld [hl], $7f
|
|
|
|
dec a
|
|
|
|
hlcoord 15, 14
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
add $4
|
|
|
|
hlcoord 15, 16
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
inc a
|
|
|
|
push af
|
|
|
|
hlcoord 12, 1
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
pop af
|
|
|
|
hlcoord 15, 4
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
inc a
|
|
|
|
hlcoord 2, 11
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
inc a
|
|
|
|
hlcoord 10, 3
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Place6TileRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, $6
|
|
|
|
.loop
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadFlowerMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, FlowerMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 8 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, MailOddishGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, FlowerMailBorderGFX + 6 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, FlowerMailFlowerGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
call DrawMailBorder
|
|
|
|
hlcoord 2, 15
|
|
|
|
ld a, $3d ; underline
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
ld a, $39 ; oddish
|
|
|
|
hlcoord 16, 13
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 2, 13
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
ld a, $3e
|
|
|
|
hlcoord 2, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 5, 3
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 10, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 16, 3
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 5, 11
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 16, 10
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
ld a, $42
|
|
|
|
hlcoord 3, 4
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 12, 3
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 14, 2
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 2, 10
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
hlcoord 14, 11
|
|
|
|
call Mail_Draw2x2Graphic
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadPortraitMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, PortraitMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 5 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, PortraitMailUnderlineGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $3d
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, PortraitMailLargePokeballGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, PortraitMailSmallPokeballGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
|
|
|
|
call DrawMailBorder2
|
|
|
|
hlcoord 8, 15
|
|
|
|
ld a, $36
|
|
|
|
ld b, $a
|
|
|
|
call Mail_DrawRowLoop
|
|
|
|
call LovelyEonMail_PlaceIcons
|
|
|
|
ld a, $1
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wUnownLetter], a
|
2017-12-27 01:02:00 +00:00
|
|
|
hlcoord 1, 10
|
|
|
|
call PrepMonFrontpic
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadMusicMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-27 01:02:00 +00:00
|
|
|
ld de, MusicMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 4 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MorphMailBorderGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 2 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailNatuGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 6 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color3
|
|
|
|
xor a
|
|
|
|
ld bc, 1 tiles
|
|
|
|
call ByteFill
|
|
|
|
ld de, MusicMailLargeNoteGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 3 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
ld de, MusicMailSmallNoteGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
|
|
|
ld a, $31
|
|
|
|
hlcoord 0, 0
|
|
|
|
call Mail_Place18TileAlternatingRow
|
|
|
|
hlcoord 1, 17
|
|
|
|
call Mail_Place18TileAlternatingRow
|
|
|
|
ld a, $33
|
|
|
|
hlcoord 0, 1
|
|
|
|
call Mail_Place16TileAlternatingColumn
|
|
|
|
hlcoord 19, 0
|
|
|
|
call Mail_Place16TileAlternatingColumn
|
|
|
|
ld a, $35
|
|
|
|
hlcoord 2, 15
|
|
|
|
call Mail_Place14TileAlternatingRow
|
|
|
|
ld a, $37
|
|
|
|
hlcoord 15, 14
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
call LovelyEonMail_PlaceIcons
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadMirageMailGFX:
|
2017-12-27 01:02:00 +00:00
|
|
|
push bc
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2020-03-01 22:00:57 +00:00
|
|
|
ld bc, 5 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call MailGFX_GenerateMonochromeTilesColor2
|
|
|
|
ld de, BlueSkyMailGrassGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
|
|
|
ld de, MailMewGFX
|
2020-03-01 22:00:57 +00:00
|
|
|
ld c, 18 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color2
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, LiteBlueMailBorderGFX + 1 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
2020-03-01 22:00:57 +00:00
|
|
|
ld de, LiteBlueMailBorderGFX + 6 * LEN_1BPP_TILE
|
|
|
|
ld c, 1 * LEN_1BPP_TILE
|
2017-12-27 01:02:00 +00:00
|
|
|
call LoadMailGFX_Color1
|
|
|
|
|
|
|
|
call DrawMailBorder2
|
|
|
|
ld a, $36
|
|
|
|
hlcoord 1, 16
|
|
|
|
call Mail_DrawTopBottomBorder
|
|
|
|
inc a
|
|
|
|
hlcoord 15, 14
|
|
|
|
call Mail_Draw3x2Graphic
|
|
|
|
inc a
|
|
|
|
hlcoord 15, 16
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $3f
|
|
|
|
hlcoord 1, 1
|
|
|
|
call Mail_Place18TileAlternatingRow
|
|
|
|
ld a, $41
|
|
|
|
hlcoord 0, 2
|
|
|
|
call Mail_Place14TileAlternatingColumn
|
|
|
|
ld a, $43
|
|
|
|
hlcoord 19, 2
|
|
|
|
call Mail_Place14TileAlternatingColumn
|
|
|
|
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
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
inc a
|
|
|
|
hlcoord 2, 11
|
|
|
|
call Mail_Draw16TileRow
|
|
|
|
pop hl
|
|
|
|
jp MailGFX_PlaceMessage
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
MailGFX_GenerateMonochromeTilesColor2:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $ff
|
|
|
|
ld [hli], a
|
|
|
|
dec bc
|
|
|
|
ld a, b
|
|
|
|
or c
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
MailGFX_PlaceMessage:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld bc, MAIL_STRUCT_LENGTH
|
|
|
|
ld de, wTempMail
|
|
|
|
ld a, BANK(sPartyMail)
|
|
|
|
call GetSRAMBank
|
|
|
|
call CopyBytes
|
|
|
|
call CloseSRAM
|
|
|
|
ld hl, wTempMailAuthor
|
|
|
|
ld de, wMonOrItemNameBuffer
|
|
|
|
ld bc, NAME_LENGTH - 1
|
|
|
|
call CopyBytes
|
|
|
|
ld a, "@"
|
|
|
|
ld [wTempMailAuthor], a
|
|
|
|
ld [wMonOrItemNameBuffer + NAME_LENGTH - 1], a
|
|
|
|
ld de, wTempMailMessage
|
|
|
|
hlcoord 2, 7
|
|
|
|
call PlaceString
|
|
|
|
ld de, wMonOrItemNameBuffer
|
|
|
|
ld a, [de]
|
|
|
|
and a
|
|
|
|
ret z
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBuffer3]
|
2017-12-27 01:02:00 +00:00
|
|
|
hlcoord 8, 14
|
|
|
|
cp $3 ; PORTRAITMAIL
|
|
|
|
jr z, .place_author
|
|
|
|
hlcoord 6, 14
|
|
|
|
cp $6 ; MORPH_MAIL
|
|
|
|
jr z, .place_author
|
|
|
|
hlcoord 5, 14
|
|
|
|
|
|
|
|
.place_author
|
|
|
|
jp PlaceString
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Unreferenced_Functionb984e:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
ld a, [hl]
|
|
|
|
xor $ff
|
|
|
|
ld [hli], a
|
|
|
|
dec bc
|
|
|
|
ld a, b
|
|
|
|
or c
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DrawMailBorder:
|
2017-12-27 01:02:00 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld a, $31
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
call Mail_DrawTopBottomBorder
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
call Mail_DrawLeftRightBorder
|
|
|
|
ld a, $36
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
call Mail_DrawTopBottomBorder
|
|
|
|
hlcoord 19, 1
|
|
|
|
ld a, $35
|
|
|
|
call Mail_DrawLeftRightBorder
|
|
|
|
ld a, $38
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
DrawMailBorder2:
|
2017-12-27 01:02:00 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld a, $31
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
call Mail_DrawTopBottomBorder
|
|
|
|
ld [hl], $31
|
|
|
|
inc hl
|
|
|
|
inc a
|
|
|
|
call Mail_DrawLeftRightBorder
|
|
|
|
ld [hl], $31
|
|
|
|
inc hl
|
|
|
|
inc a
|
|
|
|
call Mail_DrawTopBottomBorder
|
|
|
|
hlcoord 19, 1
|
|
|
|
ld a, $35
|
|
|
|
call Mail_DrawLeftRightBorder
|
|
|
|
ld [hl], $31
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Place14TileAlternatingRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
push af
|
|
|
|
ld b, 14 / 2
|
|
|
|
jr Mail_PlaceAlternatingRow
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Place16TileAlternatingRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
push af
|
|
|
|
ld b, 16 / 2
|
|
|
|
jr Mail_PlaceAlternatingRow
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Place18TileAlternatingRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
push af
|
|
|
|
ld b, 18 / 2
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_PlaceAlternatingRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
dec a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Place14TileAlternatingColumn:
|
2017-12-27 01:02:00 +00:00
|
|
|
push af
|
|
|
|
ld b, 14 / 2
|
|
|
|
jr Mail_PlaceAlternatingColumn
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Place16TileAlternatingColumn:
|
2017-12-27 01:02:00 +00:00
|
|
|
push af
|
|
|
|
ld b, 16 / 2
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_PlaceAlternatingColumn:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
ld [hl], a
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
add hl, de
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Draw7TileRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, $7
|
|
|
|
jr Mail_DrawRowLoop
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Draw13TileRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, $d
|
|
|
|
jr Mail_DrawRowLoop
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Draw16TileRow:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, $10
|
|
|
|
jr Mail_DrawRowLoop
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_DrawTopBottomBorder:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, SCREEN_WIDTH - 2
|
|
|
|
jr Mail_DrawRowLoop
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_DrawFullWidthBorder:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, SCREEN_WIDTH
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_DrawRowLoop:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_DrawLeftRightBorder:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld b, SCREEN_HEIGHT - 2
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
.loop
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Draw2x2Graphic:
|
2017-12-27 01:02:00 +00:00
|
|
|
push af
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
ld bc, SCREEN_WIDTH - 1
|
|
|
|
add hl, bc
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Mail_Draw3x2Graphic:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
ld bc, SCREEN_WIDTH - 2
|
|
|
|
add hl, bc
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadMailGFX_Color1:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadMailGFX_Color2:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadMailGFX_Color3:
|
2017-12-27 01:02:00 +00:00
|
|
|
.loop
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
|
|
|
INCLUDE "gfx/mail.asm"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
ItemIsMail:
|
2017-12-27 01:02:00 +00:00
|
|
|
ld a, d
|
|
|
|
ld hl, MailItems
|
|
|
|
ld de, 1
|
|
|
|
jp IsInArray
|
|
|
|
|
|
|
|
INCLUDE "data/items/mail_items.asm"
|