diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
index de6a90b..efcfa6a 100644
--- a/THIRD_PARTY_NOTICES.md
+++ b/THIRD_PARTY_NOTICES.md
@@ -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.
diff --git a/assets/modern/art/gui-assets.json b/assets/modern/art/gui-assets.json
index 2deaac9..3665728 100644
--- a/assets/modern/art/gui-assets.json
+++ b/assets/modern/art/gui-assets.json
@@ -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
+ ]
}
}
}
diff --git a/assets/modern/art/pitch-2.jpg b/assets/modern/art/pitch-2.jpg
deleted file mode 100644
index 9f03469..0000000
Binary files a/assets/modern/art/pitch-2.jpg and /dev/null differ
diff --git a/assets/modern/art/rain-1.jpg b/assets/modern/art/rain-1.jpg
new file mode 100644
index 0000000..6deabea
Binary files /dev/null and b/assets/modern/art/rain-1.jpg differ
diff --git a/assets/modern/art/rain-2.jpg b/assets/modern/art/rain-2.jpg
new file mode 100644
index 0000000..c8246f7
Binary files /dev/null and b/assets/modern/art/rain-2.jpg differ
diff --git a/assets/modern/art/rain-3.jpg b/assets/modern/art/rain-3.jpg
new file mode 100644
index 0000000..e1fa161
Binary files /dev/null and b/assets/modern/art/rain-3.jpg differ
diff --git a/assets/modern/art/rain-4.jpg b/assets/modern/art/rain-4.jpg
new file mode 100644
index 0000000..35aecfb
Binary files /dev/null and b/assets/modern/art/rain-4.jpg differ
diff --git a/assets/modern/art/rain-5.jpg b/assets/modern/art/rain-5.jpg
new file mode 100644
index 0000000..8dc7edd
Binary files /dev/null and b/assets/modern/art/rain-5.jpg differ
diff --git a/src/modern/ui/live_screens.inc b/src/modern/ui/live_screens.inc
index 642dadf..ac9349a 100644
--- a/src/modern/ui/live_screens.inc
+++ b/src/modern/ui/live_screens.inc
@@ -126,9 +126,9 @@ std::string App::live_weather_icon(int code, double size) {
else g = cloud("#aeb6ba") + "";
return picture(renderer_.diagram("mv-weather-" + std::to_string(std::clamp(code, 0, 7)), "", 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();
- if (code >= 4 && gui_.contains("match.pitch-2")) return "match.pitch-2";
- std::vector 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 numbers) {
+ std::vector 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 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()) 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.