summaryrefslogtreecommitdiff
path: root/src/elements/phot.c
diff options
context:
space:
mode:
authorSimon 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)
commite3594aba9e05c6865d396418c028049cda92c2f3 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/elements/phot.c
parentfb43f7d23e99765ae093fc45608901cb5907d1d8 (diff)
downloadpowder-e3594aba9e05c6865d396418c028049cda92c2f3.zip
powder-e3594aba9e05c6865d396418c028049cda92c2f3.tar.gz
Remove old code
Diffstat (limited to 'src/elements/phot.c')
-rw-r--r--src/elements/phot.c101
1 files changed, 0 insertions, 101 deletions
diff --git a/src/elements/phot.c b/src/elements/phot.c
deleted file mode 100644
index d014ba5..0000000
--- a/src/elements/phot.c
+++ /dev/null
@@ -1,101 +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_PHOT(UPDATE_FUNC_ARGS) {
- int r, rt, rx, ry;
- float rr, rrr;
- parts[i].pavg[0] = x;
- parts[i].pavg[1] = y;
- if (!(parts[i].ctype&0x3FFFFFFF)) {
- kill_part(i);
- return 1;
- }
- if (parts[i].temp > 506)
- if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
- for (rx=-1; rx<2; rx++)
- for (ry=-1; ry<2; 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_ISOZ && 5>(rand()%2000))
- {
- parts[i].vx *= 0.90;
- parts[i].vy *= 0.90;
- create_part(r>>8, x+rx, y+ry, PT_PHOT);
- rrr = (rand()%360)*3.14159f/180.0f;
- rr = (rand()%128+128)/127.0f;
- parts[r>>8].vx = rr*cosf(rrr);
- parts[r>>8].vy = rr*sinf(rrr);
- pv[y/CELL][x/CELL] -= 15.0f * CFDS;
- }
- if ((r&0xFF)==PT_ISZS && 5>(rand()%2000))
- {
- parts[i].vx *= 0.90;
- parts[i].vy *= 0.90;
- create_part(r>>8, x+rx, y+ry, PT_PHOT);
- rr = (rand()%228+128)/127.0f;
- rrr = (rand()%360)*3.14159f/180.0f;
- parts[r>>8].vx = rr*cosf(rrr);
- parts[r>>8].vy = rr*sinf(rrr);
- pv[y/CELL][x/CELL] -= 15.0f * CFDS;
- }
- }
- r = pmap[y][x];
- if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF)
- {
- float a = (rand()%360)*3.14159f/180.0f;
- parts[i].vx = 3.0f*cosf(a);
- parts[i].vy = 3.0f*sinf(a);
- if(parts[i].ctype == 0x3FFFFFFF)
- parts[i].ctype = 0x1F<<(rand()%26);
- parts[i].life++; //Delay death
- }
- //r = pmap[y][x];
- //rt = r&0xFF;
- /*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) {
- if (!parts[r>>8].ctype)
- parts[r>>8].ctype = PT_PHOT;
- }*/
-
- return 0;
-}
-
-int graphics_PHOT(GRAPHICS_FUNC_ARGS)
-{
- int x = 0;
- *colr = *colg = *colb = 0;
- for (x=0; x<12; x++) {
- *colr += (cpart->ctype >> (x+18)) & 1;
- *colb += (cpart->ctype >> x) & 1;
- }
- for (x=0; x<12; x++)
- *colg += (cpart->ctype >> (x+9)) & 1;
- x = 624/(*colr+*colg+*colb+1);
- *colr *= x;
- *colg *= x;
- *colb *= x;
-
- *firea = 100;
- *firer = *colr;
- *fireg = *colg;
- *fireb = *colb;
-
- *pixel_mode &= ~PMODE_FLAT;
- *pixel_mode |= FIRE_ADD | PMODE_ADD;
- return 0;
-}