From bf5c62a292b2d6d00433f0356aa87376fcea9d1e Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 15 Sep 2024 23:50:33 -0400 Subject: [PATCH] climb: avoid crash when you get too high --- games/peasant_mini/cliff/TODO | 5 ++--- games/peasant_mini/cliff/climb.s | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/games/peasant_mini/cliff/TODO b/games/peasant_mini/cliff/TODO index 8b3f506f..87d9cd2c 100644 --- a/games/peasant_mini/cliff/TODO +++ b/games/peasant_mini/cliff/TODO @@ -2,9 +2,8 @@ Change priority code to work on three-wide sprites Change draw transparency code to work on three-wide sprites Erase flame even when not moving? That is tricky as would need to redraw head as well :( maybe just erase part above the head? -Make it so you can't go down to previous level - -Above level2 don't crash, just show bg#2 again +add collision detection for boulders +adjust boulder fall frequency to match original For Coach Z version: Speed up rocks/change spawn rate above level2 diff --git a/games/peasant_mini/cliff/climb.s b/games/peasant_mini/cliff/climb.s index 390acd3b..8e2dec2e 100644 --- a/games/peasant_mini/cliff/climb.s +++ b/games/peasant_mini/cliff/climb.s @@ -501,6 +501,15 @@ load_graphics: ;======================== ldx MAP_LOCATION + + cpx #2 + bcc priority_normal + + ldx #2 + +priority_normal: + + lda priority_data_l,X sta ZX0_src lda priority_data_h,X @@ -524,6 +533,17 @@ load_graphics: ;=========================== ldx MAP_LOCATION + + ; extra for Z variant + ; repeat level 2 over and over + + cpx #2 + bcc bg_normal + + ldx #2 + +bg_normal: + lda bg_data_l,X sta ZX0_src lda bg_data_h,X