public static ResizeBitmap ( Image sourceBMP, int width, int height ) : Image | ||
sourceBMP | Image | |
width | int | |
height | int | |
return | Image |
private void reloadAllData() { mapDatas = MapConfig.loadMap(curActiveMapNo); setPal(); int videoPageId = curActiveVideo; videos = new Image[4][]; var chunk = ConfigScript.getVideoChunk(videoPageId); for (int i = 0; i < 4; i++) { var images = new Image[256]; for (int t = 0; t < 256; t++) { images[t] = UtilsGDI.ResizeBitmap(ConfigScript.videoNes.makeImage(t, chunk, curPal, i), 16, 16); } videos[i] = images; } blocksScreen.Invalidate(); mapScreen.Size = new Size(mapDatas[0].width * 16, mapDatas[0].height * 16); mapScreen.Invalidate(); mapScreen2.Visible = showSecondNametable; mapScreen2.Size = mapScreen.Size; mapScreen2.Location = new Point(mapScreen.Location.X + mapScreen.Width, mapScreen2.Location.Y); mapScreen2.Invalidate(); }
private void reloadAllData() { mapData = MapConfig.loadMap(curActiveMapNo); setPal(); int videoPageId = curActiveVideo; videos = new ImageList[4]; var chunk = ConfigScript.getVideoChunk(videoPageId); for (int i = 0; i < 4; i++) { videos[i] = new ImageList(); videos[i].ImageSize = new Size(16, 16); var images = new Image[256]; for (int t = 0; t < 256; t++) { images[t] = UtilsGDI.ResizeBitmap(ConfigScript.videoNes.makeImage(t, chunk, curPal, i), 16, 16); } videos[i].Images.AddRange(images); } prepareBlocksPanel(); mapScreen.Size = new Size(mapData.width * 16, mapData.height * 16); mapScreen.Invalidate(); }
protected void setVideo() { var chunk = ConfigScript.getVideoChunk(curActiveVideo); for (int i = 0; i < 4; i++) { videoSprites[i] = Enumerable.Range(0, 256).Select(t => ((Bitmap)UtilsGDI.ResizeBitmap(ConfigScript.videoNes.makeImage(t, chunk, palette, i), 16, 16))).ToArray(); } }