diff options
| -rw-r--r-- | cmake/DemoCodegen.cmake | 8 | ||||
| -rw-r--r-- | cmake/DemoTools.cmake | 7 | ||||
| -rwxr-xr-x | tools/seq_compiler_v2.py | 18 | ||||
| -rw-r--r-- | workspaces/main/workspace.cfg | 2 |
4 files changed, 29 insertions, 6 deletions
diff --git a/cmake/DemoCodegen.cmake b/cmake/DemoCodegen.cmake index d27e9eb..e84e17b 100644 --- a/cmake/DemoCodegen.cmake +++ b/cmake/DemoCodegen.cmake @@ -119,16 +119,16 @@ endfunction() # Generation Targets # ============================================================================= -# Timeline compilation +# Timeline compilation (v2) set(DEMO_SEQ_PATH ${WORKSPACE_TIMELINE}) set(GENERATED_TIMELINE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/generated/timeline.cc) add_custom_command( OUTPUT ${GENERATED_TIMELINE_CC} COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/src/generated - COMMAND ${SEQ_COMPILER_CMD} ${DEMO_SEQ_PATH} ${GENERATED_TIMELINE_CC} - DEPENDS ${SEQ_COMPILER_DEPENDS} ${DEMO_SEQ_PATH} + COMMAND ${SEQ_COMPILER_V2_CMD} ${DEMO_SEQ_PATH} --output ${GENERATED_TIMELINE_CC} + DEPENDS ${SEQ_COMPILER_V2_DEPENDS} ${DEMO_SEQ_PATH} src/gpu/demo_effects.h - COMMENT "Compiling demo sequence from workspace ${DEMO_WORKSPACE}..." + COMMENT "Compiling v2 demo sequence from workspace ${DEMO_WORKSPACE}..." ) add_custom_target(generate_timeline ALL DEPENDS ${GENERATED_TIMELINE_CC}) diff --git a/cmake/DemoTools.cmake b/cmake/DemoTools.cmake index 8c589f1..f3a9470 100644 --- a/cmake/DemoTools.cmake +++ b/cmake/DemoTools.cmake @@ -13,7 +13,7 @@ else() set(ASSET_PACKER_DEPENDS asset_packer) endif() -# Sequence compiler tool +# Sequence compiler tool (v1) if(DEFINED SEQ_COMPILER_PATH) set(SEQ_COMPILER_CMD ${SEQ_COMPILER_PATH}) set(SEQ_COMPILER_DEPENDS ${SEQ_COMPILER_PATH}) @@ -23,6 +23,11 @@ else() set(SEQ_COMPILER_DEPENDS seq_compiler) endif() +# Sequence compiler tool (v2 - Python) +set(SEQ_COMPILER_V2_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/tools/seq_compiler_v2.py) +set(SEQ_COMPILER_V2_CMD ${CMAKE_COMMAND} -E env python3 ${SEQ_COMPILER_V2_SCRIPT}) +set(SEQ_COMPILER_V2_DEPENDS ${SEQ_COMPILER_V2_SCRIPT}) + # Tracker compiler tool if(DEFINED TRACKER_COMPILER_PATH) set(TRACKER_COMPILER_CMD ${TRACKER_COMPILER_PATH}) diff --git a/tools/seq_compiler_v2.py b/tools/seq_compiler_v2.py index 6ae6283..cb30585 100755 --- a/tools/seq_compiler_v2.py +++ b/tools/seq_compiler_v2.py @@ -479,6 +479,24 @@ def main(): cpp = generate_cpp(seq, sorted_effects, aliases, args.flatten) all_cpp += cpp + '\n' + # Generate compatibility stubs for v1 API + all_cpp += ''' +// V1 compatibility stubs (TODO: Replace with proper v2 integration) +#include "gpu/effect.h" + +void LoadTimeline(MainSequence& main_seq, const GpuContext& ctx) { + // TODO: Integrate v2 sequences with MainSequence + // For now, this is a no-op to allow linking + (void)main_seq; + (void)ctx; +} + +float GetDemoDuration() { + // TODO: Calculate from v2 sequences + return 40.0f; +} +''' + # Write output with open(args.output, 'w') as f: f.write(all_cpp) diff --git a/workspaces/main/workspace.cfg b/workspaces/main/workspace.cfg index 5eff423..feaa3f1 100644 --- a/workspaces/main/workspace.cfg +++ b/workspaces/main/workspace.cfg @@ -5,7 +5,7 @@ version = "1.0" [build] target = "demo64k" -timeline = "timeline.seq" +timeline = "timeline_v2.seq" # music = "pop_punk_drums.track" music = "beat_test.track" assets = "assets.txt" |
