Kolja Strohm há 5 anos atrás
pai
commit
815034330f

BIN
Test/Framework.dll


+ 76 - 1
Test/Main.cpp

@@ -21,6 +21,7 @@
 #include <iostream>
 #include <string>
 #include <XML.h>
+#include <Zeit.h>
 
 struct HINSTANCE__;
 
@@ -31,6 +32,45 @@ void FClose( void *p, void *zF )
     StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
 }
 
+
+Bild *b1;
+Bild *b2;
+Bild *b3;
+
+class Alpha : public Zeichnung
+{
+public:
+    void render( Bild &zRObj )
+    {
+        zRObj.setDrawOptions( getPosition(), Punkt( 1000, 1000 ) );
+        Bild tmp;
+        tmp.neuBild( 100, 100, 0 );
+        tmp.drawBild( 0, 0, 100, 100, *b1 );
+        tmp.alphaBildAssoz( 0, 0, 100, 100, *b2 );
+        zRObj.drawBild( 0, 0, 100, 100, tmp );
+        zRObj.drawBild( 0, 150, 100, 100, *b1 );
+        zRObj.drawBild( 0, 250, 100, 100, *b2 );
+        zRObj.releaseDrawOptions();
+    }
+};
+
+class Alpha2 : public Zeichnung
+{
+public:
+    void render( Bild &zRObj )
+    {
+        zRObj.setDrawOptions( getPosition(), Punkt( 1000, 1000 ) );
+        Bild tmp;
+        tmp.neuBild( 100, 100, 0 );
+        tmp.drawBild( 0, 0, 100, 100, *b2 );
+        tmp.alphaBildAssoz( 0, 0, 100, 100, *b1 );
+        zRObj.drawBild( 0, 0, 100, 100, tmp );
+        zRObj.drawBild( 0, 150, 100, 100, *b2 );
+        zRObj.drawBild( 0, 250, 100, 100, *b1 );
+        zRObj.releaseDrawOptions();
+    }
+};
+
 void doStuff()
 {
     Network::Start( 1 );
@@ -44,9 +84,15 @@ void doStuff()
     f->setMausAktion( _ret1ME );
     f->setTastaturAktion( _ret1TE );
     f->setAnzeigeModus( 1 );
+    Punkt bildschirmGröße = BildschirmGröße();
+    bildschirmGröße.x++;
+    bildschirmGröße.y++;
+    f->setSize( bildschirmGröße );
+    f->setPosition( Punkt( 0, 20 ) );
     Bildschirm *b = new Bildschirm3D( f->getThis() );
-    b->setBackBufferSize( 800, 500 );
+    b->setBackBufferSize( f->getKörperGröße() );
     f->setBildschirm( b->getThis() );
+    b->setFillFarbe( 0xFF000000 );
     b->setTestRend( 0 );
 
     LTDSDatei sd;
@@ -54,11 +100,40 @@ void doStuff()
     sd.leseDaten();
     Schrift *schrift = sd.ladeSchrift();
     DLLDateien dlls;
+    Bild tmp;
+    tmp.neuBild( 500, 1000, 0x30FFFFFF );
+    Bild tmp2;
+    tmp2.neuBild( 1900, 1000, 0x80355768 );
+    ZeitMesser m;
+    //while( true )
+    //{
+    //    m.messungStart();
+    //    for( int i = 0; i < 2000; i++ )
+    //    {
+    //        tmp2.alphaRegion( 0, 0, 500, 1000, 0x40468349 );
+    //    }
+    //    m.messungEnde();
+    //    std::cout << "time: " << m.getSekunden() << "\n";
+    //}
 
     API *api = new API( f );
 
     MiniGames *mGames = new MiniGames( schrift, dlls.getThis(), b, api );
     b->addMember( mGames->getThis() );
+    //b1 = new Bild();
+    //b1->neuBild( 100, 100, 0x7F0545FF );
+    //b2 = new Bild();
+    //b2->neuBild( 100, 100, 0x7F79FF45 );
+    //b3 = new Bild();
+    //b3->neuBild( 100, 100, 0x77FF2020 );
+    //Alpha *a = new Alpha();
+    //a->setPosition( 0, 0 );
+    //a->setSize( 100, 100 );
+    //b->addMember( a );
+    //Alpha2 *a2 = new Alpha2();
+    //a2->setPosition( 100, 0 );
+    //a2->setSize( 100, 100 );
+    //b->addMember( a2 );
 
     b->update();
     RenderTh *r = new RenderTh();

+ 1 - 1
Test/Minigames.cpp

@@ -24,7 +24,7 @@ public:
     // Gibt die Id des aktuell spielenden Accounts zurück
     int getAccountId()
     {
-        return 1;
+        return 2;
     }
     // Gibt den Anzeigenamen eines bestimmten Accounts zurück
     //  id: Die id des Accounts

+ 2 - 0
Test/Minigames.h

@@ -86,6 +86,7 @@ public:
     // legt fest ob das spiel im Vollbildmodus ausgeführt werden soll
     void setFullScreenMode( bool enabled )
     {
+        /*
         if( enabled )
         {
             Punkt bildschirmGröße = BildschirmGröße();
@@ -100,6 +101,7 @@ public:
         }
         f->zBildschirm()->setBackBufferSize( f->getGröße() );
         f->zBildschirm()->update();
+        */
     }
 };
 

+ 6 - 4
Test/Test.vcxproj

@@ -83,8 +83,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <IncludePath>..\..\Framework;..\..\Network\Network;..\..\ksgScript\ksgScript\Include;$(IncludePath)</IncludePath>
-    <LibraryPath>..\..\Framework\x64\Release;$(LibraryPath)</LibraryPath>
+    <IncludePath>..\..\..\Spiele Platform\Klient\KSGNetwork\Include;..\..\Framework;..\..\Network\Network;..\..\ksgScript\ksgScript\Include;..\..\..\Spiele Platform\Klient\Include;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\x64\Release;..\..\Network\x64\Release;$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
@@ -148,10 +148,12 @@ xcopy /S /Q /y "..\..\..\Spiele Platform\Klient\Fertig\Debug\Minigames\x64" "dat
       <SubSystem>Console</SubSystem>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Framework.lib;Network.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <CustomBuildStep>
-      <Command>copy "..\..\Framework\x64\Release\Framework.dll" "framework.dll"</Command>
+      <Command>copy "..\..\Framework\x64\Release\Framework.dll" "framework.dll"
+copy "..\..\Network\x64\Release\Network.dll" "network.dll"
+xcopy /S /Q /y "..\..\..\Spiele Platform\Klient\Fertig\Minigames\x64" "data\Minigames"</Command>
     </CustomBuildStep>
     <CustomBuildStep>
       <Outputs>kopieren;%(Outputs)</Outputs>

BIN
Test/Test_alt.exe


BIN
Test/data/Minigames/DungeonGame/bilder/assets.ltdb


+ 10 - 7
Test/data/Minigames/DungeonGame/views/town.uiml

@@ -1,30 +1,33 @@
 <view>
-  <button id="back" width="150" height="26" align-top="start" align-right="end" margin="5">ZURÜCK</button>
-  <text id="title" width="75%" height="100" font-size="24" text-align="center">TOWN</text>
-  <text id="heroesTitle" align-left="start" align-top="title" margin="5" width="25%" height="26">YOUR HEROES</text>
+  <button id="back" width="150" height="26" align-top="start" align-left="start" margin="5">ZURÜCK</button>
+  <text id="title" width="75%" height="100" font-size="24" text-align="center">STADT</text>
+  <text id="heroesTitle" align-left="start" align-top="title" margin="5" width="25%" height="26">DEINE HELDEN</text>
   <table id="heroes" align-left="start" align-top="heroesTitle" margin="5" width="25%" height="35%">
     <tr>
       <text width="100%">NAME</text>
     </tr>
   </table>
-  <text id="ownDungeonsTitle" align-left="start" align-top="heroes" margin-left="5" margin-top="5" width="25%" height="26">YOUR OWN DUNGEONS</text>
+  <text id="ownDungeonsTitle" align-left="start" align-top="heroes" margin="5" width="25%" height="26">DEINE DUNGEONS</text>
   <table id="ownDungeons" align-left="start" align-top="ownDungeonsTitle" margin="5" width="25%" height="35%">
     <tr>
       <text width="100%">NAME</text>
     </tr>
   </table>
+  <button id="createDungeon" align-left="start" align-top="ownDungeons" width="250" height="30" margin="5">DUNGEON ERSTELLEN</button>
   <text id="money" align-left="heroes" align-bottom="inventoryTitle" margin="5" width="25%" height="26"></text>
-  <text id="inventoryTitle" align-left="heroes" align-top="title" margin="5" width="25%" height="26">YOUR INVENTORY</text>
+  <text id="inventoryTitle" align-left="heroes" align-top="title" margin="5" width="25%" height="26">DEIN INVENTAR</text>
   <table id="inventory" align-left="heroes" align-top="inventoryTitle" margin="5" width="25%" height="80%">
     <tr>
       <text width="100%">NAME</text>
     </tr>
   </table>
-  <text id="dungeonsTitle" align-left="inventory" align-top="title" margin="5" width="25%" height="26">ALL DUNGEONS</text>
+  <button id="openTavern" align-right="inventoryTitle" align-bottom="heroes" width="150" height="30" margin="5">TAVERNE</button>
+  <text id="dungeonsTitle" align-left="inventory" align-top="title" margin="5" width="25%" height="26">ALLE DUNGEONS</text>
+  <button id="openShop" align-right="dungeonsTitle" align-bottom="heroes" width="100" height="30" margin="5">SHOP</button>
   <table id="dungeons" align-left="inventory" align-top="dungeonsTitle" margin="5" width="25%" height="80%">
     <tr>
       <text width="50%">NAME</text>
-      <text width="50%">OWNER</text>
+      <text width="50%">BESITZER</text>
     </tr>
   </table>
 </view>

BIN
Test/network.dll