private void ParseSingleAction(idLexer lexer /*idFXSingleAction& FXAction*/) { idToken token; string tokenValue; /*FXAction.type = -1; FXAction.sibling = -1; FXAction.data = "<none>"; FXAction.name = "<none>"; FXAction.fire = "<none>"; FXAction.delay = 0.0f; FXAction.duration = 0.0f; FXAction.restart = 0.0f; FXAction.size = 0.0f; FXAction.fadeInTime = 0.0f; FXAction.fadeOutTime = 0.0f; FXAction.shakeTime = 0.0f; FXAction.shakeAmplitude = 0.0f; FXAction.shakeDistance = 0.0f; FXAction.shakeFalloff = false; FXAction.shakeImpulse = 0.0f; FXAction.shakeIgnoreMaster = false; FXAction.lightRadius = 0.0f; FXAction.rotate = 0.0f; FXAction.random1 = 0.0f; FXAction.random2 = 0.0f; FXAction.lightColor = vec3_origin; FXAction.offset = vec3_origin; FXAction.axis = mat3_identity; FXAction.bindParticles = false; FXAction.explicitAxis = false; FXAction.noshadows = false; FXAction.particleTrackVelocity = false; FXAction.trackOrigin = false; FXAction.soundStarted = false;*/ while(true) { if((token = lexer.ReadToken()) == null) { break; } tokenValue = token.ToString().ToLower(); if(tokenValue == "}") { break; } else if(tokenValue == "shake") { /*FXAction.type = FX_SHAKE;*/ /*FXAction.shakeTime = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.shakeAmplitude = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.shakeDistance = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.shakeFalloff = */lexer.ParseBool(); lexer.ExpectTokenString(","); /*FXAction.shakeImpulse = */lexer.ParseFloat(); } else if(tokenValue == "noshadows") { // TODO: FXAction.noshadows = true; } else if(tokenValue == "name") { token = lexer.ReadToken(); // TODO: FXAction.name = token; } else if(tokenValue == "fire") { token = lexer.ReadToken(); // TODO: FXAction.fire = token; } else if(tokenValue == "random") { /*FXAction.random1 = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.random2 = */lexer.ParseFloat(); // FXAction.delay = 0.0f; // check random } else if(tokenValue == "delay") { /*FXAction.delay = */lexer.ParseFloat(); } else if(tokenValue == "rotate") { /*FXAction.rotate = */lexer.ParseFloat(); } else if(tokenValue == "duration") { /*FXAction.duration = */lexer.ParseFloat(); } else if(tokenValue == "trackorigin") { /*FXAction.trackOrigin = */lexer.ParseBool(); } else if(tokenValue == "restart") { /*FXAction.restart = */lexer.ParseFloat(); } else if(tokenValue == "fadein") { /*FXAction.fadeInTime = */lexer.ParseFloat(); } else if(tokenValue == "fadeout") { /*FXAction.fadeOutTime = */lexer.ParseFloat(); } else if(tokenValue == "size") { /*FXAction.size = */lexer.ParseFloat(); } else if(tokenValue == "offset") { /*FXAction.offset.x = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.offset.y = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.offset.z = */lexer.ParseFloat(); } else if(tokenValue == "axis") { /*idVec3 v;*/ /*v.x = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*v.y = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*v.z = */lexer.ParseFloat(); /*v.Normalize(); FXAction.axis = v.ToMat3(); FXAction.explicitAxis = true;*/ } else if(tokenValue == "angle") { /*idAngles a;*/ /*a[0] = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*a[1] = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*a[2] = */lexer.ParseFloat(); /*FXAction.axis = a.ToMat3(); FXAction.explicitAxis = true;*/ } else if(tokenValue == "uselight") { token = lexer.ReadToken(); /*FXAction.data = token; for( int i = 0; i < events.Num(); i++ ) { if ( events[i].name.Icmp( FXAction.data ) == 0 ) { FXAction.sibling = i; FXAction.lightColor = events[i].lightColor; FXAction.lightRadius = events[i].lightRadius; } } FXAction.type = FX_LIGHT; // precache the light material declManager->FindMaterial( FXAction.data );*/ } else if(tokenValue == "attachlight") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_ATTACHLIGHT; // precache it declManager->FindMaterial( FXAction.data );*/ } else if(tokenValue == "attachentity") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_ATTACHENTITY; // precache the model renderModelManager->FindModel( FXAction.data );*/ } else if(tokenValue == "launch") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_LAUNCH; // precache the entity def declManager->FindType( DECL_ENTITYDEF, FXAction.data );*/ } else if(tokenValue == "usemodel") { token = lexer.ReadToken(); /*FXAction.data = token; for( int i = 0; i < events.Num(); i++ ) { if ( events[i].name.Icmp( FXAction.data ) == 0 ) { FXAction.sibling = i; } } FXAction.type = FX_MODEL; // precache the model renderModelManager->FindModel( FXAction.data );*/ } else if(tokenValue == "light") { token = lexer.ReadToken(); /*FXAction.data = token;*/ lexer.ExpectTokenString(","); /*FXAction.lightColor[0] = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.lightColor[1] = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.lightColor[2] = */lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.lightRadius = */lexer.ParseFloat(); /*FXAction.type = FX_LIGHT; // precache the light material declManager->FindMaterial( FXAction.data );*/ } else if(tokenValue == "model") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_MODEL; // precache it renderModelManager->FindModel( FXAction.data );*/ } else if(tokenValue == "particle") // FIXME: now the same as model { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_PARTICLE; // precache it renderModelManager->FindModel( FXAction.data );*/ } else if(tokenValue == "decal") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_DECAL; // precache it declManager->FindMaterial( FXAction.data );*/ } else if(tokenValue == "particletrackvelocity") { // TODO: FXAction.particleTrackVelocity = true; } else if(tokenValue == "sound") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_SOUND; // precache it declManager->FindSound( FXAction.data );*/ } else if(tokenValue == "ignoremaster") { /*FXAction.shakeIgnoreMaster = true;*/ } else if(tokenValue == "shockwave") { token = lexer.ReadToken(); /*FXAction.data = token; FXAction.type = FX_SHOCKWAVE; // precache the entity def declManager->FindType( DECL_ENTITYDEF, FXAction.data );*/ } else { lexer.Warning("FX File: bad token"); } } }
private idParticleStage ParseParticleStage(idLexer lexer) { idToken token; string tokenLower; idParticleStage stage = new idParticleStage(); stage.Default(); while(true) { if(lexer.HadError == true) { break; } else if((token = lexer.ReadToken()) == null) { break; } else { tokenLower = token.ToString().ToLower(); if(tokenLower == "}") { break; } else if(tokenLower == "material") { token = lexer.ReadToken(); stage.Material = idE.DeclManager.FindMaterial(token.ToString()); } else if(tokenLower == "count") { stage.TotalParticles = lexer.ParseInt(); } else if(tokenLower == "time") { stage.ParticleLife = lexer.ParseFloat(); } else if(tokenLower == "cycles") { stage.Cycles = lexer.ParseFloat(); } else if(tokenLower == "timeoffset") { stage.TimeOffset = lexer.ParseFloat(); } else if(tokenLower == "deadtime") { stage.DeadTime = lexer.ParseFloat(); } else if(tokenLower == "randomdistribution") { stage.RandomDistribution = lexer.ParseBool(); } else if(tokenLower == "bunching") { stage.SpawnBunching = lexer.ParseFloat(); } else if(tokenLower == "distribution") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if(tokenLower == "rect") { stage.Distribution = ParticleDistribution.Rectangle; } else if(tokenLower == "cyclinder") { stage.Distribution = ParticleDistribution.Cyclinder; } else if(tokenLower == "sphere") { stage.Distribution = ParticleDistribution.Sphere; } else { lexer.Error("bad distribution type: {0}", token.ToString()); } stage.DistributionParameters = ParseParams(lexer, stage.DistributionParameters.Length); } else if(tokenLower == "direction") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if(tokenLower == "cone") { stage.Direction = ParticleDirection.Cone; } else if(tokenLower == "outward") { stage.Direction = ParticleDirection.Outward; } else { lexer.Error("bad direction type: {0}", token.ToString()); } stage.DirectionParameters = ParseParams(lexer, stage.DirectionParameters.Length); } else if(tokenLower == "orientation") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if(tokenLower == "view") { stage.Orientation = ParticleOrientation.View; } else if(tokenLower == "aimed") { stage.Orientation = ParticleOrientation.Aimed; } else if(tokenLower == "x") { stage.Orientation = ParticleOrientation.X; } else if(tokenLower == "y") { stage.Orientation = ParticleOrientation.Y; } else if(tokenLower == "z") { stage.Orientation = ParticleOrientation.Z; } else { lexer.Error("bad orientation type: {0}", token.ToString()); } stage.OrientationParameters = ParseParams(lexer, stage.OrientationParameters.Length); } else if(tokenLower == "custompath") { token = lexer.ReadToken(); tokenLower = tokenLower.ToLower().ToLower(); if(tokenLower == "standard") { stage.CustomPath = ParticleCustomPath.Standard; } else if(tokenLower == "helix") { stage.CustomPath = ParticleCustomPath.Helix; } else if(tokenLower == "flies") { stage.CustomPath = ParticleCustomPath.Flies; } else if(tokenLower == "spherical") { stage.CustomPath = ParticleCustomPath.Orbit; } else { lexer.Error("bad path type: {0}", token.ToString()); } stage.CustomPathParameters = ParseParams(lexer, stage.CustomPathParameters.Length); } else if(tokenLower == "speed") { ParseParametric(lexer, stage.Speed); } else if(tokenLower == "rotation") { ParseParametric(lexer, stage.RotationSpeed); } else if(tokenLower == "angle") { stage.InitialAngle = lexer.ParseFloat(); } else if(tokenLower == "entitycolor") { stage.EntityColor = lexer.ParseBool(); } else if(tokenLower == "size") { ParseParametric(lexer, stage.Size); } else if(tokenLower == "aspect") { ParseParametric(lexer, stage.Aspect); } else if(tokenLower == "fadein") { stage.FadeInFraction = lexer.ParseFloat(); } else if(tokenLower == "fadeout") { stage.FadeOutFraction = lexer.ParseFloat(); } else if(tokenLower == "fadeindex") { stage.FadeIndexFraction = lexer.ParseFloat(); } else if(tokenLower == "color") { stage.Color = new Vector4(lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat()); } else if(tokenLower == "fadecolor") { stage.FadeColor = new Vector4(lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat()); } else if(tokenLower == "offset") { stage.Offset = new Vector3(lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat()); } else if(tokenLower == "animationframes") { stage.AnimationFrames = lexer.ParseInt(); } else if(tokenLower == "animationrate") { stage.AnimationRate = lexer.ParseFloat(); } else if(tokenLower == "boundsexpansion") { stage.BoundsExpansion = lexer.ParseFloat(); } else if(tokenLower == "gravity") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if(tokenLower == "world") { stage.WorldGravity = true; } else { lexer.UnreadToken = token; } stage.Gravity = lexer.ParseFloat(); } else { lexer.Error("unknown token {0}", token.ToString()); } } } // derive values. stage.CycleTime = (int) (stage.ParticleLife + stage.DeadTime) * 1000; return stage; }
private idParticleStage ParseParticleStage(idLexer lexer) { idToken token; string tokenLower; idParticleStage stage = new idParticleStage(); stage.Default(); while (true) { if (lexer.HadError == true) { break; } else if ((token = lexer.ReadToken()) == null) { break; } else { tokenLower = token.ToString().ToLower(); if (tokenLower == "}") { break; } else if (tokenLower == "material") { token = lexer.ReadToken(); stage.Material = idE.DeclManager.FindMaterial(token.ToString()); } else if (tokenLower == "count") { stage.TotalParticles = lexer.ParseInt(); } else if (tokenLower == "time") { stage.ParticleLife = lexer.ParseFloat(); } else if (tokenLower == "cycles") { stage.Cycles = lexer.ParseFloat(); } else if (tokenLower == "timeoffset") { stage.TimeOffset = lexer.ParseFloat(); } else if (tokenLower == "deadtime") { stage.DeadTime = lexer.ParseFloat(); } else if (tokenLower == "randomdistribution") { stage.RandomDistribution = lexer.ParseBool(); } else if (tokenLower == "bunching") { stage.SpawnBunching = lexer.ParseFloat(); } else if (tokenLower == "distribution") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if (tokenLower == "rect") { stage.Distribution = ParticleDistribution.Rectangle; } else if (tokenLower == "cyclinder") { stage.Distribution = ParticleDistribution.Cyclinder; } else if (tokenLower == "sphere") { stage.Distribution = ParticleDistribution.Sphere; } else { lexer.Error("bad distribution type: {0}", token.ToString()); } stage.DistributionParameters = ParseParams(lexer, stage.DistributionParameters.Length); } else if (tokenLower == "direction") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if (tokenLower == "cone") { stage.Direction = ParticleDirection.Cone; } else if (tokenLower == "outward") { stage.Direction = ParticleDirection.Outward; } else { lexer.Error("bad direction type: {0}", token.ToString()); } stage.DirectionParameters = ParseParams(lexer, stage.DirectionParameters.Length); } else if (tokenLower == "orientation") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if (tokenLower == "view") { stage.Orientation = ParticleOrientation.View; } else if (tokenLower == "aimed") { stage.Orientation = ParticleOrientation.Aimed; } else if (tokenLower == "x") { stage.Orientation = ParticleOrientation.X; } else if (tokenLower == "y") { stage.Orientation = ParticleOrientation.Y; } else if (tokenLower == "z") { stage.Orientation = ParticleOrientation.Z; } else { lexer.Error("bad orientation type: {0}", token.ToString()); } stage.OrientationParameters = ParseParams(lexer, stage.OrientationParameters.Length); } else if (tokenLower == "custompath") { token = lexer.ReadToken(); tokenLower = tokenLower.ToLower().ToLower(); if (tokenLower == "standard") { stage.CustomPath = ParticleCustomPath.Standard; } else if (tokenLower == "helix") { stage.CustomPath = ParticleCustomPath.Helix; } else if (tokenLower == "flies") { stage.CustomPath = ParticleCustomPath.Flies; } else if (tokenLower == "spherical") { stage.CustomPath = ParticleCustomPath.Orbit; } else { lexer.Error("bad path type: {0}", token.ToString()); } stage.CustomPathParameters = ParseParams(lexer, stage.CustomPathParameters.Length); } else if (tokenLower == "speed") { ParseParametric(lexer, stage.Speed); } else if (tokenLower == "rotation") { ParseParametric(lexer, stage.RotationSpeed); } else if (tokenLower == "angle") { stage.InitialAngle = lexer.ParseFloat(); } else if (tokenLower == "entitycolor") { stage.EntityColor = lexer.ParseBool(); } else if (tokenLower == "size") { ParseParametric(lexer, stage.Size); } else if (tokenLower == "aspect") { ParseParametric(lexer, stage.Aspect); } else if (tokenLower == "fadein") { stage.FadeInFraction = lexer.ParseFloat(); } else if (tokenLower == "fadeout") { stage.FadeOutFraction = lexer.ParseFloat(); } else if (tokenLower == "fadeindex") { stage.FadeIndexFraction = lexer.ParseFloat(); } else if (tokenLower == "color") { stage.Color = new Vector4(lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat()); } else if (tokenLower == "fadecolor") { stage.FadeColor = new Vector4(lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat()); } else if (tokenLower == "offset") { stage.Offset = new Vector3(lexer.ParseFloat(), lexer.ParseFloat(), lexer.ParseFloat()); } else if (tokenLower == "animationframes") { stage.AnimationFrames = lexer.ParseInt(); } else if (tokenLower == "animationrate") { stage.AnimationRate = lexer.ParseFloat(); } else if (tokenLower == "boundsexpansion") { stage.BoundsExpansion = lexer.ParseFloat(); } else if (tokenLower == "gravity") { token = lexer.ReadToken(); tokenLower = token.ToString().ToLower(); if (tokenLower == "world") { stage.WorldGravity = true; } else { lexer.UnreadToken = token; } stage.Gravity = lexer.ParseFloat(); } else { lexer.Error("unknown token {0}", token.ToString()); } } } // derive values. stage.CycleTime = (int)(stage.ParticleLife + stage.DeadTime) * 1000; return(stage); }
private void ParseSingleAction(idLexer lexer /*idFXSingleAction& FXAction*/) { idToken token; string tokenValue; /*FXAction.type = -1; * FXAction.sibling = -1; * * FXAction.data = "<none>"; * FXAction.name = "<none>"; * FXAction.fire = "<none>"; * * FXAction.delay = 0.0f; * FXAction.duration = 0.0f; * FXAction.restart = 0.0f; * FXAction.size = 0.0f; * FXAction.fadeInTime = 0.0f; * FXAction.fadeOutTime = 0.0f; * FXAction.shakeTime = 0.0f; * FXAction.shakeAmplitude = 0.0f; * FXAction.shakeDistance = 0.0f; * FXAction.shakeFalloff = false; * FXAction.shakeImpulse = 0.0f; * FXAction.shakeIgnoreMaster = false; * FXAction.lightRadius = 0.0f; * FXAction.rotate = 0.0f; * FXAction.random1 = 0.0f; * FXAction.random2 = 0.0f; * * FXAction.lightColor = vec3_origin; * FXAction.offset = vec3_origin; * FXAction.axis = mat3_identity; * * FXAction.bindParticles = false; * FXAction.explicitAxis = false; * FXAction.noshadows = false; * FXAction.particleTrackVelocity = false; * FXAction.trackOrigin = false; * FXAction.soundStarted = false;*/ while (true) { if ((token = lexer.ReadToken()) == null) { break; } tokenValue = token.ToString().ToLower(); if (tokenValue == "}") { break; } else if (tokenValue == "shake") { /*FXAction.type = FX_SHAKE;*/ /*FXAction.shakeTime = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.shakeAmplitude = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.shakeDistance = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.shakeFalloff = */ lexer.ParseBool(); lexer.ExpectTokenString(","); /*FXAction.shakeImpulse = */ lexer.ParseFloat(); } else if (tokenValue == "noshadows") { // TODO: FXAction.noshadows = true; } else if (tokenValue == "name") { token = lexer.ReadToken(); // TODO: FXAction.name = token; } else if (tokenValue == "fire") { token = lexer.ReadToken(); // TODO: FXAction.fire = token; } else if (tokenValue == "random") { /*FXAction.random1 = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.random2 = */ lexer.ParseFloat(); // FXAction.delay = 0.0f; // check random } else if (tokenValue == "delay") { /*FXAction.delay = */ lexer.ParseFloat(); } else if (tokenValue == "rotate") { /*FXAction.rotate = */ lexer.ParseFloat(); } else if (tokenValue == "duration") { /*FXAction.duration = */ lexer.ParseFloat(); } else if (tokenValue == "trackorigin") { /*FXAction.trackOrigin = */ lexer.ParseBool(); } else if (tokenValue == "restart") { /*FXAction.restart = */ lexer.ParseFloat(); } else if (tokenValue == "fadein") { /*FXAction.fadeInTime = */ lexer.ParseFloat(); } else if (tokenValue == "fadeout") { /*FXAction.fadeOutTime = */ lexer.ParseFloat(); } else if (tokenValue == "size") { /*FXAction.size = */ lexer.ParseFloat(); } else if (tokenValue == "offset") { /*FXAction.offset.x = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.offset.y = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.offset.z = */ lexer.ParseFloat(); } else if (tokenValue == "axis") { /*idVec3 v;*/ /*v.x = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*v.y = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*v.z = */ lexer.ParseFloat(); /*v.Normalize(); * FXAction.axis = v.ToMat3(); * FXAction.explicitAxis = true;*/ } else if (tokenValue == "angle") { /*idAngles a;*/ /*a[0] = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*a[1] = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*a[2] = */ lexer.ParseFloat(); /*FXAction.axis = a.ToMat3(); * FXAction.explicitAxis = true;*/ } else if (tokenValue == "uselight") { token = lexer.ReadToken(); /*FXAction.data = token; * for( int i = 0; i < events.Num(); i++ ) { * if ( events[i].name.Icmp( FXAction.data ) == 0 ) { * FXAction.sibling = i; * FXAction.lightColor = events[i].lightColor; * FXAction.lightRadius = events[i].lightRadius; * } * } * FXAction.type = FX_LIGHT; * * // precache the light material * declManager->FindMaterial( FXAction.data );*/ } else if (tokenValue == "attachlight") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_ATTACHLIGHT; * * // precache it * declManager->FindMaterial( FXAction.data );*/ } else if (tokenValue == "attachentity") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_ATTACHENTITY; * * // precache the model * renderModelManager->FindModel( FXAction.data );*/ } else if (tokenValue == "launch") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_LAUNCH; * * // precache the entity def * declManager->FindType( DECL_ENTITYDEF, FXAction.data );*/ } else if (tokenValue == "usemodel") { token = lexer.ReadToken(); /*FXAction.data = token; * for( int i = 0; i < events.Num(); i++ ) { * if ( events[i].name.Icmp( FXAction.data ) == 0 ) { * FXAction.sibling = i; * } * } * FXAction.type = FX_MODEL; * * // precache the model * renderModelManager->FindModel( FXAction.data );*/ } else if (tokenValue == "light") { token = lexer.ReadToken(); /*FXAction.data = token;*/ lexer.ExpectTokenString(","); /*FXAction.lightColor[0] = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.lightColor[1] = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.lightColor[2] = */ lexer.ParseFloat(); lexer.ExpectTokenString(","); /*FXAction.lightRadius = */ lexer.ParseFloat(); /*FXAction.type = FX_LIGHT; * * // precache the light material * declManager->FindMaterial( FXAction.data );*/ } else if (tokenValue == "model") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_MODEL; * * // precache it * renderModelManager->FindModel( FXAction.data );*/ } else if (tokenValue == "particle") // FIXME: now the same as model { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_PARTICLE; * * // precache it * renderModelManager->FindModel( FXAction.data );*/ } else if (tokenValue == "decal") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_DECAL; * * // precache it * declManager->FindMaterial( FXAction.data );*/ } else if (tokenValue == "particletrackvelocity") { // TODO: FXAction.particleTrackVelocity = true; } else if (tokenValue == "sound") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_SOUND; * * // precache it * declManager->FindSound( FXAction.data );*/ } else if (tokenValue == "ignoremaster") { /*FXAction.shakeIgnoreMaster = true;*/ } else if (tokenValue == "shockwave") { token = lexer.ReadToken(); /*FXAction.data = token; * FXAction.type = FX_SHOCKWAVE; * * // precache the entity def * declManager->FindType( DECL_ENTITYDEF, FXAction.data );*/ } else { lexer.Warning("FX File: bad token"); } } }