Confused about Pilrc

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Int21h on Mon Jul 11, 2005 5:14 pm

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.
Posts: 14
Joined: Tue Jun 21, 2005 8:04 pm

Postby Mikael on Tue Jul 12, 2005 5:04 am

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

Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby Int21h on Tue Jul 12, 2005 1:26 pm

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...
Posts: 14
Joined: Tue Jun 21, 2005 8:04 pm

Postby jstadolnik on Tue Jul 12, 2005 3:26 pm

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.
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Int21h on Tue Jul 12, 2005 4:35 pm

That pretty much sums it up. Thanks.
Posts: 14
Joined: Tue Jun 21, 2005 8:04 pm

Postby dewey on Wed Jul 13, 2005 2:09 pm

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.
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 3 guests