Exemple #1
0
 private void LoadMultiBlock_4b(ref List <byte> DList, uint TImg, int TMem, int RTile, int Fmt, uint Width, uint Height, uint Pal, uint CMS, uint CMT, uint MaskS, uint MaskT, uint ShiftS, uint ShiftT)
 {
     Helpers.Append64(ref DList, SetTextureImage(Fmt, GBI.G_IM_SIZ_16b, 1, TImg));
     Helpers.Append64(ref DList, SetTile(Fmt, GBI.G_IM_SIZ_16b, 0, TMem, GBI.G_TX_LOADTILE,
                                         0, CMT, MaskT, ShiftT, CMS, MaskS, ShiftS));
     Helpers.Append64(ref DList, LoadSync());
     Helpers.Append64(ref DList, LoadBlock(GBI.G_TX_LOADTILE, 0, 0,
                                           (int)((((Width * Height) + 3) >> 2) - 1),
                                           GBI.CALC_DXT_4b((int)Width)));
     Helpers.Append64(ref DList, PipeSync());
     Helpers.Append64(ref DList, SetTile(Fmt, GBI.G_IM_SIZ_4b,
                                         (int)((((Width) >> 1) + 7) >> 3), TMem,
                                         RTile, (int)Pal, CMT, MaskT, ShiftT, CMS, MaskS, ShiftS));
     Helpers.Append64(ref DList, SetTileSize(RTile, 0, 0,
                                             (int)((Width - 1) << GBI.G_TEXTURE_IMAGE_FRAC),
                                             (int)((Height - 1) << GBI.G_TEXTURE_IMAGE_FRAC)));
 }
Exemple #2
0
 private void LoadMultiBlock(ref List <byte> DList, uint TImg, int TMem, int RTile, int Fmt, int Siz, uint Width, uint Height, uint Pal, uint CMS, uint CMT, uint MaskS, uint MaskT, uint ShiftS, uint ShiftT)
 {
     Helpers.Append64(ref DList, SetTextureImage(Fmt, GBI.G_IM_LOAD_BLOCK.Get(Siz), 1, TImg));
     Helpers.Append64(ref DList, SetTile(Fmt, GBI.G_IM_LOAD_BLOCK.Get(Siz), 0, TMem, GBI.G_TX_LOADTILE,
                                         0, CMT, MaskT, ShiftT, CMS, MaskS, ShiftS));
     Helpers.Append64(ref DList, LoadSync());
     Helpers.Append64(ref DList, LoadBlock(GBI.G_TX_LOADTILE, 0, 0,
                                           (int)((((Width * Height) + GBI.G_IM_INCR.Get(Siz)) >> GBI.G_IM_SHIFT.Get(Siz)) - 1),
                                           GBI.CALC_DXT((int)Width, GBI.G_IM_BYTES.Get(Siz))));
     Helpers.Append64(ref DList, PipeSync());
     Helpers.Append64(ref DList, SetTile(Fmt, Siz,
                                         (int)((((Width) * GBI.G_IM_LINE_BYTES.Get(Siz)) + 7) >> 3), TMem,
                                         RTile, (int)Pal, CMT, MaskT, ShiftT, CMS, MaskS, ShiftS));
     Helpers.Append64(ref DList, SetTileSize(RTile, 0, 0,
                                             (int)((Width - 1) << GBI.G_TEXTURE_IMAGE_FRAC),
                                             (int)((Height - 1) << GBI.G_TEXTURE_IMAGE_FRAC)));
 }