示例#1
0
 /**
  * <summary>ゲーム変数情報の取得(インデックス指定)</summary>
  * <param name="index">ゲーム変数インデックス</param>
  * <param name="info">ゲーム変数情報</param>
  * <returns>情報が取得できたかどうか?</returns>
  * \par 説明:
  * ゲーム変数インデックスからゲーム変数情報を取得します。<br>
  * 指定したインデックスのゲーム変数が存在しない場合、falseが返ります。
  * \attention
  * 本関数を実行する前に、ACFファイルを登録しておく必要があります。<br/>
  */
 public static bool GetGameVariableInfo(ushort index, out GameVariableInfo info)
 {
     using (var mem = new CriStructMemory <GameVariableInfo>()) {
         bool result = criAtomEx_GetGameVariableInfo(index, mem.ptr);
         info = new GameVariableInfo(mem.bytes, 0);
         return(result);
     }
 }
示例#2
0
        public GameVariableInfo gameVariableInfo;               /**< ゲーム変数				*/

        public CueInfo(byte[] data, int startIndex)
        {
            if (IntPtr.Size == 4)
            {
                this.id         = BitConverter.ToInt32(data, startIndex + 0);
                this.type       = (CueType)BitConverter.ToInt32(data, startIndex + 4);
                this.name       = Marshal.PtrToStringAnsi(new IntPtr(BitConverter.ToInt32(data, startIndex + 8)));
                this.userData   = Marshal.PtrToStringAnsi(new IntPtr(BitConverter.ToInt32(data, startIndex + 12)));
                this.length     = BitConverter.ToInt64(data, startIndex + 16);
                this.categories = new ushort[16];
                for (int i = 0; i < 16; ++i)
                {
                    categories[i] = BitConverter.ToUInt16(data, startIndex + 24 + (2 * i));
                }
                this.numLimits        = BitConverter.ToInt16(data, startIndex + 56);
                this.numBlocks        = BitConverter.ToUInt16(data, startIndex + 58);
                this.priority         = data[startIndex + 60];
                this.headerVisibility = data[startIndex + 61];
                this.reserved         = new byte[2];
                for (int i = 0; i < 2; ++i)
                {
                    reserved[i] = data[startIndex + 62 + (1 * i)];
                }
                this.pos3dInfo        = new CuePos3dInfo(data, startIndex + 64);
                this.gameVariableInfo = new GameVariableInfo(data, startIndex + 92);
            }
            else
            {
                this.id         = BitConverter.ToInt32(data, startIndex + 0);
                this.type       = (CueType)BitConverter.ToInt32(data, startIndex + 4);
                this.name       = Marshal.PtrToStringAnsi(new IntPtr(BitConverter.ToInt64(data, startIndex + 8)));
                this.userData   = Marshal.PtrToStringAnsi(new IntPtr(BitConverter.ToInt64(data, startIndex + 16)));
                this.length     = BitConverter.ToInt64(data, startIndex + 24);
                this.categories = new ushort[16];
                for (int i = 0; i < 16; ++i)
                {
                    categories[i] = BitConverter.ToUInt16(data, startIndex + 32 + (2 * i));
                }
                this.numLimits        = BitConverter.ToInt16(data, startIndex + 64);
                this.numBlocks        = BitConverter.ToUInt16(data, startIndex + 66);
                this.priority         = data[startIndex + 68];
                this.headerVisibility = data[startIndex + 69];
                this.reserved         = new byte[2];
                for (int i = 0; i < 2; ++i)
                {
                    reserved[i] = data[startIndex + 70 + (1 * i)];
                }
                this.pos3dInfo        = new CuePos3dInfo(data, startIndex + 72);
                this.gameVariableInfo = new GameVariableInfo(data, startIndex + 104);
            }
        }