Banner
Views: 925,750,794
Time:
17 users online: Ahrion, AppleBoy54321, ASSATAKKU,  Ayami, Azula16,  Bench-kun, Black Goku, Enan63, Ezel, Fryinb, Galactic Spear, HammerBrother, MiracleWater, Mirann, NewPointless, pixelninetales,  quietmason - Guests: 87 - Bots: 73 Users: 51,756 (2,055 active)
Latest: gellys
Tip: Yoshi wings take you to Level C8 or 1C8. If you're on Level 0 and beyond, you get sent to Level C8, while if you're on Level 100 and beyond, you get sent to Level 1C8.
Not logged in.
extended sprites
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - extended sprites
Pages: « 1 » Link
how can i insert a custom extended sprite?
------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
use this

alternatively, Tessera is able to insert them as well
thanks ladida =D.
------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
i'm making a custom extended sprite, but when the sprite is off-screen, it's drawed in the same position but in the other screen. How can i fix this? here's the code:

Code
CusExSprite13:
LDA !freeRAM
LDX !freeRAM+1
LDY !freeRAM+2
PHA
PHX
PHY
PHB
PHK
PLB

JSR SHARED00
JSR SHARED01

LDY.w XLOW,x

LDA $171F,x               ; \ 
SEC                     ;  | 
SBC $1A
STA $0200,y

LDA $1715,x               ; \ 
SEC                     ;  | 
SBC $1C
STA $0201,y

LDA #$A8 ;tile # A8
STA $0202,y

LDA #$44 ;YXPPCCCT
ORA $64
STA $0203,y

TYA
LSR
LSR
TAY
LDA #$02
STA $0420,y
LDX $15E9
Return:
PLB
PLY
PLX
PLA
RTS
XLOW:
db $90,$94,$98,$9C,$A0,$A4,$A8,$AC

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

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
You have to check if (sprite X - layer 1 X) > $0100, or if (sprite Y - layer 1 Y) > $0100, meaning you'll need to do the calculations in 16-bit mode.

Something like this would work, except you need to do this for the Y position as well:
Code
	LDA $1733,x
	XBA
	LDA $171F,x
	REP #$20
	SEC
	SBC $1A
	CMP #$0100
	SEP #$20
	BCS .return
	STA $0200,y
thanks MarioE =D
------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - extended sprites

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks