mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Use constants for screen size in metatiles
This commit is contained in:
parent
aec3802587
commit
145efc1353
@ -18,8 +18,10 @@ BG_MAP_WIDTH EQU 32 ; tiles
|
||||
BG_MAP_HEIGHT EQU 32 ; tiles
|
||||
|
||||
METATILE_WIDTH EQU 4 ; tiles
|
||||
SURROUNDING_WIDTH EQU 6 * METATILE_WIDTH ; tiles
|
||||
SURROUNDING_HEIGHT EQU 5 * METATILE_WIDTH ; tiles
|
||||
SCREEN_META_WIDTH EQU 6 ; metatiles
|
||||
SCREEN_META_HEIGHT EQU 5 ; metatiles
|
||||
SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles
|
||||
SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles
|
||||
|
||||
|
||||
HP_BAR_LENGTH EQU 6 ; tiles
|
||||
|
24
home/map.asm
24
home/map.asm
@ -1454,8 +1454,8 @@ BufferScreen:: ; 2879
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wScreenSave
|
||||
ld c, $5
|
||||
ld b, $6
|
||||
ld c, SCREEN_META_HEIGHT
|
||||
ld b, SCREEN_META_WIDTH
|
||||
.row
|
||||
push bc
|
||||
push hl
|
||||
@ -1467,9 +1467,9 @@ BufferScreen:: ; 2879
|
||||
jr nz, .col
|
||||
pop hl
|
||||
ld a, [wMapWidth]
|
||||
add $6
|
||||
add 6
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec c
|
||||
@ -1498,18 +1498,18 @@ SaveScreen:: ; 289d
|
||||
ret
|
||||
|
||||
.up
|
||||
ld de, wScreenSave + 6
|
||||
ld de, wScreenSave + SCREEN_META_WIDTH
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
jr .vertical
|
||||
|
||||
.down
|
||||
ld de, wScreenSave
|
||||
.vertical
|
||||
ld b, 6
|
||||
ld c, 4
|
||||
ld b, SCREEN_META_WIDTH
|
||||
ld c, SCREEN_META_HEIGHT - 1
|
||||
jr SaveScreen_LoadNeighbor
|
||||
|
||||
.left
|
||||
@ -1520,8 +1520,8 @@ SaveScreen:: ; 289d
|
||||
.right
|
||||
ld de, wScreenSave
|
||||
.horizontal
|
||||
ld b, 5
|
||||
ld c, 5
|
||||
ld b, SCREEN_META_WIDTH - 1
|
||||
ld c, SCREEN_META_HEIGHT
|
||||
jr SaveScreen_LoadNeighbor
|
||||
|
||||
LoadNeighboringBlockData:: ; 28e3
|
||||
@ -1533,8 +1533,8 @@ LoadNeighboringBlockData:: ; 28e3
|
||||
add 6
|
||||
ld [hConnectionStripLength], a
|
||||
ld de, wScreenSave
|
||||
ld b, 6
|
||||
ld c, 5
|
||||
ld b, SCREEN_META_WIDTH
|
||||
ld c, SCREEN_META_HEIGHT
|
||||
|
||||
SaveScreen_LoadNeighbor:: ; 28f7
|
||||
.row
|
||||
|
2
wram.asm
2
wram.asm
@ -2769,7 +2769,7 @@ wMapGroup:: db ; dcb5 ; map group of current map
|
||||
wMapNumber:: db ; dcb6 ; map number of current map
|
||||
wYCoord:: db ; dcb7 ; current y coordinate relative to top-left corner of current map
|
||||
wXCoord:: db ; dcb8 ; current x coordinate relative to top-left corner of current map
|
||||
wScreenSave:: ds 6 * 5
|
||||
wScreenSave:: ds SCREEN_META_WIDTH * SCREEN_META_HEIGHT
|
||||
|
||||
wCurrMapDataEnd::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user