• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Automap (client) [VS plugin mod]


Commit MetaInfo

Revision514075d66a5c63b22d252c6bb9f642d92d27d764 (tree)
Time2021-06-20 10:49:03
Authormelchior <melchior@user...>
Commitermelchior

Log Message

Added Protocol Buffer Header generation to shard-processor

Change Summary

Incremental Difference

--- a/ShardProcessor/Program.cs
+++ b/ShardProcessor/Program.cs
@@ -39,7 +39,7 @@ namespace ShardProcessor
3939 private static void ArgsDecoder(string[ ] args)
4040 {
4141 //#1 Path to maps '~/ApplicationData/vintagestory/Map/World_1234567890
42- mapPath = args[1];
42+ mapPath = args.Length > 1 ? args[1] : String.Empty;
4343
4444 //#0 Command: Heightmaps (Generation from existing shard data)
4545 string command = args[0];
@@ -63,6 +63,10 @@ namespace ShardProcessor
6363 Scan_OneShard( );
6464 break;
6565
66+ case @"--protoheader":
67+ Emit_ProtoHeader();
68+ break;
69+
6670 default:
6771 Console.WriteLine("Unrecognized Command: {0}", command);
6872 break;
@@ -298,5 +302,21 @@ namespace ShardProcessor
298302
299303 }
300304 }
305+
306+ private static void Emit_ProtoHeader( )
307+ {
308+ Console.WriteLine("Created Protobuf Header files.");
309+ using (var entitiesProto = File.CreateText("Entities.protoc"))
310+ {
311+ entitiesProto.Write(Serializer.GetProto<EntitiesOfInterest>( ));
312+ entitiesProto.Flush( );
313+ }
314+
315+
316+ using (var pointsProto = File.CreateText("Points.protoc")) {
317+ pointsProto.Write(Serializer.GetProto<PointsOfInterest>( ));
318+ pointsProto.Flush( );
319+ }
320+ }
301321 }
302322 }