namespace Royal.Scenes.Game.Utils.FlatLevel;

table FIntIntPair {
  key:int;
  value:int;
}

table FValidationSaveData {
  level_name:string;
  checksum:long;
  app_version:int;
}

table FItemSaveData {
  tiled_id:short;
  data:short;
}

// Royal.Scenes.Game.Utils.LevelParser.TiledId
table FStaticItemSaveData {
  tiled_id:short;
  data:short;
}

table FCellSaveData {
  current_item:FItemSaveData;
  static_items:[FStaticItemSaveData];
}

table FCellGridSaveData {
  grid:[FCellSaveData];
  width:int;
  height:int;
  shifter_data:[int];
}

table FBoardGoalSaveData {
  goal_type:[short];
  left_count:[short];
  target_count:[short];
}

table FItemModelQueueSaveData {
  items:[FItemSaveData];
}

table FPredefinedItemsSaveData {
  queues:[FItemModelQueueSaveData];
}

table FItemModelCreatorSaveData {
  created_set_item_count_except_match_item:[FIntIntPair];
  predefined_items_save_data:FPredefinedItemsSaveData;
}

table FBoardSaveData {
  grid_data:FCellGridSaveData;
  goals:[FBoardGoalSaveData];
  item_model_creator_save_data:FItemModelCreatorSaveData;
}

table FLevelSaveData {
  validation_save_data:FValidationSaveData;
  board_save_data:FBoardSaveData;
  game_state_save_data:[long];
  booster_save_data:[long];
  level_statistics_save_data:[long];
  event_save_data:[long];
}

root_type FLevelSaveData; 