Hey everyone! I'm having trouble with the RGBColorType structure. Here is the
section of code that is giving me the problem:
struct TileType
{
bool Walkable;
char Icon;
RGBColorType Color;
};
When I comment out the RGBColorType Color; line my application works fine. When
it is in there, it transforms any characters drawn anywhere into garbage, and
then gives a fatal error.
One time I had an extremely weird case of this, and when the OS first came in
contact with a RGBColorType struct, it just... blew up. Listen to what
happened...
Across the bottom of the screen, there was a line of text. RGBColorType caused
something weird, and here's what happened. The very last row of pixels, Y 319 i
think the last one is, it scrambled it. Then it scrambled the 318 row. Then
317. Around halfway up my text it finally gave me a fatal. I solved the problem
by doing a temporary fix: removing the RGBColorType from the structure (I would
have to put it in later, but before that I ended up starting over from
scratch). That was a long time ago though...
And it's weird, because in the new version of my game, even having it in the
structure causes it to crash. Nothing ever uses the RGBColorType Color;. I
tried doing this:
struct MyColorType
{
UInt8 index, r, g, b;
};
struct TileType
{
bool Walkable;
char Icon;
MyColorType Color;
};
and it works fine! That struct is identical to the RGBColorType. What in the
world is going on?
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/