Exemplo n.º 1
0
 /* ------------------------------------------------------------------------
  * Temporary (hopefully) hackish solutions.
  * ------------------------------------------------------------------------ */
 public static void check_panel(Game_Event.Event_Type type, Game_Event data, object user)
 {
     Xtra2.verify_panel();
 }
Exemplo n.º 2
0
        private const int INFO_SCREENS = 2;          /* Number of screens in character info mode */

        /*
         * Hack -- redraw the screen
         *
         * This command performs various low level updates, clears all the "extra"
         * windows, does a total redraw of the main window, and requests all of the
         * interesting updates and redraws that I can think of.
         *
         * This command is also used to "instantiate" the results of the user
         * selecting various things, such as graphics mode, so it must call
         * the "TERM_XTRA_REACT" hook before redrawing the windows.
         *
         */
        public static void redraw()
        {
            int j;

            Term old = Term.instance;


            /* Low level flush */
            Term.flush();

            /* Reset "inkey()" */
            Utilities.flush();

            if (Player.Player.character_dungeon)
            {
                Xtra2.verify_panel();
            }


            /* Hack -- React to changes */
            Term.xtra(TERM_XTRA.REACT, 0);


            /* Combine and Reorder the pack (later) */
            Misc.p_ptr.notice |= (Misc.PN_COMBINE | Misc.PN_REORDER);


            /* Update torch */
            Misc.p_ptr.update |= (Misc.PU_TORCH);

            /* Update stuff */
            Misc.p_ptr.update |= (Misc.PU_BONUS | Misc.PU_HP | Misc.PU_MANA | Misc.PU_SPELLS);

            /* Fully update the visuals */
            Misc.p_ptr.update |= (Misc.PU_FORGET_VIEW | Misc.PU_UPDATE_VIEW | Misc.PU_MONSTERS);

            /* Redraw everything */
            Misc.p_ptr.redraw |= (uint)(Misc.PR_BASIC | Misc.PR_EXTRA | Misc.PR_MAP | Misc.PR_INVEN | Misc.PR_EQUIP |
                                        Misc.PR_MESSAGE | Misc.PR_MONSTER | Misc.PR_OBJECT |
                                        Misc.PR_MONLIST | Misc.PR_ITEMLIST);

            /* Clear screen */
            Term.clear();

            /* Hack -- update */
            Misc.p_ptr.handle_stuff();

            /* Place the cursor on the player */
            if (Player.Player.character_dungeon)
            {
                Cave.move_cursor_relative(Misc.p_ptr.px, Misc.p_ptr.py);
            }


            /* Redraw every window */
            for (j = 0; j < Misc.ANGBAND_TERM_MAX; j++)
            {
                if (Misc.angband_term[j] == null)
                {
                    continue;
                }

                Misc.angband_term[j].activate();
                Term.redraw();
                Term.fresh();
                old.activate();
            }
        }