dragonbane

DTM Splicing Feature

Dec 24th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. -Currently loaded dtm (verify its in playback mode and paused) used to attach too
  2.  
  3. -UI: Select dtm to take data from (file browser)
  4. -UI: Select frame range from...to (from = empty, assume 0, to = empty, take total frame count) (text fields)
  5. -UI: Maybe allow to input bytes per input frame for legacy dtm support
  6. -UI: Select output destination
  7.  
  8. -to - from = amount of frames to attach (add to total frame count of current dtm)
  9. -Get total amount of input frames from selected dtm and divide by total amount of visual frames = factor
  10. -factor * amount of frames to attach = number of input frames attached (add to total input count)
  11. -Add total tick amount to current total tick amount (very dirty, but its not used anyway)
  12. -(from (starting frame range) * factor) * 17 (bytes per input frame) = byte number to start copying data from
  13. -(to (end frame range) * factor) * 17 = byte number to stop at
  14. -Increase total bytes by 17 every time the loop copies data
  15. -Increase total input frames by 1 each loop to verify the code is correct (compare with previous calc)
  16. -Call SaveRecording to save new DTM under custom location
  17. -Set g_totalFrames and g_totalInputCount to their respective values
  18. -Make sure playback can be natively resumed with the newly spliced file (currentByte etc. is the same as when stopped playback)
  19.  
  20.  
  21. Maybe record RNG values too and check those to detect potential desyncs even earlier
Add Comment
Please, Sign In to add comment