dropout

by soapagent

Game: SMW

Description: Periodically disables ground collision

; Base ASM file - feel free to copy/paste this and use this for your own code.

	LDA $100	; \ only run in gamemode 14
	EOR #$14	; |
	ORA $9D		; | and when the game isn't paused
	BEQ +		; |
	RTL		; |
	+		; /

LDA !timer_ones
BEQ reset ; if timer is 0
DEC
BEQ drop ; if timer is 1
DEC
BEQ warning ; if timer is 2
RTL

reset:
LDA #$3D
STA $7E0F0A
INC
STA $7E0F0B
INC
STA $7E0F0C
lda #$FC
STA $7E0F0D
STA $7E0F0E
climbing:
LDA #$00
STA !disable_ground_collision
RTL

drop:
lda #$0d    ;D
STA $7E0F0A
lda #$1b    ;R
STA $7E0F0B
lda #$18    ;O
STA $7E0F0C
lda #$19    ;P
STA $7E0F0D
LDA #$28   ; Exclamation point
STA $7E0F0E
lda $7e0074
bne climbing ; Climbing interacts weird with ground collision
LDA #$01
STA !disable_ground_collision
LDA #$23
STA $1DF9
RTL

warning:
lda #$13    ;J
STA $7E0F0A
lda #$1e    ;U
STA $7E0F0B
lda #$16    ;M
STA $7E0F0C
lda #$19    ;P
STA $7E0F0D
LDA #$28   ; Exclamation point
STA $7E0F0E
LDA #$26
STA $1DF9
RTL
back to listings