diff --git a/include/context.h b/include/context.h index 382a607aa..3dc424aba 100644 --- a/include/context.h +++ b/include/context.h @@ -159,8 +159,8 @@ struct context_info { boolean move; boolean mv; boolean bypasses; /* bypass flag is set on at least one fobj */ - boolean botl; /* partially redo status line */ - boolean botlx; /* print an entirely new bottom line */ + boolean placeholder1; + boolean placeholder2; boolean door_opened; /* set to true if door was opened during test_move */ boolean tips[NUM_TIPS]; struct dig_info digging; diff --git a/include/decl.h b/include/decl.h index 17c70bab5..b50587ad0 100644 --- a/include/decl.h +++ b/include/decl.h @@ -115,6 +115,13 @@ extern struct tc_gbl_data { /* also declared in tcap.h */ extern const char *ARGV0; #endif +struct display_hints { + boolean botl; /* partially redo status line */ + boolean botlx; /* print an entirely new bottom line */ + boolean time_botl; /* context.botl for 'time' (moves) only */ +}; +extern struct display_hints display; + /* * 'gX' -- instance_globals holds engine state that does not need to be * persisted upon game exit. The initialization state is well defined diff --git a/include/flag.h b/include/flag.h index 47cfc7fe0..9b402109d 100644 --- a/include/flag.h +++ b/include/flag.h @@ -340,7 +340,6 @@ struct instance_flags { #endif boolean cmdassist; /* provide detailed assistance for some comnds */ boolean fireassist; /* autowield launcher when using fire-command */ - boolean time_botl; /* context.botl for 'time' (moves) only */ boolean wizweight; /* display weight of everything in wizard mode */ boolean wizmgender; /* test gender info from core in window port */ /* diff --git a/outdated/sys/amiga/winstr.c b/outdated/sys/amiga/winstr.c index adf9f49f7..e5ffff915 100644 --- a/outdated/sys/amiga/winstr.c +++ b/outdated/sys/amiga/winstr.c @@ -191,7 +191,7 @@ const char *str; if (cw->data[cw->cury] == NULL) panic("NULL pointer for status window"); ob = &cw->data[cw->cury][j = cw->curx]; - if (gc.context.botlx) + if (display.botlx) *ob = 0; /* Display when beam at top to avoid flicker... */ diff --git a/src/allmain.c b/src/allmain.c index 3b4ee094e..f8032ae8e 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -79,7 +79,7 @@ moveloop_preamble(boolean resuming) u.umovement = NORMAL_SPEED; initrack(); } - gc.context.botlx = TRUE; /* for STATUS_HILITES */ + display.botlx = TRUE; /* for STATUS_HILITES */ if (resuming) { /* restoring old game */ read_engr_at(u.ux, u.uy); /* subset of pickup() */ fix_shop_damage(); @@ -233,7 +233,7 @@ moveloop_core(void) gh.hero_seq = gm.moves << 3; if (flags.time && !gc.context.run) - iflags.time_botl = TRUE; /* 'moves' just changed */ + display.time_botl = TRUE; /* 'moves' just changed */ /********************************/ /* once-per-turn things go here */ @@ -425,10 +425,10 @@ moveloop_core(void) if (gv.vision_full_recalc) vision_recalc(0); /* vision! */ } - if (gc.context.botl || gc.context.botlx) { + if (display.botl || display.botlx) { bot(); curs_on_u(); - } else if (iflags.time_botl) { + } else if (display.time_botl) { timebot(); curs_on_u(); } @@ -503,7 +503,7 @@ moveloop_core(void) && (gm.multi && (!gc.context.travel ? !(gm.multi % 7) : !(gm.moves % 7L)))) { if (flags.time && gc.context.run) - gc.context.botl = TRUE; + display.botl = TRUE; /* [should this be flush_screen() instead?] */ display_nhwindow(WIN_MAP, FALSE); } @@ -561,7 +561,7 @@ regen_pw(int wtcap) u.uen += rn1(upper, 1); if (u.uen > u.uenmax) u.uen = u.uenmax; - gc.context.botl = TRUE; + display.botl = TRUE; if (u.uen == u.uenmax) interrupt_multi("You feel full of energy."); } @@ -593,7 +593,7 @@ regen_hp(int wtcap) heal = 1; } if (heal) { - gc.context.botl = TRUE; + display.botl = TRUE; u.mh += heal; reached_full = (u.mh == u.mhmax); } @@ -613,7 +613,7 @@ regen_hp(int wtcap) heal++; if (heal) { - gc.context.botl = TRUE; + display.botl = TRUE; u.uhp += heal; if (u.uhp > u.uhpmax) u.uhp = u.uhpmax; @@ -636,7 +636,7 @@ stop_occupation(void) if (!maybe_finished_meal(TRUE)) You("stop %s.", go.occtxt); go.occupation = (int (*)(void)) 0; - gc.context.botl = TRUE; /* in case u.uhs changed */ + display.botl = TRUE; /* in case u.uhs changed */ nomul(0); } else if (gm.multi >= 0) { nomul(0); @@ -705,7 +705,7 @@ newgame(void) { int i; - gc.context.botlx = TRUE; + display.botlx = TRUE; gc.context.ident = 1; gc.context.warnlevel = 1; gc.context.next_attrib_check = 600L; /* arbitrary first setting */ diff --git a/src/apply.c b/src/apply.c index 017082e07..77f5f3985 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2320,7 +2320,7 @@ use_unicorn_horn(struct obj **optr) } if (did_prop) - gc.context.botl = TRUE; + display.botl = TRUE; else pline("%s", nothing_seems_to_happen); @@ -3917,11 +3917,11 @@ do_break_wand(struct obj *obj) */ if ((mon = m_at(x, y)) != 0) { (void) bhitm(mon, obj); - /* if (gc.context.botl) bot(); */ + /* if (display.botl) bot(); */ } if (affects_objects && gl.level.objects[x][y]) { (void) bhitpile(obj, bhito, x, y, 0); - if (gc.context.botl) + if (display.botl) bot(); /* potion effects */ } } else { @@ -3939,7 +3939,7 @@ do_break_wand(struct obj *obj) */ if (affects_objects && gl.level.objects[x][y]) { (void) bhitpile(obj, bhito, x, y, 0); - if (gc.context.botl) + if (display.botl) bot(); /* potion effects */ } damage = zapyourself(obj, FALSE); @@ -3947,7 +3947,7 @@ do_break_wand(struct obj *obj) Sprintf(buf, "killed %sself by breaking a wand", uhim()); losehp(Maybe_Half_Phys(damage), buf, NO_KILLER_PREFIX); } - if (gc.context.botl) + if (display.botl) bot(); /* blindness */ } } diff --git a/src/artifact.c b/src/artifact.c index 49a357913..984223852 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1232,7 +1232,7 @@ Mb_hit(struct monst *magr, /* attacker */ u.uenmax--; if (u.uen > 0) u.uen--; - gc.context.botl = TRUE; + display.botl = TRUE; You("lose magical energy!"); } } else { @@ -1247,7 +1247,7 @@ Mb_hit(struct monst *magr, /* attacker */ if (u.uenmax > u.uenpeak) u.uenpeak = u.uenmax; u.uen++; - gc.context.botl = TRUE; + display.botl = TRUE; You("absorb magical energy!"); } } @@ -1731,7 +1731,7 @@ arti_invoke(struct obj *obj) make_slimed(0L, (char *) 0); if (BlindedTimeout > creamed) make_blinded(creamed, FALSE); - gc.context.botl = TRUE; + display.botl = TRUE; break; } case ENERGY_BOOST: { @@ -1743,7 +1743,7 @@ arti_invoke(struct obj *obj) epboost = u.uenmax - u.uen; if (epboost) { u.uen += epboost; - gc.context.botl = TRUE; + display.botl = TRUE; You_feel("re-energized."); } else goto nothing_special; diff --git a/src/attrib.c b/src/attrib.c index f7095af09..4f952ce83 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -184,7 +184,7 @@ adjattrib( return FALSE; } - gc.context.botl = TRUE; + display.botl = TRUE; if (msgflg <= 0) You_feel("%s%s!", (incr > 1 || incr < -1) ? "very " : "", attrstr); if (gp.program_state.in_moveloop && (ndx == A_STR || ndx == A_CON)) @@ -246,7 +246,7 @@ losestr(int num, const char *knam, schar k_format) if (u.uhpmax > uhpmin) setuhpmax(max(u.uhpmax - dmg, uhpmin)); } - gc.context.botl = TRUE; + display.botl = TRUE; } #if 0 /* only possible if uhpmax was already less than uhpmin */ if (!Upolyd && u.uhpmax < uhpmin) { @@ -354,7 +354,7 @@ poisoned( loss = 6 + d(4, 6); if (u.uhp <= loss) { u.uhp = -1; - gc.context.botl = TRUE; + display.botl = TRUE; pline_The("poison was deadly..."); } else { /* survived, but with severe reaction */ @@ -457,13 +457,13 @@ restore_attrib(void) if (ATEMP(i) != equilibrium && ATIME(i) != 0) { if (!(--(ATIME(i)))) { /* countdown for change */ ATEMP(i) += (ATEMP(i) > 0) ? -1 : 1; - gc.context.botl = TRUE; + display.botl = TRUE; if (ATEMP(i)) /* reset timer */ ATIME(i) = 100 / ACURR(A_CON); } } } - if (gc.context.botl) + if (display.botl) (void) encumber_msg(); } @@ -1112,10 +1112,10 @@ setuhpmax(int newmax) u.uhpmax = newmax; if (u.uhpmax > u.uhppeak) u.uhppeak = u.uhpmax; - gc.context.botl = TRUE; + display.botl = TRUE; } if (u.uhp > u.uhpmax) - u.uhp = u.uhpmax, gc.context.botl = TRUE; + u.uhp = u.uhpmax, display.botl = TRUE; } /* return the current effective value of a specific characteristic @@ -1238,7 +1238,7 @@ uchangealign(int newalign, u.ublessed = 0; /* lose divine protection */ /* You/Your/pline message with call flush_screen(), triggering bot(), so the actual data change needs to come before the message */ - gc.context.botl = TRUE; /* status line needs updating */ + display.botl = TRUE; /* status line needs updating */ if (reason == 0) { /* conversion via altar */ livelog_printf(LL_ALIGNMENT, "permanently converted to %s", diff --git a/src/botl.c b/src/botl.c index 1e1fb7c24..ab1249baa 100644 --- a/src/botl.c +++ b/src/botl.c @@ -260,7 +260,7 @@ bot(void) putmixed(WIN_STATUS, 0, do_statusline2()); } } - gc.context.botl = gc.context.botlx = iflags.time_botl = FALSE; + display.botl = display.botlx = display.time_botl = FALSE; } /* special purpose status update: move counter ('time' status) only */ @@ -269,8 +269,8 @@ timebot(void) { if (gb.bot_disabled) return; - /* we're called when iflags.time_botl is set and general gc.context.botl - is clear; iflags.time_botl gets set whenever gm.moves changes value + /* we're called when display.time_botl is set and general display.botl + is clear; display.time_botl gets set whenever gm.moves changes value so there's no benefit in tracking previous value to decide whether to skip update; suppress_map_output() handles program_state.restoring and program_state.done_hup (tty hangup => no further output at all) @@ -283,7 +283,7 @@ timebot(void) bot(); } } - iflags.time_botl = FALSE; + display.time_botl = FALSE; } /* convert experience level (1..30) to rank index (0..8) */ @@ -1170,7 +1170,7 @@ cond_menu(void) if (condtests[i].enabled != condtests[i].choice) { condtests[i].enabled = condtests[i].choice; condtests[idx].test = FALSE; - gc.context.botl = changed = TRUE; + display.botl = changed = TRUE; } } return changed; @@ -1368,9 +1368,9 @@ evaluate_and_notify_windowport( * fields that have changed since the previous update. * * In both of those situations, we need to force updates to - * all of the fields when gc.context.botlx is set. The tty port in + * all of the fields when display.botlx is set. The tty port in * particular has a problem if that isn't done, since the core sets - * gc.context.botlx when a menu or text display obliterates the status + * display.botlx when a menu or text display obliterates the status * line. * * For those situations, to trigger the full update of every field @@ -1382,15 +1382,15 @@ evaluate_and_notify_windowport( * the display, call status_update() with BL_FLUSH. * */ - if (gc.context.botlx && (windowprocs.wincap2 & WC2_RESET_STATUS) != 0L) + if (display.botlx && (windowprocs.wincap2 & WC2_RESET_STATUS) != 0L) status_update(BL_RESET, (genericptr_t) 0, 0, 0, NO_COLOR, (unsigned long *) 0); - else if ((updated || gc.context.botlx) + else if ((updated || display.botlx) && (windowprocs.wincap2 & WC2_FLUSH_STATUS) != 0L) status_update(BL_FLUSH, (genericptr_t) 0, 0, 0, NO_COLOR, (unsigned long *) 0); - gc.context.botl = gc.context.botlx = iflags.time_botl = FALSE; + display.botl = display.botlx = display.time_botl = FALSE; gu.update_all = FALSE; } @@ -1427,7 +1427,7 @@ status_initialize( status_enablefield(fld, fieldname, fieldfmt, fldenabl); } gu.update_all = TRUE; - gc.context.botlx = TRUE; + display.botlx = TRUE; } void @@ -1805,7 +1805,7 @@ exp_percent_changing(void) struct istat_s *curr; /* if status update is already requested, skip this processing */ - if (!gc.context.botl) { + if (!display.botl) { /* * Status update is warranted iff percent integer changes and the new * percentage results in a different highlighting rule being selected. @@ -1824,7 +1824,7 @@ exp_percent_changing(void) rule = get_hilite(gn.now_or_before_idx, BL_XP, (genericptr_t) &a, 0, pc, &color_dummy); if (rule != curr->hilite_rule) - return TRUE; /* caller should set 'gc.context.botl' to True */ + return TRUE; /* caller should set 'display.botl' to True */ #endif } } @@ -1994,9 +1994,9 @@ status_eval_next_unhilite(void) prev->time = curr->time; curr->chg = prev->chg = FALSE; - gc.context.botl = TRUE; + display.botl = TRUE; } - if (gc.context.botl) + if (display.botl) continue; /* just process other gb.blstats[][].time and .chg */ this_unhilite = curr->time; @@ -2005,7 +2005,7 @@ status_eval_next_unhilite(void) && hilite_reset_needed(curr, this_unhilite + 1L)) { next_unhilite = this_unhilite; if (next_unhilite < gb.bl_hilite_moves) - gc.context.botl = TRUE; + display.botl = TRUE; } } } @@ -2021,7 +2021,7 @@ reset_status_hilites(void) gb.blstats[0][i].time = gb.blstats[1][i].time = 0L; gu.update_all = TRUE; } - gc.context.botlx = TRUE; + display.botlx = TRUE; } /* test whether the text from a title rule matches the string for diff --git a/src/cmd.c b/src/cmd.c index a17a1eefa..a9ffe583c 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2122,7 +2122,7 @@ wiz_intrinsic(void) def_feedback: if (p != GLIB) incr_itimeout(&u.uprops[p].intrinsic, amt); - gc.context.botl = 1; /* have pline() do a status update */ + display.botl = 1; /* have pline() do a status update */ pline("Timeout for %s %s %d.", propname, oldtimeout ? "increased by" : "set to", amt); break; diff --git a/src/decl.c b/src/decl.c index eb4590a91..f7efbbf57 100644 --- a/src/decl.c +++ b/src/decl.c @@ -189,6 +189,7 @@ const struct Race urace_init_data = { { 1, 0, 2, 0, 2, 0 } /* Energy */ }; +struct display_hints display = { 0 }; const struct instance_globals_a g_init_a = { /* artifact.c */ @@ -1061,6 +1062,7 @@ decl_globals_init(void) ZERO(flags); ZERO(iflags); ZERO(a11y); + ZERO(display); ZERO(u); ZERO(ubirthday); ZERO(urealtime); diff --git a/src/dig.c b/src/dig.c index 01142910f..292c29aeb 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1096,7 +1096,7 @@ use_pick_axe2(struct obj *obj) You("hit yourself with %s.", yname(uwep)); Sprintf(buf, "%s own %s", uhis(), OBJ_NAME(objects[obj->otyp])); losehp(Maybe_Half_Phys(dam), buf, KILLED_BY); - gc.context.botl = 1; + display.botl = 1; return ECMD_TIME; } else if (u.dz == 0) { confdir(FALSE); diff --git a/src/display.c b/src/display.c index 08ffb95f3..b8903a2e0 100644 --- a/src/display.c +++ b/src/display.c @@ -1670,7 +1670,7 @@ docrt_flags(int refresh_flags) /* perm_invent */ update_inventory(); /* status */ - gc.context.botlx = 1; /* force a redraw of the bottom lines */ + display.botlx = 1; /* force a redraw of the bottom lines */ /* note: caller needs to call bot() to actually redraw status */ } gp.program_state.in_docrt = FALSE; @@ -2045,7 +2045,7 @@ cls(void) return; in_cls = TRUE; display_nhwindow(WIN_MESSAGE, FALSE); /* flush messages */ - gc.context.botlx = 1; /* force update of botl window */ + display.botlx = 1; /* force update of botl window */ clear_nhwindow(WIN_MAP); /* clear physical screen */ clear_glyph_buffer(); /* force gbuf[][].glyph to unexplored */ @@ -2084,9 +2084,9 @@ flush_screen(int cursor_on_u) #endif /* get this done now, before we place the cursor on the hero */ - if (gc.context.botl || gc.context.botlx) + if (display.botl || display.botlx) bot(); - else if (iflags.time_botl) + else if (display.time_botl) timebot(); for (y = 0; y < ROWNO; y++) { diff --git a/src/do.c b/src/do.c index 96adbe74a..185f47280 100644 --- a/src/do.c +++ b/src/do.c @@ -2377,7 +2377,7 @@ set_wounded_legs(long side, int timex) * You still call this function, but don't lose hp. * Caller is also responsible for adjusting messages. */ - gc.context.botl = 1; + display.botl = 1; if (!Wounded_legs) ATEMP(A_DEX)--; @@ -2397,7 +2397,7 @@ heal_legs( int how) /* 0: ordinary, 1: dismounting steed, 2: limbs turn to stone */ { if (Wounded_legs) { - gc.context.botl = 1; + display.botl = 1; if (ATEMP(A_DEX) < 0) ATEMP(A_DEX)++; diff --git a/src/do_wear.c b/src/do_wear.c index d9ad3a41e..425e539c9 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -213,7 +213,7 @@ Boots_on(void) * so uarmf could be Null below; status line * gets updated during brief interval they're * worn so hero and player learn enchantment */ - gc.context.botl = 1; /* status hilites might mark AC changed */ + display.botl = 1; /* status hilites might mark AC changed */ makeknown(uarmf->otyp); float_up(); if (Levitation) @@ -428,7 +428,7 @@ Helmet_on(void) but it takes trained arrogance to pull it off, and the actual enchantment of the hat is irrelevant */ ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1); - gc.context.botl = 1; + display.botl = 1; makeknown(uarmh->otyp); break; case HELM_OF_OPPOSITE_ALIGNMENT: @@ -460,7 +460,7 @@ Helmet_on(void) else if (uarmh->bknown) update_inventory(); /* keep bknown as-is; display the curse */ } - gc.context.botl = 1; /* reveal new alignment or INT & WIS */ + display.botl = 1; /* reveal new alignment or INT & WIS */ if (Hallucination) { pline("My brain hurts!"); /* Monty Python's Flying Circus */ } else if (uarmh && uarmh->otyp == DUNCE_CAP) { @@ -499,12 +499,12 @@ Helmet_off(void) case ORCISH_HELM: break; case DUNCE_CAP: - gc.context.botl = 1; + display.botl = 1; break; case CORNUTHAUM: if (!gc.context.takeoff.cancelled_don) { ABON(A_CHA) += (Role_if(PM_WIZARD) ? -1 : 1); - gc.context.botl = 1; + display.botl = 1; } break; case HELM_OF_TELEPATHY: @@ -555,7 +555,7 @@ Gloves_on(void) break; case GAUNTLETS_OF_POWER: makeknown(uarmg->otyp); - gc.context.botl = 1; /* taken care of in attrib.c */ + display.botl = 1; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: adj_abon(uarmg, uarmg->spe); @@ -629,7 +629,7 @@ Gloves_off(void) break; case GAUNTLETS_OF_POWER: makeknown(uarmg->otyp); - gc.context.botl = 1; /* taken care of in attrib.c */ + display.botl = 1; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: if (!gc.context.takeoff.cancelled_don) @@ -664,7 +664,7 @@ Gloves_off(void) wielding_corpse(uswapwep, gloves, on_purpose); if (condtests[bl_bareh].enabled) - gc.context.botl = 1; + display.botl = 1; return 0; } @@ -959,7 +959,7 @@ Amulet_on(void) makeknown(AMULET_OF_CHANGE); You("are suddenly very %s!", flags.female ? "feminine" : "masculine"); - gc.context.botl = 1; + display.botl = 1; newsym(u.ux, u.uy); /* glyphmon flag and tile may have gone * from male to female or vice versa */ } else { @@ -978,7 +978,7 @@ Amulet_on(void) if (can_be_strangled(&gy.youmonst)) { makeknown(AMULET_OF_STRANGULATION); Strangled = 6L; - gc.context.botl = TRUE; + display.botl = TRUE; pline("It constricts your throat!"); } break; @@ -1005,7 +1005,7 @@ Amulet_on(void) if (!already_flying) { makeknown(AMULET_OF_FLYING); - gc.context.botl = TRUE; /* status: 'Fly' On */ + display.botl = TRUE; /* status: 'Fly' On */ You("are now in flight."); } } @@ -1053,7 +1053,7 @@ Amulet_off(void) case AMULET_OF_STRANGULATION: if (Strangled) { Strangled = 0L; - gc.context.botl = TRUE; + display.botl = TRUE; if (Breathless) Your("%s is no longer constricted!", body_part(NECK)); else @@ -1074,7 +1074,7 @@ Amulet_off(void) float_vs_flight(); /* probably not needed here */ if (was_flying && !Flying) { makeknown(AMULET_OF_FLYING); - gc.context.botl = TRUE; /* status: 'Fly' Off */ + display.botl = TRUE; /* status: 'Fly' Off */ You("%s.", (is_pool_or_lava(u.ux, u.uy) || Is_waterlevel(&u.uz) || Is_airlevel(&u.uz)) ? "stop flying" @@ -1140,7 +1140,7 @@ adjust_attrib(struct obj *obj, int which, int val) already discovered, both handled by learnring()] */ if (observable || !extremeattr(which)) learnring(obj, observable); - gc.context.botl = 1; + display.botl = 1; } void @@ -2118,7 +2118,7 @@ accessory_or_armor_on(struct obj *obj) You("are suddenly overcome with shame and change your mind."); u.ublessed = 0; /* lose your god's protection */ makeknown(obj->otyp); - gc.context.botl = 1; /* for AC after zeroing u.ublessed */ + display.botl = 1; /* for AC after zeroing u.ublessed */ return ECMD_TIME; } } else { @@ -2391,7 +2391,7 @@ find_ac(void) if (uac != u.uac) { u.uac = uac; - gc.context.botl = 1; + display.botl = 1; #if 0 /* these could conceivably be achieved out of order (by being near threshold and putting on +N dragon scale mail from bones, for @@ -3120,7 +3120,7 @@ adj_abon(register struct obj *otmp, register schar delta) makeknown(uarmg->otyp); ABON(A_DEX) += (delta); } - gc.context.botl = 1; + display.botl = 1; } if (uarmh && uarmh == otmp && otmp->otyp == HELM_OF_BRILLIANCE) { if (delta) { @@ -3128,7 +3128,7 @@ adj_abon(register struct obj *otmp, register schar delta) ABON(A_INT) += (delta); ABON(A_WIS) += (delta); } - gc.context.botl = 1; + display.botl = 1; } } diff --git a/src/eat.c b/src/eat.c index b9b686961..e49324fb6 100644 --- a/src/eat.c +++ b/src/eat.c @@ -124,7 +124,7 @@ is_edible(register struct obj *obj) void init_uhunger(void) { - gc.context.botl = (u.uhs != NOT_HUNGRY || ATEMP(A_STR) < 0); + display.botl = (u.uhs != NOT_HUNGRY || ATEMP(A_STR) < 0); u.uhunger = 900; u.uhs = NOT_HUNGRY; if (ATEMP(A_STR) < 0) { @@ -654,7 +654,7 @@ eat_brains( ABASE(A_INT) += rnd(4); if (ABASE(A_INT) > AMAX(A_INT)) ABASE(A_INT) = AMAX(A_INT); - gc.context.botl = 1; + display.botl = 1; } exercise(A_WIS, TRUE); *dmg_p += xtra_dmg; @@ -1085,7 +1085,7 @@ eye_of_newt_buzz(void) } if (old_uen != u.uen) { You_feel("a mild buzz."); - gc.context.botl = 1; + display.botl = 1; } } } @@ -1124,7 +1124,7 @@ cpostfx(int pm) else u.uhp = u.uhpmax; make_blinded(0L, !u.ucreamed); - gc.context.botl = 1; + display.botl = 1; check_intrinsics = TRUE; /* might also convey poison resistance */ break; case PM_STALKER: @@ -1708,7 +1708,7 @@ Hear_again(void) /* Chance of deafness going away while fainted/sleeping/etc. */ if (!rn2(2)) { make_deaf(0L, FALSE); - gc.context.botl = TRUE; + display.botl = TRUE; } return 0; } @@ -1744,7 +1744,7 @@ rottenfood(struct obj *obj) where = (u.usteed) ? "saddle" : surface(u.ux, u.uy); pline_The("world spins and %s %s.", what, where); incr_itimeout(&HDeaf, duration); - gc.context.botl = TRUE; + display.botl = TRUE; nomul(-duration); gm.multi_reason = "unconscious from rotten food"; gn.nomovemsg = "You are conscious again."; @@ -2240,7 +2240,7 @@ eataccessory(struct obj *otmp) (typ == RIN_PROTECTION) ? otmp->spe : 2, /* fixed amount for amulet */ typ); - gc.context.botl = 1; + display.botl = 1; break; case RIN_FREE_ACTION: /* Give sleep resistance instead */ @@ -2256,7 +2256,7 @@ eataccessory(struct obj *otmp) change_sex(); You("are suddenly very %s!", flags.female ? "feminine" : "masculine"); - gc.context.botl = 1; + display.botl = 1; break; case AMULET_OF_UNCHANGING: /* un-change: it's a pun */ @@ -2418,7 +2418,7 @@ fpostfx(struct obj *otmp) /* This stuff seems to be VERY healthy! */ gainstr(otmp, 1, TRUE); if (Upolyd) { - u.mh += otmp->cursed ? -rnd(20) : rnd(20), gc.context.botl = TRUE; + u.mh += otmp->cursed ? -rnd(20) : rnd(20), display.botl = TRUE; if (u.mh > u.mhmax) { if (!rn2(17)) u.mhmax++; @@ -2427,7 +2427,7 @@ fpostfx(struct obj *otmp) rehumanize(); } } else { - u.uhp += otmp->cursed ? -rnd(20) : rnd(20), gc.context.botl = TRUE; + u.uhp += otmp->cursed ? -rnd(20) : rnd(20), display.botl = TRUE; if (u.uhp > u.uhpmax) { if (!rn2(17)) setuhpmax(u.uhpmax + 1); @@ -3204,7 +3204,7 @@ unfaint(void) if (u.uhs > FAINTING) u.uhs = FAINTING; stop_occupation(); - gc.context.botl = 1; + display.botl = 1; return 0; } @@ -3286,7 +3286,7 @@ newuhs(boolean incr) stop_occupation(); You("faint from lack of food."); incr_itimeout(&HDeaf, duration); - gc.context.botl = TRUE; + display.botl = TRUE; nomul(-duration); gm.multi_reason = "fainted from lack of food"; gn.nomovemsg = "You regain consciousness."; @@ -3301,7 +3301,7 @@ newuhs(boolean incr) now uhunger becomes more negative at a slower rate */ } else if (u.uhunger < -(100 + 10 * (int) ACURR(A_CON))) { u.uhs = STARVED; - gc.context.botl = 1; + display.botl = 1; bot(); You("die from starvation."); gk.killer.format = KILLED_BY; @@ -3365,7 +3365,7 @@ newuhs(boolean incr) break; } u.uhs = newhs; - gc.context.botl = 1; + display.botl = 1; bot(); if ((Upolyd ? u.mh : u.uhp) < 1) { You("die from hunger and exhaustion."); diff --git a/src/end.c b/src/end.c index 5a53f0202..edc45ef7e 100644 --- a/src/end.c +++ b/src/end.c @@ -1206,7 +1206,7 @@ savelife(int how) if (u.utrap && u.utraptype == TT_LAVA) reset_utrap(FALSE); - gc.context.botl = TRUE; + display.botl = TRUE; u.ugrave_arise = NON_PM; HUnchanging = 0L; curs_on_u(); @@ -1501,10 +1501,10 @@ done(int how) || (how == QUIT && done_stopprint)) { /* skip status update if panicking or disconnected or answer of 'q' to "Really quit?" */ - gc.context.botl = gc.context.botlx = iflags.time_botl = FALSE; + display.botl = display.botlx = display.time_botl = FALSE; } else { /* otherwise force full status update */ - gc.context.botlx = TRUE; + display.botlx = TRUE; bot(); } @@ -1537,7 +1537,7 @@ done(int how) negative (-1 is used as a flag in some circumstances which don't apply when actually dying due to HP loss) */ u.uhp = u.mh = 0; - gc.context.botl = 1; + display.botl = 1; } } if (Lifesaved && (how <= GENOCIDED)) { diff --git a/src/exper.c b/src/exper.c index 597683f5b..cc1a1fb5c 100644 --- a/src/exper.c +++ b/src/exper.c @@ -183,19 +183,19 @@ more_experienced(register int exper, register int rexp) if (newexp != oldexp) { u.uexp = newexp; if (flags.showexp) - gc.context.botl = TRUE; + display.botl = TRUE; /* even when experience points aren't being shown, experience level might be highlighted with a percentage highlight rule and that percentage depends upon experience points */ - if (!gc.context.botl && exp_percent_changing()) - gc.context.botl = TRUE; + if (!display.botl && exp_percent_changing()) + display.botl = TRUE; } /* newrexp will always differ from oldrexp unless they're LONG_MAX */ if (newrexp != oldrexp) { u.urexp = newrexp; #ifdef SCORE_ON_BOTL if (flags.showscore) - gc.context.botl = TRUE; + display.botl = TRUE; #endif } if (u.urexp >= (Role_if(PM_WIZARD) ? 1000 : 2000)) @@ -283,7 +283,7 @@ losexp( rehumanize(); } - gc.context.botl = TRUE; + display.botl = TRUE; } /* @@ -362,7 +362,7 @@ pluslvl( if (u.ulevel > u.ulevelpeak) u.ulevelpeak = u.ulevel; } - gc.context.botl = TRUE; + display.botl = TRUE; } /* compute a random amount of experience points suitable for the hero's diff --git a/src/explode.c b/src/explode.c index f6922676e..cc57833f4 100644 --- a/src/explode.c +++ b/src/explode.c @@ -630,7 +630,7 @@ explode( u.mh -= damu; else u.uhp -= damu; - gc.context.botl = 1; + display.botl = 1; } /* You resisted the damage, lets not keep that to ourselves */ diff --git a/src/fountain.c b/src/fountain.c index ac301c98d..58501289c 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -259,7 +259,7 @@ drinkfountain(void) for (ii = 0; ii < A_MAX; ii++) if (ABASE(ii) < AMAX(ii)) { ABASE(ii) = AMAX(ii); - gc.context.botl = 1; + display.botl = 1; } /* gain ability, blessed if "natural" luck is high */ i = rn2(A_MAX); /* start at a random attribute */ diff --git a/src/hack.c b/src/hack.c index 74a66d756..9f00d29af 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2528,7 +2528,7 @@ domove_core(void) boolean moved = trapmove(x, y, trap); if (!u.utrap) { - gc.context.botl = TRUE; + display.botl = TRUE; reset_utrap(TRUE); /* might resume levitation or flight */ } /* might not have escaped, or did escape but remain in same spot */ @@ -2693,7 +2693,7 @@ runmode_delay_output(void) display after every step */ if (flags.runmode != RUN_LEAP || !(gm.moves % 7L)) { /* moveloop() suppresses time_botl when running */ - iflags.time_botl = flags.time; + display.time_botl = flags.time; curs_on_u(); nh_delay_output(); if (flags.runmode == RUN_CRAWL) { @@ -2728,7 +2728,7 @@ overexert_hp(void) if (*hp > 1) { *hp -= 1; - gc.context.botl = TRUE; + display.botl = TRUE; } else { You("pass out from exertion!"); exercise(A_CON, FALSE); @@ -2813,7 +2813,7 @@ switch_terrain(void) You("start flying."); } if ((!!Levitation ^ was_levitating) || (!!Flying ^ was_flying)) - gc.context.botl = TRUE; /* update Lev/Fly status condition */ + display.botl = TRUE; /* update Lev/Fly status condition */ } /* set or clear u.uinwater */ @@ -3724,7 +3724,7 @@ end_running(boolean and_travel) /* moveloop() suppresses time_botl when context.run is non-zero; when running stops, update 'time' even if other botl status is unchanged */ if (flags.time && gc.context.run) - iflags.time_botl = TRUE; + display.time_botl = TRUE; gc.context.run = 0; /* 'context.mv' isn't travel but callers who want to end travel all clear it too */ @@ -3744,7 +3744,7 @@ nomul(int nval) { if (gm.multi < nval) return; /* This is a bug fix by ab@unido */ - gc.context.botl |= (gm.multi >= 0); + display.botl |= (gm.multi >= 0); u.uinvulnerable = FALSE; /* Kludge to avoid ctrl-C bug -dlc */ u.usleep = 0; gm.multi = nval; @@ -3758,7 +3758,7 @@ nomul(int nval) void unmul(const char *msg_override) { - gc.context.botl = TRUE; + display.botl = TRUE; gm.multi = 0; /* caller will usually have done this already */ if (msg_override) gn.nomovemsg = msg_override; @@ -3852,7 +3852,7 @@ losehp(int n, const char *knam, schar k_format) return; } #endif - gc.context.botl = TRUE; /* u.uhp or u.mh is changing */ + display.botl = TRUE; /* u.uhp or u.mh is changing */ end_running(TRUE); if (Upolyd) { u.mh -= n; diff --git a/src/invent.c b/src/invent.c index 0b2cc72e9..91ef8623f 100644 --- a/src/invent.c +++ b/src/invent.c @@ -970,7 +970,7 @@ void addinv_core1(struct obj *obj) { if (obj->oclass == COIN_CLASS) { - gc.context.botl = 1; + display.botl = 1; } else if (obj->otyp == AMULET_OF_YENDOR) { if (u.uhave.amulet) impossible("already have amulet?"); @@ -1330,7 +1330,7 @@ void freeinv_core(struct obj *obj) { if (obj->oclass == COIN_CLASS) { - gc.context.botl = 1; + display.botl = 1; return; } else if (obj->otyp == AMULET_OF_YENDOR) { if (!u.uhave.amulet) @@ -1361,7 +1361,7 @@ freeinv_core(struct obj *obj) curse(obj); } else if (confers_luck(obj)) { set_moreluck(); - gc.context.botl = 1; + display.botl = 1; } else if (obj->otyp == FIGURINE && obj->timed) { (void) stop_timer(FIG_TRANSFORM, obj_to_any(obj)); } @@ -1992,7 +1992,7 @@ getobj( continue; } } - gc.context.botl = 1; /* May have changed the amount of money */ + display.botl = 1; /* May have changed the amount of money */ if (otmp && !gi.in_doagain) { if (cntgiven && cnt > 0) cmdq_add_int(CQ_REPEAT, cnt); diff --git a/src/mhitu.c b/src/mhitu.c index 22d58e7d8..da453c12b 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -261,7 +261,7 @@ expels( struct permonst *mdat, /* if mtmp is polymorphed, mdat != mtmp->data */ boolean message) { - gc.context.botl = 1; + display.botl = 1; if (message) { if (digests(mdat)) { You("get regurgitated!"); @@ -858,7 +858,7 @@ mattacku(register struct monst *mtmp) default: /* no attack */ break; } - if (gc.context.botl) + if (display.botl) bot(); /* give player a chance of waking up before dying -kaa */ if (sum[i] == M_ATTK_HIT) { /* successful attack */ @@ -1173,7 +1173,7 @@ hitmu(register struct monst *mtmp, register struct attack *mattk) *hpmax_p = lowerlimit; /* else unlikely... * already at or below minimum threshold; do nothing */ - gc.context.botl = 1; + display.botl = 1; } mdamageu(mtmp, mhm.damage); @@ -1811,7 +1811,7 @@ gazemu(struct monst *mtmp, struct attack *mattk) void mdamageu(struct monst *mtmp, int n) { - gc.context.botl = 1; + display.botl = 1; if (Upolyd) { u.mh -= n; if (u.mh < 1) @@ -2089,13 +2089,13 @@ doseduce(struct monst *mon) You("are down in the dumps."); (void) adjattrib(A_CON, -1, TRUE); exercise(A_CON, FALSE); - gc.context.botl = 1; + display.botl = 1; break; case 2: Your("senses are dulled."); (void) adjattrib(A_WIS, -1, TRUE); exercise(A_WIS, FALSE); - gc.context.botl = 1; + display.botl = 1; break; case 3: if (!resists_drli(&gy.youmonst)) { @@ -2133,13 +2133,13 @@ doseduce(struct monst *mon) You_feel("good enough to do it again."); (void) adjattrib(A_CON, 1, TRUE); exercise(A_CON, TRUE); - gc.context.botl = 1; + display.botl = 1; break; case 2: You("will always remember %s...", noit_mon_nam(mon)); (void) adjattrib(A_WIS, 1, TRUE); exercise(A_WIS, TRUE); - gc.context.botl = 1; + display.botl = 1; break; case 3: pline("That was a very educational experience."); @@ -2152,7 +2152,7 @@ doseduce(struct monst *mon) if (Upolyd) u.mh = u.mhmax; exercise(A_STR, TRUE); - gc.context.botl = 1; + display.botl = 1; break; } } @@ -2186,7 +2186,7 @@ doseduce(struct monst *mon) pline("%s takes %ld %s for services rendered!", noit_Monnam(mon), cost, currency(cost)); money2mon(mon, cost); - gc.context.botl = 1; + display.botl = 1; } } if (!rn2(25)) @@ -2458,7 +2458,7 @@ cloneu(void) mon->mhpmax = u.mhmax; mon->mhp = u.mh / 2; u.mh -= mon->mhp; - gc.context.botl = 1; + display.botl = 1; return mon; } diff --git a/src/minion.c b/src/minion.c index 85494a110..8890755b6 100644 --- a/src/minion.c +++ b/src/minion.c @@ -377,7 +377,7 @@ bribe(struct monst *mtmp) You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer)); } (void) money2mon(mtmp, offer); - gc.context.botl = 1; + display.botl = 1; return offer; } diff --git a/src/mon.c b/src/mon.c index 04326b396..cc36ec30d 100644 --- a/src/mon.c +++ b/src/mon.c @@ -3126,7 +3126,7 @@ set_ustuck(struct monst *mtmp) mon_nam(mtmp), mdistu(mtmp)); } - gc.context.botl = 1; + display.botl = 1; u.ustuck = mtmp; if (!u.ustuck) { u.uswallow = 0; diff --git a/src/music.c b/src/music.c index 8588e9441..b244e887f 100644 --- a/src/music.c +++ b/src/music.c @@ -706,7 +706,7 @@ do_improvisation(struct obj* instr) Hero_playnotes(obj_to_instr(&itmp), improvisation, 50); } awaken_monsters(u.ulevel * (mundane ? 5 : 40)); - gc.context.botl = TRUE; + display.botl = TRUE; break; default: impossible("What a weird instrument (%d)!", instr->otyp); diff --git a/src/objnam.c b/src/objnam.c index 683c9963b..228704b0c 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -4262,7 +4262,7 @@ readobjnam_postparse1(struct _readobjnam_data *d) d->otmp = mksobj(GOLD_PIECE, FALSE, FALSE); d->otmp->quan = (long) d->cnt; d->otmp->owt = weight(d->otmp); - gc.context.botl = 1; + display.botl = 1; return 3; /*return otmp;*/ } diff --git a/src/options.c b/src/options.c index 268fc6957..ebba619c1 100644 --- a/src/options.c +++ b/src/options.c @@ -5013,7 +5013,7 @@ optfn_boolean( case opt_showexp: if (VIA_WINDOWPORT()) status_initialize(REASSESS_ONLY); - gc.context.botl = TRUE; + display.botl = TRUE; break; case opt_fixinv: case opt_sortpack: @@ -5069,7 +5069,7 @@ optfn_boolean( } else if (WINDOWPORT(Qt)) { /* Qt doesn't support HILITE_STATUS or FLUSH_STATUS so fails VIA_WINDOWPORT(), but it does support WC2_HITPOINTBAR */ - gc.context.botlx = TRUE; + display.botlx = TRUE; #endif } break; @@ -8715,7 +8715,7 @@ doset_simple(void) /* * I don't think the status window requires updating between * simplemenu iterations. - if (gc.context.botl || gc.context.botlx) { + if (display.botl || display.botlx) { bot(); } */ @@ -8970,7 +8970,7 @@ doset(void) /* changing options via menu by Per Liboriussen */ if (go.opt_need_promptstyle) { adjust_menu_promptstyle(WIN_INVEN, &iflags.menu_headings); } - if (gc.context.botl || gc.context.botlx) { + if (display.botl || display.botlx) { bot(); } return ECMD_OK; diff --git a/src/pickup.c b/src/pickup.c index 4179758dd..700360502 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1841,7 +1841,7 @@ pickup_object( /* Whats left of the special case for gold :-) */ if (obj->oclass == COIN_CLASS) - gc.context.botl = 1; + display.botl = 1; if (obj->quan != count && obj->otyp != LOADSTONE) obj = splitobj(obj, count); @@ -1960,7 +1960,7 @@ encumber_msg(void) newcap == 4 ? "can barely" : "can't even"); break; } - gc.context.botl = 1; + display.botl = 1; } else if (go.oldcap > newcap) { switch (newcap) { case 0: @@ -1977,7 +1977,7 @@ encumber_msg(void) stagger(gy.youmonst.data, "stagger")); break; } - gc.context.botl = 1; + display.botl = 1; } go.oldcap = newcap; diff --git a/src/polyself.c b/src/polyself.c index c5f7b077a..87fd7026a 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -143,7 +143,7 @@ float_vs_flight(void) might cause a change in stealth */ steed_vs_stealth(); - gc.context.botl = TRUE; + display.botl = TRUE; } /* riding blocks stealth unless hero+steed fly */ @@ -169,7 +169,7 @@ check_strangling(boolean on) if (uamul && uamul->otyp == AMULET_OF_STRANGULATION && can_be_strangled(&gy.youmonst)) { Strangled = 6L; - gc.context.botl = TRUE; + display.botl = TRUE; Your("%s %s your %s!", simpleonames(uamul), was_strangled ? "still constricts" : "begins constricting", body_part(NECK)); /* "throat" */ @@ -180,7 +180,7 @@ check_strangling(boolean on) } else { if (Strangled && !can_be_strangled(&gy.youmonst)) { Strangled = 0L; - gc.context.botl = TRUE; + display.botl = TRUE; You("are no longer being strangled."); } } @@ -445,7 +445,7 @@ newman(void) make_slimed(10L, (const char *) 0); } - gc.context.botl = 1; + display.botl = 1; see_monsters(); (void) encumber_msg(); @@ -640,7 +640,7 @@ polyself(int psflags) of evaporation due to over enchanting */ uarm->otyp += GRAY_DRAGON_SCALES - GRAY_DRAGON_SCALE_MAIL; uarm->dknown = 1; - gc.context.botl = 1; /* AC is changing */ + display.botl = 1; /* AC is changing */ } uskin = uarm; uarm = (struct obj *) 0; @@ -1002,7 +1002,7 @@ polymon(int mntmp) } check_strangling(TRUE); /* maybe start strangling */ - gc.context.botl = 1; + display.botl = 1; gv.vision_full_recalc = 1; see_monsters(); (void) encumber_msg(); @@ -1380,7 +1380,7 @@ rehumanize(void) } nomul(0); - gc.context.botl = 1; + display.botl = 1; gv.vision_full_recalc = 1; (void) encumber_msg(); if (was_flying && !Flying && u.usteed) @@ -1405,7 +1405,7 @@ dobreathe(void) return ECMD_OK; } u.uen -= 15; - gc.context.botl = 1; + display.botl = 1; if (!getdir((char *) 0)) return ECMD_CANCEL; @@ -1602,7 +1602,7 @@ dosummon(void) return ECMD_OK; } u.uen -= 10; - gc.context.botl = 1; + display.botl = 1; You("call upon your brethren for help!"); exercise(A_WIS, TRUE); @@ -1643,7 +1643,7 @@ dogaze(void) return ECMD_OK; } u.uen -= 15; - gc.context.botl = 1; + display.botl = 1; for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) @@ -1878,7 +1878,7 @@ domindblast(void) return ECMD_OK; } u.uen -= 10; - gc.context.botl = 1; + display.botl = 1; You("concentrate."); pline("A wave of psychic energy pours out."); @@ -2158,7 +2158,7 @@ ugolemeffects(int damtype, int dam) u.mh += heal; if (u.mh > u.mhmax) u.mh = u.mhmax; - gc.context.botl = 1; + display.botl = 1; pline("Strangely, you feel better than before."); exercise(A_STR, TRUE); } diff --git a/src/potion.c b/src/potion.c index d99474f5b..a467db318 100644 --- a/src/potion.c +++ b/src/potion.c @@ -96,7 +96,7 @@ make_confused(long xtime, boolean talk) You_feel("less %s now.", Hallucination ? "trippy" : "confused"); } if ((xtime && !old) || (!xtime && old)) - gc.context.botl = TRUE; + display.botl = TRUE; set_itimeout(&HConfusion, xtime); } @@ -123,7 +123,7 @@ make_stunned(long xtime, boolean talk) } } if ((!xtime && old) || (xtime && !old)) - gc.context.botl = TRUE; + display.botl = TRUE; set_itimeout(&HStun, xtime); } @@ -157,7 +157,7 @@ make_sick(long xtime, } set_itimeout(&Sick, xtime); u.usick_type |= type; - gc.context.botl = TRUE; + display.botl = TRUE; } else if (old && (type & u.usick_type)) { /* was sick, now not */ u.usick_type &= ~type; @@ -170,7 +170,7 @@ make_sick(long xtime, You_feel("cured. What a relief!"); Sick = 0L; /* set_itimeout(&Sick, 0L) */ } - gc.context.botl = TRUE; + display.botl = TRUE; } kptr = find_delayed_killer(SICK); @@ -200,7 +200,7 @@ make_slimed(long xtime, const char *msg) #endif set_itimeout(&Slimed, xtime); if ((xtime != 0L) ^ (old != 0L)) { - gc.context.botl = TRUE; + display.botl = TRUE; if (msg) pline("%s", msg); } @@ -227,7 +227,7 @@ make_stoned(long xtime, const char *msg, int killedby, const char *killername) #endif set_itimeout(&Stoned, xtime); if ((xtime != 0L) ^ (old != 0L)) { - gc.context.botl = TRUE; + display.botl = TRUE; if (msg) pline("%s", msg); } @@ -246,7 +246,7 @@ make_vomiting(long xtime, boolean talk) talk = FALSE; set_itimeout(&Vomiting, xtime); - gc.context.botl = TRUE; + display.botl = TRUE; if (!xtime && old) if (talk) You_feel("much less nauseated now."); @@ -336,7 +336,7 @@ toggle_blindness(void) boolean Stinging = (uwep && (EWarn_of_mon & W_WEP) != 0L); /* blindness has just been toggled */ - gc.context.botl = TRUE; /* status conditions need update */ + display.botl = TRUE; /* status conditions need update */ gv.vision_full_recalc = 1; /* vision has changed */ /* this vision recalculation used to be deferred until moveloop(), but that made it possible for vision irregularities to occur @@ -428,7 +428,7 @@ make_hallucinated( (eg. Qt windowport's equipped items display) */ update_inventory(); - gc.context.botl = TRUE; + display.botl = TRUE; if (talk) pline(message, verb); } @@ -447,7 +447,7 @@ make_deaf(long xtime, boolean talk) set_itimeout(&HDeaf, xtime); if ((xtime != 0L) ^ (old != 0L)) { - gc.context.botl = TRUE; + display.botl = TRUE; if (talk) You(old && !Deaf ? "can hear again." : "are unable to hear anything."); @@ -458,7 +458,7 @@ make_deaf(long xtime, boolean talk) void make_glib(int xtime) { - gc.context.botl |= (!Glib ^ !!xtime); + display.botl |= (!Glib ^ !!xtime); set_itimeout(&Glib, xtime); /* may change "(being worn)" to "(being worn; slippery)" or vice versa */ if (uarmg) @@ -655,7 +655,7 @@ peffect_restore_ability(struct obj *otmp) WEAK or worse, but that's handled via ATEMP(A_STR) now */ if (ABASE(i) < lim) { ABASE(i) = lim; - gc.context.botl = 1; + display.botl = 1; /* only first found if not blessed */ if (!otmp->blessed) break; @@ -1232,7 +1232,7 @@ peffect_gain_energy(struct obj *otmp) u.uen = u.uenmax; else if (u.uen <= 0) u.uen = 0; - gc.context.botl = 1; + display.botl = 1; exercise(A_WIS, TRUE); } @@ -1433,7 +1433,7 @@ healup(int nhp, int nxtra, boolean curesick, boolean cureblind) make_vomiting(0L, TRUE); make_sick(0L, (char *) 0, TRUE, SICK_ALL); } - gc.context.botl = 1; + display.botl = 1; return; } @@ -1936,7 +1936,7 @@ potionbreathe(struct obj *obj) ABASE(i)++; /* only first found if not blessed */ isdone = !(obj->blessed); - gc.context.botl = 1; + display.botl = 1; } if (++i >= A_MAX) i = 0; @@ -1945,24 +1945,24 @@ potionbreathe(struct obj *obj) break; case POT_FULL_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, gc.context.botl = 1; + u.mh++, display.botl = 1; if (u.uhp < u.uhpmax) - u.uhp++, gc.context.botl = 1; + u.uhp++, display.botl = 1; cureblind = TRUE; /*FALLTHRU*/ case POT_EXTRA_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, gc.context.botl = 1; + u.mh++, display.botl = 1; if (u.uhp < u.uhpmax) - u.uhp++, gc.context.botl = 1; + u.uhp++, display.botl = 1; if (!obj->cursed) cureblind = TRUE; /*FALLTHRU*/ case POT_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, gc.context.botl = 1; + u.mh++, display.botl = 1; if (u.uhp < u.uhpmax) - u.uhp++, gc.context.botl = 1; + u.uhp++, display.botl = 1; if (obj->blessed) cureblind = TRUE; if (cureblind) { @@ -1984,7 +1984,7 @@ potionbreathe(struct obj *obj) else u.uhp -= 5; } - gc.context.botl = 1; + display.botl = 1; exercise(A_CON, FALSE); } break; @@ -2831,7 +2831,7 @@ split_mon( if (mtmp2) { mtmp2->mhpmax = u.mhmax / 2; u.mhmax -= mtmp2->mhpmax; - gc.context.botl = 1; + display.botl = 1; You("multiply%s!", reason); } } else { diff --git a/src/pray.c b/src/pray.c index 9c1fe70ea..9d040e724 100644 --- a/src/pray.c +++ b/src/pray.c @@ -382,7 +382,7 @@ fix_worst_trouble(int trouble) } You("can breathe again."); Strangled = 0; - gc.context.botl = 1; + display.botl = 1; break; case TROUBLE_LAVA: /* teleport should always succeed, but if not, just untrap them */ @@ -397,7 +397,7 @@ fix_worst_trouble(int trouble) case TROUBLE_HUNGRY: Your("%s feels content.", body_part(STOMACH)); init_uhunger(); - gc.context.botl = 1; + display.botl = 1; break; case TROUBLE_SICK: You_feel("better."); @@ -425,14 +425,14 @@ fix_worst_trouble(int trouble) if (u.uhpmax > u.uhppeak) u.uhppeak = u.uhpmax; u.uhp = u.uhpmax; - gc.context.botl = 1; + display.botl = 1; break; case TROUBLE_COLLAPSING: /* override Fixed_abil; uncurse that if feasible */ You_feel("%sstronger.", (AMAX(A_STR) - ABASE(A_STR) > 6) ? "much " : ""); ABASE(A_STR) = AMAX(A_STR); - gc.context.botl = 1; + display.botl = 1; if (Fixed_abil) { if ((otmp = stuck_ring(uleft, RIN_SUSTAIN_ABILITY)) != 0) { if (otmp == uleft) @@ -536,7 +536,7 @@ fix_worst_trouble(int trouble) for (i = 0; i < A_MAX; i++) { if (ABASE(i) < AMAX(i)) { ABASE(i) = AMAX(i); - gc.context.botl = 1; + display.botl = 1; } } (void) encumber_msg(); @@ -1241,7 +1241,7 @@ pleased(aligntyp g_align) u.mh = u.mhmax; if (ABASE(A_STR) < AMAX(A_STR)) { ABASE(A_STR) = AMAX(A_STR); - gc.context.botl = 1; /* before potential message */ + display.botl = 1; /* before potential message */ (void) encumber_msg(); } if (u.uhunger < 900) @@ -1256,7 +1256,7 @@ pleased(aligntyp g_align) rather than issuing a pat-on-head */ u.ucreamed = 0; make_blinded(0L, TRUE); - gc.context.botl = 1; + display.botl = 1; break; case 4: { register struct obj *otmp; diff --git a/src/read.c b/src/read.c index 4fa79f6d1..6222c1b4e 100644 --- a/src/read.c +++ b/src/read.c @@ -1693,7 +1693,7 @@ seffect_charging(struct obj **sobjp) else u.uen = u.uenmax; /* otherwise restore current to max */ } - gc.context.botl = 1; + display.botl = 1; return; } /* known = TRUE; -- handled inline here */ diff --git a/src/rumors.c b/src/rumors.c index b7f6684f3..a5b2e5516 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -733,7 +733,7 @@ doconsult(struct monst *oracl) break; } money2mon(oracl, (long) u_pay); - gc.context.botl = 1; + display.botl = 1; if (!u.uevent.major_oracle && !u.uevent.minor_oracle) record_achievement(ACH_ORCL); add_xpts = 0; /* first oracle of each type gives experience points */ diff --git a/src/shk.c b/src/shk.c index 81668c4fd..6519a08dd 100644 --- a/src/shk.c +++ b/src/shk.c @@ -124,7 +124,7 @@ money2mon(struct monst* mon, long amount) remove_worn_item(ygold, FALSE); /* quiver */ freeinv(ygold); add_to_minv(mon, ygold); - gc.context.botl = 1; + display.botl = 1; return amount; } @@ -158,7 +158,7 @@ money2u(struct monst* mon, long amount) dropy(mongold); } else { addinv(mongold); - gc.context.botl = 1; + display.botl = 1; } } @@ -1179,7 +1179,7 @@ pay(long tmp, register struct monst* shkp) money2mon(shkp, balance); else if (balance < 0) money2u(shkp, -balance); - gc.context.botl = 1; + display.botl = 1; if (robbed) { robbed -= tmp; if (robbed < 0) @@ -1674,7 +1674,7 @@ dopay(void) eshkp->debit = 0L; eshkp->loan = 0L; You("pay that debt."); - gc.context.botl = 1; + display.botl = 1; } else { dtmp -= eshkp->credit; eshkp->credit = 0L; @@ -1683,7 +1683,7 @@ dopay(void) eshkp->loan = 0L; pline("That debt is partially offset by your credit."); You("pay the remainder."); - gc.context.botl = 1; + display.botl = 1; } paid = TRUE; } @@ -2098,14 +2098,14 @@ inherits( eshkp->robbed = 0L; if (umoney > 0L) { money2mon(shkp, umoney); - gc.context.botl = 1; + display.botl = 1; } if (!silently) pline("%s %s all your possessions.", Shknam(shkp), takes); taken = TRUE; } else { money2mon(shkp, loss); - gc.context.botl = 1; + display.botl = 1; if (!silently) pline("%s %s the %ld %s %sowed %s.", Shknam(shkp), takes, loss, currency(loss), @@ -4730,7 +4730,7 @@ pay_for_damage(const char *dmgstr, boolean cant_mollify) cost_of_damage = check_credit(cost_of_damage, shkp); if (cost_of_damage > 0L) { money2mon(shkp, cost_of_damage); - gc.context.botl = 1; + display.botl = 1; } pline("Mollified, %s accepts your restitution.", shkname(shkp)); /* move shk back to his home loc */ diff --git a/src/sit.c b/src/sit.c index d297aaa88..7d6dfeb9d 100644 --- a/src/sit.c +++ b/src/sit.c @@ -28,7 +28,7 @@ take_gold(void) You_feel("a strange sensation."); } else { You("notice you have no gold!"); - gc.context.botl = 1; + display.botl = 1; } } @@ -69,7 +69,7 @@ throne_sit_effect(void) make_blinded(0L, TRUE); make_sick(0L, (char *) 0, FALSE, SICK_ALL); heal_legs(0); - gc.context.botl = 1; + display.botl = 1; break; case 5: take_gold(); diff --git a/src/spell.c b/src/spell.c index 786772863..783cde3d4 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1203,7 +1203,7 @@ spelleffects_check(int spell, int *res, int *energy) u.uen -= rnd(*energy); if (u.uen < 0) u.uen = 0; - gc.context.botl = 1; + display.botl = 1; *res = ECMD_TIME; return TRUE; } else if (spellknow(spell) <= KEEN / 200) { /* 100 turns left */ @@ -1246,7 +1246,7 @@ spelleffects_check(int spell, int *res, int *energy) u.uen -= rnd(2 * *energy); if (u.uen < 0) u.uen = 0; - gc.context.botl = 1; + display.botl = 1; *res = ECMD_TIME; /* time is used even if spell doesn't get cast */ } @@ -1320,7 +1320,7 @@ spelleffects_check(int spell, int *res, int *energy) if (confused || (rnd(100) > chance)) { You("fail to cast the spell correctly."); u.uen -= *energy / 2; - gc.context.botl = 1; + display.botl = 1; *res = ECMD_TIME; return TRUE; } @@ -1343,7 +1343,7 @@ spelleffects(int spell_otyp, boolean atme, boolean force) return res; u.uen -= energy; - gc.context.botl = 1; + display.botl = 1; exercise(A_WIS, TRUE); /* pseudo is a temporary "false" object containing the spell stats */ pseudo = mksobj(force ? spell : spellid(spell), FALSE, FALSE); diff --git a/src/steal.c b/src/steal.c index f37baf28b..7a65d9c77 100644 --- a/src/steal.c +++ b/src/steal.c @@ -123,7 +123,7 @@ stealgold(register struct monst* mtmp) if (!tele_restrict(mtmp)) (void) rloc(mtmp, RLOC_MSG); monflee(mtmp, 0, FALSE, FALSE); - gc.context.botl = 1; + display.botl = 1; } } diff --git a/src/steed.c b/src/steed.c index 2386d856c..d75cd8e22 100644 --- a/src/steed.c +++ b/src/steed.c @@ -366,7 +366,7 @@ mount_steed( } remove_monster(mtmp->mx, mtmp->my); teleds(mtmp->mx, mtmp->my, TELEDS_ALLOW_DRAG); - gc.context.botl = TRUE; + display.botl = TRUE; return TRUE; } @@ -797,11 +797,11 @@ dismount_steed( gi.in_steed_dismounting = TRUE; (void) float_down(0L, W_SADDLE); gi.in_steed_dismounting = FALSE; - gc.context.botl = TRUE; + display.botl = TRUE; (void) encumber_msg(); gv.vision_full_recalc = 1; } else - gc.context.botl = TRUE; + display.botl = TRUE; /* polearms behave differently when not mounted */ if (uwep && is_pole(uwep)) gu.unweapon = TRUE; diff --git a/src/teleport.c b/src/teleport.c index a6bfb359e..433413ed1 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1083,7 +1083,7 @@ dotele( } else { /* bypassing spelleffects(); apply energy cost directly */ u.uen -= energy; - gc.context.botl = 1; + display.botl = 1; } } diff --git a/src/timeout.c b/src/timeout.c index 843183ae4..dca771d13 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -550,7 +550,7 @@ done_timeout(int how, int which) /* life-saved */ *intrinsic_p &= ~I_SPECIAL; - gc.context.botl = TRUE; + display.botl = TRUE; } void @@ -716,7 +716,7 @@ nh_timeout(void) case DEAF: set_itimeout(&HDeaf, 1L); make_deaf(0L, TRUE); - gc.context.botl = TRUE; + display.botl = TRUE; if (!Deaf) stop_occupation(); break; @@ -769,7 +769,7 @@ nh_timeout(void) case FLYING: /* timed Flying is via #wizintrinsic only */ if (was_flying && !Flying) { - gc.context.botl = 1; + display.botl = 1; You("land."); spoteffects(TRUE); } @@ -915,7 +915,7 @@ fall_asleep(int how_long, boolean wakeup_msg) /* 3.7: how_long is negative so wasn't actually incrementing the deafness timeout when it used to be passed as-is */ incr_itimeout(&HDeaf, abs(how_long)); - gc.context.botl = TRUE; + display.botl = TRUE; ga.afternmv = Hear_again; /* this won't give any messages */ } #endif @@ -1808,7 +1808,7 @@ do_storms(void) Soundeffect(se_kaboom_boom_boom, 80); pline("Kaboom!!! Boom!! Boom!!"); incr_itimeout(&HDeaf, rn1(20, 30)); - gc.context.botl = TRUE; + display.botl = TRUE; if (!u.uinvulnerable) { stop_occupation(); nomul(-3); diff --git a/src/trap.c b/src/trap.c index bead72fae..f534e6b98 100644 --- a/src/trap.c +++ b/src/trap.c @@ -989,7 +989,7 @@ set_utrap(unsigned int tim, unsigned int typ) have already set u.utrap to 0 so this check won't be sufficient in that situation; caller will need to set context.botl itself */ if (!u.utrap ^ !tim) - gc.context.botl = TRUE; + display.botl = TRUE; u.utrap = tim; u.utraptype = tim ? typ : TT_NONE; @@ -3662,7 +3662,7 @@ mselftouch( void float_up(void) { - gc.context.botl = TRUE; + display.botl = TRUE; if (u.utrap) { if (u.utraptype == TT_PIT) { reset_utrap(FALSE); @@ -3775,7 +3775,7 @@ float_down( (void) encumber_msg(); /* carrying capacity might have changed */ return 0; } - gc.context.botl = TRUE; + display.botl = TRUE; nomul(0); /* stop running or resting */ if (BFlying) { /* controlled flight no longer overridden by levitation */ @@ -4000,24 +4000,24 @@ dofiretrap( if (alt > num) num = alt; if (u.mhmax > mons[u.umonnum].mlevel) - u.mhmax -= rn2(min(u.mhmax, num + 1)), gc.context.botl = TRUE; + u.mhmax -= rn2(min(u.mhmax, num + 1)), display.botl = TRUE; if (u.mh > u.mhmax) - u.mh = u.mhmax, gc.context.botl = TRUE; + u.mh = u.mhmax, display.botl = TRUE; monstunseesu(M_SEEN_FIRE); } else { int uhpmin = minuhpmax(1), olduhpmax = u.uhpmax; num = d(2, 4); if (u.uhpmax > uhpmin) { - u.uhpmax -= rn2(min(u.uhpmax, num + 1)), gc.context.botl = TRUE; + u.uhpmax -= rn2(min(u.uhpmax, num + 1)), display.botl = TRUE; } /* note: no 'else' here */ if (u.uhpmax < uhpmin) { - setuhpmax(min(olduhpmax, uhpmin)); /* sets gc.context.botl */ + setuhpmax(min(olduhpmax, uhpmin)); /* sets display.botl */ if (!Drain_resistance) losexp(NULL); /* never fatal when 'drainer' is Null */ } if (u.uhp > u.uhpmax) - u.uhp = u.uhpmax, gc.context.botl = TRUE; + u.uhp = u.uhpmax, display.botl = TRUE; monstunseesu(M_SEEN_FIRE); } if (!num) @@ -4064,12 +4064,12 @@ domagictrap(void) Soundeffect(se_deafening_roar_atmospheric, 100); You_hear("a deafening roar!"); incr_itimeout(&HDeaf, rn1(20, 30)); - gc.context.botl = TRUE; + display.botl = TRUE; } else { /* magic vibrations still hit you */ You_feel("rankled."); incr_itimeout(&HDeaf, rn1(5, 15)); - gc.context.botl = TRUE; + display.botl = TRUE; } while (cnt--) (void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS); @@ -4938,7 +4938,7 @@ drain_en(int n, boolean max_already_drained) /* energy is completely gone */ if (u.uen || u.uenmax) { /* paranoia */ u.uen = u.uenmax = 0; - gc.context.botl = TRUE; + display.botl = TRUE; } mesg = "momentarily lethargic"; } else { @@ -4961,7 +4961,7 @@ drain_en(int n, boolean max_already_drained) and then we throttled the loss being applied to current */ u.uen = u.uenmax; } - gc.context.botl = TRUE; + display.botl = TRUE; } /* after manipulating u.uen,uenmax and setting context.botl, so that You_feel() -> pline() will update status before the message */ diff --git a/src/uhitm.c b/src/uhitm.c index ccd75a343..0baec6abb 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -3988,7 +3988,7 @@ mhitm_ad_phys( exercise(A_STR, FALSE); /* inflict damage now; we know it can't be fatal */ u.mh -= tmp; - gc.context.botl = 1; + display.botl = 1; mhm->damage = 0; /* don't inflict more damage below */ if (cloneu()) You("divide as %s hits you!", mon_nam(magr)); @@ -4218,7 +4218,7 @@ mhitm_ad_heal( exercise(A_CON, TRUE); if (Sick) make_sick(0L, (char *) 0, FALSE, SICK_ALL); - gc.context.botl = 1; + display.botl = 1; if (goaway) { mongone(magr); mhm->done = TRUE; diff --git a/src/wield.c b/src/wield.c index 6920c9433..8a3646737 100644 --- a/src/wield.c +++ b/src/wield.c @@ -114,7 +114,7 @@ setuwep(struct obj *obj) if (uwep == obj && (u_wield_art(ART_OGRESMASHER) || is_art(olduwep, ART_OGRESMASHER))) - gc.context.botl = 1; + display.botl = 1; /* Note: Explicitly wielding a pick-axe will not give a "bashing" * message. Wielding one via 'a'pplying it will. * 3.2.2: Wielding arbitrary objects will give bashing message too. @@ -262,7 +262,7 @@ ready_weapon(struct obj *wep) } } if ((had_wep != (uwep != 0)) && condtests[bl_bareh].enabled) - gc.context.botl = 1; + display.botl = 1; return res; } diff --git a/src/zap.c b/src/zap.c index 64583a138..adfae3490 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1197,19 +1197,19 @@ cancel_item(struct obj *obj) case RIN_GAIN_STRENGTH: if ((obj->owornmask & W_RING) != 0L) { ABON(A_STR) -= obj->spe; - gc.context.botl = TRUE; + display.botl = TRUE; } break; case RIN_GAIN_CONSTITUTION: if ((obj->owornmask & W_RING) != 0L) { ABON(A_CON) -= obj->spe; - gc.context.botl = TRUE; + display.botl = TRUE; } break; case RIN_ADORNMENT: if ((obj->owornmask & W_RING) != 0L) { ABON(A_CHA) -= obj->spe; - gc.context.botl = TRUE; + display.botl = TRUE; } break; case RIN_INCREASE_ACCURACY: @@ -1222,24 +1222,24 @@ cancel_item(struct obj *obj) break; case RIN_PROTECTION: if ((obj->owornmask & W_RING) != 0L) - gc.context.botl = TRUE; + display.botl = TRUE; break; case GAUNTLETS_OF_DEXTERITY: if ((obj->owornmask & W_ARMG) != 0L) { ABON(A_DEX) -= obj->spe; - gc.context.botl = TRUE; + display.botl = TRUE; } break; case HELM_OF_BRILLIANCE: if ((obj->owornmask & W_ARMH) != 0L) { ABON(A_INT) -= obj->spe; ABON(A_WIS) -= obj->spe; - gc.context.botl = TRUE; + display.botl = TRUE; } break; default: if ((obj->owornmask & W_ARMOR) != 0L) /* AC */ - gc.context.botl = TRUE; + display.botl = TRUE; break; } } @@ -1337,19 +1337,19 @@ drain_item(struct obj *obj, boolean by_you) case RIN_GAIN_STRENGTH: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_STR)--; - gc.context.botl = 1; + display.botl = 1; } break; case RIN_GAIN_CONSTITUTION: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_CON)--; - gc.context.botl = 1; + display.botl = 1; } break; case RIN_ADORNMENT: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_CHA)--; - gc.context.botl = 1; + display.botl = 1; } break; case RIN_INCREASE_ACCURACY: @@ -1362,25 +1362,25 @@ drain_item(struct obj *obj, boolean by_you) break; case RIN_PROTECTION: if (u_ring) - gc.context.botl = 1; /* bot() will recalc u.uac */ + display.botl = 1; /* bot() will recalc u.uac */ break; case HELM_OF_BRILLIANCE: if ((obj->owornmask & W_ARMH) && (obj == uarmh)) { ABON(A_INT)--; ABON(A_WIS)--; - gc.context.botl = 1; + display.botl = 1; } break; case GAUNTLETS_OF_DEXTERITY: if ((obj->owornmask & W_ARMG) && (obj == uarmg)) { ABON(A_DEX)--; - gc.context.botl = 1; + display.botl = 1; } break; default: break; } - if (gc.context.botl) + if (display.botl) bot(); if (carried(obj)) update_inventory(); @@ -3047,7 +3047,7 @@ cancel_monst(struct monst *mdef, struct obj *obj, boolean youattack, cancel_item(otmp); if (youdefend) { - gc.context.botl = 1; /* potential AC change */ + display.botl = 1; /* potential AC change */ find_ac(); /* update_inventory(); -- handled by caller */ } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 45de400e8..3c98f253b 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1067,11 +1067,11 @@ tty_clear_nhwindow(winid window) cw->data[i][n - 1] = '\0'; /*finalx[i][NOW] = finalx[i][BEFORE] = 0;*/ } - gc.context.botlx = 1; + display.botlx = 1; break; case NHW_MAP: /* cheap -- clear the whole thing and tell nethack to redraw botl */ - gc.context.botlx = 1; + display.botlx = 1; /*FALLTHRU*/ case NHW_BASE: /* if erasing_tty_screen is True, calling sequence is @@ -2259,7 +2259,7 @@ tty_putstr(winid window, int attr, const char *str) #ifndef STATUS_HILITES case NHW_STATUS: ob = &cw->data[cw->cury][j = cw->curx]; - if (gc.context.botlx) + if (display.botlx) *ob = '\0'; if (!cw->cury && (int) strlen(str) >= CO) { /* the characters before "St:" are unnecessary */ @@ -2270,7 +2270,7 @@ tty_putstr(winid window, int attr, const char *str) nb = str; for (i = cw->curx + 1, n0 = cw->cols; i < n0; i++, nb++) { if (!*nb) { - if (*ob || gc.context.botlx) { + if (*ob || display.botlx) { /* last char printed may be in middle of line */ tty_curs(WIN_STATUS, i, cw->cury); cl_end(); @@ -3653,7 +3653,7 @@ docorner( if (ymax >= (int) wins[WIN_STATUS]->offy && !ystart_between_menu_pages) { /* we have wrecked the bottom line */ - gc.context.botlx = 1; + display.botlx = 1; bot(); } }