Example #1
0
 public GlobalVariable(Reader reader)
 {
     Name = reader.ReadString();
     byte[] bytes = new byte[4];
     bytes = reader.ReadBytes(4);
     Value = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + (bytes[0] << 0);
 }
            public sprAnimation(Reader reader, Animation anim = null)
            {
                AnimName = reader.ReadString();
                short frameCount = reader.ReadByte();

                SpeedMultiplyer = reader.ReadByte();
                LoopIndex       = reader.ReadByte();
                RotationFlags   = reader.ReadByte();
                for (int i = 0; i < frameCount; ++i)
                {
                    Frames.Add(new sprFrame(reader, anim));
                }
            }
Example #3
0
        internal void ReadWAVConfiguration(Reader reader)
        {
            byte SoundFX_count = reader.ReadByte();

            for (int i = 0; i < SoundFX_count; ++i)
            {
                SfxNames.Add(reader.ReadRSDKString());
            }

            for (int i = 0; i < SoundFX_count; ++i)
            {
                SoundFX.Add(reader.ReadString());
            }
        }
        public Animation(Reader reader)
        {
            int spriteSheetCount = reader.ReadByte();

            for (int i = 0; i < spriteSheetCount; ++i)
            {
                SpriteSheets.Add(reader.ReadString());
            }

            var animationCount = reader.ReadInt16();

            for (int i = 0; i < animationCount; ++i)
            {
                Animations.Add(new sprAnimation(reader));
            }

            int collisionBoxCount = reader.ReadByte();

            for (int i = 0; i < collisionBoxCount; ++i)
            {
                CollisionBoxes.Add(new sprHitbox(reader));
            }
            reader.Close();
        }
Example #5
0
 public GlobalVariable(Reader reader)
 {
     Name = reader.ReadString();
     //Console.WriteLine(Name);
     Value = reader.ReadInt32();
 }