Repository navigation
No unit flags while Combat Zoom is in on a battle - #172
Open
MortenLyhr wants to merge 1 commit into
Open
MortenLyhr wants to merge 1 commit into
MortenLyhr wants to merge 1 commit into
Conversation
Seen in Wine (BtS + BUG/BULL, backlog bssth#98, batch 3 film combat.mov): with Combat Zoom on, while the camera is in close over a fight, the original shows no unit flag anywhere on the screen, the bystanders' too; with it off only the two fighting plots lose theirs, which OpenCiv4 already did. OpenCiv4 kept the other plots' flags and health bars. MapView::Options::battleZoom follows MapWindow's battle view (CAMERALOOKAT_BATTLE_ZOOM_IN, until the core lets go of the camera); while it is on, no 3D flags, health bars, or the overlay's flat emblems (the overlay's fallback for a plot without a 3D flag) are drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
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.
Clean room (#181): checked on 2026-11-25 against #181's clean-room rules and guides (
CONTRIBUTING.md"Clean room",AGENTS.md). This PR was written before #181; its sources are below, in #181's terms.What it is based on: a Combat Zoom battle filmed in the original under Wine (BtS 3.19, BUG + BULL), and the SDK's
CAMERALOOKAT_BATTLE_ZOOM_IN.strings), and nothing here comes from someone else's (CONTRIBUTING)With Combat Zoom on, the original shows no unit flag anywhere on the screen while the camera is in close over a fight. OpenCiv4 hid only the fighters' flags and kept every other plot's flags and health bars.
What the original does (seen in Wine, BtS 3.19 with BUG + BULL, backlog #98's batch 3: an axeman attacks an archer stacked with two warriors, with bystander stacks on both sides):
OpenCiv4 already zooms for a fight. The game core asks for
CAMERALOOKAT_BATTLE_ZOOM_INon the active player's attack, andMapWindow::enterBattleViewtakes the camera in untilreleaseLockedCamera. (A scripted--lookcamera holds still unlessOC4_FOLLOW_CAMERA=1, which is why batch 3's OpenCiv4 run did not zoom.)The change:
MapView::Options::battleZoomfollowsMapWindow's battle view each frame, ascityScreenfollows the city view. While it is on, nothing of the units' flags is drawn: no 3D flags (drawFlags), no health bars (drawHealthBars), and none of the overlay's flat emblems (the overlay's fallback for a plot without a 3D flag, which would otherwise show up oncedrawFlagsstops).Checks: ctest 15/15; sync checksums
--turns 100 --map Fractal --size STANDARD --seed 7equal master's (D7D43800).Pictures:
Wine with Combat Zoom on (film, t = 14.5, 16, 18, 20.5, 23, 25 s): flags before the fight, none while the camera is in, flags again after:

Before this change, Wine (left) vs. OpenCiv4 (right) during the fight, Combat Zoom on:

Combat Zoom off, Wine vs. OpenCiv4 (already the same):

OpenCiv4, the camera gliding in for a fight with bystanders round it, frames 0.5 s apart (top: before, bystanders' flags and bars shown; bottom: after, none while the camera is in):

Open: Wine doesn't separate whether the zoom itself or the fight hides the flags (they go together in the original). OpenCiv4 ties it to the battle view, which starts and ends with the zoom.
Merge notes
src/render/MapView.h: Bundle 4/6: the options screen #148'sglobeBuildingsoption sits next tobattleZoom. Keep both.src/render/MapWindow.cpp: Bundle 4/6: the options screen #148 wrapsview->draw()inif (mapShown) … else renderer->pass();(low movie quality). Putview->options.battleZoom = battleView;before that block, besideview->options.cityScreen = cityView;.🤖 Generated with Claude Code