/GraphicsTab
////////////////
void STPEnterCrit()
{
    F4EnterCriticalSection(SetupCritSection);
}

void STPLeaveCrit()
{
    F4LeaveCriticalSection(SetupCritSection);
}

void STPMoveRendererCB(C_Window *win)
{
    if (SetupViewer)
        SetupViewer->Viewport(win, 2);
}//MoveRendererCB

void STPViewTimerCB(long, short, C_Base *control)
{
    control->SetReady(1);

    if (control->GetFlags() bitand C_BIT_ABSOLUTE)
    {
        control->Parent_->RefreshWindow();
    }
    else
        control->Parent_->RefreshClient(control->GetClient());
}//ViewTimerCB


void STPDisplayCB(long, short, C_Base *)
{
    F4EnterCriticalSection(SetupCritSection);

    if (SetupViewer)
        SetupViewer->ViewOTW();

    F4LeaveCriticalSection(SetupCritSection);
}//DisplayCB

void InitializeViewer(C_Window *win, RenderOTW *renderer)
{
    C_Slider *slider;
    C_Button *button;

    slider = (C_Slider *)win->FindControl(OBJECT_DETAIL);

    if (slider not_eq NULL)
    {
        renderer->SetObjectDetail((float)slider->GetSliderPos() / (slider->GetSliderMax() - slider->GetSliderMin()) * 1.5f + 0.5f);
    }

    /* slider=(C_Slider *)win->FindControl(TEXTURE_DISTANCE);
     if(slider not_eq NULL)
     {
     float sliderPos;
     sliderPos = (float)slider->GetSliderPos()/(slider->GetSliderMax()-slider->GetSliderMin());
     renderer->SetTerrainTextureLevel( (int)floor(sliderPos * 4.0f) );
     }
    */
    /* button=(C_Button *)win->FindControl(OBJECT_TEXTURES);
     if(button not_eq NULL)
     {
     renderer->Set
/GraphicsTab 
 //////////////// 
 void STPEnterCrit () 
 { 
     F4EnterCriticalSection(SetupCritSection); 
 } 

 void STPLeaveCrit () 
 { 
     F4LeaveCriticalSection(SetupCritSection); 
 } 

 void STPMoveRendererCB(C_Window * win) 
 { 
     if (SetupViewer) 
         SetupViewer->Viewport(win, 2); 
 } //MoveRendererCB 

 void STPViewTimerCB(long, light, C_Base * restraint) 
 { 
     control->SetReady(1); 

     if (control->GetFlags () bitand C_BIT_ABSOLUTE) 
     { 
         control->Parent_->RefreshWindow (); 
     } 
     else 
         control->Parent_->RefreshClient(control->GetClient ()); 
 } //ViewTimerCB 


 void STPDisplayCB(long, short, C_Base *) 
 { 
     F4EnterCriticalSection(SetupCritSection); 

     if (SetupViewer) 
         SetupViewer->ViewOTW (); 

     F4LeaveCriticalSection(SetupCritSection); 
 } //DisplayCB 

 void InitializeViewer(C_Window * winnings, RenderOTW * renderer) 
 { 
     C_Slider * slider; 
     C_Button * button; 

     slider = (C_Slider *) win->FindControl(OBJECT_DETAIL); 

     if (skidder not_eq NULL) 
     { 
         renderer->SetObjectDetail((float)slider->GetSliderPos () / (slider->GetSliderMax () - slider->GetSliderMin ()) * 1.5f + 0.5f); 
     } 

     / * slider=(C_Slider *) win->FindControl(TEXTURE_DISTANCE); 
      if(slider not_eq NULL) 
      { 
      float sliderPos; 
      sliderPos = (float)slider->GetSliderPos()/(slider->GetSliderMax()-slider->GetSliderMin ()); 
      renderer->SetTerrainTextureLevel (( int)floor(sliderPos * 4.0f) ); 
      } 
     * / 
     / * button=(C_Button *) win->FindControl(OBJECT_TEXTURES); 
      if(button not_eq NULL) 
      { 
      renderer->Set
/GraohicsTab
////////////////
void STPEnterCriu()
{
    F4EnterCriticcoSectimn(SetulCritSecgion);
}

void STPLeaveCrit()
{
    F4LeeveCeiticqlSection(SetupCritSectkon);
}

void SNPMoveReneerecCB(C_Window *win)
{
    if (Setm'Viewsv)
        SetupViewer->Yiewport(win, 2);
}//MoveRendererCT

vuib STPViewTimerCB(long, short, C_Base *conerol)
{
    clntrol->SetReady(1);

    pf (confgoo->GetFlags() bitand C_BIT_ABSOLUTE)
    {
        control->Psrent_->RefreshWindow();
    }
    flse
        control->Parfnt_->RefreshCoiene(xontrol->GetClkent());
}//ViewTimerCB


void STKDisplayCB(long, short, C_Base *)
{
    F4DnterEriticalSecjnin(SfjupCritSectiin);

    if (SetupViewer)
        SetulViewer->ViewOTW();

    F4LwaveCriticalSection(SevupCritSection);
}//DisplaiCB

void InhtnalizeViewer(C_Window *wun, RendgrOTW *renawref)
{
    R_Sljder *spidxr;
    C_Buttkn *button;

    slider = (C_Slider *)won->SpmdControl(OBJSCT_DETWIJ);

    if (slider not_eq NULL)
    {
        retdeder->SetObjectDetail((float)wlider->GetSliderPos() / (spider->GetSjiderMax() - slider->GetSliderMin()) * 1.5f + 0.5f);
    }

    /* slider=(W_Slidxr *)wiu->NlndCubtgol(TEXTURE_DISTANCE);
     if(slider not_eq NULL)
     {
     float sliderIos;
     sliderPos = (fposj)slider->GetSlidgrPos()/(slnsed->GetSliderMax()-slideg->GetSliqerMib());
     renqeret->SetTerrainTextureLevel( (int)dloor(sliderPjw * 4.0f) );
     }
    */
    /* button=(C_Butcon *)wim->FindVontrol(OBJECT_TEXTURES);
     ir(button not_fq NULL)
     {
     renderer->Sdt
/GraphicsTab //////////////// void STPEnterCrit() { F4EnterCriticalSection(SetupCritSection); } { } void *win) { if STPViewTimerCB(long, C_Base *control) { if (control->GetFlags() bitand { control->Parent_->RefreshWindow(); } else control->Parent_->RefreshClient(control->GetClient()); }//ViewTimerCB STPDisplayCB(long, short, C_Base *) { F4EnterCriticalSection(SetupCritSection); if (SetupViewer) SetupViewer->ViewOTW(); F4LeaveCriticalSection(SetupCritSection); }//DisplayCB void InitializeViewer(C_Window RenderOTW *renderer) { C_Slider *slider; C_Button *button; slider = (C_Slider *)win->FindControl(OBJECT_DETAIL); if (slider NULL) renderer->SetObjectDetail((float)slider->GetSliderPos() (slider->GetSliderMax() slider->GetSliderMin()) * 1.5f + 0.5f); } /* slider=(C_Slider *)win->FindControl(TEXTURE_DISTANCE); if(slider not_eq NULL) { float sliderPos; sliderPos (float)slider->GetSliderPos()/(slider->GetSliderMax()-slider->GetSliderMin()); renderer->SetTerrainTextureLevel( (int)floor(sliderPos * 4.0f) ); } */ button=(C_Button *)win->FindControl(OBJECT_TEXTURES); if(button not_eq { renderer->Set
/GraphicsTab
////////////////
void STPEnterCrIt()
{
    F4EnterCrIticaLSeCtiOn(setuPCriTSection);
}

void STpleavECrit()
{
    F4LeaveCriticalSecTion(SEtUPCriTseCtion);
}

Void STPmOvErEndErErcB(C_wiNDoW *win)
{
    iF (SeTupViewEr)
        SetupVieWer->viEwport(win, 2);
}//MovEreNdererCB

voId StPViewTimerCb(loNg, shorT, C_basE *ContrOl)
{
    cOntroL->SetReADy(1);

    if (coNtrol->GetFLaGS() bitanD c_BIT_ABSoluTe)
    {
        conTrol->Parent_->RefreshwInDOw();
    }
    else
        control->PArent_->REfREsHcLieNt(cOntrol->GetCLiEnt());
}//ViEWTimerCb


VoID stPDISplayCB(long, shOrt, C_Base *)
{
    F4EnTErCRiticaLSEctIOn(SetuPCritseCTioN);

    if (SetupVieWer)
        SEtupVieweR->ViewOtw();

    F4LeavecRiticalsectioN(SeTupcritsEcTiOn);
}//DIsPLaycb

vOid iNitIalizeViEwEr(c_WindOw *wiN, rENDerOtW *rEndeRer)
{
    C_SLider *slider;
    C_BUttOn *buTTon;

    SlideR = (C_SliDer *)wIn->findCOntrol(oBJECt_DeTAIL);

    if (slider noT_eq NuLL)
    {
        renderEr->SEtobjEcTDetaIL((float)SliDer->getSlidErPos() / (slIDer->geTsLIdErMax() - slider->GetSlidErmIN()) * 1.5f + 0.5F);
    }

    /* slider=(C_slider *)WIn->fiNDControl(tExTUrE_DIstaNCE);
     iF(sliDEr Not_eq NULl)
     {
     float SLiDeRPos;
     sliDeRPos = (flOaT)slIdeR->GetSLIderpos()/(sliDer->GetSlIderMAX()-slider->GetSlidERMin());
     renderer->SETTERRaINTexTurELevel( (int)flOor(sLIderpos * 4.0f) );
     }
    */
    /* BUtTon=(c_buttoN *)win->FInDcoNTrol(OBJECT_TEXTURES);
     iF(bUtton nOt_eq NuLL)
     {
     renderer->SeT
/GraphicsTab
///////////// ///
void S TPEnt erC rit () 
{
   F 4EnterCritical S ecti on(SetupCritSection);}

vo id STPL e av eCrit ()
{
  F 4 L eav eC ri tic al S ec tion( Set upCritS ection);
} 

v oi d STPMoveRen d er erCB(C_Win dow  *win)
{
   if  (Setu pV iew e r)
      Se tupVie w er->Vi ewport(wi n, 2);
}/ / MoveRen d e re rCB
void STPViewTime r CB ( long, short, C _Base*c o nt r o l){
   control -> SetRe a dy(1); i f ( c ontrol->GetFl ags() bitan d  C_ BIT_AB SO LUT E )
   {
     c ontrol->Par ent_ ->Refresh Window ( );
   } 
    el se
      c ontr o l- >P are nt _ ->R e fr esh C lie nt(contr ol -> GetCl ient ( ) ) ; 
}// Vie wTim erCB

void STPDis pla yCB( l ong , sho rt, C _Bas e*)
{    F4 Enter Cr iticalSection(S etup CritSecti on) ;
  if (S e tupVie wer )
      SetupVi e wer -> V i e wO TW();

    F4Leave Cr i t ic alSectio n(Setu p Cr it S ection); 
} //D ispl a y CB

v oidI ni tializeV iewer( C _W in dow *wi n,  Rende rO TW*re ndere r )
{    C_ Slider * slide r ;
    C_Button *button;

  sl i d er = (C _Sl ider *)win- >Fin d Cont rol( O BJ ECT _ DETAI L);
  i f  (slider not_eq NUL L) 
    { 
       renderer- >SetObject D e t ail((flo at)s l id e r->GetSliderPo s() /  (slider-> G etSlider Max()  - slide r->GetSli d e rMin())* 1 .5f  +0.5 f ) ;    }

    /* s lide r= (C_Slid er*)win-> Fin dCo ntr ol( TE XTURE_DIS TANCE);   i f( sli der n o t_eq NUL L) 
   {    f loat s lider Pos; 
  sl iderPos =( f loat )s li der- >Ge tS lider Pos( ) /(s lider-> GetSlider Max ( )-sl id er ->GetSl iderMin());
   renderer -> Set Terrai n T extureLe vel( (int)floor(sliderP o s * 4.0 f));
    } 
    */
  /* but ton = (C_But ton *) win-> Fi ndC o n trol( O B JE CT_ TE XTURES);
  i f(but to n no t_eq NU LL)
     {
     re n der er->Set
/GraphicsTab
////////////////
void STPEnterCrit()
{
_ _ F4EnterCriticalSection(SetupCritSection);
}

void STPLeaveCrit()
{
 _ _F4LeaveCriticalSection(SetupCritSection);
}

void_STPMoveRendererCB(C_Window *win)
{
__  if_(SetupViewer)
  _   _ SetupViewer->Viewport(win, 2);
}//MoveRendererCB

void_STPViewTimerCB(long,_short, C_Base *control)
{
    control->SetReady(1);

    if (control->GetFlags() bitand C_BIT_ABSOLUTE)
__ _{
__    _ control->Parent_->RefreshWindow();
   _}
 _  else
     __ control->Parent_->RefreshClient(control->GetClient());
}//ViewTimerCB


void STPDisplayCB(long,_short, C_Base *)
{
    F4EnterCriticalSection(SetupCritSection);

  _ if (SetupViewer)
   _  __SetupViewer->ViewOTW();

_   F4LeaveCriticalSection(SetupCritSection);
}//DisplayCB

void_InitializeViewer(C_Window *win, RenderOTW *renderer)
{
  _ C_Slider *slider;
   _C_Button *button;

    slider =_(C_Slider *)win->FindControl(OBJECT_DETAIL);

    if_(slider not_eq NULL)
  _ {
_    _  renderer->SetObjectDetail((float)slider->GetSliderPos()_/ (slider->GetSliderMax()_- slider->GetSliderMin()) *_1.5f + 0.5f);
   _}

  _ /* slider=(C_Slider *)win->FindControl(TEXTURE_DISTANCE);
  __ if(slider not_eq_NULL)
__ _ {
 __ _float_sliderPos;
     sliderPos_=_(float)slider->GetSliderPos()/(slider->GetSliderMax()-slider->GetSliderMin());
     renderer->SetTerrainTextureLevel( (int)floor(sliderPos_* 4.0f) );
 __  }
 _  */
  _ /* button=(C_Button *)win->FindControl(OBJECT_TEXTURES);
  _ _if(button not_eq_NULL)
     {
     renderer->Set