Example #1
0
        public void write(Writer writer)
        {
            // Header
            writer.Write(signature);
            writer.Write(totalFrameCount);

            // SpriteSheets
            writer.Write((byte)spriteSheets.Count);
            foreach (string sheet in spriteSheets)
            {
                writer.writeRSDKString(sheet);
            }

            // Hitboxes
            writer.Write((byte)hitboxTypes.Count);
            foreach (string type in hitboxTypes)
            {
                writer.writeRSDKString(type);
            }

            // Animations
            writer.Write((ushort)animations.Count);
            foreach (AnimationEntry anim in animations)
            {
                anim.write(writer);
            }

            writer.Close();
        }
Example #2
0
 public void write(Writer writer, bool writeFilter = true)
 {
     writer.writeRSDKString(name);
     writer.writeRSDKString(folder);
     writer.writeRSDKString(id);
     if (writeFilter)
     {
         writer.Write(filter);
     }
 }
Example #3
0
        public void write(Writer writer, bool usePlusFormat = true)
        {
            // Header
            writer.Write(signature);

            // General
            writer.writeRSDKString(gameTitle);
            writer.writeRSDKString(gameSubtitle);
            writer.writeRSDKString(gameVersion);

            writer.Write(startingActiveList);
            writer.Write(startingListPos);

            // Objects
            writer.Write((byte)objects.Count);
            foreach (string name in objects)
            {
                writer.writeRSDKString(name);
            }

            // Palettes
            foreach (Palette palette in palettes)
            {
                palette.write(writer);
            }

            // SoundFX
            writer.Write((byte)soundFX.Count);
            foreach (SoundInfo sfx in soundFX)
            {
                sfx.write(writer);
            }

            // Total Scene Count
            writer.Write((ushort)categories.Select(x => x.list.Count).Sum());

            // Scenes
            writer.Write((byte)categories.Count);
            foreach (SceneCategory cat in categories)
            {
                cat.write(writer, usePlusFormat);
            }

            // Global Variables
            writer.Write((byte)globalVariables.Count);
            foreach (GlobalVariable c in globalVariables)
            {
                c.write(writer);
            }
        }
Example #4
0
        public void write(Writer writer)
        {
            // General
            writer.Write(signature);

            writer.Write(loadGlobalObjects);

            // Objects
            writer.Write((byte)objects.Count);
            foreach (string name in objects)
            {
                writer.writeRSDKString(name);
            }

            // Palettes
            foreach (Palette palette in palettes)
            {
                palette.write(writer);
            }

            // SoundFX
            writer.Write((byte)soundFX.Count);
            foreach (GameConfig.SoundInfo sfx in soundFX)
            {
                sfx.write(writer);
            }
        }
Example #5
0
 public void write(Writer writer)
 {
     writer.Write(unknown1);
     bgColor1.write(writer);
     bgColor2.write(writer);
     writer.Write(unknownBytes);
     writer.writeRSDKString(libraryName);
     writer.Write(unknown2);
 }
Example #6
0
            public void write(Writer writer, bool writeFilter = true)
            {
                writer.writeRSDKString(name);

                writer.Write((byte)list.Count);
                foreach (SceneInfo scene in list)
                {
                    scene.write(writer, writeFilter);
                }
            }
Example #7
0
            public void write(Writer writer)
            {
                writer.writeRSDKString(name);
                writer.Write((short)frames.Count);
                writer.Write(speed);
                writer.Write(loopIndex);
                writer.Write((byte)rotationStyle);

                foreach (Frame frame in frames)
                {
                    frame.write(writer);
                }
            }
Example #8
0
        public void write(Writer writer)
        {
            writer.Write(visible);

            writer.writeRSDKString(name);

            writer.Write((byte)type);
            writer.Write(drawOrder);

            writer.Write(width);
            writer.Write(height);

            writer.Write(parallaxFactor);
            writer.Write(scrollSpeed);

            writer.Write((ushort)scrollInfo.Count);
            foreach (ScrollInfo info in scrollInfo)
            {
                info.write(writer);
            }

            writer.writeCompressed(lineScroll);

            using (MemoryStream cmem = new MemoryStream())
            {
                using (Writer cwriter = new Writer(cmem))
                {
                    for (int y = 0; y < height; ++y)
                    {
                        for (int x = 0; x < width; ++x)
                        {
                            cwriter.Write(layout[y][x]);
                        }
                    }
                    cwriter.Close();
                    writer.writeCompressed(cmem.ToArray());
                }
            }
        }
Example #9
0
 public void write(Writer writer)
 {
     writer.writeRSDKString(name);
     writer.Write(maxConcurrentPlay);
 }