lorom

;---------------------Easy Space Jump_1.0-----------------------------------;
;-----------------Based off code by Begrimed----------------------------;
;-------Thanks PJ.Boy for Bank Logs and Scyzer for ASM tutorial---------;

;Toggles hex edits for space jump, based off of an equipped item. 

;-----------------------Defines-----------------------------------------;

!Item = !GravitySuit

!VariaSuit = #$0001
!SpringBall = #$0002
!MorphBall = #$0004
!ScrewAttack = #$0008
!GravitySuit = #$0020
!HiJump = #$0100
;!SpaceJump = #$0200
!Bombs = #$1000
!SpeedBooster = #$2000
;!Grapple = #$4000
;!Xray = #$8000


;-----------------------Hijacks----------------------------------------;

org $90A4A7
JSR Spacejump1

org $90A4AC
JSR Spacejump2

org $90A498
JSR Spacejump3

org $90A49D 
JSR Spacejump4

;----------------------Freespace---------------------------------------;

org $90F800

Spacejump1:
	LDA $09A2 : Bit !Item : BNE .EasySpace1
	LDA $0B2D : CMP #$0280 ;original Vanilla value 
	RTS

	.EasySpace1
		LDA $0B2D : CMP #$0180 ;Easy Spacejump
		RTS

Spacejump2:
	LDA $09A2 : Bit !Item : BNE .EasySpace2
	LDA $0B2D : CMP #$0500 ;original Vanilla value 
	RTS

	.EasySpace2
		LDA $0B2D : CMP #$0600 ;Easy Spacejump
		RTS

Spacejump3:
	LDA $09A2 : Bit !Item : BNE .EasySpace3
	LDA $0B2D : CMP #$0080 ;original Vanilla value 
	RTS

	.EasySpace3
		LDA $0B2D : CMP #$0180 ;Easy Spacejump
		RTS

Spacejump4:
	LDA $09A2 : Bit !Item : BNE .EasySpace4
	LDA $0B2D : CMP #$0500 ;original Vanilla value 
	RTS

	.EasySpace4
		LDA $0B2D : CMP #$0600 ;Easy Spacejump
		RTS

;------------------------------------------------------------------------;