Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. --- a/src/gui/Screen.cpp
  2. +++ b/src/gui/Screen.cpp
  3. @@ -11,7 +11,6 @@
  4.  
  5. #include <iostream>
  6. #include <algorithm> // std::for_each
  7. -#include <cmath>
  8.  
  9. #include <algif.h>
  10.  
  11. @@ -382,7 +381,7 @@ void Screen::scrollHorizontally( Screen* oldScreen, Screen* newScreen, bool righ
  12. newScreen->redraw ();
  13. BITMAP * newPicture = newScreen->imageOfScreen ;
  14.  
  15. - unsigned int step = static_cast< int >( std::round( static_cast< double >( isomot::ScreenWidth() >> 6 ) / 10.0 ) ) << 1;
  16. + unsigned int step = ( ( ( isomot::ScreenWidth() >> 6 ) + 5 ) / 10 ) << 1 ;
  17.  
  18. for ( unsigned int x = step ; x < isomot::ScreenWidth() ; x += step )
  19. {
  20. @@ -414,7 +413,7 @@ void Screen::wipeHorizontally( Screen* oldScreen, Screen* newScreen, bool rightT
  21. newScreen->redraw ();
  22. BITMAP * newPicture = newScreen->imageOfScreen ;
  23.  
  24. - unsigned int step = static_cast< int >( std::round( static_cast< double >( isomot::ScreenWidth() >> 6 ) / 10.0 ) ) << 1;
  25. + unsigned int step = ( ( ( isomot::ScreenWidth() >> 6 ) + 5 ) / 10 ) << 1 ;
  26.  
  27. for ( unsigned int x = step ; x < isomot::ScreenWidth() ; x += step )
  28. {
  29. @@ -445,7 +444,7 @@ void Screen::barWipeHorizontally( Screen* oldScreen, Screen* newScreen, bool rig
  30. unsigned int pieces = isomot::ScreenWidth() >> 6 ;
  31. unsigned int widthOfPiece = isomot::ScreenWidth() / pieces ;
  32.  
  33. - unsigned int step = static_cast< int >( std::round( static_cast< double >( pieces ) / 10.0 ) );
  34. + unsigned int step = ( pieces + 5 ) / 10 ;
  35.  
  36. for ( unsigned int x = step ; x < widthOfPiece ; x += step )
  37. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement