Rain and snow show rain photographs behind the match sheet

Five rain photographs replace the wet pitch picture, which showed a branded
ball. Snow uses the one with sleet on the pane. They are listed with the
pitch photographs in the third-party notices.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-17 09:15:15 +01:00
1 parent 23a4121d17
commit 52157159cb
9 files changed
+67 -21

No files matched your search

+2 -2
View File
@@ -24,9 +24,9 @@ OpenBMH's own code and documentation use GPL-3.0-only. This does not replace the
| LunaSVG / bundled PlutoVG (optional editor) | LunaSVG 3.5.0 and its tracked PlutoVG sources | MIT | [LunaSVG](docs/licenses/LunaSVG.txt), [PlutoVG](docs/licenses/PlutoVG.txt) |
| pugixml (optional editor) | 1.15 | MIT | [notice](docs/licenses/pugixml.txt) |
| [Nuked OPL3](https://github.com/nukeykt/Nuked-OPL3/tree/765ec962e473aeb767e4cba74ffdc8f588ffbfe8) | Commit `765ec962e473aeb767e4cba74ffdc8f588ffbfe8` | LGPL-2.1-or-later | [LGPL-2.1.txt](docs/licenses/LGPL-2.1.txt), [copyright and source notice](docs/licenses/Nuked-OPL3-notices.txt) |
| Pitch photographs `assets/modern/art/pitch-1.jpg` to `pitch-9.jpg` | Unmodified downloads from [Pexels](https://www.pexels.com/), supplied by the maintainer | [Pexels License](https://www.pexels.com/license/); not GPL | This entry; the individual photo pages and photographers are not recorded |
| Pitch and rain photographs `assets/modern/art/pitch-*.jpg` and `rain-*.jpg` | Unmodified downloads from [Pexels](https://www.pexels.com/), supplied by the maintainer | [Pexels License](https://www.pexels.com/license/); not GPL | This entry; the individual photo pages and photographers are not recorded |
The pitch photographs are not covered by OpenBMH's GPL license. They remain under the Pexels License, which permits free use and modification without attribution but does not permit selling unaltered copies or offering the photographs on other stock or wallpaper services, and does not allow depicted brands or people to appear as endorsing a product. Anyone redistributing them apart from the game must follow those terms. Whoever replaces or adds a photograph should record its Pexels page and photographer here.
The pitch and rain photographs are not covered by OpenBMH's GPL license. They remain under the Pexels License, which permits free use and modification without attribution but does not permit selling unaltered copies or offering the photographs on other stock or wallpaper services, and does not allow depicted brands or people to appear as endorsing a product. Anyone redistributing them apart from the game must follow those terms. Whoever replaces or adds a photograph should record its Pexels page and photographer here.
The miniz implementation provides a zlib-compatible API; it is not the zlib library. FreeType's internal gzip module includes its bundled zlib code; an external zlib library is not linked by the pinned build. SDL2 and nativefiledialog-extended use the **zlib license**, which is distinct from using zlib code. A system-library build or distributor's package can have additional runtime dependencies; its notices must match the libraries actually included.
+50 -10
View File
@@ -352,16 +352,6 @@
1
]
},
"match.pitch-2": {
"file": "pitch-2.jpg",
"sha256": "16c51e447404b998e31dc9ce3151b823d3a5776bf0ef6ada4d14ebbc897001fe",
"crop": [
0,
0,
1,
1
]
},
"match.pitch-3": {
"file": "pitch-3.jpg",
"sha256": "53c95ecc2a4ca6c3122af97f10dd0025ce1fc380b99eb9356c1d151bad7dadeb",
@@ -431,6 +421,56 @@
1,
1
]
},
"match.rain-1": {
"file": "rain-1.jpg",
"sha256": "7af76a02111c07a5978bb22f8e03ac9c210fe2917fc07b36d04e4d5d07ebfec3",
"crop": [
0,
0,
1,
1
]
},
"match.rain-2": {
"file": "rain-2.jpg",
"sha256": "0e9668add34f943c62c5708cd32bdef7b20497a167d2f1b3d8d07f0b06b94125",
"crop": [
0,
0,
1,
1
]
},
"match.rain-3": {
"file": "rain-3.jpg",
"sha256": "51861b1190643d76f2066753db1bd2178d414eac1644062512f794ac36abec14",
"crop": [
0,
0,
1,
1
]
},
"match.rain-4": {
"file": "rain-4.jpg",
"sha256": "6d08dc63b792a79de6e5ba1a6b1b618bc13efc75dae1525cb9a0e6973dcb36ee",
"crop": [
0,
0,
1,
1
]
},
"match.rain-5": {
"file": "rain-5.jpg",
"sha256": "330b69e34cd31ab260a38ae5e2b02110a6c4b7b8ebf5231f0d48cb7193e5fda2",
"crop": [
0,
0,
1,
1
]
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

+15 -9
View File
@@ -126,9 +126,9 @@ std::string App::live_weather_icon(int code, double size) {
else g = cloud("#aeb6ba") + "<g fill='#8fb0c8'><circle cx='14' cy='35' r='1.7'/><circle cx='21' cy='36.5' r='1.7'/><circle cx='28' cy='35' r='1.7'/></g>";
return picture(renderer_.diagram("mv-weather-" + std::to_string(std::clamp(code, 0, 7)), "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'>" + g + "</svg>", 160), size, size);
}
// The picture behind the match sheet: one of the pitch photographs. The home club keeps its
// picture; in rain or snow it is the wet pitch at dusk. Empty when the match is played in a
// hall or the pictures are not installed.
// The picture behind the match sheet. In fair weather it is one of the pitch photographs and
// the home club keeps its picture; in rain it is one of the rain photographs, in snow the one
// with sleet on the pane. Empty when the match is played in a hall or no picture is installed.
std::string App::live_backdrop() const {
if (scene_ != "live" || !live_.available()) return {};
try {
@@ -141,14 +141,20 @@ std::string App::live_backdrop() const {
int code = 0;
if (match->contains("weather") && match->at("weather").is_object() && match->at("weather").value("rain", Json()).is_number_integer())
code = match->at("weather").at("rain").get<int>();
if (code >= 4 && gui_.contains("match.pitch-2")) return "match.pitch-2";
std::vector<std::string> fair;
for (const int number : {1, 3, 4, 5, 6, 7, 8, 9})
if (const std::string key = "match.pitch-" + std::to_string(number); gui_.contains(key)) fair.push_back(key);
if (fair.empty()) return {};
const auto installed = [&](const char *family, std::initializer_list<int> numbers) {
std::vector<std::string> keys;
for (const int number : numbers)
if (const std::string key = std::string(family) + std::to_string(number); gui_.contains(key)) keys.push_back(key);
return keys;
};
std::vector<std::string> pictures;
if (code >= 6) pictures = installed("match.rain-", {4});
if (pictures.empty() && code >= 4) pictures = installed("match.rain-", {1, 2, 3, 4, 5});
if (pictures.empty()) pictures = installed("match.pitch-", {1, 3, 4, 5, 6, 7, 8, 9});
if (pictures.empty()) return {};
size_t hash = 2166136261u;
for (const unsigned char c : match->at("home").at("id").get<std::string>()) hash = (hash ^ c) * 16777619u;
return fair[hash % fair.size()];
return pictures[hash % pictures.size()];
} catch (const std::exception &) { return {}; }
}
// Played in a hall: the fixture says so, or the engine named the competition a hall tournament.