Repository navigation
Cities as the original: smoke and fumes, houses on their paving, walls, trees cleared - #91
MortenLyhr wants to merge 2 commits into
Conversation
|
|
… cut - The effects the game core shows over a city (CvCity::getVisibleEffects: an occupied city's smoke and fire, an angry one's smoke, an unhealthy one's fumes, fireworks) are drawn at its middle, at the effect's scale. - Houses are scaled to the lot (the LSystem's art is 33.4 units a lot), laid as a tight square block, on the paving the LSystem lays under its 2x2 lots in the city's era (all_city_lot / ren_city_lot / mod_city_lot). - Walls stand on the paving's edge (were a lot out). - A city clears the trees in a circle CITY_TREECUT_SCALE plots across. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s unsigned) A plot with no feature has feature -1, and int32_t(-1) << 8 already has bit 30 set, so the city's mark changed nothing on its plot: the trees by a new or razed city stayed until some other feature changed. The key now takes the feature as unsigned (bssth's review of bssth#91). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c569235 to
2b7d2d1
Compare
|
Thanks, you're right. A plot with no feature has Fixed in 2b7d2d16, as you suggested: the key takes the feature as unsigned, I also rebased the PR on master (it conflicted with the plot yields in Checked:
🤖 Generated with Claude Code |
What it changes
Cities now look like the original's from the map:
CvCity::getVisibleEffects, aDllExportthe original engine calls): black smoke over a city with angry citizens, green fumes over an unhealthy one, a large plume and fire over an occupied one, fireworks on "We love the King" day. OpenCiv4 never asked, so cities showed none. Each effect is now drawn at the city's middle as itsCIV4EffectInfosmodel at the effect's scale (the detail zoom's list while the city screen is up).mod_city_lot.nif's 4x4 is 133.6) tile at that. OpenCiv4 took a house as 50 units a lot, so houses stood a third smaller than their lots with grass between them. They are now scaled to the lot (the lot itself unchanged:CITY_LAYOUT_SIZE), laid as a tight square block, on the paving the LSystem lays under its 2x2 lots in the city's era (all_city_lot_2x2.nifto the middle ages,ren_city_lot.nif,mod_city_lot.niffrom the industrial era). Measured on a size 16 city: the paving is 0.39 of its 5-plot border across in the original, 0.37 now (the houses were 0.27).CITY_TREECUT_SCALE(1.0) plots across, as measured in the original; before, trees stood up to the houses.Host code only (
apps/oc4core/MapCapture.*,src/render/MapView.cpp,MapSnapshot.h); the one new game core call isCvCity::getVisibleEffects(DllExport). No shader changes.Not the same yet: the original lays its houses out with the LSystem's productions (so a city's outline steps where its nodes end), OpenCiv4 fills lots nearest the middle; the angry smoke is fainter than the original's.
How it was checked
ctestpasses: 15/15 (macOS, Release; rebased on master8b7d8557).--turns 100 --map Fractal --size STANDARD --seed 7gives the same checksum as master on all 100 turns, ending atD7D43800(drawing only).🤖 Generated with Claude Code