status_update distinguish new BL_RESET from BL_FLUSH
This adds BL_RESET to status_update to send a flag to a window port that every field should be updated because something has happened in the core to make current values shown to be untrustworthy or potentially obliterated. That is now distinguished from BL_FLUSH, which now has no bearing on whether every field needs to be redone, and instead can be used by a window port indicator that it is time to render any buffered status field changes to the display. tty port now sets WC2_FLUSH_STATUS indicator for BL_FLUSH support and now does one rendering per bot() call, instead of up to 22. Side note: The tty hitpoint bar code was relying on the old behavior of redrawing everything upon BL_FLUSH apparently, so it initially had some color change lag issues, corrected by marking BL_STATUS as dirty (in need of updating) in tty_status_update() whenever BL_HP was marked as dirty.
This commit is contained in:
@@ -412,6 +412,10 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage, int color
|
||||
BL_LEVELDESC, BL_EXP, BL_CONDITION
|
||||
-- fldindex could also be BL_FLUSH (-1), which is not really
|
||||
a field index, but is a special trigger to tell the
|
||||
windowport that it should output all changes received
|
||||
to this point. It marks the end of a bot() cycle.
|
||||
-- fldindex could also be BL_RESET (-2), which is not really
|
||||
a field index, but is a special advisory to to tell the
|
||||
windowport that it should redisplay all its status fields,
|
||||
even if no changes have been presented to it.
|
||||
-- ptr is usually a "char *", unless fldindex is BL_CONDITION.
|
||||
|
||||
Reference in New Issue
Block a user