Example #1
0
        static Parser.Error finish_parse_prefs(Parser p)
        {
            prefs_data d = p.priv as prefs_data;
            int        i;

            /* Update sub-windows based on the newly read-in prefs.
             *
             * The op_ptr.window_flag[] array cannot be updated directly during
             * parsing since the changes between the existing flags and the new
             * are used to set/unset the event handlers that update the windows.
             *
             * Build a complete set to pass to subwindows_set_flags() by loading
             * any that weren't read in by the parser from the existing set.
             */
            for (i = 0; i < Misc.ANGBAND_TERM_MAX; i++)
            {
                if (!d.loaded_window_flag[i])
                {
                    d.window_flags[i] = Player.Player_Other.instance.window_flag[i];
                }
            }
            Misc.subwindows_set_flags(d.window_flags, Misc.ANGBAND_TERM_MAX);

            return(Parser.Error.NONE);
        }