mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fix magic numbers in Celebi event code
This commit is contained in:
parent
5d94f1c7b4
commit
5fb672b220
@ -132,7 +132,7 @@ UpdateCelebiPosition:
|
|||||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp 8 * 10 + 2
|
cp 10 * TILE_WIDTH + 2
|
||||||
jp nc, .FreezeCelebiPosition
|
jp nc, .FreezeCelebiPosition
|
||||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -159,9 +159,9 @@ UpdateCelebiPosition:
|
|||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add [hl]
|
add [hl]
|
||||||
cp 8 * 11 + 4
|
cp 11 * TILE_WIDTH + 4
|
||||||
jr nc, .ShiftY
|
jr nc, .ShiftY
|
||||||
cp 8 * 8 + 4
|
cp 8 * TILE_WIDTH + 4
|
||||||
jr nc, .ReinitSpriteAnimFrame
|
jr nc, .ReinitSpriteAnimFrame
|
||||||
.ShiftY:
|
.ShiftY:
|
||||||
pop af
|
pop af
|
||||||
@ -171,7 +171,7 @@ UpdateCelebiPosition:
|
|||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add [hl]
|
add [hl]
|
||||||
cp 8 * 10
|
cp 10 * TILE_WIDTH
|
||||||
jr c, .float_up
|
jr c, .float_up
|
||||||
jr .float_down
|
jr .float_down
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ UpdateCelebiPosition:
|
|||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add [hl]
|
add [hl]
|
||||||
cp 8 * 10
|
cp 10 * TILE_WIDTH
|
||||||
jr nc, .float_up
|
jr nc, .float_up
|
||||||
.float_down
|
.float_down
|
||||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||||
@ -200,9 +200,9 @@ UpdateCelebiPosition:
|
|||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add [hl]
|
add [hl]
|
||||||
cp 8 * 10
|
cp 10 * TILE_WIDTH
|
||||||
jr c, .left
|
jr c, .left
|
||||||
cp -(8 * 3 + 2)
|
cp -(3 * TILE_WIDTH + 2)
|
||||||
jr nc, .left
|
jr nc, .left
|
||||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
Loading…
Reference in New Issue
Block a user