package com.bartlomiejpluta.base.proto;

option java_package = "com.bartlomiejpluta.base.proto";
option java_outer_classname = "ProjectProto";

message Project {
  required string name = 1;
  required string runner = 2;
  repeated GameMapAsset maps = 3;
  repeated TileSetAsset tileSets = 4;
  repeated ImageAsset images = 5;
  repeated CharacterSetAsset characterSets = 6;
  repeated FontAsset fonts = 7;
  repeated WidgetAsset widgets = 8;
  repeated AnimationAsset animations = 9;
  repeated SoundAsset sounds = 10;
  repeated IconSetAsset iconSets = 11;
  repeated AutoTileSetAsset autoTiles = 12;
}

message GameMapAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
}

message TileSetAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
  required uint32 rows = 4;
  required uint32 columns = 5;
}

message ImageAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
}

message CharacterSetAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
  required uint32 rows = 4;
  required uint32 columns = 5;
}

message FontAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
}

message WidgetAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
}

message AnimationAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
  required uint32 rows = 4;
  required uint32 columns = 5;
}

message SoundAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
}

message IconSetAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
  required uint32 rows = 4;
  required uint32 columns = 5;
}

message AutoTileSetAsset {
  required string uid = 1;
  required string source = 2;
  required string name = 3;
  required uint32 rows = 4;
  required uint32 columns = 5;
  required AutoTileLayout layout = 6;
}

enum AutoTileLayout {
  LAYOUT_2X2 = 0;
  LAYOUT_2X3 = 1;
}