Game Development Community

Bitmap Arrays

by Xavier "eXoDuS" Amado · in Torque Game Engine · 02/01/2002 (6:20 am) · 2 replies

Anyone knows how the engine handles the bitmap arrays it uses for the gui? i noticed that if i make a new gui control and i use:
mProfile->constructBitmapArray()
and then:
dglDrawBitmapSR(mProfile->mTextureHandle, offset + Point2I(0, y), mProfile->mBitmapArrayRects[index]);

changing the index value, it scrolls through all the arrays in the game, this is darkWindow, darkScroll, etc.
How would i add a new bitmap to this array and how would i know which number it's assigned?

I'm trying to use this to add it to my skinned slider ctrl and to the bitmap buttons ctrl.

#1
02/01/2002 (8:22 am)
Hey, if you take a look at those bitmaps, what they are is a bunch of pictures seperated by a extreme color of specific RGB value. What constructBitmapArray does is cut out all those bitmaps, and make an array out of them. You could add a new element to that array by modifying the original bitmap, make sure you keep the seperator color consistant.
#2
02/01/2002 (8:45 am)
yes i know about the red lines, but i want to add a separate new bitmap to the array.