Browse Source

projektversion aktualisiert

Kolja Strohm 5 years ago
parent
commit
d8d8050ed2
3 changed files with 44 additions and 4 deletions
  1. 44 4
      Test/Main.cpp
  2. BIN
      Test/Test.exe
  3. BIN
      Test/version

+ 44 - 4
Test/Main.cpp

@@ -138,9 +138,9 @@ void doStuff()
     //    std::cout << "time: " << m.getSekunden() << "\n";
     //}
 
-    API *api = new API( f );
+    //API *api = new API( f );
 
-    MiniGames *mGames = new MiniGames( schrift, dlls.getThis(), b, api );
+    MiniGames *mGames = new MiniGames( schrift, dlls.getThis(), b, 0 );
     b->addMember( mGames->getThis() );
     //b1 = new Bild();
     //b1->neuBild( 100, 100, 0x7F0545FF );
@@ -174,16 +174,56 @@ void doStuff()
     b->release();
     f->release();
     schrift->release();
-    delete api;
+    //delete api;
 }
 
-int main()
+int main( int argc, char *argv[] )
 {
 #ifdef _DEBUG
     _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
 #endif
     initFramework();
     Network::Start( 1 );
+    /*for( int i = 1; i < argc; i++ )
+    {
+        std::cout << argv[ i ] << " - Version: ";
+        Datei d;
+        d.setDatei( argv[ i ] );
+        unsigned char version[4];
+        for( int j = 0; j < 4; j++ )
+            version[ j ] = 0;
+        if( d.open( Datei::Style::lesen ) )
+        {
+            d.lese( (char*)version, 4 );
+            d.close();
+        }
+        std::cout << (int)version[ 3 ] << "." << (int)version[ 2 ] << "." << (int)version[ 1 ] << "." << (int)version[ 0 ] << " --> ";
+        if( version[ 0 ] == 255 )
+        {
+            version[ 0 ] = 0;
+            if( version[ 1 ] == 255 )
+            {
+                version[ 1 ] = 0;
+                if( version[ 2 ] == 255 )
+                {
+                    version[ 2 ] = 0;
+                    version[ 3 ]++;
+                }
+                else
+                    version[ 2 ]++;
+            }
+            else
+                version[ 1 ]++;
+        }
+        else
+            version[ 0 ]++;
+        if( d.open( Datei::Style::schreiben ) )
+        {
+            d.schreibe( (char *)version, 4 );
+            d.close();
+        }
+        std::cout << (int)version[ 3 ] << "." << (int)version[ 2 ] << "." << (int)version[ 1 ] << "." << (int)version[ 0 ] << "\n";
+    }*/
     doStuff();
     Network::Exit();
     releaseFramework();

BIN
Test/Test.exe


BIN
Test/version