/* * 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 . */ #include int update_BOMB(UPDATE_FUNC_ARGS) { int r, rx, ry, nb; //Spark is used so much now that it should be a seperate element. if (parts[i].tmp==1) { for (rx=-1; rx<2; rx++) for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>0 && x+rx=0 && y+ry>0 && x+rxtmp==0) { //Normal bomb *pixel_mode |= PMODE_FLARE; } else if(cpart->tmp==2) { //Flash *pixel_mode = PMODE_FLAT | FIRE_ADD; *colr = *colg = *colb = *firer = *fireg = *fireb = *firea = 255; } else { //Flying spark *pixel_mode = PMODE_SPARK | PMODE_ADD; *cola = 4*cpart->life; } return 0; }