Browse Source

Ein paar bugs behoben

Kolja Strohm 4 years ago
parent
commit
46f3fa7ff8
2 changed files with 9 additions and 1 deletions
  1. 8 0
      Bild.cpp
  2. 1 1
      Random.cpp

+ 8 - 0
Bild.cpp

@@ -366,6 +366,14 @@ void Bild::setPixelBuffer( int *buffer, bool deleteBuffer, int breite, int heigh
     delFc = deleteBuffer;
     size.x = breite;
     size.y = height;
+    drawOff[ 0 ].x = 0;
+    drawOff[ 0 ].y = 0;
+    dPosA[ 0 ].x = 0;
+    dPosA[ 0 ].y = 0;
+    dSizeA[ 0 ] = size;
+    alphaAnzahl = 0;
+    alpha[ 0 ] = 0;
+    doa = 0;
     rend = 1;
 }
 

+ 1 - 1
Random.cpp

@@ -84,7 +84,7 @@ void RandomGenerator::setSeed( __int64 seed )
     int offset = (int)(seed >> 32);
     srand( (int)seed );
     offset -= this->offset;
-    while( offset-- )
+    while( offset-- > 0 )
         rand();
 }