Example #1
0
        private int fnFullSetFrame(SwordObject cpt, int id, int cdt, int spr, int frameNo, int f, int z, int x)
        {
            var data    = _resMan.OpenFetchRes((uint)cdt);
            var dataOff = Header.Size;

            if (frameNo == LAST_FRAME)
            {
                frameNo = (int)(_resMan.ReadUInt32(data.ToUInt32(dataOff)) - 1);
            }
            dataOff += 4;

            var animPtr = new AnimUnit(data, dataOff + AnimUnit.Size * frameNo);

            cpt.anim_x = cpt.xcoord = (int)_resMan.ReadUInt32(animPtr.animX);
            cpt.anim_y = cpt.ycoord = (int)_resMan.ReadUInt32(animPtr.animY);
            cpt.frame  = (int)_resMan.ReadUInt32(animPtr.animFrame);

            cpt.resource = spr;
            cpt.status  &= ~STAT_SHRINK;

            _resMan.ResClose((uint)cdt);
            return(SCRIPT_CONT);
        }
Example #2
0
        private int fnFullSetFrame(SwordObject cpt, int id, int cdt, int spr, int frameNo, int f, int z, int x)
        {
            var data = _resMan.OpenFetchRes((uint)cdt);
            var dataOff = Header.Size;

            if (frameNo == LAST_FRAME)
                frameNo = (int)(_resMan.ReadUInt32(data.ToUInt32(dataOff)) - 1);
            dataOff += 4;

            var animPtr = new AnimUnit(data, dataOff + AnimUnit.Size * frameNo);
            cpt.anim_x = cpt.xcoord = (int)_resMan.ReadUInt32(animPtr.animX);
            cpt.anim_y = cpt.ycoord = (int)_resMan.ReadUInt32(animPtr.animY);
            cpt.frame = (int)_resMan.ReadUInt32(animPtr.animFrame);

            cpt.resource = spr;
            cpt.status &= ~STAT_SHRINK;

            _resMan.ResClose((uint)cdt);
            return SCRIPT_CONT;
        }