Language…
14 users online:  Ahrion, anonimzwx, Batata Douce,  BeeKaay, crocodileman94, DasFueller, Foxy_9000_, Fozymandias, Hammerer, Maw, monkey03297, playagmes169, schema_tuna, sinseiga - Guests: 255 - Bots: 322
Users: 64,795 (2,376 active)
Latest user: mathew

Sprite states

How do i make sprite states like the noob boss i red on mfg's asm tutorial
Code
Pointers: ; Not required when jumping to $0086DF
dw Code1
dw Code2
dw Code3
;etc.

But i need a explanation on how to do this thing
This is my non existent layout I plan on adding one soon.. or never

I have a discord server, feel free to join if you want
The idea is that you have a table of pointers and each of them point to a different routine. That means, you not only need an index (typically $C2,x but it can be anything) but also a code which handles the pointers. Reading helps as the codes were, in fact, mentioned in my tutorial:
Originally posted by my tutorial (removed unspoiler tags)
Execute pointers (option 1):
Code
	LDA something
	JSL $0086DF

dw Code1
dw Code2
dw Code3
;etc.


Scratch RAM pointers (option 2):
Code
	LDA something
	ASL
	TAY
	LDA Pointers,y
	STA $00
	SEP #$20
	JSR.w ($0000)
	; other code

Pointers:
dw Code1
dw Code2
dw Code3
;etc.


Indexed address pointer (option 3):
Code
	LDA something
	ASL
	TAX
	JSR.w (Pointers,x)
	;other code

Pointers:
dw Code1
dw Code2
dw Code3
;etc.


Okay, we have the codes but which pointers should we take? Well, let's take a look at them:
  1. Option 1 is the value saving most space but is the slowest option because it requires on using the stack.
  2. Option 2 is quite large but is at least faster than the first option.
  3. Option 3 isn't much larger than the first option and also faster than the second option but requires X. "JSR (Pointers,y)" doesn't exist in the 65c816 processor.

Generally, you want to use the first option. Speed isn't an issue here and option 3 has got the problem that you need to use X for the index.