Permalink
Switch branches/tags
Commits on Jul 22, 2018
  1. Revert "Remove most remaining CRT control code"

    aidanholm committed Jul 22, 2018
    This commit caused the main game UI to be displayed on webtiles before
    starting a game, and also caused the end-game hiscores list to be
    invisible. Don't have time to debug properly, so a quick revert is in
    order.
    
    This reverts commit 91fb430.
  2. Add webtiles client-side scrolling

    aidanholm committed Jul 22, 2018
    This commit adds client-side scrolling to all HTML UI layouts, including
    formatted scrollers.
  3. Add server -> client scroller synchronization

    aidanholm committed Jul 22, 2018
    This commit sends all client-side scrollers' scroll events to webtiles
    clients. The webtiles client responds by scrolling the scroller found
    within the top popup, if there is only one such scroller.
    
    With this change, formatted scrollers now send two scroll update
    messages: the pre-existing scroll update from UIHookedScroller, and this
    newly-added update. The former currently provides client -> server
    synchronization (currently lacking for other scrollers), and so webtiles
    clients will ignore new scroll messages if the top popup is a formatted
    scroller.
    
    There are race conditions here, since scroll update messages do not
    identify their target widget.
  4. Improve webtiles scroller line-height detection

    aidanholm committed Jul 22, 2018
    The previous method of prepending a hidden span had a number of issues,
    chief of which was that it recreated all scroller contents by converting
    them to HTML and reparsing. This erased all canvas element contents.
Commits on Jul 21, 2018
  1. Don't render UI layers under direction chooser (stoneychips, #11525)

    aidanholm committed Jul 20, 2018
    This fixes a webtiles bug where evoking items from their inventory item
    description would lead to the inventory menu obscuring the direction
    chooser. This also fixes a secondary bug on local tiles where evoking
    items from their inventory item description and then pressing v to
    describe a cell would cause the inventory menu to appear under the
    description popup.
    
    Briefly, there are two main render loops for local tiles: the directn
    loop (which does not render UI popups), and the new UI loop (which does
    render the background direction chooser view). Effectively, either all
    popups or no popups are rendered, depending on which render loop is
    running on the top of the stack (they can be nested). For xv, that's the
    UI loop on top of the directn loop; for inv -> item -> evoke, that's the
    directn loop on top of the UI loop.
    
    This approach doesn't work on webtiles because it uses HTML to render
    the UI, and so the render loops are effectively "running in parallel".
    It was buggy on local tiles when describing cells after evoking an item
    from the inventory. The fix is to add "cutoff points" which prevent the
    rendering of any UI layers already pushed. Local UI and tileweb have
    separate UI stacks, and so have their own cutoff point API, in case
    non-UI code modifies the tileweb UI stack in the future.
    
    The addition of the cutoff point to show_map() is currently unnecessary,
    since there is currently no way to show the map from a popup view, but
    this might change in the future.
Commits on Jul 20, 2018
  1. Revert "Fix webtiles popups obscuring direction chooser (stoneychips,…

    aidanholm committed Jul 20, 2018
    … #11525)"
    
    This broke xv.
    
    This reverts commit f1e831c.
  2. Improve scroll shade appearance (pedant, #11520)

    aidanholm committed Jul 20, 2018
    The items obscured by scroll shade gradients were too easily
    misinterpreted as being greyed-out. This commit fixes that by using a
    much narrower gradient band. This effect was compounded on webtiles
    where the gradient was darker: the webtiles CSS has been changed to
    match the local tiles colours.
    
    The gradient band was originally taller to indicate the presence of
    additional content beyond the edge of the scroller viewport, but with
    the addition of scrollbars to (web)tiles, this is less important.
  3. Fix 'hostile' text truncated on ability screen (pedant, #11520)

    aidanholm committed Jul 20, 2018
    Unfortunately this introduces a separate minor bug where ability menu
    items can wrap (incorrectly), due to their length.
  4. Work around direction-chooser console rendering bug

    aidanholm committed Jul 20, 2018
    This rendering bug occurs when viewing an item's description via the
    inventory, and then evoking it: the stats sidebar of the main dungeon
    view UI is not re-rendered, and instead shows a portion of the item
    description text.
    
    I don't feel comfortable calling this a fix, because it's rather
    ham-fisted. It's positioned after the clear_messages() call to avoid
    causing flicker in the messages panel.
  5. Rename ring of loudness to ring of attention

    rawlins committed Jul 20, 2018
    This resolves a long-standing flavor vs. gameplay mismatch, since the
    ring of loudness doesn't actually make any noise.
  6. Fix webtiles compilation

    aidanholm committed Jul 20, 2018
    See commit 91fb430.
  7. Revert "Hack out small-screen-size panic"

    aidanholm committed Jul 20, 2018
    A panic is preferable to crashes caused by writing outside of the
    terminal viewport, at least until existing code is fully converted to
    use the new UI framework (which clips all output and so doesn't have
    this problem).
    
    This reverts commit 67b9c87.
  8. Fix local tiles crash when ` opens menus (kitchen_ace, #11534)

    aidanholm committed Jul 20, 2018
    update_items() being short-circuited lead to command repetition crashing
    on local tiles. I believe these early exits were holdovers from the
    previous (wildly different) implementation of menus.
  9. Fix webtiles popups obscuring direction chooser (stoneychips, #11525)

    aidanholm committed Jul 20, 2018
    This issue was visible when evoking items from their item description,
    opened via the inventory. It wasn't a problem on console or local tiles
    because the direction chooser code runs its own render loop. The fix
    here is analagous to the UI_VIEW_MAP UI state used for viewing the map.
  10. Remove most remaining CRT control code

    aidanholm committed Jul 19, 2018
    This commit removes most of the CRT layer control code, since it is no
    longer used. The few remaining user interfaces which use an emulated CRT
    on webtiles now use the single function tiles_crt_popup RAII class,
    which renders CRT output to a webtiles popup.
  11. Fix webtiles font settings being ignored (Leszczynek, #11538)

    aidanholm committed Jul 19, 2018
    We continue to use the CRT font, even though webtiles barely uses the
    CRT emulation layer any more.
  12. Have vaults flavor text imply quieter noise (11541)

    rawlins committed Jul 20, 2018
    There's no gameplay reason for actual noise here.
Commits on Jul 19, 2018
  1. Clean up elven twins + slimify interaction (Alaric_Silvertongue)

    rawlins committed Jul 19, 2018
    Try to make it more consistent. Behavior after this commit:
     * slimifying one will not berserk (or slimify) the other. This is
       different from ely pacification, where pacifying one pacifies the
       other.
     * attacking one will anger the other even if slimified. This is the
       same as ely pacification, and the behavior is unchanged.
        - I added messaging so it's slightly more obvious this is happening.
          Message also covers the pacified case.
        - jiyva abilities can repacify, sometimes even on the same turn.
     * a slimified neutral twin dying will now berserk the other.
       Previously, it accidentally pacified the other (bug related to ely
       pacification). This brings it in line with ely pacification.
     * a regular twin dying will no longer try to berserk a slimified
       neutral twin. Previously, it tried and didn't work. Possibly it
       should make hostile and berserk the the slimified twin instead, but
       I chose this behavior so that it is the same as ely pacification, so
       if one changes, the other should be changed.
     * If both twins are slimified and hostile, killing one gives a berserk
       message (but I don't think there's any effect). This is dubious but
       more annoying to fix.
    
    Pacification behavior should be unchanged.
  2. Handle an obscure webtiles exit case better

    rawlins committed Jul 19, 2018
    Prevents webtiles from showing an error dialog when exiting from the
    main menu via ESC.
  3. Let sprint, tutorial, main menu work in webtiles

    rawlins committed Jul 19, 2018
    Main menu only works under certain circumstances of course (e.g. non-dgl
    build, name_bypasses_menu = true).  Also arena, but it still crashes for
    other reasons.
  4. A kobold themed ghost vault for Dungeon

    gammafunk committed Jul 16, 2018
    In gammafunk_ghost_nasty_kobolds, the kobolds pull out all the nasty
    tricks: blowguns, wands, daggers with distortion or other nasty brands,
    and demon summoning. Places a fancy kobold with a kobold-appropriate 1h
    weapon that's branded and good_item or randart. You'll also find at
    least one of the aforementioned distortion weapon kobolds. Additionally
    there's at least one kobold with either a blowgun with poison or curare
    needles or one with a monster-usable wand. Numbers of these increase
    with depth, with big kobolds replacing ordinary kobolds and with kobold
    demonologists gradually being introduced. Who knows, maybe the lone
    ghost you'll find inside is the result of someone failing to appreciate
    just how tricky and nasty dungeon kobolds can be.
  5. Resize a ghost vault

    gammafunk committed Jul 18, 2018
    Currently, any monsters and loot at the back of the vault
    gammafunk_ghost_cemetery are one tile out of LOS even when viewed from
    outside. This commit decreases the size of the vault so that all floor
    tiles can be seen.
  6. Rename a ghost vault

    gammafunk committed Jul 18, 2018
    Rename ploomutoo_gammafunk_potion_laboratory to
    ploomutoo_gammafunk_ghost_potion_laboratory so that it has 'ghost' in
    the name of the vault like the other ghost vaults do.
Commits on Jul 18, 2018
  1. Avoid "mid cache bogosity" for unhandled divine clone bugs

    rawlins committed Jul 18, 2018
    Companion clone bugs lead to "mid cache bogosity" under the following
    circumstances:
    
    1. there is a level saved with a copy of the companion that gets false
    for is_divine_companion() (e.g. it lost its god, as in e6d7efa).
    2. that level also has a properly saved copy of the companion; they
    both share the same mid.
    3. the mindex of the corrupted copy is lower than the correct copy.
    
    If all three conditions are met, the elsewhere companion code would
    clear the mid cache for the corrupted copy, but the corrupted copy would
    still be alive and kicking in the monster list. This would lead to a
    crash when entering the level, resulting in an unplayable save.
    
    This commit avoids this situation by fixing up the mid cache after
    deleting the elsewhere companion. This fix will still result in errors
    under various circumstances, but hopefully not unplayable saves. An
    alternative might be to always delete both copies, but doing so will
    hide whatever the underlying bug is that is leading to a clone so IMO
    it's better to print lots of errors when these things happen, and delete
    only corrupted copies where we know what the bug was.
    
    As a side note, if there are multiple copies but they satisfy
    is_divine_companion, they'll still be silently deleted -- this is the
    status quo from before this commit. If condition 3 above isn't met,
    there will also be no error, on load at least.
  2. Save compat for the Beogh/priest polymorph bug

    rawlins committed Jul 18, 2018
    See e6d7efa for the bug itself.
    
    This cleans up duplicate mid monsters for various cases that match the
    conditions of this bug. Possibly this should have a minor version tag
    bump, but as of right now that will mess up the ghost permastores and I
    don't want to do that this close to a release.
  3. Preserve insanity on polymorph (11504)

    rawlins committed Jul 18, 2018
    Because insanity involves an attitude change, polymorph was removing the
    enchantment and not returning the attitude to normal. This changes
    leaves the monster insane after a polymorph, and the enchantment goes
    away as normal, returning the attitude to its correct state at that
    point.
  4. Don't overwrite god with GOD_NAMELESS on poly to a priest (11536)

    rawlins committed Jul 18, 2018
    This was creating duplicate monsters under the same mid in the following
    way for beogh worshippers: 1. an orc follower gets turned into a
    shapeshifter via chaos effects (e.g. an apocalypse crab). 2. the monster
    shapeshifts into a priest monster, such as a meliai, setting the
    monster's god to GOD_NAMELESS. 3. The player exits the level, and
    recalls allies on a new level. A copy of the follower is generated at
    this point. 4. They reenter the level of step 2. Because the monster
    copy on that level no longer worships Beogh, is_divine_companion returns
    false, and the follower copy is not appropriately cleaned up when
    re-entering that level (see `tag_read_level_monsters`). Now there are
    two. (Probably other variants of this procedure could work.)
    
    This state doesn't crash, but the situation can eventually lead to the
    infamous "mid cache bogosity" message in various ways, such as if one of
    the copies dies while both are on the level, removing it from the mid
    cache.
    
    The fix might give priest monsters some weird gods at times, but it
    doesn't mess up orc followers.
Commits on Jul 17, 2018
  1. Revert "Remove BlackWhiteHighlighter" (NormalPerson7)

    aidanholm committed Jul 17, 2018
    Turns out it is different from BoxMenuHighlighter after all, on windows
    console.
    
    This reverts commit e1e3f6e.