git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1372 c06c8d41-db1a-0410-9941-cceddc491573
4PKN27E55QIIHAAGJ3G7XSIYYELDO3HQUPVLVWCFGCUBYDSKL3DQC
HFEFKHVV2ULXS6ZEFNX6ZXXUJKME5L2PITQ3VRTKMRUOU3DHXXWQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
unsigned long* smoke_rays = NULL;
smoke_rays = new unsigned long[num_nondupe_words];
// IMPROVEMENTS:// Smoke will now only block LOS after two cells of smoke. This is// done by updating with a second array.
// IMPROVEMENTS:
// Smoke will now only block LOS after two cells of smoke. This is
// done by updating with a second array.
int quadrant_x[4] = { 1, -1, -1, 1 }; int quadrant_y[4] = { 1, 1, -1, -1 };
int quadrant_x[4] = { 1, -1, -1, 1 };
int quadrant_y[4] = { 1, 1, -1, -1 };
const int quadrant_x[4] = { 1, -1, -1, 1 }; const int quadrant_y[4] = { 1, 1, -1, -1 };
const int quadrant_x[4] = { 1, -1, -1, 1 };
const int quadrant_y[4] = { 1, 1, -1, -1 };
for ( int i = 0; i < 19; ++i ) for ( int j = 0; j < 19; ++j ) sh[i][j] = 0;
for ( int i = 0; i < 19; ++i )
for ( int j = 0; j < 19; ++j )
sh[i][j] = 0;
sh.init(0);
memset( (void*)dead_rays, 0, sizeof(unsigned long) * num_words);
memset( (void*)dead_rays, 0, sizeof(unsigned long) * num_words); memset( (void*)smoke_rays, 0, sizeof(unsigned long) * num_words);
memset( (void*)smoke_rays, 0, sizeof(unsigned long) * num_words);
if ( grid_is_opaque(gr[realx][realy]) || is_opaque_cloud(env.cgrid[realx][realy]) )
if ( grid_is_opaque(gr[realx][realy]) ||
is_opaque_cloud(env.cgrid[realx][realy]) )
if ( grid_is_opaque(gr[realx][realy]) )
} else if ( is_opaque_cloud(env.cgrid[realx][realy]) ) { // block rays which have already seen a cloud for ( unsigned int i = 0; i < num_words; ++i ) { dead_rays[i] |= (smoke_rays[i] & inptr[i]); smoke_rays[i] |= inptr[i]; }
}
else if ( is_opaque_cloud(env.cgrid[realx][realy]) )
{
// block rays which have already seen a cloud
for ( unsigned int i = 0; i < num_words; ++i )
dead_rays[i] |= (smoke_rays[i] & inptr[i]);
smoke_rays[i] |= inptr[i];