| Age | Commit message (Collapse) | Author |
|
(orchestrator-committed: Phase 2 agent (deepseek-v4-pro) completed the work
and verified via build+run+screenshot, but its turn timed out before committing.)
|
|
|
|
The help text and study-mode checkbox were inside ui_render_player, so they
only appeared when an audio file was loaded. In the original single-file
main.c they rendered unconditionally (outside the 'if loaded' block).
Extracted ui_render_overlay() — renders help text + checkbox — and call it
from main.c after either ui_render_player or ui_render_empty, matching the
original behavior.
Also added a screenshot mode (env STUDY_PLAYER_SCREENSHOT) for automated
visual testing: renders to an offscreen RenderTexture, fixes FBO alpha
artifacts (ClearBackground doesn't fill alpha on some Mesa drivers), and
exports a PNG. Verified all UI elements render correctly.
|
|
Decompose the 778-line src/main.c into 7 focused modules with separate
headers for code isolation and parallel agent development:
types.h shared types: PlayerState, SilenceRegion, UILayout, constants
player.{h,c} audio playback: load, play, pause, seek, update, format_time
study.{h,c} study mode: silence detection, portion navigation, auto-pause
ui.{h,c} rendering + input: fonts, colors, drawing, keyboard/mouse
config.{h,c} UI layout persistence (moved UILayout to types.h)
layout_editor.{h,c} layout editor tab (unchanged)
main.c thin composition root (main loop, tabs, platform glue)
Module boundaries follow the dispatch-project style:
- .h files are contracts (self-contained, #pragma once, forward-declare)
- .c files are private (static helpers, no cross-module .c includes)
- All shared state passed by pointer (PlayerState*/UIState*)
- font_data.h (xxd-generated array definition) included in exactly one .c
Updated documentation (AGENTS.md, ORCHESTRATOR.md, GLOSSARY.md, README.md,
tasks.md) and bin/ scripts (dispatch-style conventions, added bin/build-web).
Build: make clean && make -j$(nproc) exits 0 with zero warnings.
|
|
|
|
- UILayout gains titleX, statusX, helpX, smartPlayX, secNavX
- All elements freely draggable in both X and Y in Layout editor
- draw_text_centered() now takes centerX parameter
- section nav positions relative to secNavX
|
|
- UILayout gains smartPlayY and secNavY fields
- Smart play HOLD button now uses layout.smartPlayY
- Section nav prev/next buttons use layout.secNavY
- Both are draggable in Layout editor tab
- config_load/config_save handle new fields
|
|
- GuiTabBar from raygui v5.0 for Player/Layout tab switching
- Layout tab: 5 draggable element placeholders (Title, Bar, Status,
Play button, Help) — press+hold+drag to reposition
- Auto-save config file on tab switch from Layout back to Player
- config_save() added to config module
- raygui include path added to Makefile, warnings suppressed via
#pragma for third-party header
|
|
- src/config.h: UILayout struct + config_load() declaration
- src/config.c: key=value parser with defaults fallback
- src/main.c: replace hardcoded layout constants with config-driven UILayout
- Config file loaded from next to binary (study-player.cfg)
- Missing config file falls back to hardcoded defaults
|
|
|
|
|
|
|
|
|
|
|
|
|