// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: levelData.proto

#include "levelData.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
constexpr LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
struct LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal {
  constexpr LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal() {}
  union {
    LevelsIndex_LevelsIndexEntry_DoNotUse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelsIndex_LevelsIndexEntry_DoNotUseDefaultTypeInternal _LevelsIndex_LevelsIndexEntry_DoNotUse_default_instance_;
constexpr LevelsIndex::LevelsIndex(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : levelsindex_(){}
struct LevelsIndexDefaultTypeInternal {
  constexpr LevelsIndexDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LevelsIndexDefaultTypeInternal() {}
  union {
    LevelsIndex _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelsIndexDefaultTypeInternal _LevelsIndex_default_instance_;
constexpr t_offeset_len::t_offeset_len(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : offset_(0)
  , len_(0){}
struct t_offeset_lenDefaultTypeInternal {
  constexpr t_offeset_lenDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~t_offeset_lenDefaultTypeInternal() {}
  union {
    t_offeset_len _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_offeset_lenDefaultTypeInternal _t_offeset_len_default_instance_;
constexpr LevelData::LevelData(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : tiles_()
  , stacks_()
  , tilewidth_(0)
  , tileheight_(0){}
struct LevelDataDefaultTypeInternal {
  constexpr LevelDataDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LevelDataDefaultTypeInternal() {}
  union {
    LevelData _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LevelDataDefaultTypeInternal _LevelData_default_instance_;
constexpr t_tile::t_tile(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : tiledata_(nullptr)
  , x_(0)
  , y_(0)
  , z_(0){}
struct t_tileDefaultTypeInternal {
  constexpr t_tileDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~t_tileDefaultTypeInternal() {}
  union {
    t_tile _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_tileDefaultTypeInternal _t_tile_default_instance_;
constexpr t_tile_data::t_tile_data(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : type_(0)
  , subtype_(0)
  , id_(0)
  , zv_(0)
  , weight_(0){}
struct t_tile_dataDefaultTypeInternal {
  constexpr t_tile_dataDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~t_tile_dataDefaultTypeInternal() {}
  union {
    t_tile_data _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_tile_dataDefaultTypeInternal _t_tile_data_default_instance_;
constexpr t_stack::t_stack(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : tiledatas_()
  , x_(0)
  , y_(0)
  , direction_(0)
  , depth_(0){}
struct t_stackDefaultTypeInternal {
  constexpr t_stackDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~t_stackDefaultTypeInternal() {}
  union {
    t_stack _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT t_stackDefaultTypeInternal _t_stack_default_instance_;

// ===================================================================

LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse() {}
LevelsIndex_LevelsIndexEntry_DoNotUse::LevelsIndex_LevelsIndexEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
    : SuperType(arena) {}
void LevelsIndex_LevelsIndexEntry_DoNotUse::MergeFrom(const LevelsIndex_LevelsIndexEntry_DoNotUse& other) {
  MergeFromInternal(other);
}

// ===================================================================

class LevelsIndex::_Internal {
 public:
};

LevelsIndex::LevelsIndex(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
  levelsindex_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:LevelsIndex)
}
LevelsIndex::LevelsIndex(const LevelsIndex& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  levelsindex_.MergeFrom(from.levelsindex_);
  // @@protoc_insertion_point(copy_constructor:LevelsIndex)
}

void LevelsIndex::SharedCtor() {
}

LevelsIndex::~LevelsIndex() {
  // @@protoc_insertion_point(destructor:LevelsIndex)
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

void LevelsIndex::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void LevelsIndex::ArenaDtor(void* object) {
  LevelsIndex* _this = reinterpret_cast< LevelsIndex* >(object);
  (void)_this;
}
void LevelsIndex::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LevelsIndex::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LevelsIndex::Clear() {
// @@protoc_insertion_point(message_clear_start:LevelsIndex)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  levelsindex_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* LevelsIndex::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // map<string, .t_offeset_len> LevelsIndex = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&levelsindex_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<std::string>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* LevelsIndex::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:LevelsIndex)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // map<string, .t_offeset_len> LevelsIndex = 1;
  if (!this->_internal_levelsindex().empty()) {
    typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
          "LevelsIndex.LevelsIndexEntry.key");
      }
    };

    if (stream->IsSerializationDeterministic() &&
        this->_internal_levelsindex().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->_internal_levelsindex().size()]);
      typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::size_type size_type;
      size_type n = 0;
      for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
          it = this->_internal_levelsindex().begin();
          it != this->_internal_levelsindex().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      for (size_type i = 0; i < n; i++) {
        target = LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
          it = this->_internal_levelsindex().begin();
          it != this->_internal_levelsindex().end(); ++it) {
        target = LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream);
        Utf8Check::Check(&(*it));
      }
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:LevelsIndex)
  return target;
}

size_t LevelsIndex::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:LevelsIndex)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // map<string, .t_offeset_len> LevelsIndex = 1;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_levelsindex_size());
  for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::t_offeset_len >::const_iterator
      it = this->_internal_levelsindex().begin();
      it != this->_internal_levelsindex().end(); ++it) {
    total_size += LevelsIndex_LevelsIndexEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void LevelsIndex::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const LevelsIndex*>(
      &from));
}

void LevelsIndex::MergeFrom(const LevelsIndex& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:LevelsIndex)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  levelsindex_.MergeFrom(from.levelsindex_);
}

void LevelsIndex::CopyFrom(const LevelsIndex& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:LevelsIndex)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool LevelsIndex::IsInitialized() const {
  return true;
}

void LevelsIndex::InternalSwap(LevelsIndex* other) {
  using std::swap;
  _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  levelsindex_.Swap(&other->levelsindex_);
}

std::string LevelsIndex::GetTypeName() const {
  return "LevelsIndex";
}


// ===================================================================

class t_offeset_len::_Internal {
 public:
};

t_offeset_len::t_offeset_len(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:t_offeset_len)
}
t_offeset_len::t_offeset_len(const t_offeset_len& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&offset_, &from.offset_,
    static_cast<size_t>(reinterpret_cast<char*>(&len_) -
    reinterpret_cast<char*>(&offset_)) + sizeof(len_));
  // @@protoc_insertion_point(copy_constructor:t_offeset_len)
}

void t_offeset_len::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&offset_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&len_) -
    reinterpret_cast<char*>(&offset_)) + sizeof(len_));
}

t_offeset_len::~t_offeset_len() {
  // @@protoc_insertion_point(destructor:t_offeset_len)
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

void t_offeset_len::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void t_offeset_len::ArenaDtor(void* object) {
  t_offeset_len* _this = reinterpret_cast< t_offeset_len* >(object);
  (void)_this;
}
void t_offeset_len::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void t_offeset_len::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void t_offeset_len::Clear() {
// @@protoc_insertion_point(message_clear_start:t_offeset_len)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&offset_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&len_) -
      reinterpret_cast<char*>(&offset_)) + sizeof(len_));
  _internal_metadata_.Clear<std::string>();
}

const char* t_offeset_len::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // int32 offset = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 len = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<std::string>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* t_offeset_len::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:t_offeset_len)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 offset = 1;
  if (this->offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_offset(), target);
  }

  // int32 len = 2;
  if (this->len() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_len(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:t_offeset_len)
  return target;
}

size_t t_offeset_len::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:t_offeset_len)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // int32 offset = 1;
  if (this->offset() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_offset());
  }

  // int32 len = 2;
  if (this->len() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_len());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void t_offeset_len::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_offeset_len*>(
      &from));
}

void t_offeset_len::MergeFrom(const t_offeset_len& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:t_offeset_len)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.offset() != 0) {
    _internal_set_offset(from._internal_offset());
  }
  if (from.len() != 0) {
    _internal_set_len(from._internal_len());
  }
}

void t_offeset_len::CopyFrom(const t_offeset_len& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:t_offeset_len)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool t_offeset_len::IsInitialized() const {
  return true;
}

void t_offeset_len::InternalSwap(t_offeset_len* other) {
  using std::swap;
  _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(t_offeset_len, len_)
      + sizeof(t_offeset_len::len_)
      - PROTOBUF_FIELD_OFFSET(t_offeset_len, offset_)>(
          reinterpret_cast<char*>(&offset_),
          reinterpret_cast<char*>(&other->offset_));
}

std::string t_offeset_len::GetTypeName() const {
  return "t_offeset_len";
}


// ===================================================================

class LevelData::_Internal {
 public:
  using HasBits = decltype(std::declval<LevelData>()._has_bits_);
  static void set_has_tilewidth(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_tileheight(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

LevelData::LevelData(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
  tiles_(arena),
  stacks_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:LevelData)
}
LevelData::LevelData(const LevelData& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      tiles_(from.tiles_),
      stacks_(from.stacks_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&tilewidth_, &from.tilewidth_,
    static_cast<size_t>(reinterpret_cast<char*>(&tileheight_) -
    reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
  // @@protoc_insertion_point(copy_constructor:LevelData)
}

void LevelData::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&tilewidth_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&tileheight_) -
    reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
}

LevelData::~LevelData() {
  // @@protoc_insertion_point(destructor:LevelData)
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

void LevelData::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void LevelData::ArenaDtor(void* object) {
  LevelData* _this = reinterpret_cast< LevelData* >(object);
  (void)_this;
}
void LevelData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LevelData::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LevelData::Clear() {
// @@protoc_insertion_point(message_clear_start:LevelData)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  tiles_.Clear();
  stacks_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    ::memset(&tilewidth_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&tileheight_) -
        reinterpret_cast<char*>(&tilewidth_)) + sizeof(tileheight_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* LevelData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // repeated .t_tile tiles = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_tiles(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else goto handle_unusual;
        continue;
      // repeated .t_stack stacks = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_stacks(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      // int32 tileWidth = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_tilewidth(&has_bits);
          tilewidth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 tileHeight = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          _Internal::set_has_tileheight(&has_bits);
          tileheight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<std::string>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* LevelData::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:LevelData)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .t_tile tiles = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_tiles_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_tiles(i), target, stream);
  }

  // repeated .t_stack stacks = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_stacks_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_stacks(i), target, stream);
  }

  // int32 tileWidth = 3;
  if (_internal_has_tilewidth()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_tilewidth(), target);
  }

  // int32 tileHeight = 4;
  if (_internal_has_tileheight()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_tileheight(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:LevelData)
  return target;
}

size_t LevelData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:LevelData)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .t_tile tiles = 1;
  total_size += 1UL * this->_internal_tiles_size();
  for (const auto& msg : this->tiles_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .t_stack stacks = 2;
  total_size += 1UL * this->_internal_stacks_size();
  for (const auto& msg : this->stacks_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // int32 tileWidth = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_tilewidth());
    }

    // int32 tileHeight = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_tileheight());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void LevelData::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const LevelData*>(
      &from));
}

void LevelData::MergeFrom(const LevelData& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:LevelData)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  tiles_.MergeFrom(from.tiles_);
  stacks_.MergeFrom(from.stacks_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      tilewidth_ = from.tilewidth_;
    }
    if (cached_has_bits & 0x00000002u) {
      tileheight_ = from.tileheight_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void LevelData::CopyFrom(const LevelData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:LevelData)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool LevelData::IsInitialized() const {
  return true;
}

void LevelData::InternalSwap(LevelData* other) {
  using std::swap;
  _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  tiles_.InternalSwap(&other->tiles_);
  stacks_.InternalSwap(&other->stacks_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LevelData, tileheight_)
      + sizeof(LevelData::tileheight_)
      - PROTOBUF_FIELD_OFFSET(LevelData, tilewidth_)>(
          reinterpret_cast<char*>(&tilewidth_),
          reinterpret_cast<char*>(&other->tilewidth_));
}

std::string LevelData::GetTypeName() const {
  return "LevelData";
}


// ===================================================================

class t_tile::_Internal {
 public:
  using HasBits = decltype(std::declval<t_tile>()._has_bits_);
  static void set_has_x(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_y(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_z(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::t_tile_data& tiledata(const t_tile* msg);
  static void set_has_tiledata(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::t_tile_data&
t_tile::_Internal::tiledata(const t_tile* msg) {
  return *msg->tiledata_;
}
t_tile::t_tile(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:t_tile)
}
t_tile::t_tile(const t_tile& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_tiledata()) {
    tiledata_ = new ::t_tile_data(*from.tiledata_);
  } else {
    tiledata_ = nullptr;
  }
  ::memcpy(&x_, &from.x_,
    static_cast<size_t>(reinterpret_cast<char*>(&z_) -
    reinterpret_cast<char*>(&x_)) + sizeof(z_));
  // @@protoc_insertion_point(copy_constructor:t_tile)
}

void t_tile::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&tiledata_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&z_) -
    reinterpret_cast<char*>(&tiledata_)) + sizeof(z_));
}

t_tile::~t_tile() {
  // @@protoc_insertion_point(destructor:t_tile)
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

void t_tile::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  if (this != internal_default_instance()) delete tiledata_;
}

void t_tile::ArenaDtor(void* object) {
  t_tile* _this = reinterpret_cast< t_tile* >(object);
  (void)_this;
}
void t_tile::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void t_tile::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void t_tile::Clear() {
// @@protoc_insertion_point(message_clear_start:t_tile)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    if (GetArena() == nullptr && tiledata_ != nullptr) {
      delete tiledata_;
    }
    tiledata_ = nullptr;
  }
  if (cached_has_bits & 0x0000000eu) {
    ::memset(&x_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&z_) -
        reinterpret_cast<char*>(&x_)) + sizeof(z_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* t_tile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // int32 x = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_x(&has_bits);
          x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 y = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_y(&has_bits);
          y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 z = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_z(&has_bits);
          z_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .t_tile_data tileData = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_tiledata(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<std::string>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* t_tile::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:t_tile)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 x = 1;
  if (_internal_has_x()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_x(), target);
  }

  // int32 y = 2;
  if (_internal_has_y()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target);
  }

  // int32 z = 3;
  if (_internal_has_z()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_z(), target);
  }

  // .t_tile_data tileData = 4;
  if (_internal_has_tiledata()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::tiledata(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:t_tile)
  return target;
}

size_t t_tile::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:t_tile)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // .t_tile_data tileData = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *tiledata_);
    }

    // int32 x = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_x());
    }

    // int32 y = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_y());
    }

    // int32 z = 3;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_z());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void t_tile::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_tile*>(
      &from));
}

void t_tile::MergeFrom(const t_tile& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:t_tile)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_tiledata()->::t_tile_data::MergeFrom(from._internal_tiledata());
    }
    if (cached_has_bits & 0x00000002u) {
      x_ = from.x_;
    }
    if (cached_has_bits & 0x00000004u) {
      y_ = from.y_;
    }
    if (cached_has_bits & 0x00000008u) {
      z_ = from.z_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void t_tile::CopyFrom(const t_tile& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:t_tile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool t_tile::IsInitialized() const {
  return true;
}

void t_tile::InternalSwap(t_tile* other) {
  using std::swap;
  _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(t_tile, z_)
      + sizeof(t_tile::z_)
      - PROTOBUF_FIELD_OFFSET(t_tile, tiledata_)>(
          reinterpret_cast<char*>(&tiledata_),
          reinterpret_cast<char*>(&other->tiledata_));
}

std::string t_tile::GetTypeName() const {
  return "t_tile";
}


// ===================================================================

class t_tile_data::_Internal {
 public:
  using HasBits = decltype(std::declval<t_tile_data>()._has_bits_);
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_subtype(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_zv(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_weight(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

t_tile_data::t_tile_data(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:t_tile_data)
}
t_tile_data::t_tile_data(const t_tile_data& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&type_, &from.type_,
    static_cast<size_t>(reinterpret_cast<char*>(&weight_) -
    reinterpret_cast<char*>(&type_)) + sizeof(weight_));
  // @@protoc_insertion_point(copy_constructor:t_tile_data)
}

void t_tile_data::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&type_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&weight_) -
    reinterpret_cast<char*>(&type_)) + sizeof(weight_));
}

t_tile_data::~t_tile_data() {
  // @@protoc_insertion_point(destructor:t_tile_data)
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

void t_tile_data::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void t_tile_data::ArenaDtor(void* object) {
  t_tile_data* _this = reinterpret_cast< t_tile_data* >(object);
  (void)_this;
}
void t_tile_data::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void t_tile_data::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void t_tile_data::Clear() {
// @@protoc_insertion_point(message_clear_start:t_tile_data)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    ::memset(&type_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&weight_) -
        reinterpret_cast<char*>(&type_)) + sizeof(weight_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* t_tile_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // int32 type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_type(&has_bits);
          type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 subtype = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_subtype(&has_bits);
          subtype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_id(&has_bits);
          id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 zv = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          _Internal::set_has_zv(&has_bits);
          zv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 weight = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          _Internal::set_has_weight(&has_bits);
          weight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<std::string>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* t_tile_data::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:t_tile_data)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 type = 1;
  if (_internal_has_type()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_type(), target);
  }

  // int32 subtype = 2;
  if (_internal_has_subtype()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_subtype(), target);
  }

  // int32 id = 3;
  if (_internal_has_id()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_id(), target);
  }

  // int32 zv = 4;
  if (_internal_has_zv()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_zv(), target);
  }

  // int32 weight = 5;
  if (_internal_has_weight()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_weight(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:t_tile_data)
  return target;
}

size_t t_tile_data::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:t_tile_data)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // int32 type = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_type());
    }

    // int32 subtype = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_subtype());
    }

    // int32 id = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_id());
    }

    // int32 zv = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_zv());
    }

    // int32 weight = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_weight());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void t_tile_data::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_tile_data*>(
      &from));
}

void t_tile_data::MergeFrom(const t_tile_data& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:t_tile_data)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      type_ = from.type_;
    }
    if (cached_has_bits & 0x00000002u) {
      subtype_ = from.subtype_;
    }
    if (cached_has_bits & 0x00000004u) {
      id_ = from.id_;
    }
    if (cached_has_bits & 0x00000008u) {
      zv_ = from.zv_;
    }
    if (cached_has_bits & 0x00000010u) {
      weight_ = from.weight_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void t_tile_data::CopyFrom(const t_tile_data& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:t_tile_data)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool t_tile_data::IsInitialized() const {
  return true;
}

void t_tile_data::InternalSwap(t_tile_data* other) {
  using std::swap;
  _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(t_tile_data, weight_)
      + sizeof(t_tile_data::weight_)
      - PROTOBUF_FIELD_OFFSET(t_tile_data, type_)>(
          reinterpret_cast<char*>(&type_),
          reinterpret_cast<char*>(&other->type_));
}

std::string t_tile_data::GetTypeName() const {
  return "t_tile_data";
}


// ===================================================================

class t_stack::_Internal {
 public:
  using HasBits = decltype(std::declval<t_stack>()._has_bits_);
  static void set_has_x(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_y(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_direction(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

t_stack::t_stack(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena),
  tiledatas_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:t_stack)
}
t_stack::t_stack(const t_stack& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      tiledatas_(from.tiledatas_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&x_, &from.x_,
    static_cast<size_t>(reinterpret_cast<char*>(&depth_) -
    reinterpret_cast<char*>(&x_)) + sizeof(depth_));
  // @@protoc_insertion_point(copy_constructor:t_stack)
}

void t_stack::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&depth_) -
    reinterpret_cast<char*>(&x_)) + sizeof(depth_));
}

t_stack::~t_stack() {
  // @@protoc_insertion_point(destructor:t_stack)
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

void t_stack::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void t_stack::ArenaDtor(void* object) {
  t_stack* _this = reinterpret_cast< t_stack* >(object);
  (void)_this;
}
void t_stack::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void t_stack::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void t_stack::Clear() {
// @@protoc_insertion_point(message_clear_start:t_stack)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  tiledatas_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    ::memset(&x_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&depth_) -
        reinterpret_cast<char*>(&x_)) + sizeof(depth_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* t_stack::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // repeated .t_tile_data tileDatas = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_tiledatas(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else goto handle_unusual;
        continue;
      // int32 x = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_x(&has_bits);
          x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 y = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_y(&has_bits);
          y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 direction = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          _Internal::set_has_direction(&has_bits);
          direction_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 depth = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          _Internal::set_has_depth(&has_bits);
          depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<std::string>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* t_stack::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:t_stack)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .t_tile_data tileDatas = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_tiledatas_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_tiledatas(i), target, stream);
  }

  // int32 x = 2;
  if (_internal_has_x()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_x(), target);
  }

  // int32 y = 3;
  if (_internal_has_y()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_y(), target);
  }

  // int32 direction = 4;
  if (_internal_has_direction()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_direction(), target);
  }

  // int32 depth = 5;
  if (_internal_has_depth()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_depth(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:t_stack)
  return target;
}

size_t t_stack::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:t_stack)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .t_tile_data tileDatas = 1;
  total_size += 1UL * this->_internal_tiledatas_size();
  for (const auto& msg : this->tiledatas_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // int32 x = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_x());
    }

    // int32 y = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_y());
    }

    // int32 direction = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_direction());
    }

    // int32 depth = 5;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_depth());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void t_stack::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const t_stack*>(
      &from));
}

void t_stack::MergeFrom(const t_stack& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:t_stack)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  tiledatas_.MergeFrom(from.tiledatas_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      x_ = from.x_;
    }
    if (cached_has_bits & 0x00000002u) {
      y_ = from.y_;
    }
    if (cached_has_bits & 0x00000004u) {
      direction_ = from.direction_;
    }
    if (cached_has_bits & 0x00000008u) {
      depth_ = from.depth_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void t_stack::CopyFrom(const t_stack& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:t_stack)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool t_stack::IsInitialized() const {
  return true;
}

void t_stack::InternalSwap(t_stack* other) {
  using std::swap;
  _internal_metadata_.Swap<std::string>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  tiledatas_.InternalSwap(&other->tiledatas_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(t_stack, depth_)
      + sizeof(t_stack::depth_)
      - PROTOBUF_FIELD_OFFSET(t_stack, x_)>(
          reinterpret_cast<char*>(&x_),
          reinterpret_cast<char*>(&other->x_));
}

std::string t_stack::GetTypeName() const {
  return "t_stack";
}


// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::LevelsIndex_LevelsIndexEntry_DoNotUse* Arena::CreateMaybeMessage< ::LevelsIndex_LevelsIndexEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::LevelsIndex_LevelsIndexEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::LevelsIndex* Arena::CreateMaybeMessage< ::LevelsIndex >(Arena* arena) {
  return Arena::CreateMessageInternal< ::LevelsIndex >(arena);
}
template<> PROTOBUF_NOINLINE ::t_offeset_len* Arena::CreateMaybeMessage< ::t_offeset_len >(Arena* arena) {
  return Arena::CreateMessageInternal< ::t_offeset_len >(arena);
}
template<> PROTOBUF_NOINLINE ::LevelData* Arena::CreateMaybeMessage< ::LevelData >(Arena* arena) {
  return Arena::CreateMessageInternal< ::LevelData >(arena);
}
template<> PROTOBUF_NOINLINE ::t_tile* Arena::CreateMaybeMessage< ::t_tile >(Arena* arena) {
  return Arena::CreateMessageInternal< ::t_tile >(arena);
}
template<> PROTOBUF_NOINLINE ::t_tile_data* Arena::CreateMaybeMessage< ::t_tile_data >(Arena* arena) {
  return Arena::CreateMessageInternal< ::t_tile_data >(arena);
}
template<> PROTOBUF_NOINLINE ::t_stack* Arena::CreateMaybeMessage< ::t_stack >(Arena* arena) {
  return Arena::CreateMessageInternal< ::t_stack >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
