
# JStrack:  copyright 1997/2010 by Jim Graham, N5IAL, all rights reserved.
#

# This file contains the Tcl procedure to print out the Saffir-Simpson
# scale in both chart format and in a detailed listing of damage expected
# from each category of storm.

proc sschart {} {
   set done 0
   while {$done == 0} {
      puts [saff_chart]
      puts "
* Press a number from 1 to 5 for a more detailed description of the
  damage typically caused by this level of storm.

* Press 'r' for the references used for this chart.

* Any other key or return to exit.

"
      set c [gets stdin]
      set done 1
      for {set i 1} {$i <= 5} {incr i} {
         if {[string compare $c "$i"] == 0} {
            show_damage_cat $i
            set done 0
         }
      }
      if {[string compare $c "r"] == 0} { show_refs ; set done 0 }
   }
}


proc show_refs {} {
   puts "" ; puts "" ; puts ""
   puts [ss_refs]
   puts "Press RETURN to continue"
   puts "" ; puts "" ; puts ""
   gets stdin
}


proc show_damage_cat {cat} {

   puts ""
   puts ""
   puts "Information in this description quoted from the ``Hurricanes,"
   puts "Typhoons, Tropical Cyclones FAQ'' by Dr. Chris Landsea"
   puts ""
   puts [ss_damage $cat]
   puts ""
   puts "Press RETURN to continue"
   puts ""
   puts ""
   gets stdin
}

