예제 #1
0
        public void SaveToStreamExtended(EraDataWriter writer)
        {
            List <VariableCode> codeList = null;

            //dataString
            codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__STRING__);
            foreach (var code in codeList)
            {
                writer.WriteExtended(code.ToString(), DataString[(int)VariableCode.__LOWERCASE__ & (int)code]);
            }
            writer.EmuSeparete();

            //datainteger
            codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__INTEGER__);
            foreach (var code in codeList)
            {
                writer.WriteExtended(code.ToString(), DataInteger[(int)VariableCode.__LOWERCASE__ & (int)code]);
            }
            writer.EmuSeparete();

            //dataStringArray
            codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ |
                                                         VariableCode.__STRING__);
            foreach (var code in codeList)
            {
                writer.WriteExtended(code.ToString(), DataStringArray[(int)VariableCode.__LOWERCASE__ & (int)code]);
            }
            writer.EmuSeparete();

            //dataIntegerArray
            codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ |
                                                         VariableCode.__INTEGER__);
            foreach (var code in codeList)
            {
                writer.WriteExtended(code.ToString(), DataIntegerArray[(int)VariableCode.__LOWERCASE__ & (int)code]);
            }
            writer.EmuSeparete();

            //dataStringArray2D
            codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_2D__ |
                                                         VariableCode.__STRING__);
            foreach (var code in codeList)
            {
                writer.WriteExtended(code.ToString(), DataStringArray2D[(int)VariableCode.__LOWERCASE__ & (int)code]);
            }
            writer.EmuSeparete();

            //dataIntegerArray2D
            codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_2D__ |
                                                         VariableCode.__INTEGER__);
            foreach (var code in codeList)
            {
                writer.WriteExtended(code.ToString(),
                                     DataIntegerArray2D[(int)VariableCode.__LOWERCASE__ & (int)code]);
            }
            writer.EmuSeparete();
        }
예제 #2
0
 public void SaveToStream(EraDataWriter writer)
 {
     for (int i = 0; i < strCount; i++)
     {
         writer.Write(dataString[i]);
     }
     for (int i = 0; i < intCount; i++)
     {
         writer.Write(dataInteger[i]);
     }
     for (int i = 0; i < intArrayCount; i++)
     {
         writer.Write(dataIntegerArray[i]);
     }
     for (int i = 0; i < strArrayCount; i++)
     {
         writer.Write(dataStringArray[i]);
     }
 }