adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] New Windows test


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] New Windows test
Date: 11 Apr 2002 11:16:00 +0200

> > Be sure to take the development package for mingw32 (there is one on
> > SDL's site, AFAIK), and use mingw32 instead of cygwin. Cygwin
> > shouldn't be use if you don't need it's huge library - and we don't.
> > SDL should also compile with mingw32, at least zlib will certainly! :)
> 
> Yeah. I've installed the mingw-SDL and compiled zlib 1.1.4 myself. The
> binary ran without crashing, but the behaviour was just the same as
> reported by JT (even though I did not compile the newest wintest).
> Here's the output:

So, here's our problem: the actual file size (uncompressed) is 21952
bytes. The program only reads 5132. If you look carefully at these
numbers, you notice that 2195 = 5132 * 4. (so actually you should only
have a quarter of the image) The compiler doesn't seems to be guilty
there - anyway mingw32 is known for its quality. One may think that
Windows handles chars as ints (that is, 4 bytes wide) as I'm using
sizeof(char) when reading files. But in this case, the entire image
would be loaded, and would look like trash. Moreover, the alpha and mask
parameters wouldn't be loaded correctly, but they are.

Guess I'll have to run more tests involving only zlib. Testing the size
of the file, the position pointer, the number of bytes we request to
read, etc... Unless someone has another idea, I'll compile a bit zlib
test file.

To reduce download size, I won't include any DLL anymore, so be sure to
keep them in a safe directory!

> OH! Then I know whats wrong!
>
> its just Windows doing censorship of the image :)

Stupid me! Of course. This is not a censorship, but a security measure.
It's preventing itself from being infected by Adonthell's "Viral GPL"
licence.

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




reply via email to

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