lucasyuhyuh
Moldy Popcorn
Piece of bacon programming MegaDrive games.
Posts: 47
|
Post by lucasyuhyuh on Jan 24, 2020 20:51:40 GMT -5
So i wanted to use 2 different palettes at the same time, 1 for the hand and another 1 for the menu. Any help would be appreciated!
Code: "lang:
palettes palepas,0,0,16
loadtiles epas,960,128 ' 960 Tiles (320x192, 40x24)
DRAWTILESINC 128,0,2,40,24 'start tileset,x,y,Width,Height
goto langfing
langfing:
palettes handpal,0,0,32
loadtiles hand,32,17
hnd=addsprite(4,4)
propsprite hnd,17,0
movesprite hnd,128,128
do
loop"
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 24, 2020 21:03:24 GMT -5
The PropSprite tells you what palette to use on the sprite: PropSprite MySprite,MemLocation,PalNumber
Use the Palette command to load a palette into a different slot: Palettes MyPal,PalNumber,StartOffset,ColorCount[,LabelOffset]
So... Palettes MyPal2,1,0,16 PropSprite MySprite,1,1
Use the help document. Since it's not very well, the SecondBASIC help just got put back online: sbasic.second-dimension.com/
|
|
lucasyuhyuh
Moldy Popcorn
Piece of bacon programming MegaDrive games.
Posts: 47
|
Post by lucasyuhyuh on Jan 24, 2020 21:08:13 GMT -5
Thanks for the info.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 25, 2020 7:50:17 GMT -5
Also, if you need to use a different palette for the background:
DrawTile 100+Palette(n)+Priority(p),x,y
Priority(p) is where P = 0 or 1. 0 means regular/low priority, 1 = high priority. Higher priority is drawn first, so it will overlap normal priority tile and sprites.
|
|