Page 1 of 1

PostPosted: Mon Jul 11, 2005 5:14 pm
by Int21h
I know this is sort of a dumb question, but I have read the manuals and still can't figure this out- What is Pilrc (and PAR) used for? I know they have something to do with embedding forms and bitmaps (and native libraries etc) into PRC files, but most of this can be done in the PDE. For instance, the PDE can use @licons and for bitmaps, we have @bmp. As far as Bitmaps, the only thing I can figure is one can create a DB of bitmaps directly, and then access them using PToolBox (with the OpenDb and the RestoreBuf commands.) If this is true, if you had several bitmaps you wanted to use in a game, you could use Pilrc to 'compile' them all into a pdb file and then open them in your program using PToolBox functions? If this is true, how would this differ from just using the @bmp directive in the PDE? I don't think this is quite right, seeing as PToolBox creates a .pdb database when you save bitmaps and Pilrc creates a prc file.

Sorry about the rambling, I guess can someone please just tell me why you would want to use Pilrc (and PAR) with bitmaps.

ps. I know someone is going to say 'read the manuals,' but because I don't understand what thes file are even for, I don't understand the manuals.

PostPosted: Tue Jul 12, 2005 5:04 am
by Mikael
One thing which springs to mind - and which PDE doesn't seem to offer - is the compression facility in PILRC, as in:

BITMAP ID bitmap1 "bitmap1.bmp" (NO)COMPRESS


PostPosted: Tue Jul 12, 2005 1:26 pm
by Int21h
So the only reason someone would use Pilrc (and PAR) besides wrapping in a native language (and custom forms) is to compress bitmaps? Anyone know any other reasons? It seems there has to be more...

PostPosted: Tue Jul 12, 2005 3:26 pm
by jstadolnik
In addition to compression as Mikael pointed out, you can also set the transparency index to whatever color you want (PocketC by default forces you to use a specific pink color as being transparent). You can also chose to have non-transparent bitmaps (which draw faster) using PilRC.

The @res and @bmp PDE commands are relatively new features. The par+PilRC is the old way of doing things (before these commands existed).


The PToolboxLib guy.

PostPosted: Tue Jul 12, 2005 4:35 pm
by Int21h
That pretty much sums it up. Thanks.

PostPosted: Wed Jul 13, 2005 2:09 pm
by dewey
PocketC always compresses bitmaps (8-bpp and less), so you must use PilRC if you want an UNCOMPRESSED bitmap.

PocketC will create non-transparent bitmaps if no transparent pixels are in the image. This wasn't always the case, but was added due to forum feedback.