Icon Patch v1.0
================

Licence:
========
Copyright  2003 Mr. Tines <tines@ravnaandtines.com>

This program may be freely redistributed or amended, 
but must retain the attribution above, and amended
versions must be clearly marked as such.

THERE IS NO WARRANTY.

Manifest:
=========
dice.lua - sample Plua program source in MS-DOS text format
dice.rcp - PilRC input example
dice_lua.pdb - sample Plua program source in Palm AportisDoc (DOC) format
dice1.bmp - b&w large icon (this is 32x22 but can alternatively be 32x32 or 22x22)
dice1s.bmp - b&w list icon (15x9)
dice8.bmp - colour large icon (this is 32x22 but can alternatively be 32x32 or 22x22)
dice8s.bmp - colour list icon (15x9)
iconpatch.jar - Java ARchive containing compiled patching code
Readme.txt - this file
Tines' Dice Readme.txt - readme for the sample program
Tines'_dice.prc - the compiled sample Plua program with patched icons

com/ravnaandtines/IconPatch.java - the source for the patching program

How to patch:
=============
You will need to create the icons you wish - 2 bit and 4 bit
grey scale icons are also permissible.  The .rcp file syntax
for the file is

ICONFAMILY 
  "b&w file name" "2 bit grey file name" 
  "4 bit grey file name" "8 bit colour file name" TRANSPARENCY red green blue

SMALLICONFAMILY 
  "b&w file name" "2 bit grey file name" 
  "4 bit grey file name" "8 bit colour file name" TRANSPARENCY red green blue

where all files are windows .bmp files and missing files are given as "".
ICONFAMILY denotes the large icons, SMALLICONFAMILY the smalle ones.
Transparent colours are given as 0-255 colour index values.

Using pilrc myfile.rcp will generate output like this

	C:\java\iconpatch>pilrc dice.rcp
	PilRC v2.9
	  Copyright 1997-1999 Wes Cherry   (wesc@ricochet.net)
	  Copyright 2000-2001 Aaron Ardiri (aaron@ardiri.com)

	Generating 68K resources from 'dice.rcp'.
	Writing tAIB03e8.bin
	824 bytes
	Writing tAIB03e9.bin
	196 bytes

where tAIB03e8.bin has the big icon data and tAIB03e9.bin the small.
Or you can use TealPoint Software's BMP2AIB program, but you have to
take care to get the colours to come out right (simply using the .bmp
files given here will give pink, not grey, output, for example).

Having createed the .bin files, take them and the .prc file, 
and run the iconpatch Java program at a command (MS-DOS) prompt.  
Many Windows systems will have a Java VM for running applets in 
Internet Explorer, which you can access as (all on one line, and 
giving full or relative paths to the files)

	jview /cp:a iconpatch.jar com.ravnaandtines.IconPatch prcfile.prc tAIB03e8.bin tAIB03e9.bin

or if you use Sun's Java, it's "java -cp" rather than "jview /cp:a"
for java versions after 1.1 (if you're still using 1.1, then it's
simplest to set the classpath explicitly in one line, 

	SET CLASSPATH=<path to classes.zip>;<path to iconpatch.jar>

where you fill in the actual paths e.g. c:\jre1.1.8\lib\classes.zip
for <path to classes.zip>).  Then run it in the next line with just 
(again, file names to be filled in)

	java com.ravnaandtines.IconPatch prcfile.prc tAIB03e8.bin tAIB03e9.bin

If you don't have Java, older (smaller) Java runtimes can be found
on java.sun.com (about 2Mb, as well as the 20-odd Mb of the later ones,
which are for thoes people with broadband).

The patched file generated by the Java program from prcfile.prc 
is called prcfile.prc.patch.prc, and can be renamed and installed 
in the normal way, over the top of any existing copy of the program.
