Repository navigation
feat(layouts): proportional 4:3 CRT aspect-ratio layouts (128x96 & multiples) - #44
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades all engines and animated clocks so the entire
4:3CRT landscape aspect-ratio family (128x96and all its multiples:64x48,96x72,128x96,192x144,256x192,384x288,512x384, both viaui_scale = "auto"and manual1x..4x) renders proportionally across the full horizontal and vertical canvas — with zero pixel impact on128x32,256x64,192x32,128x64,64x64, or TATE portrait displays.Highlights
4:3Family Isolation (DisplayGeometry::is_landscape_4x3_family):width > height && height * 2 > width(1.0 < w / h < 2.0) isolates4:3landscapes cleanly from all1:1squares,>= 2:1widescreens (64x32,128x64,128x32,192x64,256x64,192x32,256x32,384x64), and TATE portrait sizes.weather_page.rs): 3-band4:3CRT Weather Card (top centered header, middle2x*sweather icon + stacked right-aligned temperatures, bottom centered condition footer, scaled bys = (h / 96).max(1)).sysinfo.rs): Full-height proportional telemetry layouts across all 3 themes (Theme 04 full-width stacked HUD gauge bands,Theme 1Cyberpunk Neon centered2x2+ twin vertical meters,Theme 2centered2x2quadrants) with integer-scaled bitmap typography (draw_bitmap_string_scaled).fighter.rs): Uses a head-safe shared ground lineground_y_screen = (matrix_height - 1).max((2 + tallest) * scale)viacompute_pair_placement— sprites that fit vertically stand on the bottom edge instead of floating mid-air, while tall sprites exceeding the vertical resolution (e.g. Gouki108pxon128x96, orfighters_64on96x72) keep their head pinned2 * scalepx below the top (preserving walk-bob headroom) and set an imaginary off-screen ground line shared by both fighters so overflow crops cleanly at the legs/ankles.crypto.rs,stock.rs): Full-width Top-Quote + Bottom-Sparkline split terminal layout on4:3panels (s = (h / 96).max(1)).spotify.rs,google_cast.rs): Proportional cover art (58%ofh, clamped to44%ofw), balanced vertical text spacing (18%,38%,56%album/app line), and scaled equalizer/progress bar.dashboard/mod.rs): 3-band4:3Cockpit Grid (top square analog/digital clock + weather, middle split World Clocks + SysInfo, bottom full-width Market Ticker).theme.rs+src/engines/clocks/*):32(Pocket Index),33(World Clock),37(Words Clock), and41(Metal Slug Clock) on4:3panels>= 96x72.Yanchoring on tall landscapes (h >= 48) inCastleClock((h - 16 - 30)) andSonicClock((h - 16 - 39)), balances upper/middle sky bands inMarioClockandMegaManClock, adds crimson Pokédex bezels & scaled wing emblems inPokedexClock, adds integer-scaled framedWorldMapClock, auto-fittingWordsClock, and a non-overlapping Neo-Geo HUD bar inMetalSlugClock.media_showcase.rs,gnews.rs,agenda.rs): Proportional4:3poster/card spacing, dynamicstatic_pagedrow count inGNews(8lines on128x96), and up to8agenda rows on tall4:3canvases.Verification
test_base_128x32_and_256x64_bit_exact_zero_regression: 34/34 bit-exact FNV-1a framebuffer hashes unchanged on128x32and256x64.test_fighter_4x3_head_safe_overflow_vs_floor_anchor: Verifies floor-anchoring for fitting sprites (Chun-Li57px,Haohmaru63px),2 * scalewalk-bob-safe imaginary off-screen ground line for tall sprites (Gouki108px,Bison104px) across96x72,128x96, and256x192, and strict zero-regression on128x32and256x64.test_4x3_aspect_ratio_and_multiples_coverage&weather_4x3_crt_multiples_vertical_distribution: Verified across64x48,96x72,128x96,192x144,256x192,384x288,512x384.cargo clippy -- -D warnings,cargo test,validate_docs.py, andvalidate_rpi_release.pypassing (0warnings,0errors).