Ejemplo n.º 1
0
protected func Construction() 
{
  var pEnv;
  if (pEnv=FindObject(CLFS))
    pEnv->CLFS::Colorize(this());
  else
    SetColorDw(RGB(255,255,255));
}
Ejemplo n.º 2
0
func FxReleaseClonkFadeOutTimer (object pTarget, int iEffectNumber, int iEffectTime) {
  // Ausfaden
  if (!GetClrModulation (pTarget)) SetClrModulation(RGB(255, 255, 255), pTarget);
  SetClrModulation(DoRGBaValue(GetClrModulation(pTarget), Min(15, 255-GetRGBValue(GetClrModulation(pTarget),0)), 0), pTarget);
  // Wenn Overlay extra moduliert wird, auch extra ausfaden
  if (GetObjectBlitMode (pTarget) & 4) SetColorDw(DoRGBaValue(GetColorDw(pTarget), Min(15, 255-GetRGBValue(GetColorDw(pTarget),0)), 0), pTarget);
  if(GetRGBValue(GetColorDw(pTarget), 0) == 255 || GetRGBValue(GetClrModulation(pTarget), 0) == 255)
    return (-1);
}
Ejemplo n.º 3
0
Archivo: Script.c Proyecto: ev1313/gze
func SetGrowthStage() {
	if (growth >= 170) {
		SetCon(100 - (growth*3 - 340));
		if (GetCon() < 10) RemoveObject();
	} else {
		SetCon(Min(100, growth));
	}
	
	if (growth <= 90) {
		// go from hue 80 to hue 60  with con 0 - 90
		
		// turn number 0-90 into 0-20
		var huediff = (growth * 10) / 45;
		
		SetColorDw(HSL(80 - huediff, 250, 128));
	}
	if (growth > 90 && growth < 100) {
		// go from hue 60 to hue 0  within con 90-100
	
		// turn 90-100 into 0-10 into 0-60
		var huediff = (growth - 90) * 6;
		
		SetColorDw(HSL(60 - huediff, 250, 128));
	}
	if (growth >= 100 && growth <= 140) {
		SetColorDw(HSL(0, 250, 128));
	}

	if (growth > 120 && GetCategory() == 1) {
		Drop();
	}
	
	if (growth > 140) {
		var chng = growth - 140;
		SetColorDw(HSL(chng/2, 250 - chng, 128 - chng/2));
	}
}