示例#1
0
 private void FormStructures_Load(object sender, EventArgs e)
 {
     blockWidth     = ConfigScript.getBlocksPicturesWidth();
     blockHeight    = 32;
     curActiveBlock = 0;
     //curViewType = MapViewType.Tiles;
     curScale = 2.0f;
     //showAxis = true;
     curTileStruct = null;
     resetControls(true);
 }
示例#2
0
        private void setBlocks(bool needRebuildBlocks)
        {
            //if using pictures
            if (ConfigScript.usePicturesInstedBlocks)
            {
                if (needRebuildBlocks)
                {
                    //get block size from image
                    layers[0].blockWidth  = ConfigScript.getBlocksPicturesWidth();
                    layers[0].blockHeight = 32;
                    layers[1].blockWidth  = ConfigScript.getBlocksPicturesWidth();
                    layers[1].blockHeight = 32;
                    bigBlocks             = UtilsGDI.setBlocksForPictures(curButtonScale, layers[0].blockWidth, layers[0].blockHeight, curViewType);
                }
                updateBlocksImages();
                return;
            }

            MapViewType smallObjectsType =
                curViewType == MapViewType.SmallObjNumbers ? MapViewType.ObjNumbers :
                curViewType == MapViewType.ObjType ? MapViewType.ObjType : MapViewType.Tiles;

            float smallBlockScaleFactor = curButtonScale;
            int   bigTileIndex          = curActiveBlockNo;

            if (needRebuildBlocks)
            {
                if (ConfigScript.isUseSegaGraphics())
                {
                    bigBlocks = makeSegaBigBlocks();
                }
                else
                {
                    bigBlocks = ConfigScript.videoNes.makeBigBlocks(curActiveVideoNo, curActiveBigBlockNo, bigTileIndex, curActivePalleteNo, smallObjectsType, curViewType, ConfigScript.getbigBlocksHierarchyCount() - 1);
                }
                changeBlocksSize(bigBlocks);
            }
            curActiveBlock = 0;
            updateBlocksImages();
        }
示例#3
0
        private void setBlocks(bool needRebuildBlocks)
        {
            //if using pictures
            if (ConfigScript.usePicturesInstedBlocks)
            {
                if (needRebuildBlocks)
                {
                    //get block size from image
                    int w = ConfigScript.getBlocksPicturesWidth();
                    int h = 32;
                    bigBlocks = UtilsGDI.setBlocksForPictures(curScale, w, h, curActiveViewType);
                }
            }
            else
            {
                MapViewType smallObjectsType =
                    curActiveViewType == MapViewType.SmallObjNumbers ? MapViewType.ObjNumbers :
                    curActiveViewType == MapViewType.ObjType ? MapViewType.ObjType : MapViewType.Tiles;

                if (needRebuildBlocks)
                {
                    if (ConfigScript.isUseSegaGraphics())
                    {
                        bigBlocks = Globals.makeSegaBigBlocks(curActiveVideoNo, curActiveBigBlockNo, curActivePalleteNo, curActiveViewType);
                    }
                    else if (ConfigScript.isUseGbGraphics())
                    {
                        bigBlocks = Globals.makeGbBigBlocks(curActiveVideoNo, curActiveBigBlockNo, curActivePalleteNo, curActiveViewType);
                    }
                    else
                    {
                        bigBlocks = ConfigScript.videoNes.makeBigBlocks(curActiveVideoNo, curActiveBigBlockNo, curActiveBlockNo, curActivePalleteNo, smallObjectsType, curActiveViewType, ConfigScript.getbigBlocksHierarchyCount() - 1);
                    }
                }
            }

            curActiveBlock = 0;
            updateBlocksImages();
        }