wSpritesEnd -> wVirtualOAMEnd.

This commit is contained in:
luckytyphlosion
2018-01-30 14:55:20 -05:00
parent 0b45e2e846
commit 4a3384ab09
8 changed files with 16 additions and 16 deletions

View File

@ -272,7 +272,7 @@ endr
.delete .delete
ld hl, wVirtualOAM ld hl, wVirtualOAM
ld c, wSpritesEnd - wVirtualOAM ld c, wVirtualOAMEnd - wVirtualOAM
xor a xor a
.loop2 .loop2
ld [hli], a ld [hli], a
@ -1502,7 +1502,7 @@ BattleAnim_UpdateOAM_All: ; cc96e
ld h, HIGH(wVirtualOAM) ld h, HIGH(wVirtualOAM)
.loop2 .loop2
ld a, l ld a, l
cp LOW(wSpritesEnd) cp LOW(wVirtualOAMEnd)
jr nc, .done jr nc, .done
xor a xor a
ld [hli], a ld [hli], a

View File

@ -64,7 +64,7 @@ endr
dec c dec c
jr nz, .OAMloop jr nz, .OAMloop
ld hl, wVirtualOAMSprite04 ld hl, wVirtualOAMSprite04
ld bc, wSpritesEnd - wVirtualOAMSprite04 ld bc, wVirtualOAMEnd - wVirtualOAMSprite04
xor a xor a
call ByteFill call ByteFill
ret ret

View File

@ -63,7 +63,7 @@ ShakeHeadbuttTree: ; 8c80a
ld [hBGMapMode], a ld [hBGMapMode], a
farcall ClearSpriteAnims farcall ClearSpriteAnims
ld hl, wVirtualOAMSprite36 ld hl, wVirtualOAMSprite36
ld bc, wSpritesEnd - wVirtualOAMSprite36 ld bc, wVirtualOAMEnd - wVirtualOAMSprite36
xor a xor a
call ByteFill call ByteFill
ld de, Font ld de, Font
@ -405,7 +405,7 @@ endr
dec c dec c
jr nz, .OAMloop jr nz, .OAMloop
ld hl, wVirtualOAMSprite04 ld hl, wVirtualOAMSprite04
ld bc, wSpritesEnd - wVirtualOAMSprite04 ld bc, wVirtualOAMEnd - wVirtualOAMSprite04
xor a xor a
call ByteFill call ByteFill
ret ret

View File

@ -2821,7 +2821,7 @@ _UpdateSprites:: ; 5920
.fill .fill
ld a, [wVramState] ld a, [wVramState]
bit 1, a bit 1, a
ld b, LOW(wSpritesEnd) ld b, LOW(wVirtualOAMEnd)
jr z, .ok jr z, .ok
ld b, 28 * SPRITEOAMSTRUCT_LENGTH ld b, 28 * SPRITEOAMSTRUCT_LENGTH
.ok .ok
@ -3047,7 +3047,7 @@ InitSprites: ; 5991
ld a, [hli] ld a, [hli]
ld [hUsedSpriteTile], a ld [hUsedSpriteTile], a
add c add c
cp LOW(wSpritesEnd) cp LOW(wVirtualOAMEnd)
jr nc, .full jr nc, .full
.addsprite .addsprite
ld a, [hFFC0] ld a, [hFFC0]

View File

@ -2589,7 +2589,7 @@ Pokedex_GetArea: ; 91d11
.copy_sprites .copy_sprites
hlcoord 0, 0 hlcoord 0, 0
ld de, wVirtualOAM ld de, wVirtualOAM
ld bc, wSpritesEnd - wVirtualOAM ld bc, wVirtualOAMEnd - wVirtualOAM
call CopyBytes call CopyBytes
ret ret
@ -2656,7 +2656,7 @@ Pokedex_GetArea: ; 91d11
.done_nest .done_nest
ld hl, wVirtualOAM ld hl, wVirtualOAM
decoord 0, 0 decoord 0, 0
ld bc, wSpritesEnd - wVirtualOAM ld bc, wVirtualOAMEnd - wVirtualOAM
call CopyBytes call CopyBytes
ret ret
@ -2701,7 +2701,7 @@ Pokedex_GetArea: ; 91d11
.clear_oam .clear_oam
ld hl, wVirtualOAMSprite04 ld hl, wVirtualOAMSprite04
ld bc, wSpritesEnd - wVirtualOAMSprite04 ld bc, wVirtualOAMEnd - wVirtualOAMSprite04
xor a xor a
call ByteFill call ByteFill
ret ret
@ -2742,7 +2742,7 @@ Pokedex_GetArea: ; 91d11
.clear .clear
ld hl, wVirtualOAM ld hl, wVirtualOAM
ld bc, wSpritesEnd - wVirtualOAM ld bc, wVirtualOAMEnd - wVirtualOAM
xor a xor a
call ByteFill call ByteFill
scf scf

View File

@ -62,9 +62,9 @@ DoNextFrameForAllSprites: ; 8cf7a
ld l, a ld l, a
ld h, HIGH(wVirtualOAM) ld h, HIGH(wVirtualOAM)
.loop2 ; Clear (wVirtualOAM + [wCurrSpriteOAMAddr] --> wSpritesEnd) .loop2 ; Clear (wVirtualOAM + [wCurrSpriteOAMAddr] --> wVirtualOAMEnd)
ld a, l ld a, l
cp LOW(wSpritesEnd) cp LOW(wVirtualOAMEnd)
jr nc, .done jr nc, .done
xor a xor a
ld [hli], a ld [hli], a
@ -302,7 +302,7 @@ UpdateAnimFrame: ; 8d04c
inc de inc de
ld a, e ld a, e
ld [wCurrSpriteOAMAddr], a ld [wCurrSpriteOAMAddr], a
cp LOW(wSpritesEnd) cp LOW(wVirtualOAMEnd)
jr nc, .reached_the_end jr nc, .reached_the_end
dec c dec c
jr nz, .loop jr nz, .loop

View File

@ -170,7 +170,7 @@ INCLUDE "home/double_speed.asm"
ClearSprites:: ; 300b ClearSprites:: ; 300b
; Erase OAM data ; Erase OAM data
ld hl, wVirtualOAM ld hl, wVirtualOAM
ld b, wSpritesEnd - wVirtualOAM ld b, wVirtualOAMEnd - wVirtualOAM
xor a xor a
.loop .loop
ld [hli], a ld [hli], a

View File

@ -343,7 +343,7 @@ wVirtualOAMSprite36:: sprite_oam_struct wVirtualOAMSprite36
wVirtualOAMSprite37:: sprite_oam_struct wVirtualOAMSprite37 wVirtualOAMSprite37:: sprite_oam_struct wVirtualOAMSprite37
wVirtualOAMSprite38:: sprite_oam_struct wVirtualOAMSprite38 wVirtualOAMSprite38:: sprite_oam_struct wVirtualOAMSprite38
wVirtualOAMSprite39:: sprite_oam_struct wVirtualOAMSprite39 wVirtualOAMSprite39:: sprite_oam_struct wVirtualOAMSprite39
wSpritesEnd:: wVirtualOAMEnd::
SECTION "Tilemap", WRAM0 SECTION "Tilemap", WRAM0