summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
AgeCommit message (Collapse)Author
2026-06-29phase 2: audio core, argv file loading, playback, non-blocking seekAdam Malczewski
(orchestrator-committed: Phase 2 agent (deepseek-v4-pro) completed the work and verified via build+run+screenshot, but its turn timed out before committing.)
2026-06-28import template from raylib-jamstackAdam Malczewski
2026-06-27fix: extract help text + checkbox into ui_render_overlayAdam Malczewski
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.
2026-06-27refactor: split single-file main.c into modular .h/.c pairsAdam Malczewski
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.
2026-06-27V1: preserve pre-refactor state (single-file main.c + harness docs)V1Adam Malczewski
2026-06-08ui: add X-axis positioning to all layout elementscyberdeckAdam Malczewski
- 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
2026-06-08ui: make smart play button and section nav configurableAdam Malczewski
- 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
2026-06-08ui: add tab bar, layout editor with drag-to-repositionAdam Malczewski
- 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
2026-06-08config: add key-value config file for UI layout positionsAdam Malczewski
- 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
2026-04-18rework study modeHEADmainAdam Malczewski
2026-04-18add study modeAdam Malczewski
2026-04-18add a system for marking speaking sectionsAdam Malczewski
2026-04-18final touchesAdam Malczewski
2026-04-18update to working stateAdam Malczewski
2026-04-18initialAdam Malczewski