Beispiel #1
0
 public override void SerializeImpl(SerializerObject s)
 {
     Byte00_Indices       = s.Serialize <byte>(Byte00_Indices, name: nameof(Byte00_Indices));
     Count_Indices        = s.Serialize <byte>(Count_Indices, name: nameof(Count_Indices));
     TileIndices          = s.SerializeArray <byte>(TileIndices, Count_Indices, name: nameof(TileIndices));
     HasExtraData_Indices = s.Serialize <bool>(HasExtraData_Indices, name: nameof(HasExtraData_Indices));
     if (HasExtraData_Indices)
     {
         ExtraData_Indices = s.SerializeArraySize <ushort, byte>(ExtraData_Indices, name: nameof(ExtraData_Indices));
         ExtraData_Indices = s.SerializeArray <ushort>(ExtraData_Indices, ExtraData_Indices.Length, name: nameof(ExtraData_Indices));
     }
     Byte00_Attributes       = s.Serialize <byte>(Byte00_Attributes, name: nameof(Byte00_Attributes));
     Count_Attributes        = s.Serialize <byte>(Count_Attributes, name: nameof(Count_Attributes));
     Attributes              = s.SerializeObjectArray <TileAttribute>(Attributes, Count_Attributes, name: nameof(Attributes));
     HasExtraData_Attributes = s.Serialize <bool>(HasExtraData_Attributes, name: nameof(HasExtraData_Attributes));
     if (HasExtraData_Attributes)
     {
         ExtraData_Attributes = s.SerializeArraySize <ushort, byte>(ExtraData_Attributes, name: nameof(ExtraData_Attributes));
         ExtraData_Attributes = s.SerializeArray <ushort>(ExtraData_Attributes, ExtraData_Attributes.Length, name: nameof(ExtraData_Attributes));
     }
 }
Beispiel #2
0
 public override void SerializeImpl(SerializerObject s)
 {
     TrackLength      = s.Serialize <ushort>(TrackLength, name: nameof(TrackLength));
     TrackBlocks      = s.SerializeObjectArray <TrackBlock>(TrackBlocks, TrackLength, name: nameof(TrackBlocks));
     Structs12Count   = s.Serialize <byte>(Structs12Count, name: nameof(Structs12Count));
     BM_Byte0         = s.Serialize <byte>(BM_Byte0, name: nameof(BM_Byte0));
     BM_Bool1         = s.Serialize <bool>(BM_Bool1, name: nameof(BM_Bool1));
     BM_Byte2         = s.Serialize <byte>(BM_Byte2, name: nameof(BM_Byte2));
     BM_Byte3         = s.Serialize <byte>(BM_Byte3, name: nameof(BM_Byte3));
     MapSpriteMapping = s.SerializeObjectArray <TrackMapping>(MapSpriteMapping, TrackLength - 1, name: nameof(MapSpriteMapping));
     if (s.GameSettings.GameModeSelection == GameModeSelection.RaymanKartMobile_320x240)
     {
         RoadTextureID_0 = s.Serialize <byte>(RoadTextureID_0, name: nameof(RoadTextureID_0));
         RoadTextureID_1 = s.Serialize <byte>(RoadTextureID_1, name: nameof(RoadTextureID_1));
     }
     aW             = s.Serialize <byte>(aW, name: nameof(aW));
     aUCount        = s.Serialize <byte>(aUCount, name: nameof(aUCount));
     bB             = s.Serialize <byte>(bB, name: nameof(bB));
     Color_bC       = s.SerializeObject <RGB888Color>(Color_bC, name: nameof(Color_bC));
     Color_bD_Road1 = s.SerializeObject <RGB888Color>(Color_bD_Road1, name: nameof(Color_bD_Road1));
     Color_bA       = s.SerializeObject <RGB888Color>(Color_bA, name: nameof(Color_bA));
     Color_bE_Road2 = s.SerializeObject <RGB888Color>(Color_bE_Road2, name: nameof(Color_bE_Road2));
     Color_bF       = s.SerializeObject <RGB888Color>(Color_bF, name: nameof(Color_bF));
     bG             = s.Serialize <short>(bG, name: nameof(bG));
     aU_2           = s.Serialize <short>(aU_2, name: nameof(aU_2));
     N  = s.Serialize <byte>(N, name: nameof(N));
     gF = s.Serialize <byte>(gF, name: nameof(gF));
     bp = s.Serialize <bool>(bp, name: nameof(bp));
     bJ = s.Serialize <short>(bJ, name: nameof(bJ));
     bK = s.Serialize <short>(bK, name: nameof(bK));
     Color_afterbK_0 = s.SerializeObject <RGB888Color>(Color_afterbK_0, name: nameof(Color_afterbK_0));
     Color_afterbK_1 = s.SerializeObject <RGB888Color>(Color_afterbK_1, name: nameof(Color_afterbK_1));
     bL = s.Serialize <byte>(bL, name: nameof(bL));
     Color_bH_TunnelDark  = s.SerializeObject <RGB888Color>(Color_bH_TunnelDark, name: nameof(Color_bH_TunnelDark));
     Color_bI_TunnelLight = s.SerializeObject <RGB888Color>(Color_bI_TunnelLight, name: nameof(Color_bI_TunnelLight));
     byte_afterBI         = s.Serialize <byte>(byte_afterBI, name: nameof(byte_afterBI));
     if (BitHelpers.ExtractBits(aW, 1, 2) == 1)
     {
         Color_dj_BridgeDark  = s.SerializeObject <RGB888Color>(Color_dj_BridgeDark, name: nameof(Color_dj_BridgeDark));
         Color_dk_BridgeLight = s.SerializeObject <RGB888Color>(Color_dk_BridgeLight, name: nameof(Color_dk_BridgeLight));
         dl = s.Serialize <byte>(dl, name: nameof(dl));
         dm = s.Serialize <byte>(dm, name: nameof(dm));
     }
     if (s.GameSettings.GameModeSelection != GameModeSelection.RaymanKartMobile_320x240)
     {
         Color_dq = s.SerializeObject <RGB888Color>(Color_dq, name: nameof(Color_dq));
         Color_dr = s.SerializeObject <RGB888Color>(Color_dr, name: nameof(Color_dr));
         Color_ds = s.SerializeObject <RGB888Color>(Color_ds, name: nameof(Color_ds));
         Color_dt = s.SerializeObject <RGB888Color>(Color_dt, name: nameof(Color_dt));
         Color_du = s.SerializeObject <RGB888Color>(Color_du, name: nameof(Color_du));
         dx       = s.Serialize <short>(dx, name: nameof(dx));
         dw       = s.Serialize <short>(dw, name: nameof(dw));
         dv       = s.Serialize <short>(dv, name: nameof(dv));
     }
     Structs1Count              = s.Serialize <ushort>(Structs1Count, name: nameof(Structs1Count));
     Structs1                   = s.SerializeObjectArray <Struct1>(Structs1, Structs1Count, name: nameof(Structs1));
     Structs2Count              = s.Serialize <byte>(Structs2Count, name: nameof(Structs2Count));
     Structs2                   = s.SerializeObjectArray <Struct2>(Structs2, Structs2Count, name: nameof(Structs2));
     BackgroundLayers           = s.SerializeObjectArray <BackgroundLayer>(BackgroundLayers, aUCount, name: nameof(BackgroundLayers));
     bs_Struct0_BackgroundIndex = s.SerializeArraySize <byte[], byte>(bs_Struct0_BackgroundIndex, name: nameof(bs_Struct0_BackgroundIndex));
     for (int i = 0; i < bs_Struct0_BackgroundIndex.Length; i++)
     {
         bs_Struct0_BackgroundIndex[i] = s.SerializeArray <byte>(bs_Struct0_BackgroundIndex[i], TrackLength, name: $"{nameof(bs_Struct0_BackgroundIndex)}[{i}]");
     }
     Structs4Count     = s.Serialize <byte>(Structs4Count, name: nameof(Structs4Count));
     Structs4          = s.SerializeObjectArray <Struct4>(Structs4, Structs4Count, name: nameof(Structs4));
     Structs5Count     = s.Serialize <byte>(Structs5Count, name: nameof(Structs5Count));
     Structs5          = s.SerializeObjectArray <Struct5>(Structs5, Structs5Count, name: nameof(Structs5));
     Structs6Count     = s.Serialize <ushort>(Structs6Count, name: nameof(Structs6Count));
     Structs6          = s.SerializeObjectArray <Struct6>(Structs6, Structs6Count, name: nameof(Structs6));
     Structs7Count     = s.Serialize <ushort>(Structs7Count, name: nameof(Structs7Count));
     Structs7          = s.SerializeObjectArray <Struct7>(Structs7, Structs7Count, name: nameof(Structs7));
     TrackObjectsCount = s.Serialize <ushort>(TrackObjectsCount, name: nameof(TrackObjectsCount));
     TrackObjects      = s.SerializeObjectArray <TrackObject>(TrackObjects, TrackObjectsCount, name: nameof(TrackObjects));
     cF = s.Serialize <ushort>(cF, name: nameof(cF));
     TrackObjectInstances = s.SerializeObjectArray <TrackObjectInstance>(TrackObjectInstances, cF, name: nameof(TrackObjectInstances));
     if (cF > 0)
     {
         TrackObjectCollections = s.SerializeObjectArray <TrackObjectCollection>(TrackObjectCollections, TrackLength, name: nameof(TrackObjectCollections));
     }
     Structs11Count = s.Serialize <byte>(Structs11Count, name: nameof(Structs11Count));
     Types          = s.SerializeObjectArray <Type>(Types, Structs11Count, name: nameof(Types));
     Structs12      = s.SerializeObjectArray <Struct12>(Structs12, Structs12Count, name: nameof(Structs12));
 }