@@ -122,9 +122,6 @@ struct LocalCoopState {
122122 // / Player 1 (index 0) is always marked as active when local coop is enabled
123123 std::array<LocalCoopPlayer, MaxLocalPlayers> players;
124124
125- // / D-pad repeat delay in milliseconds
126- static constexpr uint32_t DpadRepeatDelay = 300 ;
127-
128125 // / Panel ownership: which game player ID controls the currently open panels
129126 // / 0 = player 1 (default), 1-3 = local coop players 2-4
130127 // / Use -1 to indicate no explicit owner (falls back to player 1)
@@ -159,14 +156,6 @@ struct LocalCoopState {
159156 int64_t cameraSmoothScreenX = 0 ;
160157 int64_t cameraSmoothScreenY = 0 ;
161158
162- // / Dead zone radius in screen pixels - camera won't move if average player position
163- // / is within this distance from the current camera target
164- static constexpr int CameraDeadZone = 32 ;
165-
166- // / Camera smoothing factor (0.0 = no smoothing, 1.0 = instant)
167- // / Higher values = faster camera response but potentially jerky movement
168- static constexpr float CameraSmoothFactor = 0 .25f ;
169-
170159 // / Check if a local coop player owns the panels (not player 1)
171160 [[nodiscard]] bool HasPanelOwner () const { return panelOwnerPlayerId > 0 ; }
172161
@@ -209,11 +198,6 @@ struct LocalCoopState {
209198 [[nodiscard]] LocalCoopPlayer *GetPlayer (uint8_t playerId);
210199 [[nodiscard]] const LocalCoopPlayer *GetPlayer (uint8_t playerId) const ;
211200
212- // / Get the LocalCoopPlayer for a coop player (players 2-4) - deprecated, use GetPlayer instead
213- // / @param playerId Game player ID (1-3 for coop players)
214- // / @return Pointer to LocalCoopPlayer, or nullptr if invalid or player 1
215- [[nodiscard]] LocalCoopPlayer *GetCoopPlayer (uint8_t playerId);
216- [[nodiscard]] const LocalCoopPlayer *GetCoopPlayer (uint8_t playerId) const ;
217201};
218202
219203extern LocalCoopState g_LocalCoop;
@@ -531,9 +515,9 @@ void AssignLocalCoopSpellToSlot(uint8_t playerId, int slotIndex);
531515 * @brief Load available heroes for local co-op player selection.
532516 *
533517 * Excludes heroes already selected by other local players.
534- * @param playerId Game player ID (0 = player 1, 1-3 = coop players)
518+ * @param playerIdx Game player index (same as Players[] / g_LocalCoop. players[]: 0–3).
535519 */
536- void LoadAvailableHeroesForLocalPlayer (uint8_t playerId );
520+ void LoadAvailableHeroesForCoopSlot (uint8_t playerIdx );
537521
538522/* *
539523 * @brief Confirm character selection and spawn a local co-op player.
@@ -863,10 +847,9 @@ uint8_t GetLocalCoopStoreOwnerPlayerId();
863847/* *
864848 * @brief Close the active store and clear local co-op store ownership.
865849 *
866- * This is a convenience function that combines setting ActiveStore to None
867- * and clearing local co-op store ownership. Use this instead of manually
868- * setting ActiveStore = TalkID::None followed by ClearLocalCoopStoreOwner().
850+ * Sets ActiveStore to None and clears local co-op store ownership (e.g. stick input
851+ * for the prior store owner). Prefer this over assigning ActiveStore directly.
869852 */
870- void CloseStore ();
853+ void CloseLocalCoopStore ();
871854
872855} // namespace devilution
0 commit comments