NScumm.Sky.Logic.FnEyeball C# (CSharp) Method

FnEyeball() private method

private FnEyeball ( uint id, uint b, uint c ) : bool
id uint
b uint
c uint
return bool
        private bool FnEyeball(uint id, uint b, uint c)
        {
            // set 'result' to frame no. pointing to foster, according to table used
            // eg. FN_eyeball (id_eye_90_table);

            var eyeTable = new UShortAccess(_skyCompact.FetchCptRaw((ushort)id), 0);
            Compact cpt = _skyCompact.FetchCpt(ID_BLUE_FOSTER);

            int x = cpt.Core.xcood; // 168 < x < 416
            x -= 168;
            x >>= 3;

            int y = cpt.Core.ycood; // 256 < y < 296
            y -= 256;
            y <<= 2;

            _scriptVariables[RESULT] = (uint)(eyeTable[x + y] + S91);
            return true;
        }
Logic