Esempio n. 1
0
 public IntVector2(IntVector2 source)
 {
     _x = source._x;
     _y = source._y;
 }
Esempio n. 2
0
        public bool Equals(IntVector2 other)
        {
            if ((object)other == null)
            {
                return false;
            }

            return (X - other.X) == 0 && (Y = other.Y) == 0;
        }
Esempio n. 3
0
 public unsafe MovieClip(byte* pBuffer, byte* pBufferStart)
     : base(&pBuffer)
 {
     _frames = new Frame[*(int*)pBuffer];
     pBuffer += 4;
     byte* pFramesBuffer = pBufferStart + *(uint*)pBuffer;
     pBuffer += 4;
     for (int idx = 0; idx < _frames.Length; ++idx)
     {
         _frames[idx] = new Frame(&pFramesBuffer, pBufferStart);
     }
     _pointer = *(uint*)pBuffer;
     pBuffer += 4;
     _characters = new ACharacter[*(int*)pBuffer];
     pBuffer += 4;
     byte* pCharactersBuffer = pBufferStart + *(uint*)pBuffer;
     pBuffer += 4;
     _characters[0] = this;
     pCharactersBuffer += 4;
     for (int idx = 1; idx < _characters.Length; ++idx)
     {
         if (*(int*)pCharactersBuffer == 0)
         {
             pCharactersBuffer += 4;
             continue;
         }
         byte* pCharacterBuffer = pBufferStart + *(uint*)pCharactersBuffer;
         pCharactersBuffer += 4;
         CharacterType type = (CharacterType)(*(uint*)pCharacterBuffer);
         switch (type)
         {
             case CharacterType.SHAPE:
                 break;
             case CharacterType.MOVIE_CLIP:
                 _characters[idx] = new MovieClip(pCharacterBuffer, pBufferStart);
                 break;
         }
     }
     _creationResolution = new IntVector2(&pBuffer);
     _unkown = *(uint*)pBuffer;
     pBuffer += 4;
     _imports = new Import[*(uint*)pBuffer];
     pBuffer += 4;
     byte* pImportsBuffer = pBufferStart + *(uint*)pBuffer;
     pBuffer += 4;
     for (int idx = 0; idx < _imports.Length; ++idx)
     {
         _imports[idx] = new Import(&pImportsBuffer, pBufferStart);
     }
     _exports = new Export[*(uint*)pBuffer];
     pBuffer += 4;
     byte* pExportsBuffer = pBufferStart + *(uint*)pBuffer;
     pBuffer += 4;
     for (int idx = 0; idx < _exports.Length; ++idx)
     {
         _exports[idx] = new Export(&pExportsBuffer, pBufferStart);
     }
     _count = *(uint*)pBuffer;
 }