• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Automap (client) [VS plugin mod]


Commit MetaInfo

Révision514075d66a5c63b22d252c6bb9f642d92d27d764 (tree)
l'heure2021-06-20 10:49:03
Auteurmelchior <melchior@user...>
Commitermelchior

Message de Log

Added Protocol Buffer Header generation to shard-processor

Change Summary

Modification

--- 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 }