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
feat(gameengine): queue a guard behind the shift orders, four player reports
Olcay Seyganecd6f49b22a9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b09c54e46..8e47a2b14 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -152,6 +152,7 @@ found and fixed — EA's own, not port damage.**- A is attack and F is attack move, each arming the next order click. A click on the ground with A held down is a shot at that ground, on your own tank a shot at your own tank, and the mode drops again the moment the order goes out, so nothing stays armed behind your back. The click keeps your group, too: an attack click that was not a drag used to run the same deselect an ordinary left click runs, so the order arrived a moment after the units it was meant for had been dropped. Both orders are aimed with the left button, the way a special power is, and a right click puts the key down again without giving any order. Holding ctrl no longer forces fire: A is the one way to shoot the ground, and ctrl on a move is only the shared pace. The two keys turn each other off, and the letters they took were sitting on grid commands that moved.- G is guard, armed the same way and aimed with the same left button. A left click posts the selection on that spot: they hold it, shoot what walks into range and do not chase it off the post you put them on. The cursor turns into the targeting cross while G is armed, so you can see the key is down before you click, and a right click puts it down again. Drag the left button with G armed (the right one draws nothing while G is down) and they post along the line you draw, one unit per station, which is how a hill or a bridge approach gets covered in one gesture instead of a click per tank. Guard has its own colour, blue, on the line while you draw it and on the thread and marker afterwards, so a group told to hold ground reads apart from one told to walk there. Hold position, which posts every unit on the spot it is already standing on, has moved to H.- With A armed, hold the left button and drag a circle instead: everything hostile you can see inside it becomes a target list, nearest first, and the selection works down that list on its own. When the current target dies the next order goes out the same frame, so a strike group clears a circle without you clicking once per tank. It moves on from a target the group has stopped working on, too, rather than only from a dead one: something none of them can reach or hurt used to sit at the head of the list and hold every other target behind it for the rest of the match. That list is the same queue a shift-clicked attack builds, so you can see it: every target still owed has its own thread and marker, in the order they will be taken, instead of one line to whatever is being shot at this second. Hold shift while you draw the circle and its targets go on the end of what the group is already working through; draw it without shift and the circle replaces the lot. The ground inside the circle is washed the same red while you drag it, painted on the map rather than over it, so it runs up the hills inside the circle and your own tanks stand on top of it. Any order you give by hand ends the list. Losing a unit does not: the list belongs to the group that was told and carries on with whoever is left, which is worth saying because for a while it did not, and one tank dying threw away every target still owed. A target with enough of your fire already in the air to kill it counts as done, so the rest of the group takes the next thing on the list rather than emptying itself into something that is dead and has not fallen over yet. Aircraft are what this is for: a flight fires from range and the missiles are seconds behind, and four planes used to spend all four loads on the first tank in the circle. Running out of ammo does not cost you the list either. A flight that empties its racks flies home, lands, rearms and comes back to the target it left, and the queue waits for it instead of counting the trip as the group giving up: a circle drawn for four planes used to be empty by the time they were back in the air, one entry lost every two seconds they were away. The threads stay on the ground for the whole trip, too. A plane flying home has no target and no order to read, so the list it was still holding used to vanish off the map the moment it turned for base and reappear only when it was shooting again, which looks exactly like the list being thrown away. What the circle picks up is what you can shoot: a shell or a missile crossing it is on the enemy's side like everything else and used to go on the list as a target, costing the group a two second stall on something that was about to stop existing. A target that has driven into the shroud since you picked it keeps its place in the list but stops drawing its thread, so the line cannot be used to trace it through the fog. An attack-move queued behind other orders keeps the force fire it was given rather than losing it when the attack key drops.+- Shift queues a guard as well, and it is where the line of orders stops. Hold shift with G armed and click, and the group takes up its post once it has finished everything queued in front of it: clear that ridge, then sit on it, in one set of clicks instead of standing over the fight waiting to give the last order. Nothing goes behind a guard, because a posted unit has no next place to be. The thread to the post is drawn in the guard colour like any other guard.- Shift queues an attack now, not only a move. A or F held down while you shift-click adds a force-attack or an attack-move to the line of orders a group is already holding, and it fires the moment the order in front of it is finished - a target dead, or nobody left chasing an attack-move point. The coloured thread that shows a queued order covers it too, so a queue of "go here, then attack that, then attack-move over there" reads as one continuous line in three colours. The game's own white waypoint markings, which used to draw over the same ground the moment shift went down, are gone - they only ever duplicated what the coloured thread already showed, and doing both left a queued attack sitting under two different pictures of itself.- What the circle picks up is what you can see, and a stealthed unit is not that. Shroud was the only test, so a hidden tank parked in ground you had already cleared went on the list like anything else: drag a circle over open country and the group opened fire on air, one order per hidden unit, which is a stealth detector drawn with the mouse. An undetected unit is not in the circle.- Ctrl+D takes every unit of the kinds you have selected that is on the screen, and pressed twice inside half a second takes them across the whole map. One tank selected and two keystrokes is your whole armour, wherever it is standing. It was on Shift+Ctrl+E, which is three fingers for something you do in every fight, and it only ever reached across the map when the screen had nothing left to give - so the wide selection happened to you instead of being asked for.@@ -386,7 +387,7 @@ found and fixed — EA's own, not port damage.**- A unit finishes walking out of its factory before it takes an order.- An upgrade stays available if any selected building can still buy it.- One right click cancels one thing, counted the moment you press.-- A build button takes a batch: Shift queues five, Ctrl twenty, both together as many as the queue will hold and the bank will pay for. Right-click with the same keys and the same number comes back out. Ten tanks used to be ten clicks.+- A build button takes a batch: Shift queues five, Ctrl twenty, both together as many as the queue will hold and the bank will pay for. Right-click with the same keys and the same number comes back out. Ten tanks used to be ten clicks. How many are still coming is written in the corner of the button, half again bigger than the price and the countdown beside it and on a plate you can actually read it against: at the size the other markings wear, the one number you check in the middle of a fight was a smudge you had to look for.- Right-click a picture on the strip and that one order is cancelled and paid back, without walking the camera over to the building first. A build button greyed out because the bank is empty or the queue is full still takes the right click, so what is already queued on it can come back out.- Buying an upgrade for a group starts it in all of them.- The progress clock over a picture is steady at any frame rate.@@ -488,7 +489,7 @@ found and fixed — EA's own, not port damage.**four brutal computers at 7,777 a minute, three of the four spent between 3,400 and 6,200 more inthe first three minutes and put the difference on the map.-- The minimap says where the money and the capturable buildings are, with the dollar and the star from the lobby map preview. Oil derricks, hospitals and repair pads never showed on it at all, and supply piles vanished with the rest of the map under the fog, so the two things worth walking a rifleman across the map for were the two things the minimap would not tell you about. They are marked from the first second now, on ground you have scouted and ground you have not, one mark per place rather than one per pile; a pile that runs dry drops off it.+- The minimap says where the money and the capturable buildings are, with the dollar and the star from the lobby map preview. Oil derricks, hospitals and repair pads never showed on it at all, and supply piles vanished with the rest of the map under the fog, so the two things worth walking a rifleman across the map for were the two things the minimap would not tell you about. They are marked on ground you have walked over, one mark per place rather than one per pile, and the mark stays through the fog once you have been there, because a supply pile does not move. A pile that runs dry drops off it. Country you have never scouted keeps its marks to itself: for a while the minimap gave you every dollar sign on the map from the first second, which is a scouting report nobody paid for.## Health bars@@ -573,7 +574,7 @@ found and fixed — EA's own, not port damage.**## The buildings nobody repairs, repair themselves- Civilian buildings and tech buildings patch their own walls. Nobody else was ever going to: a neutral building is on no player's build list, a captured one is not on its captor's either, and no dozer in the game will touch either of them. So the first squad to be burned out of a hospital left it a wreck for the rest of the match, and an oil derrick that changed hands four times spent the game at a tenth of its health.-- Two seconds without taking a hit and the building starts mending, three percent of its full health a second, until it is whole or somebody shoots it again. It makes no difference whether it is standing empty, holding somebody's riflemen or flying somebody's flag.+- Ten seconds without taking a hit and the building starts mending, a little over one percent of its full health a second, until it is whole or somebody shoots it again. It makes no difference whether it is standing empty, holding somebody's riflemen or flying somebody's flag. It used to start after two seconds at three percent, which meant a hospital cleared with a flamethrower was whole again in half a minute, sometimes before the squad that cleared it had finished walking over. Taking a building off somebody is worth something again; a burned-out shell now takes about eighty seconds to come back.- Your own buildings are not in this. A command center is a faction structure with a dozer of its own, and it repairs the way it always did.## Peace time, if the host wants itdiff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.hindex da59d8710..d60c087df 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h@@ -478,13 +478,21 @@ public: // ********************************************************************// plain move queue rides on carries no order type, so this is a second queue: an ordinary// message the client sends again once the order before it is over, nothing new for the logic// to learn.+ enum AttackWaypointKind+ {+ ATTACK_WAYPOINT_ATTACK, ///< attack-move to a point, or force-attack a victim+ ATTACK_WAYPOINT_GUARD ///< post the group here. A guard never ends, so it ends the queue+ };+struct AttackWaypoint{- Coord3D pos; ///< where to attack-move to, or the last known spot of targetID- ObjectID targetID; ///< INVALID_ID for a plain attack-move point, a specific victim otherwise- Bool forceAttack; ///< what the attack key said when it was queued, not when it goes out+ Coord3D pos; ///< where to go, or the last known spot of targetID+ ObjectID targetID; ///< INVALID_ID for a point, a specific victim otherwise+ Bool forceAttack; ///< what the attack key said when it was queued, not when it goes out+ AttackWaypointKind kind; ///< which order this entry sends when it reaches the front};void queueAttackWaypoint( const Coord3D *pos, Object *targetObj );+ void queueGuardWaypoint( const Coord3D *pos );void clearShiftAttackQueue( void );Bool isShiftAttackQueueActive( void ) const { return !m_shiftAttackQueue.empty() || m_shiftAttackQueueRunning; }const std::vector<AttackWaypoint>& getShiftAttackQueue( void ) const { return m_shiftAttackQueue; }@@ -1088,6 +1096,7 @@ protected:void updateShiftAttackQueue( void ); ///< send the next queued attack once the current one is overvoid addOrderHint( OrderHint& hint, const std::vector<OrderHint>& previous ); ///< keep a marker's age across the frame the list is rebuilt onBool getHeldAircraftOrder( const Object *obj, OrderHintKind& kind, Coord3D& to ) const; ///< the order an aircraft is sitting on until it is airborne+ void pushShiftAttackOrder( const AttackWaypoint& order ); ///< add one order to the queue, or start a queue with itvoid sendShiftAttackOrder( const AttackWaypoint& waypoint ); ///< put one queue entry on the message streamvoid logShiftAttackQueue( const char *why ) const; ///< one line saying what the queue did and what its group was doingvoid addShiftAttackQueueTail( OrderHint& hint, const std::vector<OrderHint>& previous ); ///< every target still owed, drawn on from where the hint leaves offdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 024393a2f..d908dc255 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -4325,7 +4325,12 @@ void InGameUI::addShiftAttackQueueTail( OrderHint& hint, const std::vector<Orderfor( std::vector<AttackWaypoint>::const_iterator qit = m_shiftAttackQueue.begin();qit != m_shiftAttackQueue.end(); ++qit ){- if( qit->targetID != INVALID_ID )+ if( qit->kind == ATTACK_WAYPOINT_GUARD )+ {+ hint.kind = ORDER_HINT_GUARD;+ hint.to = qit->pos;+ }+ else if( qit->targetID != INVALID_ID ){// a queued victim is drawn where it stands now rather than where it stood when the player// picked it, so the thread follows a target that is driving away. One that died while it@@ -4543,19 +4548,54 @@ void InGameUI::queueAttackWaypoint( const Coord3D *pos, Object *targetObj )AttackWaypoint order;order.pos = *pos;order.targetID = targetObj ? targetObj->getID() : INVALID_ID;+ order.kind = ATTACK_WAYPOINT_ATTACK;// remembered rather than read again when the order goes out: the attack key drops the moment the// first order of the queue is sent, so everything behind it used to lose its force attackorder.forceAttack = isForceAttackArmed();- // who the queue belongs to. A selection that is not part of the group holding the queue starts- // a fresh one rather than adding to whatever the old selection was doing+ pushShiftAttackOrder( order );+}++//-------------------------------------------------------------------------------------------------+/** Shift held, guard armed, left click: the group takes up its post once it has finished whatever+ * the queue already holds - "clear this, then sit on that ridge" in one set of clicks. A guard+ * is where the queue stops, because a posted unit has no next point to walk to and nothing after+ * it would ever come round. */+//-------------------------------------------------------------------------------------------------+void InGameUI::queueGuardWaypoint( const Coord3D *pos )+{+ AttackWaypoint order;+ order.pos = *pos;+ order.targetID = INVALID_ID;+ order.forceAttack = FALSE;+ order.kind = ATTACK_WAYPOINT_GUARD;++ pushShiftAttackOrder( order );+}++//-------------------------------------------------------------------------------------------------+/** Put one order on the end of the queue, or start a fresh queue with it. A selection that is not+ * part of the group holding the queue starts its own rather than adding to whatever the old+ * selection was doing. */+//-------------------------------------------------------------------------------------------------+void InGameUI::pushShiftAttackOrder( const AttackWaypoint& order )+{std::vector<ObjectID> current;collectSelectedObjectIDs( current );if( !m_shiftAttackQueueRunning || !selectionOwnsShiftAttackQueue( current ) ){clearShiftAttackQueue();++ // a guard with nothing in front of it is just a guard, and starting a queue on one would+ // leave the list waiting on an order that never finishes+ if( order.kind == ATTACK_WAYPOINT_GUARD )+ {+ sendShiftAttackOrder( order );+ return;+ }+m_shiftAttackQueueUnits = current;m_shiftAttackQueueRunning = TRUE;m_shiftAttackQueueActive = order;@@ -4564,6 +4604,10 @@ void InGameUI::queueAttackWaypoint( const Coord3D *pos, Object *targetObj )return;}+ // a guard is terminal, so anything clicked after one would never be reached+ if( !m_shiftAttackQueue.empty() && m_shiftAttackQueue.back().kind == ATTACK_WAYPOINT_GUARD )+ return;+m_shiftAttackQueue.push_back( order );}@@ -4576,6 +4620,7 @@ void InGameUI::clearShiftAttackQueue( void )m_shiftAttackQueueActive.targetID = INVALID_ID;m_shiftAttackQueueActive.pos.zero();m_shiftAttackQueueActive.forceAttack = FALSE;+ m_shiftAttackQueueActive.kind = ATTACK_WAYPOINT_ATTACK;m_shiftAttackQueueEngagedFrame = 0;m_shiftAttackQueueWaitingForRearm = FALSE;m_shiftAttackQueueWaitingForSelection = FALSE;@@ -4626,6 +4671,14 @@ void InGameUI::logShiftAttackQueue( const char *why ) const//-------------------------------------------------------------------------------------------------void InGameUI::sendShiftAttackOrder( const AttackWaypoint& waypoint ){+ if( waypoint.kind == ATTACK_WAYPOINT_GUARD )+ {+ GameMessage *msg = TheMessageStream->appendMessage( GameMessage::MSG_DO_GUARD_POSITION );+ msg->appendLocationArgument( waypoint.pos );+ msg->appendIntegerArgument( GUARDMODE_GUARD_WITHOUT_PURSUIT );+ return;+ }+if( waypoint.targetID != INVALID_ID ){GameMessage *msg = TheMessageStream->appendMessage( GameMessage::MSG_DO_ATTACK_OBJECT );@@ -4858,6 +4911,15 @@ void InGameUI::updateShiftAttackQueue( void )sendShiftAttackOrder( next );+ // a post is where the group stays. Nothing ends a guard, so there is nothing left to wait+ // for and the queue closes with it rather than watching an order that never finishes+ if( next.kind == ATTACK_WAYPOINT_GUARD )+ {+ logShiftAttackQueue( "guard sent, the list ends on it" );+ clearShiftAttackQueue();+ return;+ }+m_shiftAttackQueueActive = next;m_shiftAttackQueueEngagedFrame = TheGameLogic->getFrame();m_shiftAttackQueueWaitingForRearm = FALSE;diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cppindex d932a443a..a0c4b886a 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp@@ -964,12 +964,20 @@ GameMessage::Type CommandTranslator::issueMoveToLocationCommand( const Coord3D *// queue instead of the plain waypoint path - that path is a bare list of points with no// order type, so it cannot carry an attack. See InGameUI::queueAttackWaypoint.Bool forceAttackHere = isForceAttackTargeting() && isForceAttackable;+ Bool queuedGuard = TheInGameUI->isInWaypointMode() && TheInGameUI->isGuardArmed();Bool queuedAttack = TheInGameUI->isInWaypointMode()&& ( TheInGameUI->isInAttackMoveToMode() || forceAttackHere );- // the guard key posts the selection where it is pointed. It outranks the queue: a guard has- // no next point to walk to, so there is nothing for shift to add it to- if( TheInGameUI->isGuardArmed() )+ // the guard key posts the selection where it is pointed, and under shift it joins the line+ // of orders as its last one: clear this, then sit there. A guard never finishes, so nothing+ // can be queued behind it+ if( queuedGuard )+ {+ msgType = GameMessage::MSG_DO_GUARD_POSITION;+ if( commandType == DO_COMMAND )+ TheInGameUI->queueGuardWaypoint( pos );+ }+ else if( TheInGameUI->isGuardArmed() ){msgType = GameMessage::MSG_DO_GUARD_POSITION;}@@ -999,7 +1007,7 @@ GameMessage::Type CommandTranslator::issueMoveToLocationCommand( const Coord3D *{msgType = GameMessage::MSG_DO_MOVETO;}- if( commandType == DO_COMMAND && !queuedAttack )+ if( commandType == DO_COMMAND && !queuedAttack && !queuedGuard ){GameMessage *movemsg = TheMessageStream->appendMessage( msgType );if (msgType == GameMessage::MSG_DO_ATTACK_OBJECT)diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cppindex 2ef18fc67..33c1aa038 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp@@ -4050,9 +4050,11 @@ static void peaceTimeTick( void )same goes for the tech buildings a match is fought over - an oil derrick changes hands fourtimes and spends the rest of the game at a tenth of its health.- So they mend themselves. Two seconds without a hit and the walls go back up, a fixed fraction+ So they mend themselves. Ten seconds without a hit and the walls go back up, a fixed fractionof full health a second, whether the building is standing empty, holding somebody's riflemen or- flying somebody's flag.+ flying somebody's flag. Slowly, and not while the fight is still going on: at two seconds and+ three percent a second a hospital cleared with a flamethrower was whole again before the squad+ that cleared it had walked over to it, so taking a building off somebody bought you nothing.Once a second, off the same object walk peace time uses. Tech buildings and garrisonablestructures are the test; KINDOF_CAPTURABLE is not, because it sits on every faction structure@@ -4064,8 +4066,8 @@ static void neutralBuildingRepairTick( void )if( now % LOGICFRAMES_PER_SECOND != 0 )return;- const UnsignedInt quietFrames = 2 * LOGICFRAMES_PER_SECOND;- const Real repairFractionPerSecond = 0.03f;+ const UnsignedInt quietFrames = 10 * LOGICFRAMES_PER_SECOND;+ const Real repairFractionPerSecond = 0.0125f;for( Object *obj = TheGameLogic->getFirstObject(); obj != NULL; obj = obj->getNextObject() ){diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cppindex 99b8ea150..58ed4052e 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp@@ -348,12 +348,15 @@ void W3DRadar::drawLandmarkIcon( Int pixelX, Int pixelY, Int width, Int height,} // end drawLandmarkIcon//--------------------------------------------------------------------------------------------------/** Collect the landmarks out of one radar object list. The shroud is deliberately not read here:- * a supply pile and an oil derrick stand where the map maker put them, and the lobby map preview- * has already shown where the money is. */+/** Collect the landmarks out of one radar object list. Ground the player has never been to keeps+ * its markers to itself: a dollar sign over unexplored country is a scouting report nobody paid+ * for. Once a place has been seen, its marker stays through the fog, because a supply pile and+ * an oil derrick do not walk away. *///-------------------------------------------------------------------------------------------------void W3DRadar::collectLandmarks( const RadarObject *listHead ){+ const Player *localPlayer = ThePlayerList->getLocalPlayer();+ const Int localPlayerIndex = localPlayer ? localPlayer->getPlayerIndex() : 0;for( const RadarObject *rObj = listHead; rObj; rObj = rObj->friend_getNext() ){@@ -363,6 +366,9 @@ void W3DRadar::collectLandmarks( const RadarObject *listHead )if( type == RADAR_LANDMARK_NONE )continue;+ if( obj->getShroudedStatus( localPlayerIndex ) >= OBJECTSHROUD_SHROUDED )+ continue;+RadarLandmark landmark;landmark.position = *obj->getPosition();landmark.type = type;diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cppindex 2fb64df1d..de91bdc8e 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp@@ -93,6 +93,11 @@ extern Real ControlBarUniformScale( void );* bar itself is laid out at. */static const Real BADGE_DESIGN_POINTS = 7.0f;+/** The queue count is the one marking a player reads at a glance in the middle of a fight - how+ * many more of these are still coming - and at seven points against a busy cameo it was a smudge+ * nobody found without looking for it. It gets its own size, and an opaque plate under it. */+static const Real COUNT_BADGE_DESIGN_POINTS = 11.0f;+// getBadgeFont ===============================================================/** The font the corner markings wear.*@@ -107,13 +112,13 @@ static const Real BADGE_DESIGN_POINTS = 7.0f;* grew away from the buttons it sits on. At 2560x1080 the markings came out half again too big.* One design size, times the bar's own scale, and a cameo looks the same on every monitor. *///=============================================================================-static GameFont *getBadgeFont( GameWindow *window )+static GameFont *getBadgeFont( GameWindow *window, Real designPoints = BADGE_DESIGN_POINTS ){GameFont *font = window->winGetFont();if( font == NULL )return NULL;- Int pointSize = REAL_TO_INT_FLOOR( BADGE_DESIGN_POINTS * ControlBarUniformScale() );+ Int pointSize = REAL_TO_INT_FLOOR( designPoints * ControlBarUniformScale() );if( pointSize < 6 )pointSize = 6;@@ -250,7 +255,7 @@ static void drawCountBadge( GameWindow *window, Int count )UnicodeString text;text.format( L"%d", count );- DisplayString *badge = badgeString( text, getBadgeFont( window ) );+ DisplayString *badge = badgeString( text, getBadgeFont( window, COUNT_BADGE_DESIGN_POINTS ) );if( badge == NULL )return;@@ -265,9 +270,10 @@ static void drawCountBadge( GameWindow *window, Int count )textPos.x = origin.x + size.x - plateWidth + 2;textPos.y = origin.y + size.y - height;- // same translucent plate the shortcut letter wears - button art can be any colour+ // a solid plate rather than the shortcut letter's translucent one: this number has to be legible+ // over whatever cameo is underneath it without the player stopping to look for itTheDisplay->drawFillRect( textPos.x - 2, textPos.y, plateWidth, height,- GameMakeColor( 0, 0, 0, 160 ) );+ GameMakeColor( 0, 0, 0, 230 ) );badge->draw( textPos.x, textPos.y, GameMakeColor( 255, 255, 255, 255 ),GameMakeColor( 0, 0, 0, 255 ) );