Language…
17 users online:  Ahrion, Anas, Batata Douce, drkrdnk,  Eden_, Hammerer, LadiesMan217, LuigiTron, magianegra21, masl, Maw, ppp9q,  Ringo, sinseiga, Sokobansolver, Sparx, The_Uber_Camper - Guests: 259 - Bots: 307
Users: 64,795 (2,376 active)
Latest user: mathew

help with a 32X32 carryable sprite

I'm working in a gimmick that involves a 32x32 carryable sprite, but when Mario takes it from the right, it appears that he takes it from the middle instead. From the left is fine though, I'm not sure what's going on here.

Here's a video so you can see better what happens:

https://www.youtube.com/watch?v=yKOoE2OsTVk

And here's the code I'm using:

Code
dcb "INIT"
LDA #$09			;\ hace al sprite carryable
STA $14C8,x			;/
STZ $1510,x
LDA #$11
STA $C2,x
RTL

dcb "MAIN"

PHB		;\
PHK		; | Change the data bank to the one our code is running from.
PLB		; | This is a good practice.
JSR SPRITECODE	; | Jump to the sprite's function.
PLB		; | Restore old data bank.
RTL		;/ And RETURN.

;===================================
;Sprite Function
;===================================

RETURN: RTS

SPRITECODE:
	JSR GRAPHICS

	LDA $9D				;\
	BNE RETURN			;/ If locked, RETURN.

	JSR SUB_OFF_SCREEN_X0		; Handle offscreen.
	
	;utilizo para cosas internas
	LDA #$11
	STA $C2,x
	
	LDA $14C8,x			
	CMP #$0B			; | revisa si esta siendo carriado
	BEQ Carriado
	
	;si no es carriado la velocidad es 0
	STZ $B6,x
	LDA $AA,x
	CMP #$80
	BMI continuar

	STZ $AA,x
continuar:	
	JSL $01A7DC
			;\ Are we touching Mario
	BCC seguir
	
	LDA $15 ;vemos si esta apretando X o Y
	AND #$40
	BEQ seguir
	
	LDY #$0B			
CheckCarry:			
	LDA $14C8,y			; | revisamos si no esta tomando ningun otro sprite
	CMP #$0B			; |
	BEQ seguir			; |
	DEY				; |
	BPL CheckCarry
	
	LDA #$0B
	STA $14C8,x
	LDA #$01
	STA $1510,x
	
	
seguir:
	
	RTS
	
Carriado:
	;si es carriado y esta tocando piso la velocidad en y
	;de mario es 0
	
	LDA $13EF
	BEQ seguir
	STZ $7D

	JMP seguir

;continue graphics and not important code...


------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
Did you set the sprite clipping in the .cfg file to be for a 32x32 sprite?
I guess 21 would be a good value
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?