Banner
Views: 236,667,373
Time: 2013-05-25 05:01:30 AM
9 users online: o Dotsarecool, o Hadron, Incognito, Kazeshin, Pokeymeister80, Schieber1234, o Tahixham, TheSorrow, WhiteYoshiEgg - Guests: 34 - Bots: 14Users: 22,885 (1,280 active)
Latest: ar1an1
Tip: Switch palace switches normally disappear if you replay the level, but if you insert them as direct Map16 and use the hex-edit at 070B2 in the ROM map, you can replay the level without a problem.
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: 27

Menu