igorlira / dirplayer-rs

A web-compatible Shockwave Player emulator written in Rust
GNU General Public License v3.0
52 stars 10 forks source link

deserialize frame labels, add movie frameLabel prop #25

Closed matthewdean closed 3 months ago

matthewdean commented 3 months ago
  1. I'm sure why this pull request includes older commits which have already been merged into the repository. If you merge it, can you squash the commits while doing so?
  2. Since frame labels are considered part of the score, should I refactor this so that there is a single function for deserializing the score which reads both score and frame labels chunks? This would reduce need to pass frame labels into DirPlayer and then into the score.
  3. This new code assumes that every director file has a frame labels chunk. I couldn't find any documentation indicating whether or not this is a correct assumption.
igorlira commented 3 months ago

@matthewdean Thanks for this PR! Regarding your questions:

  1. Will do
  2. The way you implemented already looks good, I wouldn't worry about it
  3. I don't think that is true, in fact when testing your PR on Habbo, it crashed on load because the frame labels chunk is not found. Could you update to make the frame labels chunk optional? The error should be reproducible with the DCRs we're using on the demo page: http://dirplayer-rs.s3-website-us-west-2.amazonaws.com/
matthewdean commented 3 months ago

Made the frame labels chunk optional and cleaned up the branch's commit history in the process. Also tested it against habbo.dcr and found it does not crash.