mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
tile+color macros in gfx.asm
This commit is contained in:
parent
f81add782a
commit
a73c532738
@ -3,6 +3,7 @@ LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes
|
||||
LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes
|
||||
|
||||
NUM_PAL_COLORS EQU 4
|
||||
PAL_COLOR_SIZE EQU 2
|
||||
|
||||
PALRGB_WHITE EQUS "palred 31 + palgreen 31 + palblue 31" ; $7fff
|
||||
|
||||
|
@ -337,11 +337,11 @@ ApplyHPBarPals:
|
||||
ret
|
||||
|
||||
.Enemy:
|
||||
ld de, wBGPals2 palette PAL_BATTLE_BG_ENEMY_HP + 2
|
||||
ld de, wBGPals2 palette PAL_BATTLE_BG_ENEMY_HP color 1
|
||||
jr .okay
|
||||
|
||||
.Player:
|
||||
ld de, wBGPals2 palette PAL_BATTLE_BG_PLAYER_HP + 2
|
||||
ld de, wBGPals2 palette PAL_BATTLE_BG_PLAYER_HP color 1
|
||||
|
||||
.okay
|
||||
ld l, c
|
||||
@ -521,7 +521,7 @@ LoadPalette_White_Col1_Col2_Black:
|
||||
ld [de], a
|
||||
inc de
|
||||
|
||||
ld c, 2 * 2
|
||||
ld c, 2 * PAL_COLOR_SIZE
|
||||
.loop
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
@ -1308,7 +1308,7 @@ rept 4
|
||||
inc hl
|
||||
endr
|
||||
.morn_day
|
||||
ld de, wBGPals1 palette PAL_BG_ROOF + 2
|
||||
ld de, wBGPals1 palette PAL_BG_ROOF color 1
|
||||
ld bc, 4
|
||||
ld a, BANK(wBGPals1)
|
||||
call FarCopyWRAM
|
||||
|
@ -952,7 +952,7 @@ TileAnimationPalette: ; fc6d7
|
||||
jr z, .color2
|
||||
|
||||
.color1
|
||||
ld hl, wBGPals1 palette PAL_BG_WATER + 2
|
||||
ld hl, wBGPals1 palette PAL_BG_WATER color 1
|
||||
ld a, [hli]
|
||||
ld [rBGPD], a
|
||||
ld a, [hli]
|
||||
@ -960,7 +960,7 @@ TileAnimationPalette: ; fc6d7
|
||||
jr .end
|
||||
|
||||
.color0
|
||||
ld hl, wBGPals1 palette PAL_BG_WATER
|
||||
ld hl, wBGPals1 palette PAL_BG_WATER color 0
|
||||
ld a, [hli]
|
||||
ld [rBGPD], a
|
||||
ld a, [hli]
|
||||
@ -968,7 +968,7 @@ TileAnimationPalette: ; fc6d7
|
||||
jr .end
|
||||
|
||||
.color2
|
||||
ld hl, wBGPals1 palette PAL_BG_WATER + 4
|
||||
ld hl, wBGPals1 palette PAL_BG_WATER color 2
|
||||
ld a, [hli]
|
||||
ld [rBGPD], a
|
||||
ld a, [hli]
|
||||
@ -1009,7 +1009,7 @@ FlickeringCaveEntrancePalette: ; fc71e
|
||||
jr .okay
|
||||
|
||||
.bit1set
|
||||
ld hl, wBGPals1 palette PAL_BG_YELLOW + 2
|
||||
ld hl, wBGPals1 palette PAL_BG_YELLOW color 1
|
||||
|
||||
.okay
|
||||
ld a, [hli]
|
||||
|
@ -280,7 +280,7 @@ CopyPals:: ; d50
|
||||
jr nz, .loop
|
||||
|
||||
; de += 8 (next pal)
|
||||
ld a, NUM_PAL_COLORS * 2
|
||||
ld a, NUM_PAL_COLORS * PAL_COLOR_SIZE
|
||||
add e
|
||||
jr nc, .ok
|
||||
inc d
|
||||
|
@ -3,8 +3,8 @@ INCLUDE "macros/predef.asm"
|
||||
INCLUDE "macros/rst.asm"
|
||||
INCLUDE "macros/data.asm"
|
||||
INCLUDE "macros/code.asm"
|
||||
INCLUDE "macros/gfx.asm"
|
||||
INCLUDE "macros/coords.asm"
|
||||
INCLUDE "macros/color.asm"
|
||||
|
||||
INCLUDE "macros/scripts/audio.asm"
|
||||
INCLUDE "macros/scripts/maps.asm"
|
||||
@ -17,6 +17,3 @@ INCLUDE "macros/scripts/trade_anims.asm"
|
||||
INCLUDE "macros/scripts/gfx_anims.asm"
|
||||
|
||||
percent EQUS "* $ff / 100"
|
||||
|
||||
tiles EQUS "* LEN_2BPP_TILE"
|
||||
tile EQUS "+ LEN_2BPP_TILE *"
|
||||
|
@ -13,3 +13,7 @@ palblue EQUS "(1 << 10) *"
|
||||
|
||||
palettes EQUS "* 8"
|
||||
palette EQUS "+ 8 *"
|
||||
color EQUS "+ 2 *"
|
||||
|
||||
tiles EQUS "* LEN_2BPP_TILE"
|
||||
tile EQUS "+ LEN_2BPP_TILE *"
|
@ -681,8 +681,8 @@ Function16cbd1: ; 16cbd1
|
||||
ld bc, 2
|
||||
ld hl, Unknown_16cfa3
|
||||
call AddNTimes
|
||||
ld de, wBGPals1 + 1 palettes + 4
|
||||
ld bc, 2
|
||||
ld de, wBGPals1 palette 1 color 2
|
||||
ld bc, PAL_COLOR_SIZE
|
||||
ld a, $5
|
||||
call FarCopyWRAM
|
||||
farcall ApplyPals
|
||||
|
Loading…
Reference in New Issue
Block a user