Fix settings switches, training skill bars, editor placement and pointer

- Settings: every unlocked switch is stored, as in the original; the
  whitelist of cells with a consumer is gone (J9, O3, ... no longer
  refused). Locks and 0/1 / numeric limits still apply.
- Training: the seven skill bars show the player row under the pointer
  (FUN_00049399).
- Line-up: the field stays editable inside the set-piece editor while no
  taker kind is chosen.
- Pointer: the original 11x11 bitmap is the default pointer on every
  page, not only on the pitch page.

Refs #57, #59, #60, #62.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-04 19:44:46 +01:00
1 parent 04ff3b7656
commit af634ae8ff
10 files changed
+113 -67

No files matched your search

+7 -3
View File
@@ -10,7 +10,9 @@
namespace bmh::app {
// SDL owns pointer position; the UI supplies only the original bitmap/colors.
// SDL owns pointer position; the UI supplies only the original bitmap/colors. Everywhere but on the
// pitch page the pointer is the original's default 11x11 bitmap (set_default); the pitch page
// passes the same bitmap with its position-colour fill.
class PitchPointer {
public:
~PitchPointer() { clear(); }
@@ -22,7 +24,9 @@ public:
}
pixels_.reset();
}
void show(const std::optional<std::array<uint32_t,121>>& pixels, SDL_Renderer* renderer) {
void set_default(const std::optional<std::array<uint32_t,121>>& pixels) { default_ = pixels; }
void show(const std::optional<std::array<uint32_t,121>>& requested, SDL_Renderer* renderer) {
const auto& pixels = requested ? requested : default_;
if (!pixels) { SDL_SetCursor(SDL_GetDefaultCursor()); return; }
int width = 320, height = 240;
SDL_GetRendererOutputSize(renderer, &width, &height);
@@ -43,7 +47,7 @@ public:
}
private:
SDL_Cursor* cursor_ = nullptr;
std::optional<std::array<uint32_t,121>> pixels_;
std::optional<std::array<uint32_t,121>> pixels_, default_;
int scale_ = 1;
};