diff options
| author | Philip <philip@philip-linuxlaptop.(none)> | 2010-11-20 03:03:52 (GMT) |
|---|---|---|
| committer | Philip <philip@philip-linuxlaptop.(none)> | 2010-11-20 03:03:52 (GMT) |
| commit | a38dddaf5a2106ffb3d112584f657a6c3d97c4fb (patch) | |
| tree | 5bb5260a5cc00e14ec257f8b07ed6230623fcaf6 /src/air.c | |
| parent | c1182db42d609a181128b818da28d323c39445fc (diff) | |
| download | powder-a38dddaf5a2106ffb3d112584f657a6c3d97c4fb.zip powder-a38dddaf5a2106ffb3d112584f657a6c3d97c4fb.tar.gz | |
Made wall code use #defines. small fix for adjustabl brush.
Diffstat (limited to 'src/air.c')
| -rw-r--r-- | src/air.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -54,15 +54,15 @@ void update_air(void) vy[y][x] *= VLOSS; vx[y][x] += dx*TSTEPV; vy[y][x] += dy*TSTEPV; - if(bmap[y][x]==1 || bmap[y][x+1]==1 || - bmap[y][x]==8 || bmap[y][x+1]==8 || - (bmap[y][x]==7 && !emap[y][x]) || - (bmap[y][x+1]==7 && !emap[y][x+1])) + if(bmap[y][x]==WL_WALL || bmap[y][x+1]==WL_WALL || + bmap[y][x]==WL_WALLELEC || bmap[y][x+1]==WL_WALLELEC || + (bmap[y][x]==WL_EWALL && !emap[y][x]) || + (bmap[y][x+1]==WL_EWALL && !emap[y][x+1])) vx[y][x] = 0; - if(bmap[y][x]==1 || bmap[y+1][x]==1 || - bmap[y][x]==8 || bmap[y+1][x]==8 || - (bmap[y][x]==7 && !emap[y][x]) || - (bmap[y+1][x]==7 && !emap[y+1][x])) + if(bmap[y][x]==WL_WALL || bmap[y+1][x]==WL_WALL || + bmap[y][x]==WL_WALLELEC || bmap[y+1][x]==WL_WALLELEC || + (bmap[y][x]==WL_EWALL && !emap[y][x]) || + (bmap[y+1][x]==WL_EWALL && !emap[y+1][x])) vy[y][x] = 0; } @@ -76,9 +76,9 @@ void update_air(void) for(i=-1; i<2; i++) if(y+j>0 && y+j<YRES/CELL-1 && x+i>0 && x+i<XRES/CELL-1 && - bmap[y+j][x+i]!=1 && - bmap[y+j][x+i]!=8 && - (bmap[y+j][x+i]!=7 || emap[y+j][x+i])) + bmap[y+j][x+i]!=WL_WALL && + bmap[y+j][x+i]!=WL_WALLELEC && + (bmap[y+j][x+i]!=WL_EWALL || emap[y+j][x+i])) { f = kernel[i+1+(j+1)*3]; dx += vx[y+j][x+i]*f; @@ -118,7 +118,7 @@ void update_air(void) dy += VADV*tx*ty*vy[j+1][i+1]; } - if(bmap[y][x] == 4) + if(bmap[y][x] == WL_FAN) { dx += fvx[y][x]; dy += fvy[y][x]; |
