EgtGraphics 1.5c6 :

- modifiche per materiale
- spostato comando PAUSE di TSC in EgtGeneral.
This commit is contained in:
Dario Sassi
2014-03-18 08:51:01 +00:00
parent ec813123d0
commit 294546102d
5 changed files with 9 additions and 32 deletions
+1 -27
View File
@@ -79,9 +79,7 @@ SceExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR&
}
// esecuzione comando
if ( sCmd1 == "PAUSE")
return ExecutePause( sCmd2, vsParams) ;
else if ( sCmd1 == "RD" || sCmd1 == "REDRAW")
if ( sCmd1 == "RD" || sCmd1 == "REDRAW")
return ExecuteRedraw( sCmd2, vsParams) ;
else if ( sCmd1 == "ZM" || sCmd1 == "ZOOM")
return ExecuteZoom( sCmd2, vsParams) ;
@@ -95,30 +93,6 @@ SceExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR&
return false ;
}
//----------------------------------------------------------------------------
bool
SceExecutor::ExecutePause( const string& sCmd2, const STRVECTOR& vsParams)
{
const int MIN_TIME = 0 ;
const int MAX_TIME = 10000 ;
// 1 parametro : durata della pausa in ms
if ( vsParams.size() != 1)
return false ;
// tempo di attesa
int nTime ;
if ( ! FromString( vsParams[0], nTime))
return false ;
if ( nTime < MIN_TIME)
nTime = MIN_TIME ;
else if ( nTime > MAX_TIME)
nTime = MAX_TIME ;
// eseguo
Sleep( nTime) ;
return true ;
}
//----------------------------------------------------------------------------
bool
SceExecutor::ExecuteRedraw( const string& sCmd2, const STRVECTOR& vsParams)