Language…
6 users online: chess_wc, chineesmw, juzcook, LadiesMan217, Rudi_Schrausch, X11Gbyte - Guests: 86 - Bots: 98
Users: 70,846 (2,349 active)
Latest user: DanteGue29

Low Gravity

Can someone give me a "Low Gravity" uberasm code? I'm not so good at making some codes...
Ive already tried it but i have the smb3 Status Bar in my hack and if i install this, the Status Bar is just one bug...
I use this code:
Code
!GRAVITYLEVEL = $08
GRVMASK:

db $00,$01,$03,$07,$0F,$1F,$3F,$7F

main:
	LDA #!GRAVITYLEVEL
	AND #$07	;only low 3 bits
	TAX		;and into X

	LDA $14		;frame counter
	AND GRVMASK,x	;affect gravity on this frame?
	BNE Return

	LDA #!GRAVITYLEVEL
	BIT #$08	;test for high / low
	BNE HighGravity	

;lowgravity
	DEC $7D		;up
	RTL
HighGravity:
	INC $7D		;down
Return:
	RTL

dunno where I found it but there you go.
Is this a Uberasm-Code???
Dunno what you mean with ??? but yes this is uberasm code.
Though this is supposed to be inserted via UberAsmTool
and not the patch.

Also if you want it for the uberasm patch then just change all RTL to RTS and the main: label to whatever level label you want it to have.
@TheBiob and example Label? I don't know some things about the uberASM
What? You asked for an uberasm code?

If you're using UberASMTool then you just put it in a file and refer to it in list.txt
If you want it in uberasm patch form then:
the xxx after "level" needs to be replaced with the level number.
Code
!GRAVITYLEVEL = $08
GRVMASK:

db $00,$01,$03,$07,$0F,$1F,$3F,$7F

levelxxx:
	LDA #!GRAVITYLEVEL
	AND #$07	;only low 3 bits
	TAX		;and into X

	LDA $14		;frame counter
	AND GRVMASK,x	;affect gravity on this frame?
	BNE Return

	LDA #!GRAVITYLEVEL
	BIT #$08	;test for high / low
	BNE HighGravity	

;lowgravity
	DEC $7D		;up
	RTS
HighGravity:
	INC $7D		;down
Return:
	RTS
Thx