set sprite to 256 colors.

All aspects of programming on the Commander X16.
Post Reply
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

set sprite to 256 colors.

Post by funkheld »

hello, good day.
I would like to set the sprite to 256 colors.
how do I do that please?

thanks.
greetings
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Re: set sprite to 256 colors.

Post by unartic »

If you have a sprite 16x16x256colors, you can add it like this:

indx = ADDSPRITE("sprite.bin",16,16,8,0)

The 8 meand 8 bits per pixel which corresponds with 256 colors.
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: set sprite to 256 colors.

Post by funkheld »

hello, thanks for the info.

I couldn't place the "8".

greetings
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Re: set sprite to 256 colors.

Post by unartic »

I'll clarify this in the docs :-)
mortarm
Posts: 298
Joined: Tue May 16, 2023 6:21 pm

Re: set sprite to 256 colors.

Post by mortarm »

unartic wrote: Sat Aug 03, 2024 1:50 pm The 8 meand 8 bits per pixel which corresponds with 256 colors.
Unless there's a technical reason, it would be clearer if the actual color depth value could be used.
Post Reply