From f3eeeb760f866d118d030124ec3b7f4b7e523cb3 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 23 Sep 2003 23:06:50 +0000 Subject: [PATCH] Various tweaks to handling taxiway lighting. --- simgear/scene/material/matlib.cxx | 2 ++ simgear/scene/tgdb/obj.cxx | 6 +++++- simgear/scene/tgdb/pt_lights.hxx | 14 -------------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index 225fcb79..d6ba0382 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -491,6 +491,8 @@ bool SGMaterialLib::load( const string &fg_root, const string& mpath ) { rwy_green_low_lights->setTexture( tex_name ); matlib["RWY_GREEN_LOW_LIGHTS"] = new SGMaterial( rwy_green_low_lights ); + matlib["RWY_GREEN_TAXIWAY_LIGHTS"] + = new SGMaterial( rwy_green_low_lights ); // hard coded low intensity taxiway blue light state tex_name = gen_taxiway_dir_light_map( 90, 90, 235, 205 ); diff --git a/simgear/scene/tgdb/obj.cxx b/simgear/scene/tgdb/obj.cxx index 02873d8c..57c8e90c 100644 --- a/simgear/scene/tgdb/obj.cxx +++ b/simgear/scene/tgdb/obj.cxx @@ -359,7 +359,11 @@ bool sgBinObjLoad( const string& path, const bool is_base, pts_v[i], pts_n[i], matlib, pt_materials[i], up ); - if ( pt_materials[i].substr(0, 16) == "RWY_BLUE_TAXIWAY" ) { + if ( pt_materials[i].substr(0, 16) == "RWY_BLUE_TAXIWAY_LIGHTS" ) { + taxi_lights->addKid( branch ); + } else if ( pt_materials[i].substr(0, 16) + == "RWY_GREEN_TAXIWAY_LIGHTS" ) + { taxi_lights->addKid( branch ); } else { rwy_lights->addKid( branch ); diff --git a/simgear/scene/tgdb/pt_lights.hxx b/simgear/scene/tgdb/pt_lights.hxx index 4531784b..9bf2606e 100644 --- a/simgear/scene/tgdb/pt_lights.hxx +++ b/simgear/scene/tgdb/pt_lights.hxx @@ -49,20 +49,6 @@ typedef int_list::iterator int_list_iterator; typedef int_list::const_iterator int_point_list_iterator; -// Define the various supported light types -typedef enum { - SG_RWYLIGHT_TAXI = 0, - SG_RWYLIGHT_VASI, - SG_RWYLIGHT_EDGE, - SG_RWYLIGHT_TOUCHDOWN, - SG_RWYLIGHT_THRESHOLD, - SG_RWYLIGHT_WHITE, - SG_RWYLIGHT_RED, - SG_RWYLIGHT_GREEN, - SG_RWYLIGHT_YELLOW -} sgPointLightType; - - // Generate a directional light. This routines creates a // 'directional' light that can only be viewed from within 90 degrees // of the specified dir vector. -- 2.39.5