@@ -26,8 +26,9 @@ public class MMPlotter
2626 private Random rand ;
2727 private BushInit [ ] bush ;
2828 private PlantInit [ ] plant ;
29+ private Int32 scale ;
2930
30- public MMPlotter ( int divider , MMTextures textures , bool dolayers , bool bigtree )
31+ public MMPlotter ( int divider , MMTextures textures , bool dolayers , bool bigtree , Int32 scale )
3132 {
3233 Dictionary < String , List < String > > collageCategory ;
3334 List < String > collageSprites ;
@@ -353,6 +354,7 @@ public MMPlotter(int divider, MMTextures textures, bool dolayers, bool bigtree)
353354
354355 this . rand = new Random ( ) ;
355356 this . subDiv = divider ;
357+ this . scale = scale ;
356358 this . subWH = ( 300 / this . subDiv ) ;
357359 this . startX = ( 1280 * 30 / this . subDiv / 2 ) - 64 ;
358360 this . dolayers = dolayers ;
@@ -455,13 +457,19 @@ public void PlotData( MMCellData cellData, string outputDir, int cellx, int cell
455457 }
456458 if ( this . dolayers == true && drawCnt > 0 )
457459 {
458- this . subCell . Save ( outputDir + "cell_" + cellx + "_" + celly + "_subcell_" + subx + "_" + suby + "_layer_" + z + ".png" , System . Drawing . Imaging . ImageFormat . Png ) ;
460+ Bitmap resized = new Bitmap ( this . subCell , new Size ( this . subCell . Width / this . scale , this . subCell . Height / this . scale ) ) ;
461+ resized . Save ( outputDir + "cell_" + cellx + "_" + celly + "_subcell_" + subx + "_" + suby + "_layer_" + z + ".png" , System . Drawing . Imaging . ImageFormat . Png ) ;
462+
463+ //this.subCell.Save(outputDir + "cell_" + cellx + "_" + celly + "_subcell_" + subx + "_" + suby + "_layer_" + z + ".png", System.Drawing.Imaging.ImageFormat.Png);
459464 gfx . Clear ( Color . Transparent ) ;
460465 }
461466 }
462467 if ( this . dolayers == false )
463468 {
464- this . subCell . Save ( outputDir + "cell_" + cellx + "_" + celly + "_subcell_" + subx + "_" + suby + "_full.png" , System . Drawing . Imaging . ImageFormat . Png ) ;
469+ Bitmap resized = new Bitmap ( this . subCell , new Size ( this . subCell . Width / this . scale , this . subCell . Height / this . scale ) ) ;
470+ resized . Save ( outputDir + "cell_" + cellx + "_" + celly + "_subcell_" + subx + "_" + suby + "_full.png" , System . Drawing . Imaging . ImageFormat . Png ) ;
471+
472+ //this.subCell.Save(outputDir + "cell_" + cellx + "_" + celly + "_subcell_" + subx + "_" + suby + "_full.png", System.Drawing.Imaging.ImageFormat.Png);
465473 gfx . Clear ( Color . Transparent ) ;
466474 }
467475 }
0 commit comments