new cursor

This commit is contained in:
2019-01-09 00:49:45 +01:00
parent ac105a4186
commit a703a0c3a7
4 changed files with 7 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
INCLUDE "hardware.inc" INCLUDE "hardware.inc"
INCLUDE "utils.inc" INCLUDE "utils.inc"
SPRITE_ANIM_DELAY EQU 12 SPRITE_ANIM_DELAY EQU 6
REPEAT_START_DELAY EQU 16 REPEAT_START_DELAY EQU 16
REPEAT_DELAY EQU 3 REPEAT_DELAY EQU 3
@@ -37,14 +37,14 @@ EditOldBuffer:
ldh a, [SelectX] ldh a, [SelectX]
sla a sla a
sla a sla a
add a, 8 add a, 7
ld b, a ld b, a
; compute cursor Y position ; compute cursor Y position
ldh a, [SelectY] ldh a, [SelectY]
sla a sla a
sla a sla a
add a, 16 add a, 15
ld c, a ld c, a
; update and load sprite animation ; update and load sprite animation
@@ -54,7 +54,10 @@ EditOldBuffer:
jr nz, .same jr nz, .same
ldh a, [SpriteAnimation] ldh a, [SpriteAnimation]
inc a inc a
and a, 3 cp a, (SpriteTilesEnd - SpriteTiles) / 16
jr nz, .writeAnim
ld a, 0
.writeAnim
ldh [SpriteAnimation], a ldh [SpriteAnimation], a
ld a, SPRITE_ANIM_DELAY ld a, SPRITE_ANIM_DELAY
ldh [SpriteDelay], a ldh [SpriteDelay], a

Binary file not shown.

Binary file not shown.

BIN
rom.gb

Binary file not shown.