diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:43:59 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:43:59 (GMT) |
| commit | e3594aba9e05c6865d396418c028049cda92c2f3 (patch) | |
| tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/elements/bomb.c | |
| parent | fb43f7d23e99765ae093fc45608901cb5907d1d8 (diff) | |
| download | powder-e3594aba9e05c6865d396418c028049cda92c2f3.zip powder-e3594aba9e05c6865d396418c028049cda92c2f3.tar.gz | |
Remove old code
Diffstat (limited to 'src/elements/bomb.c')
| -rw-r--r-- | src/elements/bomb.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/elements/bomb.c b/src/elements/bomb.c deleted file mode 100644 index f60c86b..0000000 --- a/src/elements/bomb.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include <element.h> - -int update_BOMB(UPDATE_FUNC_ARGS) { - int r, rx, ry, nb; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) - { - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_BOMB && (r&0xFF)!=PT_EMBR && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_BCLN) - { - int rad = 8; - int nxi; - int nxj; - pmap[y][x] = 0; - for (nxj=-rad; nxj<=rad; nxj++) - for (nxi=-rad; nxi<=rad; nxi++) - if ((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(rad,2))<=1) - if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { - delete_part(x+nxi, y+nxj, 0); - pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; - nb = create_part(-3, x+nxi, y+nxj, PT_EMBR); - if (nb!=-1) { - parts[nb].tmp = 2; - parts[nb].life = 2; - parts[nb].temp = MAX_TEMP; - } - } - for (nxj=-(rad+1); nxj<=(rad+1); nxj++) - for (nxi=-(rad+1); nxi<=(rad+1); nxi++) - if ((pow(nxi,2))/(pow((rad+1),2))+(pow(nxj,2))/(pow((rad+1),2))<=1 && !(pmap[y+nxj][x+nxi]&0xFF)) { - nb = create_part(-3, x+nxi, y+nxj, PT_EMBR); - if (nb!=-1) { - parts[nb].tmp = 0; - parts[nb].life = 50; - parts[nb].temp = MAX_TEMP; - parts[nb].vx = rand()%40-20; - parts[nb].vy = rand()%40-20; - } - } - kill_part(i); - return 1; - } - } - return 0; -} -int graphics_BOMB(GRAPHICS_FUNC_ARGS) -{ - *pixel_mode |= PMODE_FLARE; - return 1; -} |
