pokecrystal/engine/crystal_layouts.asm

326 lines
5.4 KiB
NASM
Raw Normal View History

2015-12-17 02:57:42 +00:00
GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
ld a, b
cp SCGB_RAM
jr nz, .not_ram
2018-01-23 22:39:09 +00:00
ld a, [wSGBPredef]
2015-12-17 02:57:42 +00:00
.not_ram
push af
2017-12-24 17:47:30 +00:00
farcall ResetBGPals
2015-12-17 02:57:42 +00:00
pop af
ld l, a
ld h, 0
add hl, hl
2015-12-27 02:59:03 +00:00
ld de, .dw
2015-12-17 02:57:42 +00:00
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
ld de, .done
push de
jp hl
2015-12-17 02:57:42 +00:00
.done
ret
; 49330 (12:5330)
.dw ; 49330
2015-12-27 02:59:03 +00:00
dw MG_Mobile_Layout00
dw MG_Mobile_Layout01
dw MG_Mobile_Layout02
2015-12-17 02:57:42 +00:00
; 49336
MG_Mobile_Layout_FillBox: ; 49336
.row
push bc
push hl
.col
ld [hli], a
dec c
jr nz, .col
pop hl
ld bc, SCREEN_WIDTH
add hl, bc
pop bc
dec b
jr nz, .row
ret
; 49346
MG_Mobile_Layout_WipeAttrMap: ; 49346 (12:5346)
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-12-17 02:57:42 +00:00
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
xor a
call ByteFill
ret
MG_Mobile_Layout_LoadPals: ; 49351 (12:5351)
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld hl, Palette_493e1
ld bc, 5 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette PAL_BG_TEXT
2015-12-17 02:57:42 +00:00
ld hl, Palette_TextBG7
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
ret
MG_Mobile_Layout00: ; 4936e (12:536e)
call MG_Mobile_Layout_LoadPals
call MG_Mobile_Layout_WipeAttrMap
call MG_Mobile_Layout_CreatePalBoxes
2017-12-24 17:47:30 +00:00
farcall ApplyAttrMap
farcall ApplyPals
2015-12-17 02:57:42 +00:00
ret
MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 4, 1
ld a, $1
call MG_Mobile_Layout_FillBox
lb bc, 2, 1
ld a, $2
call MG_Mobile_Layout_FillBox
lb bc, 6, 1
ld a, $3
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 1, 0, wAttrMap
2015-12-17 02:57:42 +00:00
ld a, $1
lb bc, 3, 18
call MG_Mobile_Layout_FillBox
lb bc, 2, 18
ld a, $2
call MG_Mobile_Layout_FillBox
lb bc, 12, 18
ld a, $3
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 19, 0, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 4, 1
ld a, $1
call MG_Mobile_Layout_FillBox
lb bc, 2, 1
ld a, $2
call MG_Mobile_Layout_FillBox
lb bc, 6, 1
ld a, $3
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 0, 12, wAttrMap
2015-12-17 02:57:42 +00:00
ld bc, 6 * SCREEN_WIDTH
ld a, $7
call ByteFill
ret
; 493e1 (12:53e1)
Palette_493e1: ; 493e1
INCLUDE "gfx/mystery_gift/mg_mobile.pal"
2015-12-17 02:57:42 +00:00
; 49409
LoadOW_BGPal7:: ; 49409
ld hl, Palette_TextBG7
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette PAL_BG_TEXT
2017-12-16 03:36:33 +00:00
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
ret
; 49418
Palette_TextBG7: ; 49418
INCLUDE "gfx/font/bg_text.pal"
2015-12-17 02:57:42 +00:00
; 49420
Function49420:: ; 49420 (12:5420)
ld hl, MansionPalette1 + 8 palettes
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette PAL_BG_ROOF
2017-12-16 03:36:33 +00:00
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
ret
; 4942f (12:542f)
MG_Mobile_Layout01: ; 4942f
call MG_Mobile_Layout_LoadPals
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette PAL_BG_TEXT
2017-12-25 17:41:31 +00:00
ld hl, .Palette_49478
2017-12-16 03:36:33 +00:00
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
call MG_Mobile_Layout_WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-12-17 02:57:42 +00:00
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
call ByteFill
2018-01-23 22:39:09 +00:00
hlcoord 0, 14, wAttrMap
2015-12-17 02:57:42 +00:00
ld bc, 4 * SCREEN_WIDTH
ld a, $7
call ByteFill
ld a, [wd002]
bit 6, a
jr z, .asm_49464
call Function49480
jr .asm_49467
.asm_49464
call Function49496
.asm_49467
2017-12-24 17:47:30 +00:00
farcall ApplyAttrMap
farcall ApplyPals
2015-12-17 02:57:42 +00:00
ld a, $1
ld [hCGBPalUpdate], a
ret
; 49478
2017-12-25 17:41:31 +00:00
.Palette_49478: ; 49478
2015-12-17 02:57:42 +00:00
RGB 31, 31, 31
RGB 26, 31, 00
RGB 20, 16, 03
RGB 00, 00, 00
; 49480
Function49480: ; 49480
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 4, SCREEN_WIDTH
ld a, $7
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 0, 2, wAttrMap
2015-12-17 02:57:42 +00:00
ld a, $4
ld [hl], a
2018-01-23 22:39:09 +00:00
hlcoord 19, 2, wAttrMap
2015-12-17 02:57:42 +00:00
ld [hl], a
ret
; 49496
Function49496: ; 49496
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 2, SCREEN_WIDTH
ld a, $7
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 0, 1, wAttrMap
2015-12-17 02:57:42 +00:00
ld a, $4
ld [hl], a
2018-01-23 22:39:09 +00:00
hlcoord 19, 1, wAttrMap
2015-12-17 02:57:42 +00:00
ld [hl], a
ret
; 494ac
INCLUDE "engine/tileset_palettes.asm"
2015-12-17 02:57:42 +00:00
MG_Mobile_Layout02: ; 49706
2017-12-25 17:41:31 +00:00
ld hl, .Palette_49732
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
2017-12-24 17:47:30 +00:00
farcall ApplyPals
2015-12-17 02:57:42 +00:00
call MG_Mobile_Layout_WipeAttrMap
2017-12-24 17:47:30 +00:00
farcall ApplyAttrMap
2017-12-25 17:41:31 +00:00
ld hl, .Palette_4973a
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2015-12-17 02:57:42 +00:00
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
ret
; 49732
2017-12-25 17:41:31 +00:00
.Palette_49732: ; 49732
2015-12-17 02:57:42 +00:00
RGB 31, 31, 31
RGB 23, 16, 07
RGB 23, 07, 07
RGB 03, 07, 20
; 4973a
2017-12-25 17:41:31 +00:00
.Palette_4973a: ; 4973a
2015-12-17 02:57:42 +00:00
RGB 00, 00, 00
RGB 07, 05, 31
RGB 14, 18, 31
RGB 31, 31, 31
; 49742
Function49742: ; 49742
2017-12-25 17:41:31 +00:00
ld hl, .Palette_49757
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2017-12-25 17:41:31 +00:00
ld bc, 8 palettes
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
2017-12-24 17:47:30 +00:00
farcall ApplyPals
2015-12-17 02:57:42 +00:00
ret
; 49757
2017-12-25 17:41:31 +00:00
.Palette_49757: ; 49757
INCLUDE "gfx/unknown/49757.pal"
2015-12-17 02:57:42 +00:00
; 49797
2015-12-21 19:10:16 +00:00
_InitMG_Mobile_LinkTradePalMap: ; 49797
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 16, 2
ld a, $4
call MG_Mobile_Layout_FillBox
ld a, $3
2018-01-23 22:39:09 +00:00
ldcoord_a 0, 1, wAttrMap
ldcoord_a 0, 14, wAttrMap
hlcoord 2, 0, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 8, 18
ld a, $5
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 2, 8, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 8, 18
ld a, $6
call MG_Mobile_Layout_FillBox
2018-01-23 22:39:09 +00:00
hlcoord 0, 16, wAttrMap
2015-12-17 02:57:42 +00:00
lb bc, 2, SCREEN_WIDTH
ld a, $4
call MG_Mobile_Layout_FillBox
ld a, $3
lb bc, 6, 1
2018-01-23 22:39:09 +00:00
hlcoord 6, 1, wAttrMap
2015-12-17 02:57:42 +00:00
call MG_Mobile_Layout_FillBox
ld a, $3
lb bc, 6, 1
2018-01-23 22:39:09 +00:00
hlcoord 17, 1, wAttrMap
2015-12-17 02:57:42 +00:00
call MG_Mobile_Layout_FillBox
ld a, $3
lb bc, 6, 1
2018-01-23 22:39:09 +00:00
hlcoord 6, 9, wAttrMap
2015-12-17 02:57:42 +00:00
call MG_Mobile_Layout_FillBox
ld a, $3
lb bc, 6, 1
2018-01-23 22:39:09 +00:00
hlcoord 17, 9, wAttrMap
2015-12-17 02:57:42 +00:00
call MG_Mobile_Layout_FillBox
ld a, $2
2018-01-23 22:39:09 +00:00
hlcoord 2, 16, wAttrMap
2015-12-17 02:57:42 +00:00
ld [hli], a
ld a, $7
ld [hli], a
ld [hli], a
ld [hli], a
2015-12-17 02:57:42 +00:00
ld a, $2
ld [hl], a
2018-01-23 22:39:09 +00:00
hlcoord 2, 17, wAttrMap
2015-12-17 02:57:42 +00:00
ld a, $3
ld bc, 6
call ByteFill
ret
; 49811
2016-05-16 01:50:31 +00:00
LoadTradeRoomBGPals: ; 49811
2017-12-16 03:36:33 +00:00
ld hl, TradeRoomPalette
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette PAL_BG_GREEN
2017-12-16 03:36:33 +00:00
ld bc, 6 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
2015-12-17 02:57:42 +00:00
call FarCopyWRAM
2017-12-24 17:47:30 +00:00
farcall ApplyPals
2015-12-17 02:57:42 +00:00
ret
; 49826
2017-12-16 03:36:33 +00:00
TradeRoomPalette: ; 49826
INCLUDE "gfx/trade/border.pal"
2015-12-17 02:57:42 +00:00
; 49856
2015-12-21 19:10:16 +00:00
InitMG_Mobile_LinkTradePalMap: ; 49856
call _InitMG_Mobile_LinkTradePalMap
2015-12-17 02:57:42 +00:00
ret
; 4985a
2018-01-02 15:04:21 +00:00
; unused
INCLUDE "gfx/unknown/4985a.asm"