Skip to content

Instantly share code, notes, and snippets.

@ark-tik
Created July 4, 2022 07:42
Show Gist options
  • Save ark-tik/087f789ead50fa3787028079815803ac to your computer and use it in GitHub Desktop.
Save ark-tik/087f789ead50fa3787028079815803ac to your computer and use it in GitHub Desktop.
message Room {
optional int32 id = 29 [(gmx) = "GMX_DEPRECATED"];
optional string caption = 1;
optional uint32 width = 2 [(yyp) = "roomSettings/Width", (tmx) = "width"]; // tmx width unit is no. of tiles
optional uint32 height = 3 [(yyp) = "roomSettings/Height", (tmx) = "height"]; // tmx height unit is no. of tiles
optional uint32 hsnap = 4 [(tmx) = "tilewidth"]; // tmx tilewidth unit is probably in pixels
optional uint32 vsnap = 5 [(tmx) = "tileheight"]; // tmx tileheight unit is probably in pixels
optional bool isometric = 6 [(tmx) = "orientation"]; // TODO: Handle type conversion exclusively. Add support to staggered and hexagonal orientations of tmx
optional uint32 speed = 27;
optional bool persistent = 7 [(yyp) = "roomSettings/persistent"];
optional int32 color = 8 [(gmx) = "colour", (tmx) = "backgroundcolor"]; // TODO: Handle type conversion exclusively
// truncated code...
message Tile {
optional string name = 1;
optional int32 id = 2 [(id_start) = 10000001];
optional string background_name = 3 [(resource_ref)="background", (gmx) = "bgName"];
optional double x = 4 [(tmx) = "x"];
optional double y = 5 [(tmx) = "y"];
optional int32 xoffset = 6 [(gmx) = "xo"];
optional int32 yoffset = 7 [(gmx) = "yo"];
optional uint32 width = 8 [(gmx) = "w", (tmx) = "width"];
optional uint32 height = 9 [(gmx) = "h", (tmx) = "height"];
// truncated code...
}
repeated Tile tiles = 18 [(gmx) = "tiles/tile"];
// truncated code...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment