Re: Normalinsing Palette: need to know...

Re: Normalinsing Palette: need to know...


Replies | Reply | Tomb Raider Level Editor & Utility Discussion Forum

Posted by Turbo Pascal on May 11, 2000 at 15:57:33:

In reply to: Normalinsing Palette: need to know... posted by BitShifter on May 11, 2000 at 11:53:33:

:
: What does happen if I used as basic document for editing a 24bits (no palette) texture bitmap (like those exported by Jack) for adding foreign textures into then save it as an 8bits bitmaps.

: Would the resulting document be useable for import by Jack into some level file.

: I'm not a computer graphist...

I made few months ago a litle tool called ADDPAGE.EXE (only for TR1) it is availible at The Vagrant Web site.
The Program Add a new Page tile to the 8 bit colors textures in TR1,
you can add the page from any bitmap dept color (8,16,24,32 colors).


Is so better that you export the TR textures data to WINDOWS TBITMAP type,
then you use Win32 Api for deal with the bitmap, you can copy/strech/save
and copy/paste to/from anothers Bitmpas from any resolution & depth colors.

What i did is:

- Open the TR1 data texture and the palette from TR level, (or tr2)
- Create a new empty WINDOWS TBITMAP with the pallete from tr1 and with the
TR1 texture data size. For this a used win32 APIs, CREATEPALLETE and
CREATEBITMAP. We will call this Bitmap_a.
- Put the texture data from TR1 to the new WINDOWS BITMAP using the APIs SETBITMAPBITS; this way you have a all tiles textures in a compatible WINDOWS BITMAP.
- Open the bitmap that you want to import using the APIs LOADBITMAP to another
Bitmap, (Bitmap_b).
- Put what you want from Bitmap_b to Bitmap_a using BITBTL API.
- Put it Back from Bitmap_a to Tr1 texture data using the API GETBITMAPBITS.

That way WINDOWS take care about all colors depts from bitmaps for you.

Of course the above was using pure Win32 ApIs, i you are using Visual
Basic I think also you can use the Win32 Api, Use the VB Image Component and
look for the Bitmap.Handle propertie for use it in the win32 API.

Good Luck,

Turbo Pascal.





Replies:



Reply

Name:

Email:

Subject:

Message:

Optional
Link URL:

Link Title:

Image URL:


Replies | Reply | Tomb Raider Level Editor & Utility Discussion Forum