namespace pkNX.Structures.FlatBuffers.SWSH;
attribute "fs_serializer";

// poke_memory_data.prmb and others
// this is oddly similar to the map data FlatBuffer, assumed the same schema to encode an excel table?

file_extension "prmb";

table CellMetaQuad {
    Field0:int;
    Field1:int;
    Field2:int;
    Field3:int;
}

table CellInt    { Value : int    ;  }
table CellFloat  { Value : float  ;  }
table CellBool   { Flag  : bool   ;  }
table CellString { Name  : string (required);  }
table CellHash   { Hash  : ulong  ;  }
union CellUnion {CellInt, CellFloat, CellString, CellHash}

table CellMetaHashes {
    Hash:ulong;
    Pairs:[CellHashTuple] (required);
}

table CellHashTuple {
    Hash0:ulong;
    Hash1:ulong;
}

table CellTable (fs_serializer) {
    QuadTable:[CellMetaQuad] (required);
    MainTable:[CellUnion] (required);
    DualTable:[CellMetaHashes] (required);
}

root_type CellTable;
