 *******************
 *                 *
 *   BmpToRaw 3    *
 *                 *
 * By Malte Linder *
 *                 *
 *******************

BmpToRaw is a program that converts windows bitmaps into RAW bitmaps used for logos or sky graphics in the Tomb Raider Level Editor.


What's new in version 2
-----------------------
- Sky graphics are supported
- Included RAWViewer that shows you any RAW file containing a logo or a sky graphic
- Messages and menus are in english now


What's new in version 3
-----------------------
- PAK format support for logos
- Changing the transparency option influences loaded logos
- Background graphic for transparency
- Determination of the average color of a picture is possible
- Included PAKViewer that shows you any PAK file containing a compressed logo

Version 3 is the last version of BmpToRaw.


Installation
------------
Copy BmpToRaw.exe, TransPic.raw and zlib.dll into a folder. The program neither adds lines to the registry nor creates files.
The un-install of the program is also easy: You only have to delete the three files.


Operating instructions
----------------------
1) Create a logo (512 pixel * 256 pixel, black will be transparent in the game) or a sky graphic (256 pixel * 256 pixel) as windows bitmap, 24 bit per pixel (RGB).
2) Start BmpToRaw.
3) Choose File|Open BMP. Open the bitmap described in point 1.
4) Choose File|Save RAW (logos and sky graphics) or File|Save PAK (logos). You can enter the filename and the directory.
5) Choose File|Exit. If you would like to convert more pictures go on at point 3 again.

The RAW or PAK bitmap will have the right format but you have to do some preparations to use them in the game:

Logo:
Convert the RAW file with the Tomb Raider Level Editor tool PACKER.EXE or with BmpToRaw and move the PAK file (filename has to be UKLOGO.PAK) into the folder with the TR4 files.

Sky graphic:
Move the RAW file into the folder containing the WADs. The filename must be the same as the other files of the WAD. Then convert your level. Depending on the sky you have to edit the line "Layer1=R,G,B,Speed" in the script to make the sky shown correctly.


Settings
--------
Warning: The settings are not saved. The program always starts with hardcoded settings.

1) Transparency
If this setting is enabled (standard) the black parts of a logo that is loaded will be shown transparent to show where the picture will be transparent in the game. This option has no effect on the RAW or PAK file that can be saved. If it is disabled black will be shown as black in the preview part of the window. If the program is able to open TransPic.raw when starting this bitmap will be the background else the background will be white. You can modify the background in overwriting TransPic.raw with another logo saved as RAW file.

2) German, English
Choose the language of messages and menus.


Extras
------
You find additional features here.

1) RAWViewer
This included tool allows you to view RAW files containing logos or sky graphics. Editing is not possible. Only logos and sky graphics are supported.

2) PAKViewer
Works as RAWViewer but is used to show compressed logos (PAK files).

3) Average color
Calculates the average color of the loaded bitmap. If it is a logo transparent parts wont be treated as parts of the picture. The result can be used for the RGB values in the script line for sky graphics.


Errors
------
While working with BmpToRaw there can occur errors. The program then displays an error message.

"The screen resolution is too low."
The screen is to small for the interface. Set a higher screen resolution.

"Out of memory."
The program could not request enough RAM. Reboot the computer and try again!

"ZLIB.DLL could not be opened."
BmpToRaw 3 needs ZLIB.DLL to save or open PAK files. The file has to be in the folder of BmpToRaw.

"ZLIB.DLL - functions not found."
The file ZLIB.DLL in the folder of BmpToRaw is not the file ZLIB.DLL supplied with BmpToRaw.

"The file could not be opened."
When does the error occur?
- Open BMP/RAW/PAK: Reboot the computer and try again!
- Save RAW/PAK: If you want to overwrite an old file this file could be write-protected. If you want to create a new file the data carrier could be write-protected or there is not enough storage space.

"The file could not be written."
Maybe there is not enough storage space. The file is not written completly so it is defect. If the free storage space on the data carrier is to small (384 kilobytes per logo RAW, 192 kilebytes per sky graphic RAW, not more than 393626 bytes per logo PAK) you have to make enough space. Then try to overwrite the defect RAW file.

"The file could not be read."
Reboot and try again!

"The file could not be closed."
The RAW or PAK file could be damaged. Test it. If it is damaged simply create a new one.

"The size of the bitmap is not correct."
Open your bitmap and set the correct size (512 pixel * 256 pixel for logos, 256 pixel * 256 pixel for sky graphics)!

"The colour depth of the bitmap is not 24 bit (RGB)."
The bitmap has to be saved with the right colour depth (24 bit, RGB).

"The format of the file is not supported."
RAWViewer only supports RAW files containing a logo or a sky graphic.
PAKViewer only supports PAK files containing a compressed logo.

"The data could not be uncompressed."
The PAK file has to have the right Tomb Raider Level Editor format.


Special thanks to
-----------------
- Timm for the great help with the development.
- the people from the EIDOS forum for the great help with many problems.


About
-----
BmpToRaw 3

Programming:
Malte Linder
maltelinder@thelindercompany.de

Website:
www.thelindercompany.de