Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve WangBrush and TileLayerWangEdit behavior with empty color #3774

Merged
merged 8 commits into from
Jul 6, 2023

Commits on Jul 6, 2023

  1. Improve WangBrush and TileLayerWangEdit behavior with empty color

    Mostly removing the special handling for erasing and changing the way
    filling is implemented.
    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    745addc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    09aaeff View commit details
    Browse the repository at this point in the history
  3. Further tweaks to WangFiller

    * Slightly simplified updateAdjacent (one less call to "oppositeIndex").
    
    * In wangIdFromSurrounding, prefer colors over "no color".
    
    * In WangFiller::wangIdFromSurroundings, don't let tiles outside of a
      fixed map contribute to the WangId.
    
    * Don't require tiles on the border of the region to match their
      surroundings, but only prefer them to.
    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    ccb1c66 View commit details
    Browse the repository at this point in the history
  4. Fixed WangBrush rotational symmetry mode

    Also slightly optimized it based on WangId::mergeWith.
    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    af82077 View commit details
    Browse the repository at this point in the history
  5. Disabled placement of empty tiles by Stamp Brush in Terrain Fill mode

    Also exposed the new TileLayerWangEdit.erasingEnabled property in the
    scripting API.
    
    Another change is that empty tiles no longer contribute to the desired
    WangId for the Terrain Fill mode (when corrections are disabled).
    Previously, only tiles outside of the map would not contribute to the
    desired WangId. This change yields nicer behavior when using the Wang
    Fill mode with the Stamp Brush, but it may need to be reconsidered for
    the Shape Fill tool or a later Terrain Fill tool.
    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    415e016 View commit details
    Browse the repository at this point in the history
  6. WangFiller: Don't try to make changes outside of a fixed map

    This avoids the problem, that tiles set outside of the map by the
    algorithm will affect the tiles inside the map, which is not desirable.
    
    Also, explicitly set tiles that are outside of the map to empty.  This
    seems like a good idea, since it means the preview will still highlight
    those areas, but it will not affect the map once applied.
    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    cca4544 View commit details
    Browse the repository at this point in the history
  7. Updated NEWS.md

    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    03b03cd View commit details
    Browse the repository at this point in the history
  8. Improved behavior on the edge of the region when corrections are disa…

    …bled
    
    Don't let unset indices from the WangId based on surroundings override
    colors from currently present tiles.
    bjorn committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    70c0ca0 View commit details
    Browse the repository at this point in the history