mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 05:46:03 +00:00
chore: remove source comments and unused code, translate every missing string (#1965)
* chore(i18n): translate every missing string in all locales Adds the 87 strings the bottom-screen Dashboard and in-game stats pages introduced to all 32 locales, plus the 51 older settings strings Japanese and the 50 Chinese locales were still missing. Every locale now has all 3456 translatable strings with the same placeholders as English. Also translates 36 entries that were still English where the language does not use the English word, and makes es-419 touch_app_id use the same %1$s placeholder as English. * chore(patches): drop comments from the lines downstream patches add Removes comment lines and trailing comments from lines our patches add, with hunk headers recounted. Lines that a later patch uses as context and the upstream backport 0123 are left as they are. The gamescope, FEX, proot and xodus series still apply to their pinned sources, and the patched trees differ only in those comments. test_hud_frames now finds the HUD writer by its first declaration. * docs: credit Greenlight, Better xCloud, viture-v2, GameNative and DiRTTelemetryErrorFix These were credited only in source headers and NOTICE files. * chore: remove source comments and unused functions Removes explanatory comments from first-party Kotlin, Java, C, C++, Rust, TypeScript, Python, shell, Gradle, CMake and workflow files. License and attribution headers stay, and vendored third-party trees, generated files and license files are untouched. A shellcheck directive is kept, and udevmon's fallthrough comments became fallthrough attributes. Syntax trees and token streams match the previous sources apart from the comments and Python docstrings. Module docstrings that argparse prints are kept, and device-smoke.sh prints the same --help text from a heredoc. Also removes 37 functions and 4 fields that nothing referenced. * chore: remove comments from the Syncthing integration and the latest main sources * docs: credit Syncthing and the syncthing-android fork * chore(i18n): translate the Syncthing strings in all locales The 107 strings the Syncthing integration added are now in all 32 locales. sync_web_path_locked names the Syncthing tab by its label. * docs: credit @xXJSONDeruloXx for the HUD metric readers The CPU, GPU load, thermal and battery readers come from their PerformanceHudView pull requests #777, #877, #991, #1406 and #1573. The FusionHUD credit line is unchanged. * docs: credit the HUD metric readers to @xXJSONDeruloXx's work
This commit is contained in:
1 parent
d730f0fa8b
commit
c5577478ca
511 files changed
+6813
-4068
No files matched your search
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Embed droiddeck-boot-sound.wav into droiddeck-boot.html (MP3, base64) for the preview page."""
|
||||
import base64, re, subprocess
|
||||
from pathlib import Path
|
||||
here = Path(__file__).parent
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Render the DroidDeck boot animation to .webm (Steam) or .mp4 (H.264).
|
||||
|
||||
Usage: python3 render.py [WIDTH] [HEIGHT] [FPS] [OUT] [light|dark]
|
||||
python3 render.py 1280 720 30 droiddeck-boot.webm
|
||||
python3 render.py 1920 1080 60 droiddeck-boot.mp4
|
||||
python3 render.py 1280 720 30 droiddeck-boot-dark.webm dark
|
||||
|
||||
Needs: pip install playwright && playwright install chromium, plus ffmpeg with libvpx.
|
||||
The animation is drawn by droiddeck-boot.html (same folder); each frame gets real
|
||||
motion blur (180-degree shutter, up to 48 sub-frames when things move fast).
|
||||
"""
|
||||
import base64, os, shutil, subprocess, sys, tempfile, time
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
"""DroidDeck boot animation: procedural sound design.
|
||||
|
||||
Every sound is synthesized (no samples) and placed on the exact physics events the animation
|
||||
engine reports (events.json, exported by events.py). Key: D major.
|
||||
|
||||
legs (arch) lands on a muted D
|
||||
ball lands on A, the second bounce a quieter echo
|
||||
bowl lands on F#
|
||||
balancing silence
|
||||
jump silence
|
||||
lock a soft landing in the same voice, then all those notes together as the D chord
|
||||
|
||||
Usage: python3 sound.py [events.json] [out.wav]
|
||||
"""
|
||||
import json, sys
|
||||
import numpy as np
|
||||
from scipy import signal
|
||||
@@ -32,7 +18,6 @@ D3, A3, D4, E4, Fs4, A4, B4, Cs5, D5, E5, Fs5, A5, D6 = [hz(n) for n in (50, 57,
|
||||
def tt(dur): return np.arange(int(dur * SR)) / SR
|
||||
|
||||
def edge(x, a_ms=1.0, r_ms=4.0):
|
||||
"""Click-free start and end."""
|
||||
na, nr = max(1, int(a_ms * SR / 1000)), max(1, int(r_ms * SR / 1000))
|
||||
x[:na] *= np.sin(np.linspace(0, np.pi / 2, na)) ** 2
|
||||
x[-nr:] *= np.cos(np.linspace(0, np.pi / 2, nr)) ** 2
|
||||
@@ -51,7 +36,6 @@ def modal(freqs, decays, amps, dur):
|
||||
return y
|
||||
|
||||
def glide(f0, f1, tau, dur):
|
||||
"""Sine whose pitch moves exponentially from f0 to f1."""
|
||||
t = tt(dur); f = f1 + (f0 - f1) * np.exp(-t / tau)
|
||||
return np.sin(2 * np.pi * np.cumsum(f) / SR)
|
||||
|
||||
@@ -69,7 +53,6 @@ def put(t0, st, gain=1.0):
|
||||
j = min(N, i + st.shape[1]); MIX[:, i:j] += gain * st[:, :j - i]
|
||||
|
||||
def wood(amp, f0=520, size=1.0, thump=0.0, dur=.35):
|
||||
"""Hard wood / toy-block clack. thump adds body for heavy landings."""
|
||||
r = [1, 1.93, 2.81, 4.13, 5.62]
|
||||
y = modal([f0 * k for k in r], [s * size for s in (.055, .034, .022, .014, .009)], [1, .55, .42, .26, .16], dur)
|
||||
y += .7 * noise_burst(dur, 1400, 7500, .0035)
|
||||
@@ -77,7 +60,6 @@ def wood(amp, f0=520, size=1.0, thump=0.0, dur=.35):
|
||||
return edge(y * amp)
|
||||
|
||||
def bonk(amp, f):
|
||||
"""Hollow rubber ball on a board: round pitched body, soft click, tiny board knock."""
|
||||
d = .42; t = tt(d)
|
||||
y = glide(f * 1.28, f, .018, d) * np.exp(-t / (.09 + .05 * amp))
|
||||
y += .22 * glide(f * 2.45, f * 2.3, .02, d) * np.exp(-t / .035)
|
||||
@@ -87,7 +69,6 @@ def bonk(amp, f):
|
||||
return edge(y * amp, a_ms=.6)
|
||||
|
||||
def bowl_ring(amp, f=A4, dur=2.4, dscale=1.0):
|
||||
"""Struck metal bowl: inharmonic partials, each split in two for the slow beating shimmer."""
|
||||
t = tt(dur); y = np.zeros_like(t)
|
||||
for k, dec, a, beat in zip((1, 2.71, 5.12, 8.21), tuple(d * dscale for d in (1.25, .62, .3, .15)), (1, .45, .24, .12), (.9, 1.7, 2.6, 3.1)):
|
||||
for s in (-1, 1):
|
||||
@@ -107,7 +88,6 @@ def marimba(f, amp, damp=1.0):
|
||||
return edge(y * amp, a_ms=1.5, r_ms=40)
|
||||
|
||||
def svf_whoosh(env, fc, q=.9):
|
||||
"""Noise through a band-pass whose centre follows fc(t): air moving past a spinning piece."""
|
||||
x = rng.standard_normal(len(env)); y = np.zeros_like(x); ic1 = ic2 = 0.0
|
||||
for i in range(len(x)):
|
||||
g = np.tan(np.pi * min(fc[i], SR * .45) / SR); k = 1 / q
|
||||
@@ -117,7 +97,6 @@ def svf_whoosh(env, fc, q=.9):
|
||||
return y * env
|
||||
|
||||
def epiano(f, amp, dur=2.8, decay=1.5):
|
||||
"""FM electric piano: bright tine at the strike that mellows as the index falls."""
|
||||
t = tt(dur)
|
||||
idx = 1.7 * np.exp(-t / .22) + .22
|
||||
y = np.sin(2 * np.pi * f * t + idx * np.sin(2 * np.pi * f * t))
|
||||
@@ -125,7 +104,6 @@ def epiano(f, amp, dur=2.8, decay=1.5):
|
||||
return edge(y * np.exp(-t / decay) * amp, a_ms=3, r_ms=60)
|
||||
|
||||
def tock(f, amp, decay=.42, sub=0.0):
|
||||
"""A landing as a muted note in the chord's own FM e-piano voice: felt contact, no pitch bend."""
|
||||
d = 1.5; t = tt(d)
|
||||
idx = 1.3 * np.exp(-t / .07) + .18
|
||||
y = np.sin(2 * np.pi * f * t + idx * np.sin(2 * np.pi * f * t)) * np.exp(-t / decay)
|
||||
|
||||
Reference in new issue
Block a user