diff options
Diffstat (limited to 'engine/gfx')
-rwxr-xr-x | engine/gfx/hp_bar.asm | 16 | ||||
-rwxr-xr-x | engine/gfx/mon_icons.asm | 4 | ||||
-rw-r--r-- | engine/gfx/oam_dma.asm | 4 | ||||
-rwxr-xr-x | engine/gfx/palettes.asm | 18 | ||||
-rwxr-xr-x | engine/gfx/screen_effects.asm | 12 |
5 files changed, 27 insertions, 27 deletions
diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm index 221bd7a9..4b91da58 100755 --- a/engine/gfx/hp_bar.asm +++ b/engine/gfx/hp_bar.asm @@ -6,7 +6,7 @@ HPBarLength: GetHPBarLength: push hl xor a - ld hl, H_MULTIPLICAND + ld hl, hMultiplicand ld [hli], a ld a, b ld [hli], a @@ -21,22 +21,22 @@ GetHPBarLength: rr e srl d rr e - ld a, [H_MULTIPLICAND+1] + ld a, [hMultiplicand+1] ld b, a - ld a, [H_MULTIPLICAND+2] + ld a, [hMultiplicand+2] srl b ; divide multiplication result as well rr a srl b rr a - ld [H_MULTIPLICAND+2], a + ld [hMultiplicand+2], a ld a, b - ld [H_MULTIPLICAND+1], a + ld [hMultiplicand+1], a .maxHPSmaller256 ld a, e - ld [H_DIVISOR], a + ld [hDivisor], a ld b, $4 call Divide - ld a, [H_MULTIPLICAND+2] + ld a, [hMultiplicand+2] ld e, a ; e = bc * 48 / de (num of pixels of HP bar) pop hl and a @@ -213,7 +213,7 @@ UpdateHPBar_PrintHPNumber: ld a, [wHPBarOldHP + 1] ld [wHPBarTempHP], a push hl - ld a, [hFlags_0xFFF6] + ld a, [hFlagsFFF6] bit 0, a jr z, .asm_fb15 ld de, $9 diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index d2913715..7a96b36c 100755 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -162,7 +162,7 @@ LoadMonPartySpriteGfxWithLCDDisabled: jr nz, .loop jp EnableLCD -INCLUDE "data/mon_party_sprite_pointers.asm" +INCLUDE "data/icon_pointers.asm" WriteMonPartySpriteOAMByPartyIndex: ; Write OAM blocks for the party mon in [hPartyMonIndex]. @@ -278,7 +278,7 @@ GetPartyMonSpriteID: srl a ret -INCLUDE "data/mon_party_sprites.asm" +INCLUDE "data/pokemon/menu_icons.asm" INC_FRAME_1 EQUS "0, $20" INC_FRAME_2 EQUS "$20, $20" diff --git a/engine/gfx/oam_dma.asm b/engine/gfx/oam_dma.asm index b0d64675..aeea4c01 100644 --- a/engine/gfx/oam_dma.asm +++ b/engine/gfx/oam_dma.asm @@ -1,12 +1,12 @@ WriteDMACodeToHRAM:: ; Since no other memory is available during OAM DMA, ; DMARoutine is copied to HRAM and executed there. - ld c, $ff80 % $100 + ld c, hDMARoutine % $100 ld b, DMARoutineEnd - DMARoutine ld hl, DMARoutine .copy ld a, [hli] - ld [$ff00+c], a + ldh [c], a inc c dec b jr nz, .copy diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index 39991d48..58e08e86 100755 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -1,11 +1,11 @@ _RunPaletteCommand: call GetPredefRegisters ld a, b - cp $ff - jr nz, .next - ld a, [wDefaultPaletteCommand] ; use default command if command ID is $ff -.next - cp UPDATE_PARTY_MENU_BLK_PACKET + cp SET_PAL_DEFAULT + jr nz, .not_default + ld a, [wDefaultPaletteCommand] +.not_default + cp SET_PAL_PARTY_MENU_HP_BARS jp z, UpdatePartyMenuBlkPacket ld l, a ld h, 0 @@ -632,10 +632,10 @@ CopySGBBorderTiles: jr nz, .tileLoop ret -INCLUDE "data/sgb_packets.asm" +INCLUDE "data/sgb/sgb_packets.asm" -INCLUDE "data/mon_palettes.asm" +INCLUDE "data/pokemon/palettes.asm" -INCLUDE "data/super_palettes.asm" +INCLUDE "data/sgb/sgb_palettes.asm" -INCLUDE "data/sgb_border.asm" +INCLUDE "data/sgb/sgb_border.asm" diff --git a/engine/gfx/screen_effects.asm b/engine/gfx/screen_effects.asm index 95f0ea25..0d3806c1 100755 --- a/engine/gfx/screen_effects.asm +++ b/engine/gfx/screen_effects.asm @@ -19,7 +19,7 @@ PredefShakeScreenVertically: ld [wDisableVBlankWYUpdate], a xor a .loop - ld [$ff96], a + ld [hMutateWY], a call .MutateWY call .MutateWY dec b @@ -30,9 +30,9 @@ PredefShakeScreenVertically: ret .MutateWY - ld a, [$ff96] + ld a, [hMutateWY] xor b - ld [$ff96], a + ld [hMutateWY], a ld [rWY], a ld c, 3 jp DelayFrames @@ -43,7 +43,7 @@ PredefShakeScreenHorizontally: call GetPredefRegisters xor a .loop - ld [$ff97], a + ld [hMutateWX], a call .MutateWX ld c, 1 call DelayFrames @@ -58,9 +58,9 @@ PredefShakeScreenHorizontally: ret .MutateWX - ld a, [$ff97] + ld a, [hMutateWX] xor b - ld [$ff97], a + ld [hMutateWX], a bit 7, a jr z, .skipZeroing xor a ; zero a if it's negative |