lorom

;Source By Shadow34370

;__________________________________________________
;
;Defines:

!VerticalUp = #$0003		;Vertical up speed.
!VerticalDown = #$0006		;vertical down speed.
!Speed = #$F000			;Speed to force Samus down or up
!SamusUp = #$0001		;Tells the game Samus is moving up
!SamusDown = #$0002		;Tells the game Samus is moving up


!VerticalDistance = $0B2E 	;This address changes Samus's vertical speed.
!distanceLow = $0B5A		;This address moves Samus verticaly by sub-pixels.
!distanceHigh = $0B5C		;This address moves Samus verticaly by pixels.
!SamusPose = $0B36		;This address tells the game Samus is moving up, or down. It causes the forceful bounce when going up, and down.

;__________________________________________________


org $9498B2

	DW $B300


org $94B300
	
;This piece keeps you moving at a consistant speed while moving up. (BTS 03)

	LDA !VerticalUp
	STA !VerticalDistance
	RTS
	
	
	

;__________________________________________________


org $9498B4

	DW $B400

org $94B400

;This piece forces Samus up and gives her a little bounce at the peek. The bounce causes the BTS 03 block to grab Samus and keep her moving up. (BTS 04)


	LDA !distanceLow
	SEC 
	SBC !Speed
	STA !distanceLow
	
	LDA !distanceHigh
	SBC #$0000
	STA !distanceHigh

	LDA !SamusUp
	STA !SamusPose

	RTS

;__________________________________________________

org $9498B6

	DW $B500

org $94B500

;This piece keeps you moving at a consistant speed while moving down. (BTS 05)

	
	LDA !VerticalDown
	STA !VerticalDistance
	RTS

;__________________________________________________

org $9498B8

	DW $B600

org $94B600

;This piece forces Samus down and doesn't let her jump back up. The bounce causes the BTS 05 block to grab Samus and keep her moving down. (BTS 06)
	

	LDA !Speed
	STA !distanceLow
	
	LDA !SamusDown
	STA !SamusPose

	RTS



