Author Topic: how do you make a sprite transparent? the color problem is almost solved.  (Read 629 times)

0 Members and 1 Guest are viewing this topic.

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
  • Liked: 20
  • Likes Given: 0

Hi good afternoon.

how do you make a sprite transparent in cpctelrea?


the color problem is almost solved.


greeting
« Last Edit: 15:11, 25 July 20 by funkheld »

Offline Norman

  • CPC464
  • **
  • Posts: 33
  • Country: de
  • Liked: 40
  • Likes Given: 148
If you're working in Mode 1, you only need four colors instead of 16. The palette used for conversion is defined in cfg/image_conversion.mk, have a look at that file and correct the palette definition. Then call
Code: [Select]
   cpct_setPalette  (my_palette, 4);
   cpct_setVideoMode(1);
That should do the trick.

Cheers

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
  • Liked: 20
  • Likes Given: 0
hello thanks.

the color problem is a bit solved.
now i would like to make the sprite transparent.

thank you.
greeting
« Last Edit: 15:11, 25 July 20 by funkheld »

Offline Norman

  • CPC464
  • **
  • Posts: 33
  • Country: de
  • Liked: 40
  • Likes Given: 148
Nice to hear that.
For transparency, you have two options with CPCtelera:If you have more questions like that, the examples of CPCtelera are a gold mine to look at and understand how things are done.

Hope that helps,
Cheers

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
  • Liked: 20
  • Likes Given: 0

thanks for the information.


I don't understand the videos from the language.
the demos that are part of cpctelera are too big, go totally into the big which you can not follow.


greeting

Offline Norman

  • CPC464
  • **
  • Posts: 33
  • Country: de
  • Liked: 40
  • Likes Given: 148
You mean the CPCtelera videos by Prof. Ronaldo that are mostly in spanish? You can turn on Subitles > "Automatic translation" > "English" (oder Deutsch  :) ), it's not perfect but pretty good. Just reading the code on the screen helps as well.

No, the demos/examples are actually quite small and easy to follow IMO, they're split into easy, medium, advanced etc. just for that reason. Fitting to this topic, there's a specific example for masked sprites: https://github.com/lronaldo/cpctelera/tree/master/examples/medium/maskedSprites. In the other examples you'll probably find additional uses of masked sprites. Just try playing around with the examples, change a thing here and there and see what happens. I think it helps immensely.

Cheers

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
  • Liked: 20
  • Likes Given: 0
hello thanks for the info for cpctelera.


greeting