blowshi

by snydej

Game:

Description: Yoshi? More like Blowshi! 🤣

!game_mode = $7e0100
!frame_counter = $7E0014
!bomb_time = $7fba13
!bomb_timers = $7fba14
!sprite_id = $7e009e
!sprite_status = $7e14c8
!sprite_tweaker4 = $7e167a
!yoshi_color = $7e15f6
!bobomb_explode_flag = $7e1534
!bobomb_explode_timer = $7e1540
!sfx = $7e1dfc

	lda !carl_initialized
	bne skip_init
	lda #$40
	sta !bomb_time
	sta !carl_initialized
	
skip_init:
	lda !game_mode
	cmp #$14
	bne end

	ldx #$0b
loop_over_sprites:

;Check if slot contains a yoshi
	lda !sprite_id,X
	cmp #$35
	bne not_yoshi
	lda !sprite_status,X
	cmp #$08
	bmi not_yoshi

;is a yoshi!
	lda !frame_counter
	and #$07
	sec
	sbc #$01
	
	lda !bomb_timers,X
	sbc #$00
	bmi explosion
	sta !bomb_timers,X
	cmp #$10
	bpl loop_end

;flashing zone
	lda !yoshi_color,X
	inc
	sta !yoshi_color,X
	bra loop_end

explosion:
	lda #$0d
	sta !sprite_id,X
	lda #$01
	sta !bobomb_explode_flag,X
	lda #$30
	sta !bobomb_explode_timer,X
	lda #$22
	sta !sprite_tweaker4,X
	lda #$09
	sta !sfx
	
not_yoshi:
	lda !bomb_time
	sta !bomb_timers,X

loop_end:
	dex
	bpl loop_over_sprites

end:
	lda #$00
	rtl
back to listings