コード例 #1
0
 public void ExportGFX(string name, string mapName, string palName, int w, int h)
 {
     if (Settings.s.platform == Settings.Platform.DS)
     {
         if (FileSystem.FileExists(gameDataBinFolder + name))
         {
             //if (!File.Exists(gameDataBinFolder + "/textures/" + Path.GetDirectoryName(name) + "/" + Path.GetFileNameWithoutExtension(name) + ".png")) {
             Texture2D tex = new GFX(gameDataBinFolder + name, gameDataBinFolder + mapName, gameDataBinFolder + palName, w, h).texture;
             Util.ByteArrayToFile(gameDataBinFolder + "/textures/" + Path.GetDirectoryName(name) + "/" + Path.GetFileNameWithoutExtension(name) + ".png", tex.EncodeToPNG());
             //}
         }
     }
 }