Repository navigation
Map yields: faded on unworked plots, larger on worked ones, as the original's - #164
Open
MortenLyhr wants to merge 3 commits into
Open
MortenLyhr wants to merge 3 commits into
MortenLyhr wants to merge 3 commits into
Conversation
…elds go140point6's bssth#55 ("Fix city plot circles and display stacked tile yields"), rebased on master by mortenlyhr. Its plot circle part and the Overlay::outline helper it used are left out: bssth#151, now merged, draws the city's plot circles on the ground. Its resource icon box gave way to master's resource bubbles. Kept as bssth#55 has them: the yields as the game's stacked yield art (maxYieldStack a stack), and on a city's screen the yields of the plots the city can work.
…iginal's plot symbols The original draws a plot's yield symbols at CvPlot::getSymbolSize's size and updateSymbolDisplay's opacity (both in the SDK's CvPlot.cpp): on the map 0.8 and 0.6 opaque, a plot the active team works 1.2 and 0.8; on a city's screen, the plots it can work (isShowCitySymbols) 1.2 and 0.8, a worked one 1.6 and opaque. OpenCiv4 drew them all opaque at one size. Seen in Wine (plain BtS): the faded icons on unworked coast and ocean, and the larger, solid ones on Roma's worked plots on its city screen. The plots that show yields were already the same in both (seen in Wine: none on ocean more than two plots from land, as CvPlot::isPotentialCityWork; under the fog as last seen; none on unrevealed plots). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MortenLyhr
force-pushed
the
fix/yield-display
branch
from
November 23, 2026 08:59
b80b2ab to
6d216ca
Compare
2 of 3 tasks
…d isn't DllExport) The Windows host links only the game core's exported functions, so the call to CvPlot::isVisibleWorked failed to link (LNK2001). The same rule, from the SDK's CvPlot.cpp: getVisibleImprovementState's worked (being worked, and the active team sees the plot) and the plot owner's team is the active team; a team always sees the plots it owns (CvPlot::updateSight). In the debug mode only worked plots the active team sees are marked. Checked against isVisibleWorked on macOS: no differences on 5136 worked plots across the kit's yd-roma-y, city-roma and yd-foe-y views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR now stands alone on master. It carries go140point6's commit from #55 (#55), rebased on master, with go140point6 kept as its author: the stacked yield icons this PR changes come from that commit. Thanks to go140point6 for the stacked yield art and the city screen's yields.
What the rebase changed in #55's commit: its plot circles (and the
Overlay::outlinehelper they used) are left out, because #151, now merged, draws the city's plot circles on the ground. Its resource icon box gave way to master's resource bubbles. The stacked yields and the city screen's workable-plot yields are kept as #55 has them.If this PR merges, master has everything #55 brings (its plot circles through #151), so #55 could be closed then. That is for the maintainers to decide.
Commits:
b878136f(#55, by go140point6, rebased) and6d216caf(the yields' look, below).The original draws a plot's yield icons partly see-through, and larger and solid on a plot a citizen works. OpenCiv4 drew them all solid and at one size.
The rule, from the SDK's
CvPlot.cpp(getSymbolSize,updateSymbolDisplay,isVisibleWorked,isShowCitySymbols):The icons' base size stays what #55 calibrated: an unworked plot's icon is the size seen in Wine, both on the map and on the city screen. A worked plot's icon is larger by the original's ratio (×1.5 on the map, ×4/3 on the city screen).
Seen in Wine (plain BtS, the test scenario):
yd-a-y), and on the opponent's land (yd-foe-y).city-roma).Already the same (no change), seen in Wine and read in the SDK:
CvPlot::calculateYieldgives any. That is 0 for a plot no city could ever work (isPotentialCityWork, set byupdatePotentialCityWork: no land plot within its 21-plot city radius). So ocean more than two plots from any land shows no yields in either game, with or without a city. Coast and ocean near land always show yields; a city nearby is not needed. In Wineyd-a-y, the three rows of deep ocean between the islands have none.yd-foe-y).calculateYield(..., true)). Unrevealed plots show none (updateSymbolVisibility:isRevealed) (yd-fog-y).Pictures (Wine | before | after):
Coast row, close up (top to bottom):

yd-a-y:yd-foe-y:yd-fog-y:Roma's city screen (Wine | after):

Roma on the map, after (worked plots larger):

Tests: ctest passes (15/15 on master
8b7d8557); the turn-100 checksum is unchanged (all 100 turns equal master's, endingD7D43800,--turns 100 --map Fractal --size STANDARD --seed 7): drawing only.🤖 Generated with Claude Code