home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58b_TRIBES.iso / Tribes / base / scripts.vol / ted.cs < prev    next >
Encoding:
Text File  |  1998-12-16  |  3.7 KB  |  110 lines

  1. function ted( %window )
  2. {
  3.    if( %window == "" )
  4.    {
  5.       $TED::mainWindow = "MainWindow";
  6.    }
  7.    else
  8.    {
  9.       $TED::mainWindow = %window;
  10.    }
  11.  
  12.    // ---------------------------
  13.    // TED Variables
  14.    // ---------------------------
  15.    // flags
  16.    $TED::flagCorner                 = false;
  17.    $TED::flagEdit                   = false;
  18.    $TED::flagEmpty1                 = false;
  19.    $TED::flagEmpty2                 = false;
  20.    $TED::flagEmpty3                 = false;
  21.    $TED::flagFlipX                  = false;
  22.    $TED::flagFlipY                  = false;
  23.    $TED::flagRotate                 = false;
  24.     
  25.     // paste
  26.    $TED::pasteMaterial              = true;
  27.    $TED::pasteHeight                = true;
  28.     
  29.    // values
  30.    $TED::heightVal                  = 50;
  31.    $TED::adjustVal                  = 5;
  32.    $TED::scaleVal                   = 1;
  33.    $TED::pinDetailVal               = 0;
  34.    $TED::pinMaxVal                  = 12;
  35.    $TED::matIndexVal                = 0;
  36.    $TED::smoothVal                  = 0.5;
  37.  
  38.    // display
  39.    $TED::selectionDisplayFrame      = true;
  40.    $TED::selectionDisplayOutline    = false;
  41.    $TED::selectionDisplayFill       = false;
  42.    $TED::selectionColorFrame        = 3;
  43.    $TED::selectionColorFill         = 4;
  44.    $TED::hilightDisplayFrame        = true;
  45.    $TED::hilightDisplayOutline      = false;
  46.    $TED::hilightDisplayFill         = false;
  47.    $TED::hilightColorFrame          = 2;
  48.    $TED::hilightColorFill           = 8;
  49.    $TED::shadowDisplayFrame         = true;
  50.    $TED::shadowDisplayOutline       = false;
  51.    $TED::shadowDisplayFill          = false;
  52.    $TED::shadowColorFrame           = 6;
  53.    $TED::shadowColorFill            = 12;
  54.    $TED::blockDisplayOutline        = false;
  55.  
  56.    // misc
  57.    $TED::brushSnap                  = true;    
  58.    $TED::brushFeather               = true;
  59.  
  60.    // system
  61.    $TED::castInteriorShadows        = true;
  62.    $TED::success                    = false;
  63.    $TED::diskName                   = "";
  64.    $TED::currFile                   = "";
  65.    $TED::currPath                   = "";
  66.    $TED::terrainNameChange          = false;
  67.    $TED::terrainExt                 = "ted";
  68.    $TED::editValue                  = "";
  69.  
  70.    Ted::initTed();
  71.    Ted::attachToTerrain();
  72.  
  73.    // ---------------------------
  74.    // set the default values
  75.    // ---------------------------
  76.    Ted::setHeightVal( $TED::heightVal );
  77.    Ted::setAdjustVal( $TED::adjustVal );
  78.    Ted::setScaleVal( $TED::scaleVal );
  79.    Ted::setPinDetailVal( $TED::pinDetailVal );
  80.    Ted::setPinDetailMax( $TED::pinMaxVal );
  81.    Ted::setSmoothVal( $TED::smoothVal );
  82.    Ted::setMatIndexVal( $TED::matIndexVal );
  83.    
  84.    Ted::setSelectShow( $TED::selectionDisplayFrame, $TED::selectionDisplayFill, $TED::selectionDisplayOutline );
  85.    Ted::setSelectFrameColor( $TED::selectionColorFrame );
  86.    Ted::setSelectFillColor( $TED::selectionColorFill );
  87.    Ted::setHilightShow( $TED::hilightDisplayFrame, $TED::hilightDisplayFill, $TED::hilightDisplayOutline );
  88.    Ted::setHilightFrameColor( $TED::hilightColorFrame );
  89.    Ted::setHilightFillColor( $TED::hilightColorFill );
  90.    Ted::setShadowShow( $TED::shadowDisplayFrame, $TED::shadowDisplayFill, $TED::shadowDisplayOutline );
  91.    Ted::setShadowFrameColor( $TED::shadowColorFrame );
  92.    Ted::setShadowFillColor( $TED::shadowColorFill );
  93.    
  94.    Ted::setSnap( $TED::brushSnap );
  95.    Ted::setFeather( $TED::brushFeather );
  96.    
  97.    Ted::setBlockOutline( $TED::blockDisplayOutline );
  98.  
  99.    // only show if not in new editor   
  100.    if( !$ME::Loaded )   
  101.    {
  102.       Ted::window( $Ted::mainWindow );
  103.  
  104.       setMainWindow( $Ted::mainWindow );
  105.  
  106.       cursorOn( MainWindow );
  107.       GuiNewContentCtrl( MainWindow, SimGui::TSControl );
  108.    }
  109. }
  110.