private static void ArgsDecoder(string[ ] args)
{
//#1 Path to maps '~/ApplicationData/vintagestory/Map/World_1234567890
- mapPath = args[1];
+ mapPath = args.Length > 1 ? args[1] : String.Empty;
//#0 Command: Heightmaps (Generation from existing shard data)
string command = args[0];
Scan_OneShard( );
break;
+ case @"--protoheader":
+ Emit_ProtoHeader();
+ break;
+
default:
Console.WriteLine("Unrecognized Command: {0}", command);
break;
}
}
+
+ private static void Emit_ProtoHeader( )
+ {
+ Console.WriteLine("Created Protobuf Header files.");
+ using (var entitiesProto = File.CreateText("Entities.protoc"))
+ {
+ entitiesProto.Write(Serializer.GetProto<EntitiesOfInterest>( ));
+ entitiesProto.Flush( );
+ }
+
+
+ using (var pointsProto = File.CreateText("Points.protoc")) {
+ pointsProto.Write(Serializer.GetProto<PointsOfInterest>( ));
+ pointsProto.Flush( );
+ }
+ }
}
}