airlock

by tjb0607

Game: smw

Description: locks mario's x speed while he's in the air

	LDA $100|!addr	; \ only run in gamemode 14
	EOR #$14	; |
	BEQ +		; |
	lda #$00
	sta !carl_initialized
	-
	RTL		; |
	+		; /
	LDA $9D		; | and when the game isn't paused
	BNE -
	
	lda $77
	and #$83
	bne +		; if you bonked a wall, update the freeram too

	lda $72
	beq +
	lda $75
	bne +
	lda !carl_initialized	; \ in air
	sta $7B		; |
	stz $7A		; /
	bra ++
	+
	lda $7B		; \ on floor/ in water/ bonked wall
	sta !carl_initialized	; /
	++
	
	RTL
back to listings