lemm: improve exploding sequence a bit
This commit is contained in:
parent
f914998e5e
commit
2b7b8763ee
|
@ -156,6 +156,7 @@ lemm.inc: generate_common LEMM
|
|||
./generate_common -a 0x6000 -s move_lemmings lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s erase_lemming lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s update_time lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s update_explosion_timer lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_door lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_door_5 lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_flames lemm.lst >> lemm.inc
|
||||
|
|
|
@ -97,6 +97,12 @@ easily use any ROM routines so useful routines like WAIT and HPOSN
|
|||
are re-implemented in RAM.
|
||||
|
||||
|
||||
Code Description
|
||||
~~~~~~~~~~~~~~~~
|
||||
TODO
|
||||
|
||||
|
||||
|
||||
Memory Map
|
||||
~~~~~~~~~~
|
||||
$0000-$00ff = zero page
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
Spinning things on L7
|
||||
one-way wall L9
|
||||
Improve explosions
|
||||
+ offset the frames when nuking so not simultaneous
|
||||
+ on explosion, start with invisible 6 so we always get a full 5s
|
||||
+ Make particles thicker? Look fine, not show up in recordings
|
||||
+ Erase particles as last step
|
||||
|
||||
Request from internet:
|
||||
+ Acceleration on cursor movement keys
|
||||
This is trickier than it sounds
|
||||
|
||||
Change wait delay on levels with bg animations?
|
||||
Have 20 lemmings on some levels?
|
||||
|
@ -15,9 +21,7 @@ Only scan for Maximum Lemming number rather than maximum possible number?
|
|||
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 shift the other way if walking left/right
|
||||
+ Make particles thicker? Look fine, not show up in recordings
|
||||
+ Erase particles as last step
|
||||
|
||||
+ offset the frames when nuking so not simultaneous
|
||||
+ on explosion, start with invisible 6 so we always get a full 5s
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -63,18 +63,30 @@ draw_lemming_loop:
|
|||
; draw countdown if applicable
|
||||
|
||||
do_draw_countdown:
|
||||
lda lemming_exploding,Y
|
||||
beq do_draw_lemming
|
||||
lda lemming_exploding,Y ; see if exploding
|
||||
beq do_draw_lemming ; if not skip ahead
|
||||
|
||||
; sprites are 5,4,3,2,1
|
||||
|
||||
tya
|
||||
tax
|
||||
inc lemming_exploding_frame,X
|
||||
|
||||
; decrement first because
|
||||
; =0 means no exploding
|
||||
; also to make sure 5 appears a whole second, skip first second
|
||||
|
||||
ldx lemming_exploding,Y
|
||||
dex
|
||||
dex
|
||||
bmi do_draw_lemming
|
||||
|
||||
lda countdown_sprites_l,X
|
||||
lda countdown_sprites_l,X ; look up number sprite
|
||||
sta INL
|
||||
lda countdown_sprites_h,X
|
||||
sta INH
|
||||
|
||||
ldx lemming_x,Y
|
||||
ldx lemming_x,Y ; draw 6 pixels above head
|
||||
stx XPOS
|
||||
lda lemming_y,Y
|
||||
sec
|
||||
|
|
|
@ -336,6 +336,7 @@ make_exploding:
|
|||
lda EXPLODER_COUNT ; only if we have some left
|
||||
beq done_make_exploder
|
||||
|
||||
ldx #0 ; regular frame start
|
||||
jsr explode_lemming
|
||||
|
||||
dec EXPLODER_COUNT
|
||||
|
@ -621,16 +622,17 @@ done_plus_adjust:
|
|||
; nuke
|
||||
;============================
|
||||
;============================
|
||||
; TODO: offset them a bit so it's not simultaneous
|
||||
|
||||
nuke_button:
|
||||
; stop lemmings from exiting
|
||||
lda #0
|
||||
sta LEMMINGS_TO_RELEASE
|
||||
|
||||
ldx #0 ; initial frame offset
|
||||
ldy #0
|
||||
nuke_loop:
|
||||
jsr explode_lemming
|
||||
dex
|
||||
iny
|
||||
cpy #MAX_LEMMINGS
|
||||
bne nuke_loop
|
||||
|
@ -669,13 +671,18 @@ done_menu:
|
|||
;=====================
|
||||
;=====================
|
||||
; which is in Y
|
||||
; frame is in X
|
||||
explode_lemming:
|
||||
; only explode if not already exploding
|
||||
|
||||
lda lemming_exploding,Y
|
||||
bne skip_explode
|
||||
|
||||
lda #1
|
||||
txa
|
||||
sta lemming_exploding_frame,Y
|
||||
|
||||
lda #2 ; 2 not 1 as we don't display the
|
||||
; first partial second
|
||||
sta lemming_exploding,Y
|
||||
|
||||
skip_explode:
|
||||
|
|
|
@ -5,6 +5,7 @@ lemming_y: .res MAX_LEMMINGS,0
|
|||
lemming_direction: .res MAX_LEMMINGS,0
|
||||
lemming_out: .res MAX_LEMMINGS,0
|
||||
lemming_frame: .res MAX_LEMMINGS,0
|
||||
lemming_exploding_frame:.res MAX_LEMMINGS,0
|
||||
lemming_status: .res MAX_LEMMINGS,0
|
||||
lemming_exploding: .res MAX_LEMMINGS,0
|
||||
lemming_fall_distance: .res MAX_LEMMINGS,0
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
; by Vince `deater` Weaver
|
||||
|
||||
PARTICLES = 64
|
||||
PARTICLES = 32
|
||||
SCALE = 2
|
||||
|
||||
;HGR_BITS = $1C
|
||||
|
@ -140,7 +140,7 @@ y_good:
|
|||
HPLOT0:
|
||||
; line from (x,a) to (x+y,a)
|
||||
|
||||
ldy #1
|
||||
ldy #2
|
||||
jsr hgr_hlin
|
||||
|
||||
rts
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
|
||||
|
||||
;============================
|
||||
; update the time
|
||||
;============================
|
||||
; this gets called approximately once a second
|
||||
|
||||
; updates the time left
|
||||
update_time:
|
||||
|
||||
;==============================
|
||||
; update explosion timer
|
||||
;==============================
|
||||
; not ideal (first second might be short)
|
||||
; called roughly at 7Hz
|
||||
|
||||
update_explosion_timer:
|
||||
ldy #0
|
||||
update_exploding_loop:
|
||||
lda lemming_exploding,Y
|
||||
beq not_done_exploding
|
||||
|
||||
lda lemming_exploding_frame,Y ; roughly 1s?
|
||||
cmp #7
|
||||
bne not_done_exploding
|
||||
|
||||
lda #0 ; reset
|
||||
sta lemming_exploding_frame,Y
|
||||
|
||||
tya
|
||||
tax
|
||||
inc lemming_exploding,X
|
||||
lda lemming_exploding,Y
|
||||
cmp #6
|
||||
cmp #7 ; value is 2+displayed
|
||||
bne not_done_exploding
|
||||
|
||||
lda #LEMMING_EXPLODING
|
||||
|
@ -38,8 +36,22 @@ not_done_exploding:
|
|||
cpy #MAX_LEMMINGS
|
||||
bne update_exploding_loop
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;============================
|
||||
; update the time
|
||||
;============================
|
||||
; this gets called approximately once a second
|
||||
|
||||
; updates the time left
|
||||
update_time:
|
||||
|
||||
; jsr update_explosion_timer
|
||||
|
||||
sed
|
||||
|
||||
sec
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
update_timer:
|
||||
jsr update_explosion_timer
|
||||
|
||||
lda SOUND_STATUS
|
||||
and #SOUND_MOCKINGBOARD
|
||||
bne timer_mockingboard
|
||||
|
|
Loading…
Reference in New Issue