mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-19 15:30:08 +00:00
lemm: can walk uphill now
This commit is contained in:
parent
ef5a65bd48
commit
b9135fe5a3
@ -5,6 +5,8 @@
|
||||
+ fill in some of the ground so we don't get stuck when digging
|
||||
+ Update credits?
|
||||
+ "Out" counter is only printed to page1 so gets erased by cursor
|
||||
+ Level2
|
||||
+ Level3
|
||||
+ Falling too far and you go splat
|
||||
+ Have loadable levels
|
||||
+ See if the jerky animation is due to starting at an odd x vs
|
||||
even x, maybe we should start animation 4 frames in if that's
|
||||
the case
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@ -1,4 +1,3 @@
|
||||
|
||||
;==========================
|
||||
; move them
|
||||
;==========================
|
||||
@ -44,6 +43,9 @@ do_lemming_falling:
|
||||
|
||||
do_lemming_walking:
|
||||
|
||||
; see if ground has risen up
|
||||
|
||||
jsr collision_check_hill
|
||||
|
||||
; collision detect walls
|
||||
|
||||
@ -228,11 +230,9 @@ collision_check_ground:
|
||||
ldy lemming_x
|
||||
lda (GBASL),Y
|
||||
and #$7f
|
||||
beq ground_falling
|
||||
beq ground_falling ; if empty space below us, fall
|
||||
ground_walking:
|
||||
; lda #0
|
||||
; sta lemming_frame
|
||||
lda #LEMMING_WALKING
|
||||
lda #LEMMING_WALKING ; else, walk
|
||||
jmp done_check_ground
|
||||
ground_falling:
|
||||
lda #LEMMING_FALLING
|
||||
@ -240,3 +240,33 @@ done_check_ground:
|
||||
sta lemming_status
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;=============================
|
||||
; collision check hill
|
||||
;=============================
|
||||
|
||||
collision_check_hill:
|
||||
lda lemming_y
|
||||
clc
|
||||
adc #8
|
||||
tay
|
||||
|
||||
lda hposn_high,Y
|
||||
clc
|
||||
adc #$20 ; check bg, not fg
|
||||
sta GBASH
|
||||
lda hposn_low,Y
|
||||
sta GBASL
|
||||
|
||||
ldy lemming_x
|
||||
lda (GBASL),Y
|
||||
and #$7f
|
||||
beq on_ground ; if empty space below us, good
|
||||
underground:
|
||||
dec lemming_y ; bump us up
|
||||
|
||||
on_ground:
|
||||
|
||||
rts
|
||||
|
Loading…
x
Reference in New Issue
Block a user