 |
|
 |
|
Views: 236,667,373 Time: 2013-05-25 05:01:30 AM | 9 users online: Dotsarecool, Hadron, Incognito, Kazeshin, Pokeymeister80, Schieber1234, Tahixham, TheSorrow, WhiteYoshiEgg - Guests: 34 - Bots: 14 | Users: 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  |
|
|
|
| Posted on 2012-04-06 04:13:47 PM |
Link | Quote |
|
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. |
|
| Posted on 2012-04-06 04:16:54 PM |
Link | Quote |
|
Just do something like this:
CodeLDA $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. |
|
| Posted on 2012-04-06 05:05:17 PM |
Link | Quote |
|
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. |
|
| Posted on 2012-04-06 05:27:05 PM |
Link | Quote |
|
Originally posted by King DededeEDIT: 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 UsTotal queries: 27
|
|
|
|