aboutsummaryrefslogtreecommitdiffstats
path: root/engine/gfx
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2024-09-25 00:45:00 -0500
committerdannye <33dannye@gmail.com>2024-09-25 00:45:00 -0500
commita02a98ee7ada1a658e28698484058be2796dc0df (patch)
tree945986054565bd8b5212fc755415096050d1d3a8 /engine/gfx
parentUse long option flags for rgbgfx, same as tools/gfx (diff)
parentUse `const_skip` (diff)
downloadpokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz
pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz
pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/gfx')
-rw-r--r--engine/gfx/bg_map_attributes.asm4
-rw-r--r--engine/gfx/hp_bar.asm2
-rw-r--r--engine/gfx/mon_icons.asm10
-rw-r--r--engine/gfx/palettes.asm16
-rw-r--r--engine/gfx/screen_effects.asm2
-rw-r--r--engine/gfx/sprite_oam.asm6
6 files changed, 20 insertions, 20 deletions
diff --git a/engine/gfx/bg_map_attributes.asm b/engine/gfx/bg_map_attributes.asm
index 55313846..740e9994 100644
--- a/engine/gfx/bg_map_attributes.asm
+++ b/engine/gfx/bg_map_attributes.asm
@@ -34,7 +34,7 @@ LoadBGMapAttributes::
ldh [rHDMA4], a
ldh a, [rLCDC]
- and rLCDC_ENABLE_MASK ; is LCD off?
+ and 1 << rLCDC_ENABLE ; is LCD off?
jr z, .lcdOff ; if off, transfer immediately
; wait for VBlank if LCD is on
.waitForVBlankLoop1
@@ -68,7 +68,7 @@ LoadBGMapAttributes::
ldh [rHDMA4], a
; LCD check again
ldh a, [rLCDC]
- and rLCDC_ENABLE_MASK ; is LCD off?
+ and 1 << rLCDC_ENABLE ; is LCD off?
jr z, .lcdOff2 ; if off, transfer immediately
; wait for VBlank if LCD is on
.waitForVBlankLoop2
diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm
index 6db3956d..b25f5c49 100644
--- a/engine/gfx/hp_bar.asm
+++ b/engine/gfx/hp_bar.asm
@@ -215,7 +215,7 @@ UpdateHPBar_PrintHPNumber:
push hl
ld de, $15
ldh a, [hUILayoutFlags]
- bit 0, a
+ bit BIT_PARTY_MENU_HP_BAR, a
jr z, .hpBelowBar
ld de, $9
.hpBelowBar
diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm
index dce62c9a..c82e00c0 100644
--- a/engine/gfx/mon_icons.asm
+++ b/engine/gfx/mon_icons.asm
@@ -208,9 +208,9 @@ WriteMonPartySpriteOAMBySpecies:
UnusedPartyMonSpriteFunction:
; This function is unused and doesn't appear to do anything useful. It looks
; like it may have been intended to load the tile patterns and OAM data for
-; the mon party sprite associated with the species in [wcf91].
+; the mon party sprite associated with the species in [wCurPartySpecies].
; However, its calculations are off and it loads garbage data.
- ld a, [wcf91]
+ ld a, [wCurPartySpecies]
call GetPartyMonSpriteID
push af
ld hl, vSprites tile $00
@@ -270,9 +270,9 @@ WriteMonPartySpriteOAM:
jp CopyData
GetPartyMonSpriteID:
- ld [wd11e], a
+ ld [wPokedexNum], a
predef IndexToPokedex
- ld a, [wd11e]
+ ld a, [wPokedexNum]
ld c, a
dec a
srl a
@@ -281,7 +281,7 @@ GetPartyMonSpriteID:
ld d, 0
add hl, de
ld a, [hl]
- bit 0, c
+ bit 0, c ; even or odd?
jr nz, .skipSwap
swap a ; use lower nybble if pokedex num is even
.skipSwap
diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm
index 26bffb4f..d9ae4369 100644
--- a/engine/gfx/palettes.asm
+++ b/engine/gfx/palettes.asm
@@ -75,7 +75,7 @@ SetPal_StatusScreen:
ld de, wPalPacket
ld bc, $10
call CopyData
- ld a, [wcf91]
+ ld a, [wCurPartySpecies]
cp NUM_POKEMON_INDEXES + 1
jr c, .pokemon
ld a, $1 ; not pokemon
@@ -103,7 +103,7 @@ SetPal_Pokedex:
ld de, wPalPacket
ld bc, $10
call CopyData
- ld a, [wcf91]
+ ld a, [wCurPartySpecies]
call DeterminePaletteIDOutOfBattle
ld hl, wPalPacket + 3
ld [hl], a
@@ -297,13 +297,13 @@ BadgeBlkDataLengths:
DeterminePaletteID:
ld a, [hl]
DeterminePaletteIDOutOfBattle:
- ld [wd11e], a
+ ld [wPokedexNum], a
and a ; is the mon index 0?
jr z, .skipDexNumConversion
push bc
predef IndexToPokedex
pop bc
- ld a, [wd11e]
+ ld a, [wPokedexNum]
.skipDexNumConversion
ld e, a
ld d, 0
@@ -723,7 +723,7 @@ SendSGBPackets:
pop hl
call InitGBCPalettes
ldh a, [rLCDC]
- and rLCDC_ENABLE_MASK
+ and 1 << rLCDC_ENABLE
ret z
call Delay3
ret
@@ -853,7 +853,7 @@ TransferCurBGPData::
ld hl, wGBCPal
ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
ldh a, [rLCDC]
- and rLCDC_ENABLE_MASK
+ and 1 << rLCDC_ENABLE
jr nz, .lcdEnabled
REPT NUM_PAL_COLORS
call TransferPalColorLCDDisabled
@@ -892,7 +892,7 @@ BufferBGPPal::
TransferBGPPals::
; Transfer the buffered BG palettes.
ldh a, [rLCDC]
- and rLCDC_ENABLE_MASK
+ and 1 << rLCDC_ENABLE
jr z, .lcdDisabled
di
.waitLoop
@@ -929,7 +929,7 @@ TransferCurOBPData:
ld hl, wGBCPal
ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
ldh a, [rLCDC]
- and rLCDC_ENABLE_MASK
+ and 1 << rLCDC_ENABLE
jr nz, .lcdEnabled
REPT NUM_PAL_COLORS
call TransferPalColorLCDDisabled
diff --git a/engine/gfx/screen_effects.asm b/engine/gfx/screen_effects.asm
index 973a951a..0b4da01b 100644
--- a/engine/gfx/screen_effects.asm
+++ b/engine/gfx/screen_effects.asm
@@ -63,7 +63,7 @@ PredefShakeScreenHorizontally:
ldh a, [hMutateWX]
xor b
ldh [hMutateWX], a
- bit 7, a
+ bit 7, a ; negative?
jr z, .skipZeroing
xor a ; zero a if it's negative
.skipZeroing
diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm
index 4660eaf6..c0cc0b4f 100644
--- a/engine/gfx/sprite_oam.asm
+++ b/engine/gfx/sprite_oam.asm
@@ -113,7 +113,7 @@ PrepareOAMData::
inc hl
inc e
ld a, [hl]
- bit 1, a ; is the tile allowed to set the sprite priority bit?
+ bit BIT_SPRITE_UNDER_GRASS, a
jr z, .skipPriority
ldh a, [hSpritePriority]
or [hl]
@@ -139,8 +139,8 @@ PrepareOAMData::
; Clear unused OAM.
.asm_4a41
- ld a, [wd736]
- bit 6, a ; jumping down ledge or fishing animation?
+ ld a, [wMovementFlags]
+ bit BIT_LEDGE_OR_FISHING, a
ld c, $a0
jr z, .clear