glob2-devel
[Top][All Lists]
Advanced

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

[glob2-devel] fog of war (was: multythreading?)


From: Joe Wells
Subject: [glob2-devel] fog of war (was: multythreading?)
Date: Sun, 06 May 2007 00:11:07 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Kai Antweiler" <address@hidden> writes:

> I have tried with and without sound, but it does not crash.
>
> But I don't have fog of war.  I only see the boarders of fog of war.

I suspect that you might be seeing the result of my patch (for less
fog-of-war dimming) to Game.cpp (which I think Leo put in the main
branch?) without the corresponding change to the data/gfx/shade*.png
files.  That would explain why you think you are seeing only the
borders of the fog of war, because they will be much darker if you are
still using the old shade*.png images.  You need both changes
simultaneously.

I included the adjusted images in the same e-mail message which
included my patch.

If you want to play with different amounts of changes to the dimness,
you can obtain the less dim shade*.png files from the 0.8.23 versions
by running the following script (which adjusts only the alpha
channel):

#!/bin/sh
for i in `seq 0 20`; do
    cp shade$i.png shade$i-old.png
    convert shade$i-old.png \( -clone 0 -channel red -separate \) \( -clone 0 
-channel green -separate \) \( -clone 0 -channel blue -separate \) \( -clone 0 
-channel alpha -fx a/3.175 -separate \) -delete 0 -channel rgba -combine 
shade$i.png
done

The value 3.175 is simply 127/40, because the old amount of dimness
was 127 and the new amount in my patch is 40.  If you want to try, for
example, 60 instead (this is roughly 24% opacity), then you would
change the patch to use 60 and adjust the convert command above to use
2.117 (which is 127/60).  (By the way, “convert” is from ImageMagick.)

I hope this helps.

-- 
Joe




reply via email to

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