All pastes #244817 Raw Edit

Rick

public c v1 · immutable
#244817 ·published 2006-11-10 06:00 UTC
rendered paste body
void randomizePlanet(const char *size = NULL){	lunarData.mapMode = mmComposite;	lunarData.x = 0.50;	lunarData.y = 0.50;	lunarData.seed = nrand(0, 0x7FFFFFFF);		lunarData.lightControl.x = -0.81;	lunarData.lightControl.y = -0.15;	lunarData.lightControl.z = 0.55;		lunarData.poleControl.x = 0.46;	lunarData.poleControl.y = -0.87;	lunarData.poleControl.z = 0.0;		if (size == NULL)	{		lunarData.planet.size = nrand(12, 22);	}	else	{		if (stricmp(size, "tiny") == 0)		{			lunarData.planet.size = nrand(12, 13);		}		else if (stricmp(size, "small") == 0)		{			lunarData.planet.size = nrand(14, 15);		}		else if (stricmp(size, "medium") == 0)		{			lunarData.planet.size = nrand(16, 17);		}		else if (stricmp(size, "large") == 0)		{			lunarData.planet.size = nrand(18, 19);		}		else if (stricmp(size, "huge") == 0)		{			lunarData.planet.size = nrand(20, 21);		}		else		{			lunarData.planet.size = nrand(12, 22);		}	}	lunarData.planet.complexity = nrand(0, 100);	lunarData.planet.landTexture = nrand(0, 100);	lunarData.planet.craterCount = nrand(0, 100);	lunarData.planet.craterSize = nrand(0, 100);	lunarData.planet.craterTexture = nrand(0, 100);	lunarData.planet.realLuna = nrand(0, 1) ? false : true;	lunarData.planet.color.red = nrand(0, 202); // 255	lunarData.planet.color.green = nrand(0, 202); // 255	lunarData.planet.color.blue = nrand(0, 202); // 255	lunarData.climate.iceAmount = nrand(0, 100);	lunarData.climate.iceColor.red = nrand(0, 255);	lunarData.climate.iceColor.green = nrand(0, 255);	lunarData.climate.iceColor.blue = nrand(0, 255);	lunarData.climate.desertAmount = nrand(0, 100);	lunarData.climate.desertColor.red = nrand(0, 255);	lunarData.climate.desertColor.green = nrand(0, 255);	lunarData.climate.desertColor.blue = nrand(0, 255);	lunarData.climate.seaAmount = nrand(0, 100);	lunarData.climate.seaColor.red = nrand(0, 255);	lunarData.climate.seaColor.green = nrand(0, 255);	lunarData.climate.seaColor.blue = nrand(0, 255);	lunarData.climate.lunarClimate = nrand(0, 1) ? false : true;	lunarData.air.color.red = nrand(0, 244); // 255	lunarData.air.color.green = nrand(0, 244); // 255	lunarData.air.color.blue = nrand(0, 244); // 255	lunarData.air.depth = nrand(1, 30); // was 100?  depth can't be 0	lunarData.air.brightness = nrand(1, 100); // brightness can't be 0	lunarData.air.sunset = nrand(0, 100);		lunarData.clouds.color.red = nrand(0, 255);	lunarData.clouds.color.green = nrand(0, 255);	lunarData.clouds.color.blue = nrand(0, 255);	lunarData.clouds.coverage = nrand(0, 100);	lunarData.clouds.edges = nrand(0, 100);	lunarData.clouds.height = nrand(0, 100);	lunarData.clouds.shadows = nrand(0, 100);	lunarData.clouds.texture = nrand(0, 100);	lunarData.clouds.realClouds = false; //nrand(0, 1) ? false : true;		lunarData.cities.color.red = nrand(0, 255);	lunarData.cities.color.green = nrand(0, 255);	lunarData.cities.color.blue = nrand(0, 255);	lunarData.cities.amount = nrand(0, 100);		lunarData.synthClouds.coriols = nrand(0, 100);	lunarData.synthClouds.viscosity = nrand(0, 100);	lunarData.synthClouds.stormCount = nrand(0, 100);	lunarData.synthClouds.stormSize = nrand(0, 100);	lunarData.synthClouds.stormSpin = nrand(0, 100);}