Banner
Views: 236,379,726
Time: 2013-05-23 05:02:58 AM
6 users online: o 1UPdudes, o dax, Gamma V, Incognito, shreerocks1324, WhiteYoshiEgg - Guests: 17 - Bots: 13Users: 22,867 (1,281 active)
Latest: houseer115
Tip: The multiple midpoints patch can also be used to move a level's normal midpoint.
Palette depending on X position
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Palette depending on X position
Pages: « 1 »
Hi, I'd want to know if it's possible to make a sprite have a different palette depending of its X position. If it is, may I know how?

EDIT: More specifically, I'd like it to choose between 4 palettes, A, B, C and D. Position 00 gives palette A, 01 gives B, and so on.
Last edited on 2012-04-06 04:16:00 PM by King Dedede.
Just do something like this:

Code
LDA $E4,x AND #$01 ; Number of palettes PHX TAX LDA Table,x ORA $64 STA $0303,y PLX
Last edited on 2012-04-06 04:17:08 PM by wiiqwertyuiop.
Where do I put it? In the graphics routine? I want to use it with the NPC v3.0, btw. It seems to already have something to check the sprite's X position.

I'm kinda newbie to ASM, so I need more info.

EDIT: Also, for the "number of palettes" part, is it the number of palettes minus one? Like, 00 meaning 1, 01 meaning 2, etc. ?

EDIT2: 400 posts in more than a year of activity... it's bad, isn't it?
Last edited on 2012-04-06 07:33:54 PM by King Dedede.
Originally posted by King Dedede
EDIT: Also, for the "number of palettes" part, is it the number of palettes minus one? Like, 00 meaning 1, 01 meaning 2, etc. ?

Yes, and of note, that method only works with exponents of 2.

So, 01, 03, 07, 0F, etc.
Pages: « 1 »
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Palette depending on X position

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 28

Menu