Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(TILE_ WIDTH * Num) > (Num * TILE_WIDTH)
Browse files Browse the repository at this point in the history
Idain committed Jan 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 54f8bd2 commit 02a9111
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions engine/events/celebi.asm
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ UpdateCelebiPosition:
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
cp TILE_WIDTH * 10 + 2
cp 10 * TILE_WIDTH + 2
jp nc, .FreezeCelebiPosition
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
@@ -159,9 +159,9 @@ UpdateCelebiPosition:
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
add [hl]
cp TILE_WIDTH * 11 + 4
cp 11 * TILE_WIDTH + 4
jr nc, .ShiftY
cp TILE_WIDTH * 8 + 4
cp 8 * TILE_WIDTH + 4
jr nc, .ReinitSpriteAnimFrame
.ShiftY:
pop af
@@ -171,15 +171,15 @@ UpdateCelebiPosition:
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
add [hl]
cp TILE_WIDTH * 10
cp 10 * TILE_WIDTH
jr c, .float_up
jr .float_down

.moving_left
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
add [hl]
cp TILE_WIDTH * 10
cp 10 * TILE_WIDTH
jr nc, .float_up
.float_down
ld hl, SPRITEANIMSTRUCT_YCOORD
@@ -200,9 +200,9 @@ UpdateCelebiPosition:
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
add [hl]
cp TILE_WIDTH * 10
cp 10 * TILE_WIDTH
jr c, .left
cp -(TILE_WIDTH * 3 + 2)
cp -(3 * TILE_WIDTH + 2)
jr nc, .left
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc

0 comments on commit 02a9111

Please sign in to comment.