Jump to content
  • Advertisement
Sign in to follow this  
mattor

sending out an allegro project

This topic is 4971 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to build a project and send it out so that the person receiving it doesn't have access to the .bmp files and fonts used? Like all they get is an .exe and everything is built into that? if so, how do you do that? [pig]

Share this post


Link to post
Share on other sites
Advertisement
Allegro has datafiles which you use to store game resources. You can read about it in the documentation. Once you use datafiles, the user can't access your bitmaps and such.

Share this post


Link to post
Share on other sites
and ALSO...i'm loading a .bmp (this is allegro still) that has two colors, transparent (pink) and black...but when I use it in my program, the black has switched to a dark green. I'm sure this is a palette problem but I have no idea how to fix it

Share this post


Link to post
Share on other sites
In Allegro, colour index 0 is used for masked colours. It is also usually used for black, since the screen's border ends up being the same as colour index 0 in full screen. As a result, when it tried to convert your bitmaps to use the global palette, it can't use black because that would make all the black parts transparent, so it uses the next closest colour.

You options are:
1: Don't use 8-bit colour.
2: Rearrange the palette so black isn't at index 0. This might result in your screen getting a funny coloured border, though.
3: Create two entries for black, and create a custom colour conversion table that will map #ff00ff to index 0, and #000000 to the second index for black.
4: If you're not using masking, create a custom colour conversion table that treats #ff00ff like it would any other colour.

Share this post


Link to post
Share on other sites
Hey...thanks, I got it loaded into a datafile. But NOW the pink transparent color shows up as solid pink instead of transparent. How do I set a transparent color on a bitmap loaded from a datafile?
Before I embedded it in the datafile, it worked correctly.

Share this post


Link to post
Share on other sites
also, allegro lets you append the datafile into the EXE file, so you have only one big file with everything...

Share this post


Link to post
Share on other sites
I'm using draw_sprite to blit the image to the screen, but it doesn't ignore the pink pixels.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!