News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

how do you make a sprite transparent? the color problem is almost solved.

Started by funkheld, 08:27, 25 July 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

funkheld


Hi good afternoon.

how do you make a sprite transparent in cpctelrea?


the color problem is almost solved.


greeting

Norman

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
   cpct_setPalette  (my_palette, 4);
   cpct_setVideoMode(1);

That should do the trick.

Cheers

funkheld

hello thanks.

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

thank you.
greeting

Norman

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

funkheld


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

Norman

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

funkheld


Powered by SMFPacks Menu Editor Mod