The Fog is simply painted twice a second,
this is part of the function:

....

while(j<64)
{
while(i<64)
{

if(check_fog_of_war(i,j)==1)
{
pixel_to_bmap(terrainbitmap,i,j,pixel_bright);
}
if(check_fog_of_war(i,j)==.5)
{
pixel_to_bmap(terrainbitmap,i,j,pixel_grey);
}




i+=1;
}
i=0;
j+=1;
}

bmap_unlock(terrainbitmap);

Twice a second:

all parts of the fog that where not uncovered before get
paited grey,


Then the player-units uncover the Fog, with a circle around them,

All this is stored in an array, and the painter manipulates the fogterrain.

The tricky thing might be to recalculate the unitposition to the
position on the 64x64 Bitmap of the Fog, its just a simple calculation though.


I will worry about using a shader for the fog later, whenever I want to improve the
scene.


Dennis made me a buggy, as seen in the Jobrequest.
Anyway, I need more Models in the future, as
I have 28 different units and Buildings then,
and the map also needs ambient models.

@Doc
Ich kenn mich leider Auch nicht mehr mit dem alten Code so gut aus.
Warscheinlich ist der unittyp nicht bekannt, wenn die Panels das Unitbild anzeigen sollen.
Du mußt Dich mal durch den Code durchhangeln, wo die Panels für die Einheiten angezeigt werden,
da muß der neue Unittyp denn mit eingetragen werden.