summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorCatelite <liclockwork@yahoo.com>2012-06-07 01:12:37 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-07 16:55:08 (GMT)
commita717f67f627d85f31cff58c99b14260a37cd66cd (patch)
tree60b9cf74f5323ff16d63398e6a7c15dfe09a97ee /src/elements
parent3dabc63ff78fe71589c23d608180717883fddb29 (diff)
downloadpowder-a717f67f627d85f31cff58c99b14260a37cd66cd.zip
powder-a717f67f627d85f31cff58c99b14260a37cd66cd.tar.gz
Tweaks to glow colors. EXOT now mimicks Heat View's color scale, and its irradiated color scheme uses tmp2 instead of temp so it appears to cycle.
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/exot.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/elements/exot.c b/src/elements/exot.c
index adcdeec..3eeaeb6 100644
--- a/src/elements/exot.c
+++ b/src/elements/exot.c
@@ -33,7 +33,7 @@ int update_EXOT(UPDATE_FUNC_ARGS) {
}
}
if (parts[i].tmp>245)
- if (1>rand()%1000)
+ if (1>rand()%500)
if ((r&0xFF)!=PT_EXOT && (r&0xFF)!=PT_BREL && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PRTI && (r&0xFF)!=PT_PRTO && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_PHOT && (r&0xFF)!=PT_VOID && (r&0xFF)!=PT_NBHL && (r&0xFF)!=PT_WARP)
create_part(i, x, y, parts[r>>8].type);
}
@@ -86,18 +86,27 @@ int update_EXOT(UPDATE_FUNC_ARGS) {
}
}
}
+ if (parts[i].temp<273.15f)
+ {
+ parts[i].vx = 0;
+ parts[i].vy = 0;
+ pv[y/CELL][x/CELL] -= 0.01;
+ parts[i].tmp--;
+ }
return 0;
+
}
int graphics_EXOT(GRAPHICS_FUNC_ARGS)
{
int q = cpart->temp;
int b = cpart->tmp;
+ int c = cpart->tmp2;
if ((cpart->tmp2 - 1)>rand()%1000)
{
- float frequency = 0.90045;
- *colr = (sin(frequency*q + 0) * 127 + 255);
- *colg = (sin(frequency*q + 2) * 127 + 255);
- *colb = (sin(frequency*q + 4) * 127 + 255);
+ float frequency = 0.04045;
+ *colr = (sin(frequency*c + 4) * 127 + 150);
+ *colg = (sin(frequency*c + 6) * 127 + 150);
+ *colb = (sin(frequency*c + 8) * 127 + 150);
*firea = 100;
*firer = 0;
*fireg = 0;
@@ -109,9 +118,9 @@ int graphics_EXOT(GRAPHICS_FUNC_ARGS)
else
{
float frequency = 0.00045;
- *colr = (sin(frequency*q + 0) * 127 + (b/1.7));
- *colg = (sin(frequency*q + 2) * 127 + (b/1.7));
- *colb = (sin(frequency*q + 4) * 127 + (b/1.7));
+ *colr = (sin(frequency*q + 4) * 127 + (b/1.7));
+ *colg = (sin(frequency*q + 6) * 127 + (b/1.7));
+ *colb = (sin(frequency*q + 8) * 127 + (b/1.7));
*cola = cpart->tmp / 6;
*firea = *cola;
*firer = *colr;