예제 #1
0
    static partial void GetCueInfoInternal()
    {
        acfInfo = new AcfInfo("ACF", 0, "", "LoopTest.acf", "ed8f15bc-7db6-458d-8a95-04cbf903a2ba", "DspBusSetting_0");
        acfInfo.aisacControlNameList.Add("Any");
        acfInfo.aisacControlNameList.Add("Distance");
        acfInfo.aisacControlNameList.Add("AisacControl02");
        acfInfo.aisacControlNameList.Add("AisacControl03");
        acfInfo.aisacControlNameList.Add("AisacControl04");
        acfInfo.aisacControlNameList.Add("AisacControl05");
        acfInfo.aisacControlNameList.Add("AisacControl06");
        acfInfo.aisacControlNameList.Add("AisacControl07");
        acfInfo.aisacControlNameList.Add("AisacControl08");
        acfInfo.aisacControlNameList.Add("AisacControl09");
        acfInfo.aisacControlNameList.Add("AisacControl10");
        acfInfo.aisacControlNameList.Add("AisacControl11");
        acfInfo.aisacControlNameList.Add("AisacControl12");
        acfInfo.aisacControlNameList.Add("AisacControl13");
        acfInfo.aisacControlNameList.Add("AisacControl14");
        acfInfo.aisacControlNameList.Add("AisacControl15");
        acfInfo.acbInfoList.Clear();
        AcbInfo newAcbInfo = null;

        newAcbInfo = new AcbInfo("LoopTheme", 0, "", "LoopTheme.acb", "LoopTheme.awb", "380affdf-8322-4fa4-926e-500000922835");
        acfInfo.acbInfoList.Add(newAcbInfo);
        newAcbInfo.cueInfoList.Add(0, new CueInfo("ThemeLoop", 0, ""));
    }
 static partial void GetCueInfoInternal()
 {
     acfInfo = new AcfInfo("ACF", 0, "", "Kengou_ADX2.acf","c78024af-5c2f-4556-bcbb-e8b2c98d5d23","DspBusSetting_0");
     acfInfo.aisacControlNameList.Add("Any");
     acfInfo.aisacControlNameList.Add("Distance");
     acfInfo.aisacControlNameList.Add("AisacControl02");
     acfInfo.aisacControlNameList.Add("AisacControl03");
     acfInfo.aisacControlNameList.Add("AisacControl04");
     acfInfo.aisacControlNameList.Add("AisacControl05");
     acfInfo.aisacControlNameList.Add("AisacControl06");
     acfInfo.aisacControlNameList.Add("AisacControl07");
     acfInfo.aisacControlNameList.Add("AisacControl08");
     acfInfo.aisacControlNameList.Add("AisacControl09");
     acfInfo.aisacControlNameList.Add("AisacControl10");
     acfInfo.aisacControlNameList.Add("AisacControl11");
     acfInfo.aisacControlNameList.Add("AisacControl12");
     acfInfo.aisacControlNameList.Add("AisacControl13");
     acfInfo.aisacControlNameList.Add("AisacControl14");
     acfInfo.aisacControlNameList.Add("AisacControl15");
     acfInfo.acbInfoList.Clear();
     AcbInfo newAcbInfo = null;
     newAcbInfo = new AcbInfo("CueSheet_0", 0, "", "CueSheet_0.acb", "CueSheet_0.awb","25ede1a5-64cb-4665-9198-51b6f187e3cb");
     acfInfo.acbInfoList.Add(newAcbInfo);
     newAcbInfo.cueInfoList.Add(0, new CueInfo("stage", 0, ""));
 }
예제 #3
0
    static partial void GetCueInfoInternal()
    {
        acfInfo = new AcfInfo("ACF", 0, "", "Kengou_ADX2.acf", "c78024af-5c2f-4556-bcbb-e8b2c98d5d23", "DspBusSetting_0");
        acfInfo.aisacControlNameList.Add("Any");
        acfInfo.aisacControlNameList.Add("Distance");
        acfInfo.aisacControlNameList.Add("AisacControl02");
        acfInfo.aisacControlNameList.Add("AisacControl03");
        acfInfo.aisacControlNameList.Add("AisacControl04");
        acfInfo.aisacControlNameList.Add("AisacControl05");
        acfInfo.aisacControlNameList.Add("AisacControl06");
        acfInfo.aisacControlNameList.Add("AisacControl07");
        acfInfo.aisacControlNameList.Add("AisacControl08");
        acfInfo.aisacControlNameList.Add("AisacControl09");
        acfInfo.aisacControlNameList.Add("AisacControl10");
        acfInfo.aisacControlNameList.Add("AisacControl11");
        acfInfo.aisacControlNameList.Add("AisacControl12");
        acfInfo.aisacControlNameList.Add("AisacControl13");
        acfInfo.aisacControlNameList.Add("AisacControl14");
        acfInfo.aisacControlNameList.Add("AisacControl15");
        acfInfo.acbInfoList.Clear();
        AcbInfo newAcbInfo = null;

        newAcbInfo = new AcbInfo("CueSheet_0", 0, "", "CueSheet_0.acb", "CueSheet_0.awb", "25ede1a5-64cb-4665-9198-51b6f187e3cb");
        acfInfo.acbInfoList.Add(newAcbInfo);
        newAcbInfo.cueInfoList.Add(0, new CueInfo("stage", 0, ""));
    }
예제 #4
0
    /**
     * <summary>ACB情報の取得</summary>
     * <param name="acb">ACB</param>
     * <param name="acbInfo">ACB情報</param>
     * <returns>情報が取得できたか</returns>
     * \par 説明:
     * ACBデータの各種情報を取得します。
     */
    public static bool GetAcbInfo(CriAtomExAcb acb, out AcbInfo acbInfo)
    {
        AcbInfoForMarshaling x;
        bool result = criAtomExAcb_GetAcbInfo(acb.nativeHandle, out x) == 1;

        x.Convert(out acbInfo);
        return(result);
    }
예제 #5
0
 public void Convert(out AcbInfo x)
 {
     x.name              = CriAtomDebugDetail.Utility.PtrToStringAutoOrNull(namePtr);
     x.size              = size;
     x.version           = version;
     x.characterEncoding = characterEncoding;
     x.volume            = volume;
     x.numCues           = numCues;
 }
예제 #6
0
        private void GetAcbInfoListCore(string searchPath, ref int acbIndex)
        {
            string[] files = System.IO.Directory.GetFiles(searchPath);
            foreach (string file in files)
            {
                if (System.IO.Path.GetExtension(file.Replace("\\", "/")) == ".acb")
                {
                    AcbInfo acbInfo = new AcbInfo(System.IO.Path.GetFileNameWithoutExtension(file),
                                                  acbIndex, "", System.IO.Path.GetFileName(file), "", "");
                    /* 指定したACBファイル名(キューシート名)を指定してキュー情報を取得 */
                    CriAtomExAcb acb = CriAtomExAcb.LoadAcbFile(null, file.Replace("\\", "/"), "");
                    if (acb != null)
                    {
                        /* キュー名リストの作成 */
                        CriAtomEx.CueInfo[] cueInfoList = acb.GetCueInfoList();
                        foreach (CriAtomEx.CueInfo cueInfo in cueInfoList)
                        {
                            CueInfo tmpCueInfo = new CueInfo(cueInfo.name, cueInfo.id, cueInfo.userData);
                            bool    found      = false;
                            foreach (var key in acbInfo.cueInfoList)
                            {
                                if (key.id == cueInfo.id)
                                {
                                    found = true;
                                    break;
                                }
                            }
                            if (found == false)
                            {
                                acbInfo.cueInfoList.Add(tmpCueInfo);
                            }
                            else
                            {
                                //  inGame時のサブシーケンスの場合あり
                                //Debug.Log("already exists in the dictionay id:" + cueInfo.id.ToString() +"name:" + cueInfo.name);
                            }
                        }
                        acb.Dispose();
                    }
                    else
                    {
                        Debug.Log("GetAcbInfoList LoadAcbFile. acb is null. " + file);
                    }
                    tmpAcbInfoList.Add(acbInfo);
                    acbIndex++;
                }
            }

            //  directory
            string[] directories = System.IO.Directory.GetDirectories(searchPath);
            foreach (string directory in directories)
            {
                GetAcbInfoListCore(directory, ref acbIndex);
            }
        }
예제 #7
0
    }     /* end of class */
    #endregion

    public static bool GetCueInfo(bool forceReload)
    {
        if (CriAtomAcfInfo.acfInfo == null || forceReload)
        {
            GetCueInfoInternal();
        }

        /* もしACFInfoが無い場合、acfがあるか検索 */
        if (CriAtomAcfInfo.acfInfo == null)
        {
            //Debug.LogWarning("ADX2 need \"CriAtomProjInfo_Unity.cs\"");

            string[] files    = System.IO.Directory.GetFiles(Application.streamingAssetsPath);
            int      acbIndex = 0;
            foreach (string file in files)
            {
                if (System.IO.Path.GetExtension(file.Replace("\\", "/")) == ".acf")
                {
                    CriAtomAcfInfo.acfInfo = new AcfInfo(System.IO.Path.GetFileNameWithoutExtension(file),
                                                         0, "", System.IO.Path.GetFileName(file), "", "");
                }
            }
            if (CriAtomAcfInfo.acfInfo != null)
            {
                foreach (string file in files)
                {
                    if (System.IO.Path.GetExtension(file.Replace("\\", "/")) == ".acb")
                    {
                        AcbInfo acbInfo = new AcbInfo(System.IO.Path.GetFileNameWithoutExtension(file),
                                                      acbIndex, "", System.IO.Path.GetFileName(file), "", "");

                        /* 指定したACBファイル名(キューシート名)を指定してキュー情報を取得 */
                        //CriAtomExAcb acb = CriAtomExAcb.LoadAcbFile(null, file.Replace("\\","/"), "");

                        /* キュー名リストの作成 */
                        //int cueIndex = 0;
                        //CriAtomEx.CueInfo[] cueInfoList = acb.GetCueInfoList();
                        //foreach(CriAtomEx.CueInfo cueInfo in cueInfoList){
                        //	CueInfo tmpCueInfo = new CueInfo(cueInfo.name,cueInfo.id,"");
                        //	acbInfo.cueInfoList.Add(cueIndex,tmpCueInfo);
                        //}
                        CueInfo tmpCueInfo = new CueInfo("DummyCue", 0, "");
                        acbInfo.cueInfoList.Add(0, tmpCueInfo);

                        CriAtomAcfInfo.acfInfo.acbInfoList.Add(acbInfo);
                        acbIndex++;
                    }
                }
            }
        }

        return(CriAtomAcfInfo.acfInfo != null);
    }
partial     static void GetCueInfoInternal()
    {
        acfInfo = new AcfInfo("ACF", 0, "", "HMF_Origami.acf","b5599db6-2038-4da3-89ea-935831ba9916","DspBusSetting_0");
        acfInfo.aisacControlNameList.Add("Any");
        acfInfo.aisacControlNameList.Add("Distance");
        acfInfo.aisacControlNameList.Add("AisacControl02");
        acfInfo.aisacControlNameList.Add("AisacControl03");
        acfInfo.aisacControlNameList.Add("AisacControl04");
        acfInfo.aisacControlNameList.Add("AisacControl05");
        acfInfo.aisacControlNameList.Add("AisacControl06");
        acfInfo.aisacControlNameList.Add("AisacControl07");
        acfInfo.aisacControlNameList.Add("AisacControl08");
        acfInfo.aisacControlNameList.Add("AisacControl09");
        acfInfo.aisacControlNameList.Add("AisacControl10");
        acfInfo.aisacControlNameList.Add("AisacControl11");
        acfInfo.aisacControlNameList.Add("AisacControl12");
        acfInfo.aisacControlNameList.Add("AisacControl13");
        acfInfo.aisacControlNameList.Add("AisacControl14");
        acfInfo.aisacControlNameList.Add("AisacControl15");
        acfInfo.acbInfoList.Clear();
        AcbInfo newAcbInfo = null;
        newAcbInfo = new AcbInfo("BGM", 0, "", "BGM.acb", "BGM_streamfiles.awb","d3c7b73c-14d6-4ac3-8375-08d2b9a8e52f");
        acfInfo.acbInfoList.Add(newAcbInfo);
        newAcbInfo.cueInfoList.Add(2, new CueInfo("Result", 2, ""));
        newAcbInfo.cueInfoList.Add(0, new CueInfo("01 Prologue", 0, ""));
        newAcbInfo.cueInfoList.Add(1, new CueInfo("InGame", 1, ""));
        newAcbInfo.cueInfoList.Add(3, new CueInfo("Tutorial", 3, ""));
        newAcbInfo.cueInfoList.Add(4, new CueInfo("InGame_take1", 4, ""));
        newAcbInfo = new AcbInfo("SE", 1, "", "SE.acb", "SE_streamfiles.awb","3f8813b9-1d67-45c6-80cd-d3b2bd40bbed");
        acfInfo.acbInfoList.Add(newAcbInfo);
        newAcbInfo.cueInfoList.Add(3, new CueInfo("ContactEffect", 3, ""));
        newAcbInfo.cueInfoList.Add(4, new CueInfo("FlashEffect", 4, ""));
        newAcbInfo.cueInfoList.Add(6, new CueInfo("GaugeMax", 6, ""));
        newAcbInfo.cueInfoList.Add(7, new CueInfo("WaveEffect", 7, ""));
        newAcbInfo.cueInfoList.Add(8, new CueInfo("ButtonTouch", 8, ""));
        newAcbInfo.cueInfoList.Add(2, new CueInfo("Bad", 2, ""));
        newAcbInfo.cueInfoList.Add(1, new CueInfo("GoodSafe", 1, ""));
        newAcbInfo.cueInfoList.Add(5, new CueInfo("GaugeAppear", 5, ""));
        newAcbInfo.cueInfoList.Add(0, new CueInfo("Excellent", 0, ""));
        newAcbInfo.cueInfoList.Add(9, new CueInfo("S13", 9, ""));
    }
예제 #9
0
    private void GetAcbInfoListCore(string searchPath)
    {
        acbInfoList.Clear();
        string[] files = null;
        try {
            files = Directory.GetFiles(searchPath, "*.acb", SearchOption.AllDirectories);
        } catch (Exception ex) {
            if (ex is ArgumentException || ex is ArgumentNullException)
            {
                Debug.LogWarning("[CRIWARE] Insufficient search path. Please check the path for file searching.");
            }
            else if (ex is DirectoryNotFoundException)
            {
                Debug.LogWarning("[CRIWARE] Search path not found: " + searchPath);
            }
            else
            {
                Debug.LogError("[CRIWARE] Error getting ACB files. Message: " + ex.Message);
            }
        }
        if (files == null)
        {
            return;
        }

        int acbIndex = 0;

        foreach (string file in files)
        {
            AcbInfo acbInfo = new AcbInfo(
                Path.GetFileNameWithoutExtension(file),
                acbIndex++,
                "",
                TryGetRelFilePath(file),
                TryGetAwbFile(file));
            /* 指定したACBファイル名(キューシート名)を指定してキュー情報を取得 */
            string       acbFilePath = file.Replace("\\", "/");
            CriAtomExAcb acb         = CriAtomExAcb.LoadAcbFile(null, acbFilePath, "");
            if (acb != null)
            {
                acbInfo.assetGuid = AssetDatabase.AssetPathToGUID("Assets" + acbFilePath.Substring(Application.dataPath.Length));
                /* キュー名リストの作成 */
                CriAtomEx.CueInfo[] cueInfoList = acb.GetCueInfoList();
                foreach (CriAtomEx.CueInfo cueInfo in cueInfoList)
                {
                    bool found = false;
                    foreach (var key in acbInfo.cueInfoList)
                    {
                        if (key.id == cueInfo.id)
                        {
                            found = true;
                            break;
                        }
                    }
                    if (found == false)
                    {
                        var newCueInfo = new CueInfo(cueInfo.name, cueInfo.id, cueInfo.userData, Convert.ToBoolean(cueInfo.headerVisibility));
                        acbInfo.cueInfoList.Add(newCueInfo);
                        if (newCueInfo.isPublic)
                        {
                            acbInfo.publicCueInfoList.Add(newCueInfo);
                        }
                    }
                    else
                    {
                        /* inGame時のサブシーケンスの場合あり */
                        Debug.Log("[CRIWARE] Duplicate cue ID " + cueInfo.id.ToString() + " in cue sheet " + acbInfo.name + ". Last cue name:" + cueInfo.name);
                    }
                }
                acb.Dispose();
            }
            else
            {
                Debug.Log("[CRIWARE] Failed to load ACB file: " + file);
            }
            acbInfoList.Add(acbInfo);
        }
    }
예제 #10
0
	} /* end of class */
    #endregion
	
	public static bool GetCueInfo(bool forceReload)
	{
		if (CriAtomAcfInfo.acfInfo == null || forceReload) {
			GetCueInfoInternal();
		}		
		
		/* もしACFInfoが無い場合、acfがあるか検索 */
		if (CriAtomAcfInfo.acfInfo == null) {
			//Debug.LogWarning("ADX2 need \"CriAtomProjInfo_Unity.cs\"");	
		
			string[] files = System.IO.Directory.GetFiles(Application.streamingAssetsPath);
			int acbIndex = 0;
			foreach (string file in files) {
				if (System.IO.Path.GetExtension(file.Replace("\\","/")) == ".acf") {
					CriAtomAcfInfo.acfInfo = new AcfInfo(System.IO.Path.GetFileNameWithoutExtension(file),
						0,"",System.IO.Path.GetFileName(file),"","");
				}
			}
			if(CriAtomAcfInfo.acfInfo != null){
				foreach (string file in files) {
					if (System.IO.Path.GetExtension(file.Replace("\\","/")) == ".acb") {
						
						AcbInfo acbInfo = new AcbInfo(System.IO.Path.GetFileNameWithoutExtension(file),
							acbIndex,"",System.IO.Path.GetFileName(file),"","");
						
						/* 指定したACBファイル名(キューシート名)を指定してキュー情報を取得 */
						//CriAtomExAcb acb = CriAtomExAcb.LoadAcbFile(null, file.Replace("\\","/"), "");
						
						/* キュー名リストの作成 */
						//int cueIndex = 0;
						//CriAtomEx.CueInfo[] cueInfoList = acb.GetCueInfoList();
						//foreach(CriAtomEx.CueInfo cueInfo in cueInfoList){
						//	CueInfo tmpCueInfo = new CueInfo(cueInfo.name,cueInfo.id,"");
						//	acbInfo.cueInfoList.Add(cueIndex,tmpCueInfo);
						//}
						CueInfo tmpCueInfo = new CueInfo("DummyCue",0,"");
						acbInfo.cueInfoList.Add(0,tmpCueInfo);
						
						CriAtomAcfInfo.acfInfo.acbInfoList.Add(acbInfo);
						acbIndex++;
					}
				}
			}
		}
		
		return (CriAtomAcfInfo.acfInfo != null);
	}