fix(engine,server): safe area clamp, analytics batch, achievement save order, daily rollover, replay validation, leaderboard opt-in (#56, #60, #61, #62, #66, #68)
Build and Deploy / build-and-push (push) Successful in 3m54s
Build and Deploy / build-and-push (push) Successful in 3m54s
- #66: Clamp safe-area insets to 25% of window height with warn!() on excess - #68: Move fire_flush outside per-event loop in analytics (batch flush once) - #56: Persist progress before marking reward_granted to prevent XP loss on crash - #60: Add DateRolloverTimer + check_date_rollover system for midnight seed refresh - #62: Add validate_header() in replay upload with mode/draw_mode allowlists - #61: Restore two-query leaderboard opt-in check (SELECT then UPDATE); original queries already in .sqlx cache; EXISTS variant would require sqlx prepare Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
//! `card_face_svg_pin.rs`.
|
||||
|
||||
use bevy::math::UVec2;
|
||||
use solitaire_engine::assets::icon_svg::{icon_svg, ICON_SIZES};
|
||||
use solitaire_engine::assets::icon_svg::{ICON_SIZES, icon_svg};
|
||||
use solitaire_engine::assets::rasterize_svg;
|
||||
|
||||
const EXPECTED: &[(u32, u64)] = &[
|
||||
@@ -50,10 +50,7 @@ fn rasterised_icon_bytes_match_pinned_hashes() {
|
||||
for ((actual_size, actual_hash), (expected_size, expected_hash)) in
|
||||
actual.iter().zip(EXPECTED.iter())
|
||||
{
|
||||
assert_eq!(
|
||||
actual_size, expected_size,
|
||||
"icon-size order drifted",
|
||||
);
|
||||
assert_eq!(actual_size, expected_size, "icon-size order drifted",);
|
||||
if actual_hash != expected_hash {
|
||||
mismatches.push(format!(
|
||||
" icon_{actual_size}: actual 0x{actual_hash:016x} expected 0x{expected_hash:016x}",
|
||||
@@ -87,7 +84,9 @@ fn compute_actual_hashes() -> Vec<(u32, u64)> {
|
||||
fn hash_rasterised(svg: &str, size: u32) -> u64 {
|
||||
let target = UVec2::new(size, size);
|
||||
let image = rasterize_svg(svg.as_bytes(), target).expect("rasterise icon SVG");
|
||||
let bytes = image.data.expect("rasterised image carries RGBA pixel data");
|
||||
let bytes = image
|
||||
.data
|
||||
.expect("rasterised image carries RGBA pixel data");
|
||||
fnv1a(&bytes)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user