Kolja Strohm 5 lat temu
rodzic
commit
33a3d66dc7

+ 13 - 0
Test/Main.cpp

@@ -23,6 +23,7 @@
 #include <XML.h>
 #include <Zeit.h>
 #include <WebSocket.h>
+#include <JSON.h>
 
 struct HINSTANCE__;
 
@@ -75,6 +76,18 @@ public:
 void doStuff()
 {
 
+    /*Text test( "{\"name\": \"LARS KELLNER\", \"internal_id\": 2, \"max_inventory_size\": 29118, \"skills\": {\"WELTZAUBER 190\": {\"type\": \"WELT\", \"target_shape\": \"- AOE (RW 2)\", \"is_active\": 1, \"affects_self\": null, \"min_range\": 1, \"max_range\": 3.7, \"given_by\": \"self\", \"given_by_modifier_id\": null, \"duration_remaining\": null, \"caused_by_skill_id\": null, \"caused_by_entity_id\": null, \"enabled\": 0}, \"BLUTZAUBER 191\": {\"type\": \"BLUT\", \"target_shape\": \"EINZELZIEL\", \"is_active\": 0, \"affects_self\": 0, \"min_range\": null, \"max_range\": null, \"given_by\": \"self\", \"given_by_modifier_id\": null, \"duration_remaining\": null, \"caused_by_skill_id\": null, \"caused_by_entity_id\": null, \"enabled\": 0}, \"LUFTZAUBER 195\": {\"type\": \"LUFT\", \"target_shape\": \"O AOE (RW 1)\", \"is_active\": 1, \"affects_self\": null, \"min_range\": 0, \"max_range\": 0, \"given_by\": \"self\", \"given_by_modifier_id\": null, \"duration_remaining\": null, \"caused_by_skill_id\": null, \"caused_by_entity_id\": null, \"enabled\": 0}}, \"stats\": {\"AUSDAUER\": {\"base_value\": 117, \"current_value\": 117, \"consumable_remaining\": 237, \"max_consumable_value\": 237}, \"BLITZMAGIE\": {\"base_value\": 90, \"current_value\": 90, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"BLITZPRÄZISION\": {\"base_value\": 103, \"current_value\": 103, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"BLITZRESISTENZ\": {\"base_value\": 105, \"current_value\": 105, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"BLUTMAGIE\": {\"base_value\": 104, \"current_value\": 104, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"BLUTPRÄZISION\": {\"base_value\": 96, \"current_value\": 96, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"BLUTRESISTENZ\": {\"base_value\": 106, \"current_value\": 106, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"ENERGIE\": {\"base_value\": 95, \"current_value\": 95, \"consumable_remaining\": 191, \"max_consumable_value\": 191}, \"FEUERMAGIE\": {\"base_value\": 113, \"current_value\": 113, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"FEUERPRÄZISION\": {\"base_value\": 96, \"current_value\": 96, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"FEUERRESISTENZ\": {\"base_value\": 99, \"current_value\": 99, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"FROSTMAGIE\": {\"base_value\": 106, \"current_value\": 106, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"FROSTPRÄZISION\": {\"base_value\": 100, \"current_value\": 100, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"FROSTRESISTENZ\": {\"base_value\": 111, \"current_value\": 111, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GESCHICKLICHKEIT\": {\"base_value\": 89, \"current_value\": 89, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GESCHLECHT\": {\"base_value\": 119, \"current_value\": 119, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GESCHWINDIGKEIT\": {\"base_value\": 98, \"current_value\": 98, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GESUNDHEIT\": {\"base_value\": 86, \"current_value\": 86, \"consumable_remaining\": 174, \"max_consumable_value\": 174}, \"GIFTMAGIE\": {\"base_value\": 86, \"current_value\": 86, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GIFTPRÄZISION\": {\"base_value\": 97, \"current_value\": 97, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GIFTRESISTENZ\": {\"base_value\": 101, \"current_value\": 101, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"GRÖ�SSE\": {\"base_value\": 97, \"current_value\": 97, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"HAARFARBE\": {\"base_value\": 88, \"current_value\": 88, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"HAUTFARBE\": {\"base_value\": 108, \"current_value\": 108, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"HOLZMAGIE\": {\"base_value\": 101, \"current_value\": 101, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"HOLZPR─ZISION\": {\"base_value\": 100, \"current_value\": 100, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"HOLZRESISTENZ\": {\"base_value\": 105, \"current_value\": 105, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"INTELLIGENZ\": {\"base_value\": 108, \"current_value\": 108, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"LICHTMAGIE\": {\"base_value\": 97, \"current_value\": 97, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"LICHTPRÄZISION\": {\"base_value\": 89, \"current_value\": 89, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"LICHTRESISTENZ\": {\"base_value\": 114, \"current_value\": 114, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"LUFTMAGIE\": {\"base_value\": 97, \"current_value\": 97, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"LUFTPRÄZISION\": {\"base_value\": 99, \"current_value\": 99, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"LUFTRESISTENZ\": {\"base_value\": 102, \"current_value\": 102, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"METALLMAGIE\": {\"base_value\": 113, \"current_value\": 113, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"METALLPRÄZISION\": {\"base_value\": 92, \"current_value\": 92, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"METALLRESISTENZ\": {\"base_value\": 112, \"current_value\": 112, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"MUT\": {\"base_value\": 111, \"current_value\": 111, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"SCHATTENMAGIE\": {\"base_value\": 97, \"current_value\": 97, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"SCHATTENPRÄZISION\": {\"base_value\": 100, \"current_value\": 100, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"SCHATTENRESISTENZ\": {\"base_value\": 98, \"current_value\": 98, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"STEINMAGIE\": {\"base_value\": 96, \"current_value\": 96, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"STEINPRÄZISION\": {\"base_value\": 90, \"current_value\": 90, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"STEINRESISTENZ\": {\"base_value\": 99, \"current_value\": 99, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"STÄRKE\": {\"base_value\": 85, \"current_value\": 85, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"VERSTANDMAGIE\": {\"base_value\": 101, \"current_value\": 101, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"VERSTANDPRÄZISION\": {\"base_value\": 73, \"current_value\": 73, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"VERSTANDRESISTENZ\": {\"base_value\": 92, \"current_value\": 92, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"WASSERMAGIE\": {\"base_value\": 90, \"current_value\": 90, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"WASSERPRÄZISION\": {\"base_value\": 101, \"current_value\": 101, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"WASSERRESISTENZ\": {\"base_value\": 92, \"current_value\": 92, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"WELTMAGIE\": {\"base_value\": 110, \"current_value\": 110, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"WELTPRÄZISION\": {\"base_value\": 98, \"current_value\": 98, \"consumable_remaining\": null, \"max_consumable_value\": null}, \"WELTRESISTENZ\": {\"base_value\": 101, \"current_value\": 101, \"consumable_remaining\": null, \"max_consumable_value\": null}}, \"estimated_hero_value\": 1795.6557198587986, \"recruit_price\": 1795, \"movement_range\": 4, \"type\": \"HERO\", \"modifiers\": []}|" );
+    ZeitMesser zm;
+    zm.messungStart();
+    for( int i = 0; i < 10; i++ )
+    {
+        std::cout << test.getText() << "\n";
+        JSON::JSONObject *obj = new JSON::JSONObject( test );
+        obj->release();
+    }
+    zm.messungEnde();
+    std::cout << "Time: " << zm.getSekunden() << "\n";
+    getchar();*/
     /*Network::WebSocket::WebSocketClient client( "/test", "koljastrohm-games.com", 8083 );
     client.connect();
 

+ 1 - 1
Test/Minigames.cpp

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

+ 6 - 0
Test/data/Minigames/Snake/data/optionen.ini

@@ -0,0 +1,6 @@
+Breite=80
+Höhe=50
+Ziele=1
+Anhängen=10
+Geschwindigkeit=10
+Fortsetzen=0

BIN
Test/data/Minigames/Snake/data/score.ksgt


BIN
Test/data/Minigames/Tetris/data/game.mgc


BIN
Test/data/Minigames/Tetris/data/game.save


+ 5 - 0
Test/data/Minigames/Tetris/data/optionen.ini

@@ -0,0 +1,5 @@
+Breite=15
+Höhe=25
++Geschwindigkeit=50
+Geschwindigkeit=1000
+Fortsetzen=0