public Image[] makeBigBlocks(int videoNo, int bigBlockNo, BigBlock[] bigBlockIndexes, int palleteNo, MapViewType smallObjectsViewType = MapViewType.Tiles, MapViewType curViewType = MapViewType.Tiles, int hierarchyLevel = 0) { int blockCount = ConfigScript.getBigBlocksCount(hierarchyLevel); var bigBlocks = new Image[blockCount]; Image[] smallBlocksPack; if (hierarchyLevel == 0) { smallBlocksPack = makeObjects(videoNo, bigBlockNo, palleteNo, smallObjectsViewType); } else { var bigBlockIndexesPrev = ConfigScript.getBigBlocksRecursive(hierarchyLevel - 1, bigBlockNo); smallBlocksPack = makeBigBlocks(videoNo, bigBlockNo, bigBlockIndexesPrev, palleteNo, smallObjectsViewType, curViewType, hierarchyLevel - 1); } //tt version hardcode Image[][] smallBlocksAll = null; bool smallBlockHasSubpals = bigBlockIndexes == null ? true : bigBlockIndexes[0].smallBlocksWithPal(); if (!smallBlockHasSubpals) { smallBlocksAll = new Image[4][]; for (int i = 0; i < 4; i++) { smallBlocksAll[i] = makeObjects(videoNo, bigBlockNo, palleteNo, smallObjectsViewType, i); } } else { smallBlocksAll = new Image[4][] { smallBlocksPack, smallBlocksPack, smallBlocksPack, smallBlocksPack }; } for (int btileId = 0; btileId < blockCount; btileId++) { Image b; if (ConfigScript.isBuildScreenFromSmallBlocks()) { var sb = smallBlocksPack[btileId]; //scale for small blocks b = UtilsGDI.ResizeBitmap(sb, (int)(sb.Width * 2), (int)(sb.Height * 2)); } else { b = bigBlockIndexes[btileId].makeBigBlock(smallBlocksAll); } if (curViewType == MapViewType.ObjNumbers) { b = VideoHelper.addObjNumber(b, btileId); } bigBlocks[btileId] = b; } return(bigBlocks); }
public Image[] makeBigBlocks(int videoNo, int bigBlockNo, int blockNo, int palleteNo, MapViewType smallObjectsViewType = MapViewType.Tiles, MapViewType curViewType = MapViewType.Tiles, int hierarchyLevel = 0) { BigBlock[] bigBlockIndexes = ConfigScript.getBigBlocksRecursive(hierarchyLevel, blockNo); return(makeBigBlocks(videoNo, bigBlockNo, bigBlockIndexes, palleteNo, smallObjectsViewType, curViewType, hierarchyLevel)); }