Browse Source

fix some issues with array usages and add tests

Kolja Strohm 2 years ago
parent
commit
993493f4b5

+ 6 - 9
Array.h

@@ -703,17 +703,14 @@ namespace Framework
         //! Löscht alle Elemente der Liste
         void leeren()
         {
-            ArrayEintrag< TYP* >* e2 = 0;
-            for( ArrayEintrag< TYP* >* e = entries; e; e = e->next )
+            for( ArrayEintrag< TYP* >* e = entries; e; )
             {
-                if( e2 && e2->var && e2->set )
-                    e2->var->release();
-                delete e2;
-                e2 = e;
+                if( e && e->var && e->set )
+                    e->var->release();
+                auto tmp = e->next;
+                delete e;
+                e = tmp;
             }
-            if( e2 && e2->var && e2->set )
-                e2->var->release();
-            delete e2;
             entries = new ArrayEintrag< TYP* >();
             entries->set = 0;
             entries->next = 0;

+ 436 - 436
Bild.cpp

@@ -73,29 +73,29 @@ inline void Bild::alphaPixelP3D( int x, int y, int f )
     alphaPixelP3D( fc[ x + y * size.x ], f );
 }
 
-inline void Bild::alphaPixelAssozP( int &fc, int f )
+inline void Bild::alphaPixelAssozP( int& fc, int f )
 {
-    unsigned char *fc1 = (unsigned char *)&fc;
-    unsigned char *fc2 = (unsigned char *)&f;
+    unsigned char* fc1 = (unsigned char*)&fc;
+    unsigned char* fc2 = (unsigned char*)&f;
     unsigned char na = (unsigned char)~fc2[ 3 ];
-    unsigned char a = (unsigned char)( fc2[ 3 ] + ( ( na * fc1[ 3 ] ) >> 8 ) );
+    unsigned char a = (unsigned char)(fc2[ 3 ] + ((na * fc1[ 3 ]) >> 8));
     if( a == 0 )
         return;
-    fc1[ 2 ] = (unsigned char)( ( fc2[ 2 ] * fc2[ 3 ] + ( ( fc1[ 2 ] * na * fc1[ 3 ] ) >> 8 ) ) / a );
-    fc1[ 1 ] = (unsigned char)( ( fc2[ 1 ] * fc2[ 3 ] + ( ( fc1[ 1 ] * na * fc1[ 3 ] ) >> 8 ) ) / a );
-    fc1[ 0 ] = (unsigned char)( ( fc2[ 0 ] * fc2[ 3 ] + ( ( fc1[ 0 ] * na * fc1[ 3 ] ) >> 8 ) ) / a );
+    fc1[ 2 ] = (unsigned char)((fc2[ 2 ] * fc2[ 3 ] + ((fc1[ 2 ] * na * fc1[ 3 ]) >> 8)) / a);
+    fc1[ 1 ] = (unsigned char)((fc2[ 1 ] * fc2[ 3 ] + ((fc1[ 1 ] * na * fc1[ 3 ]) >> 8)) / a);
+    fc1[ 0 ] = (unsigned char)((fc2[ 0 ] * fc2[ 3 ] + ((fc1[ 0 ] * na * fc1[ 3 ]) >> 8)) / a);
     fc1[ 3 ] = a;
 }
 
-inline void Bild::alphaPixelP3D( int &fc, int colorb )
+inline void Bild::alphaPixelP3D( int& fc, int colorb )
 {
     //alphaPixelAssozP( fc, colorb );
     //return;
-    int alpha = ( ( colorb >> 24 ) & 0xFF );
-    int na = ( 0x100 - alpha );
-    fc = ( ( ( ( ( na * ( fc & 0xFF00FF ) ) >> 8 ) + ( ( alpha * ( colorb & 0xFF00FF ) ) >> 8 ) ) & 0xFF00FF ) |
-           ( ( ( ( na * ( fc & 0x00FF00 ) ) >> 8 ) + ( ( alpha * ( colorb & 0x00FF00 ) ) >> 8 ) ) & 0x00FF00 ) |
-           ( ( fc & 0xFF000000 ) ) ) * ( fc != 0 ) | ( fc == 0 ) * colorb;
+    int alpha = ((colorb >> 24) & 0xFF);
+    int na = (0x100 - alpha);
+    fc = (((((na * (fc & 0xFF00FF)) >> 8) + ((alpha * (colorb & 0xFF00FF)) >> 8)) & 0xFF00FF) |
+           ((((na * (fc & 0x00FF00)) >> 8) + ((alpha * (colorb & 0x00FF00)) >> 8)) & 0x00FF00) |
+           ((fc & 0xFF000000))) * (fc != 0) | (fc == 0) * colorb;
     //unsigned char *fc1 = (unsigned char*)&fc;
     //unsigned char *fc2 = (unsigned char*)&colorb;
     //unsigned char na = 255-fc2[ 3 ];
@@ -105,15 +105,15 @@ inline void Bild::alphaPixelP3D( int &fc, int colorb )
     //fc1[ 0 ] = (unsigned char)( ( fc2[ 0 ] * fc2[ 3 ] + fc1[ 0 ] * na ) / 255 );
 }
 
-inline void Bild::alphaPixelP( int &fc, int colorb )
+inline void Bild::alphaPixelP( int& fc, int colorb )
 {
     //alphaPixelAssozP( fc, colorb );
     //return;
-    int alpha = ( ( colorb >> 24 ) & 0xFF );
-    int na = ( 0x100 - alpha );
-    fc = ( ( ( ( ( na * ( fc & 0xFF00FF ) ) >> 8 ) + ( ( alpha * ( colorb & 0xFF00FF ) ) >> 8 ) ) & 0xFF00FF ) |
-           ( ( ( ( na * ( fc & 0x00FF00 ) ) >> 8 ) + ( ( alpha * ( colorb & 0x00FF00 ) ) >> 8 ) ) & 0x00FF00 ) |
-           ( ( fc & 0xFF000000 ) ) );
+    int alpha = ((colorb >> 24) & 0xFF);
+    int na = (0x100 - alpha);
+    fc = (((((na * (fc & 0xFF00FF)) >> 8) + ((alpha * (colorb & 0xFF00FF)) >> 8)) & 0xFF00FF) |
+           ((((na * (fc & 0x00FF00)) >> 8) + ((alpha * (colorb & 0x00FF00)) >> 8)) & 0x00FF00) |
+           ((fc & 0xFF000000)));
     //unsigned char *fc1 = (unsigned char*)&fc;
     //unsigned char *fc2 = (unsigned char*)&colorb;
     //unsigned char na = 255-fc2[ 3 ];
@@ -143,19 +143,19 @@ void Bild::drawFlatDreieck( int y1, int y2, float m1, float b1, float m2, float
     const int yEnd = min( y2, dSizeA[ doa ].y );
     for( int y = yStart; y < yEnd; y++ )
     {
-        const int xStart = max( (int)( m1 * (float)y + b1 + 0.5f ), dPosA[ doa ].x );
-        const int xEnd = min( (int)( m2 * (float)y + b2 + 0.5f ), dSizeA[ doa ].x );
+        const int xStart = max( (int)(m1 * (float)y + b1 + 0.5f), dPosA[ doa ].x );
+        const int xEnd = min( (int)(m2 * (float)y + b2 + 0.5f), dSizeA[ doa ].x );
         for( int x = xStart; x < xEnd; x++ )
             fc[ x + y * size.x ] = farbe;
     }
 }
 
 void Bild::drawFlatDreieckTextur( int y1, int y2, double m1, double b1, double m2, double b2, double tx1, double ty1, double tx2, double ty2,
-                                  double tx_1o, double ty_1o, double tx_2o, double ty_2o, double txf, double tyf, Bild &textur )
+                                  double tx_1o, double ty_1o, double tx_2o, double ty_2o, double txf, double tyf, Bild& textur )
 {
     const double yStart = max( y1, dPosA[ doa ].y );
     const double yEnd = min( y2, dSizeA[ doa ].y );
-    double tx_1 = tx1 + tx_1o * ( yStart - y1 ), ty_1 = ty1 + ty_1o * ( yStart - y1 ), tx_2 = tx2 + tx_2o * ( yStart - y1 ), ty_2 = ty2 + ty_2o * ( yStart - y1 );
+    double tx_1 = tx1 + tx_1o * (yStart - y1), ty_1 = ty1 + ty_1o * (yStart - y1), tx_2 = tx2 + tx_2o * (yStart - y1), ty_2 = ty2 + ty_2o * (yStart - y1);
     for( double y = yStart; y < yEnd; y++, tx_1 += tx_1o, ty_1 += ty_1o, tx_2 += tx_2o, ty_2 += ty_2o )
     {
         const double xStart = m1 * y + b1;
@@ -166,14 +166,14 @@ void Bild::drawFlatDreieckTextur( int y1, int y2, double m1, double b1, double m
 
 void Bild::drawFlatDreieckAlpha( int y1, int y2, float m1, float b1, float m2, float b2, int farbe )
 {
-    const int yStart = max( (int)( y1 + 0.5 ), dPosA[ doa ].y );
-    const int yEnd = min( (int)( y2 + 0.5 ), dSizeA[ doa ].y );
+    const int yStart = max( (int)(y1 + 0.5), dPosA[ doa ].y );
+    const int yEnd = min( (int)(y2 + 0.5), dSizeA[ doa ].y );
     if( alpha3D )
     {
         for( int y = yStart; y < yEnd; y++ )
         {
-            const int xStart = max( (int)( m1 * ( (float)y + 0.5f ) + b1 + 0.5f ), dPosA[ doa ].x );
-            const int xEnd = min( (int)( m2 * ( (float)y + 0.5 ) + b2 + 0.5f ), dSizeA[ doa ].x );
+            const int xStart = max( (int)(m1 * ((float)y + 0.5f) + b1 + 0.5f), dPosA[ doa ].x );
+            const int xEnd = min( (int)(m2 * ((float)y + 0.5) + b2 + 0.5f), dSizeA[ doa ].x );
             for( int x = xStart; x < xEnd; x++ )
                 alphaPixelP3D( fc[ x + y * size.x ], farbe );
         }
@@ -182,8 +182,8 @@ void Bild::drawFlatDreieckAlpha( int y1, int y2, float m1, float b1, float m2, f
     {
         for( int y = yStart; y < yEnd; y++ )
         {
-            const int xStart = max( (int)( m1 * ( (float)y + 0.5f ) + b1 + 0.5f ), dPosA[ doa ].x );
-            const int xEnd = min( (int)( m2 * ( (float)y + 0.5 ) + b2 + 0.5f ), dSizeA[ doa ].x );
+            const int xStart = max( (int)(m1 * ((float)y + 0.5f) + b1 + 0.5f), dPosA[ doa ].x );
+            const int xEnd = min( (int)(m2 * ((float)y + 0.5) + b2 + 0.5f), dSizeA[ doa ].x );
             for( int x = xStart; x < xEnd; x++ )
                 alphaPixelP( fc[ x + y * size.x ], farbe );
         }
@@ -191,11 +191,11 @@ void Bild::drawFlatDreieckAlpha( int y1, int y2, float m1, float b1, float m2, f
 }
 
 void Bild::drawFlatDreieckTexturAlpha( int y1, int y2, double m1, double b1, double m2, double b2, double tx1, double ty1, double tx2, double ty2,
-                                       double tx_1o, double ty_1o, double tx_2o, double ty_2o, double txf, double tyf, Bild &textur )
+                                       double tx_1o, double ty_1o, double tx_2o, double ty_2o, double txf, double tyf, Bild& textur )
 {
     const double yStart = max( y1, dPosA[ doa ].y );
     const double yEnd = min( y2, dSizeA[ doa ].y );
-    double tx_1 = tx1 + tx_1o * ( yStart - y1 ), ty_1 = ty1 + ty_1o * ( yStart - y1 ), tx_2 = tx2 + tx_2o * ( yStart - y1 ), ty_2 = ty2 + ty_2o * ( yStart - y1 );
+    double tx_1 = tx1 + tx_1o * (yStart - y1), ty_1 = ty1 + ty_1o * (yStart - y1), tx_2 = tx2 + tx_2o * (yStart - y1), ty_2 = ty2 + ty_2o * (yStart - y1);
     for( double y = yStart; y < yEnd; y++, tx_1 += tx_1o, ty_1 += ty_1o, tx_2 += tx_2o, ty_2 += ty_2o )
     {
         const double xStart = m1 * y + b1;
@@ -204,7 +204,7 @@ void Bild::drawFlatDreieckTexturAlpha( int y1, int y2, double m1, double b1, dou
     }
 }
 
-void Bild::drawLinieHTextur( Vec2< double > p, double len, Vec2< double > ta, Vec2< double > tb, double txo, double tyo, Bild &textur ) // zeichnet eine horizontale Linie
+void Bild::drawLinieHTextur( Vec2< double > p, double len, Vec2< double > ta, Vec2< double > tb, double txo, double tyo, Bild& textur ) // zeichnet eine horizontale Linie
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -241,19 +241,19 @@ void Bild::drawLinieHTextur( Vec2< double > p, double len, Vec2< double > ta, Ve
             return;
     }
     int br = size.x;
-    int *fc = this->fc + (int)( p.x + (int)p.y * br );
+    int* fc = this->fc + (int)(p.x + (int)p.y * br);
     double x = ta.x + txo * off, y = ta.y + tyo * off;
-    int *buffer = textur.getBuffer();
+    int* buffer = textur.getBuffer();
     int txtBr = textur.getBreite();
     for( int i = 0; i < len; ++i, ++fc )
     {
-        *fc = buffer[ (int)( (int)( x + 0.5 ) + (int)( y + 0.5 ) * txtBr ) ];
+        *fc = buffer[ (int)((int)(x + 0.5) + (int)(y + 0.5) * txtBr) ];
         x += txo, y += tyo;
     }
     rend = 1;
 }
 
-void Bild::drawLinieHTexturAlpha( Vec2< double > p, double len, Vec2< double > ta, Vec2< double > tb, double txo, double tyo, Bild &textur ) // zeichnet eine horizontale Linie
+void Bild::drawLinieHTexturAlpha( Vec2< double > p, double len, Vec2< double > ta, Vec2< double > tb, double txo, double tyo, Bild& textur ) // zeichnet eine horizontale Linie
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -285,20 +285,20 @@ void Bild::drawLinieHTexturAlpha( Vec2< double > p, double len, Vec2< double > t
             return;
     }
     int br = size.x;
-    int *fc = this->fc + (int)( p.x + (int)p.y * br );
+    int* fc = this->fc + (int)(p.x + (int)p.y * br);
     double x = ta.x + txo * off, y = ta.y + tyo * off;
-    int *buffer = textur.getBuffer();
+    int* buffer = textur.getBuffer();
     int txtBr = textur.getBreite();
     int f;
     if( alpha3D )
     {
         for( int i = 0; i < len; ++i, ++fc )
         {
-            f = buffer[ (int)( (int)( x + 0.5 ) + (int)( y + 0.5 ) * txtBr ) ];
+            f = buffer[ (int)((int)(x + 0.5) + (int)(y + 0.5) * txtBr) ];
             if( alpha[ alphaAnzahl ] )
             {
-                unsigned char *cf = (unsigned char *)&f;
-                cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                unsigned char* cf = (unsigned char*)&f;
+                cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
             }
             alphaPixelP3D( *fc, f );
             x += txo, y += tyo;
@@ -308,11 +308,11 @@ void Bild::drawLinieHTexturAlpha( Vec2< double > p, double len, Vec2< double > t
     {
         for( int i = 0; i < len; ++i, ++fc )
         {
-            f = buffer[ (int)( (int)( x + 0.5 ) + (int)( y + 0.5 ) * txtBr ) ];
+            f = buffer[ (int)((int)(x + 0.5) + (int)(y + 0.5) * txtBr) ];
             if( alpha[ alphaAnzahl ] )
             {
-                unsigned char *cf = (unsigned char *)&f;
-                cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                unsigned char* cf = (unsigned char*)&f;
+                cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
             }
             alphaPixelP( *fc, f );
             x += txo, y += tyo;
@@ -350,7 +350,7 @@ void Bild::setAlpha( unsigned char alpha ) // setzt die Transparenz der nachfolg
     int last = this->alpha[ alphaAnzahl ];
     ++alphaAnzahl;
     assert( alphaAnzahl < 1000 );
-    this->alpha[ alphaAnzahl ] = (unsigned char)( ( 255 - alpha ) > last ? ( 255 - alpha ) : last );
+    this->alpha[ alphaAnzahl ] = (unsigned char)((255 - alpha) > last ? (255 - alpha) : last);
 }
 
 void Bild::releaseAlpha() // Löscht alpha
@@ -358,7 +358,7 @@ void Bild::releaseAlpha() // L
     --alphaAnzahl;
 }
 
-void Bild::setPixelBuffer( int *buffer, bool deleteBuffer, int breite, int height ) // setzt den Zeiger auf die Pixel des Bildes
+void Bild::setPixelBuffer( int* buffer, bool deleteBuffer, int breite, int height ) // setzt den Zeiger auf die Pixel des Bildes
 {
     if( delFc )
         delete[]fc;
@@ -398,11 +398,11 @@ void Bild::neuBild( int breite, int height, int fillColor )
 
 void Bild::setFarbe( int f )
 {
-    if( ( f & 0xFF ) == ( ( f >> 8 ) & 0xFF ) && ( f & 0xFF ) == ( ( f >> 16 ) & 0xFF ) && ( f & 0xFF ) == ( ( f >> 24 ) & 0xFF ) )
+    if( (f & 0xFF) == ((f >> 8) & 0xFF) && (f & 0xFF) == ((f >> 16) & 0xFF) && (f & 0xFF) == ((f >> 24) & 0xFF) )
         memset( fc, f, size.x * size.y * 4 );
     else
     {
-        for( int *i = fc, *end = i + size.x * size.y; i < end; i++ )
+        for( int* i = fc, *end = i + size.x * size.y; i < end; i++ )
             *i = f;
     }
     rend = 1;
@@ -435,10 +435,10 @@ void Bild::fillRegion( int x, int y, int b, int h, int ff )
         h -= dpy - y;
         y = dpy;
     }
-    b = ( x + b ) >= dgx ? ( dgx - x ) : b;
-    h = ( y + h ) >= dgy ? ( dgy - y ) : h;
-    int *pixel = fc + y * size.x + x;
-    int *rowEnd = pixel + b;
+    b = (x + b) >= dgx ? (dgx - x) : b;
+    h = (y + h) >= dgy ? (dgy - y) : h;
+    int* pixel = fc + y * size.x + x;
+    int* rowEnd = pixel + b;
     for( int i = 0; i < h; pixel += size.x - b, ++i, rowEnd += size.x )
     {
         for( ; pixel < rowEnd; ++pixel )
@@ -469,28 +469,28 @@ void Bild::alphaRegion( int x, int y, int b, int h, int ff )
         h -= dpy - y;
         y = dpy;
     }
-    b = ( x + b ) >= dgx ? ( dgx - x ) : b;
-    h = ( y + h ) >= dgy ? ( dgy - y ) : h;
+    b = (x + b) >= dgx ? (dgx - x) : b;
+    h = (y + h) >= dgy ? (dgy - y) : h;
     if( alpha[ alphaAnzahl ] )
     {
-        unsigned char *cf = (unsigned char *)&ff;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&ff;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
-    int *pixel = fc + y * size.x + x;
-    int *rowEnd = pixel + b;
-    int alpha = ( ( ff >> 24 ) & 0xFF );
-    int na = ( 0x100 - alpha );
-    int i1 = ( alpha * ( ff & 0xFF00FF ) ) >> 8;
-    int i2 = ( alpha * ( ff & 0x00FF00 ) ) >> 8;
+    int* pixel = fc + y * size.x + x;
+    int* rowEnd = pixel + b;
+    int alpha = ((ff >> 24) & 0xFF);
+    int na = (0x100 - alpha);
+    int i1 = (alpha * (ff & 0xFF00FF)) >> 8;
+    int i2 = (alpha * (ff & 0x00FF00)) >> 8;
     if( alpha3D )
     {
         for( int i = 0; i < h; pixel += size.x - b, ++i, rowEnd += size.x )
         {
             for( ; pixel < rowEnd; ++pixel )
             {
-                *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                           ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                           ( ( *pixel & 0xFF000000 ) ) ) * ( *pixel != 0 ) | ( *pixel == 0 ) * ff;
+                *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                           ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                           ((*pixel & 0xFF000000))) * (*pixel != 0) | (*pixel == 0) * ff;
             }
         }
     }
@@ -500,9 +500,9 @@ void Bild::alphaRegion( int x, int y, int b, int h, int ff )
         {
             for( ; pixel < rowEnd; ++pixel )
             {
-                *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                           ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                           ( ( *pixel & 0xFF000000 ) ) );
+                *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                           ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                           ((*pixel & 0xFF000000)));
             }
         }
     }
@@ -515,8 +515,8 @@ void Bild::alphaPixel2D( int i, int f )
         alphaPixelP( fc[ i ], f );
     else
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
         alphaPixelP( fc[ i ], f );
         rend = 1;
     }
@@ -528,8 +528,8 @@ void Bild::alphaPixel3D( int i, int f )
         alphaPixelP3D( fc[ i ], f );
     else
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
         alphaPixelP3D( fc[ i ], f );
         rend = 1;
     }
@@ -541,8 +541,8 @@ void Bild::alphaPixel2D( int x, int y, int f )
         alphaPixelP( fc[ x + y * size.x ], f );
     if( alpha[ alphaAnzahl ] < 0xFF )
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
         alphaPixelP( fc[ x + y * size.x ], f );
         rend = 1;
     }
@@ -554,8 +554,8 @@ void Bild::alphaPixel3D( int x, int y, int f )
         alphaPixelP3D( fc[ x + y * size.x ], f );
     if( alpha[ alphaAnzahl ] < 0xFF )
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
         alphaPixelP3D( fc[ x + y * size.x ], f );
         rend = 1;
     }
@@ -573,8 +573,8 @@ void Bild::alphaPixelDP2D( int x, int y, int f )
         return;
     if( alpha[ alphaAnzahl ] )
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
     alphaPixelP( fc[ x + y * size.x ], f );
     rend = 1;
@@ -592,8 +592,8 @@ void Bild::alphaPixelDP3D( int x, int y, int f )
         return;
     if( alpha[ alphaAnzahl ] )
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
     alphaPixelP3D( fc[ x + y * size.x ], f );
     rend = 1;
@@ -676,7 +676,7 @@ void Bild::drawLinieH( int x, int y, int len, int f ) // zeichnet eine horizonta
             return;
     }
     int br = size.x;
-    int *fc = this->fc + x + y * br;
+    int* fc = this->fc + x + y * br;
     int pval = len < 0 ? -1 : 1;
     len = len > 0 ? len : -len;
     for( int i = 0; i < len; ++i, fc += pval )
@@ -715,7 +715,7 @@ void Bild::drawLinieV( int x, int y, int len, int f ) // zeichnet eine vertikale
             return;
     }
     int br = size.x;
-    int *fc = this->fc + x + y * br;
+    int* fc = this->fc + x + y * br;
     int pval = len < 0 ? -br : br;
     len = len > 0 ? len : -len;
     for( int i = 0; i < len; ++i, fc += pval )
@@ -754,18 +754,18 @@ void Bild::drawLinieHAlpha( int x, int y, int len, int f ) // zeichnet eine hori
     int end = 0;
     if( alpha[ alphaAnzahl ] )
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
-    int alpha = ( ( f >> 24 ) & 0xFF );
-    int na = ( 0x100 - alpha );
-    int i1 = ( alpha * ( f & 0xFF00FF ) ) >> 8;
-    int i2 = ( alpha * ( f & 0x00FF00 ) ) >> 8;
+    int alpha = ((f >> 24) & 0xFF);
+    int na = (0x100 - alpha);
+    int i1 = (alpha * (f & 0xFF00FF)) >> 8;
+    int i2 = (alpha * (f & 0x00FF00)) >> 8;
     for( int i = x + y * br; end < len; ++end, i += pval )
     {
-        fc[ i ] = ( ( ( ( ( na * ( fc[ i ] & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                    ( ( ( ( na * ( fc[ i ] & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                    ( ( fc[ i ] & 0xFF000000 ) ) ) * ( fc[ i ] != 0 || !alpha3D ) | ( fc[ i ] == 0 && alpha3D ) * f;
+        fc[ i ] = (((((na * (fc[ i ] & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                    ((((na * (fc[ i ] & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                    ((fc[ i ] & 0xFF000000))) * (fc[ i ] != 0 || !alpha3D) | (fc[ i ] == 0 && alpha3D) * f;
     }
     rend = 1;
 }
@@ -801,18 +801,18 @@ void Bild::drawLinieVAlpha( int x, int y, int len, int f ) // zeichnet eine vert
     int end = 0;
     if( alpha[ alphaAnzahl ] )
     {
-        unsigned char *cf = (unsigned char *)&f;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&f;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
-    int alpha = ( ( f >> 24 ) & 0xFF );
-    int na = ( 0x100 - alpha );
-    int i1 = ( alpha * ( f & 0xFF00FF ) ) >> 8;
-    int i2 = ( alpha * ( f & 0x00FF00 ) ) >> 8;
+    int alpha = ((f >> 24) & 0xFF);
+    int na = (0x100 - alpha);
+    int i1 = (alpha * (f & 0xFF00FF)) >> 8;
+    int i2 = (alpha * (f & 0x00FF00)) >> 8;
     for( int i = x + y * br; end < len; ++end, i += pval )
     {
-        fc[ i ] = ( ( ( ( ( na * ( fc[ i ] & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                    ( ( ( ( na * ( fc[ i ] & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                    ( fc[ i ] & 0xFF000000 ) ) * ( fc[ i ] != 0 || !alpha3D ) | ( fc[ i ] == 0 && alpha3D ) * f;
+        fc[ i ] = (((((na * (fc[ i ] & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                    ((((na * (fc[ i ] & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                    (fc[ i ] & 0xFF000000)) * (fc[ i ] != 0 || !alpha3D) | (fc[ i ] == 0 && alpha3D) * f;
     }
     rend = 1;
 }
@@ -835,7 +835,7 @@ void Bild::drawLinieBordered( Punkt a, Punkt b, int bc, int fc )
     {
         int xMax = dSizeA[ doa ].x - 1;
         int yMax = dSizeA[ doa ].y - 1;
-        if( !( outCode1 | outCode2 ) )
+        if( !(outCode1 | outCode2) )
         {
             ok = 1;
             break;
@@ -848,22 +848,22 @@ void Bild::drawLinieBordered( Punkt a, Punkt b, int bc, int fc )
             char outCodeOut = outCode1 ? outCode1 : outCode2;
             if( outCodeOut & 8 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( yMax - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (yMax - a.y) / (b.y - a.y) + 0.5);
                 y = yMax;
             }
             else if( outCodeOut & 4 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( dPosA[ doa ].y - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (dPosA[ doa ].y - a.y) / (b.y - a.y) + 0.5);
                 y = dPosA[ doa ].y;
             }
             else if( outCodeOut & 2 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( xMax - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (xMax - a.x) / (b.x - a.x) + 0.5);
                 x = xMax;
             }
             else if( outCodeOut & 1 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( dPosA[ doa ].x - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (dPosA[ doa ].x - a.x) / (b.x - a.x) + 0.5);
                 x = dPosA[ doa ].x;
             }
             if( outCodeOut == outCode1 )
@@ -884,32 +884,32 @@ void Bild::drawLinieBordered( Punkt a, Punkt b, int bc, int fc )
     {
         int xlen = b.x - a.x, axlen = abs( xlen );
         int ylen = b.y - a.y, aylen = abs( ylen );
-        double xf = (double)xlen / ( aylen ? aylen : 1 );
-        double yf = (double)ylen / ( axlen ? axlen : 1 );
+        double xf = (double)xlen / (aylen ? aylen : 1);
+        double yf = (double)ylen / (axlen ? axlen : 1);
         if( axlen > aylen )
             xf = xf < 0 ? -1 : 1;
         else
             yf = yf < 0 ? -1 : 1;
         double x = (double)a.x, y = (double)a.y;
-        int maxP = (int)( sqrt( (float)( xlen * xlen + ylen * ylen ) ) + 0.5 );
+        int maxP = (int)(sqrt( (float)(xlen * xlen + ylen * ylen) ) + 0.5);
         int count = 0;
         int maxPixel = size.x * size.y;
-        while( !( (int)( x + 0.5 ) == b.x && (int)( y + 0.5 ) == b.y ) && count < maxP )
+        while( !((int)(x + 0.5) == b.x && (int)(y + 0.5) == b.y) && count < maxP )
         {
             ++count;
-            this->fc[ (int)( (int)( x + 0.5 ) + (int)( y + 0.5 ) * size.x ) ] = fc;
-            if( (int)( (int)( x - 0.5 ) + (int)( y + 0.5 ) * size.x ) < maxPixel &&
-                this->fc[ (int)( (int)( x - 0.5 ) + (int)( y + 0.5 ) * size.x ) ] != fc )
-                this->fc[ (int)( (int)( x - 0.5 ) + (int)( y + 0.5 ) * size.x ) ] = bc;
-            if( (int)( (int)( x + 1.5 ) + (int)( y + 0.5 ) * size.x ) < maxPixel &&
-                this->fc[ (int)( (int)( x + 1.5 ) + (int)( y + 0.5 ) * size.x ) ] != fc )
-                this->fc[ (int)( (int)( x + 1.5 ) + (int)( y + 0.5 ) * size.x ) ] = bc;
-            if( (int)( (int)( x + 0.5 ) + (int)( y - 0.5 ) * size.x ) < maxPixel &&
-                this->fc[ (int)( (int)( x + 0.5 ) + (int)( y - 0.5 ) * size.x ) ] != fc )
-                this->fc[ (int)( (int)( x + 0.5 ) + (int)( y - 0.5 ) * size.x ) ] = bc;
-            if( (int)( (int)( x + 0.5 ) + (int)( y + 1.5 ) * size.x ) < maxPixel &&
-                this->fc[ (int)( (int)( x + 0.5 ) + (int)( y + 1.5 ) * size.x ) ] != fc )
-                this->fc[ (int)( (int)( x + 0.5 ) + (int)( y + 1.5 ) * size.x ) ] = bc;
+            this->fc[ (int)((int)(x + 0.5) + (int)(y + 0.5) * size.x) ] = fc;
+            if( (int)((int)(x - 0.5) + (int)(y + 0.5) * size.x) < maxPixel &&
+                this->fc[ (int)((int)(x - 0.5) + (int)(y + 0.5) * size.x) ] != fc )
+                this->fc[ (int)((int)(x - 0.5) + (int)(y + 0.5) * size.x) ] = bc;
+            if( (int)((int)(x + 1.5) + (int)(y + 0.5) * size.x) < maxPixel &&
+                this->fc[ (int)((int)(x + 1.5) + (int)(y + 0.5) * size.x) ] != fc )
+                this->fc[ (int)((int)(x + 1.5) + (int)(y + 0.5) * size.x) ] = bc;
+            if( (int)((int)(x + 0.5) + (int)(y - 0.5) * size.x) < maxPixel &&
+                this->fc[ (int)((int)(x + 0.5) + (int)(y - 0.5) * size.x) ] != fc )
+                this->fc[ (int)((int)(x + 0.5) + (int)(y - 0.5) * size.x) ] = bc;
+            if( (int)((int)(x + 0.5) + (int)(y + 1.5) * size.x) < maxPixel &&
+                this->fc[ (int)((int)(x + 0.5) + (int)(y + 1.5) * size.x) ] != fc )
+                this->fc[ (int)((int)(x + 0.5) + (int)(y + 1.5) * size.x) ] = bc;
             x += xf, y += yf;
         }
         rend = 1;
@@ -929,7 +929,7 @@ void Bild::drawLinieBorderedAlpha( Punkt a, Punkt b, int bc, int fc )
     {
         int xMax = dSizeA[ doa ].x - 1;
         int yMax = dSizeA[ doa ].y - 1;
-        if( !( outCode1 | outCode2 ) )
+        if( !(outCode1 | outCode2) )
         {
             ok = 1;
             break;
@@ -942,22 +942,22 @@ void Bild::drawLinieBorderedAlpha( Punkt a, Punkt b, int bc, int fc )
             char outCodeOut = outCode1 ? outCode1 : outCode2;
             if( outCodeOut & 8 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( yMax - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (yMax - a.y) / (b.y - a.y) + 0.5);
                 y = yMax;
             }
             else if( outCodeOut & 4 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( dPosA[ doa ].y - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (dPosA[ doa ].y - a.y) / (b.y - a.y) + 0.5);
                 y = dPosA[ doa ].y;
             }
             else if( outCodeOut & 2 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( xMax - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (xMax - a.x) / (b.x - a.x) + 0.5);
                 x = xMax;
             }
             else if( outCodeOut & 1 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( dPosA[ doa ].x - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (dPosA[ doa ].x - a.x) / (b.x - a.x) + 0.5);
                 x = dPosA[ doa ].x;
             }
             if( outCodeOut == outCode1 )
@@ -978,8 +978,8 @@ void Bild::drawLinieBorderedAlpha( Punkt a, Punkt b, int bc, int fc )
     {
         int xlen = b.x - a.x, axlen = abs( xlen );
         int ylen = b.y - a.y, aylen = abs( ylen );
-        double xf = (double)xlen / ( aylen ? aylen : 1 );
-        double yf = (double)ylen / ( axlen ? axlen : 1 );
+        double xf = (double)xlen / (aylen ? aylen : 1);
+        double yf = (double)ylen / (axlen ? axlen : 1);
         if( axlen > aylen )
             xf = xf < 0 ? -1 : 1;
         else
@@ -987,61 +987,61 @@ void Bild::drawLinieBorderedAlpha( Punkt a, Punkt b, int bc, int fc )
         double x = (double)a.x, y = (double)a.y;
         if( alpha[ alphaAnzahl ] )
         {
-            unsigned char *cf = (unsigned char *)&fc;
-            cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
-        }
-        int maxP = (int)( sqrt( (float)( xlen * xlen + ylen * ylen ) ) + 0.5 );
-        int alpha = ( ( fc >> 24 ) & 0xFF );
-        int alpha2 = ( ( bc >> 24 ) & 0xFF );
-        int na = ( 0x100 - alpha );
-        int na2 = ( 0x100 - alpha2 );
-        int i1 = ( alpha * ( fc & 0xFF00FF ) ) >> 8;
-        int i2 = ( alpha * ( fc & 0x00FF00 ) ) >> 8;
-        int j1 = ( alpha2 * ( bc & 0xFF00FF ) ) >> 8;
-        int j2 = ( alpha2 * ( bc & 0x00FF00 ) ) >> 8;
+            unsigned char* cf = (unsigned char*)&fc;
+            cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
+        }
+        int maxP = (int)(sqrt( (float)(xlen * xlen + ylen * ylen) ) + 0.5);
+        int alpha = ((fc >> 24) & 0xFF);
+        int alpha2 = ((bc >> 24) & 0xFF);
+        int na = (0x100 - alpha);
+        int na2 = (0x100 - alpha2);
+        int i1 = (alpha * (fc & 0xFF00FF)) >> 8;
+        int i2 = (alpha * (fc & 0x00FF00)) >> 8;
+        int j1 = (alpha2 * (bc & 0xFF00FF)) >> 8;
+        int j2 = (alpha2 * (bc & 0x00FF00)) >> 8;
         int count = 0;
         int maxPixel = size.x * size.y;
-        while( !( (int)( x + 0.5 ) == b.x && (int)( y + 0.5 ) == b.y ) && count < maxP )
+        while( !((int)(x + 0.5) == b.x && (int)(y + 0.5) == b.y) && count < maxP )
         {
             ++count;
-            if( (int)( (int)( x - 0.5 ) + (int)( y + 0.5 ) * size.x ) < maxPixel )
+            if( (int)((int)(x - 0.5) + (int)(y + 0.5) * size.x) < maxPixel )
             {
-                int &pixel = this->fc[ (int)( x - 0.5 ) + (int)( y + 0.5 ) * size.x ];
-                pixel = ( ( ( ( ( na2 * ( pixel & 0xFF00FF ) ) >> 8 ) + j1 ) & 0xFF00FF ) |
-                          ( ( ( ( na2 * ( pixel & 0x00FF00 ) ) >> 8 ) + j2 ) & 0x00FF00 ) |
-                          ( pixel & 0xFF000000 ) ) * ( pixel != 0 || !alpha3D ) | ( pixel == 0 && alpha3D ) * bc;
+                int& pixel = this->fc[ (int)(x - 0.5) + (int)(y + 0.5) * size.x ];
+                pixel = (((((na2 * (pixel & 0xFF00FF)) >> 8) + j1) & 0xFF00FF) |
+                          ((((na2 * (pixel & 0x00FF00)) >> 8) + j2) & 0x00FF00) |
+                          (pixel & 0xFF000000)) * (pixel != 0 || !alpha3D) | (pixel == 0 && alpha3D) * bc;
             }
-            if( (int)( (int)( x + 1.5 ) + (int)( y + 0.5 ) * size.x ) < maxPixel )
+            if( (int)((int)(x + 1.5) + (int)(y + 0.5) * size.x) < maxPixel )
             {
-                int &pixel = this->fc[ (int)( x + 1.5 ) + (int)( y + 0.5 ) * size.x ];
-                pixel = ( ( ( ( ( na2 * ( pixel & 0xFF00FF ) ) >> 8 ) + j1 ) & 0xFF00FF ) |
-                          ( ( ( ( na2 * ( pixel & 0x00FF00 ) ) >> 8 ) + j2 ) & 0x00FF00 ) |
-                          ( pixel & 0xFF000000 ) ) * ( pixel != 0 || !alpha3D ) | ( pixel == 0 && alpha3D ) * bc;
+                int& pixel = this->fc[ (int)(x + 1.5) + (int)(y + 0.5) * size.x ];
+                pixel = (((((na2 * (pixel & 0xFF00FF)) >> 8) + j1) & 0xFF00FF) |
+                          ((((na2 * (pixel & 0x00FF00)) >> 8) + j2) & 0x00FF00) |
+                          (pixel & 0xFF000000)) * (pixel != 0 || !alpha3D) | (pixel == 0 && alpha3D) * bc;
             }
-            if( (int)( (int)( x + 0.5 ) + (int)( y - 0.5 ) * size.x ) < maxPixel )
+            if( (int)((int)(x + 0.5) + (int)(y - 0.5) * size.x) < maxPixel )
             {
-                int &pixel = this->fc[ (int)( x + 0.5 ) + (int)( y - 0.5 ) * size.x ];
-                pixel = ( ( ( ( ( na2 * ( pixel & 0xFF00FF ) ) >> 8 ) + j1 ) & 0xFF00FF ) |
-                          ( ( ( ( na2 * ( pixel & 0x00FF00 ) ) >> 8 ) + j2 ) & 0x00FF00 ) |
-                          ( pixel & 0xFF000000 ) ) * ( pixel != 0 || !alpha3D ) | ( pixel == 0 && alpha3D ) * bc;
+                int& pixel = this->fc[ (int)(x + 0.5) + (int)(y - 0.5) * size.x ];
+                pixel = (((((na2 * (pixel & 0xFF00FF)) >> 8) + j1) & 0xFF00FF) |
+                          ((((na2 * (pixel & 0x00FF00)) >> 8) + j2) & 0x00FF00) |
+                          (pixel & 0xFF000000)) * (pixel != 0 || !alpha3D) | (pixel == 0 && alpha3D) * bc;
             }
-            if( (int)( (int)( x + 0.5 ) + (int)( y + 1.5 ) * size.x ) < maxPixel )
+            if( (int)((int)(x + 0.5) + (int)(y + 1.5) * size.x) < maxPixel )
             {
-                int &pixel = this->fc[ (int)( x + 0.5 ) + (int)( y + 1.5 ) * size.x ];
-                pixel = ( ( ( ( ( na2 * ( pixel & 0xFF00FF ) ) >> 8 ) + j1 ) & 0xFF00FF ) |
-                          ( ( ( ( na2 * ( pixel & 0x00FF00 ) ) >> 8 ) + j2 ) & 0x00FF00 ) |
-                          ( pixel & 0xFF000000 ) ) * ( pixel != 0 || !alpha3D ) | ( pixel == 0 && alpha3D ) * bc;
+                int& pixel = this->fc[ (int)(x + 0.5) + (int)(y + 1.5) * size.x ];
+                pixel = (((((na2 * (pixel & 0xFF00FF)) >> 8) + j1) & 0xFF00FF) |
+                          ((((na2 * (pixel & 0x00FF00)) >> 8) + j2) & 0x00FF00) |
+                          (pixel & 0xFF000000)) * (pixel != 0 || !alpha3D) | (pixel == 0 && alpha3D) * bc;
             }
             x += xf, y += yf;
         }
         count = 0;
-        while( !( (int)( x + 0.5 ) == b.x && (int)( y + 0.5 ) == b.y ) && count < maxP )
+        while( !((int)(x + 0.5) == b.x && (int)(y + 0.5) == b.y) && count < maxP )
         {
             ++count;
-            int &pixel = this->fc[ (int)( x + 0.5 ) + (int)( y + 0.5 ) * size.x ];
-            pixel = ( ( ( ( ( na * ( pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                      ( ( ( ( na * ( pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                      ( pixel & 0xFF000000 ) ) * ( pixel != 0 || !alpha3D ) | ( pixel == 0 && alpha3D ) * fc;
+            int& pixel = this->fc[ (int)(x + 0.5) + (int)(y + 0.5) * size.x ];
+            pixel = (((((na * (pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                      ((((na * (pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                      (pixel & 0xFF000000)) * (pixel != 0 || !alpha3D) | (pixel == 0 && alpha3D) * fc;
             x += xf, y += yf;
         }
         rend = 1;
@@ -1066,7 +1066,7 @@ void Bild::drawLinie( Punkt a, Punkt b, int fc ) // zeichnet eine Linie von Punk
     {
         int xMax = dSizeA[ doa ].x - 1;
         int yMax = dSizeA[ doa ].y - 1;
-        if( !( outCode1 | outCode2 ) )
+        if( !(outCode1 | outCode2) )
         {
             ok = 1;
             break;
@@ -1079,22 +1079,22 @@ void Bild::drawLinie( Punkt a, Punkt b, int fc ) // zeichnet eine Linie von Punk
             char outCodeOut = outCode1 ? outCode1 : outCode2;
             if( outCodeOut & 8 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( yMax - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (yMax - a.y) / (b.y - a.y) + 0.5);
                 y = yMax;
             }
             else if( outCodeOut & 4 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( dPosA[ doa ].y - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (dPosA[ doa ].y - a.y) / (b.y - a.y) + 0.5);
                 y = dPosA[ doa ].y;
             }
             else if( outCodeOut & 2 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( xMax - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (xMax - a.x) / (b.x - a.x) + 0.5);
                 x = xMax;
             }
             else if( outCodeOut & 1 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( dPosA[ doa ].x - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (dPosA[ doa ].x - a.x) / (b.x - a.x) + 0.5);
                 x = dPosA[ doa ].x;
             }
             if( outCodeOut == outCode1 )
@@ -1115,19 +1115,19 @@ void Bild::drawLinie( Punkt a, Punkt b, int fc ) // zeichnet eine Linie von Punk
     {
         int xlen = b.x - a.x, axlen = abs( xlen );
         int ylen = b.y - a.y, aylen = abs( ylen );
-        double xf = (double)xlen / ( aylen ? aylen : 1 );
-        double yf = (double)ylen / ( axlen ? axlen : 1 );
+        double xf = (double)xlen / (aylen ? aylen : 1);
+        double yf = (double)ylen / (axlen ? axlen : 1);
         if( axlen > aylen )
             xf = xf < 0 ? -1 : 1;
         else
             yf = yf < 0 ? -1 : 1;
         double x = (double)a.x, y = (double)a.y;
-        int maxP = (int)( sqrt( (float)( xlen * xlen + ylen * ylen ) ) + 0.5 );
+        int maxP = (int)(sqrt( (float)(xlen * xlen + ylen * ylen) ) + 0.5);
         int count = 0;
-        while( !( (int)( x + 0.5 ) == b.x && (int)( y + 0.5 ) == b.y ) && count < maxP )
+        while( !((int)(x + 0.5) == b.x && (int)(y + 0.5) == b.y) && count < maxP )
         {
             ++count;
-            this->fc[ (int)( (int)( x + 0.5 ) + (int)( y + 0.5 ) * size.x ) ] = fc;
+            this->fc[ (int)((int)(x + 0.5) + (int)(y + 0.5) * size.x) ] = fc;
             x += xf, y += yf;
         }
         rend = 1;
@@ -1147,7 +1147,7 @@ void Bild::drawLinieAlpha( Punkt a, Punkt b, int fc )
     {
         int xMax = dSizeA[ doa ].x - 1;
         int yMax = dSizeA[ doa ].y - 1;
-        if( !( outCode1 | outCode2 ) )
+        if( !(outCode1 | outCode2) )
         {
             ok = 1;
             break;
@@ -1160,22 +1160,22 @@ void Bild::drawLinieAlpha( Punkt a, Punkt b, int fc )
             char outCodeOut = outCode1 ? outCode1 : outCode2;
             if( outCodeOut & 8 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( yMax - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (yMax - a.y) / (b.y - a.y) + 0.5);
                 y = yMax;
             }
             else if( outCodeOut & 4 )
             {
-                x = (int)( a.x + ( b.x - a.x ) * ( dPosA[ doa ].y - a.y ) / ( b.y - a.y ) + 0.5 );
+                x = (int)(a.x + (b.x - a.x) * (dPosA[ doa ].y - a.y) / (b.y - a.y) + 0.5);
                 y = dPosA[ doa ].y;
             }
             else if( outCodeOut & 2 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( xMax - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (xMax - a.x) / (b.x - a.x) + 0.5);
                 x = xMax;
             }
             else if( outCodeOut & 1 )
             {
-                y = (int)( a.y + ( b.y - a.y ) * ( dPosA[ doa ].x - a.x ) / ( b.x - a.x ) + 0.5 );
+                y = (int)(a.y + (b.y - a.y) * (dPosA[ doa ].x - a.x) / (b.x - a.x) + 0.5);
                 x = dPosA[ doa ].x;
             }
             if( outCodeOut == outCode1 )
@@ -1196,8 +1196,8 @@ void Bild::drawLinieAlpha( Punkt a, Punkt b, int fc )
     {
         int xlen = b.x - a.x, axlen = abs( xlen );
         int ylen = b.y - a.y, aylen = abs( ylen );
-        double xf = (double)xlen / ( aylen ? aylen : 1 );
-        double yf = (double)ylen / ( axlen ? axlen : 1 );
+        double xf = (double)xlen / (aylen ? aylen : 1);
+        double yf = (double)ylen / (axlen ? axlen : 1);
         if( axlen > aylen )
             xf = xf < 0 ? -1 : 1;
         else
@@ -1205,22 +1205,22 @@ void Bild::drawLinieAlpha( Punkt a, Punkt b, int fc )
         double x = (double)a.x, y = (double)a.y;
         if( alpha[ alphaAnzahl ] )
         {
-            unsigned char *cf = (unsigned char *)&fc;
-            cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+            unsigned char* cf = (unsigned char*)&fc;
+            cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
         }
-        int maxP = (int)( sqrt( (float)( xlen * xlen + ylen * ylen ) ) + 0.5 );
+        int maxP = (int)(sqrt( (float)(xlen * xlen + ylen * ylen) ) + 0.5);
         int count = 0;
-        int alpha = ( ( fc >> 24 ) & 0xFF );
-        int na = ( 0x100 - alpha );
-        int i1 = ( alpha * ( fc & 0xFF00FF ) ) >> 8;
-        int i2 = ( alpha * ( fc & 0x00FF00 ) ) >> 8;
-        while( !( (int)( x + 0.5 ) == b.x && (int)( y + 0.5 ) == b.y ) && count < maxP )
+        int alpha = ((fc >> 24) & 0xFF);
+        int na = (0x100 - alpha);
+        int i1 = (alpha * (fc & 0xFF00FF)) >> 8;
+        int i2 = (alpha * (fc & 0x00FF00)) >> 8;
+        while( !((int)(x + 0.5) == b.x && (int)(y + 0.5) == b.y) && count < maxP )
         {
             ++count;
-            int &pixel = this->fc[ (int)( x + 0.5 ) + (int)( y + 0.5 ) * size.x ];
-            pixel = ( ( ( ( ( na * ( pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                      ( ( ( ( na * ( pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                      ( pixel & 0xFF000000 ) ) * ( pixel != 0 || !alpha3D ) | ( pixel == 0 && alpha3D ) * fc;
+            int& pixel = this->fc[ (int)(x + 0.5) + (int)(y + 0.5) * size.x ];
+            pixel = (((((na * (pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                      ((((na * (pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                      (pixel & 0xFF000000)) * (pixel != 0 || !alpha3D) | (pixel == 0 && alpha3D) * fc;
             x += xf, y += yf;
         }
         rend = 1;
@@ -1254,23 +1254,23 @@ void Bild::drawKreis( int xOff, int yOff, int r, int fc ) // zeichnet einen Krei
         return;
     for( int a = 0; a < r; ++a )
     {
-        int b = (int)( sqrt( (float)(long)( r * r - a * a ) ) + 0.5 );
+        int b = (int)(sqrt( (float)(long)(r * r - a * a) ) + 0.5);
         if( xOff + a < dgx && xOff + a > dpx && yOff + b < dgy && yOff + b > dpy )
-            this->fc[ xOff + a + ( yOff + b ) * size.x ] = fc;
+            this->fc[ xOff + a + (yOff + b) * size.x ] = fc;
         if( xOff - a < dgx && xOff - a > dpx && yOff + b < dgy && yOff + b > dpy )
-            this->fc[ xOff - a + ( yOff + b ) * size.x ] = fc;
+            this->fc[ xOff - a + (yOff + b) * size.x ] = fc;
         if( xOff + a < dgx && xOff + a > dpx && yOff - b < dgy && yOff - b > dpy )
-            this->fc[ xOff + a + ( yOff - b ) * size.x ] = fc;
+            this->fc[ xOff + a + (yOff - b) * size.x ] = fc;
         if( xOff - a < dgx && xOff - a > dpx && yOff - b < dgy && yOff - b > dpy )
-            this->fc[ xOff - a + ( yOff - b ) * size.x ] = fc;
+            this->fc[ xOff - a + (yOff - b) * size.x ] = fc;
         if( xOff + b < dgx && xOff + b > dpx && yOff + a < dgy && yOff + a > dpy )
-            this->fc[ xOff + b + ( yOff + a ) * size.x ] = fc;
+            this->fc[ xOff + b + (yOff + a) * size.x ] = fc;
         if( xOff - b < dgx && xOff - b > dpx && yOff + a < dgy && yOff + a > dpy )
-            this->fc[ xOff - b + ( yOff + a ) * size.x ] = fc;
+            this->fc[ xOff - b + (yOff + a) * size.x ] = fc;
         if( xOff + b < dgx && xOff + b > dpx && yOff - a < dgy && yOff - a > dpy )
-            this->fc[ xOff + b + ( yOff - a ) * size.x ] = fc;
+            this->fc[ xOff + b + (yOff - a) * size.x ] = fc;
         if( xOff - b < dgx && xOff - b > dpx && yOff - a < dgy && yOff - a > dpy )
-            this->fc[ xOff - b + ( yOff - a ) * size.x ] = fc;
+            this->fc[ xOff - b + (yOff - a) * size.x ] = fc;
     }
     rend = 1;
 }
@@ -1289,78 +1289,78 @@ void Bild::drawKreisAlpha( int xOff, int yOff, int r, int fc )
         return;
     if( alpha[ alphaAnzahl ] < 0xFF )
     {
-        unsigned char *cf = (unsigned char *)&fc;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&fc;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
-    int alpha = ( ( fc >> 24 ) & 0xFF );
-    int na = ( 0x100 - alpha );
-    int i1 = ( alpha * ( fc & 0xFF00FF ) ) >> 8;
-    int i2 = ( alpha * ( fc & 0x00FF00 ) ) >> 8;
+    int alpha = ((fc >> 24) & 0xFF);
+    int na = (0x100 - alpha);
+    int i1 = (alpha * (fc & 0xFF00FF)) >> 8;
+    int i2 = (alpha * (fc & 0x00FF00)) >> 8;
     for( int a = 0; a < r; ++a )
     {
-        int b = (int)( sqrt( (float)(long)( r * r - a * a ) ) + 0.5 );
-        int *pixel = 0;
+        int b = (int)(sqrt( (float)(long)(r * r - a * a) ) + 0.5);
+        int* pixel = 0;
         if( xOff + a < dgx && xOff + a > dpx && yOff + b < dgy && yOff + b > dpy )
         {
-            pixel = &this->fc[ xOff + a + ( yOff + b ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff + a + (yOff + b) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff - a < dgx && xOff - a > dpx && yOff + b < dgy && yOff + b > dpy )
         {
-            pixel = &this->fc[ xOff - a + ( yOff + b ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff - a + (yOff + b) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff + a < dgx && xOff + a > dpx && yOff - b < dgy && yOff - b > dpy )
         {
-            pixel = &this->fc[ xOff + a + ( yOff - b ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff + a + (yOff - b) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff - a < dgx && xOff - a > dpx && yOff - b < dgy && yOff - b > dpy )
         {
-            pixel = &this->fc[ xOff - a + ( yOff - b ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff - a + (yOff - b) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff + b < dgx && xOff + b > dpx && yOff + a < dgy && yOff + a > dpy )
         {
-            pixel = &this->fc[ xOff + b + ( yOff + a ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff + b + (yOff + a) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff - b < dgx && xOff - b > dpx && yOff + a < dgy && yOff + a > dpy )
         {
-            pixel = &this->fc[ xOff - b + ( yOff + a ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff - b + (yOff + a) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff + b < dgx && xOff + b > dpx && yOff - a < dgy && yOff - a > dpy )
         {
-            pixel = &this->fc[ xOff + b + ( yOff - a ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff + b + (yOff - a) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
         if( xOff - b < dgx && xOff - b > dpx && yOff - a < dgy && yOff - a > dpy )
         {
-            pixel = &this->fc[ xOff - b + ( yOff - a ) * size.x ];
-            *pixel = ( ( ( ( ( na * ( *pixel & 0xFF00FF ) ) >> 8 ) + i1 ) & 0xFF00FF ) |
-                       ( ( ( ( na * ( *pixel & 0x00FF00 ) ) >> 8 ) + i2 ) & 0x00FF00 ) |
-                       ( *pixel & 0xFF000000 ) ) * ( *pixel != 0 || !alpha3D ) | ( *pixel == 0 && alpha3D ) * fc;
+            pixel = &this->fc[ xOff - b + (yOff - a) * size.x ];
+            *pixel = (((((na * (*pixel & 0xFF00FF)) >> 8) + i1) & 0xFF00FF) |
+                       ((((na * (*pixel & 0x00FF00)) >> 8) + i2) & 0x00FF00) |
+                       (*pixel & 0xFF000000)) * (*pixel != 0 || !alpha3D) | (*pixel == 0 && alpha3D) * fc;
         }
     }
     rend = 1;
 }
 
-void Bild::drawBild( int x, int y, int br, int hi, Bild &zBild ) // zeichet zBild
+void Bild::drawBild( int x, int y, int br, int hi, Bild& zBild ) // zeichet zBild
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1386,19 +1386,19 @@ void Bild::drawBild( int x, int y, int br, int hi, Bild &zBild ) // zeichet zBil
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     int xx, ygr, ygr2;
     for( int yy = yst2; yy < dgy; ++yy )
     {
         ygr = yy * size.x;
-        ygr2 = ( yy - yst2 + yst ) * bb;
+        ygr2 = (yy - yst2 + yst) * bb;
         for( xx = xst2; xx < dgx; ++xx )
-            fc[ xx + ygr ] = ff[ ( xx - xst2 + xst ) + ygr2 ];
+            fc[ xx + ygr ] = ff[ (xx - xst2 + xst) + ygr2 ];
     }
     rend = 1;
 }
 
-void Bild::alphaBildAssoz( int x, int y, int br, int hi, Bild &zBild )
+void Bild::alphaBildAssoz( int x, int y, int br, int hi, Bild& zBild )
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1419,16 +1419,16 @@ void Bild::alphaBildAssoz( int x, int y, int br, int hi, Bild &zBild )
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     if( !alpha[ alphaAnzahl ] )
     {
         int xx, ygr, ygr2;
         for( int yy = yst2; yy < dgy; ++yy )
         {
             ygr = yy * size.x;
-            ygr2 = ( yy - yst2 + yst ) * bb;
+            ygr2 = (yy - yst2 + yst) * bb;
             for( xx = xst2; xx < dgx; ++xx )
-                alphaPixelAssozP( fc[ xx + ygr ], ff[ ( xx - xst2 + xst ) + ygr2 ] );
+                alphaPixelAssozP( fc[ xx + ygr ], ff[ (xx - xst2 + xst) + ygr2 ] );
         }
     }
     else
@@ -1437,12 +1437,12 @@ void Bild::alphaBildAssoz( int x, int y, int br, int hi, Bild &zBild )
         for( int yy = yst2; yy < dgy; ++yy )
         {
             ygr = yy * size.x;
-            ygr2 = ( yy - yst2 + yst ) * bb;
+            ygr2 = (yy - yst2 + yst) * bb;
             for( xx = xst2; xx < dgx; ++xx )
             {
-                int fc = ff[ ( xx - xst2 + xst ) + ygr2 ];
-                unsigned char *cf = (unsigned char *)&fc;
-                cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                int fc = ff[ (xx - xst2 + xst) + ygr2 ];
+                unsigned char* cf = (unsigned char*)&fc;
+                cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                 alphaPixelAssozP( this->fc[ xx + ygr ], fc );
             }
         }
@@ -1450,7 +1450,7 @@ void Bild::alphaBildAssoz( int x, int y, int br, int hi, Bild &zBild )
     rend = 1;
 }
 
-void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
+void Bild::alphaBild( int x, int y, int br, int hi, Bild& zBild )
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1471,7 +1471,7 @@ void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     if( !alpha[ alphaAnzahl ] )
     {
         int xx, ygr, ygr2;
@@ -1480,7 +1480,7 @@ void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ygr2 = ( yy - yst2 + yst ) * bb;
+                ygr2 = (yy - yst2 + yst) * bb;
                 int fci = xst2 + ygr;
                 int ffi = xst + ygr2;
                 for( xx = xst2; xx < dgx; ++xx, ++fci, ++ffi )
@@ -1492,7 +1492,7 @@ void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ygr2 = ( yy - yst2 + yst ) * bb;
+                ygr2 = (yy - yst2 + yst) * bb;
                 int fci = xst2 + ygr;
                 int ffi = xst + ygr2;
                 for( xx = xst2; xx < dgx; ++xx, ++fci, ++ffi )
@@ -1508,12 +1508,12 @@ void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ygr2 = ( yy - yst2 + yst ) * bb;
+                ygr2 = (yy - yst2 + yst) * bb;
                 for( xx = xst2; xx < dgx; ++xx )
                 {
-                    int fc = ff[ ( xx - xst2 + xst ) + ygr2 ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (xx - xst2 + xst) + ygr2 ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP( this->fc[ xx + ygr ], fc );
                 }
             }
@@ -1523,12 +1523,12 @@ void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ygr2 = ( yy - yst2 + yst ) * bb;
+                ygr2 = (yy - yst2 + yst) * bb;
                 for( xx = xst2; xx < dgx; ++xx )
                 {
-                    int fc = ff[ ( xx - xst2 + xst ) + ygr2 ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (xx - xst2 + xst) + ygr2 ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP3D( this->fc[ xx + ygr ], fc );
                 }
             }
@@ -1537,7 +1537,7 @@ void Bild::alphaBild( int x, int y, int br, int hi, Bild &zBild )
     rend = 1;
 }
 
-void Bild::drawBild90( int x, int y, int br, int hi, Bild &zBild ) // Zeichnet ein um 90 Grad nach rchts gedrehtes Bild
+void Bild::drawBild90( int x, int y, int br, int hi, Bild& zBild ) // Zeichnet ein um 90 Grad nach rchts gedrehtes Bild
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1563,18 +1563,18 @@ void Bild::drawBild90( int x, int y, int br, int hi, Bild &zBild ) // Zeichnet e
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     int yy, xbb;
     for( int xx = xst2; xx < dgx; ++xx )
     {
-        xbb = ( zBild.getHeight() - ( xx - xst2 + xst + 1 ) ) * bb;
+        xbb = (zBild.getHeight() - (xx - xst2 + xst + 1)) * bb;
         for( yy = yst2; yy < dgy; ++yy )
-            fc[ xx + yy * size.x ] = ff[ ( yy - yst2 + yst ) + xbb ];
+            fc[ xx + yy * size.x ] = ff[ (yy - yst2 + yst) + xbb ];
     }
     rend = 1;
 }
 
-void Bild::alphaBild90( int x, int y, int br, int hi, Bild &zBild )
+void Bild::alphaBild90( int x, int y, int br, int hi, Bild& zBild )
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1595,7 +1595,7 @@ void Bild::alphaBild90( int x, int y, int br, int hi, Bild &zBild )
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     if( !alpha[ alphaAnzahl ] )
     {
         int yy, xbb;
@@ -1603,18 +1603,18 @@ void Bild::alphaBild90( int x, int y, int br, int hi, Bild &zBild )
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( zBild.getHeight() - ( xx - xst2 + xst + 1 ) ) * bb;
+                xbb = (zBild.getHeight() - (xx - xst2 + xst + 1)) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
-                    alphaPixelP3D( xx, yy, ff[ ( yy - yst2 + yst ) + xbb ] );
+                    alphaPixelP3D( xx, yy, ff[ (yy - yst2 + yst) + xbb ] );
             }
         }
         else
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( zBild.getHeight() - ( xx - xst2 + xst + 1 ) ) * bb;
+                xbb = (zBild.getHeight() - (xx - xst2 + xst + 1)) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
-                    alphaPixelP( xx, yy, ff[ ( yy - yst2 + yst ) + xbb ] );
+                    alphaPixelP( xx, yy, ff[ (yy - yst2 + yst) + xbb ] );
             }
         }
     }
@@ -1625,12 +1625,12 @@ void Bild::alphaBild90( int x, int y, int br, int hi, Bild &zBild )
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( zBild.getHeight() - ( xx - xst2 + xst + 1 ) ) * bb;
+                xbb = (zBild.getHeight() - (xx - xst2 + xst + 1)) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
                 {
-                    int fc = ff[ ( yy - yst2 + yst ) + xbb ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (yy - yst2 + yst) + xbb ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP3D( xx, yy, fc );
                 }
             }
@@ -1639,12 +1639,12 @@ void Bild::alphaBild90( int x, int y, int br, int hi, Bild &zBild )
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( zBild.getHeight() - ( xx - xst2 + xst + 1 ) ) * bb;
+                xbb = (zBild.getHeight() - (xx - xst2 + xst + 1)) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
                 {
-                    int fc = ff[ ( yy - yst2 + yst ) + xbb ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (yy - yst2 + yst) + xbb ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP( xx, yy, fc );
                 }
             }
@@ -1653,7 +1653,7 @@ void Bild::alphaBild90( int x, int y, int br, int hi, Bild &zBild )
     rend = 1;
 }
 
-void Bild::drawBild180( int x, int y, int br, int hi, Bild &zBild ) // Zeichnet ein um 180 Grad nach rchts gedrehtes Bild
+void Bild::drawBild180( int x, int y, int br, int hi, Bild& zBild ) // Zeichnet ein um 180 Grad nach rchts gedrehtes Bild
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1679,19 +1679,19 @@ void Bild::drawBild180( int x, int y, int br, int hi, Bild &zBild ) // Zeichnet
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     int xx, ygr, ybb;
     for( int yy = yst2; yy < dgy; ++yy )
     {
         ygr = yy * size.x;
-        ybb = ( zBild.getHeight() - ( yy - yst2 + yst + 1 ) ) * bb;
+        ybb = (zBild.getHeight() - (yy - yst2 + yst + 1)) * bb;
         for( xx = xst2; xx < dgx; ++xx )
-            fc[ xx + ygr ] = ff[ ( bb - ( xx - xst2 + xst + 1 ) ) + ybb ];
+            fc[ xx + ygr ] = ff[ (bb - (xx - xst2 + xst + 1)) + ybb ];
     }
     rend = 1;
 }
 
-void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
+void Bild::alphaBild180( int x, int y, int br, int hi, Bild& zBild )
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1712,7 +1712,7 @@ void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     if( !alpha[ alphaAnzahl ] )
     {
         int xx, ygr, ybb;
@@ -1721,9 +1721,9 @@ void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ybb = ( zBild.getHeight() - ( yy - yst2 + yst + 1 ) ) * bb;
+                ybb = (zBild.getHeight() - (yy - yst2 + yst + 1)) * bb;
                 for( xx = xst2; xx < dgx; ++xx )
-                    alphaPixelP3D( fc[ xx + ygr ], ff[ ( bb - ( xx - xst2 + xst + 1 ) ) + ybb ] );
+                    alphaPixelP3D( fc[ xx + ygr ], ff[ (bb - (xx - xst2 + xst + 1)) + ybb ] );
             }
         }
         else
@@ -1731,9 +1731,9 @@ void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ybb = ( zBild.getHeight() - ( yy - yst2 + yst + 1 ) ) * bb;
+                ybb = (zBild.getHeight() - (yy - yst2 + yst + 1)) * bb;
                 for( xx = xst2; xx < dgx; ++xx )
-                    alphaPixelP( fc[ xx + ygr ], ff[ ( bb - ( xx - xst2 + xst + 1 ) ) + ybb ] );
+                    alphaPixelP( fc[ xx + ygr ], ff[ (bb - (xx - xst2 + xst + 1)) + ybb ] );
             }
         }
     }
@@ -1745,12 +1745,12 @@ void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ybb = ( zBild.getHeight() - ( yy - yst2 + yst + 1 ) ) * bb;
+                ybb = (zBild.getHeight() - (yy - yst2 + yst + 1)) * bb;
                 for( xx = xst2; xx < dgx; ++xx )
                 {
-                    int fc = ff[ ( bb - ( xx - xst2 + xst + 1 ) ) + ybb ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (bb - (xx - xst2 + xst + 1)) + ybb ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP3D( this->fc[ xx + ygr ], fc );
                 }
             }
@@ -1760,12 +1760,12 @@ void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
             for( int yy = yst2; yy < dgy; ++yy )
             {
                 ygr = yy * size.x;
-                ybb = ( zBild.getHeight() - ( yy - yst2 + yst + 1 ) ) * bb;
+                ybb = (zBild.getHeight() - (yy - yst2 + yst + 1)) * bb;
                 for( xx = xst2; xx < dgx; ++xx )
                 {
-                    int fc = ff[ ( bb - ( xx - xst2 + xst + 1 ) ) + ybb ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (bb - (xx - xst2 + xst + 1)) + ybb ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP( this->fc[ xx + ygr ], fc );
                 }
             }
@@ -1774,7 +1774,7 @@ void Bild::alphaBild180( int x, int y, int br, int hi, Bild &zBild )
     rend = 1;
 }
 
-void Bild::drawBild270( int x, int y, int br, int hi, Bild &zBild ) // Zeichnet ein um 270 Grad nach rchts gedrehtes Bild
+void Bild::drawBild270( int x, int y, int br, int hi, Bild& zBild ) // Zeichnet ein um 270 Grad nach rchts gedrehtes Bild
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1800,18 +1800,18 @@ void Bild::drawBild270( int x, int y, int br, int hi, Bild &zBild ) // Zeichnet
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     int yy, xbb;
     for( int xx = xst2; xx < dgx; ++xx )
     {
-        xbb = ( xx - xst2 + xst ) * bb;
+        xbb = (xx - xst2 + xst) * bb;
         for( yy = yst2; yy < dgy; ++yy )
-            fc[ xx + yy * size.x ] = ff[ ( bb - ( yy - yst2 + yst + 1 ) ) + xbb ];
+            fc[ xx + yy * size.x ] = ff[ (bb - (yy - yst2 + yst + 1)) + xbb ];
     }
     rend = 1;
 }
 
-void Bild::alphaBild270( int x, int y, int br, int hi, Bild &zBild )
+void Bild::alphaBild270( int x, int y, int br, int hi, Bild& zBild )
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1832,7 +1832,7 @@ void Bild::alphaBild270( int x, int y, int br, int hi, Bild &zBild )
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     if( !alpha[ alphaAnzahl ] )
     {
         int yy, xbb;
@@ -1840,18 +1840,18 @@ void Bild::alphaBild270( int x, int y, int br, int hi, Bild &zBild )
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( xx - xst2 + xst ) * bb;
+                xbb = (xx - xst2 + xst) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
-                    alphaPixelP3D( xx, yy, ff[ ( bb - ( yy - yst2 + yst + 1 ) ) + xbb ] );
+                    alphaPixelP3D( xx, yy, ff[ (bb - (yy - yst2 + yst + 1)) + xbb ] );
             }
         }
         else
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( xx - xst2 + xst ) * bb;
+                xbb = (xx - xst2 + xst) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
-                    alphaPixelP( xx, yy, ff[ ( bb - ( yy - yst2 + yst + 1 ) ) + xbb ] );
+                    alphaPixelP( xx, yy, ff[ (bb - (yy - yst2 + yst + 1)) + xbb ] );
             }
         }
     }
@@ -1862,12 +1862,12 @@ void Bild::alphaBild270( int x, int y, int br, int hi, Bild &zBild )
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( xx - xst2 + xst ) * bb;
+                xbb = (xx - xst2 + xst) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
                 {
-                    int fc = ff[ ( bb - ( yy - yst2 + yst + 1 ) ) + xbb ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (bb - (yy - yst2 + yst + 1)) + xbb ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP3D( xx, yy, fc );
                 }
             }
@@ -1876,12 +1876,12 @@ void Bild::alphaBild270( int x, int y, int br, int hi, Bild &zBild )
         {
             for( int xx = xst2; xx < dgx; ++xx )
             {
-                xbb = ( xx - xst2 + xst ) * bb;
+                xbb = (xx - xst2 + xst) * bb;
                 for( yy = yst2; yy < dgy; ++yy )
                 {
-                    int fc = ff[ ( bb - ( yy - yst2 + yst + 1 ) ) + xbb ];
-                    unsigned char *cf = (unsigned char *)&fc;
-                    cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                    int fc = ff[ (bb - (yy - yst2 + yst + 1)) + xbb ];
+                    unsigned char* cf = (unsigned char*)&fc;
+                    cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                     alphaPixelP( xx, yy, fc );
                 }
             }
@@ -1890,7 +1890,7 @@ void Bild::alphaBild270( int x, int y, int br, int hi, Bild &zBild )
     rend = 1;
 }
 
-void Bild::drawBildSkall( int x, int y, int br, int hi, Bild &zBild ) // zeichet zBild Skalliert
+void Bild::drawBildSkall( int x, int y, int br, int hi, Bild& zBild ) // zeichet zBild Skalliert
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1916,20 +1916,20 @@ void Bild::drawBildSkall( int x, int y, int br, int hi, Bild &zBild ) // zeichet
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     int xx, ygr, ygr2;
     double xb = 0, yb = yst * yo;
     for( int yy = yst2; yy < dgy; ++yy, yb += yo )
     {
         ygr = yy * size.x;
-        ygr2 = (int)( ( yy - yst2 + yst ) * yo ) * bb;
+        ygr2 = (int)((yy - yst2 + yst) * yo) * bb;
         for( xx = xst2, xb = xst * xo; xx < dgx; ++xx, xb += xo )
             fc[ xx + ygr ] = ff[ (int)xb + ygr2 ];
     }
     rend = 1;
 }
 
-void Bild::alphaBildSkall( int x, int y, int br, int hi, Bild &zBild )
+void Bild::alphaBildSkall( int x, int y, int br, int hi, Bild& zBild )
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -1950,7 +1950,7 @@ void Bild::alphaBildSkall( int x, int y, int br, int hi, Bild &zBild )
     dgx = minInt( x + br, dgx );
     dgy = minInt( y + hi, dgy );
     int bb = zBild.getBreite();
-    int *ff = zBild.getBuffer();
+    int* ff = zBild.getBuffer();
     int xx, ygr, ygr2;
     double xb = 0;
     if( alpha3D )
@@ -1958,12 +1958,12 @@ void Bild::alphaBildSkall( int x, int y, int br, int hi, Bild &zBild )
         for( int yy = yst2; yy < dgy; ++yy )
         {
             ygr = yy * size.x;
-            ygr2 = (int)( ( yy - yst2 + yst ) * yo ) * bb;
+            ygr2 = (int)((yy - yst2 + yst) * yo) * bb;
             for( xx = xst2, xb = xst * xo; xx < dgx; ++xx, xb += xo )
             {
                 int f = ff[ (int)xb + ygr2 ];
-                unsigned char *cf = (unsigned char *)&f;
-                cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                unsigned char* cf = (unsigned char*)&f;
+                cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                 alphaPixelP3D( fc[ xx + ygr ], f );
             }
         }
@@ -1973,12 +1973,12 @@ void Bild::alphaBildSkall( int x, int y, int br, int hi, Bild &zBild )
         for( int yy = yst2; yy < dgy; ++yy )
         {
             ygr = yy * size.x;
-            ygr2 = (int)( ( yy - yst2 + yst ) * yo ) * bb;
+            ygr2 = (int)((yy - yst2 + yst) * yo) * bb;
             for( xx = xst2, xb = xst * xo; xx < dgx; ++xx, xb += xo )
             {
                 int f = ff[ (int)xb + ygr2 ];
-                unsigned char *cf = (unsigned char *)&f;
-                cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+                unsigned char* cf = (unsigned char*)&f;
+                cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
                 alphaPixelP( fc[ xx + ygr ], f );
             }
         }
@@ -2002,8 +2002,8 @@ void Bild::drawDreieck( Punkt a, Punkt b, Punkt c, int farbe ) // f
     a += drawOff[ doa ];
     b += drawOff[ doa ];
     c += drawOff[ doa ];
-    if( ( a.x < dpx && b.x < dpx && c.x < dpx ) || ( a.y < dpy && b.y < dpy && c.y < dpy ) ||
-        ( a.x > dgx && b.x > dgx && c.x > dgx ) || ( a.y > dgy && b.y > dgy && c.y > dgy ) )
+    if( (a.x < dpx && b.x < dpx && c.x < dpx) || (a.y < dpy && b.y < dpy && c.y < dpy) ||
+        (a.x > dgx && b.x > dgx && c.x > dgx) || (a.y > dgy && b.y > dgy && c.y > dgy) )
         return;
     if( b.y < a.y )
         a.Swap( b );
@@ -2015,8 +2015,8 @@ void Bild::drawDreieck( Punkt a, Punkt b, Punkt c, int farbe ) // f
     {
         if( b.x < a.x )
             a.Swap( b );
-        const float m2 = (float)( a.x - c.x ) / (float)( a.y - c.y );
-        const float m3 = (float)( b.x - c.x ) / (float)( b.y - c.y );
+        const float m2 = (float)(a.x - c.x) / (float)(a.y - c.y);
+        const float m3 = (float)(b.x - c.x) / (float)(b.y - c.y);
         float b2 = (float)a.x - m2 * (float)a.y;
         float b3 = (float)b.x - m3 * (float)b.y;
         drawFlatDreieck( b.y, c.y, m2, b2, m3, b3, farbe );
@@ -2025,17 +2025,17 @@ void Bild::drawDreieck( Punkt a, Punkt b, Punkt c, int farbe ) // f
     {
         if( c.x < b.x )
             b.Swap( c );
-        const float m1 = (float)( a.x - b.x ) / (float)( a.y - b.y );
-        const float m2 = (float)( a.x - c.x ) / (float)( a.y - c.y );
+        const float m1 = (float)(a.x - b.x) / (float)(a.y - b.y);
+        const float m2 = (float)(a.x - c.x) / (float)(a.y - c.y);
         float b1 = (float)a.x - m1 * (float)a.y;
         float b2 = (float)a.x - m2 * (float)a.y;
         drawFlatDreieck( a.y, b.y, m1, b1, m2, b2, farbe );
     }
     else
     {
-        const float m1 = (float)( a.x - b.x ) / (float)( a.y - b.y );
-        const float m2 = (float)( a.x - c.x ) / (float)( a.y - c.y );
-        const float m3 = (float)( b.x - c.x ) / (float)( b.y - c.y );
+        const float m1 = (float)(a.x - b.x) / (float)(a.y - b.y);
+        const float m2 = (float)(a.x - c.x) / (float)(a.y - c.y);
+        const float m3 = (float)(b.x - c.x) / (float)(b.y - c.y);
         float b1 = (float)a.x - m1 * (float)a.y;
         float b2 = (float)a.x - m2 * (float)a.y;
         float b3 = (float)b.x - m3 * (float)b.y;
@@ -2054,7 +2054,7 @@ void Bild::drawDreieck( Punkt a, Punkt b, Punkt c, int farbe ) // f
     rend = 1;
 }
 
-void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Punkt tc, Bild &textur ) // füllt eine Dreieck aus
+void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Punkt tc, Bild& textur ) // füllt eine Dreieck aus
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -2070,8 +2070,8 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
     a += drawOff[ doa ];
     b += drawOff[ doa ];
     c += drawOff[ doa ];
-    if( ( a.x < dpx && b.x < dpx && c.x < dpx ) || ( a.y < dpy && b.y < dpy && c.y < dpy ) ||
-        ( a.x > dgx && b.x > dgx && c.x > dgx ) || ( a.y > dgy && b.y > dgy && c.y > dgy ) )
+    if( (a.x < dpx && b.x < dpx && c.x < dpx) || (a.y < dpy && b.y < dpy && c.y < dpy) ||
+        (a.x > dgx && b.x > dgx && c.x > dgx) || (a.y > dgy && b.y > dgy && c.y > dgy) )
         return;
     if( b.y < a.y )
     {
@@ -2088,9 +2088,9 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         a.Swap( b );
         ta.Swap( tb );
     }
-    const double m1 = (double)( a.x - b.x ) / ( a.y - b.y );
-    const double m2 = (double)( a.x - c.x ) / ( a.y - c.y );
-    const double m3 = (double)( b.x - c.x ) / ( b.y - c.y );
+    const double m1 = (double)(a.x - b.x) / (a.y - b.y);
+    const double m2 = (double)(a.x - c.x) / (a.y - c.y);
+    const double m3 = (double)(b.x - c.x) / (b.y - c.y);
     double b1 = a.x - m1 * a.y;
     double b2 = a.x - m2 * a.y;
     double b3 = b.x - m3 * b.y;
@@ -2100,8 +2100,8 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         double tx1o, ty1o, tx2o, ty2o;
         if( c.y - a.y )
         {
-            tx1o = (double)( tc.x - ta.x ) / ( c.y - a.y );
-            ty1o = (double)( tc.y - ta.y ) / ( c.y - a.y );
+            tx1o = (double)(tc.x - ta.x) / (c.y - a.y);
+            ty1o = (double)(tc.y - ta.y) / (c.y - a.y);
         }
         else
         {
@@ -2110,20 +2110,20 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         }
         if( b.y - a.y )
         {
-            tx2o = (double)( tb.x - ta.x ) / ( b.y - a.y );
-            ty2o = (double)( tb.y - ta.y ) / ( b.y - a.y );
+            tx2o = (double)(tb.x - ta.x) / (b.y - a.y);
+            ty2o = (double)(tb.y - ta.y) / (b.y - a.y);
         }
         else
         {
             tx2o = 0;
             ty2o = 0;
         }
-        Vec2< double > q( ta.x + tx1o * ( b.y - a.y ), ta.y + ty1o * ( b.y - a.y ) );
+        Vec2< double > q( ta.x + tx1o * (b.y - a.y), ta.y + ty1o * (b.y - a.y) );
         double txf, tyf;
         if( b.x - qx )
         {
-            txf = ( tb.x - q.x ) / ( b.x - qx );
-            tyf = ( tb.y - q.y ) / ( b.x - qx );
+            txf = (tb.x - q.x) / (b.x - qx);
+            tyf = (tb.y - q.y) / (b.x - qx);
         }
         else
         {
@@ -2133,8 +2133,8 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         drawFlatDreieckTextur( a.y, b.y, m2, b2, m1, b1, ta.x, ta.y, ta.x, ta.y, tx1o, ty1o, tx2o, ty2o, txf, tyf, textur );
         if( c.y - b.y )
         {
-            tx2o = (double)( tc.x - tb.x ) / ( c.y - b.y );
-            ty2o = (double)( tc.y - tb.y ) / ( c.y - b.y );
+            tx2o = (double)(tc.x - tb.x) / (c.y - b.y);
+            ty2o = (double)(tc.y - tb.y) / (c.y - b.y);
         }
         else
         {
@@ -2148,8 +2148,8 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         double tx1o, ty1o, tx2o, ty2o;
         if( b.y - a.y )
         {
-            tx1o = (double)( tb.x - ta.x ) / ( b.y - a.y );
-            ty1o = (double)( tb.y - ta.y ) / ( b.y - a.y );
+            tx1o = (double)(tb.x - ta.x) / (b.y - a.y);
+            ty1o = (double)(tb.y - ta.y) / (b.y - a.y);
         }
         else
         {
@@ -2158,20 +2158,20 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         }
         if( c.y - a.y )
         {
-            tx2o = (double)( tc.x - ta.x ) / ( c.y - a.y );
-            ty2o = (double)( tc.y - ta.y ) / ( c.y - a.y );
+            tx2o = (double)(tc.x - ta.x) / (c.y - a.y);
+            ty2o = (double)(tc.y - ta.y) / (c.y - a.y);
         }
         else
         {
             tx2o = 0;
             ty2o = 0;
         }
-        Vec2< double > q( ta.x + tx2o * ( b.y - a.y ), ta.y + ty2o * ( b.y - a.y ) );
+        Vec2< double > q( ta.x + tx2o * (b.y - a.y), ta.y + ty2o * (b.y - a.y) );
         double txf, tyf;
         if( qx - b.x )
         {
-            txf = ( q.x - tb.x ) / ( qx - b.x );
-            tyf = ( q.y - tb.y ) / ( qx - b.x );
+            txf = (q.x - tb.x) / (qx - b.x);
+            tyf = (q.y - tb.y) / (qx - b.x);
         }
         else
         {
@@ -2181,8 +2181,8 @@ void Bild::drawDreieckTextur( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Pun
         drawFlatDreieckTextur( a.y, b.y, m1, b1, m2, b2, ta.x, ta.y, ta.x, ta.y, tx1o, ty1o, tx2o, ty2o, txf, tyf, textur );
         if( c.y - b.y )
         {
-            tx1o = (double)( tc.x - tb.x ) / ( c.y - b.y );
-            ty1o = (double)( tc.y - tb.y ) / ( c.y - b.y );
+            tx1o = (double)(tc.x - tb.x) / (c.y - b.y);
+            ty1o = (double)(tc.y - tb.y) / (c.y - b.y);
         }
         else
         {
@@ -2205,13 +2205,13 @@ void Bild::drawDreieckAlpha( Punkt a, Punkt b, Punkt c, int farbe ) // f
     a += drawOff[ doa ];
     b += drawOff[ doa ];
     c += drawOff[ doa ];
-    if( ( a.x < dpx && b.x < dpx && c.x < dpx ) || ( a.y < dpy && b.y < dpy && c.y < dpy ) ||
-        ( a.x > dgx && b.x > dgx && c.x > dgx ) || ( a.y > dgy && b.y > dgy && c.y > dgy ) )
+    if( (a.x < dpx && b.x < dpx && c.x < dpx) || (a.y < dpy && b.y < dpy && c.y < dpy) ||
+        (a.x > dgx && b.x > dgx && c.x > dgx) || (a.y > dgy && b.y > dgy && c.y > dgy) )
         return;
     if( alpha[ alphaAnzahl ] )
     {
-        unsigned char *cf = (unsigned char *)&farbe;
-        cf[ 3 ] = (unsigned char)( ( cf[ 3 ] > alpha[ alphaAnzahl ] ) * ( cf[ 3 ] - alpha[ alphaAnzahl ] ) );
+        unsigned char* cf = (unsigned char*)&farbe;
+        cf[ 3 ] = (unsigned char)((cf[ 3 ] > alpha[ alphaAnzahl ]) * (cf[ 3 ] - alpha[ alphaAnzahl ]));
     }
     if( b.y < a.y )
         a.Swap( b );
@@ -2223,8 +2223,8 @@ void Bild::drawDreieckAlpha( Punkt a, Punkt b, Punkt c, int farbe ) // f
     {
         if( b.x < a.x )
             a.Swap( b );
-        const float m2 = (float)( a.x - c.x ) / (float)( a.y - c.y );
-        const float m3 = (float)( b.x - c.x ) / (float)( b.y - c.y );
+        const float m2 = (float)(a.x - c.x) / (float)(a.y - c.y);
+        const float m3 = (float)(b.x - c.x) / (float)(b.y - c.y);
         float b2 = (float)a.x - m2 * (float)a.y;
         float b3 = (float)b.x - m3 * (float)b.y;
         drawFlatDreieckAlpha( b.y, c.y, m2, b2, m3, b3, farbe );
@@ -2233,17 +2233,17 @@ void Bild::drawDreieckAlpha( Punkt a, Punkt b, Punkt c, int farbe ) // f
     {
         if( c.x < b.x )
             b.Swap( c );
-        const float m1 = (float)( a.x - b.x ) / (float)( a.y - b.y );
-        const float m2 = (float)( a.x - c.x ) / (float)( a.y - c.y );
+        const float m1 = (float)(a.x - b.x) / (float)(a.y - b.y);
+        const float m2 = (float)(a.x - c.x) / (float)(a.y - c.y);
         float b1 = (float)a.x - m1 * (float)a.y;
         float b2 = (float)a.x - m2 * (float)a.y;
         drawFlatDreieckAlpha( a.y, b.y, m1, b1, m2, b2, farbe );
     }
     else
     {
-        const float m1 = (float)( a.x - b.x ) / (float)( a.y - b.y );
-        const float m2 = (float)( a.x - c.x ) / (float)( a.y - c.y );
-        const float m3 = (float)( b.x - c.x ) / (float)( b.y - c.y );
+        const float m1 = (float)(a.x - b.x) / (float)(a.y - b.y);
+        const float m2 = (float)(a.x - c.x) / (float)(a.y - c.y);
+        const float m3 = (float)(b.x - c.x) / (float)(b.y - c.y);
         float b1 = (float)a.x - m1 * (float)a.y;
         float b2 = (float)a.x - m2 * (float)a.y;
         float b3 = (float)b.x - m3 * (float)b.y;
@@ -2262,7 +2262,7 @@ void Bild::drawDreieckAlpha( Punkt a, Punkt b, Punkt c, int farbe ) // f
     rend = 1;
 }
 
-void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Punkt tc, Bild &textur ) // füllt eine Dreieck aus
+void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb, Punkt tc, Bild& textur ) // füllt eine Dreieck aus
 {
     if( alpha[ alphaAnzahl ] == 0xFF )
         return;
@@ -2273,8 +2273,8 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
     a += drawOff[ doa ];
     b += drawOff[ doa ];
     c += drawOff[ doa ];
-    if( ( a.x < dpx && b.x < dpx && c.x < dpx ) || ( a.y < dpy && b.y < dpy && c.y < dpy ) ||
-        ( a.x > dgx && b.x > dgx && c.x > dgx ) || ( a.y > dgy && b.y > dgy && c.y > dgy ) )
+    if( (a.x < dpx && b.x < dpx && c.x < dpx) || (a.y < dpy && b.y < dpy && c.y < dpy) ||
+        (a.x > dgx && b.x > dgx && c.x > dgx) || (a.y > dgy && b.y > dgy && c.y > dgy) )
         return;
     if( b.y < a.y )
     {
@@ -2291,9 +2291,9 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         a.Swap( b );
         ta.Swap( tb );
     }
-    const double m1 = (double)( a.x - b.x ) / ( a.y - b.y );
-    const double m2 = (double)( a.x - c.x ) / ( a.y - c.y );
-    const double m3 = (double)( b.x - c.x ) / ( b.y - c.y );
+    const double m1 = (double)(a.x - b.x) / (a.y - b.y);
+    const double m2 = (double)(a.x - c.x) / (a.y - c.y);
+    const double m3 = (double)(b.x - c.x) / (b.y - c.y);
     double b1 = a.x - m1 * a.y;
     double b2 = a.x - m2 * a.y;
     double b3 = b.x - m3 * b.y;
@@ -2303,8 +2303,8 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         double tx1o, ty1o, tx2o, ty2o;
         if( c.y - a.y )
         {
-            tx1o = (double)( tc.x - ta.x ) / ( c.y - a.y );
-            ty1o = (double)( tc.y - ta.y ) / ( c.y - a.y );
+            tx1o = (double)(tc.x - ta.x) / (c.y - a.y);
+            ty1o = (double)(tc.y - ta.y) / (c.y - a.y);
         }
         else
         {
@@ -2313,20 +2313,20 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         }
         if( b.y - a.y )
         {
-            tx2o = (double)( tb.x - ta.x ) / ( b.y - a.y );
-            ty2o = (double)( tb.y - ta.y ) / ( b.y - a.y );
+            tx2o = (double)(tb.x - ta.x) / (b.y - a.y);
+            ty2o = (double)(tb.y - ta.y) / (b.y - a.y);
         }
         else
         {
             tx2o = 0;
             ty2o = 0;
         }
-        Vec2< double > q( ta.x + tx1o * ( b.y - a.y ), ta.y + ty1o * ( b.y - a.y ) );
+        Vec2< double > q( ta.x + tx1o * (b.y - a.y), ta.y + ty1o * (b.y - a.y) );
         double txf, tyf;
         if( b.x - qx )
         {
-            txf = ( tb.x - q.x ) / ( b.x - qx );
-            tyf = ( tb.y - q.y ) / ( b.x - qx );
+            txf = (tb.x - q.x) / (b.x - qx);
+            tyf = (tb.y - q.y) / (b.x - qx);
         }
         else
         {
@@ -2336,8 +2336,8 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         drawFlatDreieckTexturAlpha( a.y, b.y, m2, b2, m1, b1, ta.x, ta.y, ta.x, ta.y, tx1o, ty1o, tx2o, ty2o, txf, tyf, textur );
         if( c.y - b.y )
         {
-            tx2o = (double)( tc.x - tb.x ) / ( c.y - b.y );
-            ty2o = (double)( tc.y - tb.y ) / ( c.y - b.y );
+            tx2o = (double)(tc.x - tb.x) / (c.y - b.y);
+            ty2o = (double)(tc.y - tb.y) / (c.y - b.y);
         }
         else
         {
@@ -2351,8 +2351,8 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         double tx1o, ty1o, tx2o, ty2o;
         if( b.y - a.y )
         {
-            tx1o = (double)( tb.x - ta.x ) / ( b.y - a.y );
-            ty1o = (double)( tb.y - ta.y ) / ( b.y - a.y );
+            tx1o = (double)(tb.x - ta.x) / (b.y - a.y);
+            ty1o = (double)(tb.y - ta.y) / (b.y - a.y);
         }
         else
         {
@@ -2361,20 +2361,20 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         }
         if( c.y - a.y )
         {
-            tx2o = (double)( tc.x - ta.x ) / ( c.y - a.y );
-            ty2o = (double)( tc.y - ta.y ) / ( c.y - a.y );
+            tx2o = (double)(tc.x - ta.x) / (c.y - a.y);
+            ty2o = (double)(tc.y - ta.y) / (c.y - a.y);
         }
         else
         {
             tx2o = 0;
             ty2o = 0;
         }
-        Vec2< double > q( ta.x + tx2o * ( b.y - a.y ), ta.y + ty2o * ( b.y - a.y ) );
+        Vec2< double > q( ta.x + tx2o * (b.y - a.y), ta.y + ty2o * (b.y - a.y) );
         double txf, tyf;
         if( qx - b.x )
         {
-            txf = ( q.x - tb.x ) / ( qx - b.x );
-            tyf = ( q.y - tb.y ) / ( qx - b.x );
+            txf = (q.x - tb.x) / (qx - b.x);
+            tyf = (q.y - tb.y) / (qx - b.x);
         }
         else
         {
@@ -2384,8 +2384,8 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
         drawFlatDreieckTexturAlpha( a.y, b.y, m1, b1, m2, b2, ta.x, ta.y, ta.x, ta.y, tx1o, ty1o, tx2o, ty2o, txf, tyf, textur );
         if( c.y - b.y )
         {
-            tx1o = (double)( tc.x - tb.x ) / ( c.y - b.y );
-            ty1o = (double)( tc.y - tb.y ) / ( c.y - b.y );
+            tx1o = (double)(tc.x - tb.x) / (c.y - b.y);
+            ty1o = (double)(tc.y - tb.y) / (c.y - b.y);
         }
         else
         {
@@ -2399,8 +2399,8 @@ void Bild::drawDreieckTexturAlpha( Punkt a, Punkt b, Punkt c, Punkt ta, Punkt tb
 
 void Bild::replaceColorWithAlpha( int color )
 {
-    int r = ( color & 0xFF0000 ) >> 16;
-    int g = ( color & 0xFF00 ) >> 8;
+    int r = (color & 0xFF0000) >> 16;
+    int g = (color & 0xFF00) >> 8;
     int b = color & 0xFF;
     int dx = drawOff[ doa ].x, dy = drawOff[ doa ].y;
     int xx = dPosA[ doa ].x, yy = dPosA[ doa ].y;
@@ -2410,16 +2410,16 @@ void Bild::replaceColorWithAlpha( int color )
         int ygr = y * size.x;
         for( int x = dx + xx; x < bb; x++ )
         {
-            unsigned char *cf = (unsigned char *)&( fc[ x + ygr ] );
-            int abstand = (int)sqrt( (float)( ( r - cf[ 2 ] ) * ( r - cf[ 2 ] ) + ( g - cf[ 1 ] ) * ( g - cf[ 1 ] ) + ( b - cf[ 0 ] ) * ( b - cf[ 0 ] ) ) );
+            unsigned char* cf = (unsigned char*)&(fc[ x + ygr ]);
+            int abstand = (int)sqrt( (float)((r - cf[ 2 ]) * (r - cf[ 2 ]) + (g - cf[ 1 ]) * (g - cf[ 1 ]) + (b - cf[ 0 ]) * (b - cf[ 0 ])) );
             if( abstand > 255 )
                 abstand = 255;
-            cf[ 3 ] = (unsigned char)( abstand );
+            cf[ 3 ] = (unsigned char)(abstand);
         }
     }
 }
 
-bool Bild::setDrawOptions( const Punkt &pos, const Punkt &gr ) // setzt die Drawoptionen
+bool Bild::setDrawOptions( const Punkt& pos, const Punkt& gr ) // setzt die Drawoptionen
 {
     int dx = drawOff[ doa ].x, dy = drawOff[ doa ].y;
     int xx = dPosA[ doa ].x, yy = dPosA[ doa ].y;
@@ -2459,7 +2459,7 @@ bool Bild::setDrawOptions( int x, int y, int br, int hi )
     return 1;
 }
 
-bool Bild::setDrawOptionsErzwingen( const Punkt &pos, const Punkt &gr ) // setzt die Drawoptionen
+bool Bild::setDrawOptionsErzwingen( const Punkt& pos, const Punkt& gr ) // setzt die Drawoptionen
 {
     int dx = drawOff[ doa ].x, dy = drawOff[ doa ].y;
     if( dx + pos.x + gr.x < 0 || dy + pos.y + gr.y < 0 || dx + pos.x >= size.x || dy + pos.y >= size.y )
@@ -2521,7 +2521,7 @@ bool Bild::getRend()
 }
 
 // constant 
-int *Bild::getBuffer()const // gibt buffer zurück
+int* Bild::getBuffer()const // gibt buffer zurück
 {
     return fc;
 }
@@ -2533,7 +2533,7 @@ int Bild::getPixel( int x, int y ) const
     return fc[ x + y * size.x ];
 }
 
-const Punkt &Bild::getSize() const // gibt die Größe zurück
+const Punkt& Bild::getSize() const // gibt die Größe zurück
 {
     return size;
 }
@@ -2550,20 +2550,20 @@ int Bild::getHeight() const // gibt die H
 
 unsigned char Bild::getAlpha() const // gibt den Alpha wert zurück
 {
-    return (unsigned char)( 255 - alpha[ alphaAnzahl ] );
+    return (unsigned char)(255 - alpha[ alphaAnzahl ]);
 }
 
-const Punkt &Bild::getDrawPos() const
+const Punkt& Bild::getDrawPos() const
 {
     return dPosA[ doa ];
 }
 
-const Punkt &Bild::getDrawGr() const
+const Punkt& Bild::getDrawGr() const
 {
     return dSizeA[ doa ];
 }
 
-const Punkt &Bild::getDrawOff() const
+const Punkt& Bild::getDrawOff() const
 {
     return drawOff[ doa ];
 }
@@ -2591,7 +2591,7 @@ BildZ::~BildZ()
         bild->release();
 }
 
-void BildZ::doMausEreignis( MausEreignis &me, bool userRet ) // ruft Mak auf
+void BildZ::doMausEreignis( MausEreignis& me, bool userRet ) // ruft Mak auf
 {
     if( userRet )
     {
@@ -2613,7 +2613,7 @@ void BildZ::doMausEreignis( MausEreignis &me, bool userRet ) // ruft Mak auf
 }
 
 // nicht constant 
-void BildZ::setBildZ( Bild *b ) // setzt das Bild
+void BildZ::setBildZ( Bild* b ) // setzt das Bild
 {
     if( bild )
         bild->release();
@@ -2630,7 +2630,7 @@ void BildZ::setBildZ( Bild *b ) // setzt das Bild
     rend = 1;
 }
 
-void BildZ::setBild( Bild *b )
+void BildZ::setBild( Bild* b )
 {
     if( !bild )
         bild = new Bild();
@@ -2651,7 +2651,7 @@ bool BildZ::tick( double tickVal ) // tick
     return ZeichnungHintergrund::tick( tickVal );
 }
 
-void BildZ::render( Bild &zRObj ) // zeichnet nach zRObj
+void BildZ::render( Bild& zRObj ) // zeichnet nach zRObj
 {
     if( hatStyle( Style::Sichtbar ) )
     {
@@ -2668,7 +2668,7 @@ void BildZ::render( Bild &zRObj ) // zeichnet nach zRObj
             int y = 0;
             int br = innenSize.x;
             int hi = innenSize.y;
-            if( !( vertikalScrollBar && hatStyle( Style::VScroll ) ) && !( horizontalScrollBar && hatStyle( Style::HScroll ) ) )
+            if( !(vertikalScrollBar && hatStyle( Style::VScroll )) && !(horizontalScrollBar && hatStyle( Style::HScroll )) )
             {
                 if( hatStyle( Style::Alpha ) )
                 {
@@ -2706,21 +2706,21 @@ void BildZ::render( Bild &zRObj ) // zeichnet nach zRObj
 }
 
 // constant 
-Bild *BildZ::getBild() const // gibt das Bild zurück
+Bild* BildZ::getBild() const // gibt das Bild zurück
 {
     if( bild )
-        return dynamic_cast<Bild *>( bild->getThis() );
+        return dynamic_cast<Bild*>(bild->getThis());
     return 0;
 }
 
-Bild *BildZ::zBild() const
+Bild* BildZ::zBild() const
 {
     return bild;
 }
 
-Zeichnung *BildZ::dublizieren() const // erstellt eine Kopie des Zeichnungs
+Zeichnung* BildZ::dublizieren() const // erstellt eine Kopie des Zeichnungs
 {
-    BildZ *obj = new BildZ();
+    BildZ* obj = new BildZ();
     obj->setPosition( pos );
     obj->setSize( gr );
     obj->setMausEreignisParameter( makParam );
@@ -2728,34 +2728,34 @@ Zeichnung *BildZ::dublizieren() const // erstellt eine Kopie des Zeichnungs
     obj->setMausEreignis( mak );
     obj->setTastaturEreignis( tak );
     if( toolTip )
-        obj->setToolTipZ( (ToolTip *)toolTip->dublizieren() );
+        obj->setToolTipZ( (ToolTip*)toolTip->dublizieren() );
     obj->setStyle( style );
     obj->setHintergrundFarbe( hintergrundFarbe );
     if( hintergrundFeld )
-        obj->setAlphaFeldZ( (AlphaFeld *)hintergrundFeld->dublizieren() );
+        obj->setAlphaFeldZ( (AlphaFeld*)hintergrundFeld->dublizieren() );
     if( rahmen )
-        obj->setRahmenZ( (Rahmen *)rahmen->dublizieren() );
+        obj->setRahmenZ( (Rahmen*)rahmen->dublizieren() );
     if( hintergrundBild )
-        obj->setHintergrundBild( dynamic_cast<Bild *>( hintergrundBild->getThis() ) );
+        obj->setHintergrundBild( dynamic_cast<Bild*>(hintergrundBild->getThis()) );
     if( bild )
-        obj->setBild( dynamic_cast<Bild *>( bild->getThis() ) );
+        obj->setBild( dynamic_cast<Bild*>(bild->getThis()) );
     obj->setStyle( style );
     return obj;
 }
 
 #ifdef WIN32
-Bild *Framework::ladeBild( char *pfad, Text *zError )
+Bild* Framework::ladeBild( char* pfad, Text* zError )
 {
     Text p = pfad;
-    Text *txt = p.getTeilText( p.positionVon( '.', p.anzahlVon( '.' ) - 1 ) );
-    if( !( txt->istGleich( ".bmp" ) || txt->istGleich( ".jpg" ) || txt->istGleich( ".gif" ) || txt->istGleich( ".png" ) ) )
+    Text* txt = p.getTeilText( p.positionVon( '.', p.anzahlVon( '.' ) - 1 ) );
+    if( !(txt->istGleich( ".bmp" ) || txt->istGleich( ".jpg" ) || txt->istGleich( ".gif" ) || txt->istGleich( ".png" )) )
     {
         zError->setText( "Die Angegebene Datei ist keine gueltige Bilddatei!" );
         txt->release();
         return 0;
     }
     txt->release();
-    wchar_t *name = new wchar_t[ p.getLength() + 1 ];
+    wchar_t* name = new wchar_t[ p.getLength() + 1 ];
     for( int i = 0; i < p.getLength(); i++ )
         name[ i ] = (wchar_t)p.getText()[ i ];
     name[ p.getLength() ] = '\0';
@@ -2764,9 +2764,9 @@ Bild *Framework::ladeBild( char *pfad, Text *zError )
     Gdiplus::Color pix;
     delete[]name;
 
-    Bild *ret = new Bild();
+    Bild* ret = new Bild();
     ret->neuBild( bitmap.GetWidth(), bitmap.GetHeight(), 0 );
-    int *buff = ret->getBuffer();
+    int* buff = ret->getBuffer();
     for( unsigned int i = 0; i < bitmap.GetWidth() * bitmap.GetHeight(); i++ )
     {
         bitmap.GetPixel( i % bitmap.GetWidth(), i / bitmap.GetWidth(), &pix );

+ 17 - 17
DateiDialog.cpp

@@ -35,12 +35,12 @@ void DateiDialog::removeDateiTypen()
     type->leeren();
 }
 
-void DateiDialog::addDateiTyp( char *name, char *typ )
+void DateiDialog::addDateiTyp( const char* name, const char* typ )
 {
     addDateiTyp( new Text( name ), new Text( typ ) );
 }
 
-void DateiDialog::addDateiTyp( Text *name, Text *typ )
+void DateiDialog::addDateiTyp( Text* name, Text* typ )
 {
     typeName->add( name );
     type->add( typ );
@@ -52,9 +52,9 @@ void DateiDialog::setDateiTypAuswahl( int i )
 }
 
 // constant
-Text *DateiDialog::anzeigen( bool open ) const
+Text* DateiDialog::anzeigen( bool open ) const
 {
-    IFileDialog *pfd = NULL;
+    IFileDialog* pfd = NULL;
     CoInitialize( NULL );
     HRESULT hr = 0;
     if( open )
@@ -81,7 +81,7 @@ Text *DateiDialog::anzeigen( bool open ) const
             if( SUCCEEDED( hr ) )
             {
                 int anz = type->getEintragAnzahl();
-                COMDLG_FILTERSPEC *c_rgSaveTypes = 0;
+                COMDLG_FILTERSPEC* c_rgSaveTypes = 0;
                 if( !anz )
                 {
                     c_rgSaveTypes = new COMDLG_FILTERSPEC[ 1 ];
@@ -93,10 +93,10 @@ Text *DateiDialog::anzeigen( bool open ) const
                     c_rgSaveTypes = new COMDLG_FILTERSPEC[ anz ];
                     for( int i = 0; i < anz; i++ )
                     {
-                        wchar_t *n = new wchar_t[ typeName->z( i )->getLength() + 1 ];
+                        wchar_t* n = new wchar_t[ typeName->z( i )->getLength() + 1 ];
 #pragma warning( disable : 4996 )
                         mbstowcs( n, typeName->z( i )->getText(), typeName->z( i )->getLength() + 1 );
-                        wchar_t *t = new wchar_t[ type->z( i )->getLength() + 1 ];
+                        wchar_t* t = new wchar_t[ type->z( i )->getLength() + 1 ];
 #pragma warning( disable : 4996 )
                         mbstowcs( t, type->z( i )->getText(), type->z( i )->getLength() + 1 );
                         c_rgSaveTypes[ i ].pszName = n;
@@ -120,7 +120,7 @@ Text *DateiDialog::anzeigen( bool open ) const
                         }
                         if( txt.getLength() > 0 )
                             txt.remove( txt.getLength() - 1 );
-                        wchar_t *defEnd = new wchar_t[ txt.getLength() + 1 ];
+                        wchar_t* defEnd = new wchar_t[ txt.getLength() + 1 ];
 #pragma warning( disable : 4996 )
                         mbstowcs( defEnd, txt, txt.getLength() + 1 );
                         hr = pfd->SetDefaultExtension( defEnd );
@@ -129,7 +129,7 @@ Text *DateiDialog::anzeigen( bool open ) const
                             hr = pfd->Show( NULL );
                             if( SUCCEEDED( hr ) )
                             {
-                                IShellItem *psiResult;
+                                IShellItem* psiResult;
                                 hr = pfd->GetResult( &psiResult );
                                 if( SUCCEEDED( hr ) )
                                 {
@@ -138,10 +138,10 @@ Text *DateiDialog::anzeigen( bool open ) const
                                                                     &pszFilePath );
                                     if( SUCCEEDED( hr ) )
                                     {
-                                        char *txt = new char[ wcslen( pszFilePath ) + 1 ];
+                                        char* txt = new char[ wcslen( pszFilePath ) + 1 ];
 #pragma warning( disable : 4996 )
                                         wcstombs( txt, pszFilePath, wcslen( pszFilePath ) + 1 );
-                                        Text *ret = new Text( txt );
+                                        Text* ret = new Text( txt );
                                         delete[] txt;
                                         psiResult->Release();
                                         delete[] defEnd;
@@ -207,12 +207,12 @@ void DateiDialogTh::removeDateiTypen()
     dialog->removeDateiTypen();
 }
 
-void DateiDialogTh::addDateiTyp( char *name, char *typ )
+void DateiDialogTh::addDateiTyp( const char* name, const char* typ )
 {
     dialog->addDateiTyp( name, typ );
 }
 
-void DateiDialogTh::addDateiTyp( Text *name, Text *typ )
+void DateiDialogTh::addDateiTyp( Text* name, Text* typ )
 {
     dialog->addDateiTyp( name, typ );
 }
@@ -225,17 +225,17 @@ void DateiDialogTh::setDateiTypAuswahl( int i )
 void DateiDialogTh::thread()
 {
     if( ret )
-        ret = (Text *)ret->release();
+        ret = (Text*)ret->release();
     ret = dialog->anzeigen( open );
 }
 
 // constant
-Text *DateiDialogTh::getPfad() const
+Text* DateiDialogTh::getPfad() const
 {
-    return ret ? dynamic_cast<Text *>( ret->getThis() ) : 0;
+    return ret ? dynamic_cast<Text*>(ret->getThis()) : 0;
 }
 
-Text *DateiDialogTh::zPfad() const
+Text* DateiDialogTh::zPfad() const
 {
     return ret;
 }

+ 11 - 11
DateiDialog.h

@@ -14,8 +14,8 @@ namespace Framework
     class DateiDialog : public virtual ReferenceCounter
     {
     private:
-        RCArray< Text > *typeName;
-        RCArray< Text > *type;
+        RCArray< Text >* typeName;
+        RCArray< Text >* type;
         int fileIndex;
 
     public:
@@ -28,26 +28,26 @@ namespace Framework
         //! Fügt einen zugelassenen Dateityp hinzu
         //! \param name Der Name des Dateitypes. Ist für den Nutzer in der Select Box sichtbar
         //! \param typ Der Dateityp, der ausgewählt werden darf
-        DLLEXPORT void addDateiTyp( char *name, char *typ );
+        DLLEXPORT void addDateiTyp( const char* name, const char* typ );
         //! Fügt einen zugelassenen Dateityp hinzu
         //! \param name Der Name des Dateitypes. Ist für den Nutzer in der Select Box sichtbar
         //! \param typ Der Dateityp, der ausgewählt werden darf
-        DLLEXPORT void addDateiTyp( Text *name, Text *typ );
+        DLLEXPORT void addDateiTyp( Text* name, Text* typ );
         //! Setzt den zu Beginn ausgewählten Dateityp
         //! \param i Der Index des Dateityps. Der, der als erstes hinzugefügt wurde, hat den Index 0.
         DLLEXPORT void setDateiTypAuswahl( int i );
         //! Zeigt den Dateidialog an
         //! \param open true, wenn der Dialog zum öffnen dienen soll. false zum Speichern
         //! \return Den Pfad zur ausgewählten Datei
-        DLLEXPORT Text *anzeigen( bool open ) const;
+        DLLEXPORT Text* anzeigen( bool open ) const;
     };
 
     //! Verwaltet einen Datei öffnen/speichern Dialog ohne zu warten
     class DateiDialogTh : public Thread
     {
     private:
-        DateiDialog *dialog;
-        Text *ret;
+        DateiDialog* dialog;
+        Text* ret;
         bool open;
 
     public:
@@ -63,11 +63,11 @@ namespace Framework
         //! Fügt einen zugelassenen Dateityp hinzu
         //! \param name Der Name des Dateitypes. Ist für den Nutzer in der Select Box sichtbar
         //! \param typ Der Dateityp, der ausgewählt werden darf
-        DLLEXPORT void addDateiTyp( char *name, char *typ );
+        DLLEXPORT void addDateiTyp( const char* name, const char* typ );
         //! Fügt einen zugelassenen Dateityp hinzu
         //! \param name Der Name des Dateitypes. Ist für den Nutzer in der Select Box sichtbar
         //! \param typ Der Dateityp, der ausgewählt werden darf
-        DLLEXPORT void addDateiTyp( Text *name, Text *typ );
+        DLLEXPORT void addDateiTyp( Text* name, Text* typ );
         //! Setzt den zu Beginn ausgewählten Dateityp
         //! \param i Der Index des Dateityps. Der, der als erstes hinzugefügt wurde, hat den Index 0.
         DLLEXPORT void setDateiTypAuswahl( int i );
@@ -76,10 +76,10 @@ namespace Framework
         DLLEXPORT void thread() override;
         //! Gibt den Pfad zur Datei zurück.
         //! Funktioniert erst, nachdem der Thread beendet wurde
-        DLLEXPORT Text *getPfad() const;
+        DLLEXPORT Text* getPfad() const;
         //! Gibt den Pfad zur Datei ohne erhöhten Reference Counter zurück.
         //! Funktioniert erst, nachdem der Thread beendet wurde
-        DLLEXPORT Text *zPfad() const;
+        DLLEXPORT Text* zPfad() const;
     };
 };
 

+ 2 - 2
DateiSystem.cpp

@@ -569,7 +569,7 @@ void LTDBDateiKopf::laden( FBalken *f, std::ifstream *inF )
         {
             LTDBKopf *kpf = new LTDBKopf();
             kpf->laden( inF ); // bildname und halbe datei position
-            bilder->set( kpf->getTitel(), i ); // setzt titel
+            bilder->add( kpf->getTitel() ); // setzt titel
             Punkt gr = kpf->getSize();
             kpf->release();
             char p[ 5 ];
@@ -581,7 +581,7 @@ void LTDBDateiKopf::laden( FBalken *f, std::ifstream *inF )
                 ( ( (__int64)p[ 2 ] << 16 ) & 0xFF0000 ) |
                 ( ( (__int64)p[ 3 ] << 8 ) & 0xFF00 ) |
                 ( (__int64)p[ 4 ] & 0xFF );
-            pos->set( position, i ); // setzt position
+            pos->add( position, i ); // setzt position
 #ifdef WIN32
             if( f )
                 f->aktionPlus();

+ 150 - 145
Fenster.cpp

@@ -57,7 +57,7 @@ WNDCLASSEX Framework::F_NormalEx( HINSTANCE hInst )
 LRESULT CALLBACK Framework::WindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
 {
     if( msgExit )
-        return ( DefWindowProc( hwnd, message, wparam, lparam ) );
+        return (DefWindowProc( hwnd, message, wparam, lparam ));
     switch( message )
     {
         // Maus Zeiger 
@@ -218,7 +218,7 @@ LRESULT CALLBACK Framework::WindowProc( HWND hwnd, UINT message, WPARAM wparam,
             break;
         } // Taste wird losgelassen
     }
-    return ( DefWindowProc( hwnd, message, wparam, lparam ) );
+    return (DefWindowProc( hwnd, message, wparam, lparam ));
 }
 
 void Framework::StartNachrichtenSchleife()
@@ -495,12 +495,17 @@ bool WFenster::setFokus() // Setzt den Fokus auf das Fenster
     return GetFocus() == hWnd;
 }
 
-void WFenster::setPosition( Punkt &p )// Fenster Position
+void WFenster::setPosition( Punkt& p )// Fenster Position
+{
+    setPosition( p.x, p.y );
+}
+
+void WFenster::setPosition( int x, int y )
 {
     RECT r;
     GetWindowRect( hWnd, &r ); // Vorherige Position herausfinden
     RECT res;
-    res.left = p.x, res.top = p.y, res.right = r.right - r.left, res.bottom = r.bottom - r.top;
+    res.left = x, res.top = y, res.right = r.right - r.left, res.bottom = r.bottom - r.top;
     AdjustWindowRect( &res, style, 0 );
     /*    if( res.top < 0 )
         {
@@ -515,7 +520,7 @@ void WFenster::setPosition( Punkt &p )// Fenster Position
     SetWindowPos( hWnd, 0, res.left, res.top, res.right, res.bottom, 0 ); // Position ändern
 }
 
-void WFenster::setSize( Punkt &g )// Fenster Größe
+void WFenster::setSize( Punkt& g )// Fenster Größe
 {
     RECT r;
     GetWindowRect( hWnd, &r ); // vorherige Größe herausfinden
@@ -555,12 +560,12 @@ void WFenster::setSize( int breite, int h
     SetWindowPos( hWnd, 0, res.left, res.top, res.right, res.bottom, 0 ); // Größe ändern
 }
 
-void WFenster::setBounds( Punkt &p, Punkt &g ) // setzt größe und Position
+void WFenster::setBounds( Punkt& p, Punkt& g ) // setzt größe und Position
 {
     SetWindowPos( hWnd, 0, p.x, p.y, g.x, g.y, 0 ); // Größe und Position ändern
 }
 
-void WFenster::setBildschirm( Bildschirm *screen )
+void WFenster::setBildschirm( Bildschirm* screen )
 {
     if( this->screen )
         this->screen->release();
@@ -582,7 +587,7 @@ void WFenster::zerst
     hdc = 0;
 }
 
-void WFenster::doMausAktion( MausEreignis &me )
+void WFenster::doMausAktion( MausEreignis& me )
 {
     if( !mausAktion || !mausAktion( makParam, this, me ) )
         return;
@@ -632,7 +637,7 @@ void WFenster::doNSchlie
     nCloseAktion( sakParam, this );
 }
 
-void WFenster::doTastaturAktion( TastaturEreignis &te )
+void WFenster::doTastaturAktion( TastaturEreignis& te )
 {
     if( !tastaturAktion || !tastaturAktion( takParam, this, te ) )
         return;
@@ -647,17 +652,17 @@ void WFenster::doRestoreMessage() // macht den Rahmen sichtbar
     ShowWindow( hWnd, 1 );
 }
 
-void WFenster::setMausEreignisParameter( void *p ) // setzt den Parameter vom Maus Ereignis
+void WFenster::setMausEreignisParameter( void* p ) // setzt den Parameter vom Maus Ereignis
 {
     makParam = p;
 }
 
-void WFenster::setSchließEreignisParameter( void *p ) // setzt den Parameter vom Schließ Ereignis
+void WFenster::setSchließEreignisParameter( void* p ) // setzt den Parameter vom Schließ Ereignis
 {
     sakParam = p;
 }
 
-void WFenster::setTastaturEreignisParameter( void *p ) // setzt den Parameter vom Tastatur Ereignis
+void WFenster::setTastaturEreignisParameter( void* p ) // setzt den Parameter vom Tastatur Ereignis
 {
     takParam = p;
 }
@@ -667,12 +672,12 @@ void WFenster::setMausAktion( MausAktion mausAk )
     mausAktion = mausAk;
 }
 
-void WFenster::setVSchließAktion( std::function< void( void *, void * ) > vSchließAk )
+void WFenster::setVSchließAktion( std::function< void( void*, void* ) > vSchließAk )
 {
     vCloseAktion = vSchließAk;
 }
 
-void WFenster::setNSchließAktion( std::function< void( void *, void * ) > nSchließAk )
+void WFenster::setNSchließAktion( std::function< void( void*, void* ) > nSchließAk )
 {
     nCloseAktion = nSchließAk;
 }
@@ -692,7 +697,7 @@ void WFenster::setVerschiebbar( bool verschiebbar ) // legt fest, ob das Fenster
     this->verschiebbar = verschiebbar;
 }
 
-void WFenster::ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ) // setzt einen Transpatenten Rahmen um das Fenster
+void WFenster::ladeRahmenFenster( Bild* zBild, HINSTANCE hinst ) // setzt einen Transpatenten Rahmen um das Fenster
 {
     if( !zBild )
         return;
@@ -722,28 +727,28 @@ void WFenster::ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ) // setzt einen
     info.bmiHeader.biHeight = -zBild->getHeight();
     info.bmiHeader.biCompression = BI_RGB;
     info.bmiHeader.biPlanes = 1;
-    unsigned char *pPixels = 0;
-    bitmap = CreateDIBSection( hdc, &info, DIB_RGB_COLORS, (void **)&pPixels, 0, 0 );
+    unsigned char* pPixels = 0;
+    bitmap = CreateDIBSection( hdc, &info, DIB_RGB_COLORS, (void**)&pPixels, 0, 0 );
     if( !bitmap )
         DeleteDC( hdc );
     GdiFlush();
     // bitmap füllen
-    int pitch = ( ( zBild->getBreite() * 32 + 31 ) & ~31 ) >> 3;
-    unsigned char *pRow = 0;
-    int *buffer = zBild->getBuffer();
+    int pitch = ((zBild->getBreite() * 32 + 31) & ~31) >> 3;
+    unsigned char* pRow = 0;
+    int* buffer = zBild->getBuffer();
     for( int i = 0; i < zBild->getHeight(); ++i )
     {
         pRow = &pPixels[ i * pitch ];
         for( int i2 = 0; i2 < zBild->getBreite(); ++i2 )
         {
-            pRow[ i2 * 4 ] = (unsigned char)( ( buffer[ i2 + i * zBild->getBreite() ] >> 16 ) & 0xFF );
-            pRow[ i2 * 4 + 1 ] = (unsigned char)( ( buffer[ i2 + i * zBild->getBreite() ] >> 8 ) & 0xFF );
-            pRow[ i2 * 4 + 2 ] = (unsigned char)( ( buffer[ i2 + i * zBild->getBreite() ] ) & 0xFF );
-            pRow[ i2 * 4 + 3 ] = (unsigned char)( ( buffer[ i2 + i * zBild->getBreite() ] >> 24 ) & 0xFF );
+            pRow[ i2 * 4 ] = (unsigned char)((buffer[ i2 + i * zBild->getBreite() ] >> 16) & 0xFF);
+            pRow[ i2 * 4 + 1 ] = (unsigned char)((buffer[ i2 + i * zBild->getBreite() ] >> 8) & 0xFF);
+            pRow[ i2 * 4 + 2 ] = (unsigned char)((buffer[ i2 + i * zBild->getBreite() ]) & 0xFF);
+            pRow[ i2 * 4 + 3 ] = (unsigned char)((buffer[ i2 + i * zBild->getBreite() ] >> 24) & 0xFF);
         }
     }
     // alpha berechnen
-    unsigned char *pPixel = 0;
+    unsigned char* pPixel = 0;
     if( zBild->getBreite() * 4 == pitch )
     {
         int i = 0;
@@ -752,9 +757,9 @@ void WFenster::ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ) // setzt einen
         for( i = 0; i < totalBytes; i += 4 )
         {
             pPixel = &pPixels[ i ];
-            pPixel[ 0 ] *= (unsigned char)( (float)pPixel[ 3 ] / 255.0f );
-            pPixel[ 1 ] *= (unsigned char)( (float)pPixel[ 3 ] / 255.0f );
-            pPixel[ 2 ] *= (unsigned char)( (float)pPixel[ 3 ] / 255.0f );
+            pPixel[ 0 ] *= (unsigned char)((float)pPixel[ 3 ] / 255.0f);
+            pPixel[ 1 ] *= (unsigned char)((float)pPixel[ 3 ] / 255.0f);
+            pPixel[ 2 ] *= (unsigned char)((float)pPixel[ 3 ] / 255.0f);
         }
     }
     else
@@ -766,10 +771,10 @@ void WFenster::ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ) // setzt einen
         {
             for( x = 0; x < zBild->getBreite(); ++x )
             {
-                pPixel = &pPixels[ ( y * pitch ) + ( x * 4 ) ];
-                pPixel[ 0 ] *= (unsigned char)( (float)pPixel[ 3 ] / 255.0f );
-                pPixel[ 1 ] *= (unsigned char)( (float)pPixel[ 3 ] / 255.0f );
-                pPixel[ 2 ] *= (unsigned char)( (float)pPixel[ 3 ] / 255.0f );
+                pPixel = &pPixels[ (y * pitch) + (x * 4) ];
+                pPixel[ 0 ] *= (unsigned char)((float)pPixel[ 3 ] / 255.0f);
+                pPixel[ 1 ] *= (unsigned char)((float)pPixel[ 3 ] / 255.0f);
+                pPixel[ 2 ] *= (unsigned char)((float)pPixel[ 3 ] / 255.0f);
             }
         }
     }
@@ -793,7 +798,7 @@ void WFenster::ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ) // setzt einen
         {
             // zeichnen
             HDC h = 0;
-            if( ( h = GetDC( rahmen ) ) && bitmap )
+            if( (h = GetDC( rahmen )) && bitmap )
             {
                 HGDIOBJ hPrevObj = NULL;
                 POINT ptDest = { 0, 0 };
@@ -810,7 +815,7 @@ void WFenster::ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ) // setzt einen
                 ReleaseDC( rahmen, h );
             }
             UpdateWindow( rahmen );
-            Punkt pos = getPosition() + ( getGröße() - zBild->getSize() ) / 2;
+            Punkt pos = getPosition() + (getGröße() - zBild->getSize()) / 2;
             SetWindowPos( rahmen, 0, pos.x, pos.y, zBild->getBreite(), zBild->getHeight(), 0 );
         }
     }
@@ -877,14 +882,14 @@ bool WFenster::hatTastaturAktion() const
     return tastaturAktion != 0;
 }
 
-Bildschirm *WFenster::getBildschirm() const
+Bildschirm* WFenster::getBildschirm() const
 {
     if( !screen )
         return 0;
-    return dynamic_cast<Bildschirm *>( screen->getThis() );
+    return dynamic_cast<Bildschirm*>(screen->getThis());
 }
 
-Bildschirm *WFenster::zBildschirm() const
+Bildschirm* WFenster::zBildschirm() const
 {
     return screen;
 }
@@ -909,7 +914,7 @@ WFensterArray::~WFensterArray()
 }
 
 // add und remove 
-bool WFensterArray::addFenster( WFenster *fenster )
+bool WFensterArray::addFenster( WFenster* fenster )
 {
     if( fenster == This )
         return 0;
@@ -923,7 +928,7 @@ bool WFensterArray::addFenster( WFenster *fenster )
     return next->addFenster( fenster );
 }
 
-bool WFensterArray::removeFenster( WFenster *fenster )
+bool WFensterArray::removeFenster( WFenster* fenster )
 {
     if( fenster == This )
         return 1;
@@ -931,7 +936,7 @@ bool WFensterArray::removeFenster( WFenster *fenster )
         return 0;
     if( next->removeFenster( fenster ) )
     {
-        WFensterArray *tmp = next->getNext();
+        WFensterArray* tmp = next->getNext();
         next->setNext0();
         delete next;
         next = tmp;
@@ -939,7 +944,7 @@ bool WFensterArray::removeFenster( WFenster *fenster )
     return 0;
 }
 
-WFensterArray *WFensterArray::getNext()
+WFensterArray* WFensterArray::getNext()
 {
     return next;
 }
@@ -954,7 +959,7 @@ void WFensterArray::del()
     if( next )
     {
         This = next->getThis();
-        WFensterArray *tmp = next->getNext();
+        WFensterArray* tmp = next->getNext();
         next->setNext0();
         delete next;
         next = tmp;
@@ -994,7 +999,7 @@ bool WFensterArray::sendNSchlie
     return ret || next->sendNSchließMessage( hwnd );
 }
 
-bool WFensterArray::sendMausMessage( HWND hwnd, MausEreignis &me )
+bool WFensterArray::sendMausMessage( HWND hwnd, MausEreignis& me )
 {
     if( !This )
         return 0;
@@ -1009,7 +1014,7 @@ bool WFensterArray::sendMausMessage( HWND hwnd, MausEreignis &me )
     return ret || next->sendMausMessage( hwnd, me );
 }
 
-bool WFensterArray::sendTastaturMessage( HWND hwnd, TastaturEreignis &te )
+bool WFensterArray::sendTastaturMessage( HWND hwnd, TastaturEreignis& te )
 {
     if( !This )
         return 0;
@@ -1039,13 +1044,13 @@ bool WFensterArray::sendRestoreMessage( HWND hwnd )
     return ret || next->sendRestoreMessage( hwnd );
 }
 
-WFenster *WFensterArray::getThis()
+WFenster* WFensterArray::getThis()
 {
     return This;
 }
 
 // WMessageBox
-void Framework::WMessageBox( HWND hWnd, Text *titel, Text *meldung, UINT style )
+void Framework::WMessageBox( HWND hWnd, Text* titel, Text* meldung, UINT style )
 {
     MessageBox( hWnd, meldung->getText(), titel->getText(), style ); // Message Box
     titel->release();
@@ -1110,7 +1115,7 @@ Fenster::~Fenster()
         hScroll->release();
 }
 
-void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
+void Fenster::doMausEreignis( MausEreignis& me, bool userRet )
 {
     if( hatStyleNicht( Style::Sichtbar ) || !me.insideParent || me.verarbeitet || me.mx < 0 || me.my < 0 || me.mx >= gr.x || me.my >= gr.y || !userRet )
     {
@@ -1190,26 +1195,26 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
             if( minXb )
                 fMinBr = fMinBr < min.x ? min.x : fMinBr;
             if( kMinXb )
-                fMinBr = fMinBr < ( rbr * 2 + kMin.x + scbr ) ? ( rbr * 2 + kMin.x + scbr ) : fMinBr;
+                fMinBr = fMinBr < (rbr * 2 + kMin.x + scbr) ? (rbr * 2 + kMin.x + scbr) : fMinBr;
             int fMinHi = rbr * 2 + th + schi;
             if( minYb )
                 fMinHi = fMinHi < min.y ? min.y : fMinHi;
             if( kMinYb )
-                fMinHi = fMinHi < ( rbr * 2 + kMin.y + th + schi ) ? ( rbr * 2 + kMin.y + th + schi ) : fMinHi;
+                fMinHi = fMinHi < (rbr * 2 + kMin.y + th + schi) ? (rbr * 2 + kMin.y + th + schi) : fMinHi;
             int fMaxBr = 0;
             if( maxXb )
                 fMaxBr = max.x;
             if( kMaxXb )
-                fMaxBr = fMaxBr < ( rbr * 2 + kMax.x + scbr ) ? ( rbr * 2 + kMax.x + scbr ) : fMaxBr;
+                fMaxBr = fMaxBr < (rbr * 2 + kMax.x + scbr) ? (rbr * 2 + kMax.x + scbr) : fMaxBr;
             int fMaxHi = 0;
             if( maxYb )
                 fMaxHi = max.y;
             if( kMaxYb )
-                fMaxHi = fMaxHi < ( rbr * 2 + kMax.y + th + schi ) ? ( rbr * 2 + kMax.y + th + schi ) : fMaxHi;
+                fMaxHi = fMaxHi < (rbr * 2 + kMax.y + th + schi) ? (rbr * 2 + kMax.y + th + schi) : fMaxHi;
             minXb |= kMinXb, maxXb |= kMaxXb, minYb |= kMinYb, maxYb |= kMaxYb;
             if( hatStyle( Style::HeightChangeable ) )
             {
-                if( ( moving | 0x1 ) == moving ) // top
+                if( (moving | 0x1) == moving ) // top
                 {
                     pos.y -= my - me.my;
                     gr.y += my - me.my;
@@ -1228,7 +1233,7 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
                     rend = 1;
                     ret1 = 1;
                 }
-                else if( ( moving | 0x2 ) == moving ) // bottom
+                else if( (moving | 0x2) == moving ) // bottom
                 {
                     gr.y += me.my - my;
                     if( gr.y < fMinHi )
@@ -1247,7 +1252,7 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
             }
             if( hatStyle( Style::BreiteChangeable ) )
             {
-                if( ( moving | 0x4 ) == moving ) // left
+                if( (moving | 0x4) == moving ) // left
                 {
                     pos.x -= mx - me.mx;
                     gr.x += mx - me.mx;
@@ -1266,7 +1271,7 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
                     rend = 1;
                     ret1 = 1;
                 }
-                else if( ( moving | 0x8 ) == moving ) // right
+                else if( (moving | 0x8) == moving ) // right
                 {
                     gr.x += me.mx - mx;
                     if( gr.x < rbr * 2 + fMinBr )
@@ -1283,13 +1288,13 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
                     ret1 = 1;
                 }
             }
-            if( hatStyle( Style::TitelHeightChangeable ) && titel && ( moving | 0x10 ) == moving ) // titel height
+            if( hatStyle( Style::TitelHeightChangeable ) && titel && (moving | 0x10) == moving ) // titel height
             {
                 int maxTh = gr.y - rbr * 2 - schi;
                 if( kMaxYb )
-                    maxTh = maxTh < ( gr.x - rbr * 2 - kMin.y ) ? maxTh : ( gr.x - rbr * 2 - kMin.y );
+                    maxTh = maxTh < (gr.x - rbr * 2 - kMin.y) ? maxTh : (gr.x - rbr * 2 - kMin.y);
                 if( hatStyle( Style::Closable ) )
-                    maxTh = ( gr.x - th - 5 - rbr * 2 - me.my + my ) < 0 ? th : maxTh;
+                    maxTh = (gr.x - th - 5 - rbr * 2 - me.my + my) < 0 ? th : maxTh;
                 titel->setSize( titel->getBreite(), titel->getHeight() + me.my - my );
                 if( titel->getHeight() > maxTh )
                     titel->setSize( titel->getBreite(), maxTh );
@@ -1306,7 +1311,7 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
                     mx = me.mx, my = me.my;
                 me.verarbeitet = 1;
             }
-            if( hatStyle( Style::Beweglich ) && ( moving | 0x20 ) == moving ) // move
+            if( hatStyle( Style::Beweglich ) && (moving | 0x20) == moving ) // move
             {
                 pos.x += me.mx - mx;
                 pos.y += me.my - my;
@@ -1341,13 +1346,13 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
             mx = me.mx, my = me.my;
             if( me.mx >= 0 && me.mx < gr.x && me.my >= 0 && me.my < rbr + 5 )
                 moving |= 0x1;
-            if( me.mx >= 0 && me.mx < gr.x && me.my >= gr.y - ( rbr + 5 ) && me.my < gr.y )
+            if( me.mx >= 0 && me.mx < gr.x && me.my >= gr.y - (rbr + 5) && me.my < gr.y )
                 moving |= 0x2;
             if( me.mx >= 0 && me.mx < rbr + 5 && me.my >= 0 && me.my < gr.y )
                 moving |= 0x4;
             if( me.mx >= gr.x - rbr - 5 && me.mx < gr.x && me.my >= 0 && me.my < gr.y )
                 moving |= 0x8;
-            if( titel && me.mx >= 0 && me.mx < gr.x && me.my >= titel->getHeight() && me.my < titel->getHeight() + 2 * ( rbr + 5 ) )
+            if( titel && me.mx >= 0 && me.mx < gr.x && me.my >= titel->getHeight() && me.my < titel->getHeight() + 2 * (rbr + 5) )
                 moving |= 0x10;
             if( titel && me.mx >= 0 && me.mx < gr.x && me.my >= rbr + 5 && me.my < titel->getHeight() )
                 moving |= 0x20;
@@ -1412,7 +1417,7 @@ void Fenster::doMausEreignis( MausEreignis &me, bool userRet )
 
 // nicht const 
 // -- Rahmen -- 
-void Fenster::setRahmenZ( Rahmen *ram ) // setzt den rahmen
+void Fenster::setRahmenZ( Rahmen* ram ) // setzt den rahmen
 {
     if( rahmen )
         rahmen->release();
@@ -1437,7 +1442,7 @@ void Fenster::setRBreite( int br ) // setzt die Breite des Rahmens
 }
 
 // -- Titel -- 
-void Fenster::setTitel( Text *txt ) // setzt den Titel
+void Fenster::setTitel( Text* txt ) // setzt den Titel
 {
     if( !titel )
         titel = new TextFeld();
@@ -1445,7 +1450,7 @@ void Fenster::setTitel( Text *txt ) // setzt den Titel
     rend = 1;
 }
 
-void Fenster::setTitelZ( Text *txt )
+void Fenster::setTitelZ( Text* txt )
 {
     if( !titel )
         titel = new TextFeld();
@@ -1453,7 +1458,7 @@ void Fenster::setTitelZ( Text *txt )
     rend = 1;
 }
 
-void Fenster::setTitel( const char *txt )
+void Fenster::setTitel( const char* txt )
 {
     if( !titel )
         titel = new TextFeld();
@@ -1461,7 +1466,7 @@ void Fenster::setTitel( const char *txt )
     rend = 1;
 }
 
-void Fenster::setTTextFeldZ( TextFeld *tf ) // setzt das Titel TextFeld
+void Fenster::setTTextFeldZ( TextFeld* tf ) // setzt das Titel TextFeld
 {
     if( titel )
         titel->release();
@@ -1470,7 +1475,7 @@ void Fenster::setTTextFeldZ( TextFeld *tf ) // setzt das Titel TextFeld
 }
 
 // -- Schrift -- 
-void Fenster::setTSchriftZ( Schrift *schrift ) // setzt die Titel Schrift
+void Fenster::setTSchriftZ( Schrift* schrift ) // setzt die Titel Schrift
 {
     if( !titel )
         titel = new TextFeld();
@@ -1504,7 +1509,7 @@ void Fenster::setTBgFarbe( int f ) // setzt Titel Hintergrund farbe
 }
 
 // -- Titel AlphaFeld -- 
-void Fenster::setTAlphaFeldZ( AlphaFeld *af ) // setzt das Titel AlphaFeld
+void Fenster::setTAlphaFeldZ( AlphaFeld* af ) // setzt das Titel AlphaFeld
 {
     if( !titel )
         titel = new TextFeld();
@@ -1529,7 +1534,7 @@ void Fenster::setTAfStrength( int st ) // setzt die St
 }
 
 // -- Titel Hintergrund Bild -- 
-void Fenster::setTBgBild( Bild *b ) // setzt das Titel Hintergrund Bild
+void Fenster::setTBgBild( Bild* b ) // setzt das Titel Hintergrund Bild
 {
     if( !titel )
         titel = new TextFeld();
@@ -1537,7 +1542,7 @@ void Fenster::setTBgBild( Bild *b ) // setzt das Titel Hintergrund Bild
     rend = 1;
 }
 
-void Fenster::setTBgBildZ( Bild *b )
+void Fenster::setTBgBildZ( Bild* b )
 {
     if( !titel )
         titel = new TextFeld();
@@ -1546,7 +1551,7 @@ void Fenster::setTBgBildZ( Bild *b )
 }
 
 // -- Titel Rahmen -- 
-void Fenster::setTRahmenZ( Rahmen *ram ) // set Titel Rahmen
+void Fenster::setTRahmenZ( Rahmen* ram ) // set Titel Rahmen
 {
     if( !titel )
         titel = new TextFeld();
@@ -1578,13 +1583,13 @@ void Fenster::setKBgFarbe( int f ) // setzt die K
 }
 
 // -- Körper Hintergrund Bild -- 
-void Fenster::setKBgBild( Bild *b ) // setzt das Körper Hintergrund Bild
+void Fenster::setKBgBild( Bild* b ) // setzt das Körper Hintergrund Bild
 {
     if( !bgBodyPicture )
         bgBodyPicture = new Bild();
     bgBodyPicture->neuBild( b->getBreite(), b->getHeight(), 0 );
-    int *buff1 = bgBodyPicture->getBuffer();
-    int *buff2 = b->getBuffer();
+    int* buff1 = bgBodyPicture->getBuffer();
+    int* buff2 = b->getBuffer();
     int gr = bgBodyPicture->getBreite() * bgBodyPicture->getHeight();
     for( int i = 0; i < gr; ++i )
         buff1[ i ] = buff2[ i ];
@@ -1592,7 +1597,7 @@ void Fenster::setKBgBild( Bild *b ) // setzt das K
     rend = 1;
 }
 
-void Fenster::setKBgBildZ( Bild *b )
+void Fenster::setKBgBildZ( Bild* b )
 {
     if( bgBodyPicture )
         bgBodyPicture->release();
@@ -1601,7 +1606,7 @@ void Fenster::setKBgBildZ( Bild *b )
 }
 
 // -- Körper AlphaFeld -- 
-void Fenster::setKAlphaFeldZ( AlphaFeld *af ) // setzt das Körper AlphaFeld
+void Fenster::setKAlphaFeldZ( AlphaFeld* af ) // setzt das Körper AlphaFeld
 {
     if( bodyBuffer )
         bodyBuffer->release();
@@ -1626,7 +1631,7 @@ void Fenster::setKAfStrength( int st ) // setzt die St
 }
 
 // -- Schließen --
-void Fenster::setClosingMeParam( void *param )
+void Fenster::setClosingMeParam( void* param )
 {
     closingMeParam = param;
 }
@@ -1644,13 +1649,13 @@ void Fenster::setSBgFarbe( int f ) // setzt die Schlie
 }
 
 // -- Schließen Hintergrund Bild -- 
-void Fenster::setSBgBild( Bild *b ) // setzt das Schließ Hintergrund Bild
+void Fenster::setSBgBild( Bild* b ) // setzt das Schließ Hintergrund Bild
 {
     if( !bgClosingBild )
         bgClosingBild = new Bild();
     bgClosingBild->neuBild( b->getBreite(), b->getHeight(), 0 );
-    int *buff1 = bgClosingBild->getBuffer();
-    int *buff2 = b->getBuffer();
+    int* buff1 = bgClosingBild->getBuffer();
+    int* buff2 = b->getBuffer();
     int gr = bgClosingBild->getBreite() * bgClosingBild->getHeight();
     for( int i = 0; i < gr; ++i )
         buff1[ i ] = buff2[ i ];
@@ -1658,7 +1663,7 @@ void Fenster::setSBgBild( Bild *b ) // setzt das Schlie
     rend = 1;
 }
 
-void Fenster::setSBgBildZ( Bild *b )
+void Fenster::setSBgBildZ( Bild* b )
 {
     if( bgClosingBild )
         bgClosingBild->release();
@@ -1667,7 +1672,7 @@ void Fenster::setSBgBildZ( Bild *b )
 }
 
 // -- Schließen AlphaFeld -- 
-void Fenster::setSAlphaFeldZ( AlphaFeld *af ) // setzt das Schließ AlphaFeld
+void Fenster::setSAlphaFeldZ( AlphaFeld* af ) // setzt das Schließ AlphaFeld
 {
     if( closeBuffer )
         closeBuffer->release();
@@ -1692,7 +1697,7 @@ void Fenster::setSAfStrength( int st ) // setzt die St
 }
 
 // -- Schließen Klick AlphaFeld -- 
-void Fenster::setSKAlphaFeldZ( AlphaFeld *af ) // setzt das Schließ klick AlphaFeld
+void Fenster::setSKAlphaFeldZ( AlphaFeld* af ) // setzt das Schließ klick AlphaFeld
 {
     if( closeKlickBuffer )
         closeKlickBuffer->release();
@@ -1723,7 +1728,7 @@ void Fenster::setMin( int mx, int my ) // setzt die Mindest Fenster Gr
     min.y = my;
 }
 
-void Fenster::setMin( const Punkt &min )
+void Fenster::setMin( const Punkt& min )
 {
     this->min = min;
 }
@@ -1734,7 +1739,7 @@ void Fenster::setMax( int mx, int my ) // setzt die Maximale Fenster Gr
     max.y = my;
 }
 
-void Fenster::setMax( const Punkt &max )
+void Fenster::setMax( const Punkt& max )
 {
     this->max = max;
 }
@@ -1745,7 +1750,7 @@ void Fenster::setKMin( int mx, int my ) // setzt die Mindest K
     kMin.y = my;
 }
 
-void Fenster::setKMin( const Punkt &min )
+void Fenster::setKMin( const Punkt& min )
 {
     kMin = min;
 }
@@ -1756,13 +1761,13 @@ void Fenster::setKMax( int mx, int my ) // setzt die Maximale K
     kMax.y = my;
 }
 
-void Fenster::setKMax( const Punkt &max )
+void Fenster::setKMax( const Punkt& max )
 {
     kMax = max;
 }
 
 // -- scroll -- 
-void Fenster::setHScrollBarZ( HScrollBar *hScroll ) // setzt die Horizontale Scroll Bar
+void Fenster::setHScrollBarZ( HScrollBar* hScroll ) // setzt die Horizontale Scroll Bar
 {
     if( this->hScroll )
         this->hScroll->release();
@@ -1770,7 +1775,7 @@ void Fenster::setHScrollBarZ( HScrollBar *hScroll ) // setzt die Horizontale Scr
     rend = 1;
 }
 
-void Fenster::setVScrollBarZ( VScrollBar *vScroll ) // setzt die Vertikale Scroll BAr
+void Fenster::setVScrollBarZ( VScrollBar* vScroll ) // setzt die Vertikale Scroll BAr
 {
     if( this->vScroll )
         this->vScroll->release();
@@ -1826,7 +1831,7 @@ void Fenster::setVSBScroll( int scroll )
 }
 
 // -- Members -- 
-void Fenster::addMember( Zeichnung *obj ) // fügt einen Member hinzu
+void Fenster::addMember( Zeichnung* obj ) // fügt einen Member hinzu
 {
     if( !members )
         members = new RCArray<Zeichnung>();
@@ -1834,7 +1839,7 @@ void Fenster::addMember( Zeichnung *obj ) // f
     rend = 1;
 }
 
-void Fenster::removeMember( Zeichnung *zObj ) // entfernt einen Member
+void Fenster::removeMember( Zeichnung* zObj ) // entfernt einen Member
 {
     if( !members )
         return;
@@ -1866,7 +1871,7 @@ bool Fenster::tick( double tickval ) // tick
     }
     else if( members )
     {
-        for( Zeichnung *i : *members )
+        for( Zeichnung* i : *members )
             i->tick( tickval );
     }
     if( vScroll && hatStyle( Style::VScroll ) )
@@ -1876,7 +1881,7 @@ bool Fenster::tick( double tickval ) // tick
     return Zeichnung::tick( tickval );
 }
 
-void Fenster::doTastaturEreignis( TastaturEreignis &te )
+void Fenster::doTastaturEreignis( TastaturEreignis& te )
 {
     bool ntakc = !te.verarbeitet;
     if( hatStyle( Style::Sichtbar ) )
@@ -1906,7 +1911,7 @@ void Fenster::doTastaturEreignis( TastaturEreignis &te )
 }
 
 // -- Render -- 
-void Fenster::render( Bild &zRObj ) // zeichent nach zRObj
+void Fenster::render( Bild& zRObj ) // zeichent nach zRObj
 {
     if( hatStyle( Style::Sichtbar ) )
     {
@@ -2026,13 +2031,13 @@ void Fenster::render( Bild &zRObj ) // zeichent nach zRObj
         {
             if( !vSc && !hSc )
             {
-                for( Zeichnung *i : *members )
+                for( Zeichnung* i : *members )
                     i->render( zRObj );
             }
             else
             {
                 zRObj.addScrollOffset( hSc ? hScroll->getScroll() : 0, vSc ? vScroll->getScroll() : 0 );
-                for( Zeichnung *i : *members )
+                for( Zeichnung* i : *members )
                     i->render( zRObj );
             }
         }
@@ -2059,14 +2064,14 @@ int Fenster::getInnenHeight() const
 }
 
 // -- Rahmen -- 
-Rahmen *Fenster::getRahmen() const // gibt den Rahmen zurück
+Rahmen* Fenster::getRahmen() const // gibt den Rahmen zurück
 {
     if( !rahmen )
         return 0;
-    return dynamic_cast<Rahmen *>( rahmen->getThis() );
+    return dynamic_cast<Rahmen*>(rahmen->getThis());
 }
 
-Rahmen *Fenster::zRahmen() const
+Rahmen* Fenster::zRahmen() const
 {
     return rahmen;
 }
@@ -2086,41 +2091,41 @@ int Fenster::getRBreite() const // gibt die breite des Rahmens zur
 }
 
 // -- Titel  -- 
-Text *Fenster::getTitel() const // gibt den Titel zurück
+Text* Fenster::getTitel() const // gibt den Titel zurück
 {
     if( !titel )
         return 0;
     return titel->getText();
 }
 
-Text *Fenster::zTitel() const
+Text* Fenster::zTitel() const
 {
     if( !titel )
         return 0;
     return titel->zText();
 }
 
-TextFeld *Fenster::getTTextFeld() const // gibt das Titel TextFeld zurück
+TextFeld* Fenster::getTTextFeld() const // gibt das Titel TextFeld zurück
 {
     if( !titel )
         return 0;
-    return dynamic_cast<TextFeld *>( titel->getThis() );
+    return dynamic_cast<TextFeld*>(titel->getThis());
 }
 
-TextFeld *Fenster::zTTextFeld() const
+TextFeld* Fenster::zTTextFeld() const
 {
     return titel;
 }
 
 // -- Titel Schrift -- 
-Schrift *Fenster::getTSchrift() const // gibt die Titel Schrift zurück
+Schrift* Fenster::getTSchrift() const // gibt die Titel Schrift zurück
 {
     if( !titel )
         return 0;
     return titel->getSchrift();
 }
 
-Schrift *Fenster::zTSchrift() const
+Schrift* Fenster::zTSchrift() const
 {
     if( !titel )
         return 0;
@@ -2150,14 +2155,14 @@ int Fenster::getTBgFarbe() const // gibt die Titel Hintergrund Farbe zur
 }
 
 // -- Titel AlphaFeld -- 
-AlphaFeld *Fenster::getTAlphaFeld() const // gibt das Titel AlphaFeld zurück
+AlphaFeld* Fenster::getTAlphaFeld() const // gibt das Titel AlphaFeld zurück
 {
     if( !titel )
         return 0;
     return titel->getAlphaFeld();
 }
 
-AlphaFeld *Fenster::zTAlphaFeld() const
+AlphaFeld* Fenster::zTAlphaFeld() const
 {
     if( !titel )
         return 0;
@@ -2179,14 +2184,14 @@ int Fenster::getTAfStrength() const // gibt die St
 }
 
 // -- Titel Hintergrund Bild -- 
-Bild *Fenster::getTBgBild() const // gibt das Titel Hintergrund Bild zurück
+Bild* Fenster::getTBgBild() const // gibt das Titel Hintergrund Bild zurück
 {
     if( !titel )
         return 0;
     return titel->getHintergrundBild();
 }
 
-Bild *Fenster::zTBgBild() const
+Bild* Fenster::zTBgBild() const
 {
     if( !titel )
         return 0;
@@ -2194,14 +2199,14 @@ Bild *Fenster::zTBgBild() const
 }
 
 // -- Titel Rahmen -- 
-Rahmen *Fenster::getTRahmen() const // gibt den Titel Rahmen zurück
+Rahmen* Fenster::getTRahmen() const // gibt den Titel Rahmen zurück
 {
     if( !titel )
         return 0;
     return titel->getRahmen();
 }
 
-Rahmen *Fenster::zTRahmen() const
+Rahmen* Fenster::zTRahmen() const
 {
     if( !titel )
         return 0;
@@ -2229,27 +2234,27 @@ int Fenster::getKBgFarbe() const // gibt die K
 }
 
 // -- Körper Hintergrund Bild -- 
-Bild *Fenster::getKBgBild() const // gibt das Körper Hintergrund Bild zurück
+Bild* Fenster::getKBgBild() const // gibt das Körper Hintergrund Bild zurück
 {
     if( !bgBodyPicture )
         return 0;
-    return dynamic_cast<Bild *>( bgBodyPicture->getThis() );
+    return dynamic_cast<Bild*>(bgBodyPicture->getThis());
 }
 
-Bild *Fenster::zKBgBild() const
+Bild* Fenster::zKBgBild() const
 {
     return bgBodyPicture;
 }
 
 // -- Körper AlphaFeld -- 
-AlphaFeld *Fenster::getKAlphaFeld() const // gibt das Körper AlphaFeld zurück
+AlphaFeld* Fenster::getKAlphaFeld() const // gibt das Körper AlphaFeld zurück
 {
     if( !bodyBuffer )
         return 0;
-    return dynamic_cast<AlphaFeld *>( bodyBuffer->getThis() );
+    return dynamic_cast<AlphaFeld*>(bodyBuffer->getThis());
 }
 
-AlphaFeld *Fenster::zKAlphaFeld() const
+AlphaFeld* Fenster::zKAlphaFeld() const
 {
     return bodyBuffer;
 }
@@ -2275,27 +2280,27 @@ int Fenster::getSBgFarbe() const // gibt die Schlie
 }
 
 // -- Schließen Hintergrund Bild -- 
-Bild *Fenster::getSBgBild() const // gibt das Schließ Hintergrund Bild zurück
+Bild* Fenster::getSBgBild() const // gibt das Schließ Hintergrund Bild zurück
 {
     if( !bgClosingBild )
         return 0;
-    return dynamic_cast<Bild *>( bgClosingBild->getThis() );
+    return dynamic_cast<Bild*>(bgClosingBild->getThis());
 }
 
-Bild *Fenster::zSBgBild() const
+Bild* Fenster::zSBgBild() const
 {
     return bgClosingBild;
 }
 
 // -- Schließen AlphaFeld -- 
-AlphaFeld *Fenster::getSAlphaFeld() const // gibt das Schließ AlphaFeld zurück
+AlphaFeld* Fenster::getSAlphaFeld() const // gibt das Schließ AlphaFeld zurück
 {
     if( !closeBuffer )
         return 0;
-    return dynamic_cast<AlphaFeld *>( closeBuffer->getThis() );
+    return dynamic_cast<AlphaFeld*>(closeBuffer->getThis());
 }
 
-AlphaFeld *Fenster::zSAlphaFeld() const
+AlphaFeld* Fenster::zSAlphaFeld() const
 {
     return closeBuffer;
 }
@@ -2315,14 +2320,14 @@ int Fenster::getSAfStrength() const // gibt die St
 }
 
 // -- Schließen Klick AlphaFeld -- 
-AlphaFeld *Fenster::getSKAlphaFeld() const // gibt das Schließ Klick AlphaFeld zurück
+AlphaFeld* Fenster::getSKAlphaFeld() const // gibt das Schließ Klick AlphaFeld zurück
 {
     if( !closeKlickBuffer )
         return 0;
-    return dynamic_cast<AlphaFeld *>( closeKlickBuffer->getThis() );
+    return dynamic_cast<AlphaFeld*>(closeKlickBuffer->getThis());
 }
 
-AlphaFeld *Fenster::zSKAlphaFeld() const
+AlphaFeld* Fenster::zSKAlphaFeld() const
 {
     return closeKlickBuffer;
 }
@@ -2342,63 +2347,63 @@ int Fenster::getSKAfStrength() const // gibt die St
 }
 
 // -- min max -- 
-const Punkt &Fenster::getMin() const // gibt die minimale Fenstergröße zurück
+const Punkt& Fenster::getMin() const // gibt die minimale Fenstergröße zurück
 {
     return min;
 }
 
-const Punkt &Fenster::getMax() const // gibt die maximale Fenstergröße zurück
+const Punkt& Fenster::getMax() const // gibt die maximale Fenstergröße zurück
 {
     return max;
 }
 
-const Punkt &Fenster::getKMin() const // gibt die minimale Fenstergröße zurück
+const Punkt& Fenster::getKMin() const // gibt die minimale Fenstergröße zurück
 {
     return kMin;
 }
 
-const Punkt &Fenster::getKMax() const // gibt die maximale Fenstergröße zurück
+const Punkt& Fenster::getKMax() const // gibt die maximale Fenstergröße zurück
 {
     return kMax;
 }
 
 // -- scroll -- 
-VScrollBar *Fenster::getVScrollBar() const // gibt die Vertikale Scroll Bar zurück
+VScrollBar* Fenster::getVScrollBar() const // gibt die Vertikale Scroll Bar zurück
 {
     if( !vScroll )
         return 0;
-    return dynamic_cast<VScrollBar *>( vScroll->getThis() );
+    return dynamic_cast<VScrollBar*>(vScroll->getThis());
 }
 
-VScrollBar *Fenster::zVScrollBar() const
+VScrollBar* Fenster::zVScrollBar() const
 {
     return vScroll;
 }
 
-HScrollBar *Fenster::getHScrollBar() const // gibt die Horizontale Scroll Bar zurück
+HScrollBar* Fenster::getHScrollBar() const // gibt die Horizontale Scroll Bar zurück
 {
     if( !hScroll )
         return 0;
-    return dynamic_cast<HScrollBar *>( hScroll->getThis() );
+    return dynamic_cast<HScrollBar*>(hScroll->getThis());
 }
 
-HScrollBar *Fenster::zHScrollBar() const
+HScrollBar* Fenster::zHScrollBar() const
 {
     return hScroll;
 }
 
 // -- Members -- 
-Iterator<Zeichnung *> Fenster::getMembers() const // gibt die Members zurück
+Iterator<Zeichnung*> Fenster::getMembers() const // gibt die Members zurück
 {
     if( !members )
-        return Iterator<Zeichnung *>( 0 );
+        return Iterator<Zeichnung*>( 0 );
     return members->begin();
 }
 
 // -- Kopie --
-Zeichnung *Fenster::dublizieren() const // Erzeugt eine Kopie des Fensters
+Zeichnung* Fenster::dublizieren() const // Erzeugt eine Kopie des Fensters
 {
-    Fenster *ret = new Fenster();
+    Fenster* ret = new Fenster();
     ret->setPosition( pos );
     ret->setSize( gr );
     ret->setMausEreignisParameter( makParam );
@@ -2406,7 +2411,7 @@ Zeichnung *Fenster::dublizieren() const // Erzeugt eine Kopie des Fensters
     ret->setMausEreignis( mak );
     ret->setTastaturEreignis( tak );
     if( toolTip )
-        ret->setToolTipZ( (ToolTip *)toolTip->dublizieren() );
+        ret->setToolTipZ( (ToolTip*)toolTip->dublizieren() );
     ret->setStyle( style );
     ret->setClosingMeParam( closingMeParam );
     ret->setClosingMe( closingMe );
@@ -2416,10 +2421,10 @@ Zeichnung *Fenster::dublizieren() const // Erzeugt eine Kopie des Fensters
         ret->setRFarbe( rahmen->getFarbe() );
     }
     if( titel )
-        ret->setTTextFeldZ( (TextFeld *)titel->dublizieren() );
+        ret->setTTextFeldZ( (TextFeld*)titel->dublizieren() );
     ret->setKBgFarbe( bgBodyColor );
     if( bgBodyPicture )
-        ret->setKBgBild( dynamic_cast<Bild *>( bgBodyPicture->getThis() ) );
+        ret->setKBgBild( dynamic_cast<Bild*>(bgBodyPicture->getThis()) );
     if( bodyBuffer )
     {
         ret->setKAfFarbe( bodyBuffer->getFarbe() );
@@ -2427,7 +2432,7 @@ Zeichnung *Fenster::dublizieren() const // Erzeugt eine Kopie des Fensters
     }
     ret->setSBgFarbe( bgClosingFarbe );
     if( bgClosingBild )
-        ret->setSBgBild( dynamic_cast<Bild *>( bgClosingBild->getThis() ) );
+        ret->setSBgBild( dynamic_cast<Bild*>(bgClosingBild->getThis()) );
     if( closeBuffer )
     {
         ret->setSAfFarbe( closeBuffer->getFarbe() );

+ 101 - 97
Fenster.h

@@ -41,14 +41,14 @@ namespace Framework
     private:
         HWND hWnd; //! Handel zum Fenster
         int style;
-        void *makParam;
-        void *sakParam;
-        void *takParam;
+        void* makParam;
+        void* sakParam;
+        void* takParam;
         MausAktion mausAktion;
         std::function< void( void*, void* ) > vCloseAktion;
         std::function< void( void*, void* ) > nCloseAktion;
         TastaturAktion tastaturAktion;
-        Bildschirm *screen;
+        Bildschirm* screen;
         int mx, my;
         bool verschiebbar;
         HWND rahmen;
@@ -79,10 +79,14 @@ namespace Framework
         DLLEXPORT bool setFokus();
         //! Setzt die Position des fensters auf dem Bildschirm
         //! \param pos Die Position in Pixeln
-        DLLEXPORT void setPosition( Punkt &pos );
+        DLLEXPORT void setPosition( Punkt& pos );
+        //! Setzt die Position des fensters auf dem Bildschirm
+        //! \param x Die X Position in Pixeln
+        //! \param y Die Y Position in Pixeln
+        DLLEXPORT void setPosition( int x, int y );
         //! Setzt die Größe des Fensters auf dem Bildschirm
         //! \param größe Die Größe in Pixeln
-        DLLEXPORT void setSize( Punkt &größe );
+        DLLEXPORT void setSize( Punkt& größe );
         //! Setzt die Größe des Fensters auf dem Bildschirm
         //! \param breite Die Breite in Pixeln
         //! \param höhe Die Höhe in Pixeln
@@ -90,33 +94,33 @@ namespace Framework
         //! Setzt die Position und die Größe des Fensters
         //! \param pos Die Position in Pixeln
         //! \param größe Die Größe in Pixeln
-        DLLEXPORT void setBounds( Punkt &pos, Punkt &größe );
+        DLLEXPORT void setBounds( Punkt& pos, Punkt& größe );
         //! Setzt das Verwendete Bildschirm Objekt, um Tastatur und Maus Eingaben an die Objekte des Frameworks weiterzugeben. Muss vor dem Zerstören des Fensters mit 0 aufgerufen werden.
         //! \param screen Das Bildschirm Objekt
-        DLLEXPORT void setBildschirm( Bildschirm *screen );
+        DLLEXPORT void setBildschirm( Bildschirm* screen );
         //! Zerstört das Fenster
         DLLEXPORT void zerstören();
         //! Verarbeitet Maus Nachrichten. Ruft MausAktion auf und gibt die Ereignisse an den Bildschirm mit den Objekten weiter, wenn MausAktion 1 zurückgibt
         //! \param me Das Ereignis, was durch die Mauseingabe ausgelößt wurde
-        DLLEXPORT void doMausAktion( MausEreignis &me );
+        DLLEXPORT void doMausAktion( MausEreignis& me );
         //! Ruft die VSchließAktion Rückruffunktion auf
         DLLEXPORT void doVSchließAktion();
         //! Ruft die NSchließAktion Rückruffunktion auf
         DLLEXPORT void doNSchließAktion();
         //! Verarbeitet Tastatur Nachrichten. Ruft TastaturAktion auf und gibt die Ereignisse an den Bildschirm mit den Objekten weiter, wenn TastaturAktion 1 zurückgibt
         //! \param me Das Ereignis, was durch die Tastatureingabe ausgelößt wurde
-        DLLEXPORT void doTastaturAktion( TastaturEreignis &et );
+        DLLEXPORT void doTastaturAktion( TastaturEreignis& et );
         //! Macht den Rahmen des Fensters sichtbar, fals ladeRahmenFenster aufgerufen wurde
         DLLEXPORT void doRestoreMessage();
         //! setzt den Parameter, der bei einem Maus Ereignis an die Rückruffunktion übergeben wird
         //! \param p Der Parameter
-        DLLEXPORT void setMausEreignisParameter( void *p );
+        DLLEXPORT void setMausEreignisParameter( void* p );
         //! setzt den Parameter, der beim Schließen an die Rückruffunktion übergeben wird
         //! \param p Der Parameter
-        DLLEXPORT void setSchließEreignisParameter( void *p );
+        DLLEXPORT void setSchließEreignisParameter( void* p );
         //! Setzt den Parameter, der bei einem Tastatur Ereignis an die Rückruffunktion übergeben wird
         //! \param p Der Parameter
-        DLLEXPORT void setTastaturEreignisParameter( void *p );
+        DLLEXPORT void setTastaturEreignisParameter( void* p );
         //! Setzt die Rückruffunktion, die bei einem Maus Ereignis aufgerufen werden soll.
         //! Wenn die Rückruffunktion 0 zurückgiebt, oder nicht gesetzt wurde, wird ein Maus Ereignis von dem Fenster nicht weiter beachtet
         //! Es kann die Standartfunktion __ret1ME verwendet werden, die in MausEreignis.h definiert ist und immer 1 zurückgibt
@@ -143,7 +147,7 @@ namespace Framework
         //! Setzt einen Transparenten Rahmen um das Fenster
         //! \param zBild Ein Bild, was den Rahmen enthält
         //! \param hins Die HINSTANCE des Programms (Wird vom Framework an die Start funktion in der Startparam Struktur übergeben)
-        DLLEXPORT void ladeRahmenFenster( Bild *zBild, HINSTANCE hinst ); //! setzt einen Transpatenten Rahmen um das Fenster
+        DLLEXPORT void ladeRahmenFenster( Bild* zBild, HINSTANCE hinst ); //! setzt einen Transpatenten Rahmen um das Fenster
         //! Gibt das Handle des verwalteten Fensters zurück
         DLLEXPORT HWND getFensterHandle() const;
         //! Gibt die Position des Fensters in Pixeln zurück
@@ -165,9 +169,9 @@ namespace Framework
         //! Gibt zurück, ob eine Rückruffunktion für ein TastaturEreignis gesetzt wurde
         DLLEXPORT bool hatTastaturAktion() const;
         //! Gibt den Bidschirm zurück, an dessen Zeichnungen die Ereignisse Weitergegeben werden
-        DLLEXPORT Bildschirm *getBildschirm() const;
+        DLLEXPORT Bildschirm* getBildschirm() const;
         //! Gibt den Bildschirm ohne erhöhten Reference Counter zurück, an dessen Zeichnungen die Ereignisse Weitergegeben werden
-        DLLEXPORT Bildschirm *zBildschirm() const;
+        DLLEXPORT Bildschirm* zBildschirm() const;
         //! Gibt zurück, ob das Fenster verschiebbar ist
         DLLEXPORT bool istVerschiebbar() const;
     };
@@ -176,8 +180,8 @@ namespace Framework
     class WFensterArray
     {
     private:
-        WFensterArray *next;
-        WFenster *This;
+        WFensterArray* next;
+        WFenster* This;
 
     public:
         //! Konstruktor 
@@ -186,10 +190,10 @@ namespace Framework
         DLLEXPORT ~WFensterArray();
         //! Fügt ein neues Fenster hinzu
         //! \param fenster Das Fenster
-        DLLEXPORT bool addFenster( WFenster *fenster );
+        DLLEXPORT bool addFenster( WFenster* fenster );
         //! Entfernt ein Fenster
         //! \param fenster Das Fenster
-        DLLEXPORT bool removeFenster( WFenster *fenster );
+        DLLEXPORT bool removeFenster( WFenster* fenster );
         //! gibt das nächste Element zurück
         DLLEXPORT WFensterArray* getNext();
         //! Setzt das nächste Element auf 0
@@ -205,16 +209,16 @@ namespace Framework
         //! Sendet ein Maus Ereignis an ein bestimmtes Fenster
         //! \param hWnd Das Handle zum Fenster
         //! \param me Das Ereignis, was durch die Mauseingabe ausgelößt wurde
-        DLLEXPORT bool sendMausMessage( HWND hWnd, MausEreignis &me );
+        DLLEXPORT bool sendMausMessage( HWND hWnd, MausEreignis& me );
         //! Sendet ein Tastatur Ereignis an ein bestimmtes Fenster
         //! \param hWnd Das Handle zum Fenster
         //! \param me Das Ereignis, was durch die Tastatureingabe ausgelößt wurde
-        DLLEXPORT bool sendTastaturMessage( HWND hwnd, TastaturEreignis &te );
+        DLLEXPORT bool sendTastaturMessage( HWND hwnd, TastaturEreignis& te );
         //! Sendet das Ereignis, was durch das öffnen des Fensters ausgelößt wurde an ein bestimmtes Fenster
         //! \param hWnd Das Handle zum Fenster
         DLLEXPORT bool sendRestoreMessage( HWND hwnd );
         //! Gibt das Fenster dieses Eintrags zurück
-        DLLEXPORT WFenster *getThis();
+        DLLEXPORT WFenster* getThis();
     };
 
     //! Erzeugt ein Windows API Popup Fenster, mit einer Meldung
@@ -222,7 +226,7 @@ namespace Framework
     //! \param titel Der Titel des Popup Fensters
     //! \param meldung Die Meldung, die im Fenster angezeigt werden soll
     //! \param style Bestimmt das Icon, was im Fenster angezeigt wird. Beispiel: MB_ICONERROR, MB_ICONINFORMATION
-    DLLEXPORT void WMessageBox( HWND hWnd, Text *titel, Text *meldung, UINT style );
+    DLLEXPORT void WMessageBox( HWND hWnd, Text* titel, Text* meldung, UINT style );
 #endif
     //! Fenster Klasse im Programm
     class Fenster : public Zeichnung
@@ -272,19 +276,19 @@ namespace Framework
         };
     private:
         MausAktion closingMe;
-        void *closingMeParam;
-        Rahmen *rahmen;
-        TextFeld *titel;
-        RCArray<Zeichnung> *members;
+        void* closingMeParam;
+        Rahmen* rahmen;
+        TextFeld* titel;
+        RCArray<Zeichnung>* members;
         int bgBodyColor;
-        Bild *bgBodyPicture;
-        AlphaFeld *bodyBuffer;
+        Bild* bgBodyPicture;
+        AlphaFeld* bodyBuffer;
         int bgClosingFarbe;
-        Bild *bgClosingBild;
-        AlphaFeld *closeBuffer;
-        AlphaFeld *closeKlickBuffer;
-        VScrollBar *vScroll;
-        HScrollBar *hScroll;
+        Bild* bgClosingBild;
+        AlphaFeld* closeBuffer;
+        AlphaFeld* closeKlickBuffer;
+        VScrollBar* vScroll;
+        HScrollBar* hScroll;
         Punkt min, max;
         Punkt kMin, kMax;
         bool closeKlick, klick;
@@ -292,7 +296,7 @@ namespace Framework
         int mx, my;
         //! Verarbeitet Maus Nachrichten
         //! \param me Das Ereignis, was durch die Mauseingabe ausgelößt wurde
-        DLLEXPORT void doMausEreignis( MausEreignis &me, bool userRet ) override;
+        DLLEXPORT void doMausEreignis( MausEreignis& me, bool userRet ) override;
 
     public:
         //! Konstruktor 
@@ -301,7 +305,7 @@ namespace Framework
         DLLEXPORT virtual ~Fenster();
         //! Setzt einen Zeiger auf den Rahmen des Fensters
         //! \param ram Der Rahmen
-        DLLEXPORT void setRahmenZ( Rahmen *ram );
+        DLLEXPORT void setRahmenZ( Rahmen* ram );
         //! Setzt die Farbe des Fensterrahmens
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setRFarbe( int f );
@@ -310,19 +314,19 @@ namespace Framework
         DLLEXPORT void setRBreite( int br );
         //! Setzt den Titel des Fensters
         //! \param txt Der Text
-        DLLEXPORT void setTitel( Text *txt );
+        DLLEXPORT void setTitel( Text* txt );
         //! Setzt einen Zeiger auf den Titel Text
         //! \param txt Der neue Text
-        DLLEXPORT void setTitelZ( Text *txt );
+        DLLEXPORT void setTitelZ( Text* txt );
         //! Setzt den Titel des Fensters
         //! \param txt Der Textv
-        DLLEXPORT void setTitel( const char *txt );
+        DLLEXPORT void setTitel( const char* txt );
         //! Setzt einen Zeiger auf das TextFeld, das den Titeltext zeichnet
         //! \param tf Das TextFeld
-        DLLEXPORT void setTTextFeldZ( TextFeld *tf );
+        DLLEXPORT void setTTextFeldZ( TextFeld* tf );
         //! Setzt die Schrift, die für den Titel verwendet werden soll
         //! \param schrift Die Schrift
-        DLLEXPORT void setTSchriftZ( Schrift *schrift );
+        DLLEXPORT void setTSchriftZ( Schrift* schrift );
         //! Setzt die Farbe der Schrift, die für den Titel verwendet werden soll
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setTSFarbe( int f );
@@ -334,7 +338,7 @@ namespace Framework
         DLLEXPORT void setTBgFarbe( int f );
         //! Setzt einen Zeiger auf den Farbübergang des Titels
         //! \param af Der Farbübergang
-        DLLEXPORT void setTAlphaFeldZ( AlphaFeld *af );
+        DLLEXPORT void setTAlphaFeldZ( AlphaFeld* af );
         //! Setzt die Farbe des Farbübergangs des Titels
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setTAfFarbe( int f );
@@ -343,13 +347,13 @@ namespace Framework
         DLLEXPORT void setTAfStrength( int st );
         //! Setzt das Hintergrund Bild des Titels durch kopieren
         //! \param b Das Bild, was kopiert werden soll
-        DLLEXPORT void setTBgBild( Bild *b );
+        DLLEXPORT void setTBgBild( Bild* b );
         //! Setzt einen Zeiger auf das Hintergrund Bild des Titels
         //! \param b Das Bild
-        DLLEXPORT void setTBgBildZ( Bild *b );
+        DLLEXPORT void setTBgBildZ( Bild* b );
         //! Setzt einen Zeiger auf den Rahmen des Titels
         //! \param ram Der Rahmen
-        DLLEXPORT void setTRahmenZ( Rahmen *ram );
+        DLLEXPORT void setTRahmenZ( Rahmen* ram );
         //! Setzt die Farbe des Rahmens des Titels
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setTRFarbe( int f );
@@ -361,13 +365,13 @@ namespace Framework
         DLLEXPORT void setKBgFarbe( int f );
         //! Setzt das Hintergrund Bild des Körpers durch kopieren
         //! \param b Das Bild, das kopiert werden soll
-        DLLEXPORT void setKBgBild( Bild *b );
+        DLLEXPORT void setKBgBild( Bild* b );
         //! Setzt einen Zeiger auf das Hintergrund Bild des Körpers
         //! \param b Das Bild
-        DLLEXPORT void setKBgBildZ( Bild *b );
+        DLLEXPORT void setKBgBildZ( Bild* b );
         //! Setzt einen Zeiger auf den Farbübergang des Körpers
         //! \param af Der Farbübergang
-        DLLEXPORT void setKAlphaFeldZ( AlphaFeld *af );
+        DLLEXPORT void setKAlphaFeldZ( AlphaFeld* af );
         //! Setzt die Farbe des Farbübergangs des Körpers
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setKAfFarbe( int f );
@@ -376,7 +380,7 @@ namespace Framework
         DLLEXPORT void setKAfStrength( int st );
         //! Setzt den Parameter der Rückruffunktion, die aufgerufen wird, wenn der Schließen Knopf ein MausEreignis erhält
         //! \param param Der Parameter
-        DLLEXPORT void setClosingMeParam( void *param );
+        DLLEXPORT void setClosingMeParam( void* param );
         //! Setzt die Rückruffunktion, die Aufgerufen wird, wenn der Schließen Knopf ein MausEreignis erhält
         //! Wenn die Rückruffunktion 0 zurückgiebt, oder nicht gesetzt wurde, wird ein Maus Ereignis von der Zeichnung nicht weiter beachtet
         //! Das Fenster wird nicht von selbst geschlossen, sondern sollte in der Rückruffunktion durch den aufruf von löscheStyle( Fenster::Style::Sichtbar ); geschlossen werden
@@ -387,13 +391,13 @@ namespace Framework
         DLLEXPORT void setSBgFarbe( int f );
         //! Setzt das Hintergrund Bild des Schließen Knopfes durch kopieren
         //! \param b Das Bild, das kopiert werden soll
-        DLLEXPORT void setSBgBild( Bild *b );
+        DLLEXPORT void setSBgBild( Bild* b );
         //! Setzt einen Zeiger auf das Hintergrund Bild des Schließen Knopfes
         //! \param b Das Bild
-        DLLEXPORT void setSBgBildZ( Bild *b );
+        DLLEXPORT void setSBgBildZ( Bild* b );
         //! Setzt einen Zeiger auf den Farbübergang des Schließen Knopfes
         //! \param af Der Farbübergang
-        DLLEXPORT void setSAlphaFeldZ( AlphaFeld *af );
+        DLLEXPORT void setSAlphaFeldZ( AlphaFeld* af );
         //! Setzt die Farbe des Farbübergangs des Schließen Knopfes
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setSAfFarbe( int f );
@@ -402,7 +406,7 @@ namespace Framework
         DLLEXPORT void setSAfStrength( int st );
         //! Setzt einen Zeiger auf den Farbübergang, der beim Klicken des Schließen Knopfes verwendet wird
         //! \param af Der Farbübergnag
-        DLLEXPORT void setSKAlphaFeldZ( AlphaFeld *af );
+        DLLEXPORT void setSKAlphaFeldZ( AlphaFeld* af );
         //! Setzt die Farbe des Farbübergangs, der beim Klicken des Schließen Knopfes verwendet wird
         //! \param f Die Farbe im A8R8G8B8 Format
         DLLEXPORT void setSKAfFarbe( int f );
@@ -415,34 +419,34 @@ namespace Framework
         DLLEXPORT void setMin( int mx, int my );
         //! Setzt die Minimale Größe des Fensters
         //! \param min Die Minimale Breite und Höhe in Pixeln
-        DLLEXPORT void setMin( const Punkt &min );
+        DLLEXPORT void setMin( const Punkt& min );
         //! Setzt die Maximale Größe des Fensters
         //! \param mx Die Maximale Breite in Pixeln
         //! \param my Die Maximale Höhe in Pixeln
         DLLEXPORT void setMax( int mx, int my );
         //! Setzt die Maximale Größe des Fensters
         //! \param min Die Maximale Breite und Höhe in Pixeln
-        DLLEXPORT void setMax( const Punkt &max );
+        DLLEXPORT void setMax( const Punkt& max );
         //! Setzt die Minimale Größe des Fenster Körpers
         //! \param mx Die Minimale Breite in Pixeln
         //! \param my Die Minimale Höhe in Pixeln
         DLLEXPORT void setKMin( int mx, int my );
         //! Setzt die Minimale Größe des Fenster Körpers
         //! \param min Die Minimale Breite und Höhe in Pixeln
-        DLLEXPORT void setKMin( const Punkt &min );
+        DLLEXPORT void setKMin( const Punkt& min );
         //! Setzt die Maximale Größe des Fenster Körpers
         //! \param mx Die Maximale Breite in Pixeln
         //! \param my Die Maximale Höhe in Pixeln
         DLLEXPORT void setKMax( int mx, int my );
         //! Setzt die Maximale Größe des Fenster Körpers
         //! \param min Die Maximale Breite und Höhe in Pixeln
-        DLLEXPORT void setKMax( const Punkt &max );
+        DLLEXPORT void setKMax( const Punkt& max );
         //! Setzt einen Zeiger auf die Scrollbar am unteren Rand des Fensters
         //! \param hScroll Die Scrollbar
-        DLLEXPORT void setHScrollBarZ( HScrollBar *hScroll );
+        DLLEXPORT void setHScrollBarZ( HScrollBar* hScroll );
         //! Setzt einen Zeiger auf die Scrollbar am rechten Rand des Fensters
         //! \param vScroll Die Scrollbar
-        DLLEXPORT void setVScrollBarZ( VScrollBar *vScroll );
+        DLLEXPORT void setVScrollBarZ( VScrollBar* vScroll );
         //! Setzt die Maximale Scroll breite des Fenster Körpers
         //! \param max Die Breite in Pixeln
         DLLEXPORT void setHSBMax( int max );
@@ -457,10 +461,10 @@ namespace Framework
         DLLEXPORT void setVSBScroll( int scroll );
         //! Fügt dem Fenster eine Zeichnung hinzu
         //! \param obj Die Zeichnung
-        DLLEXPORT virtual void addMember( Zeichnung *obj );
+        DLLEXPORT virtual void addMember( Zeichnung* obj );
         //! Entfernt eine Zeichnung aus dem Fenster
         //! \param zObj Die Zeichnung (ohne erhöhten reference Counter)
-        DLLEXPORT virtual void removeMember( Zeichnung *zObj );
+        DLLEXPORT virtual void removeMember( Zeichnung* zObj );
         //! Entfernt alle Zeichnungen aus dem Fenster
         DLLEXPORT virtual void removeAll();
         //! Aktualisiert das Objekt. Wird vom Framework aufgerufen
@@ -469,34 +473,34 @@ namespace Framework
         DLLEXPORT bool tick( double tickval ) override;
         //! Verarbeitet Tastatur Nachrichten
         //! \param me Das Ereignis, was durch die Tastatureingabe ausgelößt wurde
-        DLLEXPORT void doTastaturEreignis( TastaturEreignis &te ) override;
+        DLLEXPORT void doTastaturEreignis( TastaturEreignis& te ) override;
         //! Zeichnet das Fentster nach zRObj, falls es sichtbar ist
         //! \param zRObj Das Bild, in welches gezeichnet werden soll
-        DLLEXPORT void render( Bild &zRObj ) override;
+        DLLEXPORT void render( Bild& zRObj ) override;
         //! Gibt die Breite des Innenraumes in der Zeichnung in Pixeln zurück
         DLLEXPORT int getInnenBreite() const override;
         //! Gibt die Höhe des Innenraumes in der Zeichnung in Pixeln zurück
         DLLEXPORT int getInnenHeight() const override;
         //! Gibt den Rahmen des Fensters zurück
-        DLLEXPORT Rahmen *getRahmen() const;
+        DLLEXPORT Rahmen* getRahmen() const;
         //! Gibt den Rahmen des Fensters ohne erhöhen Reference Counter zurück
-        DLLEXPORT Rahmen *zRahmen() const;
+        DLLEXPORT Rahmen* zRahmen() const;
         //! Gibt die Farbe des Rahmens des Fensters im A8R8G8B8 Format zurück
         DLLEXPORT int getRFarbe() const;
         //! Gibt die Breite des Rahmens des Fensters in Pixeln zurück
         DLLEXPORT int getRBreite() const;
         //! Gibt den Titel des Fensters zurück
-        DLLEXPORT Text *getTitel() const;
+        DLLEXPORT Text* getTitel() const;
         //! Gibt den Titel des Fensters ohne erhöhten Reference Counter zurück
-        DLLEXPORT Text *zTitel() const;
+        DLLEXPORT Text* zTitel() const;
         //! Gibt das TextFeld zurück, das zum Zeichnen des Titels verwendet wird
-        DLLEXPORT TextFeld *getTTextFeld() const;
+        DLLEXPORT TextFeld* getTTextFeld() const;
         //! Gibt das TextFeld ohne erhöhten Reference Counter zurück, das zum Zeichnen des Titels verwendet wird
-        DLLEXPORT TextFeld *zTTextFeld() const;
+        DLLEXPORT TextFeld* zTTextFeld() const;
         //! Gibt die Schrift zurück, die für den Titel verwendet wird
-        DLLEXPORT Schrift *getTSchrift() const;
+        DLLEXPORT Schrift* getTSchrift() const;
         //! Gibt die Schrift ohne erhöten Reference Counter zurück, die für den Titel verwendet wird
-        DLLEXPORT Schrift *zTSchrift() const;
+        DLLEXPORT Schrift* zTSchrift() const;
         //! Gibt die Schrift Farbe des Titels im A8R8G8B8 Format zurück
         DLLEXPORT int getTSFarbe() const;
         //! Gibt die Höhe einer Zeile des Titels in Pixeln zurück
@@ -504,21 +508,21 @@ namespace Framework
         //! Gibt die Hintergrundfarbe des Titels im A8R8G8B8 Format zurück
         DLLEXPORT int getTBgFarbe() const;
         //! Gibt den Farbübergang des Titels zurück
-        DLLEXPORT AlphaFeld *getTAlphaFeld() const;
+        DLLEXPORT AlphaFeld* getTAlphaFeld() const;
         //! Gibt den Farbübergang des Titels ohne erhöhten Reference COunter zurück
-        DLLEXPORT AlphaFeld *zTAlphaFeld() const;
+        DLLEXPORT AlphaFeld* zTAlphaFeld() const;
         //! Gibt die Farbe des Farbübergangs des Titels im A8R8G8B8 Format zurück
         DLLEXPORT int getTAfFarbe() const;
         //! Gibt die Stärke des Farbübergangs des Titels zurück
         DLLEXPORT int getTAfStrength() const;
         //! Gibt das Hintergrund Bild des titels zurück
-        DLLEXPORT Bild *getTBgBild() const;
+        DLLEXPORT Bild* getTBgBild() const;
         //! Gibt das Hintergrund Bild des titels ohne erhöhten Reference Counter zurück
-        DLLEXPORT Bild *zTBgBild() const;
+        DLLEXPORT Bild* zTBgBild() const;
         //! Gibt den Rahmen des Titels zurück
-        DLLEXPORT Rahmen *getTRahmen() const;
+        DLLEXPORT Rahmen* getTRahmen() const;
         //! Gibt den Rahmen des Titels ohne erhöhten Reference Counter zurück
-        DLLEXPORT Rahmen *zTRahmen() const;
+        DLLEXPORT Rahmen* zTRahmen() const;
         //! Gibt die Farbe des Rahmens des Titels im A8R8G8B8 Format zurück
         DLLEXPORT int getTRFarbe() const;
         //! Gibt die Stärke des Rahmens des Titels zurück
@@ -526,13 +530,13 @@ namespace Framework
         //! Gibt die Hintergrund Farbe des Körpers zurück
         DLLEXPORT int getKBgFarbe() const;
         //! Gibt das Hintergrund Bild des Körpers zurück
-        DLLEXPORT Bild *getKBgBild() const;
+        DLLEXPORT Bild* getKBgBild() const;
         //! Gibt das Hintergrund Bild des Körpers ohne erhöhten Reference Counter zurück
-        DLLEXPORT Bild *zKBgBild() const;
+        DLLEXPORT Bild* zKBgBild() const;
         //! Gibt den Farbübergang des Körpers zurück
-        DLLEXPORT AlphaFeld *getKAlphaFeld() const;
+        DLLEXPORT AlphaFeld* getKAlphaFeld() const;
         //! Gibt den Farbübergang des Körpers ohne erhöhten Reference Counter zurück
-        DLLEXPORT AlphaFeld *zKAlphaFeld() const;
+        DLLEXPORT AlphaFeld* zKAlphaFeld() const;
         //! Gibt die Farbe des Farbübergangs des Körpers im A8R8G8B8 Format zurück
         DLLEXPORT int getKAfFarbe() const;
         //! Gibt die Stärke des Farbübergangs des Körpers zurück
@@ -540,45 +544,45 @@ namespace Framework
         //! Gibt die Hintergrund Farbe des Schließen Knopfes im A8R8G8B8 Format zurück
         DLLEXPORT int getSBgFarbe() const;
         //! Gibt das Hintergrund Bild des Schließen Knopfes zurück
-        DLLEXPORT Bild *getSBgBild() const;
+        DLLEXPORT Bild* getSBgBild() const;
         //! Gibt das Hintergrund Bild des Schließen Knopfes ohne erhöhten Reference COunter zurück
-        DLLEXPORT Bild *zSBgBild() const;
+        DLLEXPORT Bild* zSBgBild() const;
         //! Gibt den Farbübergang des Schließen Knopfes zurück
-        DLLEXPORT AlphaFeld *getSAlphaFeld() const;
+        DLLEXPORT AlphaFeld* getSAlphaFeld() const;
         //! Gibt den Farbübergang des Schließen Knopfes ohne erhöhten Reference COunter zurück
-        DLLEXPORT AlphaFeld *zSAlphaFeld() const;
+        DLLEXPORT AlphaFeld* zSAlphaFeld() const;
         //! Gibt die Farbe des Farbübergangs des Schließen Knopfes im A8R8G8B8 Format zurück
         DLLEXPORT int getSAfFarbe() const;
         //! Gibt die Stärke des Farbübergangs des Schließen Knopfes zurück
         DLLEXPORT int getSAfStrength() const;
         //! Gibt den Farbübergang zurück, der verwendet wird, wenn auf den Schließen Knopf gedrückt wird
-        DLLEXPORT AlphaFeld *getSKAlphaFeld() const;
+        DLLEXPORT AlphaFeld* getSKAlphaFeld() const;
         //! Gibt den Farbübergang ohne erhöhten Reference Counter zurück, der verwendet wird, wenn auf den Schließen Knopf gedrückt wird
-        DLLEXPORT AlphaFeld *zSKAlphaFeld() const;
+        DLLEXPORT AlphaFeld* zSKAlphaFeld() const;
         //! Gibt die Farbe des Farbübergangs im A8R8G8B8 Format zurück, der verwendet wird, wenn auf den Schließen Knopf gedrückt wird
         DLLEXPORT int getSKAfFarbe() const;
         //! Gibt die Stärke des Farbübergangs zurück, der verwendet wird, wenn auf den Schließen Knopf gedrückt wird
         DLLEXPORT int getSKAfStrength() const;
         //! Gibt die minimale Fenstergröße in Pixeln zurück
-        DLLEXPORT const Punkt &getMin() const;
+        DLLEXPORT const Punkt& getMin() const;
         //! Gibt die maximale Fenstergröße in Pixeln zurück
-        DLLEXPORT const Punkt &getMax() const;
+        DLLEXPORT const Punkt& getMax() const;
         //! Gibt die minimale Körpergröße in Pixeln zurück
-        DLLEXPORT const Punkt &getKMin() const;
+        DLLEXPORT const Punkt& getKMin() const;
         //! Gibt die maximale Körpergröße in Pixeln zurück
-        DLLEXPORT const Punkt &getKMax() const;
+        DLLEXPORT const Punkt& getKMax() const;
         //! Gibt die Scrollbar vom rechten Fensterrand zurück
-        DLLEXPORT VScrollBar *getVScrollBar() const;
+        DLLEXPORT VScrollBar* getVScrollBar() const;
         //! Gibt die Scrollbar vom rechten Fensterrand ohne erhöhten Reference Counter zurück
-        DLLEXPORT VScrollBar *zVScrollBar() const;
+        DLLEXPORT VScrollBar* zVScrollBar() const;
         //! Gibt die Scrollbar vom unteren Fensterrand zurück
-        DLLEXPORT HScrollBar *getHScrollBar() const;
+        DLLEXPORT HScrollBar* getHScrollBar() const;
         //! Gibt die Scrollbar vom unteren Fensterrand ohne erhöhten Reference Counter zurück
-        DLLEXPORT HScrollBar *zHScrollBar() const;
+        DLLEXPORT HScrollBar* zHScrollBar() const;
         //! Gibt eine Liste mit Zeichnungen zurück, die im Fenster sind
         DLLEXPORT Iterator<Zeichnung*> getMembers() const;
         //! Erzeugt eine Kopie des Fensters, die ohne Auswirkungen auf das Original verändert werden kann
-        DLLEXPORT Zeichnung *dublizieren() const override;
+        DLLEXPORT Zeichnung* dublizieren() const override;
     };
 }
 #endif

+ 254 - 0
Framework Tests/Array.cpp

@@ -0,0 +1,254 @@
+#include "pch.h"
+#include "CppUnitTest.h"
+#include <Array.h>
+
+using namespace Microsoft::VisualStudio::CppUnitTestFramework;
+
+namespace FrameworkTests
+{
+    TEST_CLASS( ArrayTests )
+    {
+    public:
+
+        TEST_METHOD( EmtptyTest )
+        {
+            Framework::Array<int> array;
+            Assert::IsTrue( array.getEintragAnzahl() == 0, L"getEintragAnzahl() on empty array should be 0" );
+            int count = 0;
+            for( auto i : array ) count++;
+            Assert::IsTrue( count == 0, L"Iteration with : over an empty array should not do anything" );
+            auto end = array.end();
+            Assert::IsFalse( array.begin() != end, L"Iterator of an empty array should not have an element" );
+            Assert::IsFalse( array.hat( 0 ), L"Empty Array should not have an element" );
+        }
+
+        TEST_METHOD( AddTest )
+        {
+            Framework::Array<int> array;
+            array.add( 100 );
+            array.add( 20, 1 );
+            array.add( 10, 0 );
+            array.add( 0 );
+            Assert::IsTrue( array.getEintragAnzahl() == 4, L"after adding 4 elements getEintragAnzahl() should be 4" );
+            Assert::IsTrue( array.get( 0 ) == 10, L"invalid value at index 0 of array after adding elements" );
+            Assert::IsTrue( array.get( 1 ) == 100, L"invalid value at index 1 of array after adding elements" );
+            Assert::IsTrue( array.get( 2 ) == 20, L"invalid value at index 1 of array after adding elements" );
+            Assert::IsTrue( array.get( 3 ) == 0, L"invalid value at index 1 of array after adding elements" );
+            auto i = array.begin();
+            Assert::IsTrue( i.val() == 10, L"invalid value at index 0 of array after adding elements" );
+            i++;
+            Assert::IsTrue( i.val() == 100, L"invalid value at index 1 of array after adding elements" );
+            ++i;
+            Assert::IsTrue( i.val() == 20, L"invalid value at index 2 of array after adding elements" );
+            i = i.next();
+            Assert::IsTrue( i.val() == 0, L"invalid value at index 3 of array after adding elements" );
+            Assert::IsFalse( i.hasNext(), L"Iterator has to much elements after adding elements to array" );
+            auto end = array.end();
+            Assert::IsFalse( ++i != end, L"iterator should match end() after iterating throu the array" );
+        }
+
+        TEST_METHOD( RemoveTest )
+        {
+            Framework::Array<int> array;
+            array.add( 100 );
+            array.add( 20, 1 );
+            array.add( 10, 0 );
+            array.add( 0 );
+            array.remove( 3 );
+            array.remove( 1 );
+            array.remove( 0 );
+            Assert::IsTrue( array.getEintragAnzahl() == 1, L"after adding 4 elements and removing 3 elements getEintragAnzahl() should be 1" );
+            Assert::IsTrue( array.get( 0 ) == 20, L"invalid value at index 0 of array after removing elements" );
+            Assert::IsTrue( array.begin().val() == 20, L"invalid value at index 0 of array after removing elements" );
+            Assert::IsFalse( array.begin().hasNext(), L"Iterator has to many elements after removing elements" );
+            auto end = array.end();
+            Assert::IsFalse( array.begin().next() != end, L"Iterator has to many elements after removing elements" );
+        }
+
+        TEST_METHOD( SwapTest )
+        {
+            Framework::Array<int> array;
+            array.add( 100 );
+            array.add( 20, 1 );
+            array.add( 10, 0 );
+            array.add( 0 );
+            array.tausch( 0, 3 );
+            array.tausch( 1, 2 );
+            Assert::IsTrue( array.getEintragAnzahl() == 4, L"after adding 4 elements and swap elements getEintragAnzahl() should be 4" );
+            Assert::IsTrue( array.get( 0 ) == 0, L"invalid value at index 0 of array after swapping elements" );
+            Assert::IsTrue( array.get( 1 ) == 20, L"invalid value at index 1 of array after swapping elements" );
+            Assert::IsTrue( array.get( 2 ) == 100, L"invalid value at index 2 of array after swapping elements" );
+            Assert::IsTrue( array.get( 3 ) == 10, L"invalid value at index 3 of array after swapping elements" );
+            array.tausch( 2, 0 );
+            Assert::IsTrue( array.get( 2 ) == 0, L"invalid value at index 2 of array after swapping elements" );
+            Assert::IsTrue( array.get( 0 ) == 100, L"invalid value at index 0 of array after swapping elements" );
+        }
+
+        TEST_METHOD( SetTest )
+        {
+            Framework::Array<int> array;
+            array.add( 100 );
+            array.add( 20, 1 );
+            array.add( 10, 0 );
+            array.add( 0 );
+            array.set( 30, 0 );
+            array.set( 200, 3 );
+            array.set( 500, 1 );
+            Assert::IsTrue( array.getEintragAnzahl() == 4, L"after adding 4 elements and changing elements getEintragAnzahl() should be 4" );
+            Assert::IsTrue( array.get( 0 ) == 30, L"invalid value at index 0 of array after swapping elements" );
+            Assert::IsTrue( array.get( 1 ) == 500, L"invalid value at index 1 of array after swapping elements" );
+            Assert::IsTrue( array.get( 2 ) == 20, L"invalid value at index 2 of array after swapping elements" );
+            Assert::IsTrue( array.get( 3 ) == 200, L"invalid value at index 3 of array after swapping elements" );
+        }
+
+        TEST_METHOD( ValueTest )
+        {
+            Framework::Array<int> array;
+            array.add( 100 );
+            array.add( 20, 1 );
+            array.add( 10, 0 );
+            array.add( 0 );
+            array.removeValue( 10 );
+            Assert::IsTrue( array.getEintragAnzahl() == 3, L"after adding 4 elements and removing elements by value getEintragAnzahl() should be 3" );
+            Assert::IsTrue( array.getWertIndex( 0 ) == 2, L"invalid value index of value after removing elements" );
+            Assert::IsTrue( array.getWertIndex( 10 ) < 0, L"value is still in array after removeValue" );
+        }
+    };
+
+    template<typename T>
+    class Test : public Framework::ReferenceCounter
+    {
+        int val = 0;
+        T* tc;
+
+    public:
+        Test( const int v, T* tc )
+            : ReferenceCounter(),
+            val( v ),
+            tc( tc )
+        {}
+        ~Test()
+        {
+            tc->deleteCounter++;
+        }
+        operator int()
+        {
+            return val;
+        }
+        int getVal()
+        {
+            return val;
+        }
+    };
+
+    TEST_CLASS( RCArrayTests )
+    {
+    public:
+        int deleteCounter = 0;
+        TEST_METHOD_INITIALIZE( InitTest )
+        {
+            deleteCounter = 0;
+        }
+
+        TEST_METHOD( EmtptyTest )
+        {
+            Framework::RCArray<Test<RCArrayTests>> array;
+            Assert::IsTrue( array.getEintragAnzahl() == 0, L"getEintragAnzahl() on empty array should be 0" );
+            int count = 0;
+            for( auto i : array ) count++;
+            Assert::IsTrue( count == 0, L"Iteration with : over an empty array should not do anything" );
+            auto end = array.end();
+            Assert::IsFalse( array.begin() != end, L"Iterator of an empty array should not have an element" );
+            Assert::IsFalse( array.hat( 0 ), L"Empty Array should not have an element" );
+        }
+
+        TEST_METHOD( AddTest )
+        {
+            Framework::RCArray<Test<RCArrayTests>> array;
+            array.add( new Test<RCArrayTests>( 100, this ) );
+            array.add( new Test<RCArrayTests>( 20, this ), 1 );
+            array.add( new Test<RCArrayTests>( 10, this ), 0 );
+            array.add( new Test<RCArrayTests>( 0, this ) );
+            Assert::IsTrue( array.getEintragAnzahl() == 4, L"after adding 4 elements getEintragAnzahl() should be 4" );
+            Assert::IsTrue( (int)*array.z( 0 ) == 10, L"invalid value at index 0 of array after adding elements" );
+            Assert::IsTrue( (int)*array.z( 1 ) == 100, L"invalid value at index 1 of array after adding elements" );
+            Assert::IsTrue( (int)*array.z( 2 ) == 20, L"invalid value at index 1 of array after adding elements" );
+            Assert::IsTrue( (int)*array.z( 3 ) == 0, L"invalid value at index 1 of array after adding elements" );
+            auto i = array.begin();
+            Assert::IsTrue( i->getVal() == 10, L"invalid value at index 0 of array after adding elements" );
+            i++;
+            Assert::IsTrue( i->getVal() == 100, L"invalid value at index 1 of array after adding elements" );
+            ++i;
+            Assert::IsTrue( i->getVal() == 20, L"invalid value at index 2 of array after adding elements" );
+            i = i.next();
+            Assert::IsTrue( i->getVal() == 0, L"invalid value at index 3 of array after adding elements" );
+            Assert::IsFalse( i.hasNext(), L"Iterator has to much elements after adding elements to array" );
+            auto end = array.end();
+            Assert::IsFalse( ++i != end, L"iterator should match end() after iterating throu the array" );
+            array.leeren();
+            Assert::IsTrue( deleteCounter == 4, L"Memory leaks detected" );
+        }
+
+        TEST_METHOD( RemoveTest )
+        {
+            Framework::RCArray<Test<RCArrayTests>> array;
+            array.add( new Test<RCArrayTests>( 100, this ) );
+            array.add( new Test<RCArrayTests>( 20, this ), 1 );
+            array.add( new Test<RCArrayTests>( 10, this ), 0 );
+            array.add( new Test<RCArrayTests>( 0, this ) );
+            array.remove( 3 );
+            array.remove( 1 );
+            array.remove( 0 );
+            Assert::IsTrue( array.getEintragAnzahl() == 1, L"after adding 4 elements and removing 3 elements getEintragAnzahl() should be 1" );
+            Assert::IsTrue( (int)*array.z( 0 ) == 20, L"invalid value at index 0 of array after removing elements" );
+            Assert::IsTrue( array.begin()->getVal() == 20, L"invalid value at index 0 of array after removing elements" );
+            Assert::IsFalse( array.begin().hasNext(), L"Iterator has to many elements after removing elements" );
+            auto end = array.end();
+            Assert::IsFalse( array.begin().next() != end, L"Iterator has to many elements after removing elements" );
+            Assert::IsTrue( deleteCounter == 3, L"Memory leaks detected" );
+            array.leeren();
+            Assert::IsTrue( deleteCounter == 4, L"Memory leaks detected" );
+        }
+
+        TEST_METHOD( SwapTest )
+        {
+            Framework::RCArray<Test<RCArrayTests>> array;
+            array.add( new Test<RCArrayTests>( 100, this ) );
+            array.add( new Test<RCArrayTests>( 20, this ), 1 );
+            array.add( new Test<RCArrayTests>( 10, this ), 0 );
+            array.add( new Test<RCArrayTests>( 0, this ) );
+            array.tausch( 0, 3 );
+            array.tausch( 1, 2 );
+            Assert::IsTrue( array.getEintragAnzahl() == 4, L"after adding 4 elements and swap elements getEintragAnzahl() should be 4" );
+            Assert::IsTrue( (int)*array.z( 0 ) == 0, L"invalid value at index 0 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 1 ) == 20, L"invalid value at index 1 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 2 ) == 100, L"invalid value at index 2 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 3 ) == 10, L"invalid value at index 3 of array after swapping elements" );
+            array.tausch( 2, 0 );
+            Assert::IsTrue( (int)*array.z( 2 ) == 0, L"invalid value at index 2 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 0 ) == 100, L"invalid value at index 0 of array after swapping elements" );
+            array.leeren();
+            Assert::IsTrue( deleteCounter == 4, L"Memory leaks detected" );
+        }
+
+        TEST_METHOD( SetTest )
+        {
+            Framework::RCArray<Test<RCArrayTests>> array;
+            array.add( new Test<RCArrayTests>( 100, this ) );
+            array.add( new Test<RCArrayTests>( 20, this ), 1 );
+            array.add( new Test<RCArrayTests>( 10, this ), 0 );
+            array.add( new Test<RCArrayTests>( 0, this ) );
+            array.set( new Test<RCArrayTests>( 30, this ), 0 );
+            array.set( new Test<RCArrayTests>( 200, this ), 3 );
+            array.set( new Test<RCArrayTests>( 500, this ), 1 );
+            Assert::IsTrue( array.getEintragAnzahl() == 4, L"after adding 4 elements and changing elements getEintragAnzahl() should be 4" );
+            Assert::IsTrue( (int)*array.z( 0 ) == 30, L"invalid value at index 0 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 1 ) == 500, L"invalid value at index 1 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 2 ) == 20, L"invalid value at index 2 of array after swapping elements" );
+            Assert::IsTrue( (int)*array.z( 3 ) == 200, L"invalid value at index 3 of array after swapping elements" );
+            Assert::IsTrue( deleteCounter == 3, L"Memory leaks detected" );
+            array.leeren();
+            Assert::IsTrue( deleteCounter == 7, L"Memory leaks detected" );
+        }
+    };
+}

+ 182 - 0
Framework Tests/Framework Tests.vcxproj

@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <VCProjectVersion>17.0</VCProjectVersion>
+    <ProjectGuid>{7E3CF385-9804-4218-BFCF-E27D735FAF89}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>FrameworkTests</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+    <ProjectSubType>NativeUnitTestProject</ProjectSubType>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <ExternalIncludePath>..;$(ExternalIncludePath)</ExternalIncludePath>
+    <LibraryPath>..\x64\debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <SDLCheck>true</SDLCheck>
+      <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <UseFullPaths>true</UseFullPaths>
+      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\x64\debug\Framework.dll" "Framwork.dll"</Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <Outputs>...;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <SDLCheck>true</SDLCheck>
+      <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <UseFullPaths>true</UseFullPaths>
+      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <UseFullPaths>true</UseFullPaths>
+      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <UseFullPaths>true</UseFullPaths>
+      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Array.cpp" />
+    <ClCompile Include="pch.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="pch.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 30 - 0
Framework Tests/Framework Tests.vcxproj.filters

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Quelldateien">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Headerdateien">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+    </Filter>
+    <Filter Include="Ressourcendateien">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="Array.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+    <ClCompile Include="pch.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="pch.h">
+      <Filter>Headerdateien</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>

BIN
Framework Tests/Framwork.dll


+ 5 - 0
Framework Tests/pch.cpp

@@ -0,0 +1,5 @@
+// pch.cpp: Quelldatei, die dem vorkompilierten Header entspricht
+
+#include "pch.h"
+
+// Bei der Verwendung vorkompilierter Header ist diese Quelldatei für eine erfolgreiche Kompilierung erforderlich.

+ 12 - 0
Framework Tests/pch.h

@@ -0,0 +1,12 @@
+// pch.h: Dies ist eine vorkompilierte Headerdatei.
+// Die unten aufgeführten Dateien werden nur einmal kompiliert, um die Buildleistung für zukünftige Builds zu verbessern.
+// Dies wirkt sich auch auf die IntelliSense-Leistung aus, Codevervollständigung und viele Features zum Durchsuchen von Code eingeschlossen.
+// Die hier aufgeführten Dateien werden jedoch ALLE neu kompiliert, wenn mindestens eine davon zwischen den Builds aktualisiert wird.
+// Fügen Sie hier keine Dateien hinzu, die häufig aktualisiert werden sollen, da sich so der Leistungsvorteil ins Gegenteil verkehrt.
+
+#ifndef PCH_H
+#define PCH_H
+
+// Fügen Sie hier Header hinzu, die vorkompiliert werden sollen.
+
+#endif //PCH_H

+ 22 - 2
Framework.sln

@@ -1,12 +1,17 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26014.0
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.31911.260
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Framework", "Framework.vcxproj", "{C67E1D50-8FED-42FC-9538-1818297CF817}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Framework Linux", "Framework Linux.vcxproj", "{8492D63F-6800-439E-8FC1-42031B90F00F}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Framework Tests", "Framework Tests\Framework Tests.vcxproj", "{7E3CF385-9804-4218-BFCF-E27D735FAF89}"
+	ProjectSection(ProjectDependencies) = postProject
+		{C67E1D50-8FED-42FC-9538-1818297CF817} = {C67E1D50-8FED-42FC-9538-1818297CF817}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|ARM = Debug|ARM
@@ -39,8 +44,23 @@ Global
 		{8492D63F-6800-439E-8FC1-42031B90F00F}.Release|Win32.Build.0 = Release|x86
 		{8492D63F-6800-439E-8FC1-42031B90F00F}.Release|x64.ActiveCfg = Release|x64
 		{8492D63F-6800-439E-8FC1-42031B90F00F}.Release|x64.Build.0 = Release|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Debug|ARM.ActiveCfg = Debug|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Debug|ARM.Build.0 = Debug|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Debug|Win32.ActiveCfg = Debug|Win32
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Debug|Win32.Build.0 = Debug|Win32
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Debug|x64.ActiveCfg = Debug|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Debug|x64.Build.0 = Debug|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Release|ARM.ActiveCfg = Release|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Release|ARM.Build.0 = Release|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Release|Win32.ActiveCfg = Release|Win32
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Release|Win32.Build.0 = Release|Win32
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Release|x64.ActiveCfg = Release|x64
+		{7E3CF385-9804-4218-BFCF-E27D735FAF89}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {769973A8-91F5-49C4-B79C-23E2F6F37F84}
+	EndGlobalSection
 EndGlobal

+ 1 - 0
Framework.vcxproj

@@ -204,6 +204,7 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
     <ClInclude Include="AuswahlBox.h" />
     <ClInclude Include="Bild.h" />
     <ClInclude Include="Bildschirm.h" />
+    <ClInclude Include="Cache.h" />
     <ClInclude Include="CharMap.h" />
     <ClInclude Include="DXCommandQueue.h" />
     <ClInclude Include="Critical.h" />

+ 3 - 0
Framework.vcxproj.filters

@@ -351,6 +351,9 @@
     <ClInclude Include="RCPointer.h">
       <Filter>Headerdateien\Framework\Data</Filter>
     </ClInclude>
+    <ClInclude Include="Cache.h">
+      <Filter>Headerdateien\Framework\Data</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Maus.cpp">

+ 184 - 3
HashMap.h

@@ -36,20 +36,184 @@ namespace Framework
         friend class HashMap;
     };
 
+    template<typename K, typename V>
+    class MapIterator
+    {
+    private:
+        int bucketIndex;
+        Iterator< MapEntry<K, V> > iterator;
+        Array< MapEntry<K, V> >** buckets;
+        int bucketCount;
+
+    public:
+        MapIterator( Array< MapEntry<K, V> >** buckets, int bucketCount, int bucketIndex, Iterator< MapEntry<K, V> > iterator )
+        {
+            while( bucketIndex < bucketCount && (!buckets[ bucketIndex ] || buckets[ bucketIndex ]->getEintragAnzahl() == 0) )
+            {
+                bucketIndex++;
+                iterator = Iterator< MapEntry<K, V> >( 0 );
+            }
+            if( bucketIndex < bucketCount )
+            {
+                if( iterator )
+                    this->iterator = iterator;
+                else
+                    this->iterator = buckets[ bucketIndex ]->begin();
+            }
+            else
+            {
+                this->iterator = Iterator< MapEntry<K, V> >( 0 );
+                this->bucketIndex = 0;
+                this->buckets = 0;
+                this->bucketCount = 0;
+            }
+            this->buckets = buckets;
+            this->bucketCount = bucketCount;
+            this->bucketIndex = bucketIndex;
+        }
+
+        MapIterator( const MapIterator< K, V >& it )
+        {
+            iterator = it.iterator;
+            buckets = it.buckets;
+            bucketCount = it.bucketCount;
+            bucketIndex = it.bucketIndex;
+        }
+
+        MapIterator< K, V >& operator=( MapIterator< K, V > r )
+        {
+            iterator = r.iterator;
+            buckets = r.buckets;
+            bucketCount = r.bucketCount;
+            bucketIndex = r.bucketIndex;
+            return *this;
+        }
+
+        bool hasNext()
+        {
+            if( iterator && iterator.hasNext() )
+                return 1;
+            int ind = bucketIndex + 1;
+            while( ind < bucketCount && (!buckets[ ind ] || buckets[ ind ]->getEintragAnzahl() == 0) )
+                ind++;
+            return ind < bucketCount;
+        }
+
+        MapEntry<K, V> operator*()
+        {
+            return iterator;
+        }
+
+        MapIterator< K, V > next()
+        {
+            if( bucketIndex >= bucketCount )
+            {
+                Text err = "Index out of Range Exception File: ";
+                err += __FILE__;
+                err += " Line: ";
+                err += __LINE__;
+                throw std::out_of_range( (char*)err );
+            }
+            if( iterator.hasNext() )
+                return MapIterator( buckets, bucketCount, bucketIndex, iterator.next() );
+            else
+                return MapIterator( buckets, bucketCount, bucketIndex + 1, Iterator< MapEntry<K, V> >( 0 ) );
+        }
+
+        operator bool()
+        {
+            return bucketIndex < bucketCount;
+        }
+
+        operator MapEntry<K, V>()
+        {
+            if( bucketIndex >= bucketCount )
+            {
+                Text err = "Index out of Range Exception File: ";
+                err += __FILE__;
+                err += " Line: ";
+                err += __LINE__;
+                throw std::out_of_range( (char*)err );
+            }
+            return iterator.val();
+        }
+
+        MapIterator< K, V >& operator++() //! prefix
+        {
+            ++iterator;
+            if( !iterator )
+            {
+                while( bucketIndex < bucketCount && (!buckets[ bucketIndex ] || buckets[ bucketIndex ]->getEintragAnzahl() == 0) )
+                    bucketIndex++;
+                if( bucketIndex < bucketCount )
+                    this->iterator = buckets[ bucketIndex ]->begin();
+                else
+                {
+                    this->iterator = Iterator< MapEntry<K, V> >( 0 );
+                    this->bucketIndex = 0;
+                    this->buckets = 0;
+                    this->bucketCount = 0;
+                }
+            }
+            return *this;
+        }
+
+        MapIterator< K, V > operator++( int ) //! postfix
+        {
+            Iterator< TYP > temp( *this );
+            ++(*this);
+            return temp;
+        }
+
+        MapIterator< K, V > operator->()
+        {
+            if( bucketIndex >= bucketCount )
+            {
+                Text err = "Index out of Range Exception File: ";
+                err += __FILE__;
+                err += " Line: ";
+                err += __LINE__;
+                throw std::out_of_range( (char*)err );
+            }
+            return iterator.val();
+        }
+
+        void set( MapEntry<K, V> val )
+        {
+            if( bucketIndex < bucketCount )
+                iterator.set( val );
+            else
+            {
+                Text err = "Index out of Range Exception File: ";
+                err += __FILE__;
+                err += " Line: ";
+                err += __LINE__;
+                throw std::out_of_range( (char*)err );
+            }
+        }
+
+        bool operator!=( MapIterator< K, V >& r )
+        {
+            return buckets != r.buckets || iterator != r.iterator;
+        }
+    };
+
     template<typename K, typename V>
     class HashMap : public virtual ReferenceCounter
     {
     private:
-        Array< MapEntry<K, V> > **buckets;
+        Array< MapEntry<K, V> >** buckets;
         int bucketCount;
         std::function<int( K )> hash;
+        int size;
 
     public:
         HashMap( int bucketCount, std::function<int( K )> hash )
             : ReferenceCounter(),
-            buckets( new Array< MapEntry<K, V> > *[ bucketCount ] ),
+            buckets( new Array< MapEntry<K, V> >* [ bucketCount ] ),
             bucketCount( bucketCount ),
-            hash( hash )
+            hash( hash ),
+            size( 0 )
         {
             memset( buckets, 0, sizeof( Array< MapEntry<K, V> > * ) * bucketCount );
         }
@@ -78,6 +242,7 @@ namespace Framework
                 }
             }
             buckets[ index ]->add( MapEntry<K, V>( key, value ) );
+            size++;
         }
 
         void remove( K key )
@@ -91,6 +256,7 @@ namespace Framework
                 if( bucket.getKey() == key )
                 {
                     bucket.remove( listIndex );
+                    size--;
                     return;
                 }
                 listIndex++;
@@ -135,5 +301,20 @@ namespace Framework
             }
             return 0;
         }
+
+        int getSize() const
+        {
+            return size;
+        }
+
+        MapIterator<K, V> begin()
+        {
+            return MapIterator<K, V>( buckets, bucketCount, 0, Iterator< MapEntry<K, V> >( 0 ) );
+        }
+
+        MapIterator<K, V> end()
+        {
+            return MapIterator<K, V>( 0, 0, 0, Iterator< MapEntry<K, V> >( 0 ) );
+        }
     };
 }

+ 113 - 112
Model2D.cpp

@@ -34,7 +34,7 @@ Model2DData::~Model2DData()
             if( polygons->get( i ).schwerpunkt )
                 delete polygons->get( i ).schwerpunkt;
         }
-        polygons = ( Array<Polygon2D> * )polygons->release();
+        polygons = (Array<Polygon2D> *)polygons->release();
     }
     if( vListen )
         vListen->release();
@@ -59,7 +59,7 @@ bool Model2DData::istPunktInnen( Vertex p, int polygonId ) const
             Punkt out = outListPP;
             if( out.x < out.y && j > out.x && j < out.y )
                 j = out.x;
-            if( out.x > out.y && ( j > out.x || j < out.y ) )
+            if( out.x > out.y && (j > out.x || j < out.y) )
                 j = out.x;
         }
         auto point = polygon._.vertex->begin();
@@ -71,14 +71,14 @@ bool Model2DData::istPunktInnen( Vertex p, int polygonId ) const
                 Punkt out = outListPP;
                 if( out.x < out.y && i > out.x && i < out.y )
                     cont = 1;
-                if( out.x > out.y && ( i > out.x || i < out.y ) )
+                if( out.x > out.y && (i > out.x || i < out.y) )
                     cont = 1;
             }
             if( cont )
                 continue;
             Vertex a = point;
             Vertex b = polygon._.vertex->get( j );
-            if( ( ( a.y >= p.y ) != ( b.y >= p.y ) ) && ( p.x <= ( b.x - a.x ) * ( p.y - a.y ) / (float)( b.y - a.y ) + a.x ) )
+            if( ((a.y >= p.y) != (b.y >= p.y)) && (p.x <= (b.x - a.x) * (p.y - a.y) / (float)(b.y - a.y) + a.x) )
                 c = !c;
             j = i;
         }
@@ -105,7 +105,7 @@ bool Model2DData::istLinieInnen( Vertex a, Vertex b, int polygonId ) const
             Punkt out = outList.z( p )->get( k );
             if( out.x < out.y && j > out.x && j < out.y )
                 j = out.x;
-            if( out.x > out.y && ( j > out.x || j < out.y ) )
+            if( out.x > out.y && (j > out.x || j < out.y) )
                 j = out.x;
         }
         for( int i = 0; i < anz; i++ )
@@ -116,7 +116,7 @@ bool Model2DData::istLinieInnen( Vertex a, Vertex b, int polygonId ) const
                 Punkt out = outList.z( p )->get( k );
                 if( out.x < out.y && i > out.x && i < out.y )
                     cont = 1;
-                if( out.x > out.y && ( i > out.x || i < out.y ) )
+                if( out.x > out.y && (i > out.x || i < out.y) )
                     cont = 1;
             }
             if( cont )
@@ -144,7 +144,7 @@ bool Model2DData::istLinieInnen( Vertex a, Vertex b, int polygonId ) const
         }
         int i = 1;
         bool inside = 1;
-        for( Vertex vp = speed + a; (Punkt)vp != (Punkt)( b - speed ) && inside && i < mLen - 1; vp += speed, i++ )
+        for( Vertex vp = speed + a; (Punkt)vp != (Punkt)(b - speed) && inside && i < mLen - 1; vp += speed, i++ )
             inside &= istPunktInnen( vp, p );
         if( inside )
             return 1;
@@ -153,7 +153,7 @@ bool Model2DData::istLinieInnen( Vertex a, Vertex b, int polygonId ) const
 }
 
 // nicht constant
-bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
+bool Model2DData::erstelleModell( Array< Polygon2D >* polygons )
 {
     removeModell();
     if( !polygons || !polygons->getEintragAnzahl() )
@@ -171,7 +171,7 @@ bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
         if( !pg.vertex || pg.vertex->getEintragAnzahl() < 3 )
             continue;
         vListen->add( new RCArray< DreieckListe< Vertex > >() );
-        outList.set( new Array< Punkt >, p );
+        outList.add( new Array< Punkt > );
         int vAnz = pg.vertex->getEintragAnzahl();
         bool textur = pg.tKordinaten != 0;
         for( int i = 0; i < vAnz && textur; i++ )
@@ -199,8 +199,8 @@ bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
         int lauf = 0;
         while( 1 )
         {
-            lists.set( new RCArray< DreieckListe< Vertex > >(), lauf );
-            outList.z( p )->set( Punkt( 0, 0 ), lauf );
+            lists.add( new RCArray< DreieckListe< Vertex > >() );
+            outList.z( p )->add( Punkt( 0, 0 ) );
             bool fertig = 0;
             Vertex a;
             Vertex b;
@@ -234,7 +234,7 @@ bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
                     }
                     if( out.x < out.y && i > out.x && i < out.y )
                         cont = 1;
-                    if( out.x > out.y && ( i > out.x || i < out.y ) )
+                    if( out.x > out.y && (i > out.x || i < out.y) )
                         cont = 1;
                 }
                 if( cont )
@@ -249,8 +249,8 @@ bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
                     b = pg.vertex->get( nachher );
                 if( istLinieInnen( a, b, p ) )
                 {
-                    DreieckListe< Vertex > *lowL = new DreieckListe< Vertex >();
-                    DreieckListe< Vertex > *heightL = new DreieckListe< Vertex >();
+                    DreieckListe< Vertex >* lowL = new DreieckListe< Vertex >();
+                    DreieckListe< Vertex >* heightL = new DreieckListe< Vertex >();
                     lowL->addPunkt( new Vertex( pg.vertex->get( i ) ), textur ? new Vertex( pg.tKordinaten->get( i ) ) : 0 );
                     heightL->addPunkt( new Vertex( pg.vertex->get( i ) ), textur ? new Vertex( pg.tKordinaten->get( i ) ) : 0 );
                     int height = i + 1;
@@ -335,19 +335,19 @@ bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
                     }
                     if( lowL->getDreieckAnzahl() > heightL->getDreieckAnzahl() )
                     {
-                        lists.z( lauf )->set( lowL, i );
-                        tmpOutList.set( outL, i );
+                        lists.z( lauf )->add( lowL );
+                        tmpOutList.add( outL );
                         heightL->release();
                     }
                     else
                     {
-                        lists.z( lauf )->set( heightL, i );
-                        tmpOutList.set( outH, i );
+                        lists.z( lauf )->add( heightL );
+                        tmpOutList.add( outH );
                         lowL->release();
                     }
                 }
                 else
-                    lists.z( lauf )->set( new DreieckListe< Vertex >(), i );
+                    lists.z( lauf )->add( new DreieckListe< Vertex >() );
                 if( fertig )
                     break;
             }
@@ -355,7 +355,7 @@ bool Model2DData::erstelleModell( Array< Polygon2D > *polygons )
             int max = 0;
             for( int i = 0; i < vAnz; i++ )
             {
-                if( lists.z( lauf )->z( i ) && lists.z( lauf )->z( i )->getDreieckAnzahl() > max )
+                if( lists.z( lauf )->hat( i ) && lists.z( lauf )->z( i )->getDreieckAnzahl() > max )
                 {
                     max = lists.z( lauf )->z( i )->getDreieckAnzahl();
                     maxP = i;
@@ -390,16 +390,16 @@ void Model2DData::removeModell() // setzt die Vertex daten zur
             if( polygons->get( i ).schwerpunkt )
                 delete polygons->get( i ).schwerpunkt;
         }
-        polygons = ( Array<Polygon2D>* )polygons->release();
+        polygons = (Array<Polygon2D>*)polygons->release();
     }
     if( vListen )
-        vListen = ( RCArray< RCArray< DreieckListe< Vertex > > > * )vListen->release();
+        vListen = (RCArray< RCArray< DreieckListe< Vertex > > > *)vListen->release();
     outList.leeren();
     minP = Punkt( 0, 0 );
     maxP = Punkt( 0, 0 );
 }
 
-bool Model2DData::calcHitPoint( Vertex pos, Vertex dir, const char *polygonName, Vertex &hitpoint, Vertex &moveSpeed, float &rotSpeed ) const
+bool Model2DData::calcHitPoint( Vertex pos, Vertex dir, const char* polygonName, Vertex& hitpoint, Vertex& moveSpeed, float& rotSpeed ) const
 {
     if( dir.x == 0 && dir.y == 0 )
         return 0;
@@ -412,37 +412,37 @@ bool Model2DData::calcHitPoint( Vertex pos, Vertex dir, const char *polygonName,
             for( int i = 0; i < anz; i++ )
             {
                 Vertex a = polygon.vertex->get( i );
-                Vertex b = polygon.vertex->get( ( i + 1 ) % anz );
+                Vertex b = polygon.vertex->get( (i + 1) % anz );
                 b -= a;
                 float offset = 0;
                 if( dir.y != 0 && dir.x != 0 )
-                    offset = ( ( a.y - pos.y ) / dir.y - ( a.x - pos.x ) / dir.x ) / ( b.x / dir.x - b.y / dir.y ); // solve hitpoint equasion
+                    offset = ((a.y - pos.y) / dir.y - (a.x - pos.x) / dir.x) / (b.x / dir.x - b.y / dir.y); // solve hitpoint equasion
                 else if( dir.y == 0 )
                 {
                     if( b.y == 0 )
                         continue;
-                    offset = ( pos.y - a.y ) / b.y;
+                    offset = (pos.y - a.y) / b.y;
                 }
                 else if( dir.x == 0 )
                 {
                     if( b.x == 0 )
                         continue;
-                    offset = ( pos.x - a.x ) / b.x;
+                    offset = (pos.x - a.x) / b.x;
                 }
-                Vertex point = a + ( b * offset );
+                Vertex point = a + (b * offset);
                 if( offset >= 0 && offset <= 1 )
                 {
-                    float f = ( point.x - pos.x ) / dir.x;
+                    float f = (point.x - pos.x) / dir.x;
                     if( !dir.x )
-                        f = ( point.y - pos.y ) / dir.y;
-                    if( ( !ret || ( hitpoint - pos ).getLengthSq() > ( point - pos ).getLengthSq() ) && f > 0 )
+                        f = (point.y - pos.y) / dir.y;
+                    if( (!ret || (hitpoint - pos).getLengthSq() > (point - pos).getLengthSq()) && f > 0 )
                     {
                         Vertex normal = b.CW90().normalize();
                         Vertex kNorm = Vertex( dir ).normalize();
-                        moveSpeed = normal * ( normal * kNorm ) * dir.getLength();
-                        normal = ( point - *polygon.schwerpunkt ).CW90().normalize();
-                        Vertex rotKraft = normal * ( normal * kNorm ) * dir.getLength();
-                        rotSpeed = ( (float)sqrt( rotKraft.getLength() * ( point - *polygon.schwerpunkt ).getLength() ) / 180.f ) * 3.14f * ( normal * kNorm );
+                        moveSpeed = normal * (normal * kNorm) * dir.getLength();
+                        normal = (point - *polygon.schwerpunkt).CW90().normalize();
+                        Vertex rotKraft = normal * (normal * kNorm) * dir.getLength();
+                        rotSpeed = ((float)sqrt( rotKraft.getLength() * (point - *polygon.schwerpunkt).getLength() ) / 180.f) * 3.14f * (normal * kNorm);
                         hitpoint = point;
                         if( isnan( moveSpeed.x ) || isnan( moveSpeed.y ) || isnan( rotSpeed ) )
                             return 0;
@@ -455,7 +455,7 @@ bool Model2DData::calcHitPoint( Vertex pos, Vertex dir, const char *polygonName,
     return ret;
 }
 
-bool Model2DData::split( Vertex pos, Vertex dir, char *polygonName, Polygon2D &partA, Polygon2D &partB, Punkt &posA, Punkt &posB, std::function< double() > random ) const
+bool Model2DData::split( Vertex pos, Vertex dir, char* polygonName, Polygon2D& partA, Polygon2D& partB, Punkt& posA, Punkt& posB, std::function< double() > random ) const
 {
     Vertex originalDir = dir;
     bool ret = 0;
@@ -477,31 +477,31 @@ bool Model2DData::split( Vertex pos, Vertex dir, char *polygonName, Polygon2D &p
             for( int i = 0; i < anz; i++ )
             {
                 Vertex a = polygon.vertex->get( i );
-                Vertex b = polygon.vertex->get( ( i + 1 ) % anz );
+                Vertex b = polygon.vertex->get( (i + 1) % anz );
                 b -= a;
-                if( ( txtChpPix.x == 0 || txtChpPix.y == 0 ) && b.x != 0 && b.y != 0 )
+                if( (txtChpPix.x == 0 || txtChpPix.y == 0) && b.x != 0 && b.y != 0 )
                 {
                     Vertex ta = polygon.tKordinaten->get( i );
-                    Vertex tb = polygon.tKordinaten->get( ( i + 1 ) % anz );
+                    Vertex tb = polygon.tKordinaten->get( (i + 1) % anz );
                     tb -= ta;
                     txtChpPix = Vertex( tb.x / b.x, tb.y / b.y );
                 }
                 float offset = 0;
                 if( dir.y != 0 && dir.x != 0 )
-                    offset = ( ( a.y - pos.y ) / dir.y - ( a.x - pos.x ) / dir.x ) / ( b.x / dir.x - b.y / dir.y ); // solve hitpoint equasion
+                    offset = ((a.y - pos.y) / dir.y - (a.x - pos.x) / dir.x) / (b.x / dir.x - b.y / dir.y); // solve hitpoint equasion
                 else if( dir.y == 0 )
-                    offset = ( pos.y - a.y ) / b.y;
+                    offset = (pos.y - a.y) / b.y;
                 else if( dir.x == 0 )
-                    offset = ( pos.x - a.x ) / b.x;
-                Vertex point = a + ( b * offset );
+                    offset = (pos.x - a.x) / b.x;
+                Vertex point = a + (b * offset);
                 if( offset >= 0 && offset <= 1 )
                 {
-                    if( !ret || ( startPoint - pos ).getLengthSq() > ( point - pos ).getLengthSq() )
+                    if( !ret || (startPoint - pos).getLengthSq() > (point - pos).getLengthSq() )
                     {
                         leftI = i;
-                        rightI = ( i + 1 ) % anz;
+                        rightI = (i + 1) % anz;
                         startPoint = point;
-                        texturSP = polygon.tKordinaten->get( i ) + ( polygon.tKordinaten->get( ( i + 1 ) % anz ) - polygon.tKordinaten->get( i ) ) * offset;
+                        texturSP = polygon.tKordinaten->get( i ) + (polygon.tKordinaten->get( (i + 1) % anz ) - polygon.tKordinaten->get( i )) * offset;
                     }
                     ret = 1;
                 }
@@ -541,21 +541,21 @@ bool Model2DData::split( Vertex pos, Vertex dir, char *polygonName, Polygon2D &p
                         if( i == leftI )
                             continue;
                         Vertex a = polygon.vertex->get( i );
-                        Vertex b = polygon.vertex->get( ( i + 1 ) % anz );
+                        Vertex b = polygon.vertex->get( (i + 1) % anz );
                         b -= a;
                         float offset1 = 0;
                         if( dir.y != 0 && dir.x != 0 )
-                            offset1 = ( ( a.y - pos.y ) / dir.y - ( a.x - pos.x ) / dir.x ) / ( b.x / dir.x - b.y / dir.y ); // solve hitpoint equasion
+                            offset1 = ((a.y - pos.y) / dir.y - (a.x - pos.x) / dir.x) / (b.x / dir.x - b.y / dir.y); // solve hitpoint equasion
                         else if( dir.y == 0 )
-                            offset1 = ( pos.y - a.y ) / b.y;
+                            offset1 = (pos.y - a.y) / b.y;
                         else if( dir.x == 0 )
-                            offset1 = ( pos.x - a.x ) / b.x;
-                        Vertex point = a + ( b * offset1 );
+                            offset1 = (pos.x - a.x) / b.x;
+                        Vertex point = a + (b * offset1);
                         float offset2 = 0;
                         if( dir.x != 0 )
-                            offset2 = ( point.x - pos.x ) / dir.x;
+                            offset2 = (point.x - pos.x) / dir.x;
                         else
-                            offset2 = ( point.y - pos.y ) / dir.y;
+                            offset2 = (point.y - pos.y) / dir.y;
                         if( needOne && MIN( abs( bo1 ), abs( bo1 - 1 ) ) + MIN( abs( bo2 ), bo2 - 1 ) > MIN( abs( offset1 ), abs( offset1 - 1 ) ) + MIN( abs( offset2 ), abs( offset2 - 1 ) ) )
                         {
                             bo1 = offset1;
@@ -564,12 +564,12 @@ bool Model2DData::split( Vertex pos, Vertex dir, char *polygonName, Polygon2D &p
                         }
                         if( offset1 >= 0 && offset1 <= 1 && offset2 >= 0 && offset2 <= 1 )
                         {
-                            if( !ret || ( startPoint - pos ).getLengthSq() > ( point - pos ).getLengthSq() )
+                            if( !ret || (startPoint - pos).getLengthSq() > (point - pos).getLengthSq() )
                             {
                                 leftIE = i;
-                                rightIE = ( i + 1 ) % anz;
+                                rightIE = (i + 1) % anz;
                                 startPoint = point;
-                                texturSP = polygon.tKordinaten->get( i ) + ( polygon.tKordinaten->get( ( i + 1 ) % anz ) - polygon.tKordinaten->get( i ) ) * offset1;
+                                texturSP = polygon.tKordinaten->get( i ) + (polygon.tKordinaten->get( (i + 1) % anz ) - polygon.tKordinaten->get( i )) * offset1;
                             }
                             ret = 1;
                         }
@@ -577,12 +577,12 @@ bool Model2DData::split( Vertex pos, Vertex dir, char *polygonName, Polygon2D &p
                     if( needOne && !ret )
                     {
                         Vertex a = polygon.vertex->get( bestI );
-                        Vertex b = polygon.vertex->get( ( bestI + 1 ) % anz );
+                        Vertex b = polygon.vertex->get( (bestI + 1) % anz );
                         b -= a;
                         leftIE = bestI;
-                        rightIE = ( bestI + 1 ) % anz;
-                        startPoint = a + ( b * bo1 );
-                        texturSP = polygon.tKordinaten->get( bestI ) + ( polygon.tKordinaten->get( ( bestI + 1 ) % anz ) - polygon.tKordinaten->get( bestI ) ) * bo1;
+                        rightIE = (bestI + 1) % anz;
+                        startPoint = a + (b * bo1);
+                        texturSP = polygon.tKordinaten->get( bestI ) + (polygon.tKordinaten->get( (bestI + 1) % anz ) - polygon.tKordinaten->get( bestI )) * bo1;
                         ret = 1;
                     }
                     if( ret )
@@ -595,7 +595,7 @@ bool Model2DData::split( Vertex pos, Vertex dir, char *polygonName, Polygon2D &p
                     partB.tKordinaten->add( nextT );
                     startPoint = next;
                     texturSP = nextT;
-                    dir = originalDir.rotation( (float)( random() - 0.5 ) );
+                    dir = originalDir.rotation( (float)(random() - 0.5) );
                 }
                 *partA.schwerpunkt += startPoint;
                 *partB.schwerpunkt += startPoint;
@@ -657,12 +657,12 @@ float Model2DData::getMasse() const
             continue;
         Vertex p1 = p.vertex->get( anz - 1 );
         Vertex p2 = p.vertex->get( 0 );
-        m += ( p1.y + p2.y ) * ( p1.x - p2.x );
+        m += (p1.y + p2.y) * (p1.x - p2.x);
         for( int i = 1; i < anz; i++ )
         {
             p1 = p.vertex->get( i - 1 );
             p2 = p.vertex->get( i );
-            m += ( p1.y + p2.y ) * ( p1.x - p2.x );
+            m += (p1.y + p2.y) * (p1.x - p2.x);
         }
     }
     m *= 0.5f;
@@ -689,19 +689,20 @@ Model2DObject::~Model2DObject()
 }
 
 // nicht constant
-void Model2DObject::setModel( Model2DData *mdl )
+void Model2DObject::setModel( Model2DData* mdl )
 {
     if( rData )
         rData->release();
     rData = mdl;
 }
 
-void Model2DObject::setTextur( Textur2D *t )
+void Model2DObject::setTextur( Textur2D* t )
 {
     if( rData )
     {
-        for( int i = 0; i< rData->polygons->getEintragAnzahl(); i++ )
-            textur->set( dynamic_cast<Textur2D *>( t->getThis() ), i );
+        textur->leeren();
+        for( int i = 0; i < rData->polygons->getEintragAnzahl(); i++ )
+            textur->add( dynamic_cast<Textur2D*>(t->getThis()) );
     }
     t->release();
 }
@@ -722,14 +723,14 @@ void Model2DObject::impuls( Vertex start, Vertex speed, float strength )
         {
             if( !p.transparent && rData->calcHitPoint( start, speed, p.name->getText(), hp, mSpeed, rSpeed ) )
             {
-                float f = ( hp.x - start.x ) / speed.x;
+                float f = (hp.x - start.x) / speed.x;
                 if( !speed.x )
-                    f = ( hp.y - start.y ) / speed.y;
-                if( ( hp - start ).getLengthSq() < dist && f > 0 )
+                    f = (hp.y - start.y) / speed.y;
+                if( (hp - start).getLengthSq() < dist && f > 0 )
                 {
                     resSpeed = mSpeed.rotation( rotation );
                     resRotSpeed = rSpeed;
-                    dist = ( hp - start ).getLengthSq();
+                    dist = (hp - start).getLengthSq();
                 }
             }
         }
@@ -742,19 +743,19 @@ void Model2DObject::impuls( Vertex start, Vertex speed, float strength )
     }
 }
 
-void Model2DObject::setTextur( Textur2D *t, const char *polygonName )
+void Model2DObject::setTextur( Textur2D* t, const char* polygonName )
 {
     int index = 0;
     for( Polygon2D i : *rData->polygons )
     {
         if( i.name->istGleich( polygonName ) )
-            textur->set( dynamic_cast<Textur2D *>( t->getThis() ), index );
+            textur->set( dynamic_cast<Textur2D*>(t->getThis()), index );
         index++;
     }
     t->release();
 }
 
-void Model2DObject::render( Mat3< float > &kamMat, Bild &zRObj, const char *kamName )
+void Model2DObject::render( Mat3< float >& kamMat, Bild& zRObj, const char* kamName )
 {
     if( !rData || !rData->polygons || !textur )
         return;
@@ -762,9 +763,9 @@ void Model2DObject::render( Mat3< float > &kamMat, Bild &zRObj, const char *kamN
     for( auto p : *rData->vListen )
     {
         Mat3< float > mat = kamMat * getObjectMatrix();
-        if( textur->z( num ) )
+        if( textur->hat( num ) )
         {
-            Bild *txt = textur->z( num )->zTextur();
+            Bild* txt = textur->z( num )->zTextur();
             for( auto i = p->begin(); i && txt; i++ )
             {
                 for( auto j = i->zListe()->begin(); j.hasNext() && j.next().hasNext(); j++ )
@@ -772,9 +773,9 @@ void Model2DObject::render( Mat3< float > &kamMat, Bild &zRObj, const char *kamN
                     Vertex a = mat * *j->punkt;
                     Vertex b = mat * *j.next()->punkt;
                     Vertex c = mat * *j.next().next()->punkt;
-                    Punkt ta = (Punkt)Vertex( j->textur->x * (float)( txt->getBreite() - 1 ), j->textur->y * (float)( txt->getHeight() - 1 ) );
-                    Punkt tb = (Punkt)Vertex( j.next()->textur->x * (float)( txt->getBreite() - 1 ), j.next()->textur->y * (float)( txt->getHeight() - 1 ) );
-                    Punkt tc = (Punkt)Vertex( j.next().next()->textur->x * (float)( txt->getBreite() - 1 ), j.next().next()->textur->y * (float)( txt->getHeight() - 1 ) );
+                    Punkt ta = (Punkt)Vertex( j->textur->x * (float)(txt->getBreite() - 1), j->textur->y * (float)(txt->getHeight() - 1) );
+                    Punkt tb = (Punkt)Vertex( j.next()->textur->x * (float)(txt->getBreite() - 1), j.next()->textur->y * (float)(txt->getHeight() - 1) );
+                    Punkt tc = (Punkt)Vertex( j.next().next()->textur->x * (float)(txt->getBreite() - 1), j.next().next()->textur->y * (float)(txt->getHeight() - 1) );
                     zRObj.drawDreieckTexturAlpha( a, b, c, ta, tb, tc, *txt );
                 }
             }
@@ -811,7 +812,7 @@ bool Model2DObject::istPunktInnen( Vertex p, bool ignoreTransparent ) const
         return 0;
     Mat3< float > mat = Mat3< float >::rotation( -rotation ) * Mat3< float >::scaling( 1 / size );
     p = mat * p;
-    for( Polygon2D polygon : *rData->polygons)
+    for( Polygon2D polygon : *rData->polygons )
     {
         if( polygon.transparent && !ignoreTransparent )
             continue;
@@ -824,7 +825,7 @@ bool Model2DObject::istPunktInnen( Vertex p, bool ignoreTransparent ) const
             else
                 a = polygon.vertex->get( 0 );
             Vertex b = point;
-            if( ( ( a.y >= p.y ) != ( b.y >= p.y ) ) && ( p.x <= ( b.x - a.x ) * ( p.y - a.y ) / (float)( b.y - a.y ) + a.x ) )
+            if( ((a.y >= p.y) != (b.y >= p.y)) && (p.x <= (b.x - a.x) * (p.y - a.y) / (float)(b.y - a.y) + a.x) )
                 c = !c;
         }
         if( c )
@@ -870,7 +871,7 @@ bool Model2DObject::istLinieInnen( Vertex a, Vertex b, bool ignoreTransparent )
         }
         int i = 1;
         bool inside = 1;
-        for( Vertex vp = speed + a; (Punkt)vp != (Punkt)( b - speed ) && inside && i < mLen - 1; vp += speed, i++ )
+        for( Vertex vp = speed + a; (Punkt)vp != (Punkt)(b - speed) && inside && i < mLen - 1; vp += speed, i++ )
             inside &= istPunktInnen( vp, ignoreTransparent );
         if( inside )
             return 1;
@@ -878,7 +879,7 @@ bool Model2DObject::istLinieInnen( Vertex a, Vertex b, bool ignoreTransparent )
     return 0;
 }
 
-bool Model2DObject::istModelInnen( const Object2D *zObj, Vertex *sp, bool end, bool ignoreTransparent ) const
+bool Model2DObject::istModelInnen( const Object2D* zObj, Vertex* sp, bool end, bool ignoreTransparent ) const
 {
     if( !end )
     {
@@ -909,11 +910,11 @@ bool Model2DObject::istModelInnen( const Object2D *zObj, Vertex *sp, bool end, b
 Rect2< float > Model2DObject::getBoundingBox() const
 {
     if( rData )
-        return Rect2< float >{ (Vertex)rData->minP *size + position, (Vertex)rData->maxP *size + position };
+        return Rect2< float >{ (Vertex)rData->minP* size + position, (Vertex)rData->maxP* size + position };
     return Rect2< float >();
 }
 
-bool Model2DObject::calcHitPoint( Vertex pos, Vertex dir, Vertex &hitpoint ) const
+bool Model2DObject::calcHitPoint( Vertex pos, Vertex dir, Vertex& hitpoint ) const
 {
     pos = getObjectPos( pos );
     dir = getObjectDir( dir );
@@ -927,13 +928,13 @@ bool Model2DObject::calcHitPoint( Vertex pos, Vertex dir, Vertex &hitpoint ) con
         {
             if( !p.transparent && rData->calcHitPoint( pos, dir, p.name->getText(), hp, ms, rs ) )
             {
-                float f = ( hp.x - pos.x ) / dir.x;
+                float f = (hp.x - pos.x) / dir.x;
                 if( !speed.x )
-                    f = ( hp.y - pos.y ) / dir.y;
-                if( ( hp - pos ).getLengthSq() < dist && f > 0 )
+                    f = (hp.y - pos.y) / dir.y;
+                if( (hp - pos).getLengthSq() < dist && f > 0 )
                 {
                     hitpoint = getObjectMatrix() * hp;
-                    dist = ( hp - pos ).getLengthSq();
+                    dist = (hp - pos).getLengthSq();
                 }
             }
         }
@@ -984,14 +985,14 @@ float Model2DObject::getMasse() const
 }
 
 // Gibt die Textur des ersten Polygons zurück
-Textur2D *Model2DObject::getTextur() const
+Textur2D* Model2DObject::getTextur() const
 {
     return textur->get( 0 );
 }
 
 // Gibt die Textur eines Polygons zurück
 //  polygonName: Der Name des Polygons
-Textur2D *Model2DObject::getTextur( const char *polygonName ) const
+Textur2D* Model2DObject::getTextur( const char* polygonName ) const
 {
     int index = 0;
     for( Polygon2D p : *rData->polygons )
@@ -1004,14 +1005,14 @@ Textur2D *Model2DObject::getTextur( const char *polygonName ) const
 }
 
 // Gibt die Textur des ersten Polygons ohne erhöhten Reference Counter zurück
-Textur2D *Model2DObject::zTextur() const
+Textur2D* Model2DObject::zTextur() const
 {
     return textur->z( 0 );
 }
 
 // Gibt die Textur eines Polygons ohne erhöhten Reference Counter zurück
 //  polygonName: Der Name des Polygons
-Textur2D *Model2DObject::zTextur( const char *polygonName ) const
+Textur2D* Model2DObject::zTextur( const char* polygonName ) const
 {
     int index = 0;
     for( Polygon2D p : *rData->polygons )
@@ -1023,12 +1024,12 @@ Textur2D *Model2DObject::zTextur( const char *polygonName ) const
     return 0;
 }
 
-Model2DData *Model2DObject::getModel() const
+Model2DData* Model2DObject::getModel() const
 {
-    return rData ? dynamic_cast<Model2DData *>( rData->getThis() ) : 0;
+    return rData ? dynamic_cast<Model2DData*>(rData->getThis()) : 0;
 }
 
-Model2DData *Model2DObject::zModel() const
+Model2DData* Model2DObject::zModel() const
 {
     return rData;
 }
@@ -1057,7 +1058,7 @@ Model2D::~Model2D()
 }
 
 // nicht constant
-void Model2D::setModel( Model2DData *mdl )
+void Model2D::setModel( Model2DData* mdl )
 {
     if( rData )
         rData->release();
@@ -1096,23 +1097,23 @@ void Model2D::addSize( float size )
     rend = 1;
 }
 
-void Model2D::setTextur( Textur2D *t )
+void Model2D::setTextur( Textur2D* t )
 {
     if( rData )
     {
         for( int i = 0; i < rData->polygons->getEintragAnzahl(); i++ )
-            textur->set( dynamic_cast<Textur2D *>( t->getThis() ), i );
+            textur->set( dynamic_cast<Textur2D*>(t->getThis()), i );
     }
     t->release();
 }
 
-void Model2D::setTextur( Textur2D *t, const char *polygonName )
+void Model2D::setTextur( Textur2D* t, const char* polygonName )
 {
     int index = 0;
     for( Polygon2D p : *rData->polygons )
     {
         if( p.name->istGleich( polygonName ) )
-            textur->set( dynamic_cast<Textur2D *>( t->getThis() ), index );
+            textur->set( dynamic_cast<Textur2D*>(t->getThis()), index );
         index++;
     }
     t->release();
@@ -1129,7 +1130,7 @@ bool Model2D::tick( double tickVal )
     return Zeichnung::tick( tickVal );
 }
 
-void Model2D::render( Bild &zRObj )
+void Model2D::render( Bild& zRObj )
 {
     if( !rData || hatStyleNicht( Model2D::Style::Sichtbar ) || !rData->polygons )
         return;
@@ -1158,7 +1159,7 @@ void Model2D::render( Bild &zRObj )
             }
             else
             {
-                Bild *txt = textur->z( num )->zTextur();
+                Bild* txt = textur->z( num )->zTextur();
                 for( auto i : *p )
                 {
                     for( auto j = i->zListe()->begin(); j.hasNext() && j.next().hasNext(); j++ )
@@ -1166,9 +1167,9 @@ void Model2D::render( Bild &zRObj )
                         Vertex a = mat * *j->punkt;
                         Vertex b = mat * *j.next()->punkt;
                         Vertex c = mat * *j.next().next()->punkt;
-                        Punkt ta = (Punkt)Vertex( j->textur->x * (float)( txt->getBreite() - 1 ), j->textur->y * (float)( txt->getHeight() - 1 ) );
-                        Punkt tb = (Punkt)Vertex( j.next()->textur->x * (float)( txt->getBreite() - 1 ), j.next()->textur->y * (float)( txt->getHeight() - 1 ) );
-                        Punkt tc = (Punkt)Vertex( j.next().next()->textur->x * (float)( txt->getBreite() - 1 ), j.next().next()->textur->y * (float)( txt->getHeight() - 1 ) );
+                        Punkt ta = (Punkt)Vertex( j->textur->x * (float)(txt->getBreite() - 1), j->textur->y * (float)(txt->getHeight() - 1) );
+                        Punkt tb = (Punkt)Vertex( j.next()->textur->x * (float)(txt->getBreite() - 1), j.next()->textur->y * (float)(txt->getHeight() - 1) );
+                        Punkt tc = (Punkt)Vertex( j.next().next()->textur->x * (float)(txt->getBreite() - 1), j.next().next()->textur->y * (float)(txt->getHeight() - 1) );
                         if( hatStyle( Model2D::Style::Alpha ) )
                             zRObj.drawDreieckTexturAlpha( a, b, c, ta, tb, tc, *txt );
                         else
@@ -1265,7 +1266,7 @@ bool Model2D::istPunktInnen( Vertex p ) const
         {
             Vertex a = mat * polygon.vertex->get( i );
             Vertex b = mat * polygon.vertex->get( j );
-            if( ( ( a.y >= p.y ) != ( b.y >= p.y ) ) && ( p.x <= ( b.x - a.x ) * ( p.y - a.y ) / (float)( b.y - a.y ) + a.x ) )
+            if( ((a.y >= p.y) != (b.y >= p.y)) && (p.x <= (b.x - a.x) * (p.y - a.y) / (float)(b.y - a.y) + a.x) )
                 c = !c;
             j = i;
         }
@@ -1312,7 +1313,7 @@ bool Model2D::istLinieInnen( Vertex a, Vertex b ) const
         }
         int i = 1;
         bool inside = 1;
-        for( Vertex vp = speed + a; (Punkt)vp != (Punkt)( b - speed ) && inside && i < mLen - 1; vp += speed, i++ )
+        for( Vertex vp = speed + a; (Punkt)vp != (Punkt)(b - speed) && inside && i < mLen - 1; vp += speed, i++ )
             inside &= istPunktInnen( vp );
         if( inside )
             return 1;
@@ -1320,7 +1321,7 @@ bool Model2D::istLinieInnen( Vertex a, Vertex b ) const
     return 0;
 }
 
-bool Model2D::istModelInnen( const Model2D *zMdl, bool end ) const
+bool Model2D::istModelInnen( const Model2D* zMdl, bool end ) const
 {
     if( !end )
     {
@@ -1348,12 +1349,12 @@ bool Model2D::istModelInnen( const Model2D *zMdl, bool end ) const
     return zMdl->istModelInnen( this, 1 );
 }
 
-Model2DData *Model2D::getModel() const
+Model2DData* Model2D::getModel() const
 {
-    return rData ? dynamic_cast<Model2DData *>( rData->getThis() ) : 0;
+    return rData ? dynamic_cast<Model2DData*>(rData->getThis()) : 0;
 }
 
-Model2DData *Model2D::zModel() const
+Model2DData* Model2D::zModel() const
 {
     return rData;
 }

+ 4 - 4
TastaturEreignis.h

@@ -44,7 +44,7 @@ namespace Framework
     const unsigned char T_BildO = 153;
     const unsigned char T_BildU = 154;
     const unsigned char T_Ende = 155;
-	const unsigned char T_Alt = 164;
+    const unsigned char T_Alt = 164;
 
     //! Speichert den Input eines Nutzers auf der Tastatur
     struct TastaturEreignis
@@ -65,21 +65,21 @@ namespace Framework
     //! \param te Das Tastaturereignis, welches verarbeitet werden soll
     //! \return (true), wenn aufrufende Zeichnung das Ereignis weiterverarbeiten soll. (false) sonnst.
     //! Gibt immer (true) zurück
-    DLLEXPORT bool _ret1TE( void *param, void *obj, TastaturEreignis te );
+    DLLEXPORT bool _ret1TE( void* param, void* obj, TastaturEreignis te );
     //! Standart Tastatur Ereinis Rückruffunktion
     //! \param param Ein beliebiger Parameter
     //! \param obj Die Zeichnung, welches diese Funktion aufruft
     //! \param te Das Tastaturereignis, welches verarbeitet werden soll
     //! \return (true), wenn aufrufende Zeichnung das Ereignis weiterverarbeiten soll. (false) sonnst.
     //! Gibt nur (true) zurück, wenn die Taste zwischen '0' und '9' ist, oder zum Löschen oder Cursorbewegen dient
-    DLLEXPORT bool _nurNummernTE( void *param, void *obj, TastaturEreignis te );
+    DLLEXPORT bool _nurNummernTE( void* param, void* obj, TastaturEreignis te );
     //! Standart Tastatur Ereinis Rückruffunktion
     //! \param param Ein beliebiger Parameter
     //! \param obj Die Zeichnung, welches diese Funktion aufruft
     //! \param te Das Tastaturereignis, welches verarbeitet werden soll
     //! \return (true), wenn aufrufende Zeichnung das Ereignis weiterverarbeiten soll. (false) sonnst.
     //! Gibt nur (true) zurück, wenn die Taste zwischen '0' und '9' oder 'A' und 'F' ist, oder zum Löschen oder Cursorbewegen dient
-    DLLEXPORT bool _nurHexTE( void *param, void *obj, TastaturEreignis te );
+    DLLEXPORT bool _nurHexTE( void* param, void* obj, TastaturEreignis te );
 }
 
 #endif

+ 9 - 8
main.h

@@ -39,12 +39,12 @@ namespace Framework
     int KSGStart Start( Startparam p );
 }
 
-typedef BOOL( __stdcall *MINIDUMPWRITEDUMP )( HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam );
+typedef BOOL( __stdcall* MINIDUMPWRITEDUMP )(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);
 
-void createMinidump( struct _EXCEPTION_POINTERS *apExceptionInfo )
+void createMinidump( struct _EXCEPTION_POINTERS* apExceptionInfo )
 {
     HMODULE mhLib = ::LoadLibrary( "dbghelp.dll" );
-    MINIDUMPWRITEDUMP pDump = mhLib ? ( MINIDUMPWRITEDUMP )::GetProcAddress( mhLib, "MiniDumpWriteDump" ) : 0;
+    MINIDUMPWRITEDUMP pDump = mhLib ? (MINIDUMPWRITEDUMP)::GetProcAddress( mhLib, "MiniDumpWriteDump" ) : 0;
 
     HANDLE  hFile = ::CreateFile( "error_core_memory_dump.dmp", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS,
                                   FILE_ATTRIBUTE_NORMAL, NULL );
@@ -59,7 +59,7 @@ void createMinidump( struct _EXCEPTION_POINTERS *apExceptionInfo )
     ::CloseHandle( hFile );
 }
 
-LONG WINAPI unhandledHandler( struct _EXCEPTION_POINTERS *apExceptionInfo )
+LONG WINAPI unhandledHandler( struct _EXCEPTION_POINTERS* apExceptionInfo )
 {
     createMinidump( apExceptionInfo );
     return EXCEPTION_CONTINUE_SEARCH;
@@ -79,14 +79,15 @@ public:
     ~OutputDebugStringBuf()
     {}
 
-    static_assert( std::is_same<TChar, char>::value || std::is_same<TChar, wchar_t>::value, "OutputDebugStringBuf only supports char and wchar_t types" );
+    static_assert(std::is_same<TChar, char>::value || std::is_same<TChar, wchar_t>::value, "OutputDebugStringBuf only supports char and wchar_t types");
 
     int sync() try
     {
-        MessageOutputer<TChar, TTraits>()( __super::pbase(), __super::pptr() );
+        MessageOutputer<TChar, TTraits>()(__super::pbase(), __super::pptr());
         __super::setp( _buffer.data(), _buffer.data(), _buffer.data() + _buffer.size() );
         return 0;
-    } catch( ... )
+    }
+    catch( ... )
     {
         return -1;
     }
@@ -139,7 +140,7 @@ int WINAPI WinMain( _In_ HINSTANCE hinst, _In_opt_ HINSTANCE hpinst, _In_ LPSTR
 #ifdef _DEBUG
     _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
     OutputDebugStringBuf<char, std::char_traits<char>> charDebugOutput;
-    std::streambuf * buf = std::cout.rdbuf();
+    std::streambuf* buf = std::cout.rdbuf();
     std::cout.rdbuf( &charDebugOutput );
 #endif
     SetUnhandledExceptionFilter( unhandledHandler );