mansbestcloud

by snydej

Game:

Description: What do you think it does?

!game_mode = $7e0100
!buttons1 = $7e0016
!ground_stand = $7e13ef
!sprite_stand = $7e1471
!sprite_1_id = $7e009f
!sprite_1_status = $7e14c9
!sprite_1_phase = $7e00c3
!in_cloud = $7e18c2
!cloud_slot = $7e18e1
!cloud_timer = $7e18e0
!mario_y_lo = $7e0096
!mario_y_hi = $7e0097
!sprite_1_tweaker1 = $7e1657
!sprite_1_tweaker4 = $7e167b
!mario_vy = $7e007d
!mario_vx = $7e007b
!sprite_1_vy = $7e00ab
!sprite_1_vx = $7e00b7

	lda !game_mode
	cmp #$14
	bne end
	
	lda !carl_initialized
	beq no_spawn
	
	dec
	sta !carl_initialized
	
	;Player is jumping off the ground. Put them in a cloud!
	lda #$87
	sta !sprite_1_id
	lda #$08
	sta !sprite_1_status
	lda #$01
	sta !in_cloud
	sta !cloud_slot
	sta !sprite_1_phase
	lda #$ff
	sta !cloud_timer
	lda #$80
	sta !sprite_1_tweaker4
	lda #$10
	sta !sprite_1_tweaker1
	lda #$d0
	sta !sprite_1_vy
	lda !mario_vx
	sta !sprite_1_vx
	
no_spawn:
;Test if the player is on the ground.
	lda !ground_stand
	ora !sprite_stand
	beq end
	
;b jump test
	lda !buttons1
	bit #$80
	beq end

	lda !in_cloud
	bne end
	
	lda #$01
	sta !carl_initialized

end:
	lda #$00
	rtl
back to listings