Added missile_load_time to shipdataEntrySchema. Cleaned up planet miniature LOD stuff.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2846 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
46896e81ed
commit
9e69f069ac
@ -114,6 +114,7 @@
|
|||||||
valueType = "$customViewSpec";
|
valueType = "$customViewSpec";
|
||||||
};
|
};
|
||||||
max_missiles = "positiveInteger";
|
max_missiles = "positiveInteger";
|
||||||
|
missile_load_time = "positiveFloat";
|
||||||
script = "$scriptFileName";
|
script = "$scriptFileName";
|
||||||
has_npc_traffic = "fuzzyBoolean";
|
has_npc_traffic = "fuzzyBoolean";
|
||||||
script_info = "dictionary";
|
script_info = "dictionary";
|
||||||
|
@ -231,6 +231,9 @@ static OOColor *ColorWithHSBColor(Vector c)
|
|||||||
_atmosphereDrawable = [planet->_atmosphereDrawable copy];
|
_atmosphereDrawable = [planet->_atmosphereDrawable copy];
|
||||||
[_atmosphereDrawable setRadius:collision_radius + ATMOSPHERE_DEPTH * PLANET_MINIATURE_FACTOR * 2.0]; //not to scale: invisible otherwise
|
[_atmosphereDrawable setRadius:collision_radius + ATMOSPHERE_DEPTH * PLANET_MINIATURE_FACTOR * 2.0]; //not to scale: invisible otherwise
|
||||||
|
|
||||||
|
[_planetDrawable setLevelOfDetail:0.8f];
|
||||||
|
[_atmosphereDrawable setLevelOfDetail:0.8f];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,15 +305,11 @@ static OOColor *ColorWithHSBColor(Vector c)
|
|||||||
|
|
||||||
if ([UNIVERSE wireframeGraphics]) GLDebugWireframeModeOn();
|
if ([UNIVERSE wireframeGraphics]) GLDebugWireframeModeOn();
|
||||||
|
|
||||||
if (_miniature)
|
if (!_miniature)
|
||||||
{
|
|
||||||
[_planetDrawable setLevelOfDetail:0.8f];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
[_planetDrawable calculateLevelOfDetailForViewDistance:zero_distance];
|
[_planetDrawable calculateLevelOfDetailForViewDistance:zero_distance];
|
||||||
}
|
|
||||||
[_atmosphereDrawable setLevelOfDetail:[_planetDrawable levelOfDetail]];
|
[_atmosphereDrawable setLevelOfDetail:[_planetDrawable levelOfDetail]];
|
||||||
|
}
|
||||||
|
|
||||||
[_planetDrawable renderOpaqueParts];
|
[_planetDrawable renderOpaqueParts];
|
||||||
[_atmosphereDrawable renderOpaqueParts];
|
[_atmosphereDrawable renderOpaqueParts];
|
||||||
|
@ -205,8 +205,8 @@ MA 02110-1301, USA.
|
|||||||
unsigned missiles; // number of on-board missiles
|
unsigned missiles; // number of on-board missiles
|
||||||
unsigned max_missiles; // number of missile pylons
|
unsigned max_missiles; // number of missile pylons
|
||||||
NSString *missileRole;
|
NSString *missileRole;
|
||||||
OOTimeAbsolute missile_load_time; // minimum time interval between missile launches
|
OOTimeDelta missile_load_time; // minimum time interval between missile launches
|
||||||
OOTimeAbsolute missile_launch_time; // time since last missile launch
|
OOTimeAbsolute missile_launch_time; // time of last missile launch
|
||||||
|
|
||||||
#ifdef OO_BRAIN_AI
|
#ifdef OO_BRAIN_AI
|
||||||
OOBrain *brain; // brain controlling ship, could be a character brain or the autopilot
|
OOBrain *brain; // brain controlling ship, could be a character brain or the autopilot
|
||||||
|
@ -72,7 +72,7 @@ static FloatRGBA PlanetMix(float q, float maxQ, FloatRGB landColor, FloatRGB sea
|
|||||||
[[planetInfo objectForKey:@"noise_map_seed"] getValue:&_seed];
|
[[planetInfo objectForKey:@"noise_map_seed"] getValue:&_seed];
|
||||||
|
|
||||||
_width = 512;
|
_width = 512;
|
||||||
_height = 512;
|
_height = _width; // Ideally, aspect ratio would be 2:1, but current code only handles squares.
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
@ -214,6 +214,11 @@ static FloatRGBA PlanetMix(float q, float maxQ, FloatRGB landColor, FloatRGB sea
|
|||||||
/* Terrain shading
|
/* Terrain shading
|
||||||
was: _powf(norm.z, 3.2). Changing exponent to 3 makes very
|
was: _powf(norm.z, 3.2). Changing exponent to 3 makes very
|
||||||
little difference, other than being faster.
|
little difference, other than being faster.
|
||||||
|
|
||||||
|
FIXME: need to work out a decent way to scale this with texture
|
||||||
|
size, so overall darkness is constant. As an experiment, I used
|
||||||
|
a size of 128 << k and shade = pow(norm.z, k + 1); this was
|
||||||
|
better, but still darker at smaller resolutions.
|
||||||
*/
|
*/
|
||||||
GLfloat shade = norm.z * norm.z * norm.z;
|
GLfloat shade = norm.z * norm.z * norm.z;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user