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

Websocket client testcode hinzugefügt

Kolja Strohm 5 éve
szülő
commit
cad156569c
28 módosított fájl, 65 hozzáadás és 2 törlés
  1. 13 2
      Test/Main.cpp
  2. BIN
      Test/data/Minigames/Asteroids/bilder/asteroids.ltdb
  3. BIN
      Test/data/Minigames/Asteroids/bilder/f_burn.ltdb
  4. BIN
      Test/data/Minigames/Asteroids/bilder/f_start.ltdb
  5. BIN
      Test/data/Minigames/Asteroids/bilder/hintergrund.ltdb
  6. BIN
      Test/data/Minigames/Asteroids/bilder/ship.ltdb
  7. BIN
      Test/data/Minigames/Asteroids/bilder/titel.ltdb
  8. 3 0
      Test/data/Minigames/Asteroids/mg.ini
  9. BIN
      Test/data/Minigames/Asteroids/models/asteroids.m2
  10. BIN
      Test/data/Minigames/Asteroids/models/ship.m2
  11. BIN
      Test/data/Minigames/Blöcke/bilder/hintergrund.ltdb
  12. BIN
      Test/data/Minigames/Blöcke/bilder/titel.ltdb
  13. 3 0
      Test/data/Minigames/Blöcke/mg.ini
  14. BIN
      Test/data/Minigames/DungeonGame/bilder/hintergrund.ltdb
  15. BIN
      Test/data/Minigames/DungeonGame/bilder/titel.ltdb
  16. 3 0
      Test/data/Minigames/DungeonGame/mg.ini
  17. BIN
      Test/data/Minigames/DungeonGame/schriften/gravur.ltds
  18. 33 0
      Test/data/Minigames/DungeonGame/views/town.uiml
  19. BIN
      Test/data/Minigames/Fangen/bilder/hintergrund.ltdb
  20. BIN
      Test/data/Minigames/Fangen/bilder/titel.ltdb
  21. 3 0
      Test/data/Minigames/Fangen/mg.ini
  22. BIN
      Test/data/Minigames/Snake/bilder/hintergrund.ltdb
  23. BIN
      Test/data/Minigames/Snake/bilder/titel.ltdb
  24. 3 0
      Test/data/Minigames/Snake/mg.ini
  25. BIN
      Test/data/Minigames/Tetris/bilder/hintergrund.ltdb
  26. BIN
      Test/data/Minigames/Tetris/bilder/titel.ltdb
  27. 3 0
      Test/data/Minigames/Tetris/mg.ini
  28. 1 0
      Test/data/Minigames/test.txt

+ 13 - 2
Test/Main.cpp

@@ -22,6 +22,7 @@
 #include <string>
 #include <XML.h>
 #include <Zeit.h>
+#include <WebSocket.h>
 
 struct HINSTANCE__;
 
@@ -73,7 +74,16 @@ public:
 
 void doStuff()
 {
-    Network::Start( 1 );
+
+    /*Network::WebSocket::WebSocketClient client( "/test", "koljastrohm-games.com", 8083 );
+    client.connect();
+
+    Text test = "{\"data\":\"test\"}";
+    client.send( test.getLength(), test, Network::WebSocket::TEXT );
+    client.send( test.getLength(), test, Network::WebSocket::TEXT );
+
+    client.warteAufThread( 2000 );*/
+
     WFenster *f = new WFenster();
     WNDCLASS fc = F_Normal( 0 );
     fc.lpszClassName = "Test";
@@ -154,7 +164,6 @@ void doStuff()
     f->release();
     schrift->release();
     delete api;
-    Network::Exit();
 }
 
 int main()
@@ -163,7 +172,9 @@ int main()
     _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
 #endif
     initFramework();
+    Network::Start( 1 );
     doStuff();
+    Network::Exit();
     releaseFramework();
     return 0;
 }

BIN
Test/data/Minigames/Asteroids/bilder/asteroids.ltdb


BIN
Test/data/Minigames/Asteroids/bilder/f_burn.ltdb


BIN
Test/data/Minigames/Asteroids/bilder/f_start.ltdb


BIN
Test/data/Minigames/Asteroids/bilder/hintergrund.ltdb


BIN
Test/data/Minigames/Asteroids/bilder/ship.ltdb


BIN
Test/data/Minigames/Asteroids/bilder/titel.ltdb


+ 3 - 0
Test/data/Minigames/Asteroids/mg.ini

@@ -0,0 +1,3 @@
+TitelBild=titel.jpg
+TitelBildPfad=bilder/titel.ltdb
+DllPfad=bin/game.dll

BIN
Test/data/Minigames/Asteroids/models/asteroids.m2


BIN
Test/data/Minigames/Asteroids/models/ship.m2


BIN
Test/data/Minigames/Blöcke/bilder/hintergrund.ltdb


BIN
Test/data/Minigames/Blöcke/bilder/titel.ltdb


+ 3 - 0
Test/data/Minigames/Blöcke/mg.ini

@@ -0,0 +1,3 @@
+TitelBild=titel.jpg
+TitelBildPfad=bilder/titel.ltdb
+DllPfad=bin/game.dll

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


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


+ 3 - 0
Test/data/Minigames/DungeonGame/mg.ini

@@ -0,0 +1,3 @@
+TitelBild=titel.jpg
+TitelBildPfad=bilder/titel.ltdb
+DllPfad=bin/game.dll

BIN
Test/data/Minigames/DungeonGame/schriften/gravur.ltds


+ 33 - 0
Test/data/Minigames/DungeonGame/views/town.uiml

@@ -0,0 +1,33 @@
+<view>
+  <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="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">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>
+  <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">LADEN</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%">BESITZER</text>
+    </tr>
+  </table>
+</view>

BIN
Test/data/Minigames/Fangen/bilder/hintergrund.ltdb


BIN
Test/data/Minigames/Fangen/bilder/titel.ltdb


+ 3 - 0
Test/data/Minigames/Fangen/mg.ini

@@ -0,0 +1,3 @@
+TitelBild=titel.jpg
+TitelBildPfad=bilder/titel.ltdb
+DllPfad=bin/game.dll

BIN
Test/data/Minigames/Snake/bilder/hintergrund.ltdb


BIN
Test/data/Minigames/Snake/bilder/titel.ltdb


+ 3 - 0
Test/data/Minigames/Snake/mg.ini

@@ -0,0 +1,3 @@
+TitelBild=titel.jpg
+TitelBildPfad=bilder/titel.ltdb
+DllPfad=bin/game.dll

BIN
Test/data/Minigames/Tetris/bilder/hintergrund.ltdb


BIN
Test/data/Minigames/Tetris/bilder/titel.ltdb


+ 3 - 0
Test/data/Minigames/Tetris/mg.ini

@@ -0,0 +1,3 @@
+TitelBild=titel.jpg
+TitelBildPfad=bilder/titel.ltdb
+DllPfad=bin/game.dll

+ 1 - 0
Test/data/Minigames/test.txt

@@ -0,0 +1 @@
+bla