Skip to content

Options -> Graphics: every option as the original's, without a restart - #132

Closed
MortenLyhr wants to merge 6 commits into
bssth:masterfrom
MortenLyhr:fix/options-graphics
Closed

MortenLyhr wants to merge 6 commits into
bssth:masterfrom
MortenLyhr:fix/options-graphics

Conversation

@MortenLyhr

Copy link
Copy Markdown
Contributor

Stacked on #87 (fix/options-screen): the first commits here are #87's; this PR's own commit is the last one (8a78754). Like #118, #119 and #120.

What it changes

The original asks for a restart after Single Unit Graphics, Full-screen Mode, Graphics Level, High Detail Terrain and Restore Defaults ("Program must be restarted before changes will take effect"). In OpenCiv4 every Graphics option now takes effect at once, so the popup is gone (CvOptionsScreenCallbackInterface.restartPopup is replaced before each callback).

Each option was tested in the original under Wine (live, and after a restart). OpenCiv4 now does the same:

  • Graphics Level is the original's preset, as measured:
    • Low turns on Single Unit Graphics, Animations Frozen, Effects Disabled, Globe View Buildings Disabled and Low Resolution Textures. It turns off High Detail Terrain, sets anti-aliasing to 0 and sets Render/Globe/Movie Quality to Low.
    • Medium turns on Single Unit and Globe View Buildings Disabled and turns the others off, with 2× anti-aliasing and Medium qualities.
    • High turns those five off and sets the qualities to High.
  • No Enemy Glow: with it off, enemy units in the active team's land get the selection ring in the original's red, without the move dots.
  • Show City Radius draws the cities' plots in the original's hatched area-border style (as the WorldBuilder's), not just an outline.
  • Globe View Buildings Disabled leaves the cities' models out of the globe view.
  • Low Resolution Textures draws every mipmapped texture from its half-size level (the samplers' lowest level). It applies at once, with no reload, and the interface stays sharp.
  • Anti-Aliasing MultiSamples is real MSAA (0/2/4/8, as many as the GPU can do).
    • The main target is drawn into a multisampled target, which is resolved into it at the end of each pass (RESOLVE_AND_STORE), so screenshots, the blit to the window and the views are unchanged.
    • Pipelines carry their sample count.
  • Movie Quality Low: the map isn't drawn behind a playing movie (black), as the original.
  • Opening Menu: the temporary main menu shows the chosen menu's loading picture and plays its soundtrack.
  • Render Quality, Globe Quality, High Detail Terrain: these showed no visible effect in the original, live or after a restart. They are greyed out with a tooltip saying OpenCiv4 doesn't implement them, but their values are still stored. The options screen's setEnabled now works for this.
  • The screen read each option's default through CyGlobalContext.getGraphicOptionInfo, which doesn't exist, so every default read as off and Globe View Buildings Disabled showed unchecked. Now it uses getGraphicOptionsInfoByIndex. Full-screen still starts off, because OpenCiv4 starts in a window.

Tests

  • ctest 14/14.
  • Sync checksums (--turns 100 --map Fractal --size STANDARD --seed 7) equal before and after on all 100 turns.
  • Pictures before and after, with each option, next to the original's.

Pictures (Wine on the left, OpenCiv4 on the right, unless said)

The tab (OpenCiv4; the greyed Render Quality hovered shows its tooltip in the help area):
tab

No Enemy Glow off: the red ring under an enemy in your land:
enemy glow

Show City Radius with a settler selected:
city radius

Movie Quality Low: no map behind the movie:
movie quality low

Low Resolution Textures (OpenCiv4, off | on) and Anti-Aliasing (OpenCiv4, 0 | 8 samples):
low res
anti-aliasing

Opening Menu (OpenCiv4's temporary menu: BTS Classical, Warlords, Civilization IV):
opening menu

Wine, Graphics Level High vs Low after a restart (half-resolution textures, no anti-aliasing):
wine graphics level

🤖 Generated with Claude Code

MortenLyhr and others added 6 commits November 20, 2026 13:50
… OpenCiv4's own options on their own tab

The original keeps the player options in its player profile and sends them to the
active player at the start of every game, new or loaded (CvGame::sendPlayerOptions);
OpenCiv4 used the XML's defaults for a new game and the save's own after a load, and
never wrote them to profile.ini. Now Utility holds the profile's (profile.ini player.N),
a choice sent from the options screen goes into it and is written at once.

The options screen's check boxes get the theme's GFC_Control_StandardCheckBox_Style, as
the custom game screen's; W A S D, idle turns and edge scrolling move to an OpenCiv4 tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rges cleanly with bssth#85)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ly with bssth#85)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…abs, GFC's box layout

Measured on the original's options screen (Wine, BUG + BULL): the standard window's title bar
with the title at the left, tabs as wide as their words from the left (the theme's tab skins,
the chosen one lighter, a baseline under them), 31 px rows (GFC's default control height),
16 px text, a box's children as wide as they need with the rest to those that expand (the
two columns of player options) or to the spacers (Language at the panel's foot), Restore
Defaults and Exit centred under the panel. Empty panels take no room. CyGTabCtrl's
setActiveTab/getActiveTab work, so a script can open a tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…owed

Before the player options were kept as choices, the options screen wrote
every player option it had shown, and it showed those the profile did not
have as off. Such a profile has Wait at End of Turn off (and advisor
pop-ups, Sid's tips) though the player never chose it; with Wait at End of
Turn off the game core ends each turn by itself once a unit has moved, so
turns seemed to end on their own.

The profile now has a version (2). One without it gets, once, the XML's
default for the options that are on by default and off there; every other
choice stays, and from then on off is the player's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The original asks for a restart after Single Unit Graphics, Full-screen,
Graphics Level, High Detail Terrain and Restore Defaults; here every
option takes effect at once, so the restart popup is gone.

- Graphics Level is the original's preset (measured in Wine): Low/Medium/
  High switch the other options and qualities as the original does.
- No Enemy Glow: enemies in the active team's land get the selection ring
  in the original's red (no dots) unless the option is on.
- Show City Radius: the original's hatched area border style.
- Globe View Buildings Disabled: no city models in the globe view.
- Low Resolution Textures: textures from their half size level (the
  samplers' lowest level), at once.
- Anti-Aliasing: real MSAA 2/4/8 on the main target, resolved per pass.
- Movie Quality Low: no map drawn behind a playing movie.
- Opening Menu: the temporary menu shows the chosen menu's loading picture
  and plays its music.
- Render Quality, Globe Quality and High Detail Terrain are greyed out with
  a tool tip (no visible effect in the original either).
- The options' defaults are read again (getGraphicOptionsInfoByIndex: the
  old name did not exist, so every default read as off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MortenLyhr

MortenLyhr commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Included in bundle 4/6, #148, merged there with its own commits and with its conflicts with the other open PRs resolved (the bundle PR lists them). Closing in favour of #148.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant