{"id":29,"date":"2025-06-16T10:11:37","date_gmt":"2025-06-16T10:11:37","guid":{"rendered":"https:\/\/blogs.scummvm.org\/superlemon\/?p=29"},"modified":"2025-06-16T10:21:24","modified_gmt":"2025-06-16T10:21:24","slug":"trying-to-walk-when-you-cant-crawl","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/superlemon\/2025\/06\/16\/trying-to-walk-when-you-cant-crawl\/","title":{"rendered":"Trying to walk when you can&#8217;t crawl!"},"content":{"rendered":"<p style=\"text-align: left\">This week, I actually got to implementing the Movie castmembers in ScummVM. The idea behind this was to use the <code>MovieCastMember<\/code> as a wrapper around a Movie member. This Movie class variable will handle the updating of frame number, execution of Scripts, handling events, etc. just like how a the main movie handles it. The tricky part was that it does not have a window. The main movie has a dedicated window where it can render its Sprites. The Movie castmember needs to be rendered in a box inside this main window. For this purpose when the main window updates (renders the next frame in the main movie) it also asks the <code>MovieCastMember<\/code> for its updated sprites using a function called <code>getSubChannels()<\/code>. So, the idea was simple, before returning these sprites, we ask the Movie castmember to &#8220;step&#8221;, update its own state.<\/p>\n<p style=\"text-align: left\">But, this simple idea lead to me facing many difficulties. First of all, I had to include a check at each place the <code>_window<\/code> member was accessed in all functions in classes <code>Movie<\/code> and <code>Score<\/code>. The class <code>Window<\/code> also tracks the the Lingo State, which was now inaccessible for our <code>MovieCastMember<\/code>. So, the <code>Window<\/code> class needed refactoring.\u00a0 I separated all Lingo State keeping functionality into a separate class <code>LingoStateKeeper<\/code> and migrated all the relevant functions\u00a0 from <code>Window<\/code>. I added a member <code>_stateKeeper<\/code> to <code>Window<\/code> and <code>Score<\/code>. There was also a question of whether <code>MovieCastMembers<\/code> can switch movies using the <code>go to movie ...<\/code> command. I created a movie as a test in the original Director to check this. @sev asked me to add it to the director-tests repository.<\/p>\n<p style=\"text-align: left\">This task is still incomplete. I&#8217;m able to see externally linked movies in ScummVM&#8217;s Director but they are stuck. They still do not allow execution of their own scripts.<\/p>\n<p style=\"text-align: left\">What was thought to be a two day job, ate my entire week. I didn&#8217;t have my Director basics down. I hadn&#8217;t read the Manuals that were given to me a weeks ago.\u00a0 I made obvious logical mistakes, I got stuck at multiple points&#8230; to the point that @sev has asked me to take a step away from this task. \u00a0I was working on processing Lingo script events the last. He will continue from here. He asked me to focus on my main task of\u00a0 saving Director Movies. Hopefully, I&#8217;ll learn enough to come back to this task and be able to finish it.<\/p>\n<p style=\"text-align: left\">I&#8217;m worried at this pace, whether I&#8217;ll be able to complete my project or rather make a meaningful contribution to ScummVM in a reasonable time period. I wanted to work yesterday (Sunday) but I thought it&#8217;d best to take the day off and read the Interactivity Manual (even though its a bit late now) and start working today (Monday) with a fresh mind.<\/p>\n<p style=\"text-align: left\">This week I&#8217;ll focus on studying <a href=\"https:\/\/github.com\/ProjectorRays\/ProjectorRays.git\">ProjectorRays<\/a> to start writing director files. Study the different chunk types in a <code>.dir<\/code> file.<\/p>\n<p style=\"text-align: left\">So&#8230; the first two weeks for me have been much less than perfect. I&#8217;m too focused on the greener side of the river forgetting there is deep water in between, gotta pass through that first or I&#8217;ll drown&#8230; But I&#8217;m optimistic. Even though I couldn&#8217;t keep the promise of having a good week from last week, I hope to have a comeback week starting today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, I actually got to implementing the Movie castmembers in ScummVM. The idea behind this was to use the MovieCastMember as a wrapper around a Movie member. This Movie class variable will handle the updating of frame number, execution of Scripts, handling events, etc. just like how a the main movie handles it. The [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-week-2"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":5,"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/posts\/29\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/superlemon\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}