예제 #1
0
    private static bool GetIsSwap(ReadOnlySpan <byte> data, bool japanese)
    {
        var teamSwap = StadiumUtil.IsMagicPresentSwap(data, TeamSize, MAGIC_FOOTER, 1);

        if (teamSwap)
        {
            return(true);
        }
        var boxSwap = StadiumUtil.IsMagicPresentSwap(data[BoxStart..], japanese ? BoxSizeJ : BoxSizeU, MAGIC_FOOTER, 1);
예제 #2
0
    private static StadiumSaveType GetType(ReadOnlySpan <byte> data)
    {
        var team = StadiumUtil.IsMagicPresentEither(data, TeamSizeJ, MAGIC_FOOTER, 10);

        if (team != StadiumSaveType.None)
        {
            return(team);
        }
        var box = StadiumUtil.IsMagicPresentEither(data[BoxStart..], BoxSizeJ, MAGIC_FOOTER, 1);
예제 #3
0
 public static bool IsStadium(ReadOnlySpan <byte> data)
 {
     if (data.Length is not(SaveUtil.SIZE_G2STAD or SaveUtil.SIZE_G2STADF))
     {
         return(false);
     }
     if (IsStadiumJ(data) || IsStadiumU(data))
     {
         return(true);
     }
     return(StadiumUtil.IsMagicPresentEither(data, TeamSize, MAGIC_FOOTER, 1) != StadiumSaveType.None);
 }
예제 #4
0
 private static bool IsStadiumU(ReadOnlySpan <byte> data) => StadiumUtil.IsMagicPresentAbsolute(data, BoxStart + BoxSizeU - ListFooterSize, MAGIC_FOOTER) != StadiumSaveType.None;