diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-12 11:37:04 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-12 11:37:04 (GMT) |
| commit | 2cf9ef60aa3d3c1509b3cba69e35a840a6841731 (patch) | |
| tree | 040e0a378dbcd60c2a6f5467eddd5069b3c06c77 /src/elements/phot.c | |
| parent | 0e61956b243ac90d8ff557134d24221f923be4ed (diff) | |
| download | powder-2cf9ef60aa3d3c1509b3cba69e35a840a6841731.zip powder-2cf9ef60aa3d3c1509b3cba69e35a840a6841731.tar.gz | |
Implement more particle graphics
Diffstat (limited to 'src/elements/phot.c')
| -rw-r--r-- | src/elements/phot.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/elements/phot.c b/src/elements/phot.c index 630171a..f999753 100644 --- a/src/elements/phot.c +++ b/src/elements/phot.c @@ -58,3 +58,27 @@ int update_PHOT(UPDATE_FUNC_ARGS) { return 0; } + +int graphics_PHOT(GRAPHICS_FUNC_ARGS) +{ + int x = 0; + *colr = *colg = *colb = 0; + for (x=0; x<12; x++) { + *colr += (parts[i].ctype >> (x+18)) & 1; + *colb += (parts[i].ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (parts[i].ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + + *firea = 15; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} |
