Files
source/TileEngine/Fog Of War.cpp
T
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* More unused stuff removal

delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers

* remove mentions from vc proj files too

* remove preprocessor conditionals for unused definitions

find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'

then manually fixed a couple files the tool errored out on

* yes, the comments too

as title
2023-01-03 15:51:48 +02:00

29 lines
775 B
C++

#include "types.h"
#include "Fog Of War.h"
#include "Isometric Utils.h"
#include "Simple Render Utils.h"
#include "lighting.h"
//When line of sight reaches a gridno, and there is a light there, it turns it on.
//This is only done in the cave levels.
void RemoveFogFromGridNo( INT32 uiGridNo )
{
INT32 i;
INT32 x, y;
x = uiGridNo % WORLD_COLS;
y = uiGridNo / WORLD_COLS;
for( i = 0; i < MAX_LIGHT_SPRITES; i++ )
{
if( LightSprites[ i ].iX == x && LightSprites[ i ].iY == y )
{
if( !(LightSprites[ i ].uiFlags & LIGHT_SPR_ON) )
{
LightSpritePower( i, TRUE );
LightDraw( LightSprites[i].uiLightType, LightSprites[i].iTemplate, LightSprites[i].iX, LightSprites[i].iY, i );
MarkWorldDirty();
return;
}
}
}
}