adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Re: solaris, take 2^100 + 2


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] Re: solaris, take 2^100 + 2
Date: 11 Mar 2002 20:35:45 +0100

> > The funny thing is even though music was disabled I get sound effects
> > (I guess the workstations have built in speakers or something). The
> > weirder thing is though that the colours are inverted! The brightness
> > is fine only the colours are screwed up (although the forest in the
> > intro looked ok) - it's like a HUE shift by 180 degrees.
> > Could that be related to the endianess? If you want I could probably
> > make a screenshot.
> 
> I bet so, although I wonder where it comes from. The loading seems to
> work, as you would probably get a segfault if something went wrong
> there. This might be an issue with some of the image manipulation code.
> I'll cc the mail to the devel list. The image code is the realm of Alex,
> so he might see at a glance where the problem lies while I might take
> hours. Right, I'm just lazy ;).

Looks like this is as you guessed, Kai. Although I'm not very aware of
endianness problem, so I'll try to describe what happens:

When an image get loaded, the image loading function reads (length *
height * 3) bytes from the file (one byte per red, green and blue
components), using igzstream::get_block. Here's it's body:

void igzstream::get_block (void * to, u_int32 size)
{
    gzread (file, to, size); 
}

Then it converts it to an SDL surface, assuming the red mask is
0x0000FF, the green mask 0x00FF00 and the blue mask 0xFF0000. I'd bet
whatever you want that the blue and red masks are inverted. Kai, do you
think it could be that get_block doesn't read the stuff correctly?
AFAIK, it's the only place where it is used. If this doesn't help, a
screenshot will probably help me figuring out what's wrong. And if
possible, another one using the GUI.

One thing seems weird though: we released 0.3.2 so it can compile and
run under Solaris, right? Hasn't it been tested before? ;)

Alex.
-- 
http://www.gnurou.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]