diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout_editor.c | 6 | ||||
| -rw-r--r-- | src/study.c | 8 | ||||
| -rw-r--r-- | src/study.h | 2 | ||||
| -rw-r--r-- | src/ui.c | 16 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/layout_editor.c b/src/layout_editor.c index 0a40c59..bffc9c9 100644 --- a/src/layout_editor.c +++ b/src/layout_editor.c @@ -54,7 +54,7 @@ void layout_editor_draw(const char *exePath, UILayout *layout) Later checks overwrite earlier ones if they overlap — priority goes to elements drawn last / on top. */ - /* 6: Section nav buttons (two circles) */ + /* 6: Portion nav buttons (two circles) */ { float secPrevX = layout->secNavX - 65.0f; float secNextX = layout->secNavX + 65.0f; @@ -167,7 +167,7 @@ void layout_editor_draw(const char *exePath, UILayout *layout) layout->smartPlayX = mouse.x - dragOffsetX; layout->smartPlayY = mouse.y - dragOffsetY; break; - case 6: /* Section nav */ + case 6: /* Portion nav */ layout->secNavX = mouse.x - dragOffsetX; layout->secNavY = mouse.y - dragOffsetY; break; @@ -253,7 +253,7 @@ void layout_editor_draw(const char *exePath, UILayout *layout) draw_label("Play", r, f, borderColor); } - /* --- 6: Section nav buttons --- */ + /* --- 6: Portion nav buttons --- */ { Color f = (dragIndex == 6) ? highlightColor : fillColor; float secBtnRadius = 35.0f; diff --git a/src/study.c b/src/study.c index 7f402bd..f88ab18 100644 --- a/src/study.c +++ b/src/study.c @@ -130,7 +130,7 @@ int study_total_speaking_portions(const PlayerState *state) return state->silenceCount + 1; } -float study_segment_seek_target(const PlayerState *state, int portion) +float study_portion_seek_target(const PlayerState *state, int portion) { float pos = study_speaking_portion_start(state, portion); float target = pos * state->duration + (2.0f / 60.0f); @@ -171,8 +171,8 @@ void study_auto_pause_check(PlayerState *state, bool smartPlayHeld, bool spaceHe if (nowInSilence && !state->wasInSilence) { - /* Entering silence: jump to start of next speaking portion */ - float target = study_segment_seek_target(state, silIdx + 1); + /* Entering silence: seek to start of next speaking portion */ + float target = study_portion_seek_target(state, silIdx + 1); PauseMusicStream(state->music); SeekMusicStream(state->music, target); state->currentTime = target; @@ -183,7 +183,7 @@ void study_auto_pause_check(PlayerState *state, bool smartPlayHeld, bool spaceHe { /* Exiting silence: land at start of current speaking portion */ int portion = study_current_speaking_portion(state, pos); - float target = study_segment_seek_target(state, portion); + float target = study_portion_seek_target(state, portion); PauseMusicStream(state->music); SeekMusicStream(state->music, target); state->currentTime = target; diff --git a/src/study.h b/src/study.h index 0b7b030..22ae8f8 100644 --- a/src/study.h +++ b/src/study.h @@ -31,7 +31,7 @@ int study_total_speaking_portions(const PlayerState *state); /* Seek target (seconds) for jumping to a speaking portion. * Lands 2 render-frames (~33ms) into the padding zone. */ -float study_segment_seek_target(const PlayerState *state, int portion); +float study_portion_seek_target(const PlayerState *state, int portion); /* Is pos inside the padding zone of the given speaking portion? * Padding zone = [speaking_start, speaking_start + 0.25s/duration]. */ @@ -136,7 +136,7 @@ void ui_handle_input(UIState *ui, PlayerState *state, const UILayout *layout) player_play(state); } - /* --- Section nav buttons --- */ + /* --- Portion nav buttons --- */ { float progress = (state->duration > 0.0f) ? state->currentTime / state->duration : 0.0f; int portion = study_current_speaking_portion(state, progress) + 1; @@ -154,7 +154,7 @@ void ui_handle_input(UIState *ui, PlayerState *state, const UILayout *layout) bool inSil = (study_find_silence_at(state, pos) >= 0); bool inPad = study_in_padding_zone(state, pos, p); if ((inSil || inPad) && p > 0) p--; - float target = study_segment_seek_target(state, p); + float target = study_portion_seek_target(state, p); player_seek(state, target); state->wasInSilence = false; state->lastSilenceIdx = -1; @@ -164,7 +164,7 @@ void ui_handle_input(UIState *ui, PlayerState *state, const UILayout *layout) float pos = state->currentTime / state->duration; int p = study_current_speaking_portion(state, pos); if (p < total - 1) p++; - float target = study_segment_seek_target(state, p); + float target = study_portion_seek_target(state, p); player_seek(state, target); state->wasInSilence = false; state->lastSilenceIdx = -1; @@ -207,7 +207,7 @@ void ui_handle_input(UIState *ui, PlayerState *state, const UILayout *layout) { float pos = state->currentTime / state->duration; int portion = study_current_speaking_portion(state, pos); - float target = study_segment_seek_target(state, portion); + float target = study_portion_seek_target(state, portion); player_seek(state, target); player_play(state); } @@ -223,7 +223,7 @@ void ui_handle_input(UIState *ui, PlayerState *state, const UILayout *layout) bool inPad = study_in_padding_zone(state, pos, portion); if ((inSil || inPad) && portion > 0) portion--; - float target = study_segment_seek_target(state, portion); + float target = study_portion_seek_target(state, portion); player_seek(state, target); state->wasInSilence = false; state->lastSilenceIdx = -1; @@ -235,7 +235,7 @@ void ui_handle_input(UIState *ui, PlayerState *state, const UILayout *layout) int portion = study_current_speaking_portion(state, pos); int total = study_total_speaking_portions(state); if (portion < total - 1) portion++; - float target = study_segment_seek_target(state, portion); + float target = study_portion_seek_target(state, portion); player_seek(state, target); state->wasInSilence = false; state->lastSilenceIdx = -1; @@ -378,7 +378,7 @@ void ui_render_player(const UIState *ui, const PlayerState *state, else draw_play_icon(ppx, layout->btnY, 50, ui->textColor); - /* Speaking portion counter with prev/next section buttons */ + /* Speaking portion counter with prev/next portion buttons */ { int portion = study_current_speaking_portion(state, progress) + 1; int total = study_total_speaking_portions(state); @@ -394,7 +394,7 @@ void ui_render_player(const UIState *ui, const PlayerState *state, (Vector2){ portionX, portionY }, ui->szSmall, portionSpacing, ui->mutedColor); - /* Section nav buttons */ + /* Portion nav buttons */ float secPrevX = layout->secNavX - 65.0f; float secNextX = layout->secNavX + 65.0f; float secBtnY_draw = layout->secNavY; |
