lemm: fix bug where it'd crash if you get too close to ceiling

This commit is contained in:
Vince Weaver 2022-04-03 01:03:13 -04:00
parent c004229ec3
commit afab837c37
4 changed files with 20 additions and 12 deletions

View File

@ -1,3 +1,11 @@
Implementation details:
+ stoppers have special $10 line behind them
has to be special so climbers can't treat it as wall
and climb
+ bridge is solid $FF color. Allow things to walk through this,
so shouldn't allow backgrounds to have this pattern
Plan for future scrolling: Plan for future scrolling:
+ Foreground drawn with a tilemap + Foreground drawn with a tilemap
Write program to pick optimal tiles Write program to pick optimal tiles

View File

@ -1,10 +1,8 @@
cheat button
fix climbers hitting ceiling
Bubbles on L4 Bubbles on L4
Hook up exit L5 Hook up exit L5
proper off-screen handling
+ special case
no collision with all-white frames (allow walking through bridges)
no climbing on spikes
+ have bridge stop building when hits wall + have bridge stop building when hits wall
(real game, reverses too maybe?) (real game, reverses too maybe?)
@ -21,16 +19,11 @@ Hook up exit L5
even x, maybe we should start animation 4 frames in if that's even x, maybe we should start animation 4 frames in if that's
the case. Or maybe it's the shift for odd frames, make the case. Or maybe it's the shift for odd frames, make
the shift the other way if walking left/right the shift the other way if walking left/right
+ Add climber
+ Add builder
+ Make particles thicker? Look fine, not show up in recordings + Make particles thicker? Look fine, not show up in recordings
+ Erase particles as last step + Erase particles as last step
+ when nuke, they should stop coming out of the door
+ offset the frames when nuking so not simultaneous + offset the frames when nuking so not simultaneous
+ on explosion, start with invisible 6 so we always get a full 5s + on explosion, start with invisible 6 so we always get a full 5s
+ nuke/exploding should not happen if lemming is splatting
or already exploding
+ green flame for ice level? + green flame for ice level?

View File

@ -12,6 +12,8 @@ hgr_partial_restore:
stx partial_restore_x2_smc+1 stx partial_restore_x2_smc+1
ldx SAVED_Y2 ldx SAVED_Y2
bpl partial_restore_yloop
ldx #0
partial_restore_yloop: partial_restore_yloop:
@ -40,6 +42,6 @@ partial_restore_x1_smc:
dex dex
cpx SAVED_Y1 cpx SAVED_Y1
bcs partial_restore_yloop ; bge bpl partial_restore_yloop ; urgh bcs gets stuck
rts rts

View File

@ -595,9 +595,12 @@ do_lemming_climbing:
not_done_climbing: not_done_climbing:
jsr collision_check_ceiling jsr collision_check_ceiling
bcs done_climbing ; carry set we hit ceiling
; don't check pullup then
jsr collision_check_above jsr collision_check_above
done_climbing:
jmp done_move_lemming jmp done_move_lemming
@ -813,9 +816,11 @@ hit_head:
lda #LEMMING_FALLING lda #LEMMING_FALLING
sta lemming_status,Y sta lemming_status,Y
sec
rts
done_check_ceiling: done_check_ceiling:
clc
rts rts