Browse Source

add debug output

Kolja Strohm 2 năm trước cách đây
mục cha
commit
3829493744

+ 36 - 0
FactoryCraft/Block.cpp

@@ -124,6 +124,12 @@ Text Block::printLightInfo()
 	result += (int)lightData[1];
 	result += ",";
 	result += (int)lightData[2];
+	result += ";";
+	result += (int)lightData[3];
+	result += ",";
+	result += (int)lightData[4];
+	result += ",";
+	result += (int)lightData[5];
 	result += ")\n";
 	result += "EAST[1;0;0](";
 	result += (int)lightData[6];
@@ -131,6 +137,12 @@ Text Block::printLightInfo()
 	result += (int)lightData[7];
 	result += ",";
 	result += (int)lightData[8];
+	result += ";";
+	result += (int)lightData[9];
+	result += ",";
+	result += (int)lightData[10];
+	result += ",";
+	result += (int)lightData[11];
 	result += ")\n";
 	result += "SOUTH[0;1;0](";
 	result += (int)lightData[12];
@@ -138,6 +150,12 @@ Text Block::printLightInfo()
 	result += (int)lightData[13];
 	result += ",";
 	result += (int)lightData[14];
+	result += ";";
+	result += (int)lightData[15];
+	result += ",";
+	result += (int)lightData[16];
+	result += ",";
+	result += (int)lightData[17];
 	result += ")\n";
 	result += "WEST[-1;0;0](";
 	result += (int)lightData[18];
@@ -145,6 +163,12 @@ Text Block::printLightInfo()
 	result += (int)lightData[19];
 	result += ",";
 	result += (int)lightData[20];
+	result += ";";
+	result += (int)lightData[21];
+	result += ",";
+	result += (int)lightData[22];
+	result += ",";
+	result += (int)lightData[23];
 	result += ")\n";
 	result += "TOP[0;0;1](";
 	result += (int)lightData[24];
@@ -152,6 +176,12 @@ Text Block::printLightInfo()
 	result += (int)lightData[25];
 	result += ",";
 	result += (int)lightData[26];
+	result += ";";
+	result += (int)lightData[27];
+	result += ",";
+	result += (int)lightData[28];
+	result += ",";
+	result += (int)lightData[29];
 	result += ")\n";
 	result += "BOTTOM[0;0;-1](";
 	result += (int)lightData[30];
@@ -159,6 +189,12 @@ Text Block::printLightInfo()
 	result += (int)lightData[31];
 	result += ",";
 	result += (int)lightData[32];
+	result += ";";
+	result += (int)lightData[33];
+	result += ",";
+	result += (int)lightData[34];
+	result += ",";
+	result += (int)lightData[35];
 	result += ")\n";
 	return result;
 }

+ 20 - 20
FactoryCraft/CustomUIDX11PixelShader.h

@@ -373,10 +373,10 @@ ret
 
 const BYTE CustomUIDX11PixelShader[] =
 {
-     68,  88,  66,  67, 201, 167, 
-     21, 180,  66, 206, 143,  80, 
-     15, 182, 225,  57, 227, 210, 
-    169, 211,   1,   0,   0,   0, 
+     68,  88,  66,  67, 163,  34, 
+    211, 186,  80,  77, 115, 205, 
+    140, 245, 103,  55, 224,  90, 
+    206, 234,   1,   0,   0,   0, 
      16, 135,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
     192,   6,   0,   0, 104,   7, 
@@ -1869,11 +1869,11 @@ const BYTE CustomUIDX11PixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 104, 142, 
-    136,  98,   1,   0,   0,   0, 
-     32, 206,  34, 225,  76,  33, 
-     74,  77, 186,   5,  51, 143, 
-    255,  83,  24, 220,   0,   0, 
+    148,  46,  49,   1, 151, 233, 
+    139,  98,   1,   0,   0,   0, 
+    206, 172, 162, 213, 219, 221, 
+     43,  76, 166, 114,  60,  97, 
+     59, 236, 194,  42,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       1,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2045,9 +2045,9 @@ const BYTE CustomUIDX11PixelShader[] =
       1,   0,  43, 236,   3,   0, 
      28,  19,   2,   0,  65,  36, 
       1,   0, 236, 179,   1,   0, 
-    171,  43,   2,   0, 125,  10, 
+    102, 213,   0,   0, 125,  10, 
       2,   0, 125, 181,   2,   0, 
-    186,  38,   0,   0, 193,  33, 
+    232, 119,   1,   0, 193,  33, 
       3,   0,  65, 185,   2,   0, 
       9, 241,   2,   0, 146, 230, 
       3,   0, 125, 218,   1,   0, 
@@ -2979,8 +2979,8 @@ const BYTE CustomUIDX11PixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  27, 226,  48,   1, 
-    128,   0,   0,   0,  28, 168, 
-    199, 170, 224, 108, 216,   1, 
+    128,   0,   0,   0, 154, 141, 
+    247, 199, 224, 110, 216,   1, 
       1,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4310,14 +4310,14 @@ const BYTE CustomUIDX11PixelShader[] =
       6,  16,   0,   0,  23,   0, 
       1,   0,   5,  16,   0,   0, 
      14,   0,  23,  21,   0,  16, 
-      0,   0,   3,   2,  96, 193, 
+      0,   0,   3,   2, 160, 178, 
       0,   0, 242, 241,  10,   0, 
      24,  21,   8,  16,   0,   0, 
       1,   0,   1,   0,  10,   0, 
      24,  21,   9,  16,   0,   0, 
       1,   0,   0,   2,  14,   0, 
      23,  21,   0,   0,   0,   0, 
-     10,   2,  96, 193,   0,   0, 
+     10,   2, 160, 178,   0,   0, 
     242, 241,  10,   0,  24,  21, 
      11,  16,   0,   0,   1,   0, 
       1,   0,  10,   0,  24,  21, 
@@ -5539,10 +5539,10 @@ const BYTE CustomUIDX11PixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    104, 142, 136,  98,   1,   0, 
-      0,   0,  32, 206,  34, 225, 
-     76,  33,  74,  77, 186,   5, 
-     51, 143, 255,  83,  24, 220, 
+    151, 233, 139,  98,   1,   0, 
+      0,   0, 206, 172, 162, 213, 
+    219, 221,  43,  76, 166, 114, 
+     60,  97,  59, 236, 194,  42, 
     174,   0,   0,   0,  47,  76, 
     105, 110, 107,  73, 110, 102, 
     111,   0,  47, 110,  97, 109, 
@@ -5642,7 +5642,7 @@ const BYTE CustomUIDX11PixelShader[] =
       0,   0,   0,   0,   2,   0, 
       9,   0,  80,   9,   0,   0, 
       0,   0,   0,   0, 124,  15, 
-      0,   0,   1,   0, 109,  54, 
+      0,   0,   1,   0, 207, 250, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
      84, 101, 120, 116, 117, 114, 

+ 16 - 16
FactoryCraft/CustomUIDX11VertexShader.h

@@ -204,10 +204,10 @@ ret
 
 const BYTE CustomUIDX11VertexShader[] =
 {
-     68,  88,  66,  67,  73,  86, 
-    187,  87,  91, 181, 243, 179, 
-    126,  42,  67, 247,  19, 249, 
-    135,  30,   1,   0,   0,   0, 
+     68,  88,  66,  67,  29, 231, 
+    141,  33, 141, 128, 253, 136, 
+    129, 210,  29,  70,  82,  79, 
+     89, 114,   1,   0,   0,   0, 
     252,  91,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
      84,   3,   0,   0,  12,   4, 
@@ -1228,10 +1228,10 @@ const BYTE CustomUIDX11VertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    155, 145, 136,  98,   1,   0, 
-      0,   0, 217, 186, 189, 110, 
-    192,  81, 179,  68, 136, 192, 
-    248,  53,  74,  65, 197, 182, 
+    151, 233, 139,  98,   1,   0, 
+      0,   0, 213, 193, 158, 200, 
+     94,  44, 123,  71, 165, 179, 
+    128,  32, 182, 163, 132, 123, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   1,   0,   0,   0, 
       1,   0,   0,   0,   0,   0, 
@@ -1996,8 +1996,8 @@ const BYTE CustomUIDX11VertexShader[] =
      10, 125,  13,  10,  13,  10, 
      99,  98, 117, 102, 102, 101, 
     114,  32,  27, 226,  48,   1, 
-    128,   0,   0,   0,  98, 150, 
-     21, 147, 226, 108, 216,   1, 
+    128,   0,   0,   0,  24,  84, 
+     69, 200, 224, 110, 216,   1, 
       1,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3702,11 +3702,11 @@ const BYTE CustomUIDX11VertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 155, 145, 
-    136,  98,   1,   0,   0,   0, 
-    217, 186, 189, 110, 192,  81, 
-    179,  68, 136, 192, 248,  53, 
-     74,  65, 197, 182, 175,   0, 
+    148,  46,  49,   1, 151, 233, 
+    139,  98,   1,   0,   0,   0, 
+    213, 193, 158, 200,  94,  44, 
+    123,  71, 165, 179, 128,  32, 
+    182, 163, 132, 123, 175,   0, 
       0,   0,  47,  76, 105, 110, 
     107,  73, 110, 102, 111,   0, 
      47, 110,  97, 109, 101, 115, 
@@ -3806,7 +3806,7 @@ const BYTE CustomUIDX11VertexShader[] =
       0,   0,   2,   0,   9,   0, 
      64,   6,   0,   0,   0,   0, 
       0,   0, 244,   6,   0,   0, 
-      1,   0, 233,  36,   0,   0, 
+      1,   0, 161, 142,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  84, 101, 
     120, 116, 117, 114, 101,  86, 

+ 4 - 0
FactoryCraft/Dimension.cpp

@@ -72,8 +72,12 @@ void Dimension::api(char* message)
 		center.y = *(int*)(message + 5);
 		ByteArrayReader reader(message + 9, INT_MAX, 0);
 		std::cout << "downloading chunk " << center.x << ", " << center.y << "\n";
+		ZeitMesser zm;
+		zm.messungStart();
 		Chunk* chunk = new Chunk(center);
 		chunk->load(&reader);
+		zm.messungEnde();
+		std::cout << "chunk loading took " << zm.getSekunden() << " seconds\n";
 		setChunk(chunk, center);
 		currentGame->onChunkAdded(center);
 		break;