{"id":216,"date":"2020-08-24T12:00:32","date_gmt":"2020-08-24T12:00:32","guid":{"rendered":"https:\/\/blogs.scummvm.org\/djsrv\/?p=216"},"modified":"2022-05-24T00:40:03","modified_gmt":"2022-05-24T00:40:03","slug":"wrapping-up-the-summer","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/djsrv\/2020\/08\/24\/wrapping-up-the-summer\/","title":{"rendered":"Wrapping up the Summer"},"content":{"rendered":"<section class=\"body\">Summer\u2019s drawing to a close, and the school year is about to begin. Before that happens, I\u2019m trying to squeeze in a few more tasks: exposing more Director features as Lingo objects, fully implementing chunk expressions, and cleaning up the implementations of Director 4 Lingo instructions.<\/p>\n<p>One of the ways I\u2019ve tried to make the D4 instructions cleaner is by reducing code duplication. First, I cut down the size of <code>cb_objectcall<\/code> by reusing functionality in the generic <code>call<\/code>. Then, I noticed that several variable-related instructions take a variable type argument, but none of the instructions handled every variable type correctly. After identifying the IDs for every type I could, I combined all this duplicated variable lookup code into a single helper function.<\/p>\n<p>I also implemented Lingo errors, allowing for easier detection of illegal cases, which often indicate a mistake on our part.<\/p>\n<p>Then, I began implementing better support of chunk expressions. Chunk expressions are references to substrings, such as <code>word 2 to 4 of \"the quick brown fox\"<\/code>. You can use them to grab text:<\/p>\n<pre><code>set x to word 2 to 4 of \"the quick brown fox\"`\r\n<\/code><\/pre>\n<p>or you can use them manipulate the text:<\/p>\n<pre><code>put \" foo\" after word 2 of x\r\n<\/code><\/pre>\n<p>Previously, we only supported the former, and I\u2019m in the process of implementing support for the latter.<\/p>\n<p>Since summer\u2019s almost over, I\u2019d like to thank the ScummVM developers, especially sev, rvanlaar, and moralrecordings, as well as Google for its Summer of Code program. I\u2019ve learned a lot and had a good deal of fun over the past three months.<\/p>\n<p>I won\u2019t be working on ScummVM full-time anymore, but this definitely won\u2019t be the last you hear from me. We still have plenty of work to do on Director, and I plan to keep contributing in my spare time.<\/p>\n<p>See you soon!<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Summer\u2019s drawing to a close, and the school year is about to begin. Before that happens, I\u2019m trying to squeeze in a few more tasks: exposing more Director features as Lingo objects, fully implementing chunk expressions, and cleaning up the implementations of Director 4 Lingo instructions. One of the ways I\u2019ve tried to make the [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/216\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}