Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameclient): empty portrait well and sharp art behind type tiles
Olcay Seygan5bc16f2d8e77
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 97732e7e5..23cea3e7e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -347,6 +347,7 @@ found and fixed, EA's own, not port damage.**- Hold Ctrl while placing a building and grid placement flips for as long as the key is down. With the box unticked the building snaps to the grid and the lines come up, so one flush row is a held key away; with it ticked you get a free hand for the odd building that has to sit between two squares. It works the same in Classic.- The camera works the same way with Shift. Turn it with the middle button or the rotate keys while Shift is down and the 45 degree camera steps flip: with the box unticked the view clicks round the eight headings, with it ticked it turns freely, and letting go of Shift mid-turn hands back whatever the box says. A quick square-on look no longer means a trip to the options.- Your general's promotion screen opens in the middle of the screen, in the Classic interface as well, instead of hanging from the top edge. The battlefield dims behind it, and a click anywhere off the screen closes it without selecting or ordering anything underneath.+- A group selected shows its unit types cleanly again. Under the type pictures the single unit's portrait was still drawn, a size larger than a picture's slot, so it hung below the first row and the count badges landed in the middle of it. The well is empty behind the pictures now. Each picture also uses the sharp portrait art: a group of one kind fills the whole well, and that used to be the small button picture blown up to a blur.## Groups attack-move at their own speeddiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cppindex b8dd5f1ab..686c44837 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp@@ -197,17 +197,15 @@ void ControlBar::updateMultiSelectStrip( void )//// the portrait bar's rule, the owner's: each selected type once, its own tile with its count, and- // no upgrades, which belong to one unit. The portrait is still set to the focused type for the- // bar's own bookkeeping, and the page shrinks its window to nothing. setPortraitByObject hides the- // cells, so it goes first+ // no upgrades, which belong to one unit. The well is emptied, upgrades and all: the portrait+ // window is larger than a grid cell and would show through every cell no type fills.+ // setPortraitByObject hides the cells, so it goes first//- Drawable *focused = TheGameClient->findDrawableByID( m_multiSelectGroupFirst[ m_multiSelectFocus ] );- setPortraitByObject( focused ? focused->getObject() : NULL );- for( Int upgrade = 0; upgrade < MAX_RIGHT_HUD_UPGRADE_CAMEOS; upgrade++ )- m_rightHUDUpgradeCameos[ upgrade ]->winHide( TRUE );+ setPortraitByObject( NULL );// one cell per selected type with its count; the focused type is the lit one, the rest- // wear the darkened overlay state+ // wear the darkened overlay state. A cell is drawn from the portrait art, as large as the+ // well itself for a one-type selection; the button cameo stretched to that size is a blurfor( size_t i = 0; i < m_multiSelectTiles.size(); i++ ){GameWindow *win = m_multiSelectTiles[ i ];@@ -216,8 +214,9 @@ void ControlBar::updateMultiSelectStrip( void )if( (Int)i < m_multiSelectGroupCount ){+ const ThingTemplate *type = m_multiSelectGroupTemplate[ i ];win->winHide( FALSE );- win->winSetEnabledImage( 0, m_multiSelectGroupTemplate[ i ]->getButtonImage() );+ win->winSetEnabledImage( 0, type->getSelectedPortraitImage() ? type->getSelectedPortraitImage() : type->getButtonImage() );win->winEnable( (Int)i == m_multiSelectFocus );GadgetButtonSetCount( win, m_multiSelectGroupSize[ i ] );}