Forráskód Böngészése

Reparieren knopf in den Optionen eingefügt

Kolja Strohm 5 éve
szülő
commit
6c9a8e31f6

BIN
patcher/data/dg.ksgt


BIN
patcher/data/spiele/Asteroids/bilder/ship.ltdb


BIN
patcher/data/spiele/Asteroids/bilder/start.ltdb


+ 0 - 88
patcher/data/spiele/Asteroids/data/beschreibung.ksgs

@@ -1,88 +0,0 @@
-#include <KSGSStandart.h>
-
-class TextErscheinen
-{
-private:
-    var TextFeld beschreibung;
-    var Text txt;
-    var int num;
-    var int län;
-    var double z;
-public:
-    func void init()
-    {
-        initTextFeld( beschreibung, 5, 5, 568, 418, "", 0x101 );
-        txt = "Messe dich in einem Asteroidenfeld mit gegnerischen Raumschiffen.";
-        län = txt.getLänge();
-        num = 0;
-        z = 0;
-    }
-    func bool next( double zeit )
-    {
-        z += zeit;
-        if( ( z > 0.03 ) && ( num < län ) )
-        {
-            var Text t;
-            t = beschreibung.getText();
-            while( z > 0.03 )
-            {
-                z -= 0.03;
-                t.anhängen( txt.getTeilText( num, num + 1 ) );
-                num += 1;
-                if( num >= län )
-                {
-                    break;
-                }
-            }
-            beschreibung.setText( t );
-            beschreibung.setTextNachGröße();
-            return true;
-        }
-        return false;
-    }
-    func void render( Bild b )
-    {
-        beschreibung.render( b );
-    }
-};
-
-var TextErscheinen beschreibung;
-
-func void start()
-{
-    beschreibung.init();
-}
-
-func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
-{
-    tf.setPosition( x, y );
-    tf.setGröße( br, hö );
-    tf.setStyle( style );
-    tf.setSchriftFarbe( 0xFFFFFFFF );
-    tf.setText( t );
-}
-
-func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
-{
-    k.setPosition( x, y );
-    k.setGröße( br, hö );
-    k.setText( t );
-    k.addStyle( 0x1 );
-}
-
-func bool maus( MausEreignis me )
-{
-    return me.verarbeitet;
-}
-
-func bool tick( double z )
-{
-    var bool ret;
-    ret = beschreibung.next( z );
-    return ret;
-}
-
-func void render( Bild rObj )
-{
-    beschreibung.render( rObj );
-}

+ 0 - 3
patcher/data/spiele/Asteroids/data/game.ini

@@ -1,3 +0,0 @@
-start.ltdb
-beschreibung.ksgs
-id.ltgid

BIN
patcher/data/spiele/Asteroids/data/id.ltgid


+ 0 - 7
patcher/data/spiele/Asteroids/data/versionen.ini

@@ -1,7 +0,0 @@
-bilder/ship.ltdb=1
-bilder/start.ltdb=1
-data/game.ini=3
-data/id.ltgid=1
-models/ship.m2=5
-bin/Asteroids.dll=54
-data/beschreibung.ksgs=1

BIN
patcher/data/spiele/Asteroids/models/ship.m2


BIN
patcher/data/spiele/Linie/bilder/start.ltdb


+ 0 - 88
patcher/data/spiele/Linie/data/beschreibung.ksgs

@@ -1,88 +0,0 @@
-#include <KSGSStandart.h>
-
-class TextErscheinen
-{
-private:
-    var TextFeld beschreibung;
-    var Text txt;
-    var int num;
-    var int län;
-    var double z;
-public:
-    func void init()
-    {
-        initTextFeld( beschreibung, 5, 5, 568, 418, "", 0x101 );
-        txt = "Bei dem spiel Linie bewegen sich die Spieler duch ein Spielfeld und können nur ihre Richtung beeinflussen. Dabei hinterlässt Jeder Spieler eine Linie die nicht berührt werden darf. Viel spaß wünscht ihnen Kolja-Strohm Games.";
-        län = txt.getLänge();
-        num = 0;
-        z = 0;
-    }
-    func bool next( double zeit )
-    {
-        z += zeit;
-        if( ( z > 0.03 ) && ( num < län ) )
-        {
-            var Text t;
-            t = beschreibung.getText();
-            while( z > 0.03 )
-            {
-                z -= 0.03;
-                t.anhängen( txt.getTeilText( num, num + 1 ) );
-                num += 1;
-                if( num >= län )
-                {
-                    break;
-                }
-            }
-            beschreibung.setText( t );
-            beschreibung.setTextNachGröße();
-            return true;
-        }
-        return false;
-    }
-    func void render( Bild b )
-    {
-        beschreibung.render( b );
-    }
-};
-
-var TextErscheinen beschreibung;
-
-func void start()
-{
-    beschreibung.init();
-}
-
-func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
-{
-    tf.setPosition( x, y );
-    tf.setGröße( br, hö );
-    tf.setStyle( style );
-    tf.setSchriftFarbe( 0xFFFFFFFF );
-    tf.setText( t );
-}
-
-func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
-{
-    k.setPosition( x, y );
-    k.setGröße( br, hö );
-    k.setText( t );
-    k.addStyle( 0x1 );
-}
-
-func bool maus( MausEreignis me )
-{
-    return me.verarbeitet;
-}
-
-func bool tick( double z )
-{
-    var bool ret;
-    ret = beschreibung.next( z );
-    return ret;
-}
-
-func void render( Bild rObj )
-{
-    beschreibung.render( rObj );
-}

+ 0 - 3
patcher/data/spiele/Linie/data/game.ini

@@ -1,3 +0,0 @@
-start.ltdb
-beschreibung.ksgs
-id.ltgid

BIN
patcher/data/spiele/Linie/data/id.ltgid


+ 0 - 5
patcher/data/spiele/Linie/data/versionen.ini

@@ -1,5 +0,0 @@
-bilder/start.ltdb=1
-data/game.ini=2
-data/id.ltgid=1
-bin/Linie.dll=2
-data/beschreibung.ksgs=1

BIN
patcher/data/spiele/Stickman World Online/bilder/start.ltdb


+ 0 - 88
patcher/data/spiele/Stickman World Online/data/beschreibung.ksgs

@@ -1,88 +0,0 @@
-#include <KSGSStandart.h>
-
-class TextErscheinen
-{
-private:
-    var TextFeld beschreibung;
-    var Text txt;
-    var int num;
-    var int län;
-    var double z;
-public:
-    func void init()
-    {
-        initTextFeld( beschreibung, 5, 5, 568, 418, "", 0x101 );
-        txt = "Stickman World online ist eines der Ersten Spiele von Kolja-Strohm Games. Es gibt verschiedene Karten mit jeweils anderen Spielsystemen. Kolja-Strohm Games wünscht ihnen viel Spaß beim Spielen.";
-        län = txt.getLänge();
-        num = 0;
-        z = 0;
-    }
-    func bool next( double zeit )
-    {
-        z += zeit;
-        if( ( z > 0.03 ) && ( num < län ) )
-        {
-            var Text t;
-            t = beschreibung.getText();
-            while( z > 0.03 )
-            {
-                z -= 0.03;
-                t.anhängen( txt.getTeilText( num, num + 1 ) );
-                num += 1;
-                if( num >= län )
-                {
-                    break;
-                }
-            }
-            beschreibung.setText( t );
-            beschreibung.setTextNachGröße();
-            return true;
-        }
-        return false;
-    }
-    func void render( Bild b )
-    {
-        beschreibung.render( b );
-    }
-};
-
-var TextErscheinen beschreibung;
-
-func void start()
-{
-    beschreibung.init();
-}
-
-func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
-{
-    tf.setPosition( x, y );
-    tf.setGröße( br, hö );
-    tf.setStyle( style );
-    tf.setSchriftFarbe( 0xFFFFFFFF );
-    tf.setText( t );
-}
-
-func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
-{
-    k.setPosition( x, y );
-    k.setGröße( br, hö );
-    k.setText( t );
-    k.addStyle( 0x1 );
-}
-
-func bool maus( MausEreignis me )
-{
-    return me.verarbeitet;
-}
-
-func bool tick( double z )
-{
-    var bool ret;
-    ret = beschreibung.next( z );
-    return ret;
-}
-
-func void render( Bild rObj )
-{
-    beschreibung.render( rObj );
-}

+ 0 - 3
patcher/data/spiele/Stickman World Online/data/game.ini

@@ -1,3 +0,0 @@
-start.ltdb
-beschreibung.ksgs
-id.ltgid

BIN
patcher/data/spiele/Stickman World Online/data/id.ltgid


+ 0 - 4
patcher/data/spiele/Stickman World Online/data/versionen.ini

@@ -1,4 +0,0 @@
-bilder/start.ltdb=1
-data/game.ini=3
-data/id.ltgid=1
-data/beschreibung.ksgs=1

+ 1 - 1
patcher/data/update/unable/list.patch

@@ -1,5 +1,5 @@
 framework.dll=>data/update/download/framework.dll
 network.dll=>data/update/download/network.dll
-data/bin/Update.dll=>data/update/download/data/bin/Update.dll
 data/bin/KSGScript.dll=>data/update/download/data/bin/KSGScript.dll
 data/bin/KSGNetwork.dll=>data/update/download/data/bin/KSGNetwork.dll
+data/bin/Update.dll=>data/update/download/data/bin/Update.dll

+ 4 - 0
patcher/data/user_options.ini

@@ -0,0 +1,4 @@
+GraphicAPI=BEST
+Monitor=0
+GUISound=100
+MaxFPS=30

+ 18 - 14
patcher/data/versionen.ini

@@ -1,3 +1,9 @@
+framework.dll=59
+network.dll=20
+start.exe=39
+data/bin/KSGScript.dll=34
+data/script/SpielNichtAktuell.ksgs=3
+data/optionen.ini=6
 data/bilder/game.ltdb=2
 data/bilder/ladeanimation.ltdb=2
 data/bilder/system.ltdb=2
@@ -8,24 +14,22 @@ data/client/bilder/spielen.ltdb=2
 data/client/bilder/titel.ltdb=2
 data/client/bilder/video.ltdb=2
 data/patch/bilder/patcher.ltdb=2
-data/patch/bin/übernehmen.exe=4
 data/schriften/normal.ltds=2
 data/sounds/popup.gsl=2
-data/version=5
-data/optionen.ini=6
-data/client/bin/game client.exe=40
-network.dll=13
-data/bin/GSL.dll=20
-data/patch/bin/patcher.exe=31
-data/start/icon.exe=26
-start.exe=30
-data/bin/KSGScript.dll=26
-framework.dll=44
-data/bin/Update.dll=28
-data/script/SpielNichtAktuell.ksgs=3
-data/bin/KSGNetwork.dll=18
+data/version=8
+data/patch/bin/übernehmen.exe=4
+debugWindow/Eula.txt=1
 data/bin/.keep=1
 data/client/bin/.keep=1
 data/patch/bin/.keep=1
 data/start/.keep=1
+data/bin/KSGNetwork.dll=27
+data/start/icon.exe=33
+data/client/bin/game client.exe=53
+debugWindow/dbgview.chm=1
 data/schriften/ksgs.ltds=2
+data/bin/Update.dll=36
+debugWindow/Dbgview.exe=1
+data/patch/bin/patcher.exe=41
+data/bin/GSL.dll=29
+data/default_options.ini=1

BIN
patcher/debugWindow/Dbgview.exe


+ 66 - 0
patcher/debugWindow/Eula.txt

@@ -0,0 +1,66 @@
+SYSINTERNALS SOFTWARE LICENSE TERMS
+
+These license terms are an agreement between Sysinternals (a wholly owned subsidiary of Microsoft Corporation) and you.  Please read them.  They apply to the software you are downloading from Systinternals.com, which includes the media on which you received it, if any.  The terms also apply to any Sysinternals
+
+* updates,
+* supplements,
+* Internet-based services, and 
+* support services
+
+for this software, unless other terms accompany those items.  If so, those terms apply.
+
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.  IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
+
+If you comply with these license terms, you have the rights below.
+
+1. INSTALLATION AND USE RIGHTS.  You may install and use any number of copies of the software on your devices.
+
+2. SCOPE OF LICENSE.  The software is licensed, not sold. This agreement only gives you some rights to use the software.  Sysinternals reserves all other rights.  Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement.  In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways.
+
+You may not:
+
+* work around any technical limitations in the binary versions of the software;
+* reverse engineer, decompile or disassemble the binary versions of the software, except and only to the extent that 
+applicable law expressly permits, despite this limitation;
+* make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
+* publish the software for others to copy;
+* rent, lease or lend the software;
+* transfer the software or this agreement to any third party; or
+* use the software for commercial software hosting services.
+
+3. DOCUMENTATION.  Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
+
+4. EXPORT RESTRICTIONS.  The software is subject to United States export laws and regulations.  You must comply with all domestic and international export laws and regulations that apply to the software.  These laws include restrictions on destinations, end users and end use.  For additional information, see www.microsoft.com/exporting.
+
+5. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.
+
+6. ENTIRE AGREEMENT.  This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
+
+7. APPLICABLE LAW.
+a. United States.  If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles.  The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
+b. Outside the United States.  If you acquired the software in any other country, the laws of that country apply.
+
+8. LEGAL EFFECT.  This agreement describes certain legal rights.  You may have other rights under the laws of your country.  You may also have rights with respect to the party from whom you acquired the software.  This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
+
+9. DISCLAIMER OF WARRANTY.   THE SOFTWARE IS LICENSED “AS-IS.”  YOU BEAR THE RISK OF USING IT.  SYSINTERNALS GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS.  YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE.  TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, SYSINTERNALS EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+10. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES.  YOU CAN RECOVER FROM SYSINTERNALS AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00.  YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
+
+This limitation applies to
+* anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
+* claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
+It also applies even if Sysinternals knew or should have known about the possibility of the damages.  The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
+
+Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.
+
+Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
+
+EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Sysinternals n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection dues consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
+
+LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES.  Vous pouvez obtenir de Sysinternals et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
+Cette limitation concerne :
+* tout  ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et
+* les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
+Elle s’applique également, même si Sysinternals connaissait ou devrait connaître l’éventualité d’un tel dommage.  Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
+
+EFFET JURIDIQUE.  Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays.  Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.

BIN
patcher/debugWindow/dbgview.chm


+ 41 - 4
patcher/start.cpp

@@ -239,7 +239,7 @@ bool _o_rtME( void *p, void *obj, MausEreignis me )
 			if( _o_rt->zZeichnung( 1, i ) )
 				( (KontrollKnopf*)_o_rt->zZeichnung( 1, i ) )->removeStyle( KontrollKnopf::Style::Hintergrund | KontrollKnopf::Style::SelectFarbe );
 		}
-		int zeile = (int)_o_rt->getMausZeile( me.my - _o_rt->getY() - _o_rt->getVertikalScrollPos() );
+		int zeile = (int)_o_rt->getMausZeile( me.my - _o_rt->getVertikalScrollPos() );
 		if( zeile <= 0 )
 		{
 			_o_rno->removeStyle( Knopf::Style::Erlaubt );
@@ -675,7 +675,7 @@ int KSGStart Framework::Start( Startparam p )
 						  Fenster::Style::TitelHintergrund | Fenster::Style::BodyHintergrund | Fenster::Style::TitelHAlpha |
 						  Fenster::Style::BodyHAlpha | Fenster::Style::Rahmen | Fenster::Style::ClosingKlickBuffer |
 						  Fenster::Style::ClosingHintergrund | Fenster::Style::ClosingHAlpha | Fenster::Style::Beweglich | Fenster::Style::VScroll );
-	_optionenF->setSize( 300, 300 );
+	_optionenF->setSize( 300, 330 );
 	_optionenF->setPosition( 100, 100 );
 	_optionenF->setVSBMax( 300 );
 	_optionenF->zVScrollBar()->setKlickScroll( 10 );
@@ -791,9 +791,44 @@ int KSGStart Framework::Start( Startparam p )
 	_o_üle->addEintrag( "mb/s" );
 	_optionenF->addMember( _o_üle->getThis() );
 
+    bool exitPatcher = 0;
+
+    Knopf *o_repair = new Knopf();
+    o_repair->setStyle( Knopf::Style::Sichtbar | Knopf::Style::Erlaubt | Knopf::Style::Buffered | Knopf::Style::KlickBuffer | Knopf::Style::Rahmen );
+    o_repair->setPosition( 5, 254 );
+    o_repair->setSize( 100, 20 );
+    o_repair->setText( "Reparieren" );
+    o_repair->setSchriftZ( sNormal->getThis() );
+    o_repair->setMausEreignis( [ mainClient, &exitPatcher ]( void *p, void *o, MausEreignis me )
+    {
+        if( me.id == ME_RLinks )
+        {
+            _optionenF->removeStyle( Fenster::Style::Sichtbar );
+            exitPatcher = 1;
+            _patcher->warteAufPatch( INFINITE );
+            KSGTDatei dgs;
+            dgs.setPfad( "data/dg.ksgt" );
+            dgs.laden();
+            for( int i = 0; i < dgs.getZeilenAnzahl(); i++ )
+            {
+                if( dgs.zFeld( i, 1 )->getLength() )
+                    DateiRemove( dgs.zFeld( i, 1 )->getText() );
+            }
+            DateiRemove( "data/dg.ksgt" );
+            DateiRemove( "data/update" );
+            DateiRemove( "data/versionen.ini" );
+            _patcher->release();
+            exitPatcher = 0;
+            _patcher = new Patcher( (FBalken *)_fortschritt->getThis(), (TextFeld *)_aktion->getThis(), (Knopf *)_play->getThis(), &exitPatcher, mainClient->createPatchServerClient() );
+            _patcher->startPatch();
+        }
+        return 1;
+    } );
+    _optionenF->addMember( o_repair );
+
 	Knopf *o_ok = new Knopf();
 	o_ok->setStyle( Knopf::Style::Sichtbar | Knopf::Style::Erlaubt | Knopf::Style::Buffered | Knopf::Style::KlickBuffer | Knopf::Style::Rahmen );
-	o_ok->setPosition( 178, 254 );
+	o_ok->setPosition( 178, 284 );
 	o_ok->setSize( 100, 20 );
 	o_ok->setText( "Fertig" );
 	o_ok->setSchriftZ( sNormal->getThis() );
@@ -805,7 +840,7 @@ int KSGStart Framework::Start( Startparam p )
 	DWORD threadId;
 	HANDLE handle = CreateThread( NULL, 0, runThread, screen, 0, &threadId );
 
-	_patcher = new Patcher( (FBalken*)_fortschritt->getThis(), (TextFeld*)_aktion->getThis(), (Knopf*)_play->getThis(), &_exitB, mainClient->createPatchServerClient() );
+	_patcher = new Patcher( (FBalken*)_fortschritt->getThis(), (TextFeld*)_aktion->getThis(), (Knopf*)_play->getThis(), &exitPatcher, mainClient->createPatchServerClient() );
 	_patcher->startPatch();
 
 	StartNachrichtenSchleife();
@@ -815,6 +850,7 @@ int KSGStart Framework::Start( Startparam p )
 
 	news->release();
 
+    exitPatcher = 1;
 	_patcher->warteAufPatch( INFINITE );
 	int returnVal = _patcher->getReturn();
 	_patcher->release();
@@ -847,6 +883,7 @@ int KSGStart Framework::Start( Startparam p )
 	_frame->zerstören();
 	_frame->release();
     mainClient->release();
+    userOptions->release();
 	Network::Exit();
 
 	DateiPfadErstellen( new Text( "data/tmp/keinabsturz" ) );

BIN
patcher/start.exe