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

FnChooser() private method

private FnChooser ( uint a, uint b, uint c ) : bool
a uint
b uint
c uint
return bool
        private bool FnChooser(uint a, uint b, uint c)
        {
            // setup the text questions to be clicked on
            // read from TEXT1 until 0

            SystemVars.Instance.SystemFlags |= SystemFlags.Choosing; // can't save/restore while choosing

            _scriptVariables[THE_CHOSEN_ONE] = 0; // clear result

            int p = TEXT1;
            ushort ycood = TOP_LEFT_Y; // rolling coordinate

            while (_scriptVariables[p] != 0)
            {
                uint textNum = _scriptVariables[p++];

                DisplayedText lowText = _skyText.LowTextManager(textNum, GAME_SCREEN_WIDTH, 0, 241, false);

                byte[] data = lowText.TextData;
                var header = ServiceLocator.Platform.ToStructure<DataFileHeader>(data, 0);

                // stipple the text

                uint size = (uint)(header.s_height * header.s_width);
                uint index = 0;
                uint width = header.s_width;
                uint height = header.s_height;

                var dataPos = ServiceLocator.Platform.SizeOf<DataFileHeader>();

                while (index < size)
                {
                    if (index % width <= 1)
                        index ^= 1; //index++;
                    if (data[dataPos + index] == 0)
                        data[dataPos + index] = 1;
                    index += 2;
                }

                Compact textCompact = _skyCompact.FetchCpt(lowText.CompactNum);

                textCompact.Core.getToFlag = (ushort)textNum;
                textCompact.Core.downFlag = (ushort)_scriptVariables[p++]; // get animation number

                textCompact.Core.status |= ST_MOUSE; // mouse detects

                textCompact.Core.xcood = TOP_LEFT_X; // set coordinates
                textCompact.Core.ycood = ycood;
                ycood += (ushort)height;
            }

            if (p == TEXT1)
                return true;

            _compact.Core.logic = L_CHOOSE; // player frozen until choice made
            FnAddHuman(0, 0, 0); // bring back mouse

            return false;
        }
Logic