private int getBitmapCount(int daxBlockId, string fileName) { // load 8x8 bitmaps from daxBlockId in fileName into the list bitmaps8x8 to simulate the order the bitmaps would be in memory in the game if (File.Exists(fileName) == false) { return(0); } var file = new DaxImageFile(string.Format(fileName)); foreach (DaxFileBlock block in file.Blocks) { if (block.Id == daxBlockId) { var parameters = new FileBlockParameters { Data = block.Data, Name = block.File, Id = block.Id, }; var render = new RenderBlockFactory().CreateUsing(parameters); var x = render.GetBitmaps().Count(); return(x); } } return(0); }
protected override sealed void ProcessBlocks() { foreach (var block in Blocks) { var renderBlock = new RenderBlockFactory().CreateUsing(block); _bitmaps_dic.Add(new KeyValuePair <int, IReadOnlyList <Bitmap> >(block.Id, renderBlock.GetBitmaps().ToList())); } }
private void loadBitmaps(int daxBlockId, string fileName, List <Bitmap> bitmaps8x8) { // load 8x8 bitmaps from daxBlockId in fileName into the list bitmaps8x8 to simulate the order the bitmaps would be in memory in the game var file = new DaxImageFile(string.Format(fileName)); foreach (DaxFileBlock block in file.Blocks) { if (block.Id == daxBlockId) { var parameters = new FileBlockParameters { Data = block.Data, Name = block.File, Id = block.Id, }; var render = new RenderBlockFactory().CreateUsing(parameters); foreach (var bitmap in render.GetBitmaps()) { bitmaps8x8.Add(bitmap); } } } }
private void loadBitmaps(int daxBlockId, string fileName, List<Bitmap> bitmaps8x8) { // load 8x8 bitmaps from daxBlockId in fileName into the list bitmaps8x8 to simulate the order the bitmaps would be in memory in the game var file = new DaxImageFile(string.Format(fileName)); foreach (DaxFileBlock block in file.Blocks) { if (block.Id == daxBlockId) { var parameters = new FileBlockParameters { Data = block.Data, Name = block.File, Id = block.Id, }; var render = new RenderBlockFactory().CreateUsing(parameters); foreach (var bitmap in render.GetBitmaps()) { bitmaps8x8.Add(bitmap); } } } }
private int getBitmapCount(int daxBlockId, string fileName) { // load 8x8 bitmaps from daxBlockId in fileName into the list bitmaps8x8 to simulate the order the bitmaps would be in memory in the game if (File.Exists(fileName) == false) return 0; var file = new DaxImageFile(string.Format(fileName)); foreach (DaxFileBlock block in file.Blocks) { if (block.Id == daxBlockId) { var parameters = new FileBlockParameters { Data = block.Data, Name = block.File, Id = block.Id, }; var render = new RenderBlockFactory().CreateUsing(parameters); var x = render.GetBitmaps().Count(); return x; } } return 0; }