Skip to content

Commit

Permalink
GBCompo demo v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DevEd2 committed Sep 26, 2021
1 parent 2b1b1f4 commit e39f104
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Engine/Object.asm
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,21 @@ Monster_CheckKill:
add hl,bc
ld [hl],1
; make player bounce
ld a,[sys_btnHold]
bit btnA,a
jr nz,.highbounce
ld a,high(Player_BounceHeight)
ld [Player_YVelocity],a
ld a,low(Player_BounceHeight)
ld [Player_YVelocityS],a
jr :+
.highbounce
ld a,high(Player_HighBounceHeight)
ld [Player_YVelocity],a
ld a,low(Player_HighBounceHeight)
ld [Player_YVelocityS],a
; prevent monster from respawning
call KillMonster
ret
: ; prevent monster from respawning
jp KillMonster

section "Object System Routines",rom0

Expand Down

0 comments on commit e39f104

Please sign in to comment.