pilrc politics and updates aside, here's what you would do in pilrc to do what you want:
1) Create a palette resource from a PSP .pal file (just strip the top 3 lines off of it, so it's value-triples only) and then in your .rc file create an entry like: PALETTE 1 "mypalette.pal" 2) Create a bitmap family from your BMP that references the same file: BITMAPFAMILY 1 "" "" "" "mybitmap256.bmp" PALETTE "mypalette.pal" This will give you two resources in your resulting file. What you then do is load the first resource into the appropriate structure and call a WinPalette set command /w it. Then blit the bitmap in the second resource and you're done... Note....You might want to make your images in something like 248 colors instead of 256 colors. This will enable you to have some default colors left over for the OS and custom drawing. To do so, just have PSP downsample your image to 248 colors, and the resulting .pal will only replace the first 248 colors of the palette if you do it all right. As for how to accomplish all of this with Constructor...good luck. "Dan" <[EMAIL PROTECTED]> wrote in message news:101904@palm-dev-forum... > > OK, I took a look very superficial look at PiLRC and decided, after reading > a bit on it, that it would just be easier to rip out a palette structure > from the Paint Shop Pro palette or just rip the palette out from the bitmap > itself. > > Anyway, I wrote a converter from PSP .pal files to C source files, in which > I set the palette in my code using WinPalette(). > > Well, doing this still does not work. And I do not think it has anything to > do with the code because the code version matches the palette index for > index. What has occurred to me is what you mentioned earlier, Aaron. When > I take the 8-bit bitmap and copy and paste it into constructor, it changes > the indeces around because it finds the closest color in the default color > table instead of just keeping all of the indeces the way they are in PSP. > > So after all of this, my question is now - how do I tell constructor to not > find the "closest" color match when I copy and paste a bitmap into > constructor? If there is no way to do this, is there any other avenue that > I can take to get my bitmap information into my code cleanly? I find it > annoying that there doesn't appear to be an option to copy and paste w/o > that color matching algorithm being run in Constructor. However, I did > notice an option in Constructor called "Recolor with current table". Well, > when I hit this, nothing seems to happen, except for the fact that I can now > undo that recoloring. Seeing that something must be happening when I hit > this, maybe the solution lies in there. And if so, how do I change the > "current table"? > > Once again, thank you for your time. > > Regards, > > Daniel Suleski :-> > TD, Mysticware Inc. > www.mysticware.com > > "Aaron Ardiri" <[EMAIL PROTECTED]> wrote in message > news:101693@palm-dev-forum... > > > > >> All I want to do is display an 8-bit bitmap with it's own palette - not > > the > > >> default system palette. > > > > > > I don't think there is a way to get Constructor to do what you > > > want. You'll have to use the PilRC plugin for CodeWarrior to import you > r > > > .BMP files with your own color table instead. > > > > there is an attribute of the BITMAP* commands which allows you to specify > > the palette which the PilRC engine should find the closest match to. once > > you define this paletter, you can also define a PALETTE resource which you > > can then lock and pass onto WinPalette() > > > > it isn't *really* documented, but, read the source :) > > > > --- > > Aaron Ardiri [EMAIL PROTECTED] > > CEO - CTO +46 70 656 1143 > > Mobile Wizardry http://www.mobilewizardry.com/ > > > > > > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
