コード例 #1
0
        public void write(ByteArrayOutputStream outp, ByteArrayOutputStream outn)
        {
            outp.writeUShort((ushort)id);
            outp.writeUShort((ushort)(outn.getPos() / 16));
            outp.writeUShort((ushort)(points.Count));
            outp.writeUShort(0); //Unused values

            foreach (NSMBPathPoint p in points)
            {
                p.write(outn);
            }
        }
コード例 #2
0
        public void saveObjects()
        {
            ByteArrayOutputStream eObjIndexFile = new ByteArrayOutputStream();
            ByteArrayOutputStream eObjFile      = new ByteArrayOutputStream();

            for (int i = 0; i < Objects.Length; i++)
            {
                if (Objects[i] == null)
                {
                    break;
                }

                eObjIndexFile.writeUShort((ushort)eObjFile.getPos());
                eObjIndexFile.writeByte((byte)Objects[i].width);
                eObjIndexFile.writeByte((byte)Objects[i].height);
                Objects[i].save(eObjFile);
            }

            ObjFile.replace(eObjFile.getArray(), this);
            ObjIndexFile.replace(eObjIndexFile.getArray(), this);
        }