Improve code modularity#109
Merged
Merged
Conversation
- Updated CMakeLists.txt files across various test directories to reflect new source file paths, particularly moving files into a structured `video` and `automation` directories. - Consolidated include directories to include all relevant subdirectories for easier management and reduced redundancy. - Adjusted source file paths in test files to match the new directory structure, ensuring all includes are correctly referenced. - Modified test stubs and other source files to use relative includes instead of traversing up the directory tree, enhancing readability and maintainability.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures the codebase into clearer module directories (e.g., video/, network/, script/, ui/, util/) and updates tests/build configuration to match the new layout, aiming to improve modularity and simplify include usage.
Changes:
- Reorganized source files into module subdirectories and updated the top-level
CMakeLists.txtaccordingly. - Standardized test and tool includes to use flat header names (e.g.,
"c64-script.h") backed by consolidated include directories. - Updated test CMake configurations to point at the new source locations and shared include-dir sets.
Reviewed changes
Copilot reviewed 16 out of 118 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | Updates plugin target sources and adds module include directories for the new layout. |
| tests/filter/afterglow/CMakeLists.txt | Switches filter test sources to src/video/* and expands include dirs. |
| tests/filter/pipeline/CMakeLists.txt | Switches pipeline test sources to src/video/* and expands include dirs. |
| tests/script/c64script_test_stubs.c | Updates includes to flat header names. |
| tests/script/c64script_test_stubs.h | Updates includes to flat header names. |
| tests/script/fuzz/CMakeLists.txt | Updates fuzz target source paths to new src/script/* layout and uses shared include dirs. |
| tests/script/generate_trace.c | Updates include to flat header name. |
| tests/script/test_automation_playlist.c | Updates includes to flat header names. |
| tests/script/test_c64script_thread_safety.c | Updates includes to flat header names. |
| tests/script/test_file_paths.c | Updates include to flat header name. |
| tests/script/test_interact_key.c | Updates includes to flat header names. |
| tests/script/test_keyboard_worker.c | Updates includes to flat header names. |
| tests/script/test_playlist_window.c | Updates include to flat header name. |
| tests/script/test_properties_refresh.c | Updates includes to flat header names. |
| tests/script/test_trace_simple.c | Updates include to flat header name. |
| src/audio/c64-audio.h | Adds/moves audio module public header into src/audio/. |
| src/automation/c64-automation.h | Adds/moves automation module public header into src/automation/. |
| src/automation/c64-automation-hvsc.h | Adds/moves HVSC helper header into src/automation/. |
| src/automation/c64-automation-internal.h | Adds/moves internal automation header into src/automation/. |
| src/automation/c64-automation-playlist.h | Adds/moves automation playlist header into src/automation/. |
| src/network/c64-network-buffer.h | Adds/moves network buffering API header into src/network/. |
| src/network/c64-network-fifo.h | Adds/moves stage-1 FIFO header into src/network/. |
| src/network/c64-network.h | Adds/moves network API header into src/network/. |
| src/network/c64-protocol.c | Adds/moves protocol implementation into src/network/. |
| src/network/c64-protocol.h | Adds/moves protocol header into src/network/. |
| src/network/c64-rest-client.h | Adds/moves REST client header into src/network/. |
| src/record/c64-record-audio.c | Adds/moves audio recording implementation into src/record/. |
| src/record/c64-record-audio.h | Adds/moves audio recording header into src/record/. |
| src/record/c64-record-frames.c | Adds/moves BMP frame saving implementation into src/record/. |
| src/record/c64-record-frames.h | Adds/moves BMP frame saving header into src/record/. |
| src/record/c64-record-network.c | Adds/moves network CSV logging implementation into src/record/. |
| src/record/c64-record-network.h | Adds/moves network CSV logging header into src/record/. |
| src/record/c64-record-obs.c | Adds/moves OBS CSV logging implementation into src/record/. |
| src/record/c64-record-obs.h | Adds/moves OBS CSV logging header into src/record/. |
| src/record/c64-record-video.c | Adds/moves AVI recording implementation into src/record/. |
| src/record/c64-record-video.h | Adds/moves AVI recording header into src/record/. |
| src/record/c64-record.c | Adds/moves recording coordinator implementation into src/record/. |
| src/record/c64-record.h | Adds/moves recording coordinator header into src/record/. |
| src/script/frontend/c64-script-ast.c | Adds/moves script AST implementation into src/script/frontend/. |
| src/script/frontend/c64-script-ast.h | Adds/moves script AST header into src/script/frontend/. |
| src/script/frontend/c64-script-parser.h | Adds/moves script parser header into src/script/frontend/. |
| src/script/frontend/c64-script-token.h | Adds/moves script tokenizer header into src/script/frontend/. |
| src/script/runtime/c64-script-builtins.c | Adds/moves runtime builtins implementation into src/script/runtime/. |
| src/script/runtime/c64-script-builtins.h | Adds/moves runtime builtins header into src/script/runtime/. |
| src/script/runtime/c64-script-executor.h | Adds/moves executor public header into src/script/runtime/. |
| src/script/runtime/c64-script-runtime.h | Adds/moves runtime context header into src/script/runtime/. |
| src/script/vm/c64-script-bytecode.h | Adds/moves bytecode compiler header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-builtins.h | Adds/moves VM dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-config.h | Adds/moves VM dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-core.h | Adds/moves VM dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-drives.h | Adds/moves VM dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-effects.c | Adds/moves VM effects dispatcher implementation into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-effects.h | Adds/moves VM effects dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-io.h | Adds/moves VM IO dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-keyboard.c | Adds/moves VM keyboard dispatcher implementation into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-keyboard.h | Adds/moves VM keyboard dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-machine.c | Adds/moves VM machine dispatcher implementation into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-machine.h | Adds/moves VM machine dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-memory.c | Adds/moves VM memory dispatcher implementation into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch-memory.h | Adds/moves VM memory dispatcher header into src/script/vm/. |
| src/script/vm/c64-script-vm-dispatch.c | Adds/moves VM dispatch stub into src/script/vm/. |
| src/script/vm/c64-script-vm-internal.h | Adds/moves VM internal header into src/script/vm/. |
| src/script/vm/c64-script-vm-trace.c | Adds/moves VM trace recording implementation into src/script/vm/. |
| src/script/vm/c64-script-vm.c | Adds/moves VM implementation into src/script/vm/. |
| src/script/vm/c64-script-vm.h | Adds/moves VM public header into src/script/vm/. |
| src/ui/c64-interact-key.c | Adds/moves UI key translation implementation into src/ui/. |
| src/ui/c64-interact-key.h | Adds/moves UI key translation header into src/ui/. |
| src/ui/c64-keyboard.h | Adds/moves keyboard public header into src/ui/. |
| src/ui/c64-playlist-window.c | Adds/moves playlist window implementation into src/ui/. |
| src/ui/c64-playlist-window.h | Adds/moves playlist window header into src/ui/. |
| src/ui/c64-properties-refresh.c | Adds/moves properties refresh implementation into src/ui/. |
| src/ui/c64-properties-refresh.h | Adds/moves properties refresh header into src/ui/. |
| src/ui/c64-properties.h | Adds/moves properties public header into src/ui/. |
| src/util/c64-av-sync.h | Adds/moves A/V sync header into src/util/. |
| src/util/c64-file.c | Adds/moves filesystem utility implementation into src/util/. |
| src/util/c64-file.h | Adds/moves filesystem utility header into src/util/. |
| src/util/c64-logging.h | Adds/moves shared logging utilities header into src/util/. |
| src/util/c64-version.c | Adds/moves version string implementation into src/util/. |
| src/util/c64-version.h | Adds/moves version header into src/util/. |
| src/video/c64-color.c | Adds/moves color conversion LUT + pixel conversion implementation into src/video/. |
| src/video/c64-color.h | Adds/moves color conversion LUT + palette globals header into src/video/. |
| src/video/c64-effect-afterglow.h | Adds/moves afterglow effect header into src/video/. |
| src/video/c64-effect.c | Adds/moves effect preset loading/apply implementation into src/video/. |
| src/video/c64-effect.h | Adds/moves effect preset API header into src/video/. |
| src/video/c64-logo.h | Adds/moves logo rendering header into src/video/. |
| src/video/c64-palette.h | Adds/moves palette system API header into src/video/. |
| src/video/c64-stream-effects.h | Adds/moves stream effects API header into src/video/. |
| src/video/c64-video.h | Adds/moves video module header into src/video/. |
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.
videoandautomationdirectories.