From 4a171ad701d40bc36b805adb6d9307ea2ff6674a Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 9 Aug 2019 14:28:50 -0400 Subject: [PATCH] ootw: putsprite_crop now crops off top of screen too --- ootw/gr_putsprite_crop.s | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ootw/gr_putsprite_crop.s b/ootw/gr_putsprite_crop.s index 58ea9b89..cdd67f9a 100644 --- a/ootw/gr_putsprite_crop.s +++ b/ootw/gr_putsprite_crop.s @@ -32,7 +32,16 @@ put_sprite_crop_loop: sty TEMP ; save sprite pointer ; 3 ldy TEMPY ; 3 - bmi crop_increment_y ; if < 0, skip to next + bpl put_sprite_crop_pos ; if < 0, skip to next + + clc ; skip line in sprite too + lda TEMP + adc CH + tay + + bne crop_increment_y + +put_sprite_crop_pos: cpy #48 ; bge if >= 48, done sprite bcs crop_sprite_done